Project

General

Profile

Revision 2134

Added by Manuela almost 7 years ago

  1. class msgQueue: logic error fixed in constructor
    ! class msgQueue: now trigger error when deprecated methods are called

View differences:

branches/2.8.x/CHANGELOG
10 10
# = Bugfix
11 11
! = Update/Change
12 12
===============================================================================
13
01 Sep -2015 Build 2134 Manuela v.d.Decken(DarkViper)
14
# class msgQueue: logic error fixed in constructor
15
! class msgQueue: now trigger error when deprecated methods are called
13 16
01 Sep -2015 Build 2133 Manuela v.d.Decken(DarkViper)
14 17
+ new error_handler added
15 18
+ var/log/error.log added
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.4');
54
if(!defined('REVISION')) define('REVISION', '2133');
54
if(!defined('REVISION')) define('REVISION', '2134');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/framework/msgQueue.php
53 53
 * constructor
54 54
 */
55 55
    protected function __construct() {
56
        self::clear();
56
        $this->aLogs = array(
57
            self::ERROR   => array(),
58
            self::SUCCESS => array(),
59
            self::WARN    => array(),
60
            self::LOG     => array()
61
        );
57 62
    }
58 63
/** disable cloning */
59 64
    private function __clone() { }
......
81 86
        self::getInstance()->aLogs[$iStatus][]  = $sMessage;
82 87
    }
83 88
/**
84
 *
85
 * @param int $iStatus
89
 * clear error lists
90
 * @param int $iStatus defiones which list should be cleared (one or all)
91
 * @return void
86 92
 */
87 93
    public static function clear($iStatus = self::ALL)
88 94
    {
......
114 120
    }
115 121
/**
116 122
 * returns selected kind of messages
117
 * @param type $iStatus  which messages
118
 * @param type $iRetvalType  return as string or array(default)
123
 * @param integer $iStatus  which messages
124
 * @param integer $iRetvalType  return as string or array(default)
119 125
 * @return mixed  string|array
126
 * @description  msgQueue::SHOW_ALL returns a multidimensional array as  $x[Type][Messages]
127
 *                all others return a string of messages concated by \n
120 128
 */
121
    public static function getMessages($iStatus = self::ERROR, $iRetvalType = self::RETVAL_Array)
129
    public static function getMessages($iStatus = self::ERROR, $iRetvalType = self::RETVAL_ARRAY)
122 130
    {
123 131
        $aRetval = array();
124 132
        if ($iStatus == self::SHOW_ALL) {
......
140 148
 */
141 149
    public static function getError($iType = self::RETVAL_STRING)
142 150
    {
151
        trigger_error('Deprecated function call: '.__CLASS__.'::'.__METHOD__, E_USER_DEPRECATED);
143 152
        return self::getMessages(self::ERROR, $iType);
144 153
    }
145 154
/**
......
150 159
 */
151 160
    public static function getSuccess($iType = self::RETVAL_STRING)
152 161
    {
162
        trigger_error('Deprecated function call: '.__CLASS__.'::'.__METHOD__, E_USER_DEPRECATED);
153 163
        return self::getMessages(self::OK, $iType);
164
}
165
/**
166
 *
167
 * @return array
168
 * @deprecated set deprecated since 2.8.4 and removed in next version
169
 */
170
    public static function getLoglist()
171
    {
172
        trigger_error('Deprecated function call: '.__CLASS__.'::'.__METHOD__, E_USER_DEPRECATED);
173
        return self::getMessages(self::LOG, self::RETVAL_ARRAY);
154 174
    }
155 175

  
156 176
} // end of class msgQueue

Also available in: Unified diff