Changeset 259 for trunk/lib/App.inc.php
- Timestamp:
- Jun 19, 2007 4:04:42 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/App.inc.php
r249 r259 597 597 * @return The string representation of $priority. 598 598 */ 599 function logPriorityToString 599 function logPriorityToString($priority) { 600 600 $priorities = array( 601 601 LOG_EMERG => 'emergency', … … 621 621 * 622 622 * @access public 623 * @param string $query_key The keyof the query argument to save.623 * @param mixed $query_key The key (or keys, as an array) of the query argument to save. 624 624 * @param mixed $default If the key is not available, set to this default value. 625 625 * @author Quinn Comendant <quinn@strangecode.com> … … 628 628 function carryQuery($query_key, $default=false) 629 629 { 630 // If not already set, and there is a non-empty value provided in the request... 631 if (!isset($this->_carry_queries[$query_key]) && false !== getFormData($query_key, $default)) { 632 // Copy the value of the specified query argument into the _carry_queries array. 633 $this->_carry_queries[$query_key] = getFormData($query_key, $default); 630 if (!is_array($query_key)) { 631 $query_key = array($query_key); 632 } 633 foreach ($query_key as $k) { 634 // If not already set, and there is a non-empty value provided in the request... 635 if (!isset($this->_carry_queries[$k]) && false !== getFormData($k, $default)) { 636 // Copy the value of the specified query argument into the _carry_queries array. 637 $this->_carry_queries[$k] = getFormData($k, $default); 638 } 639 } 640 } 641 642 /** 643 * dropQuery() is the opposite of carryQuery(). The specified value will not appear in 644 * url()/ohref()/printHiddenSession() modified URLs unless explicitly written in. 645 * 646 * @access public 647 * @param mixed $query_key The key (or keys, as an array) of the query argument to remove. 648 * @author Quinn Comendant <quinn@strangecode.com> 649 * @since 18 Jun 2007 20:57:29 650 */ 651 function dropQuery($query_key, $default=false) 652 { 653 if (!is_array($query_key)) { 654 $query_key = array($query_key); 655 } 656 foreach ($query_key as $k) { 657 if (isset($this->_carry_queries[$query_key])) { 658 // Remove the value of the specified query argument from the _carry_queries array. 659 unset($this->_carry_queries[$query_key]); 660 } 634 661 } 635 662 }
Note: See TracChangeset
for help on using the changeset viewer.