Revision: 2508
https://sourceforge.net/p/mrbs/code/2508/
Author: cimorrison
Date: 2012-10-17 21:09:43 +0000 (Wed, 17 Oct 2012)
Log Message:
-----------
Merged in latest changes from the trunk
Modified Paths:
--------------
mrbs/branches/improved_repeat_interface/web/dbsys.inc
mrbs/branches/improved_repeat_interface/web/mysql.inc
mrbs/branches/improved_repeat_interface/web/mysqli.inc
mrbs/branches/improved_repeat_interface/web/pgsql.inc
mrbs/branches/improved_repeat_interface/web/upgrade.inc
Property Changed:
----------------
mrbs/branches/improved_repeat_interface/
Property changes on: mrbs/branches/improved_repeat_interface
___________________________________________________________________
Modified: svn:mergeinfo
- /mrbs/branches/custom_entry_fields:1374-1396
/mrbs/branches/datatables:1863-2063
/mrbs/branches/datepicker:1409-1416
/mrbs/branches/disabled_rooms:1601-1634
/mrbs/branches/draggable_bookings:2074-2141
/mrbs/branches/flexible_day_end:2402-2470
/mrbs/branches/from_to_bookings:1491-1587
/mrbs/branches/ics_attachments:1652-1741
/mrbs/branches/ics_import:2250-2262
/mrbs/branches/improve_css_2008_06:804-872
/mrbs/branches/only_unicode:1747-1749
/mrbs/branches/provisional_bookings:1242-1280
/mrbs/branches/provisional_bookings_new_style:1407-1570
/mrbs/trunk:2472-2481
+ /mrbs/branches/custom_entry_fields:1374-1396
/mrbs/branches/datatables:1863-2063
/mrbs/branches/datepicker:1409-1416
/mrbs/branches/disabled_rooms:1601-1634
/mrbs/branches/draggable_bookings:2074-2141
/mrbs/branches/flexible_day_end:2402-2470
/mrbs/branches/from_to_bookings:1491-1587
/mrbs/branches/ics_attachments:1652-1741
/mrbs/branches/ics_import:2250-2262
/mrbs/branches/improve_css_2008_06:804-872
/mrbs/branches/only_unicode:1747-1749
/mrbs/branches/provisional_bookings:1242-1280
/mrbs/branches/provisional_bookings_new_style:1407-1570
/mrbs/trunk:2472-2507
Modified: mrbs/branches/improved_repeat_interface/web/dbsys.inc
===================================================================
--- mrbs/branches/improved_repeat_interface/web/dbsys.inc 2012-10-17
21:04:25 UTC (rev 2507)
+++ mrbs/branches/improved_repeat_interface/web/dbsys.inc 2012-10-17
21:09:43 UTC (rev 2508)
@@ -155,7 +155,7 @@
}
-// Run a SQL query, returns a result object
+// Run a SQL query, returns a result object or FALSE on failure
function sql_query($sql)
{
if (func_num_args() > 1)
Modified: mrbs/branches/improved_repeat_interface/web/mysql.inc
===================================================================
--- mrbs/branches/improved_repeat_interface/web/mysql.inc 2012-10-17
21:04:25 UTC (rev 2507)
+++ mrbs/branches/improved_repeat_interface/web/mysql.inc 2012-10-17
21:09:43 UTC (rev 2508)
@@ -92,7 +92,7 @@
// Execute an SQL query. Returns a database-dependent result handle,
// which should be passed back to sql_row or sql_row_keyed to get the results.
-// Returns 0 on error; use sql_error to get the error message.
+// Returns FALSE on error; use sql_error to get the error message.
function sql_mysql_query ($sql, $db_conn = null)
{
sql_mysql_ensure_handle($db_conn);
Modified: mrbs/branches/improved_repeat_interface/web/mysqli.inc
===================================================================
--- mrbs/branches/improved_repeat_interface/web/mysqli.inc 2012-10-17
21:04:25 UTC (rev 2507)
+++ mrbs/branches/improved_repeat_interface/web/mysqli.inc 2012-10-17
21:09:43 UTC (rev 2508)
@@ -99,7 +99,7 @@
// Execute an SQL query. Returns a database-dependent result handle,
// which should be passed back to sql_row or sql_row_keyed to get the results.
-// Returns 0 on error; use sql_error to get the error message.
+// Returns FALSE on error; use sql_error to get the error message.
function sql_mysqli_query ($sql, $db_conn = null)
{
sql_mysqli_ensure_handle($db_conn);
Modified: mrbs/branches/improved_repeat_interface/web/pgsql.inc
===================================================================
--- mrbs/branches/improved_repeat_interface/web/pgsql.inc 2012-10-17
21:04:25 UTC (rev 2507)
+++ mrbs/branches/improved_repeat_interface/web/pgsql.inc 2012-10-17
21:09:43 UTC (rev 2508)
@@ -107,7 +107,7 @@
// Execute an SQL query. Returns a database-dependent result handle,
// which should be passed back to sql_row or sql_row_keyed to get the results.
-// Returns 0 on error; use sql_error to get the error message.
+// Returns FALSE on error; use sql_error to get the error message.
function sql_pgsql_query ($sql, $db_conn = null)
{
sql_pgsql_ensure_handle($db_conn);
Modified: mrbs/branches/improved_repeat_interface/web/upgrade.inc
===================================================================
--- mrbs/branches/improved_repeat_interface/web/upgrade.inc 2012-10-17
21:04:25 UTC (rev 2507)
+++ mrbs/branches/improved_repeat_interface/web/upgrade.inc 2012-10-17
21:09:43 UTC (rev 2508)
@@ -51,18 +51,18 @@
$sql = str_replace('%DB_TBL_PREFIX%', $db_tbl_prefix, $sql);
- foreach (explode(";", $sql) as $command)
+ foreach (explode(";", $sql) as $query)
{
- // Skip any empty command (so that last semi-colon doesn't run
- // an empty command)
- if (preg_match("/\S/", $command))
+ // Skip any empty query (so that last semi-colon doesn't run
+ // an empty query)
+ if (preg_match("/\S/", $query))
{
- $res = sql_command($command, $upgrade_handle);
- if ($res == -1)
+ $res = sql_query($query, $upgrade_handle);
+ if ($res === FALSE)
{
// No need to localise, should hopefully never happen
print "<br>Tried:<pre>
-".htmlspecialchars($command)."
+".htmlspecialchars($query)."
</pre> and got error:<pre>
".sql_error($upgrade_handle)."
</pre>\n";
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits