performance MDL-25637 converted tabs to spaces
This commit is contained in:
+2
-2
@@ -129,7 +129,7 @@
|
||||
}
|
||||
|
||||
// Delete all files in the curent directory return false and halt if a file cannot be removed
|
||||
$countdirfiles = count($dir_files);
|
||||
$countdirfiles = count($dir_files);
|
||||
for($i=0; $i<$countdirfiles; $i++) {
|
||||
chmod($dir_files[$i], $CFG->directorypermissions);
|
||||
if (((unlink($dir_files[$i]))) == FALSE) {
|
||||
@@ -138,7 +138,7 @@
|
||||
}
|
||||
|
||||
// Empty sub directories and then remove the directory
|
||||
$countdirsubdirs = count($dir_subdirs);
|
||||
$countdirsubdirs = count($dir_subdirs);
|
||||
for($i=0; $i<$countdirsubdirs; $i++) {
|
||||
chmod($dir_subdirs[$i], $CFG->directorypermissions);
|
||||
if (delete_dir_contents($dir_subdirs[$i]) == FALSE) {
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
$tagsarr = $info['BLOG']['#']['BLOG_TAGS']['0']['#']['BLOG_TAG'];
|
||||
//Iterate over tags
|
||||
$tags = array();
|
||||
$sizetagsarr = sizeof($tagsarr);
|
||||
$sizetagsarr = sizeof($tagsarr);
|
||||
for($i = 0; $i < $sizetagsarr; $i++) {
|
||||
$tag_info = $tagsarr[$i];
|
||||
///traverse_xmlize($tag_info); //Debug
|
||||
|
||||
@@ -119,7 +119,7 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||
|
||||
$analysedAnswer = array();
|
||||
if($info->subtype == 'c') {
|
||||
$sizeofanswers = sizeof($answers);
|
||||
$sizeofanswers = sizeof($answers);
|
||||
for($i = 1; $i <= $sizeofanswers; $i++) {
|
||||
$ans = null;
|
||||
$ans->answertext = $answers[$i-1];
|
||||
@@ -137,7 +137,7 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||
$analysedAnswer[] = $ans;
|
||||
}
|
||||
}else {
|
||||
$sizeofanswers = sizeof($answers);
|
||||
$sizeofanswers = sizeof($answers);
|
||||
for($i = 1; $i <= $sizeofanswers; $i++) {
|
||||
$ans = null;
|
||||
$ans->answertext = $answers[$i-1];
|
||||
@@ -169,7 +169,7 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||
|
||||
if($info->subtype == 'c') {
|
||||
$vallist = array_values(explode (FEEDBACK_MULTICHOICE_LINE_SEP, $value->value));
|
||||
$sizeofvallist = sizeof($vallist);
|
||||
$sizeofvallist = sizeof($vallist);
|
||||
for($i = 0; $i < $sizeofvallist; $i++) {
|
||||
$sizeofpresentation = sizeof($presentation);
|
||||
for($k = 0; $k < $sizeofpresentation; $k++) {
|
||||
|
||||
@@ -248,7 +248,7 @@ if ($xml = glossary_read_imported_file($result)) {
|
||||
$importedentries++;
|
||||
|
||||
$xmlaliases = @$xmlentry['#']['ALIASES'][0]['#']['ALIAS']; // ignore missing ALIASES
|
||||
$sizeofxmlaliases = sizeof($xmlaliases);
|
||||
$sizeofxmlaliases = sizeof($xmlaliases);
|
||||
for($k = 0; $k < $sizeofxmlaliases; $k++) {
|
||||
/// Importing aliases
|
||||
$xmlalias = $xmlaliases[$k];
|
||||
@@ -265,7 +265,7 @@ if ($xml = glossary_read_imported_file($result)) {
|
||||
if (!empty($data->catsincl)) {
|
||||
// If the categories must be imported...
|
||||
$xmlcats = @$xmlentry['#']['CATEGORIES'][0]['#']['CATEGORY']; // ignore missing CATEGORIES
|
||||
$sizeofxmlcats = sizeof($xmlcats);
|
||||
$sizeofxmlcats = sizeof($xmlcats);
|
||||
for($k = 0; $k < $sizeofxmlcats; $k++) {
|
||||
$xmlcat = $xmlcats[$k];
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ if ($data = $mform->get_data()) {
|
||||
// want to allow <b><i>(maybe more) tags but when we do that
|
||||
// the preg_match messes up.
|
||||
preg_match_all("/(<([\w]+)[^>]*>)([^<\\2>]*)(<\/\\2>)/", $string, $matches);
|
||||
$countmatches = count($matches[1]);
|
||||
$countmatches = count($matches[1]);
|
||||
for($i = 0; $i < $countmatches; $i++) { // go through all of our div matches
|
||||
|
||||
$class = lesson_importppt_isolate_class($matches[1][$i]); // first step in isolating the class
|
||||
|
||||
@@ -300,7 +300,7 @@ class ouwiki_line {
|
||||
$pos=0;
|
||||
while(true) {
|
||||
// Find a non-space
|
||||
$strlendata = strlen($data);
|
||||
$strlendata = strlen($data);
|
||||
for(;$pos < $strlendata && substr($data,$pos,1)===' ';$pos++) ;
|
||||
if($pos==$strlendata) {
|
||||
// No more content
|
||||
@@ -528,7 +528,7 @@ class ouwiki_changes {
|
||||
// resulting array will be -,-,3,3,3,-,0
|
||||
$squidges=array();
|
||||
$lowest=0;
|
||||
$countdiff = count($diff);
|
||||
$countdiff = count($diff);
|
||||
for($index1=$countdiff;$index1>=1;$index1--) {
|
||||
$index2=$diff[$index1];
|
||||
if($index2===0) {
|
||||
|
||||
@@ -142,7 +142,7 @@ class nwiki_parser extends wiki_markup_parser {
|
||||
$cells = array();
|
||||
foreach($normalcells as $nc) {
|
||||
$headercells = explode("!!", $nc);
|
||||
$countheadercells = count($headercells);
|
||||
$countheadercells = count($headercells);
|
||||
for($i = 0; $i < $countheadercells; $i++) {
|
||||
$cells[] = array($type, $headercells[$i]);
|
||||
$type = 'header';
|
||||
|
||||
Reference in New Issue
Block a user