### Eclipse Workspace Patch 1.0 #P PUBLIC_MOODLE_HEAD Index: mod/wiki/version.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/wiki/version.php,v retrieving revision 1.37 diff -u -r1.37 version.php --- mod/wiki/version.php 3 Aug 2010 10:07:19 -0000 1.37 +++ mod/wiki/version.php 25 Oct 2010 13:29:19 -0000 @@ -32,6 +32,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -$module->version = 2010080300; // The current module version (Date: YYYYMMDDXX) +$module->version = 2010102500; // The current module version (Date: YYYYMMDDXX) $module->requires = 2010080300; $module->cron = 0; // Period for cron to check this module (secs) Index: mod/wiki/db/install.xml =================================================================== RCS file: /cvsroot/moodle/moodle/mod/wiki/db/install.xml,v retrieving revision 1.9 diff -u -r1.9 install.xml --- mod/wiki/db/install.xml 2 May 2010 11:42:23 -0000 1.9 +++ mod/wiki/db/install.xml 25 Oct 2010 13:29:19 -0000 @@ -1,5 +1,5 @@ - @@ -56,7 +56,7 @@ - + @@ -97,7 +97,7 @@ - +
@@ -113,4 +113,4 @@
-
+ \ No newline at end of file Index: mod/wiki/db/upgrade.php =================================================================== RCS file: /cvsroot/moodle/moodle/mod/wiki/db/upgrade.php,v retrieving revision 1.21 diff -u -r1.21 upgrade.php --- mod/wiki/db/upgrade.php 11 Aug 2010 07:25:20 -0000 1.21 +++ mod/wiki/db/upgrade.php 25 Oct 2010 13:29:19 -0000 @@ -329,6 +329,26 @@ upgrade_mod_savepoint(true, 2010080201, 'wiki'); } + + if ($oldversion < 2010102500) { + + // Define key subwikifk (foreign) to be added to wiki_pages + $table = new xmldb_table('wiki_pages'); + $key = new xmldb_key('subwikifk', XMLDB_KEY_FOREIGN, array('subwikiid'), 'wiki_subwikis', array('id')); + + // Launch add key subwikifk + $dbman->add_key($table, $key); + + // Define key subwikifk (foreign) to be added to wiki_links + $table = new xmldb_table('wiki_links'); + $key = new xmldb_key('subwikifk', XMLDB_KEY_FOREIGN, array('subwikiid'), 'wiki_subwikis', array('id')); + + // Launch add key subwikifk + $dbman->add_key($table, $key); + + // wiki savepoint reached + upgrade_mod_savepoint(true, 2010102500, 'wiki'); + }