Changeset 53 for trunk/lib/App.inc.php
- Timestamp:
- Jan 26, 2006 8:19:32 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/App.inc.php
r52 r53 162 162 function setParam($param=null) 163 163 { 164 if (!isset($this) || !is_a($this, 'App') ) {164 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 165 165 $this =& App::getInstance(); 166 166 } … … 181 181 function &getParam($param=null) 182 182 { 183 if (!isset($this) || !is_a($this, 'App') ) {183 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 184 184 $this =& App::getInstance(); 185 185 } … … 356 356 function raiseMsg($message, $type=MSG_NOTICE, $file=null, $line=null) 357 357 { 358 if (!isset($this) || !is_a($this, 'App') ) {358 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 359 359 $this =& App::getInstance(); 360 360 } … … 391 391 function getRaisedMessages() 392 392 { 393 if (!isset($this) || !is_a($this, 'App') ) {393 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 394 394 $this =& App::getInstance(); 395 395 } … … 415 415 function clearRaisedMessages() 416 416 { 417 if (!isset($this) || !is_a($this, 'App') ) {417 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 418 418 $this =& App::getInstance(); 419 419 } … … 435 435 function printRaisedMessages() 436 436 { 437 if (!isset($this) || !is_a($this, 'App') ) {437 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 438 438 $this =& App::getInstance(); 439 439 } … … 493 493 static $previous_events = array(); 494 494 495 if (!isset($this) || !is_a($this, 'App') ) {495 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 496 496 $this =& App::getInstance(); 497 497 } … … 537 537 'type' => $this->logPriorityToString($priority), 538 538 'file:line' => "$file : $line", 539 'url' => (isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : ''), 539 540 'message' => $message 540 541 ); … … 611 612 function carryQuery($query_key) 612 613 { 613 if (!isset($this) || !is_a($this, 'App') ) {614 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 614 615 $this =& App::getInstance(); 615 616 } … … 643 644 function url($url, $carry_args=null, $always_include_sid=false) 644 645 { 645 if (!isset($this) || !is_a($this, 'App') ) {646 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 646 647 $this =& App::getInstance(); 647 648 } … … 738 739 function oHREF($url, $carry_args=null, $always_include_sid=false) 739 740 { 740 if (!isset($this) || !is_a($this, 'App') ) {741 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 741 742 $this =& App::getInstance(); 742 743 } … … 762 763 function printHiddenSession($carry_args=null) 763 764 { 764 if (!isset($this) || !is_a($this, 'App') ) {765 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 765 766 $this =& App::getInstance(); 766 767 } … … 824 825 function dieURL($url, $carry_args=null, $always_include_sid=false) 825 826 { 826 if (!isset($this) || !is_a($this, 'App') ) {827 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 827 828 $this =& App::getInstance(); 828 829 } … … 863 864 function dieBoomerangURL($id=null, $carry_args=null) 864 865 { 865 if (!isset($this) || !is_a($this, 'App') ) {866 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 866 867 $this =& App::getInstance(); 867 868 } … … 908 909 function setBoomerangURL($url=null, $id=null) 909 910 { 910 if (!isset($this) || !is_a($this, 'App') ) {911 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 911 912 $this =& App::getInstance(); 912 913 } … … 949 950 function getBoomerangURL($id=null) 950 951 { 951 if (!isset($this) || !is_a($this, 'App') ) {952 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 952 953 $this =& App::getInstance(); 953 954 } … … 977 978 function deleteBoomerangURL($id=null) 978 979 { 979 if (!isset($this) || !is_a($this, 'App') ) {980 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 980 981 $this =& App::getInstance(); 981 982 } … … 1002 1003 function validBoomerangURL($id=null, $use_nonspecificboomerang=false) 1003 1004 { 1004 if (!isset($this) || !is_a($this, 'App') ) {1005 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 1005 1006 $this =& App::getInstance(); 1006 1007 } … … 1030 1031 1031 1032 if ('' == $url) { 1032 $this->logMsg(sprintf('validBoomerangURL(%s) not valid, empty!', $id), LOG_ NOTICE, __FILE__, __LINE__);1033 $this->logMsg(sprintf('validBoomerangURL(%s) not valid, empty!', $id), LOG_DEBUG, __FILE__, __LINE__); 1033 1034 return false; 1034 1035 } 1035 1036 if ($url == absoluteMe()) { 1036 1037 // The URL we are directing to is the current page. 1037 $this->logMsg(sprintf('validBoomerangURL(%s) not valid, same as absoluteMe: %s', $id, $url), LOG_ NOTICE, __FILE__, __LINE__);1038 $this->logMsg(sprintf('validBoomerangURL(%s) not valid, same as absoluteMe: %s', $id, $url), LOG_DEBUG, __FILE__, __LINE__); 1038 1039 return false; 1039 1040 } 1040 1041 if ($boomerang_time >= (time() - 2)) { 1041 1042 // Last boomerang direction was more than 2 seconds ago. 1042 $this->logMsg(sprintf('validBoomerangURL(%s) not valid, boomerang_time too short: %s', $id, time() - $boomerang_time), LOG_ NOTICE, __FILE__, __LINE__);1043 $this->logMsg(sprintf('validBoomerangURL(%s) not valid, boomerang_time too short: %s', $id, time() - $boomerang_time), LOG_DEBUG, __FILE__, __LINE__); 1043 1044 return false; 1044 1045 } … … 1054 1055 function sslOn() 1055 1056 { 1056 if (!isset($this) || !is_a($this, 'App') ) {1057 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { 1057 1058 $this =& App::getInstance(); 1058 1059 } … … 1065 1066 } 1066 1067 1067 if (' on' != getenv('HTTPS') && $this->getParam('ssl_enabled') && in_array('mod_ssl', $modules)) {1068 if ('' == getenv('HTTPS') && $this->getParam('ssl_enabled') && in_array('mod_ssl', $modules)) { 1068 1069 $this->raiseMsg(sprintf(_("Secure SSL connection made to %s"), $this->getParam('ssl_domain')), MSG_NOTICE, __FILE__, __LINE__); 1069 1070 // Always append session because some browsers do not send cookie when crossing to SSL URL. … … 1079 1080 function sslOff() 1080 1081 { 1081 if (' on' == getenv('HTTPS')) {1082 if ('' != getenv('HTTPS')) { 1082 1083 $this->dieURL('http://' . getenv('HTTP_HOST') . getenv('REQUEST_URI'), null, true); 1083 1084 }
Note: See TracChangeset
for help on using the changeset viewer.