Skip to content
This repository

Remove deprecated methods in JLog + additional fixes #1183

Merged
merged 8 commits into from almost 2 years ago

2 participants

Rouven Weßling Andrew Eddie
Rouven Weßling
Collaborator

Most significant changes:
-oldstatic is reintroduced as a module cache option
-the support for legacy paths for plugins is removed

Andrew Eddie eddieajau merged commit 4c63e45 into from May 07, 2012
Andrew Eddie eddieajau closed this May 07, 2012
Andrew Eddie
Owner

Merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.

Showing 28 changed files with 79 additions and 319 deletions. Show diff stats Hide diff stats

  1. 9  libraries/joomla/database/database.php
  2. 3  libraries/joomla/database/database/mysql.php
  3. 3  libraries/joomla/database/database/mysqlexporter.php
  4. 3  libraries/joomla/database/database/mysqli.php
  5. 3  libraries/joomla/database/database/mysqliexporter.php
  6. 3  libraries/joomla/database/database/mysqliimporter.php
  7. 3  libraries/joomla/database/database/mysqlimporter.php
  8. 3  libraries/joomla/database/database/mysqliquery.php
  9. 3  libraries/joomla/database/database/mysqlquery.php
  10. 3  libraries/joomla/database/database/sqlazure.php
  11. 3  libraries/joomla/database/database/sqlazurequery.php
  12. 3  libraries/joomla/database/database/sqlsrv.php
  13. 3  libraries/joomla/database/database/sqlsrvquery.php
  14. 1  libraries/joomla/html/html/select.php
  15. 118  libraries/joomla/log/log.php
  16. 8  libraries/joomla/plugin/helper.php
  17. 1  libraries/joomla/user/user.php
  18. 4  libraries/joomla/utilities/xmlelement.php
  19. 7  libraries/legacy/base/node.php
  20. 4  libraries/legacy/base/tree.php
  21. 45  libraries/legacy/controller/controller.php
  22. 3  libraries/legacy/database/exception.php
  23. 39  libraries/legacy/error/error.php
  24. 14  libraries/legacy/exception/exception.php
  25. 4  libraries/legacy/log/logexception.php
  26. 12  libraries/legacy/module/helper.php
  27. 5  libraries/legacy/simplecrypt/simplecrypt.php
  28. 88  tests/suites/unit/joomla/log/JLogTest.php
9  libraries/joomla/database/database.php
@@ -29,7 +29,7 @@
29 29
 	 */
30 30
 	public function query()
31 31
 	{
32  
-		JLog::add('JDatabase::query() is deprecated, use JDatabaseDriver::execute() instead.', JLog::NOTICE, 'deprecated');
  32
+		JLog::add('JDatabase::query() is deprecated, use JDatabaseDriver::execute() instead.', JLog::WARNING, 'deprecated');
33 33
 
34 34
 		return $this->execute();
35 35
 	}
@@ -46,8 +46,7 @@ public function query()
46 46
 	 */
47 47
 	public static function getConnectors()
48 48
 	{
49  
-		// Deprecation warning.
50  
-		JLog::add('JDatabase::getConnectors() is deprecated, use JDatabaseDriver::getConnectors() instead.', JLog::NOTICE, 'deprecated');
  49
+		JLog::add('JDatabase::getConnectors() is deprecated, use JDatabaseDriver::getConnectors() instead.', JLog::WARNING, 'deprecated');
51 50
 
52 51
 		return JDatabaseDriver::getConnectors();
53 52
 	}
@@ -110,7 +109,7 @@ public function getErrorNum()
110 109
 	 */
111 110
 	public static function getInstance($options = array())
112 111
 	{
113  
-		JLog::add('JDatabase::getInstance() is deprecated, use JDatabaseDriver::getInstance() instead.', JLog::NOTICE, 'deprecated');
  112
+		JLog::add('JDatabase::getInstance() is deprecated, use JDatabaseDriver::getInstance() instead.', JLog::WARNING, 'deprecated');
114 113
 
115 114
 		return JDatabaseDriver::getInstance($options);
116 115
 	}
@@ -127,7 +126,7 @@ public static function getInstance($options = array())
127 126
 	 */
128 127
 	public static function splitSql($sql)
129 128
 	{
130  
-		JLog::add('JDatabase::splitSql() is deprecated, use JDatabaseDriver::splitSql() instead.', JLog::NOTICE, 'deprecated');
  129
+		JLog::add('JDatabase::splitSql() is deprecated, use JDatabaseDriver::splitSql() instead.', JLog::WARNING, 'deprecated');
131 130
 
132 131
 		return JDatabaseDriver::splitSql($sql);
133 132
 	}
3  libraries/joomla/database/database/mysql.php
@@ -9,8 +9,7 @@
9 9
 
10 10
 defined('JPATH_PLATFORM') or die;
11 11
 
12  
-// Deprecation warning.
13  
-JLog::add('JDatabaseMysql is deprecated, use JDatabaseDriverMysql instead.', JLog::NOTICE, 'deprecated');
  12
+JLog::add('JDatabaseMysql is deprecated, use JDatabaseDriverMysql instead.', JLog::WARNING, 'deprecated');
14 13
 
