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


Ignore:
Timestamp:
Apr 19, 2006 3:14:28 AM (18 years ago)
Author:
scdev
Message:

Q - Cleaned up Auth_File to work more like Auth_SQL, and fixed a few bugs here and there.

File:
1 edited

Legend:

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

    r102 r103  
    222222         */
    223223
    224         if ($this->getParam('enable_db')) {
     224        if (true === $this->getParam('enable_db')) {
    225225
    226226            // DB connection parameters taken from environment variables in the httpd.conf file, readable only by root.
     
    337337    {
    338338        session_write_close();
    339         $this->db->close();
    340339        restore_include_path();
    341340        $this->running = false;
     341        if (true === $this->getParam('enable_db')) {
     342            $this->db->close();
     343        }
    342344    }
    343345
     
    364366
    365367        if (!$this->running || '' == $message) {
     368            $this->logMsg(sprintf('Canceled method call %s, application not running or message is an empty string.', __FUNCTION__), LOG_DEBUG, __FILE__, __LINE__);
    366369            return false;
    367370        }
     
    397400
    398401        if (!$this->running) {
     402            $this->logMsg(sprintf('Canceled method call %s, application not running.', __FUNCTION__), LOG_DEBUG, __FILE__, __LINE__);
    399403            return false;
    400404        }
     
    421425
    422426        if (!$this->running) {
     427            $this->logMsg(sprintf('Canceled method call %s, application not running.', __FUNCTION__), LOG_DEBUG, __FILE__, __LINE__);
    423428            return false;
    424429        }
     
    441446
    442447        if (!$this->running) {
     448            $this->logMsg(sprintf('Canceled method call %s, application not running.', __FUNCTION__), LOG_DEBUG, __FILE__, __LINE__);
    443449            return false;
    444450        }
     
    650656
    651657        if (!$this->running) {
     658            $this->logMsg(sprintf('Canceled method call %s, application not running.', __FUNCTION__), LOG_DEBUG, __FILE__, __LINE__);
    652659            return false;
    653660        }
     
    769776
    770777        if (!$this->running) {
     778            $this->logMsg(sprintf('Canceled method call %s, application not running.', __FUNCTION__), LOG_DEBUG, __FILE__, __LINE__);
    771779            return false;
    772780        }
     
    831839
    832840        if (!$this->running) {
     841            $this->logMsg(sprintf('Canceled method call %s, application not running.', __FUNCTION__), LOG_DEBUG, __FILE__, __LINE__);
    833842            return false;
    834843        }
     
    879888
    880889        if (!$this->running) {
     890            $this->logMsg(sprintf('Canceled method call %s, application not running.', __FUNCTION__), LOG_DEBUG, __FILE__, __LINE__);
    881891            return false;
    882892        }
     
    925935
    926936        if (!$this->running) {
     937            $this->logMsg(sprintf('Canceled method call %s, application not running.', __FUNCTION__), LOG_DEBUG, __FILE__, __LINE__);
    927938            return false;
    928939        }
     
    966977
    967978        if (!$this->running) {
     979            $this->logMsg(sprintf('Canceled method call %s, application not running.', __FUNCTION__), LOG_DEBUG, __FILE__, __LINE__);
    968980            return false;
    969981        }
     
    9941006
    9951007        if (!$this->running) {
     1008            $this->logMsg(sprintf('Canceled method call %s, application not running.', __FUNCTION__), LOG_DEBUG, __FILE__, __LINE__);
    9961009            return false;
    9971010        }
     
    10071020
    10081021    /**
    1009      * Check if a valid boomerang URL value has been set.
    1010      * if it is not the current url, and has not been accessed within n seconds.
    1011      *
    1012      * @return bool  True if it is set and not the current URL.
     1022     * Check if a valid boomerang URL value has been set. A boomerang URL is considered
     1023     * valid if: 1) it is not empty, 2) it is not the current URL, and 3) has not been accessed within n seconds.
     1024     *
     1025     * @return bool  True if it is set and valid, false otherwise.
    10131026     */
    10141027    function validBoomerangURL($id=null, $use_nonspecificboomerang=false)
     
    10191032
    10201033        if (!$this->running) {
     1034            $this->logMsg(sprintf('Canceled method call %s, application not running.', __FUNCTION__), LOG_DEBUG, __FILE__, __LINE__);
    10211035            return false;
    10221036        }
    10231037
    10241038        if (!isset($_SESSION[$this->app]['boomerang']['url'])) {
     1039            $this->logMsg(sprintf('validBoomerangURL(%s) no boomerang URL set.', $id, $url), LOG_DEBUG, __FILE__, __LINE__);
    10251040            return false;
    10261041        }
Note: See TracChangeset for help on using the changeset viewer.