· 8 years ago · Jan 25, 2018, 09:14 PM
1diff --git a/libraries/joomla/application/application.php b/libraries/joomla/application/application.php
2index 8cd5744..d1c6c19 100644
3--- a/libraries/joomla/application/application.php
4+++ b/libraries/joomla/application/application.php
5@@ -637,27 +637,29 @@ class JApplication extends JObject
6 // Get the global JAuthentication object.
7 jimport('joomla.user.authentication');
8
9- $response = JAuthentication::authenticate($credentials, $options);
10+ $authenticate = JAuthentication::getInstance();
11+ $response = $authenticate->authenticate($credentials, $options);
12
13 if ($response->status === JAuthentication::STATUS_SUCCESS) {
14 // validate that the user should be able to login (different to being authenticated)
15 // this permits authentication plugins blocking the user
16- $authorisations = JAuthentication::authorise($response, $options);
17- foreach($authorisation as $authorisation)
18+ $authorisations = $authenticate->authorise($response, $options);
19+ foreach ($authorisations as $authorisation)
20 {
21- $denied_states = Array(JAuthentication::STATUS_EXPIRED,JAuthentication::STATUS_DENIED);
22- if(in_array($authorisation->status, $denied_states))
23+ $denied_states = Array(JAuthentication::STATUS_EXPIRED, JAuthentication::STATUS_DENIED);
24+ if (in_array($authorisation->status, $denied_states))
25 {
26 // Trigger onUserAuthorisationFailure Event.
27- $this->triggerEvent('onUserAuthorisationFailure', array((array)$authorisation));
28+ $this->triggerEvent('onUserAuthorisationFailure', array((array) $authorisation));
29
30 // If silent is set, just return false.
31- if (isset($options['silent']) && $options['silent']) {
32+ if (isset($options['silent']) && $options['silent'])
33+ {
34 return false;
35 }
36-
37+
38 // Return the error.
39- switch($authorisation->status)
40+ switch ($authorisation->status)
41 {
42 case JAuthentication::STATUS_EXPIRED:
43 return JError::raiseWarning('102002', JText::_('JLIB_LOGIN_EXPIRED'));
44@@ -671,7 +673,7 @@ class JApplication extends JObject
45 }
46 }
47 }
48-
49+
50 // Import the user plugin group.
51 JPluginHelper::importPlugin('user');
52
53@@ -1034,14 +1036,14 @@ class JApplication extends JObject
54 if (!$exists) {
55 if ($session->isNew()) {
56 $db->setQuery(
57- 'INSERT INTO '.$query->qn('#__session').' ('.$query->qn('session_id').', '.$query->qn('client_id').', '.$query->qn('time').')' .
58- ' VALUES ('.$query->q($session->getId()).', '.(int) $this->getClientId().', '.(int) time().')'
59+ 'INSERT INTO `#__session` (`session_id`, `client_id`, `time`)' .
60+ ' VALUES ('.$db->quote($session->getId()).', '.(int) $this->getClientId().', '.(int) time().')'
61 );
62 }
63 else {
64 $db->setQuery(
65- 'INSERT INTO '.$query->qn('#__session').' ('.$query->qn('session_id').', '.$query->qn('client_id').', '.$query->qn('guest').', '.$query->qn('time').', '.$query->qn('userid').', '.$query->qn('username').')' .
66- ' VALUES ('.$query->q($session->getId()).', '.(int) $this->getClientId().', '.(int) $user->get('guest').', '.(int) $session->get('session.timer.start').', '.(int) $user->get('id').', '.$query->q($user->get('username')).')'
67+ 'INSERT INTO `#__session` (`session_id`, `client_id`, `guest`, `time`, `userid`, `username`)' .
68+ ' VALUES ('.$db->quote($session->getId()).', '.(int) $this->getClientId().', '.(int) $user->get('guest').', '.(int) $session->get('session.timer.start').', '.(int) $user->get('id').', '.$db->quote($user->get('username')).')'
69 );
70 }
71
72diff --git a/libraries/joomla/application/categories.php b/libraries/joomla/application/categories.php
73index 72b8b3d..ffa1fc4 100644
74--- a/libraries/joomla/application/categories.php
75+++ b/libraries/joomla/application/categories.php
76@@ -711,10 +711,12 @@ class JCategoryNode extends JObject
77 {
78 if (!$this->_allChildrenloaded) {
79 $temp = $this->_constructor->get($this->id, true);
80- $this->_children = $temp->getChildren();
81- $this->_leftSibling = $temp->getSibling(false);
82- $this->_rightSibling = $temp->getSibling(true);
83- $this->setAllLoaded();
84+ if ($temp) {
85+ $this->_children = $temp->getChildren();
86+ $this->_leftSibling = $temp->getSibling(false);
87+ $this->_rightSibling = $temp->getSibling(true);
88+ $this->setAllLoaded();
89+ }
90 }
91
92 if ($recursive) {
93diff --git a/libraries/joomla/application/component/model.php b/libraries/joomla/application/component/model.php
94index 7d43c1a..4c5d35d 100644
95--- a/libraries/joomla/application/component/model.php
96+++ b/libraries/joomla/application/component/model.php
97@@ -385,24 +385,16 @@ abstract class JModel extends JObject
98 * @return JTable A JTable object
99 * @since 11.1
100 */
101- public function getTable($name = '', $prefix = '', $options = array())
102+ public function getTable($name = '', $prefix = 'Table', $options = array())
103 {
104 if (empty($name)) {
105 $name = $this->getName();
106 }
107
108- if(empty($prefix)) {
109- $prefix = $this->getName() . 'Table';
110- }
111-
112 if ($table = $this->_createTable($name, $prefix, $options)) {
113 return $table;
114 }
115
116- if ($table = $this->_createTable($name, 'Table', $options)) {
117- return $table;
118- }
119-
120 JError::raiseError(0, JText::sprintf('JLIB_APPLICATION_ERROR_TABLE_NAME_NOT_SUPPORTED', $name));
121
122 return null;
123diff --git a/libraries/joomla/application/component/modeladmin.php b/libraries/joomla/application/component/modeladmin.php
124index f766489..f2df134 100644
125--- a/libraries/joomla/application/component/modeladmin.php
126+++ b/libraries/joomla/application/component/modeladmin.php
127@@ -544,9 +544,11 @@ abstract class JModelAdmin extends JModelForm
128 $error = $this->getError();
129 if ($error) {
130 JError::raiseWarning(500, $error);
131+ return false;
132 }
133 else {
134 JError::raiseWarning(403, JText::_('JLIB_APPLICATION_ERROR_DELETE_NOT_PERMITTED'));
135+ return false;
136 }
137 }
138
139diff --git a/libraries/joomla/application/module/helper.php b/libraries/joomla/application/module/helper.php
140index d215178..71c62a0 100644
141--- a/libraries/joomla/application/module/helper.php
142+++ b/libraries/joomla/application/module/helper.php
143@@ -348,7 +348,12 @@ abstract class JModuleHelper
144
145 // Only accept modules without explicit exclusions.
146 if (!$negHit) {
147- $module->name = substr($module->module , 4);
148+ //determine if this is a custom module
149+ $file = $module->module;
150+ $custom = substr($file, 0, 4) == 'mod_' ? 0 : 1;
151+ $module->user = $custom;
152+ // Custom module name is given by the title field, otherwise strip off "mod_"
153+ $module->name = $custom ? $module->title : substr($file, 4);
154 $module->style = null;
155 $module->position = strtolower($module->position);
156 $clean[$module->id] = $module;
157diff --git a/libraries/joomla/application/router.php b/libraries/joomla/application/router.php
158index 82a9a97..9ec2c89 100644
159--- a/libraries/joomla/application/router.php
160+++ b/libraries/joomla/application/router.php
161@@ -131,7 +131,7 @@ class JRouter extends JObject
162
163 // Parse SEF URL
164 if ($this->_mode == JROUTER_MODE_SEF) {
165- $vars += $this->_parseSefRoute($uri);
166+ $vars += $vars + $this->_parseSefRoute($uri);
167 }
168
169 return array_merge($this->getVars(), $vars);
170@@ -203,7 +203,9 @@ class JRouter extends JObject
171 */
172 public function setVar($key, $value, $create = true)
173 {
174- if ($create || array_key_exists($key, $this->_vars)) {
175+ if (!$create && array_key_exists($key, $this->_vars)) {
176+ $this->_vars[$key] = $value;
177+ } else {
178 $this->_vars[$key] = $value;
179 }
180 }
181@@ -352,7 +354,7 @@ class JRouter extends JObject
182 $vars = array();
183
184 foreach($this->_rules['parse'] as $rule) {
185- $vars += call_user_func_array($rule, array(&$this, &$uri));
186+ $vars = call_user_func_array($rule, array(&$this, &$uri));
187 }
188
189 return $vars;
190diff --git a/libraries/joomla/cache/cache.php b/libraries/joomla/cache/cache.php
191index baefc83..3c6f6c2 100644
192--- a/libraries/joomla/cache/cache.php
193+++ b/libraries/joomla/cache/cache.php
194@@ -416,15 +416,10 @@ class JCache extends JObject
195 */
196 public function &_getStorage()
197 {
198- $hash = md5(serialize($this->_options));
199-
200- if (isset(self::$_handler[$hash])) {
201- return self::$_handler[$hash];
202- }
203-
204- self::$_handler[$hash] = JCacheStorage::getInstance($this->_options['storage'], $this->_options);
205-
206- return self::$_handler[$hash];
207+ if (!isset($this->_handler)) {
208+ $this->_handler = JCacheStorage::getInstance($this->_options['storage'], $this->_options);
209+ }
210+ return $this->_handler;
211 }
212
213 /**
214@@ -532,29 +527,13 @@ class JCache extends JObject
215
216 // Document head data
217 if ($loptions['nohead'] != 1) {
218+ $cached['head'] = $document->getHeadData();
219
220 if ($loptions['modulemode'] == 1) {
221- $headnow = $document->getHeadData();
222- $unset = array('title', 'description', 'link', 'metaTags');
223-
224- foreach ($unset AS $un) {
225- unset($headnow[$un]);
226- unset($options['headerbefore'][$un]);
227- }
228-
229- $cached['head'] = array();
230-
231- // only store what this module has added
232- foreach ($headnow AS $now=>$value) {
233- $newvalue = array_diff_assoc($headnow[$now], isset($options['headerbefore'][$now]) ? $options['headerbefore'][$now] : array() );
234- if (!empty($newvalue)) {
235- $cached['head'][$now] = $newvalue;
236- }
237- }
238-
239- }
240- else {
241- $cached['head'] = $document->getHeadData();
242+ unset($cached['head']['title']);
243+ unset($cached['head']['description']);
244+ unset($cached['head']['link']);
245+ unset($cached['head']['metaTags']);
246 }
247 }
248
249diff --git a/libraries/joomla/cache/controller/callback.php b/libraries/joomla/cache/controller/callback.php
250index 6862862..571f6a0 100644
251--- a/libraries/joomla/cache/controller/callback.php
252+++ b/libraries/joomla/cache/controller/callback.php
253@@ -121,15 +121,6 @@ class JCacheControllerCallback extends JCacheController
254 }
255
256 if ($locktest->locked == false) $locktest = $this->cache->lock($id);
257-
258- if (isset($woptions['modulemode'])) {
259- $document = JFactory::getDocument();
260- $coptions['modulemode'] = $woptions['modulemode'];
261- $coptions['headerbefore'] = $document->getHeadData();
262- } else {
263- $coptions['modulemode'] = 0;
264- }
265-
266 ob_start();
267 ob_implicit_flush(false);
268
269@@ -143,6 +134,7 @@ class JCacheControllerCallback extends JCacheController
270 $coptions['nopathway'] = isset($woptions['nopathway']) ? $woptions['nopathway'] : 1;
271 $coptions['nohead'] = isset($woptions['nohead']) ? $woptions['nohead'] : 1;
272 $coptions['nomodules'] = isset($woptions['nomodules']) ? $woptions['nomodules'] : 1;
273+ $coptions['modulemode'] = isset($woptions['modulemode']) ? $woptions['modulemode'] : 0;
274
275 $cached['output'] = ($wrkarounds == false) ? $output : JCache::setWorkarounds($output, $coptions);
276 $cached['result'] = $result;
277diff --git a/libraries/joomla/database/table.php b/libraries/joomla/database/table.php
278index d4546c7..6d52e9d 100644
279--- a/libraries/joomla/database/table.php
280+++ b/libraries/joomla/database/table.php
281@@ -122,14 +122,14 @@ abstract class JTable extends JObject
282 if ($cache === null) {
283 // Lookup the fields for this table only once.
284 $name = $this->_tbl;
285- $fields = $this->_db->getTableColumns($name, false);
286+ $fields = $this->_db->getTableFields($name, false);
287
288- if (empty($fields)) {
289+ if (!isset($fields[$name])) {
290 $e = new JException(JText::_('JLIB_DATABASE_ERROR_COLUMNS_NOT_FOUND'));
291 $this->setError($e);
292 return false;
293 }
294- $cache = $fields;
295+ $cache = $fields[$name];
296 }
297
298 return $cache;
299diff --git a/libraries/joomla/database/table/usergroup.php b/libraries/joomla/database/table/usergroup.php
300index f3c80a0..3cdaa45 100644
301--- a/libraries/joomla/database/table/usergroup.php
302+++ b/libraries/joomla/database/table/usergroup.php
303@@ -215,8 +215,8 @@ class JTableUsergroup extends JTable
304
305 // Delete the user to usergroup mappings for the group(s) from the database.
306 $db->setQuery(
307- 'DELETE FROM '.$query->qn('#__user_usergroup_map') .
308- ' WHERE '.$query->qn('group_id').' IN ('.implode(',', $ids).')'
309+ 'DELETE FROM `#__user_usergroup_map`' .
310+ ' WHERE `group_id` IN ('.implode(',', $ids).')'
311 );
312 $db->query();
313
314diff --git a/libraries/joomla/environment/request.php b/libraries/joomla/environment/request.php
315index cb46bcf..d0f1d68 100644
316--- a/libraries/joomla/environment/request.php
317+++ b/libraries/joomla/environment/request.php
318@@ -10,6 +10,7 @@
319 defined('JPATH_PLATFORM') or die;
320
321 jimport('joomla.filter.filterinput');
322+jimport('joomla.log.log');
323
324 /**
325 * Create the request global object
326diff --git a/libraries/joomla/error/error.php b/libraries/joomla/error/error.php
327index 1bef837..d4a75a5 100644
328--- a/libraries/joomla/error/error.php
329+++ b/libraries/joomla/error/error.php
330@@ -41,7 +41,7 @@ abstract class JError
331 *
332 * @since 11.1
333 */
334- public static $legacy = false;
335+ public static $legacy = true;
336
337 /**
338 * Array of message lvwls
339diff --git a/libraries/joomla/factory.php b/libraries/joomla/factory.php
340index a398322..211c33a 100644
341--- a/libraries/joomla/factory.php
342+++ b/libraries/joomla/factory.php
343@@ -481,7 +481,7 @@ abstract class JFactory
344 $classname = 'JDate';
345 }
346 }
347- $key = $time . '-' . $tzOffset;
348+ //$key = $time . '-' . $tzOffset;
349
350 // if (!isset($instances[$classname][$key])) {
351 $tmp = new $classname($time, $tzOffset);
352@@ -632,8 +632,8 @@ abstract class JFactory
353 // Create a JMail object
354 $mail = JMail::getInstance();
355
356- // Set default sender
357- $mail->setSender(array ($mailfrom, $fromname));
358+ // Set default sender without Reply-to
359+ $mail->SetFrom(JMailHelper::cleanLine($mailfrom), JMailHelper::cleanLine($fromname), 0);
360
361 // Default mailer is to use PHP's mail function
362 switch ($mailer)
363diff --git a/libraries/joomla/form/fields/rules.php b/libraries/joomla/form/fields/rules.php
364index 4e2ff76..7529ce9 100644
365--- a/libraries/joomla/form/fields/rules.php
366+++ b/libraries/joomla/form/fields/rules.php
367@@ -282,7 +282,7 @@ class JFormFieldRules extends JFormField
368 $query = $db->getQuery(true)
369 ->select('a.id AS value, a.title AS text, COUNT(DISTINCT b.id) AS level, a.parent_id')
370 ->from('#__usergroups AS a')
371- ->leftJoin($query->qn('#__usergroups').' AS b ON a.lft > b.lft AND a.rgt < b.rgt')
372+ ->leftJoin('`#__usergroups` AS b ON a.lft > b.lft AND a.rgt < b.rgt')
373 ->group('a.id')
374 ->order('a.lft ASC');
375
376diff --git a/libraries/joomla/html/html/content.php b/libraries/joomla/html/html/content.php
377index 84353f6..9a97db4 100644
378--- a/libraries/joomla/html/html/content.php
379+++ b/libraries/joomla/html/html/content.php
380@@ -1,4 +1,4 @@
381-ke i <?php
382+<?php
383 /**
384 * @package Joomla.Platform
385 * @subpackage HTML
386diff --git a/libraries/joomla/html/parameter.php b/libraries/joomla/html/parameter.php
387index 413519a..02b6756 100644
388--- a/libraries/joomla/html/parameter.php
389+++ b/libraries/joomla/html/parameter.php
390@@ -139,11 +139,11 @@ class JParameter extends JRegistry
391 public function bind($data, $group = '_default')
392 {
393 if (is_array($data)) {
394- return $this->loadArray($data);
395+ return $this->loadArray($data, $group);
396 } elseif (is_object($data)) {
397- return $this->loadObject($data);
398+ return $this->loadObject($data, $group);
399 } else {
400- return $this->loadString($data);
401+ return $this->loadString($data, $group);
402 }
403 }
404
405diff --git a/libraries/joomla/html/parameter/element/templatestyle.php b/libraries/joomla/html/parameter/element/templatestyle.php
406index c533652..c951436 100644
407--- a/libraries/joomla/html/parameter/element/templatestyle.php
408+++ b/libraries/joomla/html/parameter/element/templatestyle.php
409@@ -60,7 +60,8 @@ class JElementTemplateStyle extends JElement {
410 $id = JRequest::getVar('cid', 0);
411 $db = JFactory::getDBO();
412 $query = $db->getQuery(true);
413- $query->select($query->qn('template_style_id'))->from($query->qn('#__menu'))->where($query->qn('id').' = '.(int) $id[0]);
414+ $query = 'SELECT `template_style_id` FROM `#__menu` '
415+ . 'WHERE id = '.$id[0];
416 $db->setQuery($query);
417 $result = $db->loadResult();
418 return $result;
419diff --git a/libraries/joomla/installer/adapters/component.php b/libraries/joomla/installer/adapters/component.php
420index a021f8b..0b64700 100644
421--- a/libraries/joomla/installer/adapters/component.php
422+++ b/libraries/joomla/installer/adapters/component.php
423@@ -593,8 +593,8 @@ class JInstallerComponent extends JAdapterInstance
424 }
425
426 // Set the installation target paths
427- $this->parent->setPath('extension_site', JPath::clean(JPATH_SITE . '/components/' . $this->get('element')));
428- $this->parent->setPath('extension_administrator', JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $this->get('element')));
429+ $this->parent->setPath('extension_site', JPath::clean(JPATH_SITE . "/components/" . $this->get('element')));
430+ $this->parent->setPath('extension_administrator', JPath::clean(JPATH_ADMINISTRATOR . "/components/" . $this->get('element')));
431 $this->parent->setPath('extension_root', $this->parent->getPath('extension_administrator')); // copy this as its used as a common base
432
433 /**
434@@ -1314,7 +1314,7 @@ class JInstallerComponent extends JAdapterInstance
435 * Since we have created a menu item, we add it to the installation step stack
436 * so that if we have to rollback the changes we can undo it.
437 */
438- $this->parent->pushStep(array ('type' => 'menu', 'id' => $component_id));
439+ $this->parent->pushStep(array ('type' => 'menu'));
440 }
441 // No menu element was specified, Let's make a generic menu item
442 else {
443@@ -1340,7 +1340,7 @@ class JInstallerComponent extends JAdapterInstance
444 * Since we have created a menu item, we add it to the installation step stack
445 * so that if we have to rollback the changes we can undo it.
446 */
447- $this->parent->pushStep(array ('type' => 'menu', 'id' => $component_id));
448+ $this->parent->pushStep(array ('type' => 'menu'));
449 }
450
451 $parent_id = $table->id;
452@@ -1414,7 +1414,7 @@ class JInstallerComponent extends JAdapterInstance
453 * Since we have created a menu item, we add it to the installation step stack
454 * so that if we have to rollback the changes we can undo it.
455 */
456- $this->parent->pushStep(array ('type' => 'menu', 'id' => $component_id));
457+ $this->parent->pushStep(array ('type' => 'menu'));
458 }
459
460 return true;
461@@ -1439,8 +1439,8 @@ class JInstallerComponent extends JAdapterInstance
462 $query = $db->getQuery(true);
463 $query->select('id');
464 $query->from('#__menu');
465- $query->where($query->qn('client_id').' = 1');
466- $query->where($query->qn('component_id').' = '.(int) $id);
467+ $query->where('`client_id` = 1');
468+ $query->where('`component_id` = '.(int) $id);
469
470 $db->setQuery($query);
471
472@@ -1481,9 +1481,9 @@ class JInstallerComponent extends JAdapterInstance
473 *
474 * @since 11.1
475 */
476- protected function _rollback_menu($step)
477+ protected function _rollback_menu()
478 {
479- return $this->_removeAdminMenus((object)array('extension_id' => $step['id']));
480+ return true;
481 }
482
483 /**
484@@ -1599,8 +1599,8 @@ class JInstallerComponent extends JAdapterInstance
485 }
486
487 // Set the installation target paths
488- $this->parent->setPath('extension_site', JPath::clean(JPATH_SITE . '/components/' . $this->get('element')));
489- $this->parent->setPath('extension_administrator', JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $this->get('element')));
490+ $this->parent->setPath('extension_site', JPath::clean(JPATH_SITE . "/components/" . $this->get('element')));
491+ $this->parent->setPath('extension_administrator', JPath::clean(JPATH_ADMINISTRATOR . "/components/" . $this->get('element')));
492 $this->parent->setPath('extension_root', $this->parent->getPath('extension_administrator')); // copy this as its used as a common base
493
494 /**
495diff --git a/libraries/joomla/installer/adapters/file.php b/libraries/joomla/installer/adapters/file.php
496index 7f90dbd..da0fe9c 100644
497--- a/libraries/joomla/installer/adapters/file.php
498+++ b/libraries/joomla/installer/adapters/file.php
499@@ -182,9 +182,9 @@ class JInstallerFile extends JAdapterInstance
500 // If it is, then update the table because if the files aren't there
501 // we can assume that it was (badly) uninstalled
502 // If it isn't, add an entry to extensions
503- $query = $db->getQuery(true);
504- $query->select($query->qn('extension_id'))->from($query->qn('#__extensions'));
505- $query->where($query->qn('type').' = '.$query->q('file'))->where($query->qn('element').' = '.$query->q($element));
506+ $query = 'SELECT `extension_id`' .
507+ ' FROM `#__extensions` ' .
508+ ' WHERE type = '. $db->Quote('file') .' AND element = '.$db->Quote($element);
509 $db->setQuery($query);
510 try {
511 $db->Query();
512@@ -536,9 +536,11 @@ class JInstallerFile extends JAdapterInstance
513 // Get a database connector object
514 $db = $this->parent->getDBO();
515
516- $query = $db->getQuery(true);
517- $query->select($query->qn('extension_id'))->from($query->qn('#__extensions'));
518- $query->where($query->qn('type').' = '.$query->q('file'))->where($query->qn('element').' = '.$query->q($extension));
519+ $query = 'SELECT `extension_id`' .
520+ ' FROM `#__extensions`' .
521+ ' WHERE element = '.$db->Quote($extension) .
522+ ' AND type = "file"';
523+
524 $db->setQuery($query);
525
526 try {
527diff --git a/libraries/joomla/installer/adapters/module.php b/libraries/joomla/installer/adapters/module.php
528index 9bc5f7e..fab5de8 100644
529--- a/libraries/joomla/installer/adapters/module.php
530+++ b/libraries/joomla/installer/adapters/module.php
531@@ -198,9 +198,10 @@ class JInstallerModule extends JAdapterInstance
532 // If it is, then update the table because if the files aren't there
533 // we can assume that it was (badly) uninstalled
534 // If it isn't, add an entry to extensions
535- $query = $db->getQuery(true);
536- $query->select($query->qn('extension_id'))->from($query->qn('#__extensions'));
537- $query->where($query->qn('element').' = '.$query->q($element))->where($query->qn('client_id').' = '.(int) $clientId);
538+ $query = 'SELECT `extension_id`' .
539+ ' FROM `#__extensions` ' .
540+ ' WHERE element = '.$db->Quote($element) .
541+ ' AND client_id = '.(int)$clientId;
542 $db->setQuery($query);
543
544 try
545@@ -732,10 +733,10 @@ class JInstallerModule extends JAdapterInstance
546 $this->parent->removeFiles($this->manifest->languages, $row->client_id);
547
548 // Let's delete all the module copies for the type we are uninstalling
549- $query = $db->getQuery(true);
550- $query->select($query->qn('id'))->from($query->qn('#__modules'));
551- $query->where($query->qn('module').' = '.$query->q($row->element));
552- $query->where($query->qn('client_id').' = '.(int) $row->client_id);
553+ $query = 'SELECT `id`' .
554+ ' FROM `#__modules`' .
555+ ' WHERE module = '.$db->Quote($row->element) .
556+ ' AND client_id = '.(int)$row->client_id;
557 $db->setQuery($query);
558
559 try
560diff --git a/libraries/joomla/installer/adapters/plugin.php b/libraries/joomla/installer/adapters/plugin.php
561index 6e1bbf4..167fb36 100644
562--- a/libraries/joomla/installer/adapters/plugin.php
563+++ b/libraries/joomla/installer/adapters/plugin.php
564@@ -179,10 +179,10 @@ class JInstallerPlugin extends JAdapterInstance
565 // Check if we should enable overwrite settings
566
567 // Check to see if a plugin by the same name is already installed.
568- $query = $db->getQuery(true);
569- $query->select($query->qn('extension_id'))->from($query->qn('#__extensions'));
570- $query->where($query->qn('folder').' = '.$query->q($group));
571- $query->where($query->qn('element').' = '.$query->q($element));
572+ $query = 'SELECT `extension_id`' .
573+ ' FROM `#__extensions`' .
574+ ' WHERE folder = '.$db->Quote($group) .
575+ ' AND element = '.$db->Quote($element);
576 $db->setQuery($query);
577 try {
578 $db->Query();
579diff --git a/libraries/joomla/session/storage/database.php b/libraries/joomla/session/storage/database.php
580index 55502e4..cb94e2f 100644
581--- a/libraries/joomla/session/storage/database.php
582+++ b/libraries/joomla/session/storage/database.php
583@@ -63,9 +63,11 @@ class JSessionStorageDatabase extends JSessionStorage
584
585 // Get the session data from the database table.
586 $query = $db->getQuery(true);
587- $query->select($query->qn('data'))->from($query->qn('#__session'));
588- $query->where($query->qn('session_id').' = '.$query->q($id));
589- $db->setQuery($query);
590+ $db->setQuery(
591+ 'SELECT `data`' .
592+ ' FROM `#__session`' .
593+ ' WHERE `session_id` = '.$db->quote($id)
594+ );
595 return (string) $db->loadResult();
596 }
597
598@@ -89,10 +91,10 @@ class JSessionStorageDatabase extends JSessionStorage
599 // Try to update the session data in the database table.
600 $query = $db->getQuery(true);
601 $db->setQuery(
602- 'UPDATE '.$query->qn('#__session') .
603- ' SET '.$query->qn('data').' = '.$query->q($data).',' .
604- ' '.$query->qn('time').' = '.(int) time() .
605- ' WHERE '.$query->qn('session_id').' = '.$query->q($id)
606+ 'UPDATE `#__session`' .
607+ ' SET `data` = '.$db->quote($data).',' .
608+ ' `time` = '.(int) time() .
609+ ' WHERE `session_id` = '.$db->quote($id)
610 );
611 if (!$db->query()) {
612 return false;
613@@ -102,9 +104,10 @@ class JSessionStorageDatabase extends JSessionStorage
614 return true;
615 } else {
616 // If the session does not exist, we need to insert the session.
617+ $query = $db->getQuery(true);
618 $db->setQuery(
619- 'INSERT INTO '.$query->qn('#__session').' ('.$query->qn('session_id').', '.$query->qn('data').', '.$query->qn('time').')' .
620- ' VALUES ('.$query->q($id).', '.$query->q($data).', '.(int) time().')'
621+ 'INSERT INTO `#__session` (`session_id`, `data`, `time`)' .
622+ ' VALUES ('.$db->quote($id).', '.$db->quote($data).', '.(int) time().')'
623 );
624 return (boolean) $db->query();
625 }
626@@ -130,8 +133,8 @@ class JSessionStorageDatabase extends JSessionStorage
627 // Remove a session from the database.
628 $query = $db->getQuery(true);
629 $db->setQuery(
630- 'DELETE FROM '.$query->qn('#__session') .
631- ' WHERE '.$query->qn('session_id').' = '.$query->q($id)
632+ 'DELETE FROM `#__session`' .
633+ ' WHERE `session_id` = '.$db->quote($id)
634 );
635 return (boolean) $db->query();
636 }
637@@ -157,8 +160,8 @@ class JSessionStorageDatabase extends JSessionStorage
638 // Remove expired sessions from the database.
639 $query = $db->getQuery(true);
640 $db->setQuery(
641- 'DELETE FROM '.$query->qn('#__session') .
642- ' WHERE '.$query->qn('time').' < '.(int) $past
643+ 'DELETE FROM `#__session`' .
644+ ' WHERE `time` < '.(int) $past
645 );
646 return (boolean) $db->query();
647 }
648diff --git a/libraries/joomla/updater/adapters/extension.php b/libraries/joomla/updater/adapters/extension.php
649index a79208f..3ba1c99 100644
650--- a/libraries/joomla/updater/adapters/extension.php
651+++ b/libraries/joomla/updater/adapters/extension.php
652@@ -95,7 +95,7 @@ class JUpdaterExtension extends JUpdateAdapter
653 $tag = $this->_getLastTag();
654 //if(!isset($this->$tag->_data)) $this->$tag->_data = '';
655 //$this->$tag->_data .= $data;
656- if(in_array($tag, $this->_updatecols) || $tag == 'INFOURL') {
657+ if(in_array($tag, $this->_updatecols)) {
658 $tag = strtolower($tag);
659 $this->current_update->$tag .= $data;
660 }
661diff --git a/libraries/joomla/updater/update.php b/libraries/joomla/updater/update.php
662index 69bb79a..862992b 100644
663--- a/libraries/joomla/updater/update.php
664+++ b/libraries/joomla/updater/update.php
665@@ -209,7 +209,7 @@ class JUpdate extends JObject
666 case 'UPDATE':
667 $ver = new JVersion;
668 $product = strtolower(JFilterInput::getInstance()->clean($ver->PRODUCT, 'cmd'));
669- if($product == $this->_current_update->targetplatform->name && preg_match('/'.$this->_current_update->targetplatform->version.'/', $ver->RELEASE))
670+ if($product == $this->_current_update->targetplatform->name && preg_match('/'.$this->_current_update->targetplatform->version.'/',$ver->RELEASE))
671 {
672 if(isset($this->_latest))
673 {
674diff --git a/libraries/joomla/user/authentication.php b/libraries/joomla/user/authentication.php
675index 594a097..85a0739 100644
676--- a/libraries/joomla/user/authentication.php
677+++ b/libraries/joomla/user/authentication.php
678@@ -136,7 +136,7 @@ class JAuthentication extends JObservable
679 * @see JAuthenticationResponse
680 * @since 11.1
681 */
682- public static function authenticate($credentials, $options=Array())
683+ public function authenticate($credentials, $options = Array())
684 {
685 // Initialise variables.
686 $auth = false;
687diff --git a/libraries/platform.php b/libraries/platform.php
688index fda9225..a3262b3 100644
689--- a/libraries/platform.php
690+++ b/libraries/platform.php
691@@ -23,7 +23,7 @@ final class JPlatform
692 // Maintenance version.
693 const MAINTENANCE = '0';
694 // Development STATUS.
695- const STATUS = 'Stable';
696+ const STATUS = 'Stable+Modified';
697 // Build number.
698 const BUILD = 0;
699 // Code name.