diff options
author | plegall <plg@piwigo.org> | 2006-04-14 21:25:49 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2006-04-14 21:25:49 +0000 |
commit | afa5ab27a5e81ba32e797d7025fbb25a862bcfbe (patch) | |
tree | e6ebc20c0abe32a54e82cf1d62287df0c97797fa /include/functions.inc.php | |
parent | 4e8f0f583fc7254500e9d765853e30db4f9e5b01 (diff) |
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
Diffstat (limited to '')
-rw-r--r-- | include/functions.inc.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php index 2fb4e3cba..496ad2690 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -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; + } } /** |