15 14
 /**
16 15
  * MySQL database driver
3  libraries/joomla/database/database/mysqlexporter.php
@@ -9,5 +9,4 @@
9 9
 
10 10
 defined('JPATH_PLATFORM') or die;
11 11
 
12  
-// Deprecation warning.
13  
-JLog::add('JDatabaseExporterMysql has moved to the database/exporter directory.', JLog::NOTICE, 'deprecated');
  12
+JLog::add('JDatabaseExporterMysql has moved to the database/exporter directory.', JLog::WARNING, 'deprecated');
3  libraries/joomla/database/database/mysqli.php
@@ -9,8 +9,7 @@
9 9
 
10 10
 defined('JPATH_PLATFORM') or die;
11 11
 
12  
-// Deprecation warning.
13  
-JLog::add('JDatabaseMysqli is deprecated, use JDatabaseDriverMysqli instead.', JLog::NOTICE, 'deprecated');
  12
+JLog::add('JDatabaseMysqli is deprecated, use JDatabaseDriverMysqli instead.', JLog::WARNING, 'deprecated');
14 13
 
15 14
 /**
16 15
  * MySQLi database driver
3  libraries/joomla/database/database/mysqliexporter.php
@@ -9,5 +9,4 @@
9 9
 
10 10
 defined('JPATH_PLATFORM') or die;
11 11
 
12  
-// Deprecation warning.
13  
-JLog::add('JDatabaseExporterMysqli has moved to the database/exporter directory.', JLog::NOTICE, 'deprecated');
  12
+JLog::add('JDatabaseExporterMysqli has moved to the database/exporter directory.', JLog::WARNING, 'deprecated');
3  libraries/joomla/database/database/mysqliimporter.php
@@ -9,5 +9,4 @@
9 9
 
10 10
 defined('JPATH_PLATFORM') or die;
11 11
 
12  
-// Deprecation warning.
13  
-JLog::add('JDatabaseImporterMysqli has moved to the database/importer directory.', JLog::NOTICE, 'deprecated');
  12
+JLog::add('JDatabaseImporterMysqli has moved to the database/importer directory.', JLog::WARNING, 'deprecated');
3  libraries/joomla/database/database/mysqlimporter.php
@@ -9,5 +9,4 @@
9 9
 
10 10
 defined('JPATH_PLATFORM') or die;
11 11
 
12  
-// Deprecation warning.
13  
-JLog::add('JDatabaseImporterMysql has moved to the database/importer directory.', JLog::NOTICE, 'deprecated');
  12
+JLog::add('JDatabaseImporterMysql has moved to the database/importer directory.', JLog::WARNING, 'deprecated');
3  libraries/joomla/database/database/mysqliquery.php
@@ -9,5 +9,4 @@
9 9
 
10 10
 defined('JPATH_PLATFORM') or die;
11 11
 
12  
-// Deprecation warning.
13  
-JLog::add('JDatabaseQueryMysqli has moved to the database/query directory.', JLog::NOTICE, 'deprecated');
  12
+JLog::add('JDatabaseQueryMysqli has moved to the database/query directory.', JLog::WARNING, 'deprecated');
3  libraries/joomla/database/database/mysqlquery.php
@@ -9,5 +9,4 @@
9 9
 
10 10
 defined('JPATH_PLATFORM') or die;
11 11
 
12  
-// Deprecation warning.
13  
-JLog::add('JDatabaseQueryMysql has moved to the database/query directory.', JLog::NOTICE, 'deprecated');
  12
+JLog::add('JDatabaseQueryMysql has moved to the database/query directory.', JLog::WARNING, 'deprecated');
3  libraries/joomla/database/database/sqlazure.php
@@ -9,8 +9,7 @@
9 9
 
10 10
 defined('JPATH_PLATFORM') or die;
11 11
 
12  
-// Deprecation warning.
13  
-JLog::add('JDatabaseSqlazure is deprecated, use JDatabaseDriverSqlazure instead.', JLog::NOTICE, 'deprecated');
  12
+JLog::add('JDatabaseSqlazure is deprecated, use JDatabaseDriverSqlazure instead.', JLog::WARNING, 'deprecated');
14 13
 
15 14
 /**
16 15
  * SQL Server database driver
3  libraries/joomla/database/database/sqlazurequery.php
@@ -9,5 +9,4 @@
9 9
 
10 10
 defined('JPATH_PLATFORM') or die;
11 11
 
12  
-// Deprecation warning.
13  
-JLog::add('JDatabaseQuerySqlazure has moved to the database/query directory.', JLog::NOTICE, 'deprecated');
  12
+JLog::add('JDatabaseQuerySqlazure has moved to the database/query directory.', JLog::WARNING, 'deprecated');
3  libraries/joomla/database/database/sqlsrv.php
@@ -9,8 +9,7 @@
9 9
 
10 10
 defined('JPATH_PLATFORM') or die;
11 11
 
12  
-// Deprecation warning.
13  
-JLog::add('JDatabaseSqlsrv is deprecated, use JDatabaseDriverSqlsrv instead.', JLog::NOTICE, 'deprecated');
  12
+JLog::add('JDatabaseSqlsrv is deprecated, use JDatabaseDriverSqlsrv instead.', JLog::WARNING, 'deprecated');
14 13
 JLoader::register('JDatabaseQuerySQLSrv', __DIR__ . '/sqlsrvquery.php');
15 14
 
16 15
 /**
3  libraries/joomla/database/database/sqlsrvquery.php
@@ -9,5 +9,4 @@
9 9
 
10 10
 defined('JPATH_PLATFORM') or die;
11 11
 
12  
-// Deprecation warning.
13  
-JLog::add('JDatabaseQuerySqlsrv has moved to the database/query directory.', JLog::NOTICE, 'deprecated');
  12
+JLog::add('JDatabaseQuerySqlsrv has moved to the database/query directory.', JLog::WARNING, 'deprecated');
1  libraries/joomla/html/html/select.php
@@ -328,7 +328,6 @@ public static function integerlist($start, $end, $inc, $name, $attribs = null, $
328 328
 	 */
329 329
 	public static function optgroup($text, $optKey = 'value', $optText = 'text')
