Thread: [Cs-project-svn_notify] SF.net SVN: cs-project: [623] trunk/lib/globalFunctions.php
Brought to you by:
crazedsanity
From: <cra...@us...> - 2007-11-15 16:07:22
|
Revision: 623 http://cs-project.svn.sourceforge.net/cs-project/?rev=623&view=rev Author: crazedsanity Date: 2007-11-15 08:07:13 -0800 (Thu, 15 Nov 2007) Log Message: ----------- Catch exceptions when sending emails. /lib/globalFunctions.php: * send_email(): -- put calls to send_single_email() into a try/catch block so exceptions will be caught (otherwise user would get the exception screen, and might re-submit until the email goes or they get bored... bad either way). * send_single_email(): -- logs errors or information about the message on success. Yay. -- NOTE: should probably add the email's subject line into the error message for max traceability... Modified Paths: -------------- trunk/lib/globalFunctions.php Modified: trunk/lib/globalFunctions.php =================================================================== --- trunk/lib/globalFunctions.php 2007-11-15 16:02:20 UTC (rev 622) +++ trunk/lib/globalFunctions.php 2007-11-15 16:07:13 UTC (rev 623) @@ -1492,11 +1492,21 @@ //if multiple recipients, must send multiple emails. if(is_array($toAddr)) { foreach($toAddr as $emailAddr) { - $retval = create_list($retval, send_single_email($emailAddr, $subject, $body)); + try { + $retval = create_list($retval, send_single_email($emailAddr, $subject, $body)); + } + catch(exception $e) { + $retval = create_list($retval, $emailAddr ." (failed: ". $e->getMessage() .")"); + } } } else { - $retval = send_single_email($toAddr, $subject, $body); + try { + $retval = send_single_email($toAddr, $subject, $body); + } + catch(exception $e) { + $retval = $toAddr ." (failed: ". $e->getMessage() .")"; + } } } else { @@ -1751,9 +1761,17 @@ $mail->Subject = $subject; $mail->Body = $bbCodeParser->parseString($body); $mail->WordWrap = 75; + + $logsObj = new logsClass($db, 'Email'); + if(!$mail->Send()) { - throw new exception(__FUNCTION__ .": Message could not be sent::: ". $mail->ErrorInfo); + $details = __FUNCTION__ .": Message to (". $toAddr .") could not be sent::: ". $mail->ErrorInfo; + $logsObj->log_by_class($details, 'error'); + throw new exception($details); } + else { + $logsObj->log_by_class('Successfully sent email to ('. $toAddr .'): '. $subject, 'information'); + } return($toAddr); }//end send_single_email() //============================================================================= This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2007-11-21 15:55:06
|
Revision: 648 http://cs-project.svn.sourceforge.net/cs-project/?rev=648&view=rev Author: crazedsanity Date: 2007-11-21 07:55:00 -0800 (Wed, 21 Nov 2007) Log Message: ----------- Fix array_as_option_list() to check the display value against checkedValue too. /lib/globalFunctions.php: * array_as_option_list(): -- check $display against $checkedValue (instead of just $value). Modified Paths: -------------- trunk/lib/globalFunctions.php Modified: trunk/lib/globalFunctions.php =================================================================== --- trunk/lib/globalFunctions.php 2007-11-20 19:55:31 UTC (rev 647) +++ trunk/lib/globalFunctions.php 2007-11-21 15:55:00 UTC (rev 648) @@ -2,11 +2,11 @@ /* * SVN INFORMATION::: * ------------------ - * SVN Signature::::::: $Id$ - * Last Author::::::::: $Author$ - * Current Revision:::: $Revision$ - * Repository Location: $HeadURL$ - * Last Updated:::::::: $Date$ + * SVN Signature::::::: $Id:globalFunctions.php 626 2007-11-20 16:54:11Z crazedsanity $ + * Last Author::::::::: $Author:crazedsanity $ + * Current Revision:::: $Revision:626 $ + * Repository Location: $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/lib/globalFunctions.php $ + * Last Updated:::::::: $Date:2007-11-20 10:54:11 -0600 (Tue, 20 Nov 2007) $ */ @@ -462,7 +462,7 @@ foreach($data as $value=>$display) { //see if it's the value that's been selected. $selectedString = ""; - if($value == $checkedValue) { + if($value == $checkedValue || $display == $checkedValue) { //yep, it's selected. $selectedString = " ". $myType; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2007-11-21 17:42:54
|
Revision: 659 http://cs-project.svn.sourceforge.net/cs-project/?rev=659&view=rev Author: crazedsanity Date: 2007-11-21 09:42:49 -0800 (Wed, 21 Nov 2007) Log Message: ----------- Updated to use cs-content v0.10.5 Modified Paths: -------------- trunk/lib/globalFunctions.php Modified: trunk/lib/globalFunctions.php =================================================================== --- trunk/lib/globalFunctions.php 2007-11-21 17:31:12 UTC (rev 658) +++ trunk/lib/globalFunctions.php 2007-11-21 17:42:49 UTC (rev 659) @@ -17,7 +17,7 @@ function get_required_external_lib_versions($projectName=NULL) { //format: {className} => array({projectName} => {exactVersion}) $requirements = array( - 'contentSystem' => array('cs-content', '0.10.4'), + 'contentSystem' => array('cs-content', '0.10.5'), 'XMLParser' => array('cs-phpxml', '0.5.5'), 'arrayToPath' => array('cs-arrayToPath', '0.2.2') ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2007-12-19 00:14:53
|
Revision: 707 http://cs-project.svn.sourceforge.net/cs-project/?rev=707&view=rev Author: crazedsanity Date: 2007-12-18 16:14:45 -0800 (Tue, 18 Dec 2007) Log Message: ----------- Update to new version of cs-content. Modified Paths: -------------- trunk/lib/globalFunctions.php Modified: trunk/lib/globalFunctions.php =================================================================== --- trunk/lib/globalFunctions.php 2007-12-19 00:01:38 UTC (rev 706) +++ trunk/lib/globalFunctions.php 2007-12-19 00:14:45 UTC (rev 707) @@ -17,7 +17,7 @@ function get_required_external_lib_versions($projectName=NULL) { //format: {className} => array({projectName} => {exactVersion}) $requirements = array( - 'contentSystem' => array('cs-content', '0.10.5'), + 'contentSystem' => array('cs-content', '0.10.6'), 'XMLParser' => array('cs-phpxml', '0.5.5'), 'arrayToPath' => array('cs-arrayToPath', '0.2.2') ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2007-12-27 21:49:24
|
Revision: 724 http://cs-project.svn.sourceforge.net/cs-project/?rev=724&view=rev Author: crazedsanity Date: 2007-12-27 13:49:20 -0800 (Thu, 27 Dec 2007) Log Message: ----------- Stop trying to invalidly log missing template files... /lib/globalFunctions.php: * html_file_to_string(): -- don't make invalid database connection (didn't log anyway). Modified Paths: -------------- trunk/lib/globalFunctions.php Modified: trunk/lib/globalFunctions.php =================================================================== --- trunk/lib/globalFunctions.php 2007-12-27 21:16:19 UTC (rev 723) +++ trunk/lib/globalFunctions.php 2007-12-27 21:49:20 UTC (rev 724) @@ -102,6 +102,7 @@ return $htmlString; } else { + cs_debug_backtrace(1); //Could not find the file requested to stringify. //Sending warning to user and logging it. @@ -110,14 +111,7 @@ "Could not find all files necessary to create this page.<br>Please call technical support.<BR>\nfile=[". $file ."]", "","status" ); - - //Connect to db to log - $logDb = new phpDB; - $logDb->connect("pl"); - - $details = $filename ." -- ". page_get_env(); - #log_activity($logDb,125,$_SESSION['uid'],"$details"); - return " "; + return(NULL); } }//end html_file_to_string() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-01-31 21:49:46
|
Revision: 765 http://cs-project.svn.sourceforge.net/cs-project/?rev=765&view=rev Author: crazedsanity Date: 2008-01-31 13:49:44 -0800 (Thu, 31 Jan 2008) Log Message: ----------- Update to cs-content v0.10.8 Modified Paths: -------------- trunk/lib/globalFunctions.php Modified: trunk/lib/globalFunctions.php =================================================================== --- trunk/lib/globalFunctions.php 2008-01-31 21:36:37 UTC (rev 764) +++ trunk/lib/globalFunctions.php 2008-01-31 21:49:44 UTC (rev 765) @@ -17,7 +17,7 @@ function get_required_external_lib_versions($projectName=NULL) { //format: {className} => array({projectName} => {exactVersion}) $requirements = array( - 'contentSystem' => array('cs-content', '0.10.7'), + 'contentSystem' => array('cs-content', '0.10.8'), 'XMLParser' => array('cs-phpxml', '0.5.5'), 'arrayToPath' => array('cs-arrayToPath', '0.2.2') ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |