Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of https://github.com/moodle/moodle

  • Loading branch information...
commit bf69dc5247b8fdbc88be97d7f803c7cfca5710bc 2 parents 0e47cd5 + 6be7840
@doraemonyoung doraemonyoung authored
Showing with 1,516 additions and 949 deletions.
  1. +4 −20 admin/environment.xml
  2. +4 −1 admin/settings/development.php
  3. +1 −1  admin/tool/uploaduser/index.php
  4. +0 −9 admin/tool/uploaduser/user_form.php
  5. +26 −19 admin/tool/xmldb/actions/XMLDBAction.class.php
  6. +4 −6 admin/tool/xmldb/actions/XMLDBCheckAction.class.php
  7. +2 −4 admin/tool/xmldb/actions/check_bigints/check_bigints.class.php
  8. +2 −4 admin/tool/xmldb/actions/check_defaults/check_defaults.class.php
  9. +2 −4 admin/tool/xmldb/actions/check_foreign_keys/check_foreign_keys.class.php
  10. +2 −4 admin/tool/xmldb/actions/check_indexes/check_indexes.class.php
  11. +2 −2 admin/tool/xmldb/actions/check_oracle_semantics/check_oracle_semantics.class.php
  12. +2 −4 admin/tool/xmldb/actions/create_xml_file/create_xml_file.class.php
  13. +12 −14 admin/tool/xmldb/actions/delete_field/delete_field.class.php
  14. +12 −14 admin/tool/xmldb/actions/delete_index/delete_index.class.php
  15. +12 −14 admin/tool/xmldb/actions/delete_key/delete_key.class.php
  16. +5 −7 admin/tool/xmldb/actions/delete_table/delete_table.class.php
  17. +3 −5 admin/tool/xmldb/actions/delete_xml_file/delete_xml_file.class.php
  18. +12 −14 admin/tool/xmldb/actions/edit_field/edit_field.class.php
  19. +1 −2  admin/tool/xmldb/actions/edit_field/edit_field.js
  20. +8 −10 admin/tool/xmldb/actions/edit_field_save/edit_field_save.class.php
  21. +10 −11 admin/tool/xmldb/actions/edit_index/edit_index.class.php
  22. +8 −10 admin/tool/xmldb/actions/edit_index_save/edit_index_save.class.php
  23. +10 −12 admin/tool/xmldb/actions/edit_key/edit_key.class.php
  24. +1 −2  admin/tool/xmldb/actions/edit_key/edit_key.js
  25. +9 −11 admin/tool/xmldb/actions/edit_key_save/edit_key_save.class.php
  26. +12 −14 admin/tool/xmldb/actions/edit_table/edit_table.class.php
  27. +9 −11 admin/tool/xmldb/actions/edit_table_save/edit_table_save.class.php
  28. +5 −7 admin/tool/xmldb/actions/edit_xml_file/edit_xml_file.class.php
  29. +6 −8 admin/tool/xmldb/actions/edit_xml_file_save/edit_xml_file_save.class.php
  30. +2 −4 admin/tool/xmldb/actions/generate_all_documentation/generate_all_documentation.class.php
  31. +2 −4 admin/tool/xmldb/actions/generate_documentation/generate_documentation.class.php
  32. +2 −4 admin/tool/xmldb/actions/get_db_directories/get_db_directories.class.php
  33. +3 −5 admin/tool/xmldb/actions/load_xml_file/load_xml_file.class.php
  34. +3 −5 admin/tool/xmldb/actions/load_xml_files/load_xml_files.class.php
  35. +14 −12 admin/tool/xmldb/actions/main_view/main_view.class.php
  36. +16 −18 admin/tool/xmldb/actions/move_updown_field/move_updown_field.class.php
  37. +16 −18 admin/tool/xmldb/actions/move_updown_index/move_updown_index.class.php
  38. +16 −18 admin/tool/xmldb/actions/move_updown_key/move_updown_key.class.php
  39. +15 −18 admin/tool/xmldb/actions/move_updown_table/move_updown_table.class.php
  40. +8 −10 admin/tool/xmldb/actions/new_field/new_field.class.php
  41. +8 −10 admin/tool/xmldb/actions/new_index/new_index.class.php
  42. +8 −10 admin/tool/xmldb/actions/new_key/new_key.class.php
  43. +7 −9 admin/tool/xmldb/actions/new_table/new_table.class.php
  44. +6 −8 admin/tool/xmldb/actions/new_table_from_mysql/new_table_from_mysql.class.php
  45. +3 −5 admin/tool/xmldb/actions/revert_changes/revert_changes.class.php
  46. +5 −7 admin/tool/xmldb/actions/save_xml_file/save_xml_file.class.php
  47. +5 −7 admin/tool/xmldb/actions/template/template.class.php
  48. +3 −5 admin/tool/xmldb/actions/unload_xml_file/unload_xml_file.class.php
  49. +7 −9 admin/tool/xmldb/actions/view_field_xml/view_field_xml.class.php
  50. +8 −10 admin/tool/xmldb/actions/view_index_xml/view_index_xml.class.php
  51. +8 −10 admin/tool/xmldb/actions/view_key_xml/view_key_xml.class.php
  52. +2 −4 admin/tool/xmldb/actions/view_reserved_words/view_reserved_words.class.php
  53. +6 −8 admin/tool/xmldb/actions/view_structure_php/view_structure_php.class.php
  54. +5 −7 admin/tool/xmldb/actions/view_structure_sql/view_structure_sql.class.php
  55. +5 −7 admin/tool/xmldb/actions/view_structure_xml/view_structure_xml.class.php
  56. +6 −8 admin/tool/xmldb/actions/view_table_php/view_table_php.class.php
  57. +1 −2  admin/tool/xmldb/actions/view_table_php/view_table_php.js
  58. +5 −7 admin/tool/xmldb/actions/view_table_sql/view_table_sql.class.php
  59. +7 −9 admin/tool/xmldb/actions/view_table_xml/view_table_xml.class.php
  60. +3 −4 admin/tool/xmldb/actions/view_xml/view_xml.class.php
  61. +88 −89 admin/tool/xmldb/index.php
  62. +2 −2 admin/tool/xmldb/lang/en/tool_xmldb.php
  63. +1 −2  admin/tool/xmldb/settings.php
  64. +1 −2  admin/tool/xmldb/version.php
  65. +13 −5 backup/cc/cc2moodle.php
  66. +2 −2 backup/cc/entities.class.php
  67. +3 −3 backup/cc/entities11.class.php
  68. +1 −1  backup/cc/entity.label.class.php
  69. +8 −7 backup/moodle2/backup_stepslib.php
  70. +7 −1 backup/moodle2/restore_final_task.class.php
  71. +327 −11 backup/moodle2/restore_stepslib.php
  72. +75 −31 backup/util/dbops/restore_dbops.class.php
  73. +17 −0 backup/util/plan/base_plan.class.php
  74. +29 −1 backup/util/plan/base_task.class.php
  75. +14 −0 backup/util/ui/restore_ui_stage.class.php
  76. +4 −0 blocks/blog_recent/block_blog_recent.php
  77. +4 −0 blocks/blog_tags/block_blog_tags.php
  78. +3 −1 course/delete_category_form.php
  79. +26 −2 course/format/renderer.php
  80. +2 −9 course/lib.php
  81. +73 −1 course/tests/courselib_test.php
  82. +3 −3 course/yui/dragdrop/dragdrop.js
  83. +22 −14 course/yui/modchooser/modchooser.js
  84. +78 −41 files/renderer.php
  85. +1 −1  install.php
  86. +1 −1  install/lang/af/admin.php
  87. +1 −1  install/lang/af/langconfig.php
  88. +1 −1  install/lang/am/install.php
  89. +1 −1  install/lang/am/langconfig.php
  90. +1 −1  install/lang/am/moodle.php
  91. +1 −1  install/lang/ar/admin.php
  92. +1 −1  install/lang/ar/error.php
  93. +1 −1  install/lang/ar/install.php
  94. +1 −1  install/lang/ar/langconfig.php
  95. +1 −1  install/lang/ar/moodle.php
  96. +1 −1  install/lang/ast/admin.php
  97. +1 −1  install/lang/ast/error.php
  98. +1 −1  install/lang/ast/install.php
  99. +1 −1  install/lang/ast/langconfig.php
  100. +1 −1  install/lang/ast/moodle.php
  101. +1 −1  install/lang/az/admin.php
  102. +1 −1  install/lang/az/error.php
  103. +1 −1  install/lang/az/install.php
  104. +1 −1  install/lang/az/langconfig.php
  105. +1 −1  install/lang/az/moodle.php
  106. +1 −1  install/lang/be/langconfig.php
  107. +1 −1  install/lang/be/moodle.php
  108. +1 −1  install/lang/bg/admin.php
  109. +1 −1  install/lang/bg/error.php
  110. +1 −1  install/lang/bg/install.php
  111. +1 −1  install/lang/bg/langconfig.php
  112. +1 −1  install/lang/bg/moodle.php
  113. +1 −1  install/lang/bn/admin.php
  114. +1 −1  install/lang/bn/install.php
  115. +1 −1  install/lang/bn/langconfig.php
  116. +1 −1  install/lang/bn/moodle.php
  117. +1 −1  install/lang/bs/install.php
  118. +1 −1  install/lang/bs/langconfig.php
  119. +1 −1  install/lang/ca/admin.php
  120. +1 −1  install/lang/ca/error.php
  121. +1 −1  install/lang/ca/install.php
  122. +1 −1  install/lang/ca/langconfig.php
  123. +1 −1  install/lang/ca/moodle.php
  124. +1 −1  install/lang/ca_valencia/admin.php
  125. +1 −1  install/lang/ca_valencia/langconfig.php
  126. +1 −1  install/lang/ckb/langconfig.php
  127. +1 −1  install/lang/cs/admin.php
  128. +1 −1  install/lang/cs/error.php
  129. +1 −1  install/lang/cs/install.php
  130. +1 −1  install/lang/cs/langconfig.php
  131. +1 −1  install/lang/cs/moodle.php
  132. +1 −1  install/lang/cy/admin.php
  133. +1 −1  install/lang/cy/error.php
  134. +1 −1  install/lang/cy/install.php
  135. +1 −1  install/lang/cy/langconfig.php
  136. +1 −1  install/lang/cy/moodle.php
  137. +1 −1  install/lang/da/admin.php
  138. +1 −1  install/lang/da/error.php
  139. +1 −1  install/lang/da/install.php
  140. +1 −1  install/lang/da/langconfig.php
  141. +1 −1  install/lang/da/moodle.php
  142. +1 −1  install/lang/de/admin.php
  143. +1 −1  install/lang/de/error.php
  144. +1 −1  install/lang/de/install.php
  145. +1 −1  install/lang/de/langconfig.php
  146. +1 −1  install/lang/de/moodle.php
  147. +1 −1  install/lang/de_comm/langconfig.php
  148. +1 −1  install/lang/de_du/error.php
  149. +1 −1  install/lang/de_du/install.php
  150. +1 −1  install/lang/de_du/langconfig.php
  151. +1 −1  install/lang/de_kids/langconfig.php
  152. +1 −1  install/lang/dv/admin.php
  153. +1 −1  install/lang/dv/error.php
  154. +1 −1  install/lang/dv/install.php
  155. +1 −1  install/lang/dv/langconfig.php
  156. +1 −1  install/lang/dv/moodle.php
  157. +1 −1  install/lang/el/admin.php
  158. +1 −1  install/lang/el/error.php
  159. +1 −1  install/lang/el/install.php
  160. +1 −1  install/lang/el/langconfig.php
  161. +1 −1  install/lang/el/moodle.php
  162. +1 −1  install/lang/en/admin.php
  163. +1 −1  install/lang/en/error.php
  164. +1 −1  install/lang/en/install.php
  165. +1 −1  install/lang/en/langconfig.php
  166. +1 −1  install/lang/en/moodle.php
  167. +1 −1  install/lang/en_ar/langconfig.php
  168. +1 −1  install/lang/en_us/install.php
  169. +1 −1  install/lang/en_us/langconfig.php
  170. +1 −1  install/lang/es/admin.php
  171. +1 −1  install/lang/es/error.php
  172. +1 −1  install/lang/es/install.php
  173. +1 −1  install/lang/es/langconfig.php
  174. +1 −1  install/lang/es/moodle.php
  175. +1 −1  install/lang/es_ar/langconfig.php
  176. +1 −1  install/lang/es_es/langconfig.php
  177. +1 −1  install/lang/es_mx/admin.php
  178. +48 −0 install/lang/es_mx/error.php
  179. +58 −1 install/lang/es_mx/install.php
  180. +1 −1  install/lang/es_mx/langconfig.php
  181. +1 −1  install/lang/et/admin.php
  182. +1 −1  install/lang/et/error.php
  183. +1 −1  install/lang/et/install.php
  184. +1 −1  install/lang/et/langconfig.php
  185. +1 −1  install/lang/et/moodle.php
  186. +1 −1  install/lang/eu/admin.php
  187. +1 −1  install/lang/eu/error.php
  188. +1 −1  install/lang/eu/install.php
  189. +1 −1  install/lang/eu/langconfig.php
  190. +1 −1  install/lang/eu/moodle.php
  191. +1 −1  install/lang/fa/admin.php
  192. +1 −1  install/lang/fa/install.php
  193. +1 −1  install/lang/fa/langconfig.php
  194. +1 −1  install/lang/fa/moodle.php
  195. +1 −1  install/lang/fi/admin.php
  196. +1 −1  install/lang/fi/error.php
  197. +1 −1  install/lang/fi/install.php
  198. +1 −1  install/lang/fi/langconfig.php
  199. +1 −1  install/lang/fi/moodle.php
  200. +1 −1  install/lang/fil/langconfig.php
  201. +1 −1  install/lang/fil/moodle.php
  202. +1 −1  install/lang/fj/langconfig.php
  203. +1 −1  install/lang/fo/langconfig.php
  204. +1 −1  install/lang/fr/admin.php
  205. +1 −1  install/lang/fr/error.php
  206. +1 −1  install/lang/fr/install.php
  207. +2 −1  install/lang/fr/langconfig.php
  208. +1 −1  install/lang/fr/moodle.php
  209. +1 −1  install/lang/fr_ca/install.php
  210. +1 −1  install/lang/fr_ca/langconfig.php
  211. +1 −1  install/lang/fr_ca/moodle.php
  212. +1 −1  install/lang/ga/langconfig.php
  213. +1 −1  install/lang/gd/langconfig.php
  214. +1 −1  install/lang/gl/admin.php
  215. +1 −1  install/lang/gl/error.php
  216. +1 −1  install/lang/gl/install.php
  217. +1 −1  install/lang/gl/langconfig.php
  218. +1 −1  install/lang/gl/moodle.php
  219. +1 −1  install/lang/gu/error.php
  220. +1 −1  install/lang/gu/langconfig.php
  221. +1 −1  install/lang/gu/moodle.php
  222. +1 −1  install/lang/he/admin.php
  223. +1 −1  install/lang/he/error.php
  224. +1 −1  install/lang/he/install.php
  225. +1 −1  install/lang/he/langconfig.php
  226. +1 −1  install/lang/he/moodle.php
  227. +1 −1  install/lang/hi/langconfig.php
  228. +1 −1  install/lang/hi/moodle.php
  229. +1 −1  install/lang/hr/admin.php
  230. +1 −1  install/lang/hr/error.php
  231. +1 −1  install/lang/hr/install.php
  232. +1 −1  install/lang/hr/langconfig.php
  233. +1 −1  install/lang/hr/moodle.php
  234. +1 −1  install/lang/hu/admin.php
  235. +1 −1  install/lang/hu/error.php
  236. +1 −1  install/lang/hu/install.php
  237. +1 −1  install/lang/hu/langconfig.php
  238. +1 −1  install/lang/hu/moodle.php
  239. +1 −1  install/lang/hy/admin.php
  240. +1 −1  install/lang/hy/error.php
  241. +1 −1  install/lang/hy/install.php
  242. +1 −1  install/lang/hy/langconfig.php
  243. +1 −1  install/lang/hy/moodle.php
  244. +1 −1  install/lang/id/langconfig.php
  245. +1 −1  install/lang/id/moodle.php
  246. +1 −1  install/lang/is/admin.php
  247. +1 −1  install/lang/is/error.php
  248. +1 −1  install/lang/is/install.php
  249. +1 −1  install/lang/is/langconfig.php
  250. +1 −1  install/lang/is/moodle.php
  251. +1 −1  install/lang/it/admin.php
  252. +1 −1  install/lang/it/error.php
  253. +1 −1  install/lang/it/install.php
  254. +1 −1  install/lang/it/langconfig.php
  255. +1 −1  install/lang/it/moodle.php
  256. +1 −1  install/lang/ja/admin.php
  257. +1 −1  install/lang/ja/error.php
  258. +1 −1  install/lang/ja/install.php
  259. +2 −1  install/lang/ja/langconfig.php
  260. +1 −1  install/lang/ja/moodle.php
  261. +1 −1  install/lang/ka/admin.php
  262. +1 −1  install/lang/ka/install.php
  263. +1 −1  install/lang/ka/langconfig.php
  264. +1 −1  install/lang/ka/moodle.php
  265. +1 −1  install/lang/kk/install.php
  266. +1 −1  install/lang/kk/langconfig.php
  267. +1 −1  install/lang/kk/moodle.php
  268. +1 −1  install/lang/kl/langconfig.php
  269. +1 −1  install/lang/km/admin.php
  270. +1 −1  install/lang/km/error.php
  271. +1 −1  install/lang/km/install.php
  272. +1 −1  install/lang/km/langconfig.php
  273. +1 −1  install/lang/km/moodle.php
  274. +1 −1  install/lang/kn/langconfig.php
  275. +1 −1  install/lang/ko/admin.php
  276. +1 −1  install/lang/ko/error.php
  277. +1 −1  install/lang/ko/install.php
  278. +1 −1  install/lang/ko/langconfig.php
  279. +1 −1  install/lang/ko/moodle.php
  280. +1 −1  install/lang/la/langconfig.php
  281. +1 −1  install/lang/la/moodle.php
  282. +1 −1  install/lang/lo/admin.php
  283. +1 −1  install/lang/lo/install.php
  284. +1 −1  install/lang/lo/langconfig.php
  285. +1 −1  install/lang/lo/moodle.php
  286. +1 −1  install/lang/lt/admin.php
  287. +1 −1  install/lang/lt/langconfig.php
  288. +1 −1  install/lang/lt/moodle.php
  289. +1 −1  install/lang/lt_uni/langconfig.php
  290. +1 −1  install/lang/lv/admin.php
  291. +1 −1  install/lang/lv/error.php
  292. +1 −1  install/lang/lv/install.php
  293. +1 −1  install/lang/lv/langconfig.php
  294. +1 −1  install/lang/lv/moodle.php
  295. +1 −1  install/lang/mi_tn/langconfig.php
  296. +1 −1  install/lang/mi_tn/moodle.php
  297. +1 −1  install/lang/mi_wwow/admin.php
  298. +1 −1  install/lang/mi_wwow/error.php
  299. +1 −1  install/lang/mi_wwow/install.php
  300. +1 −1  install/lang/mi_wwow/langconfig.php
Sorry, we could not display the entire diff because too many files (1,077) changed.
View
24 admin/environment.xml
@@ -214,11 +214,7 @@
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
- <VENDOR name="mysql" version="5.0.25">
- <FEEDBACK>
- <ON_ERROR message="mysql416required" />
- </FEEDBACK>
- </VENDOR>
+ <VENDOR name="mysql" version="5.0.25" />
<VENDOR name="postgres" version="8.3" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
@@ -335,11 +331,7 @@
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
- <VENDOR name="mysql" version="5.0.25">
- <FEEDBACK>
- <ON_ERROR message="mysql416required" />
- </FEEDBACK>
- </VENDOR>
+ <VENDOR name="mysql" version="5.0.25" />
<VENDOR name="postgres" version="8.3" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
@@ -449,11 +441,7 @@
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
- <VENDOR name="mysql" version="5.0.25">
- <FEEDBACK>
- <ON_ERROR message="mysql416required" />
- </FEEDBACK>
- </VENDOR>
+ <VENDOR name="mysql" version="5.0.25" />
<VENDOR name="postgres" version="8.3" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
@@ -563,11 +551,7 @@
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
- <VENDOR name="mysql" version="5.0.25">
- <FEEDBACK>
- <ON_ERROR message="mysql416required" />
- </FEEDBACK>
- </VENDOR>
+ <VENDOR name="mysql" version="5.1.33" />
<VENDOR name="postgres" version="8.3" />
<VENDOR name="mssql" version="9.0" />
<VENDOR name="odbc_mssql" version="9.0" />
View
5 admin/settings/development.php
@@ -14,7 +14,10 @@
$temp->add(new admin_setting_configcheckbox('enablegroupmembersonly', new lang_string('enablegroupmembersonly', 'admin'), new lang_string('configenablegroupmembersonly', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('dndallowtextandlinks', new lang_string('dndallowtextandlinks', 'admin'), new lang_string('configdndallowtextandlinks', 'admin'), 0));
- $temp->add(new admin_setting_configcheckbox('enablecssoptimiser', new lang_string('enablecssoptimiser','admin'), new lang_string('enablecssoptimiser_desc','admin'), 0));
+ // The CSS optimiser setting. When changed we need to reset the theme caches in order to ensure they are regenerated through the optimiser.
+ $enablecssoptimiser = new admin_setting_configcheckbox('enablecssoptimiser', new lang_string('enablecssoptimiser','admin'), new lang_string('enablecssoptimiser_desc','admin'), 0);
+ $enablecssoptimiser->set_updatedcallback('theme_reset_all_caches');
+ $temp->add($enablecssoptimiser);
$ADMIN->add('experimental', $temp);
View
2  admin/tool/uploaduser/index.php
@@ -86,7 +86,7 @@
// array of all valid fields for validation
$STD_FIELDS = array('id', 'firstname', 'lastname', 'username', 'email',
'city', 'country', 'lang', 'timezone', 'mailformat',
- 'maildisplay', 'maildigest', 'htmleditor', 'ajax', 'autosubscribe',
+ 'maildisplay', 'maildigest', 'htmleditor', 'autosubscribe',
'institution', 'department', 'idnumber', 'skype',
'msn', 'aim', 'yahoo', 'icq', 'phone1', 'phone2', 'address',
'url', 'description', 'descriptionformat', 'password',
View
9 admin/tool/uploaduser/user_form.php
@@ -248,15 +248,6 @@ function definition () {
$mform->setType('htmleditor', PARAM_INT);
}
- if (empty($CFG->enableajax)) {
- $mform->addElement('static', 'ajax', get_string('ajaxuse'), get_string('ajaxno'));
- } else {
- $choices = array( 0 => get_string('ajaxno'), 1 => get_string('ajaxyes'));
- $mform->addElement('select', 'ajax', get_string('ajaxuse'), $choices);
- $mform->setDefault('ajax', 1);
- }
- $mform->setAdvanced('ajax');
-
$mform->addElement('text', 'city', get_string('city'), 'maxlength="100" size="25"');
$mform->setType('city', PARAM_MULTILANG);
if (empty($CFG->defaultcity)) {
View
45 admin/tool/xmldb/actions/XMLDBAction.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -27,35 +26,35 @@
* Main xmldb action class. It implements all the basic
* functionalities to be shared by each action.
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class XMLDBAction {
- var $does_generate; //Type of value returned by the invoke method
- //ACTION_GENERATE_HTML have contents to show
- //set by each specialized invoke
+ /** @var bool Type of value returned by the invoke method, ACTION_GENERATE_HTML have contents to show, set by each specialized invoke*/
+ protected $does_generate;
- var $title; //Title of the Action (class name, by default)
- //set by parent init automatically
+ /** @var string Title of the Action (class name, by default), set by parent init automatically*/
+ protected $title;
- var $str; //Strings used by the action
- //set by each specialized init, calling loadStrings
+ /** @var string Strings used by the action set by each specialized init, calling loadStrings*/
+ protected $str;
- var $output; //Output of the action
- //set by each specialized invoke, get with getOutput
+ /** @var string Output of the action, set by each specialized invoke, get with getOutput*/
+ protected $output;
- var $errormsg; //Last Error produced. Check when any invoke returns false
- //get with getError
+ /** @var string Last Error produced. Check when any invoke returns false, get with getError*/
+ protected $errormsg;
- var $postaction; //Action to execute at the end of the invoke script
+ /** @var string Action to execute at the end of the invoke script*/
+ protected $postaction;
- var $sesskey_protected; // Actions must be protected by sesskey mechanism
+ /** @var bool Actions must be protected by sesskey mechanism*/
+ protected $sesskey_protected;
/**
- * Constructor to keep PHP5 happy
+ * Constructor
*/
function __construct() {
$this->init();
@@ -76,7 +75,8 @@ function init() {
}
/**
- * returns the type of output of the file
+ * Returns the type of output of the file
+ * @return bool
*/
function getDoesGenerate() {
return $this->does_generate;
@@ -85,6 +85,7 @@ function getDoesGenerate() {
/**
* getError method, returns the last error string.
* Used if the invoke() methods returns false
+ * @return string
*/
function getError() {
return $this->errormsg;
@@ -93,6 +94,7 @@ function getError() {
/**
* getOutput method, returns the output generated by the action.
* Used after execution of the invoke() methods if they return true
+ * @return string
*/
function getOutput() {
return $this->output;
@@ -101,6 +103,7 @@ function getOutput() {
/**
* getPostAction method, returns the action to launch after executing
* another one
+ * @return string
*/
function getPostAction() {
return $this->postaction;
@@ -109,6 +112,7 @@ function getPostAction() {
/**
* getTitle method returns the title of the action (that is part
* of the $str array attribute
+ * @return string
*/
function getTitle() {
return $this->str['title'];
@@ -117,6 +121,7 @@ function getTitle() {
/**
* loadStrings method, loads the required strings specified in the
* array parameter
+ * @params array $strings
*/
function loadStrings($strings) {
// Load some commonly used strings
@@ -162,6 +167,8 @@ function invoke() {
/**
* launch method, used to easily call invoke methods between actions
+ * @param string $action
+ * @return mixed
*/
function launch($action) {
View
10 admin/tool/xmldb/actions/XMLDBCheckAction.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2008 onwards Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -25,14 +24,13 @@
* This is a base class for the various actions that interate over all the
* tables and check some aspect of their definition.
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2008 onwards Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class XMLDBCheckAction extends XMLDBAction {
/**
- * This string is displayed with a yes/no choice before the report is run.
+ * @var string This string is displayed with a yes/no choice before the report is run.
* You must set this to the name of a lang string in xmldb.php before calling init.
*/
protected $introstr = '';
@@ -117,7 +115,7 @@ function invoke() {
// Iterate over $XMLDB->dbdirs, loading their XML data to memory
if ($XMLDB->dbdirs) {
- $dbdirs =& $XMLDB->dbdirs;
+ $dbdirs = $XMLDB->dbdirs;
$o='<ul>';
foreach ($dbdirs as $dbdir) {
// Only if the directory exists
View
6 admin/tool/xmldb/actions/check_bigints/check_bigints.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -25,8 +24,7 @@
* reporting about the ones not physically implemented as BIGINTs
* and providing one SQL script to fix all them. MDL-11038
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
6 admin/tool/xmldb/actions/check_defaults/check_defaults.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -26,8 +25,7 @@
* match those specified in the xml specs
* and providing one SQL script to fix all them.
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
6 admin/tool/xmldb/actions/check_foreign_keys/check_foreign_keys.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -30,8 +29,7 @@
* Each 0 in that column will violate the foreign key, but we ignore them.
* If you want a strict check performed, then add &strict=1 to the URL.
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
6 admin/tool/xmldb/actions/check_indexes/check_indexes.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -26,8 +25,7 @@
* with the physical DB implementation, reporting about all the missing
* indexes to be created to be 100% ok.
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
4 admin/tool/xmldb/actions/check_oracle_semantics/check_oracle_semantics.class.php
@@ -16,7 +16,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package xmldb-editor
+ * @package tool_xmldb
* @copyright 2011 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -28,7 +28,7 @@
* them by changing to cross-db (CHAR) length semantics.
* See MDL-29322 for more details.
*
- * @package xmldb-editor
+ * @package tool_xmldb
* @copyright 2011 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
6 admin/tool/xmldb/actions/create_xml_file/create_xml_file.class.php
@@ -15,15 +15,13 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
26 admin/tool/xmldb/actions/delete_field/delete_field.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -24,8 +23,7 @@
/**
* This class will delete completely one field
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -96,21 +94,21 @@ function invoke() {
// Get the edited dir
if (!empty($XMLDB->editeddirs)) {
if (isset($XMLDB->editeddirs[$dirpath])) {
- $dbdir =& $XMLDB->dbdirs[$dirpath];
- $editeddir =& $XMLDB->editeddirs[$dirpath];
+ $dbdir = $XMLDB->dbdirs[$dirpath];
+ $editeddir = $XMLDB->editeddirs[$dirpath];
if ($editeddir) {
- $structure =& $editeddir->xml_file->getStructure();
+ $structure = $editeddir->xml_file->getStructure();
// Move adjacent fields prev and next attributes
- $tables =& $structure->getTables();
- $table =& $structure->getTable($tableparam);
- $fields =& $table->getFields();
- $field =& $table->getField($fieldparam);
+ $tables = $structure->getTables();
+ $table = $structure->getTable($tableparam);
+ $fields = $table->getFields();
+ $field = $table->getField($fieldparam);
if ($field->getPrevious()) {
- $prev =& $table->getField($field->getPrevious());
+ $prev = $table->getField($field->getPrevious());
$prev->setNext($field->getNext());
}
if ($field->getNext()) {
- $next =& $table->getField($field->getNext());
+ $next = $table->getField($field->getNext());
$next->setPrevious($field->getPrevious());
}
// Remove the field
@@ -121,7 +119,7 @@ function invoke() {
// If the hash has changed from the original one, change the version
// and mark the structure as changed
- $origstructure =& $dbdir->xml_file->getStructure();
+ $origstructure = $dbdir->xml_file->getStructure();
if ($structure->getHash() != $origstructure->getHash()) {
$structure->setVersion(userdate(time(), '%Y%m%d', 99, false));
$structure->setChanged(true);
View
26 admin/tool/xmldb/actions/delete_index/delete_index.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -24,8 +23,7 @@
/**
* This class will delete completely one index
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -96,21 +94,21 @@ function invoke() {
// Get the edited dir
if (!empty($XMLDB->editeddirs)) {
if (isset($XMLDB->editeddirs[$dirpath])) {
- $dbdir =& $XMLDB->dbdirs[$dirpath];
- $editeddir =& $XMLDB->editeddirs[$dirpath];
+ $dbdir = $XMLDB->dbdirs[$dirpath];
+ $editeddir = $XMLDB->editeddirs[$dirpath];
if ($editeddir) {
- $structure =& $editeddir->xml_file->getStructure();
+ $structure = $editeddir->xml_file->getStructure();
// Move adjacent indexes prev and next attributes
- $tables =& $structure->getTables();
- $table =& $structure->getTable($tableparam);
- $indexes =& $table->getIndexes();
- $index =& $table->getIndex($indexparam);
+ $tables = $structure->getTables();
+ $table = $structure->getTable($tableparam);
+ $indexes = $table->getIndexes();
+ $index = $table->getIndex($indexparam);
if ($index->getPrevious()) {
- $prev =& $table->getIndex($index->getPrevious());
+ $prev = $table->getIndex($index->getPrevious());
$prev->setNext($index->getNext());
}
if ($index->getNext()) {
- $next =& $table->getIndex($index->getNext());
+ $next = $table->getIndex($index->getNext());
$next->setPrevious($index->getPrevious());
}
// Remove the index
@@ -121,7 +119,7 @@ function invoke() {
// If the hash has changed from the original one, change the version
// and mark the structure as changed
- $origstructure =& $dbdir->xml_file->getStructure();
+ $origstructure = $dbdir->xml_file->getStructure();
if ($structure->getHash() != $origstructure->getHash()) {
$structure->setVersion(userdate(time(), '%Y%m%d', 99, false));
$structure->setChanged(true);
View
26 admin/tool/xmldb/actions/delete_key/delete_key.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -24,8 +23,7 @@
/**
* This class will delete completely one key
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -96,21 +94,21 @@ function invoke() {
// Get the edited dir
if (!empty($XMLDB->editeddirs)) {
if (isset($XMLDB->editeddirs[$dirpath])) {
- $dbdir =& $XMLDB->dbdirs[$dirpath];
- $editeddir =& $XMLDB->editeddirs[$dirpath];
+ $dbdir = $XMLDB->dbdirs[$dirpath];
+ $editeddir = $XMLDB->editeddirs[$dirpath];
if ($editeddir) {
- $structure =& $editeddir->xml_file->getStructure();
+ $structure = $editeddir->xml_file->getStructure();
// Move adjacent keys prev and next attributes
- $tables =& $structure->getTables();
- $table =& $structure->getTable($tableparam);
- $keys =& $table->getKeys();
- $key =& $table->getKey($keyparam);
+ $tables = $structure->getTables();
+ $table = $structure->getTable($tableparam);
+ $keys = $table->getKeys();
+ $key = $table->getKey($keyparam);
if ($key->getPrevious()) {
- $prev =& $table->getKey($key->getPrevious());
+ $prev = $table->getKey($key->getPrevious());
$prev->setNext($key->getNext());
}
if ($key->getNext()) {
- $next =& $table->getKey($key->getNext());
+ $next = $table->getKey($key->getNext());
$next->setPrevious($key->getPrevious());
}
// Remove the key
@@ -121,7 +119,7 @@ function invoke() {
// If the hash has changed from the original one, change the version
// and mark the structure as changed
- $origstructure =& $dbdir->xml_file->getStructure();
+ $origstructure = $dbdir->xml_file->getStructure();
if ($structure->getHash() != $origstructure->getHash()) {
$structure->setVersion(userdate(time(), '%Y%m%d', 99, false));
$structure->setChanged(true);
View
12 admin/tool/xmldb/actions/delete_table/delete_table.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -24,8 +23,7 @@
/**
* This class will delete completely one table
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -95,10 +93,10 @@ function invoke() {
// Get the edited dir
if (!empty($XMLDB->editeddirs)) {
if (isset($XMLDB->editeddirs[$dirpath])) {
- $dbdir =& $XMLDB->dbdirs[$dirpath];
- $editeddir =& $XMLDB->editeddirs[$dirpath];
+ $dbdir = $XMLDB->dbdirs[$dirpath];
+ $editeddir = $XMLDB->editeddirs[$dirpath];
if ($editeddir) {
- $structure =& $editeddir->xml_file->getStructure();
+ $structure = $editeddir->xml_file->getStructure();
// Remove the table
$structure->deleteTable($tableparam);
}
View
8 admin/tool/xmldb/actions/delete_xml_file/delete_xml_file.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -24,8 +23,7 @@
/**
* This class will delete completely one XML file
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -94,7 +92,7 @@ function invoke() {
// Get the original dir and delete the xml file
if (!empty($XMLDB->dbdirs)) {
if (isset($XMLDB->dbdirs[$dirpath])) {
- $dbdir =& $XMLDB->dbdirs[$dirpath];
+ $dbdir = $XMLDB->dbdirs[$dirpath];
if ($dbdir) {
@unlink($dirpath . '/install.xml');
}
View
26 admin/tool/xmldb/actions/edit_field/edit_field.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -24,8 +23,7 @@
/**
* This class will provide the interface for all the edit field actions
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -75,30 +73,30 @@ function invoke() {
// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
- $dbdir =& $XMLDB->dbdirs[$dirpath];
+ $dbdir = $XMLDB->dbdirs[$dirpath];
} else {
return false;
}
if (!empty($XMLDB->editeddirs)) {
- $editeddir =& $XMLDB->editeddirs[$dirpath];
- $structure =& $editeddir->xml_file->getStructure();
+ $editeddir = $XMLDB->editeddirs[$dirpath];
+ $structure = $editeddir->xml_file->getStructure();
}
// Fetch request data
$tableparam = required_param('table', PARAM_CLEAN);
- if (!$table =& $structure->getTable($tableparam)) {
+ if (!$table = $structure->getTable($tableparam)) {
$this->errormsg = 'Wrong table specified: ' . $tableparam;
return false;
}
$fieldparam = required_param('field', PARAM_CLEAN);
- if (!$field =& $table->getField($fieldparam)) {
+ if (!$field = $table->getField($fieldparam)) {
// Arriving here from a name change, looking for the new field name
$fieldparam = required_param('name', PARAM_CLEAN);
- $field =& $table->getField($fieldparam);
+ $field = $table->getField($fieldparam);
}
- $dbdir =& $XMLDB->dbdirs[$dirpath];
- $origstructure =& $dbdir->xml_file->getStructure();
+ $dbdir = $XMLDB->dbdirs[$dirpath];
+ $origstructure = $dbdir->xml_file->getStructure();
$o = ''; // Output starts
@@ -136,9 +134,9 @@ function invoke() {
XMLDB_TYPE_CHAR => $field->getXMLDBTypeName(XMLDB_TYPE_CHAR),
XMLDB_TYPE_TEXT => $field->getXMLDBTypeName(XMLDB_TYPE_TEXT),
XMLDB_TYPE_BINARY => $field->getXMLDBTypeName(XMLDB_TYPE_BINARY));
- // If current field isnt float, delete such column type to avoid its creation from the interface
+ // If current field isn't float, delete such column type to avoid its creation from the interface
// Note that float fields are supported completely but it's possible than in a next future
- // we delete them completely from Moodle DB, using, exlusively, number(x,y) types
+ // we delete them completely from Moodle DB, using, exclusively, number(x,y) types
if ($field->getType() != XMLDB_TYPE_FLOAT) {
unset ($typeoptions[XMLDB_TYPE_FLOAT]);
}
View
3  admin/tool/xmldb/actions/edit_field/edit_field.js
@@ -14,8 +14,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
18 admin/tool/xmldb/actions/edit_field_save/edit_field_save.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -25,8 +24,7 @@
* This class verifies all the data introduced when editing a field for correctness,
* performing changes / displaying errors depending of the results.
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -99,10 +97,10 @@ function invoke() {
$default = optional_param('default', NULL, PARAM_PATH);
$default = trim($default);
- $editeddir =& $XMLDB->editeddirs[$dirpath];
- $structure =& $editeddir->xml_file->getStructure();
- $table =& $structure->getTable($tableparam);
- $field =& $table->getField($fieldparam);
+ $editeddir = $XMLDB->editeddirs[$dirpath];
+ $structure = $editeddir->xml_file->getStructure();
+ $table = $structure->getTable($tableparam);
+ $field = $table->getField($fieldparam);
$oldhash = $field->getHash();
$errors = array(); // To store all the errors found
@@ -225,12 +223,12 @@ function invoke() {
if ($fieldparam != $name) {
$field->setName($name);
if ($field->getPrevious()) {
- $prev =& $table->getField($field->getPrevious());
+ $prev = $table->getField($field->getPrevious());
$prev->setNext($name);
$prev->setChanged(true);
}
if ($field->getNext()) {
- $next =& $table->getField($field->getNext());
+ $next = $table->getField($field->getNext());
$next->setPrevious($name);
$next->setChanged(true);
}
View
21 admin/tool/xmldb/actions/edit_index/edit_index.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -24,7 +23,7 @@
/**
* This class will provide the interface for all the edit index actions
*
- * @package xmldb-editor
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -73,30 +72,30 @@ function invoke() {
// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
- $dbdir =& $XMLDB->dbdirs[$dirpath];
+ $dbdir = $XMLDB->dbdirs[$dirpath];
} else {
return false;
}
if (!empty($XMLDB->editeddirs)) {
- $editeddir =& $XMLDB->editeddirs[$dirpath];
- $structure =& $editeddir->xml_file->getStructure();
+ $editeddir = $XMLDB->editeddirs[$dirpath];
+ $structure = $editeddir->xml_file->getStructure();
}
// Fetch request data
$tableparam = required_param('table', PARAM_CLEAN);
- if (!$table =& $structure->getTable($tableparam)) {
+ if (!$table = $structure->getTable($tableparam)) {
$this->errormsg = 'Wrong table specified: ' . $tableparam;
return false;
}
$indexparam = required_param('index', PARAM_CLEAN);
- if (!$index =& $table->getIndex($indexparam)) {
+ if (!$index = $table->getIndex($indexparam)) {
// Arriving here from a name change, looking for the new key name
$indexparam = required_param('name', PARAM_CLEAN);
- $index =& $table->getIndex($indexparam);
+ $index = $table->getIndex($indexparam);
}
- $dbdir =& $XMLDB->dbdirs[$dirpath];
- $origstructure =& $dbdir->xml_file->getStructure();
+ $dbdir = $XMLDB->dbdirs[$dirpath];
+ $origstructure = $dbdir->xml_file->getStructure();
// Add the main form
$o = '<form id="form" action="index.php" method="post">';
View
18 admin/tool/xmldb/actions/edit_index_save/edit_index_save.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -25,8 +24,7 @@
* This class verifies all the data introduced when editing an index for correctness,
* performing changes / displaying errors depending of the results.
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -93,10 +91,10 @@ function invoke() {
$fields = required_param('fields', PARAM_CLEAN);
$fields = str_replace(' ', '', trim(strtolower($fields)));
- $editeddir =& $XMLDB->editeddirs[$dirpath];
- $structure =& $editeddir->xml_file->getStructure();
- $table =& $structure->getTable($tableparam);
- $index =& $table->getIndex($indexparam);
+ $editeddir = $XMLDB->editeddirs[$dirpath];
+ $structure = $editeddir->xml_file->getStructure();
+ $table = $structure->getTable($tableparam);
+ $index = $table->getIndex($indexparam);
$oldhash = $index->getHash();
$errors = array(); // To store all the errors found
@@ -182,12 +180,12 @@ function invoke() {
if ($indexparam != $name) {
$index->setName($name);
if ($index->getPrevious()) {
- $prev =& $table->getIndex($index->getPrevious());
+ $prev = $table->getIndex($index->getPrevious());
$prev->setNext($name);
$prev->setChanged(true);
}
if ($index->getNext()) {
- $next =& $table->getIndex($index->getNext());
+ $next = $table->getIndex($index->getNext());
$next->setPrevious($name);
$next->setChanged(true);
}
View
22 admin/tool/xmldb/actions/edit_key/edit_key.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -24,8 +23,7 @@
/**
* This class will provide the interface for all the edit key actions
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -74,30 +72,30 @@ function invoke() {
// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
- $dbdir =& $XMLDB->dbdirs[$dirpath];
+ $dbdir = $XMLDB->dbdirs[$dirpath];
} else {
return false;
}
if (!empty($XMLDB->editeddirs)) {
- $editeddir =& $XMLDB->editeddirs[$dirpath];
- $structure =& $editeddir->xml_file->getStructure();
+ $editeddir = $XMLDB->editeddirs[$dirpath];
+ $structure = $editeddir->xml_file->getStructure();
}
// Fetch request data
$tableparam = required_param('table', PARAM_CLEAN);
- if (!$table =& $structure->getTable($tableparam)) {
+ if (!$table = $structure->getTable($tableparam)) {
$this->errormsg = 'Wrong table specified: ' . $tableparam;
return false;
}
$keyparam = required_param('key', PARAM_CLEAN);
- if (!$key =& $table->getKey($keyparam)) {
+ if (!$key = $table->getKey($keyparam)) {
// Arriving here from a name change, looking for the new key name
$keyparam = required_param('name', PARAM_CLEAN);
- $key =& $table->getKey($keyparam);
+ $key = $table->getKey($keyparam);
}
- $dbdir =& $XMLDB->dbdirs[$dirpath];
- $origstructure =& $dbdir->xml_file->getStructure();
+ $dbdir = $XMLDB->dbdirs[$dirpath];
+ $origstructure = $dbdir->xml_file->getStructure();
// Add the main form
$o = '<form id="form" action="index.php" method="post">';
View
3  admin/tool/xmldb/actions/edit_key/edit_key.js
@@ -14,8 +14,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
20 admin/tool/xmldb/actions/edit_key_save/edit_key_save.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -25,8 +24,7 @@
* This class verifies all the data introduced when editing a key for correctness,
* performing changes / displaying errors depending of the results.
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -106,10 +104,10 @@ function invoke() {
$reffields = str_replace(' ', '', trim(strtolower($reffields)));
}
- $editeddir =& $XMLDB->editeddirs[$dirpath];
- $structure =& $editeddir->xml_file->getStructure();
- $table =& $structure->getTable($tableparam);
- $key =& $table->getKey($keyparam);
+ $editeddir = $XMLDB->editeddirs[$dirpath];
+ $structure = $editeddir->xml_file->getStructure();
+ $table = $structure->getTable($tableparam);
+ $key = $table->getKey($keyparam);
$oldhash = $key->getHash();
$errors = array(); // To store all the errors found
@@ -254,16 +252,16 @@ function invoke() {
// Continue if we aren't under errors
if (empty($errors)) {
// If there is one name change, do it, changing the prev and next
- // atributes of the adjacent fields
+ // attributes of the adjacent fields
if ($keyparam != $name) {
$key->setName($name);
if ($key->getPrevious()) {
- $prev =& $table->getKey($key->getPrevious());
+ $prev = $table->getKey($key->getPrevious());
$prev->setNext($name);
$prev->setChanged(true);
}
if ($key->getNext()) {
- $next =& $table->getKey($key->getNext());
+ $next = $table->getKey($key->getNext());
$next->setPrevious($name);
$next->setChanged(true);
}
View
26 admin/tool/xmldb/actions/edit_table/edit_table.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -28,8 +27,7 @@
* can be invoked, plus links to PHP code generator, view SQL, rearrange
* elements and so on.
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -93,7 +91,7 @@ function invoke() {
// Get the correct dirs
if (!empty($XMLDB->dbdirs)) {
- $dbdir =& $XMLDB->dbdirs[$dirpath];
+ $dbdir = $XMLDB->dbdirs[$dirpath];
} else {
return false;
}
@@ -104,19 +102,19 @@ function invoke() {
}
if (!empty($XMLDB->editeddirs)) {
- $editeddir =& $XMLDB->editeddirs[$dirpath];
- $structure =& $editeddir->xml_file->getStructure();
+ $editeddir = $XMLDB->editeddirs[$dirpath];
+ $structure = $editeddir->xml_file->getStructure();
}
$tableparam = required_param('table', PARAM_CLEAN);
- if (!$table =& $structure->getTable($tableparam)) {
+ if (!$table = $structure->getTable($tableparam)) {
// Arriving here from a name change, looking for the new table name
$tableparam = required_param('name', PARAM_CLEAN);
- $table =& $structure->getTable($tableparam);
+ $table = $structure->getTable($tableparam);
}
- $dbdir =& $XMLDB->dbdirs[$dirpath];
- $origstructure =& $dbdir->xml_file->getStructure();
+ $dbdir = $XMLDB->dbdirs[$dirpath];
+ $origstructure = $dbdir->xml_file->getStructure();
// Add the main form
$o = '<form id="form" action="index.php" method="post">';
@@ -193,7 +191,7 @@ function invoke() {
$table->deleteIndex('changeme');
// Add the fields list
- $fields =& $table->getFields();
+ $fields = $table->getFields();
if (!empty($fields)) {
$o .= '<h3 class="main">' . $this->str['fields'] . '</h3>';
$o .= '<table id="listfields" border="0" cellpadding="5" cellspacing="1" class="boxaligncenter flexible">';
@@ -251,7 +249,7 @@ function invoke() {
$o .= '</table>';
}
// Add the keys list
- $keys =& $table->getKeys();
+ $keys = $table->getKeys();
if (!empty($keys)) {
$o .= '<h3 class="main">' . $this->str['keys'] . '</h3>';
$o .= '<table id="listkeys" border="0" cellpadding="5" cellspacing="1" class="boxaligncenter flexible">';
@@ -304,7 +302,7 @@ function invoke() {
$o .= '</table>';
}
// Add the indexes list
- $indexes =& $table->getIndexes();
+ $indexes = $table->getIndexes();
if (!empty($indexes)) {
$o .= '<h3 class="main">' . $this->str['indexes'] . '</h3>';
$o .= '<table id="listindexes" border="0" cellpadding="5" cellspacing="1" class="boxaligncenter flexible">';
View
20 admin/tool/xmldb/actions/edit_table_save/edit_table_save.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -24,8 +23,7 @@
/**
* This class will save changes in table name and/or comments
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -81,11 +79,11 @@ function invoke() {
$comment = required_param('comment', PARAM_CLEAN);
$comment = $comment;
- $dbdir =& $XMLDB->dbdirs[$dirpath];
+ $dbdir = $XMLDB->dbdirs[$dirpath];
- $editeddir =& $XMLDB->editeddirs[$dirpath];
- $structure =& $editeddir->xml_file->getStructure();
- $table =& $structure->getTable($tableparam);
+ $editeddir = $XMLDB->editeddirs[$dirpath];
+ $structure = $editeddir->xml_file->getStructure();
+ $table = $structure->getTable($tableparam);
$errors = array(); // To store all the errors found
@@ -120,12 +118,12 @@ function invoke() {
if ($tableparam != $name) {
$table->setName($name);
if ($table->getPrevious()) {
- $prev =& $structure->getTable($table->getPrevious());
+ $prev = $structure->getTable($table->getPrevious());
$prev->setNext($name);
$prev->setChanged(true);
}
if ($table->getNext()) {
- $next =& $structure->getTable($table->getNext());
+ $next = $structure->getTable($table->getNext());
$next->setPrevious($name);
$next->setChanged(true);
}
@@ -145,7 +143,7 @@ function invoke() {
// If the hash has changed from the original one, change the version
// and mark the structure as changed
- $origstructure =& $dbdir->xml_file->getStructure();
+ $origstructure = $dbdir->xml_file->getStructure();
if ($structure->getHash() != $origstructure->getHash()) {
$structure->setVersion(userdate(time(), '%Y%m%d', 99, false));
$structure->setChanged(true);
View
12 admin/tool/xmldb/actions/edit_xml_file/edit_xml_file.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -27,8 +26,7 @@
* Main page to start editing one XML file. From here it's possible to access
* to tables edition plus PHP code generation and other utilities
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -90,7 +88,7 @@ function invoke() {
// Get the correct dir
if (!empty($XMLDB->dbdirs)) {
- $dbdir =& $XMLDB->dbdirs[$dirpath];
+ $dbdir = $XMLDB->dbdirs[$dirpath];
if ($dbdir) {
// Only if the directory exists and it has been loaded
if (!$dbdir->path_exists || !$dbdir->xml_loaded) {
@@ -105,8 +103,8 @@ function invoke() {
$XMLDB->editeddirs[$dirpath] = unserialize(serialize($dbdir));
}
// Get it
- $editeddir =& $XMLDB->editeddirs[$dirpath];
- $structure =& $editeddir->xml_file->getStructure();
+ $editeddir = $XMLDB->editeddirs[$dirpath];
+ $structure = $editeddir->xml_file->getStructure();
// Add the main form
$o = '<form id="form" action="index.php" method="post">';
View
14 admin/tool/xmldb/actions/edit_xml_file_save/edit_xml_file_save.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -24,8 +23,7 @@
/**
* This class will save the changes performed to the comment of one file
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -76,16 +74,16 @@ function invoke() {
$comment = $comment;
// Set comment and recalculate hash
- $editeddir =& $XMLDB->editeddirs[$dirpath];
- $structure =& $editeddir->xml_file->getStructure();
+ $editeddir = $XMLDB->editeddirs[$dirpath];
+ $structure = $editeddir->xml_file->getStructure();
$structure->setComment($comment);
$structure->calculateHash(true);
// If the hash has changed from the original one, change the version
// and mark the structure as changed
- $origdir =& $XMLDB->dbdirs[$dirpath];
- $origstructure =& $origdir->xml_file->getStructure();
+ $origdir = $XMLDB->dbdirs[$dirpath];
+ $origstructure = $origdir->xml_file->getStructure();
if ($structure->getHash() != $origstructure->getHash()) {
$structure->setVersion(userdate(time(), '%Y%m%d', 99, false));
$structure->setChanged(true);
View
6 admin/tool/xmldb/actions/generate_all_documentation/generate_all_documentation.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright (C) 2001-3001 Eloy Lafuente (stronk7) {@link http://contiento.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -25,8 +24,7 @@
* This class will produce the documentation for all the XMLDB files in the server,
* via XSL, performing the output in HTML format.
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright (C) 2001-3001 Eloy Lafuente (stronk7) {@link http://contiento.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
6 admin/tool/xmldb/actions/generate_documentation/generate_documentation.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -24,8 +23,7 @@
/**
* This class will produce XSL documentation for the loaded XML file
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
6 admin/tool/xmldb/actions/get_db_directories/get_db_directories.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -25,8 +24,7 @@
* This class will will check all the db directories existing under the
* current Moodle installation, sending them to the SESSION->dbdirs array
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
8 admin/tool/xmldb/actions/load_xml_file/load_xml_file.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -24,8 +23,7 @@
/**
* This class will load one XML file to memory if necessary
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -74,7 +72,7 @@ function invoke() {
// Get the correct dir
if (!empty($XMLDB->dbdirs)) {
- $dbdir =& $XMLDB->dbdirs[$dirpath];
+ $dbdir = $XMLDB->dbdirs[$dirpath];
if ($dbdir) {
// Set some defaults
$dbdir->xml_exists = false;
View
8 admin/tool/xmldb/actions/load_xml_files/load_xml_files.class.php
@@ -15,8 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -24,8 +23,7 @@
/**
* This class will load every XML file to memory if necessary
*
- * @package tool
- * @subpackage xmldb
+ * @package tool_xmldb
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -69,7 +67,7 @@ function invoke() {
// Iterate over $XMLDB->dbdirs, loading their XML data to memory
if ($XMLDB->dbdirs) {
- $dbdirs =& $XMLDB->dbdirs;
+ $dbdirs = $XMLDB->dbdirs;