Ignore:
Timestamp:
Dec 11, 2005 7:33:45 PM (18 years ago)
Author:
scdev
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Auth_SQL.inc.php

    r31 r32  
    2222    // Default param values.
    2323    var $_default_params = array(
     24   
     25        // Message displayed by requireLogin().
     26        'login_required_message' => 'Please login',
    2427       
    2528        // Automatically create table and verify columns. Better set to false after site launch.
     
    537540     * Redirect user to login page if they are not logged in.
    538541     *
    539      * @param string $msg    The text description of a message to raise.
     542     * @param string $message The text description of a message to raise.
    540543     * @param int    $type    The type of message: MSG_NOTICE,
    541544     *                        MSG_SUCCESS, MSG_WARNING, or MSG_ERR.
     
    544547     * @access public
    545548     */
    546     function requireLogin($msg='', $type=MSG_NOTICE, $file=null, $line=null)
     549    function requireLogin($message='', $type=MSG_NOTICE, $file=null, $line=null)
    547550    {
    548551        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
    552555            // Login scripts must have the same 'login' tag for boomerangURL verification/manipulation.
    553556            App::setBoomerangURL(absoluteMe(), 'login');
     
    820823     * @param  constant $security_zone   string of comma delimited priviliges for the zone
    821824     */
    822     function requireAccessClearance($security_zone, $msg='')
     825    function requireAccessClearance($security_zone, $message='')
    823826    {
    824827        return true;
     
    828831         * user has no privilege, DIE with a message. */
    829832        if (!in_array($this->getVal('priv'), $zone_members) || !$this->getVal('priv')) {
    830             $msg = empty($msg) ? _("You have insufficient privileges to view that page.") : $msg;
    831             App::raiseMsg($msg, 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__);
    832835            App::dieBoomerangURL();
    833836        }
Note: See TracChangeset for help on using the changeset viewer.