Skip to content
Browse files

MDL-15189 magic quotes finally removed

  • Loading branch information...
1 parent c45ea1d commit 294ce9870f0a55031f1345723efb54db858c0750 skodak committed Jun 9, 2008
Showing with 498 additions and 632 deletions.
  1. +1 −1 admin/auth_config.php
  2. +3 −11 admin/cliupgrade.php
  3. +1 −1 admin/enrol_config.php
  4. +1 −1 admin/filter.php
  5. +1 −1 admin/lang.php
  6. +1 −1 admin/maintenance.php
  7. +1 −1 admin/mnet/MethodTable.php
  8. +1 −1 admin/mnet/access_control.php
  9. +1 −1 admin/mnet/adminlib.php
  10. +1 −1 admin/mnet/enr_course_enrol.php
  11. +1 −1 admin/mnet/index.php
  12. +1 −1 admin/mnet/mnet_themes.php
  13. +0 −3 admin/replace.php
  14. +1 −1 admin/roles/allowoverride.php
  15. +2 −5 admin/roles/manage.php
  16. +1 −1 admin/roles/override.php
  17. +1 −3 admin/search.php
  18. +1 −1 admin/settings.php
  19. +1 −1 admin/upgradesettings.php
  20. +1 −1 admin/uploadpicture.php
  21. +1 −1 admin/uploaduser.php
  22. +2 −2 admin/user/user_bulk.php
  23. +1 −1 admin/user/user_bulk_confirm.php
  24. +1 −1 admin/user/user_bulk_message.php
  25. +1 −1 admin/xmldb/actions/XMLDBAction.class.php
  26. +1 −1 admin/xmldb/actions/create_xml_file/create_xml_file.class.php
  27. +1 −1 admin/xmldb/actions/delete_field/delete_field.class.php
  28. +1 −1 admin/xmldb/actions/delete_index/delete_index.class.php
  29. +1 −1 admin/xmldb/actions/delete_key/delete_key.class.php
  30. +1 −1 admin/xmldb/actions/delete_sentence/delete_sentence.class.php
  31. +1 −1 admin/xmldb/actions/delete_statement/delete_statement.class.php
  32. +1 −1 admin/xmldb/actions/delete_table/delete_table.class.php
  33. +1 −1 admin/xmldb/actions/delete_xml_file/delete_xml_file.class.php
  34. +1 −1 admin/xmldb/actions/edit_field/edit_field.class.php
  35. +5 −5 admin/xmldb/actions/edit_field_save/edit_field_save.class.php
  36. +1 −1 admin/xmldb/actions/edit_index/edit_index.class.php
  37. +4 −4 admin/xmldb/actions/edit_index_save/edit_index_save.class.php
  38. +1 −1 admin/xmldb/actions/edit_key/edit_key.class.php
  39. +5 −5 admin/xmldb/actions/edit_key_save/edit_key_save.class.php
  40. +1 −1 admin/xmldb/actions/edit_sentence/edit_sentence.class.php
  41. +3 −3 admin/xmldb/actions/edit_sentence_save/edit_sentence_save.class.php
  42. +1 −1 admin/xmldb/actions/edit_statement/edit_statement.class.php
  43. +2 −2 admin/xmldb/actions/edit_statement_save/edit_statement_save.class.php
  44. +1 −1 admin/xmldb/actions/edit_table/edit_table.class.php
  45. +3 −3 admin/xmldb/actions/edit_table_save/edit_table_save.class.php
  46. +1 −1 admin/xmldb/actions/edit_xml_file/edit_xml_file.class.php
  47. +3 −3 admin/xmldb/actions/edit_xml_file_save/edit_xml_file_save.class.php
  48. +1 −1 admin/xmldb/actions/load_xml_file/load_xml_file.class.php
  49. +1 −1 admin/xmldb/actions/move_updown_field/move_updown_field.class.php
  50. +1 −1 admin/xmldb/actions/move_updown_index/move_updown_index.class.php
  51. +1 −1 admin/xmldb/actions/move_updown_key/move_updown_key.class.php
  52. +1 −1 admin/xmldb/actions/move_updown_statement/move_updown_statement.class.php
  53. +1 −1 admin/xmldb/actions/move_updown_table/move_updown_table.class.php
  54. +1 −1 admin/xmldb/actions/new_field/new_field.class.php
  55. +1 −1 admin/xmldb/actions/new_index/new_index.class.php
  56. +1 −1 admin/xmldb/actions/new_key/new_key.class.php
  57. +1 −1 admin/xmldb/actions/new_sentence/new_sentence.class.php
  58. +1 −1 admin/xmldb/actions/new_statement/new_statement.class.php
  59. +1 −1 admin/xmldb/actions/new_table/new_table.class.php
  60. +1 −1 admin/xmldb/actions/new_table_from_mysql/new_table_from_mysql.class.php
  61. +1 −1 admin/xmldb/actions/revert_changes/revert_changes.class.php
  62. +1 −1 admin/xmldb/actions/save_xml_file/save_xml_file.class.php
  63. +1 −1 admin/xmldb/actions/template/template.class.php
  64. +1 −1 admin/xmldb/actions/unload_xml_file/unload_xml_file.class.php
  65. +1 −1 admin/xmldb/actions/view_field_xml/view_field_xml.class.php
  66. +1 −1 admin/xmldb/actions/view_index_xml/view_index_xml.class.php
  67. +1 −1 admin/xmldb/actions/view_key_xml/view_key_xml.class.php
  68. +1 −1 admin/xmldb/actions/view_statement_xml/view_statement_xml.class.php
  69. +1 −1 admin/xmldb/actions/view_structure_php/view_structure_php.class.php
  70. +1 −1 admin/xmldb/actions/view_structure_sql/view_structure_sql.class.php
  71. +1 −1 admin/xmldb/actions/view_structure_xml/view_structure_xml.class.php
  72. +1 −1 admin/xmldb/actions/view_table_php/view_table_php.class.php
  73. +1 −1 admin/xmldb/actions/view_table_sql/view_table_sql.class.php
  74. +1 −1 admin/xmldb/actions/view_table_xml/view_table_xml.class.php
  75. +1 −1 admin/xmldb/actions/view_xml/view_xml.class.php
  76. +1 −2 auth/db/auth.php
  77. +0 −3 auth/mnet/auth.php
  78. +1 −1 backup/lib.php
  79. +2 −2 backup/restore_check.html
  80. +3 −4 backup/restorelib.php
  81. +2 −2 blocks/search/config_global.html
  82. +1 −1 blog/edit.php
  83. +2 −2 calendar/event.php
  84. +1 −1 calendar/preferences.php
  85. +1 −3 course/category.php
  86. +1 −1 course/edit.php
  87. +1 −1 course/editcategory.php
  88. +1 −1 course/editsection.php
  89. +1 −1 course/format/topics/format.php
  90. +1 −1 course/format/weeks/format.php
  91. +0 −2 course/import/activities/index.php
  92. +2 −2 course/import/groups/index.php
  93. +1 −3 course/importstudents.php
  94. +1 −1 course/index.php
  95. +0 −2 course/info.php
  96. +2 −2 course/modedit.php
  97. +0 −3 course/pending.php
  98. +1 −1 course/recent.php
  99. +1 −1 course/request.php
  100. +1 −1 course/reset.php
  101. +1 −3 course/search.php
  102. +1 −1 enrol/imsenterprise/enrol.php
  103. +2 −2 enrol/manual/enrol.php
  104. +0 −1 enrol/paypal/ipn.php
  105. +1 −1 error/index.php
  106. +1 −1 files/index.php
  107. +0 −1 filter/tex/texdebug.php
  108. +1 −1 grade/edit/letter/edit.php
  109. +1 −1 grade/edit/outcome/course.php
  110. +1 −1 grade/edit/outcome/edit.php
  111. +1 −1 grade/edit/outcome/index.php
  112. +1 −1 grade/edit/scale/edit.php
  113. +1 −1 grade/edit/settings/index.php
  114. +2 −2 grade/edit/tree/calculation.php
  115. +1 −1 grade/edit/tree/category.php
  116. +1 −1 grade/edit/tree/grade.php
  117. +1 −1 grade/edit/tree/item.php
  118. +1 −1 grade/edit/tree/outcomeitem.php
  119. +1 −1 grade/export/key.php
  120. +1 −1 grade/export/ods/index.php
  121. +1 −1 grade/export/txt/index.php
  122. +1 −1 grade/export/xls/index.php
  123. +1 −1 grade/export/xml/index.php
  124. +3 −3 grade/import/csv/index.php
  125. +1 −1 grade/import/key.php
  126. +1 −1 grade/import/xml/index.php
  127. +1 −1 grade/report/grader/ajax_callbacks.php
  128. +1 −1 grade/report/grader/index.php
  129. +1 −1 grade/report/grader/lib.php
  130. +1 −1 grade/report/grader/preferences.php
  131. +1 −1 group/assign.php
  132. +3 −3 group/autogroup.php
  133. +0 −2 group/members.php
  134. +1 −1 index.php
  135. +3 −3 lib/adminlib.php
  136. +1 −1 lib/blocklib.php
  137. +0 −19 lib/datalib.php
  138. +13 −1 lib/deprecatedlib.php
  139. +0 −5 lib/dml/mssql_adodb_moodle_database.php
  140. +0 −5 lib/dml/oci8po_adodb_moodle_database.php
  141. +20 −22 lib/dmllib.php
  142. +1 −1 lib/editor/htmlarea/coursefiles.php
  143. +3 −6 lib/editor/htmlarea/htmlarea.php
  144. +1 −1 lib/editor/htmlarea/popups/preview.php
  145. +1 −1 lib/editor/tinymce/coursefiles.php
  146. +1 −1 lib/editor/tinymce/jscripts/tiny_mce/plugins/moodleimage/preview.php
  147. +2 −2 lib/editor/tinymce/jscripts/tiny_mce/plugins/spellchecker/classes/SpellChecker.php
  148. +18 −26 lib/formslib.php
  149. +1 −1 lib/grade/grade_object.php
  150. +1 −5 lib/moodlelib.php
  151. +2 −2 lib/questionlib.php
  152. +1 −1 lib/recaptchalib.php
  153. +1 −1 lib/searchlib.php
  154. +16 −16 lib/setup.php
  155. +5 −52 lib/weblib.php
  156. +1 −1 login/change_password.php
  157. +1 −1 login/forgot_password.php
  158. +2 −2 login/index.php
  159. +1 −1 login/signup.php
  160. +2 −3 message/lib.php
  161. +1 −1 message/send.php
  162. +2 −2 mod/assignment/lib.php
  163. +2 −2 mod/assignment/type/upload/assignment.class.php
  164. +1 −1 mod/chat/gui_header_js/insert.php
  165. +1 −1 mod/choice/lib.php
  166. +1 −1 mod/data/comment.php
  167. +1 −1 mod/data/edit.php
  168. +2 −2 mod/data/field.php
  169. +1 −1 mod/data/field/menu/field.class.php
  170. +1 −1 mod/data/templates.php
  171. +2 −2 mod/feedback/analysis_to_excel.php
  172. +2 −2 mod/feedback/complete.php
  173. +2 −2 mod/feedback/complete_guest.php
  174. +2 −2 mod/feedback/delete_template.php
  175. +1 −1 mod/feedback/edit.php
  176. +1 −1 mod/feedback/edit_item.php
  177. +1 −1 mod/feedback/import.php
  178. +2 −2 mod/feedback/item/captcha/lib.php
  179. +1 −1 mod/feedback/item/label/lib.php
  180. +8 −8 mod/feedback/item/multichoice/lib.php
  181. +6 −6 mod/feedback/item/multichoicerated/lib.php
  182. +3 −3 mod/feedback/item/numeric/lib.php
  183. +4 −4 mod/feedback/item/textarea/lib.php
  184. +4 −4 mod/feedback/item/textfield/lib.php
  185. +1 −1 mod/feedback/mapcourse.php
  186. +1 −1 mod/feedback/print.php
  187. +1 −1 mod/feedback/show_entries.php
  188. +1 −1 mod/feedback/show_entries_anonym.php
  189. +4 −4 mod/forum/lib.php
  190. +1 −1 mod/forum/restorelib.php
  191. +2 −2 mod/forum/search.php
  192. +1 −1 mod/forum/subscribers.php
  193. +2 −2 mod/glossary/comment.php
  194. +1 −1 mod/glossary/edit.php
  195. +4 −4 mod/glossary/import.php
  196. +1 −1 mod/glossary/rate.php
  197. +1 −1 mod/hotpot/attempt.php
  198. +2 −2 mod/hotpot/lib.php
  199. +3 −3 mod/hotpot/report/overview/report.php
  200. +1 −2 mod/hotpot/restorelib.php
  201. +4 −5 mod/lesson/action/continue.php
  202. +3 −3 mod/lesson/action/insertpage.php
  203. +1 −1 mod/lesson/action/updatepage.php
  204. +6 −6 mod/lesson/essay.php
  205. +1 −1 mod/lesson/format.php
  206. +1 −1 mod/lesson/highscores.php
  207. +2 −2 mod/lesson/report.php
  208. +1 −1 mod/lesson/view.php
  209. +1 −1 mod/scorm/datamodels/scorm_12.js.php
  210. +2 −2 mod/scorm/datamodels/scorm_13.js.php
  211. +1 −1 mod/scorm/datamodels/scorm_13lib.php
  212. +20 −20 mod/scorm/datamodels/scormlib.php
  213. +0 −2 mod/survey/report.php
  214. +1 −1 mod/survey/save.php
  215. +1 −1 mod/wiki/ewikimoodlelib.php
  216. +1 −11 mod/wiki/view.php
  217. +2 −2 notes/add.php
  218. +1 −1 notes/delete.php
  219. +1 −1 notes/edit.php
  220. +1 −1 question/category_class.php
  221. +1 −1 question/comment.html
  222. +1 −1 question/format.php
  223. +2 −2 question/format/aiken/format.php
  224. +20 −20 question/format/blackboard/format.php
  225. +17 −17 question/format/blackboard_6/format.php
  226. +12 −12 question/format/coursetestmanager/format.php
  227. +5 −5 question/format/examview/format.php
  228. +7 −7 question/format/gift/format.php
  229. +1 −1 question/format/hotpot/format.php
  230. +4 −4 question/format/missingword/format.php
  231. +2 −2 question/format/multianswer/format.php
  232. +1 −1 question/format/qti2/format.php
  233. +6 −6 question/format/webct/format.php
  234. +5 −5 question/format/xml/format.php
  235. +1 −1 question/type/essay/questiontype.php
  236. +1 −1 question/type/match/questiontype.php
  237. +3 −3 question/type/multichoice/questiontype.php
  238. +1 −1 question/type/numerical/questiontype.php
  239. +3 −3 question/type/questiontype.php
  240. +2 −2 question/type/shortanswer/questiontype.php
  241. +1 −1 sso/hive/login.php
  242. +1 −1 tag/edit.php
  243. +2 −2 tag/tag_autocomplete.php
  244. +1 −1 theme/chameleon/ui/ChameleonCSS.class.php
  245. +2 −2 user/edit.php
  246. +2 −2 user/editadvanced.php
  247. +2 −2 user/filters/lib.php
  248. +2 −2 user/messageselect.php
  249. +1 −1 user/profile/definelib.php
View
2 admin/auth_config.php
@@ -18,7 +18,7 @@
$returnurl = "$CFG->wwwroot/$CFG->admin/settings.php?section=manageauths";
// save configuration changes
-if ($frm = data_submitted(false) and confirm_sesskey()) {
+if ($frm = data_submitted() and confirm_sesskey()) {
$authplugin->validate_form($frm, $err);
View
14 admin/cliupgrade.php
@@ -738,14 +738,6 @@
console_write(STDERR,"The PHP server variable 'file_uploads' is not turned On" ,'',false);
}
- if (empty($CFG->prefix) && $CFG->dbfamily != 'mysql') { //Enforce prefixes for everybody but mysql
- console_write(STDERR,'$CFG->prefix can\'t be empty for your target DB (' . $CFG->dbtype . ')','',false);
- }
-
- if ($CFG->dbfamily == 'oracle' && strlen($CFG->prefix) > 2) { //Max prefix length for Oracle is 2cc
- console_write(STDERR,'$CFG->prefix maximum allowed length for Oracle DBs is 2cc.','',false);
- }
-
/// Check that config.php has been edited
if ($CFG->wwwroot == "http://example.com/moodle") {
@@ -1193,9 +1185,9 @@
}
$newsite = new Object();
- $newsite->fullname = addslashes($sitefullname);
- $newsite->shortname = addslashes($siteshortname);
- $newsite->summary = addslashes($sitesummary);
+ $newsite->fullname = $sitefullname;
+ $newsite->shortname = $siteshortname;
+ $newsite->summary = $sitesummary;
$newsite->newsitems = $sitenewsitems;
$newsite->numsections = 0;
$newsite->category = 0;
View
2 admin/enrol_config.php
@@ -17,7 +17,7 @@
/// If data submitted, then process and store.
- if ($frm = data_submitted(false)) {
+ if ($frm = data_submitted()) {
if (!confirm_sesskey()) {
print_error('confirmsesskeybad', 'error');
}
View
2 admin/filter.php
@@ -27,7 +27,7 @@
//======================
// if reset pressed let filter config page handle it
- if ($config = data_submitted(false) and !$forcereset) {
+ if ($config = data_submitted() and !$forcereset) {
// check session key
if (!confirm_sesskey()) {
View
2 admin/lang.php
@@ -1358,7 +1358,7 @@ function lang_help_save_file($helproot, $file, $content) {
}
error_reporting($CFG->debug);
- fwrite($f, stripslashes($content));
+ fwrite($f, $content);
fclose($f);
// Remove file if its empty
View
2 admin/maintenance.php
@@ -15,7 +15,7 @@
$filename = $CFG->dataroot.'/'.SITEID.'/maintenance.html';
- if ($form = data_submitted(false)) {
+ if ($form = data_submitted()) {
if (confirm_sesskey()) {
if ($form->action == "disable") {
unlink($filename);
View
2 admin/mnet/MethodTable.php
@@ -556,7 +556,7 @@ function showCode($methodTable){
if($key=="arguments"){
$result .= "array(";
for($i=0; $i<count($value); $i++){
- $result .= "\"" . addslashes($value[$i]) . "\"";
+ $result .= "\"" . addslashes($value[$i]) . "\""; // TODO: fix this addslashes
if($i<count($value)-1){
$result .= ", ";
}
View
2 admin/mnet/access_control.php
@@ -80,7 +80,7 @@
// process the form results
-if ($form = data_submitted(false) and confirm_sesskey()) {
+if ($form = data_submitted() and confirm_sesskey()) {
// check permissions and verify form input
if (!has_capability('moodle/user:delete', $sitecontext)) {
View
2 admin/mnet/adminlib.php
@@ -87,7 +87,7 @@ function mnet_get_functions($type, $parentname) {
array_unshift($profile, $details['returns']);
}
$dataobject->profile = serialize($profile);
- $dataobject->help = addslashes($details['description']);
+ $dataobject->help = $details['description'];
} else {
$dataobject->profile = serialize(array(array('type' => 'void', 'description' => 'No return value')));
$dataobject->help = '';
View
2 admin/mnet/enr_course_enrol.php
@@ -50,7 +50,7 @@
/// Process incoming role assignment
- if ($frm = data_submitted(false)) {
+ if ($frm = data_submitted()) {
if ($add and !empty($frm->addselect) and confirm_sesskey()) {
$timemodified = time();
View
2 admin/mnet/index.php
@@ -37,7 +37,7 @@
}
/// If data submitted, process and store
- if (($form = data_submitted(false)) && confirm_sesskey()) {
+ if (($form = data_submitted()) && confirm_sesskey()) {
if (!empty($form->submit) && $form->submit == get_string('savechanges')) {
if (in_array($form->mode, array("off", "strict", "dangerous"))) {
if (set_config('mnet_dispatcher_mode', $form->mode)) {
View
2 admin/mnet/mnet_themes.php
@@ -65,7 +65,7 @@
$report = array('This theme is not installed!'.'3', 'errorbox');
} else {
$mnet_peer->force_theme = 1;
- $mnet_peer->theme = addslashes($choose);
+ $mnet_peer->theme = $choose;
if ($mnet_peer->commit()) {
$report = array(get_string('themesaved').'1', 'informationbox');
} else {
View
3 admin/replace.php
@@ -10,9 +10,6 @@
$search = optional_param('search', '', PARAM_RAW);
$replace = optional_param('replace', '', PARAM_RAW);
-$search = stripslashes($search); // TODO: remove soon
-$replace = stripslashes($replace); // TODO: remove soon
-
###################################################################
admin_externalpage_print_header();
View
2 admin/roles/allowoverride.php
@@ -20,7 +20,7 @@
$roles = get_all_roles();
- if ($grant = data_submitted(false)) {
+ if ($grant = data_submitted()) {
foreach ($grant as $grole => $val) {
if ($grole == 'dummy') {
View
7 admin/roles/manage.php
@@ -14,9 +14,6 @@
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$cancel = optional_param('cancel', 0, PARAM_BOOL);
- $name = stripslashes($name);
- $description = stripslashes($description);
-
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
require_capability('moodle/role:manage', $sitecontext);
@@ -56,7 +53,7 @@
/// form processing, editing a role, adding a role, deleting a role etc.
switch ($action) {
case 'add':
- if ($data = data_submitted(false) and confirm_sesskey()) {
+ if ($data = data_submitted() and confirm_sesskey()) {
$shortname = moodle_strtolower(clean_param(clean_filename($shortname), PARAM_SAFEDIR)); // only lowercase safe ASCII characters
$legacytype = required_param('legacytype', PARAM_RAW);
@@ -133,7 +130,7 @@
break;
case 'edit':
- if ($data = data_submitted(false) and confirm_sesskey()) {
+ if ($data = data_submitted() and confirm_sesskey()) {
$shortname = moodle_strtolower(clean_param(clean_filename($shortname), PARAM_SAFEDIR)); // only lowercase safe ASCII characters
$legacytype = required_param('legacytype', PARAM_RAW);
View
2 admin/roles/override.php
@@ -75,7 +75,7 @@
$capabilities = fetch_context_capabilities($context);
/// Process incoming role override
- if ($data = data_submitted(false) and $roleid and confirm_sesskey()) {
+ if ($data = data_submitted() and $roleid and confirm_sesskey()) {
$allowed_values = array(CAP_INHERIT, CAP_ALLOW, CAP_PREVENT, CAP_PROHIBIT);
$localoverrides = $DB->get_records_select('role_capabilities', "roleid = ? AND contextid = ?", array($roleid, $context->id),
View
4 admin/search.php
@@ -7,8 +7,6 @@
$query = trim(optional_param('query', '', PARAM_NOTAGS)); // Search string
-$query = stripslashes($query); // TODO: remove soon
-
$adminroot =& admin_get_root(); // need all settings here
$adminroot->search = $query; // So we can reference it in search boxes later in this invocation
$statusmsg = '';
@@ -18,7 +16,7 @@
admin_externalpage_setup('search'); // now hidden page
// now we'll deal with the case that the admin has submitted the form with changed settings
-if ($data = data_submitted(false) and confirm_sesskey()) {
+if ($data = data_submitted() and confirm_sesskey()) {
if (admin_write_settings($data)) {
$statusmsg = get_string('changessaved');
}
View
2 admin/settings.php
@@ -31,7 +31,7 @@
$errormsg = '';
$focus = '';
-if ($data = data_submitted(false) and confirm_sesskey()) {
+if ($data = data_submitted() and confirm_sesskey()) {
if (admin_write_settings($data)) {
$statusmsg = get_string('changessaved');
}
View
2 admin/upgradesettings.php
@@ -15,7 +15,7 @@
admin_externalpage_setup('upgradesettings'); // now hidden page
// now we'll deal with the case that the admin has submitted the form with new settings
-if ($data = data_submitted(false) and confirm_sesskey()) {
+if ($data = data_submitted() and confirm_sesskey()) {
$count = admin_write_settings($data);
$adminroot =& admin_get_root(true); //reload tree
}
View
2 admin/uploadpicture.php
@@ -62,7 +62,7 @@
print_heading_with_help($struploadpictures, 'uploadpictures');
$mform = new admin_uploadpicture_form();
-if ($formdata = $mform->get_data(false)) {
+if ($formdata = $mform->get_data()) {
if (!array_key_exists($userfield, $userfields)) {
notify(get_string('uploadpicture_baduserfield','admin'));
} else {
View
2 admin/uploaduser.php
@@ -125,7 +125,7 @@
$cir->cleanup(true);
redirect($returnurl);
-} else if ($formdata = $mform->get_data(false)) { // no magic quotes here!!!
+} else if ($formdata = $mform->get_data()) {
// Print the header
admin_externalpage_print_header();
print_heading(get_string('uploadusersresult', 'admin'));
View
4 admin/user/user_bulk.php
@@ -16,7 +16,7 @@
// array of bulk operations
// create the bulk operations form
$action_form = new user_bulk_action_form();
-if ($data = $action_form->get_data(false)) {
+if ($data = $action_form->get_data()) {
// check if an action should be performed and do so
switch ($data->action) {
case 1: redirect($CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk_confirm.php');
@@ -29,7 +29,7 @@
$user_bulk_form = new user_bulk_form(null, get_selection_data($ufiltering));
-if ($data = $user_bulk_form->get_data(false)) {
+if ($data = $user_bulk_form->get_data()) {
if (!empty($data->addall)) {
add_selection_all($ufiltering);
View
2 admin/user/user_bulk_confirm.php
@@ -29,7 +29,7 @@
continue;
}
$auth = get_auth_plugin($user->auth);
- $result = $auth->user_confirm(addslashes($user->username), addslashes($user->secret));
+ $result = $auth->user_confirm($user->username, $user->secret);
if ($result != AUTH_CONFIRM_OK && $result != AUTH_CONFIRM_ALREADY) {
notify(get_string('usernotconfirmed', '', fullname($user, true)));
}
View
2 admin/user/user_bulk_message.php
@@ -43,7 +43,7 @@
if ($msgform->is_cancelled()) {
redirect($return);
-} else if ($formdata = $msgform->get_data(false)) {
+} else if ($formdata = $msgform->get_data()) {
$options = new object();
$options->para = false;
$options->newlines = true;
View
2 admin/xmldb/actions/XMLDBAction.class.php
@@ -140,7 +140,7 @@ function invoke() {
/// If we are used any dir, save it in the lastused session object
/// Some actions can use it to perform positioning
if ($lastused = optional_param ('dir', NULL, PARAM_PATH)) {
- $SESSION->lastused = stripslashes_safe($lastused);
+ $SESSION->lastused = $lastused;
}
$this->postaction = optional_param ('postaction', NULL, PARAM_ALPHAEXT);
View
2 admin/xmldb/actions/create_xml_file/create_xml_file.class.php
@@ -66,7 +66,7 @@ function invoke() {
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
$file = $dirpath . '/install.xml';
/// Some variables
View
2 admin/xmldb/actions/delete_field/delete_field.class.php
@@ -64,7 +64,7 @@ function invoke() {
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
$tableparam = required_param('table', PARAM_CLEAN);
$fieldparam = required_param('field', PARAM_CLEAN);
View
2 admin/xmldb/actions/delete_index/delete_index.class.php
@@ -64,7 +64,7 @@ function invoke() {
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
$tableparam = required_param('table', PARAM_PATH);
$indexparam = required_param('index', PARAM_PATH);
View
2 admin/xmldb/actions/delete_key/delete_key.class.php
@@ -64,7 +64,7 @@ function invoke() {
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
$tableparam = required_param('table', PARAM_PATH);
$keyparam = required_param('key', PARAM_PATH);
View
2 admin/xmldb/actions/delete_sentence/delete_sentence.class.php
@@ -64,7 +64,7 @@ function invoke() {
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
$statementparam = required_param('statement', PARAM_CLEAN);
$sentenceparam = required_param('sentence', PARAM_INT);
View
2 admin/xmldb/actions/delete_statement/delete_statement.class.php
@@ -64,7 +64,7 @@ function invoke() {
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
$statementparam = required_param('statement', PARAM_CLEAN);
$confirmed = optional_param('confirmed', false, PARAM_BOOL);
View
2 admin/xmldb/actions/delete_table/delete_table.class.php
@@ -64,7 +64,7 @@ function invoke() {
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
$tableparam = required_param('table', PARAM_CLEAN);
$confirmed = optional_param('confirmed', false, PARAM_BOOL);
View
2 admin/xmldb/actions/delete_xml_file/delete_xml_file.class.php
@@ -64,7 +64,7 @@ function invoke() {
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_CLEAN);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
$confirmed = optional_param('confirmed', false, PARAM_BOOL);
View
2 admin/xmldb/actions/edit_field/edit_field.class.php
@@ -66,7 +66,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
10 admin/xmldb/actions/edit_field_save/edit_field_save.class.php
@@ -75,20 +75,20 @@ function invoke() {
/// Do the job, setting result as needed
- if (!data_submitted('nomatch')) { ///Basic prevention
+ if (!data_submitted()) { ///Basic prevention
print_error('wrongcall', 'error');
}
/// Get parameters
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
$tableparam = strtolower(required_param('table', PARAM_PATH));
$fieldparam = strtolower(required_param('field', PARAM_PATH));
$name = substr(trim(strtolower(optional_param('name', $fieldparam, PARAM_PATH))),0,30);
$comment = required_param('comment', PARAM_CLEAN);
- $comment = trim(stripslashes_safe($comment));
+ $comment = trim($comment);
$type = required_param('type', PARAM_INT);
$length = strtolower(optional_param('length', NULL, PARAM_ALPHANUM));
@@ -98,9 +98,9 @@ function invoke() {
$sequence = optional_param('sequence', false, PARAM_BOOL);
$enum = optional_param('enum', false, PARAM_BOOL);
$enumvalues = optional_param('enumvalues', 0, PARAM_CLEAN);
- $enumvalues = trim(stripslashes_safe($enumvalues));
+ $enumvalues = trim($enumvalues);
$default = optional_param('default', NULL, PARAM_PATH);
- $default = trim(stripslashes_safe($default));
+ $default = trim($default);
$editeddir =& $XMLDB->editeddirs[$dirpath];
$structure =& $editeddir->xml_file->getStructure();
View
2 admin/xmldb/actions/edit_index/edit_index.class.php
@@ -66,7 +66,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
8 admin/xmldb/actions/edit_index_save/edit_index_save.class.php
@@ -69,24 +69,24 @@ function invoke() {
/// Do the job, setting result as needed
- if (!data_submitted('nomatch')) { ///Basic prevention
+ if (!data_submitted()) { ///Basic prevention
print_error('wrongcall', 'error');
}
/// Get parameters
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
$tableparam = strtolower(required_param('table', PARAM_PATH));
$indexparam = strtolower(required_param('index', PARAM_PATH));
$name = trim(strtolower(optional_param('name', $indexparam, PARAM_PATH)));
$comment = required_param('comment', PARAM_CLEAN);
- $comment = trim(stripslashes_safe($comment));
+ $comment = trim($comment);
$unique = required_param('unique', PARAM_INT);
$fields = required_param('fields', PARAM_CLEAN);
- $fields = str_replace(' ', '', trim(strtolower(stripslashes_safe($fields))));
+ $fields = str_replace(' ', '', trim(strtolower($fields)));
$editeddir =& $XMLDB->editeddirs[$dirpath];
$structure =& $editeddir->xml_file->getStructure();
View
2 admin/xmldb/actions/edit_key/edit_key.class.php
@@ -66,7 +66,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
10 admin/xmldb/actions/edit_key_save/edit_key_save.class.php
@@ -75,30 +75,30 @@ function invoke() {
/// Do the job, setting result as needed
- if (!data_submitted('nomatch')) { ///Basic prevention
+ if (!data_submitted()) { ///Basic prevention
print_error('wrongcall', 'error');
}
/// Get parameters
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
$tableparam = strtolower(required_param('table', PARAM_PATH));
$keyparam = strtolower(required_param('key', PARAM_PATH));
$name = trim(strtolower(optional_param('name', $keyparam, PARAM_PATH)));
$comment = required_param('comment', PARAM_CLEAN);
- $comment = trim(stripslashes_safe($comment));
+ $comment = trim($comment);
$type = required_param('type', PARAM_INT);
$fields = required_param('fields', PARAM_CLEAN);
- $fields = str_replace(' ', '', trim(strtolower(stripslashes_safe($fields))));
+ $fields = str_replace(' ', '', trim(strtolower($fields)));
if ($type == XMLDB_KEY_FOREIGN ||
$type == XMLDB_KEY_FOREIGN_UNIQUE) {
$reftable = trim(strtolower(required_param('reftable', PARAM_PATH)));
$reffields= required_param('reffields', PARAM_CLEAN);
- $reffields = str_replace(' ', '', trim(strtolower(stripslashes_safe($reffields))));
+ $reffields = str_replace(' ', '', trim(strtolower($reffields)));
}
$editeddir =& $XMLDB->editeddirs[$dirpath];
View
2 admin/xmldb/actions/edit_sentence/edit_sentence.class.php
@@ -64,7 +64,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
6 admin/xmldb/actions/edit_sentence_save/edit_sentence_save.class.php
@@ -67,15 +67,15 @@ function invoke() {
/// Get parameters
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
$statementparam = strtolower(required_param('statement', PARAM_CLEAN));
$sentenceparam = strtolower(required_param('sentence', PARAM_ALPHANUM));
$fields = required_param('fields', PARAM_CLEAN);
- $fields = trim(stripslashes_safe($fields));
+ $fields = trim($fields);
$values = required_param('values', PARAM_CLEAN);
- $values = trim(stripslashes_safe($values));
+ $values = trim($values);
$editeddir =& $XMLDB->editeddirs[$dirpath];
$structure =& $editeddir->xml_file->getStructure();
View
2 admin/xmldb/actions/edit_statement/edit_statement.class.php
@@ -69,7 +69,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
4 admin/xmldb/actions/edit_statement_save/edit_statement_save.class.php
@@ -64,12 +64,12 @@ function invoke() {
/// Get parameters
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
$statementparam = strtolower(required_param('statement', PARAM_CLEAN));
$name = trim(strtolower(required_param('name', PARAM_CLEAN)));
$comment = required_param('comment', PARAM_CLEAN);
- $comment = stripslashes_safe($comment);
+ $comment = $comment;
$editeddir =& $XMLDB->editeddirs[$dirpath];
$structure =& $editeddir->xml_file->getStructure();
View
2 admin/xmldb/actions/edit_table/edit_table.class.php
@@ -77,7 +77,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
6 admin/xmldb/actions/edit_table_save/edit_table_save.class.php
@@ -65,18 +65,18 @@ function invoke() {
/// Do the job, setting result as needed
- if (!data_submitted('nomatch')) { ///Basic prevention
+ if (!data_submitted()) { ///Basic prevention
print_error('wrongcall', 'error');
}
/// Get parameters
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
$tableparam = strtolower(required_param('table', PARAM_PATH));
$name = substr(trim(strtolower(required_param('name', PARAM_PATH))),0,28);
$comment = required_param('comment', PARAM_CLEAN);
- $comment = stripslashes_safe($comment);
+ $comment = $comment;
$editeddir =& $XMLDB->editeddirs[$dirpath];
$structure =& $editeddir->xml_file->getStructure();
View
2 admin/xmldb/actions/edit_xml_file/edit_xml_file.class.php
@@ -78,7 +78,7 @@ function invoke() {
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dir
if (!empty($XMLDB->dbdirs)) {
View
6 admin/xmldb/actions/edit_xml_file_save/edit_xml_file_save.class.php
@@ -61,16 +61,16 @@ function invoke() {
/// Do the job, setting result as needed
- if (!data_submitted('nomatch')) { ///Basic prevention
+ if (!data_submitted()) { ///Basic prevention
print_error('wrongcall', 'error');
}
/// Get parameters
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
$comment = required_param('comment', PARAM_CLEAN);
- $comment = stripslashes_safe($comment);
+ $comment = $comment;
/// Set comment and recalculate hash
$editeddir =& $XMLDB->editeddirs[$dirpath];
View
2 admin/xmldb/actions/load_xml_file/load_xml_file.class.php
@@ -66,7 +66,7 @@ function invoke() {
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dir
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/move_updown_field/move_updown_field.class.php
@@ -62,7 +62,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/move_updown_index/move_updown_index.class.php
@@ -62,7 +62,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/move_updown_key/move_updown_key.class.php
@@ -62,7 +62,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/move_updown_statement/move_updown_statement.class.php
@@ -62,7 +62,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/move_updown_table/move_updown_table.class.php
@@ -62,7 +62,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/new_field/new_field.class.php
@@ -62,7 +62,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/new_index/new_index.class.php
@@ -62,7 +62,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/new_key/new_key.class.php
@@ -62,7 +62,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/new_sentence/new_sentence.class.php
@@ -64,7 +64,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/new_statement/new_statement.class.php
@@ -65,7 +65,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/new_table/new_table.class.php
@@ -62,7 +62,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/new_table_from_mysql/new_table_from_mysql.class.php
@@ -65,7 +65,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/revert_changes/revert_changes.class.php
@@ -64,7 +64,7 @@ function invoke() {
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
$confirmed = optional_param('confirmed', false, PARAM_BOOL);
View
2 admin/xmldb/actions/save_xml_file/save_xml_file.class.php
@@ -62,7 +62,7 @@ function invoke() {
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the edited dir
if (!empty($XMLDB->editeddirs)) {
View
2 admin/xmldb/actions/template/template.class.php
@@ -62,7 +62,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/unload_xml_file/unload_xml_file.class.php
@@ -63,7 +63,7 @@ function invoke() {
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the original dir and delete some elements
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/view_field_xml/view_field_xml.class.php
@@ -66,7 +66,7 @@ function invoke() {
$select = required_param('select', PARAM_ALPHA); //original/edited
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dir
if ($select == 'original') {
View
2 admin/xmldb/actions/view_index_xml/view_index_xml.class.php
@@ -66,7 +66,7 @@ function invoke() {
$select = required_param('select', PARAM_ALPHA); //original/edited
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dir
if ($select == 'original') {
View
2 admin/xmldb/actions/view_key_xml/view_key_xml.class.php
@@ -66,7 +66,7 @@ function invoke() {
$select = required_param('select', PARAM_ALPHA); //original/edited
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dir
if ($select == 'original') {
View
2 admin/xmldb/actions/view_statement_xml/view_statement_xml.class.php
@@ -65,7 +65,7 @@ function invoke() {
$select = required_param('select', PARAM_ALPHA); //original/edited
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dir
if ($select == 'original') {
View
2 admin/xmldb/actions/view_structure_php/view_structure_php.class.php
@@ -65,7 +65,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/view_structure_sql/view_structure_sql.class.php
@@ -64,7 +64,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/view_structure_xml/view_structure_xml.class.php
@@ -64,7 +64,7 @@ function invoke() {
$select = required_param('select', PARAM_ALPHA); //original/edited
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dir
if ($select == 'original') {
View
2 admin/xmldb/actions/view_table_php/view_table_php.class.php
@@ -71,7 +71,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/view_table_sql/view_table_sql.class.php
@@ -64,7 +64,7 @@ function invoke() {
/// Do the job, setting result as needed
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
View
2 admin/xmldb/actions/view_table_xml/view_table_xml.class.php
@@ -65,7 +65,7 @@ function invoke() {
$select = required_param('select', PARAM_ALPHA); //original/edited
/// Get the dir containing the file
$dirpath = required_param('dir', PARAM_PATH);
- $dirpath = $CFG->dirroot . stripslashes_safe($dirpath);
+ $dirpath = $CFG->dirroot . $dirpath;
/// Get the correct dir
if ($select == 'original') {
View
2 admin/xmldb/actions/view_xml/view_xml.class.php
@@ -65,7 +65,7 @@ function invoke() {
/// Get the file parameter
$file = required_param('file', PARAM_PATH);
- $file = $CFG->dirroot . stripslashes_safe($file);
+ $file = $CFG->dirroot . $file;
/// File must be under $CFG->wwwroot and
/// under one db directory (simple protection)
if (substr($file, 0, strlen($CFG->dirroot)) == $CFG->dirroot &&
View
3 auth/db/auth.php
@@ -229,7 +229,7 @@ function sync_users($do_updates=false) {
/// list external users
$userlist = $this->get_userlist();
- $quoteduserlist = implode("', '", addslashes_recursive($userlist));
+ $quoteduserlist = implode("', '", $userlist);
$quoteduserlist = "'$quoteduserlist'";
/// delete obsolete internal users
@@ -667,7 +667,6 @@ function process_config($config) {
$config->changepasswordurl = '';
}
- $config = stripslashes_recursive($config);
// save settings
set_config('host', $config->host, 'auth/db');
set_config('type', $config->type, 'auth/db');
View
3 auth/mnet/auth.php
@@ -906,9 +906,6 @@ function keepalive_server($array) {
global $MNET_REMOTE_CLIENT, $CFG, $DB;
$CFG->usesid = true;
- // Addslashes to all usernames, so we can build the query string real
- // simply with 'implode'
- $array = array_map('addslashes', $array);
// We don't want to output anything to the client machine
$start = ob_start();
View
2 backup/lib.php
@@ -463,7 +463,7 @@ function backup_putid($backup_unique_code, $table, $old_id, $new_id, $info="") {
//Set info_to save
$info_to_save = "infile";
} else {
- //Saving to db, addslashes
+ //Saving to db
$info_to_save = $info_ser;
}
View
4 backup/restore_check.html
@@ -21,8 +21,8 @@
if ($form1 = data_submitted()) {
$currentcourseshortname = $course_header->course_shortname; //"store_ShortName";
- $course_header->course_shortname = stripslashes_safe($form1->shortname); //"update_ShortName";
- $course_header->course_fullname = stripslashes_safe($form1->fullname); //"update_FullName";
+ $course_header->course_shortname = $form1->shortname; //"update_ShortName";
+ $course_header->course_fullname = $form1->fullname; //"update_FullName";
/// Roll dates only if the backup course has a start date
/// (some formats like main page, social..., haven't it and rolling dates
/// from 0 produces crazy dates. MDL-10125
View
7 backup/restorelib.php
@@ -688,7 +688,7 @@ function restore_create_new_course($restore,&$course_header) {
$course->fullname = $course_header->course_fullname;
$course->shortname = $course_header->course_shortname;
$course->idnumber = $course_header->course_idnumber;
- $course->idnumber = ''; //addslashes($course_header->course_idnumber); // we don't want this at all.
+ $course->idnumber = ''; //$course_header->course_idnumber; // we don't want this at all.
$course->summary = backup_todb($course_header->course_summary);
$course->format = $course_header->course_format;
$course->showgrades = $course_header->course_showgrades;
@@ -701,7 +701,7 @@ function restore_create_new_course($restore,&$course_header) {
$course->startdate = $course_header->course_startdate;
$course->startdate += $restore->course_startdateoffset;
$course->numsections = $course_header->course_numsections;
- //$course->showrecent = addslashes($course_header->course_showrecent); INFO: This is out in 1.3
+ //$course->showrecent = $course_header->course_showrecent; INFO: This is out in 1.3
$course->maxbytes = $course_header->course_maxbytes;
$course->showreports = $course_header->course_showreports;
if (isset($course_header->course_groupmode)) {
@@ -2491,7 +2491,6 @@ function restore_create_users($restore,$xml_file) {
//Unset the id because it's going to be inserted with a new one
unset ($user->id);
// relink the descriptions
- $user->description = stripslashes($user->description);
/// Disable pictures based on global setting or existing empty value (old backups can contain wrong empties)
if (!empty($CFG->disableuserimages) || empty($user->picture)) {
@@ -8205,7 +8204,7 @@ function restore_open_html($restore,$course_header) {
fwrite ($restorelog_file,"<title>".$course_header->course_shortname." Restored </title>");
fwrite ($restorelog_file,"</head><body><br/><h1>The following changes were made during the Restoration of this Course.</h1><br/><br/>");
fwrite ($restorelog_file,"The Course ShortName is now - ".$course_header->course_shortname." The FullName is now - ".$course_header->course_fullname."<br/><br/>");
- $startdate = addslashes($course_header->course_startdate);
+ $startdate = $course_header->course_startdate;
$date = usergetdate($startdate);
fwrite ($restorelog_file,"The Originating Courses Start Date was " .$date['weekday'].", ".$date['mday']." ".$date['month']." ".$date['year']."");
$startdate += $restore->course_startdateoffset;
View
4 blocks/search/config_global.html
@@ -148,7 +148,7 @@
<td valign="top" align="left">
<input id="block_search_word_to_text_env" type="text" size="60" name="block_search_word_to_text_env" value="<?php
if(isset($CFG->block_search_word_to_text_env)) {
- echo stripslashes($CFG->block_search_word_to_text_env);
+ echo $CFG->block_search_word_to_text_env;
} else {
if ($CFG->ostype == 'WINDOWS'){
p("HOME={$CFG->dirroot}\\lib\\antiword\\win32");
@@ -196,7 +196,7 @@
<input id="block_search_<?php p($type) ?>_to_text_env" type="text" size="60" name="block_search_<?php p($type) ?>_to_text_env" value="<?php
$propname = "block_search_{$type}_to_text_env";
if(isset($CFG->$propname)) {
- echo stripslashes($CFG->$propname);
+ echo $CFG->$propname;
} ?>"/><br/><br/>
</td>
</tr>
View
2 blog/edit.php
@@ -74,7 +74,7 @@
if ($blogeditform->is_cancelled()){
redirect($returnurl);
-} else if ($fromform = $blogeditform->get_data(false)){
+} else if ($fromform = $blogeditform->get_data()){
//save stuff in db
switch ($action) {
case 'add':
View
4 calendar/event.php