Changeset 32 for trunk/lib/Auth_SQL.inc.php
- Timestamp:
- Dec 11, 2005 7:33:45 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Auth_SQL.inc.php
r31 r32 22 22 // Default param values. 23 23 var $_default_params = array( 24 25 // Message displayed by requireLogin(). 26 'login_required_message' => 'Please login', 24 27 25 28 // Automatically create table and verify columns. Better set to false after site launch. … … 537 540 * Redirect user to login page if they are not logged in. 538 541 * 539 * @param string $m sgThe text description of a message to raise.542 * @param string $message The text description of a message to raise. 540 543 * @param int $type The type of message: MSG_NOTICE, 541 544 * MSG_SUCCESS, MSG_WARNING, or MSG_ERR. … … 544 547 * @access public 545 548 */ 546 function requireLogin($m sg='', $type=MSG_NOTICE, $file=null, $line=null)549 function requireLogin($message='', $type=MSG_NOTICE, $file=null, $line=null) 547 550 { 548 551 if (!$this->isLoggedIn()) { 549 if ('' != $msg) {550 App::raiseMsg($msg, $type, $file, $line);551 } 552 // Display message for requiring login. 553 App::raiseMsg($message, $type, $file, $line); 554 552 555 // Login scripts must have the same 'login' tag for boomerangURL verification/manipulation. 553 556 App::setBoomerangURL(absoluteMe(), 'login'); … … 820 823 * @param constant $security_zone string of comma delimited priviliges for the zone 821 824 */ 822 function requireAccessClearance($security_zone, $m sg='')825 function requireAccessClearance($security_zone, $message='') 823 826 { 824 827 return true; … … 828 831 * user has no privilege, DIE with a message. */ 829 832 if (!in_array($this->getVal('priv'), $zone_members) || !$this->getVal('priv')) { 830 $m sg = empty($msg) ? _("You have insufficient privileges to view that page.") : $msg;831 App::raiseMsg($m sg, MSG_NOTICE, __FILE__, __LINE__);833 $message = empty($message) ? _("You have insufficient privileges to view that page.") : $message; 834 App::raiseMsg($message, MSG_NOTICE, __FILE__, __LINE__); 832 835 App::dieBoomerangURL(); 833 836 }
Note: See TracChangeset
for help on using the changeset viewer.