Changeset 170


Ignore:
Timestamp:
Jun 14, 2006 5:30:59 AM (18 years ago)
Author:
scdev
Message:

Q - added default value to App::carryQuery()

File:
1 edited

Legend:

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

    r167 r170  
    589589     * @access  public
    590590     * @param   string  $query_key  The key of the query argument to save.
     591     * @param   mixed   $default    If the key is not available, set to this default value.
    591592     * @author  Quinn Comendant <quinn@strangecode.com>
    592593     * @since   14 Nov 2005 19:24:52
    593594     */
    594     function carryQuery($query_key)
     595    function carryQuery($query_key, $default=false)
    595596    {
    596597        // If not already set, and there is a non-empty value provided in the request...
    597         if (!isset($this->_carry_queries[$query_key]) && getFormData($query_key, false)) {
     598        if (!isset($this->_carry_queries[$query_key]) && false !== getFormData($query_key, $default)) {
    598599            // Copy the value of the specified query argument into the _carry_queries array.
    599             $this->_carry_queries[$query_key] = getFormData($query_key);
     600            $this->_carry_queries[$query_key] = getFormData($query_key, $default);
    600601        }
    601602    }
Note: See TracChangeset for help on using the changeset viewer.