Ignore:
Timestamp:
May 24, 2015 3:01:42 PM (9 years ago)
Author:
anonymous
Message:

First set of changes towards 2.2.0. Improved functinoality with integration in wordpress; bugs fixed.

File:
1 edited

Legend:

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

    r502 r523  
    6767     * @static
    6868     */
    69     public static function &getInstance($auth_object)
     69    public static function &getInstance($auth_object=null)
    7070    {
    7171        if (self::$instance === null) {
     
    8181     * @param mixed  $auth_object  An Auth_SQL object.
    8282     */
    83     public function __construct($auth_object)
    84     {
    85         $app =& App::getInstance();
    86 
    87         if (!method_exists($auth_object, 'get') || !method_exists($auth_object, 'getUsername')) {
    88             trigger_error('Constructor not provided a valid Auth_* object.', E_USER_ERROR);
    89         }
    90 
    91         $this->_auth = $auth_object;
     83    public function __construct($auth_object=null)
     84    {
     85        $app =& App::getInstance();
     86
     87        if (!is_null($auth_object) || is_null($this->_auth)) {
     88            if (!method_exists($auth_object, 'get') || !method_exists($auth_object, 'getUsername')) {
     89                trigger_error('Constructor not provided a valid Auth_* object.', E_USER_ERROR);
     90            }
     91
     92            $this->_auth = $auth_object;
     93        }
    9294
    9395        // Get create tables config from global context.
Note: See TracChangeset for help on using the changeset viewer.