------------------------------------------------------------
revno: 1073
committer: Roger Martin <[email protected]>
branch nick: aikiframework
timestamp: Sat 2012-02-04 23:55:01 +0100
message:
upgrader insert last-revision as config var
modified:
assets/apps/upgrader/library.php
--
lp:aikiframework
https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk
Your team Aiki Framework Developers is subscribed to branch lp:aikiframework.
To unsubscribe from this branch go to
https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk/+edit-subscription
=== modified file 'assets/apps/upgrader/library.php'
--- assets/apps/upgrader/library.php 2012-02-03 20:26:59 +0000
+++ assets/apps/upgrader/library.php 2012-02-04 22:55:01 +0000
@@ -222,7 +222,7 @@
$files = array (
"$AIKI_ROOT_DIR/sql/CreateTables.sql",
- "$AIKI_ROOT_DIR/sql/Site.sql");
+ "$AIKI_ROOT_DIR/sql/CreateTablesSite.sql");
$ret = "<strong>".$t->t("Database upgrading")."</strong>";
@@ -248,9 +248,11 @@
function upgradeAikiData (){
global $t, $db, $AIKI_ROOT_DIR;
+ $revision = Util::get_last_revision();
+
$replaces = array (
"@VERSION@" =>AIKI_VERSION,
- "@REVISION@" =>util::get_last_revision() );
+ "@REVISION@" =>$revision );
// Re-install data: remove & insert -------------------------------
$files = array (
@@ -262,7 +264,7 @@
$ret = "<strong>". $t->t("Update Aiki & Site Data") . "</strong>";
foreach ($files as $file => $message ){
if ( file_exists($file) ) {
- $db->query ( strtr( @file_get_contents($file), $replaces));
+ $db->query ( strtr( Util::remove_comments( @file_get_contents($file)), $replaces));
$ret .= "<br>$message";
}
}
@@ -284,5 +286,11 @@
}
}
+ // Set new aiki revision
+ config_set("AIKI-REVISION", $revision, "*/*/* !important");
+ // paranoic check to ensure revision is good in all sites/views/language
+ $db->query("UPDATE aiki_configs SET config_value = 'i:$revision' WHERE config_name='AIKI-REVISION'");
+
+
return $ret;
}
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help : https://help.launchpad.net/ListHelp