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


Ignore:
Timestamp:
Jan 26, 2006 8:19:32 PM (18 years ago)
Author:
scdev
Message:

${1}

File:
1 edited

Legend:

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

    r52 r53  
    162162    function setParam($param=null)
    163163    {
    164         if (!isset($this) || !is_a($this, 'App')) {
     164        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    165165            $this =& App::getInstance();
    166166        }
     
    181181    function &getParam($param=null)
    182182    {
    183         if (!isset($this) || !is_a($this, 'App')) {
     183        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    184184            $this =& App::getInstance();
    185185        }
     
    356356    function raiseMsg($message, $type=MSG_NOTICE, $file=null, $line=null)
    357357    {
    358         if (!isset($this) || !is_a($this, 'App')) {
     358        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    359359            $this =& App::getInstance();
    360360        }
     
    391391    function getRaisedMessages()
    392392    {
    393         if (!isset($this) || !is_a($this, 'App')) {
     393        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    394394            $this =& App::getInstance();
    395395        }
     
    415415    function clearRaisedMessages()
    416416    {
    417         if (!isset($this) || !is_a($this, 'App')) {
     417        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    418418            $this =& App::getInstance();
    419419        }
     
    435435    function printRaisedMessages()
    436436    {
    437         if (!isset($this) || !is_a($this, 'App')) {
     437        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    438438            $this =& App::getInstance();
    439439        }
     
    493493        static $previous_events = array();
    494494
    495         if (!isset($this) || !is_a($this, 'App')) {
     495        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    496496            $this =& App::getInstance();
    497497        }
     
    537537            'type'      => $this->logPriorityToString($priority),
    538538            'file:line' => "$file : $line",
     539            'url'       => (isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : ''),
    539540            'message'   => $message
    540541        );
     
    611612    function carryQuery($query_key)
    612613    {
    613         if (!isset($this) || !is_a($this, 'App')) {
     614        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    614615            $this =& App::getInstance();
    615616        }
     
    643644    function url($url, $carry_args=null, $always_include_sid=false)
    644645    {
    645         if (!isset($this) || !is_a($this, 'App')) {
     646        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    646647            $this =& App::getInstance();
    647648        }
     
    738739    function oHREF($url, $carry_args=null, $always_include_sid=false)
    739740    {
    740         if (!isset($this) || !is_a($this, 'App')) {
     741        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    741742            $this =& App::getInstance();
    742743        }
     
    762763    function printHiddenSession($carry_args=null)
    763764    {
    764         if (!isset($this) || !is_a($this, 'App')) {
     765        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    765766            $this =& App::getInstance();
    766767        }
     
    824825    function dieURL($url, $carry_args=null, $always_include_sid=false)
    825826    {
    826         if (!isset($this) || !is_a($this, 'App')) {
     827        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    827828            $this =& App::getInstance();
    828829        }
     
    863864    function dieBoomerangURL($id=null, $carry_args=null)
    864865    {
    865         if (!isset($this) || !is_a($this, 'App')) {
     866        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    866867            $this =& App::getInstance();
    867868        }
     
    908909    function setBoomerangURL($url=null, $id=null)
    909910    {
    910         if (!isset($this) || !is_a($this, 'App')) {
     911        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    911912            $this =& App::getInstance();
    912913        }
     
    949950    function getBoomerangURL($id=null)
    950951    {
    951         if (!isset($this) || !is_a($this, 'App')) {
     952        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    952953            $this =& App::getInstance();
    953954        }
     
    977978    function deleteBoomerangURL($id=null)
    978979    {
    979         if (!isset($this) || !is_a($this, 'App')) {
     980        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    980981            $this =& App::getInstance();
    981982        }
     
    10021003    function validBoomerangURL($id=null, $use_nonspecificboomerang=false)
    10031004    {
    1004         if (!isset($this) || !is_a($this, 'App')) {
     1005        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    10051006            $this =& App::getInstance();
    10061007        }
     
    10301031
    10311032        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__);
    10331034            return false;
    10341035        }
    10351036        if ($url == absoluteMe()) {
    10361037            // 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__);
    10381039            return false;
    10391040        }
    10401041        if ($boomerang_time >= (time() - 2)) {
    10411042            // 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__);
    10431044            return false;
    10441045        }
     
    10541055    function sslOn()
    10551056    {
    1056         if (!isset($this) || !is_a($this, 'App')) {
     1057        if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) {
    10571058            $this =& App::getInstance();
    10581059        }
     
    10651066        }
    10661067
    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)) {
    10681069            $this->raiseMsg(sprintf(_("Secure SSL connection made to %s"), $this->getParam('ssl_domain')), MSG_NOTICE, __FILE__, __LINE__);
    10691070            // Always append session because some browsers do not send cookie when crossing to SSL URL.
     
    10791080    function sslOff()
    10801081    {
    1081         if ('on' == getenv('HTTPS')) {
     1082        if ('' != getenv('HTTPS')) {
    10821083            $this->dieURL('http://' . getenv('HTTP_HOST') . getenv('REQUEST_URI'), null, true);
    10831084        }
Note: See TracChangeset for help on using the changeset viewer.