aboutsummaryrefslogtreecommitdiffstats
path: root/install.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2006-04-20 19:31:12 +0000
committerplegall <plg@piwigo.org>2006-04-20 19:31:12 +0000
commitc64da384ea354a194cfdcbd552340261b5d547d9 (patch)
treecb0f49c53ec9c918e453b7f0dbfed757121a6743 /install.php
parentc4b59049c205677432e69c585e003c5bea1c85e6 (diff)
partial merge -r1173:1174 from branch-1_6 to trunk: new configuration
parameter die_on_sql_error (upgrade.php and install/upgrade_*.php not concerned on BSF) partial merge -r1208:1209 from branch-1_6 to trunk (only bug fix on incorrect insertion of complex upgrade identifiers) deletions: upgrade.php and all install/upgrade_*.php because these script are never up to date on BSF. Anyway, they are only required on a stable branch. git-svn-id: http://piwigo.org/svn/trunk@1221 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'install.php')
-rw-r--r--install.php24
1 files changed, 17 insertions, 7 deletions
diff --git a/install.php b/install.php
index 8fe5b03ae..70d698147 100644
--- a/install.php
+++ b/install.php
@@ -166,6 +166,7 @@ include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
@include(PHPWG_ROOT_PATH. 'include/config_local.inc.php');
include(PHPWG_ROOT_PATH . 'include/constants.php');
include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
+include(PHPWG_ROOT_PATH . 'admin/include/functions.php');
include(PHPWG_ROOT_PATH . 'include/template.php');
if ( isset( $_POST['language'] ))
@@ -332,16 +333,25 @@ INSERT INTO '.USER_INFOS_TABLE.'
// Available upgrades must be ignored after a fresh installation. To
// make PWG avoid upgrading, we must tell it upgrades have already been
// made.
+ list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
+ define('CURRENT_DATE', $dbnow);
+ $datas = array();
foreach (get_available_upgrade_ids() as $upgrade_id)
{
- $query = '
-INSERT INTO '.UPGRADE_TABLE.'
- (id, applied, description)
- VALUES
- ('.$upgrade_id.', NOW(), \'upgrade included in installation\')
-';
- mysql_query($query);
+ array_push(
+ $datas,
+ array(
+ 'id' => $upgrade_id,
+ 'applied' => CURRENT_DATE,
+ 'description' => 'upgrade included in installation',
+ )
+ );
}
+ mass_inserts(
+ UPGRADE_TABLE,
+ array_keys($datas[0]),
+ $datas
+ );
}
}