330 330
 	{
331  
-		// Deprecation warning.
332 331
 		JLog::add('JSelect::optgroup is deprecated.', JLog::WARNING, 'deprecated');
333 332
 
334 333
 		// Set initial state
118  libraries/joomla/log/log.php
@@ -13,9 +13,6 @@
13 13
 
14 14
 JLoader::discover('JLogger', __DIR__ . '/loggers');
15 15
 
16  
-// @deprecated  12.1
17  
-jimport('joomla.filesystem.path');
18  
-
19 16
 /**
20 17
  * Joomla! Log Class
21 18
  *
@@ -210,65 +207,6 @@ public static function addLogger(array $options, $priorities = self::ALL, $categ
210 207
 	}
211 208
 
212 209
 	/**
213  
-	 * Returns a JLog object for a given log file/configuration, only creating it if it doesn't already exist.
214  
-	 *
215  
-	 * This method must be invoked as:
216  
-	 * <code>$log = JLog::getInstance($file, $options, $path);</code>
217  
-	 *
218  
-	 * @param   string  $file     The filename of the log file.
219  
-	 * @param   array   $options  The object configuration array.
220  
-	 * @param   string  $path     The base path for the log file.
221  
-	 *
222  
-	 * @return  JLog
223  
-	 *
224  
-	 * @since   11.1
225  
-	 *
226  
-	 * @deprecated  12.1
227  
-	 */
228  
-	public static function getInstance($file = 'error.php', $options = null, $path = null)
229  
-	{
230  
-		self::add('JLog::getInstance() is deprecated.  See JLog::addLogger().', self::WARNING, 'deprecated');
231  
-
232  
-		// Get the system configuration object.
233  
-		$config = JFactory::getConfig();
234  
-
235  
-		// Set default path if not set and sanitize it.
236  
-		if (!$path)
237  
-		{
238  
-			$path = $config->get('log_path');
239  
-		}
240  
-
241  
-		// If no options were explicitly set use the default from configuration.
242  
-		if (empty($options))
243  
-		{
244  
-			$options = (array) $config->get('log_options');
245  
-		}
246  
-
247  
-		// Fix up the options so that we use the w3c format.
248  
-		$options['text_entry_format'] = empty($options['format']) ? null : $options['format'];
249  
-		$options['text_file'] = $file;
250  
-		$options['text_file_path'] = $path;
251  
-		$options['logger'] = 'w3c';
252  
-
253  
-		// Generate a unique signature for the JLog instance based on its options.
254  
-		$signature = md5(serialize($options));
255  
-
256  
-		// Only create the object if not already created.
257  
-		if (empty(self::$legacy[$signature]))
258  
-		{
259  
-			self::$legacy[$signature] = new JLog;
260  
-
261  
-			// Register the configuration.
262  
-			self::$legacy[$signature]->configurations[$signature] = $options;
263  
-
264  
-			// Setup the lookup to catch all.
265  
-			self::$legacy[$signature]->lookup[$signature] = (object) array('priorities' => self::ALL, 'categories' => array());
266  
-		}
267  
-
268  
-		return self::$legacy[$signature];
269  
-	}
270  
-
271  
-	/**
272 210
 	 * Returns a reference to the a JLog object, only creating it if it doesn't already exist.
273 211
 	 * Note: This is principally made available for testing and internal purposes.
274 212
 	 *
@@ -287,62 +225,6 @@ public static function setInstance($instance)
287 225
 	}
288 226
 
289 227
 	/**
290  
-	 * Method to add an entry to the log file.
291  
-	 *
292  
-	 * @param   array  $entry  Array of values to map to the format string for the log file.
293  
-	 *
294  
-	 * @return  mixed  null|boolean
295  
-	 *
296  
-	 * @since         11.1
297  
-	 *
298  
-	 * @deprecated    12.1  Use JLog::add() instead.
299  
-	 */
300  
-	public function addEntry($entry)
301  
-	{
302  
-		// Deprecation warning.
303  
-		self::add('JLog::addEntry() is deprecated, use JLog::add() instead.', self::WARNING, 'deprecated');
304  
-
305  
-		// Easiest case is we already have a JLogEntry object to add.
306  
-		if ($entry instanceof JLogEntry)
307  
-		{
308  
-			return $this->addLogEntry($entry);
309  
-		}
310  
-		// We have either an object or array that needs to be converted to a JLogEntry.
311  
-		elseif (is_array($entry) || is_object($entry))
312  
-		{
313  
-			$tmp = new JLogEntry('');
314  
-			foreach ((array) $entry as $k => $v)
315  
-			{
316  
-				switch ($k)
317  
-				{
318  
-					case 'c-ip':
319  
-						$tmp->clientIP = $v;
320  
-						break;
321  
-					case 'status':
322  
-						$tmp->category = $v;
323  
-						break;
324  
-					case 'level':
325  
-						$tmp->priority = $v;
326  
-						break;
327  
-					case 'comment':
328  
-						$tmp->message = $v;
329  
-						break;
330  
-					default:
331  
-						$tmp->$k = $v;
332  
-						break;
333  
-				}
334  
-			}
335  
-		}
336  
-		// Unrecognized type.
337  
-		else
338  
-		{
339  
-			return false;
340  
-		}
341  
-
342  
-		return $this->addLogEntry($tmp);
343  
-	}
344  
-
345  
-	/**
346 228
 	 * Method to add an entry to the appropriate loggers.
347 229
 	 *
348 230
 	 * @param   JLogEntry  $entry  The JLogEntry object to send to the loggers.
8  libraries/joomla/plugin/helper.php
@@ -156,16 +156,12 @@ protected static function _import($plugin, $autocreate = true, JEventDispatcher
156 156
 		$plugin->type = preg_replace('/[^A-Z0-9_\.-]/i', '', $plugin->type);
157 157
 		$plugin->name = preg_replace('/[^A-Z0-9_\.-]/i', '', $plugin->name);
158 158
 
159  
-		$legacypath = JPATH_PLUGINS . '/' . $plugin->type . '/' . $plugin->name . '.php';
160 159
 		$path = JPATH_PLUGINS . '/' . $plugin->type . '/' . $plugin->name . '/' . $plugin->name . '.php';
161 160
 
162  
-		if (!isset($paths[$path]) || !isset($paths[$legacypath]))
  161
+		if (!isset($paths[$path]))
163 162
 		{
164  
-			$pathExists = file_exists($path);
165  
-			if ($pathExists || file_exists($legacypath))
  163
+			if (file_exists($path))
166 164
 			{
167  
-				$path = $pathExists ? $path : $legacypath;
168  
-
169 165
 				if (!isset($paths[$path]))
170 166
 				{
171 167
 					require_once $path;
1  libraries/joomla/user/user.php
@@ -446,7 +446,6 @@ public function setLastVisit($timestamp = null)
446 446
 	public function getParameters($loadsetupfile = false, $path = null)
447 447
 	{
448 448
 		// @codeCoverageIgnoreStart
449  
-		// Deprecation warning.
450 449
 		JLog::add('JUser::getParameters() is deprecated.', JLog::WARNING, 'deprecated');
451 450
 
452 451
 		return $this->_params;
4  libraries/joomla/utilities/xmlelement.php
@@ -29,7 +29,7 @@ class JXMLElement extends SimpleXMLElement
29 29
 	 */
30 30
 	public function name()
31 31
 	{
32  
-		JLog::add('JXMLElement::name() is deprecated, use SimpleXMLElement::getName() instead.', self::WARNING, 'deprecated');
  32
+		JLog::add('JXMLElement::name() is deprecated, use SimpleXMLElement::getName() instead.', JLog::WARNING, 'deprecated');
33 33
 		return (string) $this->getName();
34 34
 	}
35 35
 
@@ -47,7 +47,7 @@ public function name()
47 47
 	 */
48 48
 	public function asFormattedXML($compressed = false, $indent = "\t", $level = 0)
49 49
 	{
50  
-		JLog::add('JXMLElement::asFormattedXML() is deprecated, use SimpleXMLElement::asXML() instead.', self::WARNING, 'deprecated');
  50
+		JLog::add('JXMLElement::asFormattedXML() is deprecated, use SimpleXMLElement::asXML() instead.', JLog::WARNING, 'deprecated');
51 51
 		$out = '';
52 52
 
53 53
 		// Start a new line, indent by the number indicated in $level
7  libraries/legacy/base/node.php
@@ -43,7 +43,6 @@ class JNode extends JObject
43 43
 	 */
44 44
 	public function __construct()
45 45
 	{
46  
-		// Deprecation warning.
47 46
 		JLog::add('JNode::__construct() is deprecated.', JLog::WARNING, 'deprecated');
48 47
 
49 48
 		return true;
@@ -62,7 +61,6 @@ public function __construct()
62 61
 	 */
63 62
 	public function addChild(&$child)
64 63
 	{
65  
-		// Deprecation warning.
66 64
 		JLog::add('JNode::addChild() is deprecated.', JLog::WARNING, 'deprecated');
67 65
 
68 66
 		if ($child instanceof Jnode)
@@ -84,7 +82,6 @@ public function addChild(&$child)
84 82
 	 */
85 83
 	public function setParent(&$parent)
86 84
 	{
87  
-		// Deprecation warning.
88 85
 		JLog::add('JNode::setParent() is deprecated.', JLog::WARNING, 'deprecated');
89 86
 
90 87
 		if ($parent instanceof JNode || is_null($parent))
@@ -111,7 +108,6 @@ public function setParent(&$parent)
111 108
 	 */
112 109
 	public function &getChildren()
113 110
 	{
114  
-		// Deprecation warning.
115 111
 		JLog::add('JNode::getChildren() is deprecated.', JLog::WARNING, 'deprecated');
116 112
 
117 113
 		return $this->_children;
@@ -126,7 +122,6 @@ public function &getChildren()
126 122
 	 */
127 123
 	public function &getParent()
128 124
 	{
129  
-		// Deprecation warning.
130 125
 		JLog::add('JNode::getParent() is deprecated.', JLog::WARNING, 'deprecated');
131 126
 
132 127
 		return $this->_parent;
@@ -141,7 +136,6 @@ public function &getParent()
141 136
 	 */
142 137
 	public function hasChildren()
143 138
 	{
144  
-		// Deprecation warning.
145 139
 		JLog::add('JNode::hasChildren() is deprecated.', JLog::WARNING, 'deprecated');
146 140
 
147 141
 		return (bool) count($this->_children);
@@ -156,7 +150,6 @@ public function hasChildren()
156 150
 	 */
157 151
 	public function hasParent()
158 152
 	{
159  
-		// Deprecation warning.
160 153
 		JLog::add('JNode::hasParent() is deprecated.', JLog::WARNING, 'deprecated');
161 154
 
162 155
 		return $this->getParent() != null;
4  libraries/legacy/base/tree.php
@@ -43,7 +43,6 @@ class JTree extends JObject
43 43
 	 */
44 44
 	public function __construct()
45 45
 	{
46  
-		// Deprecation warning.
47 46
 		JLog::add('JTree::__construct() is deprecated.', JLog::WARNING, 'deprecated');
48 47
 
49 48
 		$this->_root = new JNode('ROOT');
@@ -62,7 +61,6 @@ public function __construct()
62 61
 	 */
63 62
 	public function addChild(&$node, $setCurrent = false)
64 63
 	{
65  
-		// Deprecation warning.
66 64
 		JLog::add('JTree::addChild() is deprecated.', JLog::WARNING, 'deprecated');
67 65
 
68 66
 		$this->_current->addChild($node);
@@ -81,7 +79,6 @@ public function addChild(&$node, $setCurrent = false)
81 79
 	 */
82 80
 	public function getParent()
83 81
 	{
84  
-		// Deprecation warning.
85 82
 		JLog::add('JTree::getParent() is deprecated.', JLog::WARNING, 'deprecated');
86 83
 
87 84
 		$this->_current = &$this->_current->getParent();
@@ -96,7 +93,6 @@ public function getParent()
96 93
 	 */
97 94
 	public function reset()
98 95
 	{
99  
-		// Deprecation warning.
100 96
 		JLog::add('JTree::reset() is deprecated.', JLog::WARNING, 'deprecated');
101 97
 
102 98
 		$this->_current = &$this->_root;
45  libraries/legacy/controller/controller.php
@@ -316,6 +316,11 @@ public function __construct($config = array())
316 316
 		$this->redirect = null;
317 317
 		$this->taskMap = array();
318 318
 
  319
+		if (JDEBUG)
  320
+		{
  321
+			JLog::addLogger(array('text_file' => 'jcontroller.log.php'), JLog::ALL, array('controller'));
  322
+		}
  323
+
319 324
 		// Determine the methods to exclude from the base class.
320 325
 		$xMethods = get_class_methods('JController');
321 326
 
@@ -502,17 +507,13 @@ protected function checkEditId($context, $id)
502 507
 
503 508
 			if (JDEBUG)
504 509
 			{
505  
-				JLog::getInstance('jcontroller.log.php')->addEntry(
506  
-					array(
507  
-						'comment' => sprintf(
508  
-							'Checking edit ID %s.%s: %d %s',
509  
-							$context,
510  
-							$id,
511  
-							(int) $result,
512  
-							str_replace("\n", ' ', print_r($values, 1))
513  
-						)
514  
-					)
515  
-				);
  510
+				JLog::add(sprintf(
  511
+					'Checking edit ID %s.%s: %d %s',
  512
+					$context,
  513
+					$id,
  514
+					(int) $result,
  515
+					str_replace("\n", ' ', print_r($values, 1))
  516
+				), JLog::INFO, 'controller');
516 517
 			}
517 518
 
518 519
 			return $result;
@@ -872,11 +873,12 @@ protected function holdEditId($context, $id)
872 873
 
873 874
 			if (JDEBUG)
874 875
 			{
875  
-				JLog::getInstance('jcontroller.log.php')->addEntry(
876  
-					array(
877  
-						'comment' => sprintf('Holding edit ID %s.%s %s', $context, $id, str_replace("\n", ' ', print_r($values, 1)))
878  
-					)
879  
-				);
  876
+				JLog::add(sprintf(
  877
+					'Holding edit ID %s.%s %s',
  878
+					$context,
  879
+					$id,
  880
+					str_replace("\n", ' ', print_r($values, 1))
  881
+				), JLog::INFO, 'controller');
880 882
 			}
881 883
 		}
882 884
 	}
@@ -976,11 +978,12 @@ protected function releaseEditId($context, $id)
976 978
 
977 979
 			if (JDEBUG)
978 980
 			{
979  
-				JLog::getInstance('jcontroller.log.php')->addEntry(
980  
-					array(
981  
-						'comment' => sprintf('Releasing edit ID %s.%s %s', $context, $id, str_replace("\n", ' ', print_r($values, 1)))
982  
-					)
983  
-				);
  981
+				JLog::add(sprintf(
  982
+					'Releasing edit ID %s.%s %s',
  983
+					$context,
  984
+					$id,
  985
+					str_replace("\n", ' ', print_r($values, 1))
  986
+				), JLog::INFO, 'controller');
984 987
 			}
985 988
 		}
986 989
 	}
3  libraries/legacy/database/exception.php
@@ -9,8 +9,7 @@
9 9
 
10 10
 defined('JPATH_PLATFORM') or die;
11 11
 
12  
-// Deprecation warning.
13  
-JLog::add('JDatabaseException is deprecated, use SPL Exceptions instead.', JLog::NOTICE, 'deprecated');
  12
+JLog::add('JDatabaseException is deprecated, use SPL Exceptions instead.', JLog::WARNING, 'deprecated');
14 13
 
15 14
 /**
16 15
  * Exception class definition for the Database subpackage.
39  libraries/legacy/error/error.php
@@ -73,7 +73,6 @@
73 73
 	 */
74 74
 	public static function getError($unset = false)
75 75
 	{
76  
-		// Deprecation warning.
77 76
 		JLog::add('JError::getError() is deprecated.', JLog::WARNING, 'deprecated');
78 77
 
79 78
 		if (!isset(self::$stack[0]))
@@ -102,7 +101,6 @@ public static function getError($unset = false)
102 101
 	 */
103 102
 	public static function getErrors()
104 103
 	{
105  
-		// Deprecation warning.
106 104
 		JLog::add('JError::getErrors() is deprecated.', JLog::WARNING, 'deprecated');
107 105
 
108 106
 		return self::$stack;
@@ -120,7 +118,6 @@ public static function getErrors()
120 118
 	 */
121 119
 	public static function addToStack(JException &$e)
122 120
 	{
123  
-		// Deprecation warning.
124 121
 		JLog::add('JError::addToStack() is deprecated.', JLog::WARNING, 'deprecated');
125 122
 
126 123
 		self::$stack[] = &$e;
@@ -147,7 +144,6 @@ public static function addToStack(JException &$e)
147 144
 	 */
148 145
 	public static function raise($level, $code, $msg, $info = null, $backtrace = false)
149 146
 	{
150  
-		// Deprecation warning.
151 147
 		JLog::add('JError::raise() is deprecated.', JLog::WARNING, 'deprecated');
152 148
 
153 149
 		// Build error object
@@ -168,7 +164,6 @@ public static function raise($level, $code, $msg, $info = null, $backtrace = fal
168 164
 	 */
169 165
 	public static function throwError(&$exception)
170 166
 	{
171  
-		// Deprecation warning.
172 167
 		JLog::add('JError::throwError() is deprecated.', JLog::WARNING, 'deprecated');
173 168
 
174 169
 		static $thrown = false;
@@ -225,7 +220,6 @@ public static function throwError(&$exception)
225 220
 	 */
226 221
 	public static function raiseError($code, $msg, $info = null)
227 222
 	{
228  
-		// Deprecation warning.
229 223
 		JLog::add('JError::raiseError() is deprecated.', JLog::WARNING, 'deprecated');
230 224
 
231 225
 		return self::raise(E_ERROR, $code, $msg, $info, true);
@@ -250,7 +244,6 @@ public static function raiseError($code, $msg, $info = null)
250 244
 	 */
251 245
 	public static function raiseWarning($code, $msg, $info = null)
252 246
 	{
253  
-		// Deprecation warning.
254 247
 		JLog::add('JError::raiseWarning() is deprecated.', JLog::WARNING, 'deprecated');
255 248
 
256 249
 		return self::raise(E_WARNING, $code, $msg, $info);
@@ -274,7 +267,6 @@ public static function raiseWarning($code, $msg, $info = null)
274 267
 	 */
275 268
 	public static function raiseNotice($code, $msg, $info = null)
276 269
 	{
277  
-		// Deprecation warning.
278 270
 		JLog::add('JError::raiseNotice() is deprecated.', JLog::WARNING, 'deprecated');
279 271
 
280 272
 		return self::raise(E_NOTICE, $code, $msg, $info);
@@ -293,7 +285,6 @@ public static function raiseNotice($code, $msg, $info = null)
293 285
 	 */
294 286
 	public static function getErrorHandling($level)
295 287
 	{
296  
-		// Deprecation warning.
297 288
 		JLog::add('JError::getErrorHandling() is deprecated.', JLog::WARNING, 'deprecated');
298 289
 
299 290
 		return self::$handlers[$level];
@@ -328,7 +319,6 @@ public static function getErrorHandling($level)
328 319
 	 */
329 320
 	public static function setErrorHandling($level, $mode, $options = null)
330 321
 	{
331  
-		// Deprecation warning.
332 322
 		JLog::add('JError::setErrorHandling() is deprecated.', JLog::WARNING, 'deprecated');
333 323
 
334 324
 		$levels = self::$levels;
@@ -399,7 +389,6 @@ public static function setErrorHandling($level, $mode, $options = null)
399 389
 	 */
400 390
 	public static function attachHandler()
401 391
 	{
402  
-		// Deprecation warning.
403 392
 		JLog::add('JError::getErrorHandling() is deprecated.', JLog::WARNING, 'deprecated');
404 393
 
405 394
 		set_error_handler(array('JError', 'customErrorHandler'));
@@ -416,7 +405,6 @@ public static function attachHandler()
416 405
 	 */
417 406
 	public static function detachHandler()
418 407
 	{
419  
-		// Deprecation warning.
420 408
 		JLog::add('JError::detachHandler() is deprecated.', JLog::WARNING, 'deprecated');
421 409
 
422 410
 		restore_error_handler();
@@ -441,7 +429,6 @@ public static function detachHandler()
441 429
 	 */
442 430
 	public static function registerErrorLevel($level, $name, $handler = 'ignore')
443 431
 	{
444  
-		// Deprecation warning.
445 432
 		JLog::add('JError::registerErrorLevel() is deprecated.', JLog::WARNING, 'deprecated');
446 433
 
447 434
 		if (isset(self::$levels[$level]))
@@ -469,7 +456,6 @@ public static function registerErrorLevel($level, $name, $handler = 'ignore')
469 456
 
470 457
 	public static function translateErrorLevel($level)
471 458
 	{
472  
-		// Deprecation warning.
473 459
 		JLog::add('JError::translateErrorLevel() is deprecated.', JLog::WARNING, 'deprecated');
474 460
 
475 461
 		if (isset(self::$levels[$level]))
@@ -495,7 +481,6 @@ public static function translateErrorLevel($level)
495 481
 	 */
496 482
 	public static function handleIgnore(&$error, $options)
497 483
 	{
498  
-		// Deprecation warning.
499 484
 		JLog::add('JError::handleIgnore() is deprecated.', JLog::WARNING, 'deprecated');
500 485
 
501 486
 		return $error;
@@ -516,7 +501,6 @@ public static function handleIgnore(&$error, $options)
516 501
 	 */
517 502
 	public static function handleEcho(&$error, $options)
518 503
 	{
519  
-		// Deprecation warning.
520 504
 		JLog::add('JError::handleEcho() is deprecated.', JLog::WARNING, 'deprecated');
521 505
 
522 506
 		$level_human = self::translateErrorLevel($error->get('level'));
@@ -590,7 +574,6 @@ public static function handleEcho(&$error, $options)
590 574
 	 */
591 575
 	public static function handleVerbose(&$error, $options)
592 576
 	{
593  
-		// Deprecation warning.
594 577
 		JLog::add('JError::handleVerbose() is deprecated.', JLog::WARNING, 'deprecated');
595 578
 
596 579
 		$level_human = self::translateErrorLevel($error->get('level'));
@@ -637,7 +620,6 @@ public static function handleVerbose(&$error, $options)
637 620
 	 */
638 621
 	public static function handleDie(&$error, $options)
639 622
 	{
640  
-		// Deprecation warning.
641 623
 		JLog::add('JError::handleDie() is deprecated.', JLog::WARNING, 'deprecated');
642 624
 
643 625
 		$level_human = self::translateErrorLevel($error->get('level'));
@@ -679,7 +661,6 @@ public static function handleDie(&$error, $options)
679 661
 	 */
680 662
 	public static function handleMessage(&$error, $options)
681 663
 	{
682  
-		// Deprecation warning.
683 664
 		JLog::add('JError::hanleMessage() is deprecated.', JLog::WARNING, 'deprecated');
684 665
 
685 666
 		$appl = JFactory::getApplication();
@@ -704,22 +685,24 @@ public static function handleMessage(&$error, $options)
704 685
 	 */
705 686
 	public static function handleLog(&$error, $options)
706 687
 	{
707  
-		// Deprecation warning.
708 688
 		JLog::add('JError::handleLog() is deprecated.', JLog::WARNING, 'deprecated');
709 689
 
710 690
 		static $log;
711 691
 
712 692
 		if ($log == null)
713 693
 		{
714  
-			$fileName = date('Y-m-d') . '.error.log';
  694
+			$options['text_file'] = date('Y-m-d') . '.error.log';
715 695
 			$options['format'] = "{DATE}\t{TIME}\t{LEVEL}\t{CODE}\t{MESSAGE}";
716  
-			$log = JLog::getInstance($fileName, $options);
  696
+			JLog::addLogger($options, JLog::ALL, array('error'));
717 697
 		}
718 698
 
719  
-		$entry['level'] = $error->get('level');
720  
-		$entry['code'] = $error->get('code');
721  
-		$entry['message'] = str_replace(array("\r", "\n"), array('', '\\n'), $error->get('message'));
722  
-		$log->addEntry($entry);
  699
+		$entry = new JLogEntry(
  700
+			str_replace(array("\r", "\n"), array('', '\\n'), $error->get('message')),
  701
+			$error->get('level'),
  702
+			'error'
  703
+		);
  704
+		$entry->code = $error->get('code');
  705
+		JLog::add($entry);
723 706
 
724 707
 		return $error;
725 708
 	}
@@ -739,7 +722,6 @@ public static function handleLog(&$error, $options)
739 722
 	 */
740 723
 	public static function handleCallback(&$error, $options)
741 724
 	{
742  
-		// Deprecation warning.
743 725
 		JLog::add('JError::handleCallback() is deprecated.', JLog::WARNING, 'deprecated');
744 726
 
745 727
 		return call_user_func($options, $error);
@@ -757,7 +739,6 @@ public static function handleCallback(&$error, $options)
757 739
 	 */
758 740
 	public static function customErrorPage(&$error)
759 741
 	{
760  
-		// Deprecation warning.
761 742
 		JLog::add('JError::customErrorPage() is deprecated.', JLog::WARNING, 'deprecated');
762 743
 
763 744
 		// Initialise variables.
@@ -815,7 +796,6 @@ public static function customErrorPage(&$error)
815 796
 	 */
816 797
 	public static function customErrorHandler($level, $msg)
817 798
 	{
818  
-		// Deprecation warning.
819 799
 		JLog::add('JError::customErrorHandler() is deprecated.', JLog::WARNING, 'deprecated');
820 800
 
821 801
 		self::raise($level, '', $msg);
@@ -833,7 +813,6 @@ public static function customErrorHandler($level, $msg)
833 813
 	 */
834 814
 	public static function renderBacktrace($error)
835 815
 	{
836  
-		// Deprecation warning.
837 816
 		JLog::add('JError::renderBacktrace() is deprecated.', JLog::WARNING, 'deprecated');
838 817
 
839 818
 		$contents = null;
14  libraries/legacy/exception/exception.php
@@ -114,7 +114,6 @@ class JException extends Exception
114 114
 	 */
115 115
 	public function __construct($msg, $code = 0, $level = null, $info = null, $backtrace = false)
116 116
 	{
117  
-		// Deprecation warning.
118 117
 		JLog::add('JException is deprecated.', JLog::WARNING, 'deprecated');
119 118
 
120 119
 		$this->level = $level;
@@ -180,6 +179,8 @@ public function __construct($msg, $code = 0, $level = null, $info = null, $backt
180 179
 	 */
181 180
 	public function __toString()
182 181
 	{
  182
+		JLog::add('JException::__toString is deprecated.', JLog::WARNING, 'deprecated');
  183
+
183 184
 		return $this->message;
184 185
 	}
185 186
 
@@ -193,6 +194,8 @@ public function __toString()
193 194
 	 */
194 195
 	public function toString()
195 196
 	{
  197
+		JLog::add('JException::toString is deprecated.', JLog::WARNING, 'deprecated');
  198
+
196 199
 		return (string) $this;
197 200
 	}
198 201
 
@@ -210,6 +213,8 @@ public function toString()
210 213
 	 */
211 214
 	public function get($property, $default = null)
212 215
 	{
  216
+		JLog::add('JException::get is deprecated.', JLog::WARNING, 'deprecated');
  217
+
213 218
 		if (isset($this->$property))
214 219
 		{
215 220
 			return $this->$property;
@@ -230,6 +235,8 @@ public function get($property, $default = null)
230 235
 	 */
231 236
 	public function getProperties($public = true)
232 237
 	{
  238
+		JLog::add('JException::getProperties is deprecated.', JLog::WARNING, 'deprecated');
  239
+
233 240
 		$vars = get_object_vars($this);
234 241
 		if ($public)
235 242
 		{
@@ -258,7 +265,6 @@ public function getProperties($public = true)
258 265
 	 */
259 266
 	public function getError($i = null, $toString = true)
260 267
 	{
261  
-		// Deprecation warning.
262 268
 		JLog::add('JException::getError is deprecated.', JLog::WARNING, 'deprecated');
263 269
 
264 270
 		// Find the error
@@ -297,7 +303,6 @@ public function getError($i = null, $toString = true)
297 303
 	 */
298 304
 	public function getErrors()
299 305
 	{
300  
-		// Deprecation warning.
301 306
 		JLog::add('JException::getErrors is deprecated.', JLog::WARNING, 'deprecated');
302 307
 
303 308
 		return $this->_errors;
@@ -317,7 +322,6 @@ public function getErrors()
317 322
 	 */
318 323
 	public function set($property, $value = null)
319 324
 	{
320  
-		// Deprecation warning.
321 325
 		JLog::add('JException::set is deprecated.', JLog::WARNING, 'deprecated');
322 326
 
323 327
 		$previous = isset($this->$property) ? $this->$property : null;
@@ -338,7 +342,6 @@ public function set($property, $value = null)
338 342
 	 */
339 343
 	public function setProperties($properties)
340 344
 	{
341  
-		// Deprecation warning.
342 345
 		JLog::add('JException::setProperties is deprecated.', JLog::WARNING, 'deprecated');
343 346
 
344 347
 		// Cast to an array
@@ -370,7 +373,6 @@ public function setProperties($properties)
370 373
 	 */
371 374
 	public function setError($error)
372 375
 	{
373  
-		// Deprecation warning.
374 376
 		JLog::add('JException::setErrors is deprecated.', JLog::WARNING, 'deprecated');
375 377
 
376 378
 		array_push($this->_errors, $error);
4  libraries/legacy/log/logexception.php
@@ -9,6 +9,8 @@
9 9
 
10 10
 defined('JPATH_PLATFORM') or die;
11 11
 
  12
+JLog::add('LogException is deprecated, use SPL Exceptions instead.', JLog::WARNING, 'deprecated');
  13
+
12 14
 /**
13 15
  * Exception class definition for the Log subpackage.
14 16
  *
@@ -17,6 +19,6 @@
17 19
  * @since       11.1
18 20
  * @deprecated  12.3 Use semantic exceptions instead
19 21
  */
20  
-class LogException extends Exception
  22
+class LogException extends RuntimeException
21 23
 {
22 24
 }
12  libraries/legacy/module/helper.php
@@ -384,6 +384,8 @@ protected static function &_load()
384 384
 	 * Caching modes:
385 385
 	 * To be set in XML:
386 386
 	 * 'static'      One cache file for all pages with the same module parameters
  387
+	 * 'oldstatic'   1.5 definition of module caching, one cache file for all pages
  388
+	 *               with the same module id and user aid,
387 389
 	 * 'itemid'      Changes on itemid change, to be called from inside the module:
388 390
 	 * 'safeuri'     Id created from $cacheparams->modeparams array,
389 391
 	 * 'id'          Module sets own cache id's
@@ -477,6 +479,16 @@ public static function moduleCache($module, $moduleparams, $cacheparams)
477 479
 				);
478 480
 				break;
479 481
 
  482
+			case 'oldstatic': // provided for backward compatibility, not really usefull
  483
+				$ret = $cache->get(
  484
+					array($cacheparams->class, $cacheparams->method),
  485
+					$cacheparams->methodparams,
  486
+					$module->id . $view_levels,
  487
+					$wrkarounds,
  488
+					$wrkaroundoptions
  489
+				);
  490
+				break;
  491
+
480 492
 			case 'itemid':
481 493
 			default:
482 494
 				$ret = $cache->get(
5  libraries/legacy/simplecrypt/simplecrypt.php
@@ -37,6 +37,8 @@ class JSimplecrypt
37 37
 	 */
38 38
 	public function __construct($privateKey = null)
39 39
 	{
  40
+		JLog::add('JSimpleCrypt is deprecated.  Use JCrypt instead.', JLog::WARNING, 'deprecated');
  41
+
40 42
 		if (empty($privateKey))
41 43
 		{
42 44
 			$privateKey = md5(JFactory::getConfig()->get('secret'));
@@ -47,9 +49,6 @@ public function __construct($privateKey = null)
47 49
 
48 50
 		// Setup the JCrypt object.
49 51
 		$this->_crypt = new JCrypt(new JCryptCipherSimple, $key);
50  
-
51  
-		// Deprecation warning.
52  
-		JLog::add('JSimpleCrypt is deprecated.  Use JCrypt instead.', JLog::WARNING, 'deprecated');
53 52
 	}
54 53
 
55 54
 	/**
88  tests/suites/unit/joomla/log/JLogTest.php
@@ -39,74 +39,6 @@ protected function tearDown()
39 39
 	}
40 40
 
41 41
 	/**
42  
-	 * Test the JLog::addEntry method to make sure if we give it invalid scalar input it will return false
43  
-	 * just as in Joomla! CMS 1.5.  This method is deprecated and will be removed in 11.2.
44  
-	 *
45  
-	 * @return  void
46  
-	 *
47  
-	 * @since   11.1
48  
-	 */
49  
-	public function testAddEntryWithInvalidScalarInput()
50  
-	{
51  
-		$log = new JLogInspector;
52  
-
53  
-		$this->assertFalse($log->addEntry(123), 'Line: '.__LINE__);
54  
-		$this->assertFalse($log->addEntry('foobar'), 'Line: '.__LINE__);
55  
-		$this->assertFalse($log->addEntry(3.14), 'Line: '.__LINE__);
56  
-	}
57  
-
58  
-	/**
59  
-	 * Test the JLog::addEntry method to make sure if we give it valid array input as in Joomla! CMS 1.5 then
60  
-	 * it will in fact add a log entry and transform it correctly.  This method is deprecated and will be
61  
-	 * removed in 11.2.
62  
-	 *
63  
-	 * @return  void
64  
-	 *
65  
-	 * @since   11.1
66  
-	 */
67  
-	public function testAddEntryWithValidArrayInput()
68  
-	{
69  
-		$log = new JLogInspector;
70  
-
71  
-		// Create an array similar to expected input array from Joomla! CMS 1.5
72  
-		$entry = array(
73  
-			'c-ip' => '127.0.0.1',
74  
-			'status' => 'deprecated',
75  
-			'level' => JLog::DEBUG,
76  
-			'comment' => 'Test Entry',
77  
-			'foo' => 'bar'
78  
-		);
79  
-
80  
-		$log->addEntry($entry);
81  
-
82  
-		// Verify all of the JLogEntry values.
83  
-		$this->assertEquals($log->queue[0]->category, 'deprecated', 'Line: '.__LINE__);
84  
-		$this->assertEquals($log->queue[0]->priority, JLog::DEBUG, 'Line: '.__LINE__);
85  
-		$this->assertEquals($log->queue[0]->message, 'Test Entry', 'Line: '.__LINE__);
86  
-		$this->assertEquals($log->queue[0]->foo, 'bar', 'Line: '.__LINE__);
87  
-		$this->assertEquals($log->queue[0]->clientIP, '127.0.0.1', 'Line: '.__LINE__);
88  
-	}
89  
-
90  
-	/**
91  
-	 * Test the JLog::addEntry method to make sure if we give it a valid JLogEntry object as input it will
92  
-	 * correctly accept and add the entry.  This method is deprecated and will be removed in 11.2.
93  
-	 *
94  
-	 * @return  void
95  
-	 *
96  
-	 * @since   11.1
97  
-	 */
98  
-	public function testAddEntryWithValidJLogEntry()
99  
-	{
100  
-		$log = new JLogInspector;
101  
-
102  
-		$entry = new JLogEntry('TESTING', JLog::DEBUG);
103  
-
104  
-		$log->addEntry($entry);
105  
-
106  
-		$this->assertEquals($log->queue[0], $entry, 'Line: '.__LINE__);
107  
-	}
108  
-
109  
-	/**
110 42
 	 * Test the JLog::addLogEntry method to verify that if called directly it will route the entry to the
111 43
 	 * appropriate loggers.  We use the echo logger here for easy testing using the PHP output buffer.
112 44
 	 *
@@ -377,26 +309,6 @@ public function testFindLoggersByPriorityAndCategory()
377 309
 	}
378 310
 
379 311
 	/**
380  
-	 * Test the JLog::getInstance method to make sure we are getting a valid JLog instance from it.  This
381  
-	 * method is deprecated and will be removed in 11.2.
382  
-	 *
383  
-	 * @return  void
384  
-	 *
385  
-	 * @since   11.1
386