mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-05 17:32:25 +02:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user