2009-11-05 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added sql_error_handler() to show SQL errors. Improved SQL error messages in process_sql() so it shows now the failing sentence, the file and the line of the call. * index.php: Moved load_extensions() call after enterprise instalation so enterprise extensions are installed properly. * godmode/profiles/profile_list.php: HTML tags nesting fixed. * ChangeLog: Fixed previous commit message style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1219 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
73dcde4b71
commit
1ae91e7281
|
@ -1,3 +1,16 @@
|
|||
2009-11-05 Esteban Sanchez <estebans@artica.es>
|
||||
|
||||
* include/functions_db.php: Added sql_error_handler() to show SQL
|
||||
errors. Improved SQL error messages in process_sql() so it shows now
|
||||
the failing sentence, the file and the line of the call.
|
||||
|
||||
* index.php: Moved load_extensions() call after enterprise
|
||||
instalation so enterprise extensions are installed properly.
|
||||
|
||||
* godmode/profiles/profile_list.php: HTML tags nesting fixed.
|
||||
|
||||
* ChangeLog: Fixed previous commit message style.
|
||||
|
||||
2008-11-05 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* pandoradb.sql: Deleted 'id_inventory_server' column from 'tagente'
|
||||
|
@ -6,27 +19,27 @@
|
|||
2009-11-05 Jorge Gonzalez <jorgegonz@artica.es>
|
||||
|
||||
* include/languages/pt_BR.mo, include/languages/fr.po,
|
||||
include/languages/uk.mo, include/languages/ro.mo,
|
||||
include/languages/ca.po, include/languages/sv.po,
|
||||
include/languages/de.po, include/languages/zh_TW.po,
|
||||
include/languages/hi.po, include/languages/zh_CN.po,
|
||||
include/languages/fr.mo, include/languages/te.po,
|
||||
include/languages/eu.po, include/languages/hu.po,
|
||||
include/languages/ca.mo, include/languages/de.mo,
|
||||
include/languages/sv.mo, include/languages/ru.po,
|
||||
include/languages/zh_TW.mo, include/languages/hi.mo,
|
||||
include/languages/zh_CN.mo, include/languages/gl.po,
|
||||
include/languages/te.mo, include/languages/eu.mo,
|
||||
include/languages/hu.mo, include/languages/pl.po,
|
||||
include/languages/it.po, include/languages/sl.po,
|
||||
include/languages/ru.mo, include/languages/pt.po,
|
||||
include/languages/ast.po, include/languages/gl.mo: Updated
|
||||
translations from rosetta: thanks to all contributors.
|
||||
include/languages/uk.mo, include/languages/ro.mo,
|
||||
include/languages/ca.po, include/languages/sv.po,
|
||||
include/languages/de.po, include/languages/zh_TW.po,
|
||||
include/languages/hi.po, include/languages/zh_CN.po,
|
||||
include/languages/fr.mo, include/languages/te.po,
|
||||
include/languages/eu.po, include/languages/hu.po,
|
||||
include/languages/ca.mo, include/languages/de.mo,
|
||||
include/languages/sv.mo, include/languages/ru.po,
|
||||
include/languages/zh_TW.mo, include/languages/hi.mo,
|
||||
include/languages/zh_CN.mo, include/languages/gl.po,
|
||||
include/languages/te.mo, include/languages/eu.mo,
|
||||
include/languages/hu.mo, include/languages/pl.po,
|
||||
include/languages/it.po, include/languages/sl.po,
|
||||
include/languages/ru.mo, include/languages/pt.po,
|
||||
include/languages/ast.po, include/languages/gl.mo: Updated
|
||||
translations from rosetta: thanks to all contributors.
|
||||
|
||||
2008-11-04 Jorge Gonzalez <jorgegonz@artica.es>
|
||||
|
||||
* include/languages/es.po, include/languages/es.mo: Updated Spanish
|
||||
translation.
|
||||
translation.
|
||||
|
||||
2008-10-31 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ if ($id_profile || $new_profile) {
|
|||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||
print_input_hidden ('new_profile', 1);
|
||||
print_submit_button (__('Create profile'), "crt", false, 'class="sub next"');
|
||||
echo '</form>';
|
||||
echo "</div>";
|
||||
echo '</form>';
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1424,6 +1424,17 @@ function get_db_all_rows_sql ($sql) {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Error handler function when an SQL error is triggered.
|
||||
*
|
||||
* @param $errno Level of the error raised (not used, but required by set_error_handler()).
|
||||
* @param $errstr Contains the error message.
|
||||
*/
|
||||
function sql_error_handler ($errno, $errstr) {
|
||||
echo "<strong>SQL error</strong>: ".$errstr."<br />\n";
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function comes back with an array in case of SELECT
|
||||
* in case of UPDATE, DELETE etc. with affected rows
|
||||
|
@ -1450,7 +1461,12 @@ function process_sql ($sql, $rettype = "affected_rows") {
|
|||
} else {
|
||||
$result = mysql_query ($sql);
|
||||
if ($result === false) {
|
||||
trigger_error (mysql_error ());
|
||||
$backtrace = debug_backtrace ();
|
||||
$error = sprintf ('%s (\'%s\') in <strong>%s</strong> on line %d',
|
||||
mysql_error (), $sql, $backtrace[0]['file'], $backtrace[0]['line']);
|
||||
set_error_handler ('sql_error_handler');
|
||||
trigger_error ($error);
|
||||
restore_error_handler ();
|
||||
return false;
|
||||
} elseif ($result === true) {
|
||||
if ($rettype == "insert_id") {
|
||||
|
|
|
@ -63,14 +63,14 @@ session_start();
|
|||
require_once ("include/config.php");
|
||||
require_once ("include/functions.php");
|
||||
require_once ("include/functions_db.php");
|
||||
//We should require this or you might end up with some empty strings
|
||||
load_extensions ($config['extensions']);
|
||||
|
||||
/* Enterprise support */
|
||||
if (file_exists ("enterprise/load_enterprise.php")) {
|
||||
include ("enterprise/load_enterprise.php");
|
||||
if (file_exists (ENTERPRISE_DIR."/load_enterprise.php")) {
|
||||
include (ENTERPRISE_DIR."/load_enterprise.php");
|
||||
}
|
||||
|
||||
load_extensions ($config['extensions']);
|
||||
|
||||
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>';
|
||||
|
||||
// Pure mode (without menu, header and footer).
|
||||
|
|
Loading…
Reference in New Issue