Changeset 84 for trunk/lib/App.inc.php


Ignore:
Timestamp:
Apr 8, 2006 3:15:27 AM (18 years ago)
Author:
scdev
Message:

minor improvements

File:
1 edited

Legend:

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

    r83 r84  
    343343
    344344    /**
    345      * Add a message to the string globalmessage, which is printed in the header.
     345     * Add a message to the session, which is printed in the header.
    346346     * Just a simple way to print messages to the user.
    347347     *
     
    856856    }
    857857
    858     /**
    859      * Redirects a user by calling the App::dieURL(). It will use:
    860      * 1. the stored boomerang URL, it it exists
    861      * 2. the referring URL, it it exists.
    862      * 3. an empty string, which will force App::dieURL to use the default URL.
    863      */
    864     function dieBoomerangURL($id=null, $carry_args=null)
     858    /*
     859    * Redirects a user by calling App::dieURL(). It will use:
     860    * 1. the stored boomerang URL, it it exists
     861    * 2. a specified $default_url, it it exists
     862    * 3. the referring URL, it it exists.
     863    * 4. redirect_home_url configuration variable.
     864    *
     865    * @access   public
     866    * @param    string  $id             Identifier for this script.
     867    * @param    mixed   $carry_args     Additional arguments to carry in the URL automatically (see App::oHREF()).
     868    * @param    string  $default_url    A default URL if there is not a valid specified boomerang URL.
     869    * @return   bool                    False if the session is not running. No return otherwise.
     870    * @author   Quinn Comendant <quinn@strangecode.com>
     871    * @since    31 Mar 2006 19:17:00
     872    */
     873    function dieBoomerangURL($id=null, $carry_args=null, $default_url=null)
    865874    {
    866875        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
     
    883892            // Delete stored boomerang.
    884893            $this->deleteBoomerangURL($id);
     894        } else if (isset($default_url)) {
     895            $url = $default_url;
     896        }
    885897        } else if (!refererIsMe()) {
    886898            // Ensure that the redirecting page is not also the referrer.
     
    893905        }
    894906
    895 
    896         // A redirection will never happen immediatly twice.
     907        // A redirection will never happen immediately twice.
    897908        // Set the time so ensure this doesn't happen.
    898909        $_SESSION[$this->app]['boomerang']['time'] = time();
     
    916927            return false;
    917928        }
    918         // A redirection will never happen immediatly after setting the boomerangURL.
     929        // A redirection will never happen immediately after setting the boomerangURL.
    919930        // Set the time so ensure this doesn't happen. See App::validBoomerangURL for more.
    920931
Note: See TracChangeset for help on using the changeset viewer.