Changeset 123
- Timestamp:
- May 23, 2006 8:56:19 PM (18 years ago)
- Location:
- branches/2.0singleton/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0singleton/lib/App.inc.php
r119 r123 45 45 'site_url' => '', // URL automatically determined by _SERVER['HTTP_HOST'] if not set here. 46 46 47 // The location the user will go if the system doesn't kn ew where else to send them.47 // The location the user will go if the system doesn't know where else to send them. 48 48 'redirect_home_url' => '/', 49 49 -
branches/2.0singleton/lib/Utilities.inc.php
r111 r123 74 74 function oTxt($txt, $preserve_html=false) 75 75 { 76 $app =& App::getInstance(); 77 76 78 $search = array(); 77 79 $replace = array(); … … 100 102 $replace['ampersand'] = '&'; 101 103 102 return preg_replace($search, $replace, htmlentities($txt, ENT_QUOTES, App::getParam('character_set')));104 return preg_replace($search, $replace, htmlentities($txt, ENT_QUOTES, $app->getParam('character_set'))); 103 105 } 104 106 … … 596 598 function addSignature($val, $seed_key=null) 597 599 { 600 $app =& App::getInstance(); 601 598 602 if ('' == $val) { 599 App::logMsg(sprintf('Adding signature to empty string.', null), LOG_NOTICE, __FILE__, __LINE__);603 $app->logMsg(sprintf('Adding signature to empty string.', null), LOG_NOTICE, __FILE__, __LINE__); 600 604 } 601 605 602 606 if (!isset($seed_key)) { 603 $seed_key = App::getParam('signing_key');607 $seed_key = $app->getParam('signing_key'); 604 608 } 605 609 … … 662 666 function mailmanAddMember($email, $list, $send_welcome_message=false) 663 667 { 664 $add_members = '/var/mailman/bin/add_members'; 668 $app =& App::getInstance(); 669 670 $add_members = '/var/mailman/bin/add_members'; 665 671 if (is_executable($add_members) && is_readable($add_members)) { 666 672 $welcome_msg = $send_welcome_message ? 'y' : 'n'; 667 673 exec(sprintf('/bin/echo %s | /usr/bin/sudo %s -r - --welcome-msg=%s --admin-notify=n %s', escapeshellarg($email), escapeshellarg($add_members), $welcome_msg, escapeshellarg($list)), $stdout, $return_code); 668 674 if (0 == $return_code) { 669 App::logMsg(sprintf('Mailman add member success for list: %s, user: %s', $list, $email, $stdout), LOG_INFO, __FILE__, __LINE__);675 $app->logMsg(sprintf('Mailman add member success for list: %s, user: %s', $list, $email, $stdout), LOG_INFO, __FILE__, __LINE__); 670 676 return true; 671 677 } else { 672 App::logMsg(sprintf('Mailman add member failed for list: %s, user: %s, with message: %s', $list, $email, $stdout), LOG_WARNING, __FILE__, __LINE__);678 $app->logMsg(sprintf('Mailman add member failed for list: %s, user: %s, with message: %s', $list, $email, $stdout), LOG_WARNING, __FILE__, __LINE__); 673 679 return false; 674 680 } 675 681 } else { 676 App::logMsg(sprintf('Mailman add member program not executable: %s', $add_members), LOG_ALERT, __FILE__, __LINE__);682 $app->logMsg(sprintf('Mailman add member program not executable: %s', $add_members), LOG_ALERT, __FILE__, __LINE__); 677 683 return false; 678 684 } … … 691 697 function mailmanRemoveMember($email, $list, $send_user_ack=false) 692 698 { 699 $app =& App::getInstance(); 700 693 701 $remove_members = '/var/mailman/bin/remove_members'; 694 702 if (is_executable($remove_members) && is_readable($remove_members)) { … … 696 704 exec(sprintf('/usr/bin/sudo %s %s --noadminack %s %s', escapeshellarg($remove_members), $userack, escapeshellarg($list), escapeshellarg($email)), $stdout, $return_code); 697 705 if (0 == $return_code) { 698 App::logMsg(sprintf('Mailman remove member success for list: %s, user: %s', $list, $email, $stdout), LOG_INFO, __FILE__, __LINE__);706 $app->logMsg(sprintf('Mailman remove member success for list: %s, user: %s', $list, $email, $stdout), LOG_INFO, __FILE__, __LINE__); 699 707 return true; 700 708 } else { 701 App::logMsg(sprintf('Mailman remove member failed for list: %s, user: %s, with message: %s', $list, $email, $stdout), LOG_WARNING, __FILE__, __LINE__);709 $app->logMsg(sprintf('Mailman remove member failed for list: %s, user: %s, with message: %s', $list, $email, $stdout), LOG_WARNING, __FILE__, __LINE__); 702 710 return false; 703 711 } 704 712 } else { 705 App::logMsg(sprintf('Mailman remove member program not executable: %s', $remove_members), LOG_ALERT, __FILE__, __LINE__);713 $app->logMsg(sprintf('Mailman remove member program not executable: %s', $remove_members), LOG_ALERT, __FILE__, __LINE__); 706 714 return false; 707 715 }
Note: See TracChangeset
for help on using the changeset viewer.