Skip to content

Commit

Permalink
MDL-18644 Bugs found by syntax checker, merged from MOODLE_19_STABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrd8mz committed Mar 23, 2009
1 parent 9fb1634 commit 081a9b0
Show file tree
Hide file tree
Showing 10 changed files with 2,231 additions and 2,232 deletions.
1,020 changes: 510 additions & 510 deletions auth/cas/CAS/client.php

Large diffs are not rendered by default.

531 changes: 265 additions & 266 deletions lib/adodb/perf/perf-mysql.inc.php

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions lib/magpie/rss_parse.inc
Original file line number Diff line number Diff line change
Expand Up @@ -587,18 +587,18 @@ function map_attrs($k, $v) {
// courtesy, Ryan Currie, [email protected]

if (!function_exists('array_change_key_case')) {
define("CASE_UPPER",1);
define("CASE_LOWER",0);
define("CASE_UPPER",1);
define("CASE_LOWER",0);


function array_change_key_case($array,$case=CASE_LOWER) {
if ($case=CASE_LOWER) $cmd=strtolower;
elseif ($case=CASE_UPPER) $cmd=strtoupper;
function array_change_key_case($array,$case=CASE_LOWER) {
if ($case == CASE_LOWER) $cmd=strtolower;
elseif ($case == CASE_UPPER) $cmd=strtoupper;
foreach($array as $key=>$value) {
$output[$cmd($key)]=$value;
}
return $output;
}
}

}

Expand Down
2 changes: 1 addition & 1 deletion login/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
// Handles the case of another Moodle site linking into a page on this site
//TODO: move weblink into own auth plugin
include($CFG->dirroot.'/login/weblinkauth.php');
if (function_exists(weblink_auth)) {
if (function_exists('weblink_auth')) {
$user = weblink_auth($SESSION->wantsurl);
}
if ($user) {
Expand Down
2 changes: 1 addition & 1 deletion mod/lesson/reformat.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function importmodifiedaikenstyle($filename) {
// make entry followed by '.'
$line[1]='.';
}
elseif ( ($responses AND $answer_found) OR (count(outlines)<=1) ) {
elseif ( ($responses AND $answer_found) OR (count($outlines)<=1) ) {
// we have found responses and an answer and the current line is not an answer
switch ($line[0]) {
case 1:
Expand Down
2 changes: 1 addition & 1 deletion mod/resource/type/file/resource.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ function set_encrypted_parameter() {

if (!empty($this->resource->reference) && file_exists($CFG->dirroot ."/mod/resource/type/file/externserverfile.php")) {
include $CFG->dirroot ."/mod/resource/type/file/externserverfile.php";
if (function_exists(extern_server_file)) {
if (function_exists('extern_server_file')) {
return extern_server_file($this->resource->reference);
}
}
Expand Down
2 changes: 1 addition & 1 deletion mod/resource/type/ims/deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ function ims_extract_submanifests($data) {
$moresubmanifests = ims_extract_submanifests($submanifest['#']);
/// Add them to results array
if (!empty($moresubmanifests)) {
$submanifest_object->childs = moresubmanifests;
$submanifest_object->childs = $moresubmanifests;
}
/// Add submanifest object to results array
$submanifests[] = $submanifest_object;
Expand Down
2 changes: 1 addition & 1 deletion mod/resource/type/ims/repository_deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ function ims_extract_submanifests($data) {
$moresubmanifests = ims_extract_submanifests($submanifest['#']);
/// Add them to results array
if (!empty($moresubmanifests)) {
$submanifest_object->childs = moresubmanifests;
$submanifest_object->childs = $moresubmanifests;
}
/// Add submanifest object to results array
$submanifests[] = $submanifest_object;
Expand Down
2 changes: 1 addition & 1 deletion mod/resource/type/repository/resource.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ function set_encrypted_parameter() {

if (!empty($this->resource->reference) && file_exists($CFG->dirroot ."/mod/resource/type/file/externserverfile.php")) {
include $CFG->dirroot ."/mod/resource/type/file/externserverfile.php";
if (function_exists(extern_server_file)) {
if (function_exists('extern_server_file')) {
return extern_server_file($this->resource->reference);
}
}
Expand Down
Loading

0 comments on commit 081a9b0

Please sign in to comment.