From: <lin...@us...> - 2010-05-08 11:29:31
|
Revision: 3457 http://web-erp.svn.sourceforge.net/web-erp/?rev=3457&view=rev Author: lindsayh Date: 2010-05-08 11:29:25 +0000 (Sat, 08 May 2010) Log Message: ----------- Restore API using Login() method to working order. The change to ConnectDB_mysql*.inc used the global variable $DatabaseName as the name of the database to allow running recuring sales orders from cron et al. Our database code organisation needs to be cleaned up somewhat. Modified Paths: -------------- trunk/api/api_php.php trunk/doc/Change.log.html Modified: trunk/api/api_php.php =================================================================== --- trunk/api/api_php.php 2010-05-08 08:39:26 UTC (rev 3456) +++ trunk/api/api_php.php 2010-05-08 11:29:25 UTC (rev 3457) @@ -3,7 +3,7 @@ /* Include session.inc, to allow database connection, and access to miscfunctions, and datefunctions.*/ // FOLLOWING ONLY REQUIRED TO SUPPORT PER FUNCTION AUTHENTICATION - $DatabaseName='weberpdemo'; + $api_DatabaseName='weberpdemo'; // END OF OLD STYLE AUTHENTICATION $AllowAnyone = true; @@ -21,8 +21,8 @@ $_SESSION['AccessLevel'] == '') { // Login to default database = old clients. if ($user != '' && $password != '') { - global $DatabaseName; - $rc = LoginAPI ($DatabaseName, $user, $password); + global $api_DatabaseName; + $rc = LoginAPI ($api_DatabaseName, $user, $password); if ($rc[0] == UL_OK ) { return $_SESSION['db']; } Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-05-08 08:39:26 UTC (rev 3456) +++ trunk/doc/Change.log.html 2010-05-08 11:29:25 UTC (rev 3457) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>08/05/10 Lindsay: API was broken after adding a test for global variable $DatabaseName in ConnectDB_mysql* for this variable being set and using it as DB name if so. The variable of that name in the api_php.php has been changed to $api_DatabaseName.</p> <p>08/05/10 Phil: GetPrices.inc now uses the new price startdate and enddate to return the price which falls within the date range base on the current date. Changes to Prices.php and Prices_Customer.php to allow entry of effective from and effective to dates and updating/deleting of prices with appropriate error trapping and rescheduling of enddates where start and end dates would otherwise overlap.</p> <p>08/05/10 Phil: Found a bug in Date1GreaterThanDate2 function (in includes/DateFunction.inc) with SESSION['DefaultDateFormat'] = 'd/m/Y' this function had been broken </p> <p>06/05/10 Lindsay: Tracker 2929564: dates mangled via QuicK Entry format</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |