new: upgrade script from release 1.5.0

improvement: ability to turn off dying on SQL queries failure. Could be
useful for upgrades.


git-svn-id: http://piwigo.org/svn/branches/branch-1_6@1174 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2006-04-14 21:25:49 +00:00
parent 4e8f0f583f
commit afa5ab27a5
5 changed files with 596 additions and 78 deletions
+3
View File
@@ -333,6 +333,9 @@ $conf['show_gt'] = true;
// accessed
$conf['debug_l10n'] = false;
// die_on_sql_error: if an SQL query fails, should everything stop?
$conf['die_on_sql_error'] = true;
// +-----------------------------------------------------------------------+
// | authentication |
// +-----------------------------------------------------------------------+
+11 -1
View File
@@ -651,12 +651,22 @@ function get_thumbnail_src($path, $tn_ext = '', $with_rewrite = true)
// error occured for the last mysql query.
function my_error($header)
{
global $conf;
$error = '<pre>';
$error.= $header;
$error.= '[mysql error '.mysql_errno().'] ';
$error.= mysql_error();
$error.= '</pre>';
die ($error);
if ($conf['die_on_sql_error'])
{
die($error);
}
else
{
echo $error;
}
}
/**