From e0f57f0d56a2a7b619791f24777b3b01b6af9a73 Mon Sep 17 00:00:00 2001 From: iarenaza Date: Wed, 10 Oct 2007 21:09:18 +0000 Subject: [PATCH] Fix MDL-11632: Multiple files with emtpy lines outside PHP open/close tags There are multiple issues with Moodle files containing empty or blank lines (lines consisting of white spaces or tabs only) and/or white space before or after the PHP open and close tags, notably with config.php and theme files. --- admin/uploaduser.php | 1 - auth/cas/languages.php | 1 - course/import/groups/index.php | 1 - course/search.php | 1 - course/user.php | 1 - lib/adodb/lang/adodb-ar.inc.php | 1 - lib/adodb/lang/adodb-bg.inc.php | 1 - lib/adodb/lang/adodb-bgutf8.inc.php | 3 +-- lib/adodb/lang/adodb-en.inc.php | 1 - lib/adodb/lang/adodb-pl.inc.php | 1 - lib/adodb/lang/adodb-ro.inc.php | 1 - lib/adodb/readme_moodle.txt | 8 ++++++-- mod/choice/index.php | 1 - mod/exercise/assessments.php | 1 - mod/glossary/tabs.html | 2 +- mod/glossary/tabs.php | 2 +- mod/journal/index.php | 1 - mod/journal/report.php | 1 - mod/label/view.php | 1 - mod/lesson/action/confirmdelete.php | 1 - mod/resource/index.php | 1 - mod/resource/type/repository/hive/openlitepublish.php | 1 - mod/scorm/datamodel.php | 1 - mod/survey/download.php | 1 - mod/workshop/assess.php | 1 - mod/workshop/assessments.php | 1 - mod/workshop/upload.php | 1 - mod/workshop/viewassessment.php | 1 - question/export.php | 1 - question/format/blackboard/format.php | 1 - sso/hive/login.php | 1 - theme/chameleon/ui/chameleon.php | 2 -- 32 files changed, 9 insertions(+), 35 deletions(-) diff --git a/admin/uploaduser.php b/admin/uploaduser.php index 16eaf03256dc8..f8e124418ecc3 100755 --- a/admin/uploaduser.php +++ b/admin/uploaduser.php @@ -421,4 +421,3 @@ function my_file_get_contents($filename, $use_include_path = 0) { } ?> - diff --git a/auth/cas/languages.php b/auth/cas/languages.php index b0d40fa96caae..9edb8e768ed3f 100644 --- a/auth/cas/languages.php +++ b/auth/cas/languages.php @@ -15,4 +15,3 @@ "french" => "French"); ?> - diff --git a/course/import/groups/index.php b/course/import/groups/index.php index 341a59f425b70..70e06f1baa74a 100755 --- a/course/import/groups/index.php +++ b/course/import/groups/index.php @@ -209,4 +209,3 @@ function my_file_get_contents($filename, $use_include_path = 0) { } ?> - diff --git a/course/search.php b/course/search.php index b8a901599b505..bea5eabfc8840 100644 --- a/course/search.php +++ b/course/search.php @@ -327,4 +327,3 @@ ?> - diff --git a/course/user.php b/course/user.php index 110a3afcb21c3..ba98ed34d3beb 100644 --- a/course/user.php +++ b/course/user.php @@ -289,4 +289,3 @@ function print_outline_row($mod, $instance, $result) { } ?> - diff --git a/lib/adodb/lang/adodb-ar.inc.php b/lib/adodb/lang/adodb-ar.inc.php index dd0f830f17796..d4ef68fc44fa9 100644 --- a/lib/adodb/lang/adodb-ar.inc.php +++ b/lib/adodb/lang/adodb-ar.inc.php @@ -31,4 +31,3 @@ DB_ERROR_ACCESS_VIOLATION => ' ' ); ?> - diff --git a/lib/adodb/lang/adodb-bg.inc.php b/lib/adodb/lang/adodb-bg.inc.php index 4fb1dc070ac68..a3f840d1b5139 100644 --- a/lib/adodb/lang/adodb-bg.inc.php +++ b/lib/adodb/lang/adodb-bg.inc.php @@ -35,4 +35,3 @@ DB_ERROR_ACCESS_VIOLATION => ' ' ); ?> - \ No newline at end of file diff --git a/lib/adodb/lang/adodb-bgutf8.inc.php b/lib/adodb/lang/adodb-bgutf8.inc.php index 6f3a4173353df..d5c7155c609bc 100644 --- a/lib/adodb/lang/adodb-bgutf8.inc.php +++ b/lib/adodb/lang/adodb-bgutf8.inc.php @@ -1,4 +1,4 @@ - @@ -35,4 +35,3 @@ DB_ERROR_ACCESS_VIOLATION => 'нямате достатъчно права' ); ?> - \ No newline at end of file diff --git a/lib/adodb/lang/adodb-en.inc.php b/lib/adodb/lang/adodb-en.inc.php index ed1b8f19a869c..04f972edd963b 100644 --- a/lib/adodb/lang/adodb-en.inc.php +++ b/lib/adodb/lang/adodb-en.inc.php @@ -31,4 +31,3 @@ DB_ERROR_ACCESS_VIOLATION => 'insufficient permissions' ); ?> - \ No newline at end of file diff --git a/lib/adodb/lang/adodb-pl.inc.php b/lib/adodb/lang/adodb-pl.inc.php index aee5bfdfdc00c..27d2d79d130d3 100644 --- a/lib/adodb/lang/adodb-pl.inc.php +++ b/lib/adodb/lang/adodb-pl.inc.php @@ -33,4 +33,3 @@ DB_ERROR_ACCESS_VIOLATION => 'niedostateczne uprawnienia' ); ?> - \ No newline at end of file diff --git a/lib/adodb/lang/adodb-ro.inc.php b/lib/adodb/lang/adodb-ro.inc.php index 7c9aa522b7e89..8263d822b4270 100644 --- a/lib/adodb/lang/adodb-ro.inc.php +++ b/lib/adodb/lang/adodb-ro.inc.php @@ -33,4 +33,3 @@ DB_ERROR_ACCESS_VIOLATION => 'permisiuni insuficiente' ); ?> - diff --git a/lib/adodb/readme_moodle.txt b/lib/adodb/readme_moodle.txt index be5b5e87b4ce4..0a6e75fe7f206 100644 --- a/lib/adodb/readme_moodle.txt +++ b/lib/adodb/readme_moodle.txt @@ -22,6 +22,10 @@ Our changes: for the annoying http://tracker.moodle.org/browse/MDL-6877. Once fixed by adodb guys, we'll return to their official distro. * removed bogus "_connec" from first line of adodb-postgres64.inc.php + * lang/adodb-ar.inc.php lang/adodb-bg.inc.php lang/adodb-bgutf8.inc.php + lang/adodb-en.inc.php lang/adodb-pl.inc.php lang/adodb-ro.inc.php + lang/adodb_th.inc.php - Removed leadinag/trailing white space outside PHP open/close tags + (see http://tracker.moodle.org/browse/MDL-11632). -skodak -11 October 2006 +skodak,iarenaza +10 October 2007 diff --git a/mod/choice/index.php b/mod/choice/index.php index 66681a7f9812a..55f50eaca5d46 100644 --- a/mod/choice/index.php +++ b/mod/choice/index.php @@ -91,4 +91,3 @@ print_footer($course); ?> - diff --git a/mod/exercise/assessments.php b/mod/exercise/assessments.php index 49774da9c1d58..c168693599511 100644 --- a/mod/exercise/assessments.php +++ b/mod/exercise/assessments.php @@ -1173,4 +1173,3 @@ print_footer($course); ?> - diff --git a/mod/glossary/tabs.html b/mod/glossary/tabs.html index e2383166de969..a4861500ef6a2 100644 --- a/mod/glossary/tabs.html +++ b/mod/glossary/tabs.html @@ -107,4 +107,4 @@ break; } echo '
'; -?> +?> diff --git a/mod/glossary/tabs.php b/mod/glossary/tabs.php index ae0144a0bd8c7..fc07aeee45647 100644 --- a/mod/glossary/tabs.php +++ b/mod/glossary/tabs.php @@ -107,4 +107,4 @@ break; } echo '
'; -?> +?> diff --git a/mod/journal/index.php b/mod/journal/index.php index 2dbf763bf0e71..9d0e4b9ab72ea 100644 --- a/mod/journal/index.php +++ b/mod/journal/index.php @@ -56,4 +56,3 @@ print_footer($course); ?> - diff --git a/mod/journal/report.php b/mod/journal/report.php index 1bf5cf8c564e5..505b812ce4f8e 100644 --- a/mod/journal/report.php +++ b/mod/journal/report.php @@ -141,4 +141,3 @@ print_footer($course); ?> - diff --git a/mod/label/view.php b/mod/label/view.php index 20575ece2b8d5..74a8b3011261d 100644 --- a/mod/label/view.php +++ b/mod/label/view.php @@ -35,4 +35,3 @@ redirect("$CFG->wwwroot/course/view.php?id=$course->id"); ?> - diff --git a/mod/lesson/action/confirmdelete.php b/mod/lesson/action/confirmdelete.php index a1f2a3a75da89..586312a6326c0 100644 --- a/mod/lesson/action/confirmdelete.php +++ b/mod/lesson/action/confirmdelete.php @@ -28,4 +28,3 @@ "lesson.php?action=delete&id=$cm->id&pageid=$pageid&sesskey=".$USER->sesskey, "view.php?id=$cm->id"); ?> - diff --git a/mod/resource/index.php b/mod/resource/index.php index 7f3ae9c29cfb8..c33431adf9986 100644 --- a/mod/resource/index.php +++ b/mod/resource/index.php @@ -87,4 +87,3 @@ print_footer($course); ?> - diff --git a/mod/resource/type/repository/hive/openlitepublish.php b/mod/resource/type/repository/hive/openlitepublish.php index 73151342fb850..d0fef9fab8902 100644 --- a/mod/resource/type/repository/hive/openlitepublish.php +++ b/mod/resource/type/repository/hive/openlitepublish.php @@ -43,4 +43,3 @@ redirect($CFG->hiveprotocol .'://'. $CFG->hivehost .':'. $CFG->hiveport .''. $CFG->hivepath .'?'.$query); ?> - diff --git a/mod/scorm/datamodel.php b/mod/scorm/datamodel.php index bcb4dc3a21015..d7c6d8766eafc 100755 --- a/mod/scorm/datamodel.php +++ b/mod/scorm/datamodel.php @@ -79,4 +79,3 @@ } } ?> - diff --git a/mod/survey/download.php b/mod/survey/download.php index be32352dc7e28..79a2671d51205 100644 --- a/mod/survey/download.php +++ b/mod/survey/download.php @@ -309,4 +309,3 @@ ?> - diff --git a/mod/workshop/assess.php b/mod/workshop/assess.php index ebe11ac977a2d..d65dbfea05225 100644 --- a/mod/workshop/assess.php +++ b/mod/workshop/assess.php @@ -149,4 +149,3 @@ print_footer('none'); ?> - diff --git a/mod/workshop/assessments.php b/mod/workshop/assessments.php index 451b70d4edf38..36dcb2ee9b6ec 100644 --- a/mod/workshop/assessments.php +++ b/mod/workshop/assessments.php @@ -1364,4 +1364,3 @@ print_footer($course); ?> - diff --git a/mod/workshop/upload.php b/mod/workshop/upload.php index 8559b92135210..3b259f00933c6 100644 --- a/mod/workshop/upload.php +++ b/mod/workshop/upload.php @@ -117,4 +117,3 @@ print_footer($course); ?> - diff --git a/mod/workshop/viewassessment.php b/mod/workshop/viewassessment.php index cba5bbd1e49e2..a157593e3dd60 100644 --- a/mod/workshop/viewassessment.php +++ b/mod/workshop/viewassessment.php @@ -89,4 +89,3 @@ print_footer('none'); ?> - diff --git a/question/export.php b/question/export.php index 5887cc01e0d5d..20f2821f73deb 100644 --- a/question/export.php +++ b/question/export.php @@ -201,4 +201,3 @@ print_box_end(); print_footer($course); ?> - diff --git a/question/format/blackboard/format.php b/question/format/blackboard/format.php index c9a87f8cf21a6..d9c4bc2c41718 100644 --- a/question/format/blackboard/format.php +++ b/question/format/blackboard/format.php @@ -1,4 +1,3 @@ - - diff --git a/theme/chameleon/ui/chameleon.php b/theme/chameleon/ui/chameleon.php index aac69aa330a87..86b3d8c57a29e 100644 --- a/theme/chameleon/ui/chameleon.php +++ b/theme/chameleon/ui/chameleon.php @@ -28,5 +28,3 @@ } } ?> - -