Skip to content

Commit e912c5a

Browse files
author
Michael Babker
committed
Prepare 3.2.3
1 parent 3673770 commit e912c5a

File tree

14 files changed

+263
-192
lines changed

14 files changed

+263
-192
lines changed

administrator/includes/framework.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
// Installation check, and check on removal of the install directory.
1515
if (!file_exists(JPATH_CONFIGURATION . '/configuration.php')
16-
|| (filesize(JPATH_CONFIGURATION . '/configuration.php') < 10) /*|| file_exists(JPATH_INSTALLATION . '/index.php')*/)
16+
|| (filesize(JPATH_CONFIGURATION . '/configuration.php') < 10) || file_exists(JPATH_INSTALLATION . '/index.php'))
1717
{
1818
if (file_exists(JPATH_INSTALLATION . '/index.php'))
1919
{

administrator/language/en-GB/en-GB.plg_authentication_gmail.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
; Note : All ini files need to be saved as UTF-8
55

66
PLG_AUTHENTICATION_GMAIL="Authentication - GMail"
7+
PLG_GMAIL_ERROR_ACCOUNT_DISABLED_OR_NOT_ACTIVATED="Your local account is disabled or not activated"
8+
PLG_GMAIL_ERROR_LOCAL_USERNAME_CONFLICT="A local username conflicts with your GMail user"
79
PLG_GMAIL_FIELD_APPLYSUFFIX_DESC="Options for applying the suffix: Don't apply the suffix, only apply the suffix if missing (any user supplied suffix will be used) or always apply the suffix replacing any user supplied suffix"
810
PLG_GMAIL_FIELD_APPLYSUFFIX_LABEL="Apply Username Suffix"
11+
PLG_GMAIL_FIELD_BACKEND_LOGIN_DESC="Allow backend login via GMail account?"
12+
PLG_GMAIL_FIELD_BACKEND_LOGIN_LABEL="Backend login"
913
PLG_GMAIL_FIELD_SUFFIX_DESC="A suffix to use for the username, typically gmail.com (or googlemail.com) is the suffix but you may wish to use a Google Apps for Your Domain suffix. This doesn't include the @ symbol, if left blank username suffix will be ignored."
1014
PLG_GMAIL_FIELD_SUFFIX_LABEL="Username Suffix"
1115
PLG_GMAIL_FIELD_USER_BLACKLIST_DESC="A list of usernames not permitted to log in via the GMail plugin. The user names should be separated by a comma."

administrator/manifests/files/joomla.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<authorUrl>www.joomla.org</authorUrl>
77
<copyright>(C) 2005 - 2014 Open Source Matters. All rights reserved</copyright>
88
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
9-
<version>3.2.3-dev</version>
10-
<creationDate>February 2014</creationDate>
9+
<version>3.2.3</version>
10+
<creationDate>March 2014</creationDate>
1111
<description>FILES_JOOMLA_XML_DESCRIPTION</description>
1212

1313
<scriptfile>administrator/components/com_admin/script.php</scriptfile>

components/com_tags/models/tag.php

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ protected function getListQuery()
143143
$language = JComponentHelper::getParams('com_tags')->get('tag_list_language_filter', 'all');
144144
}
145145

146-
$listQuery = New JHelperTags;
147-
$query = $listQuery->getTagItemsQuery($tagId, $typesr, $includeChildren, $orderByOption, $orderDir, $matchAll, $language, $stateFilter);
146+
$tagsHelper = new JHelperTags;
147+
$query = $tagsHelper->getTagItemsQuery($tagId, $typesr, $includeChildren, $orderByOption, $orderDir, $matchAll, $language, $stateFilter);
148+
148149
if ($this->state->get('list.filter'))
149150
{
150151
$query->where($this->_db->quoteName('c.core_title') . ' LIKE ' . $this->_db->quote('%' . $this->state->get('list.filter') . '%'));
@@ -174,23 +175,26 @@ protected function populateState($ordering = 'c.core_title', $direction = 'ASC')
174175
$this->setState('params', $params);
175176

176177
// Load state from the request.
177-
$pk = $app->input->getObject('id');
178-
$pk = (array) $pk;
179-
$pkString = '';
178+
$ids = $app->input->get('id', array(), 'array');
180179

181-
foreach ($pk as $id)
182-
{
183-
$pkString .= (int) $id . ',';
184-
}
185-
$pkString = rtrim($pkString, ',');
180+
JArrayHelper::toInteger($ids);
181+
182+
$pkString = implode(',', $ids);
186183

187184
$this->setState('tag.id', $pkString);
188185

189186
// Get the selected list of types from the request. If none are specified all are used.
190-
$typesr = $app->input->getObject('types');
187+
$typesr = $app->input->get('types', array(), 'array');
188+
191189
if ($typesr)
192190
{
193-
$typesr = (array) $typesr;
191+
// Implode is needed because the array can contain a string with a coma separated list of ids
192+
$typesr = implode(',', $typesr);
193+
194+
// Sanitise
195+
$typesr = explode(',', $typesr);
196+
JArrayHelper::toInteger($typesr);
197+
194198
$this->setState('tag.typesr', $typesr);
195199
}
196200

@@ -199,6 +203,7 @@ protected function populateState($ordering = 'c.core_title', $direction = 'ASC')
199203

200204
// List state information
201205
$format = $app->input->getWord('format');
206+
202207
if ($format == 'feed')
203208
{
204209
$limit = $app->getCfg('feed_limit');
@@ -214,6 +219,7 @@ protected function populateState($ordering = 'c.core_title', $direction = 'ASC')
214219
$limit = $this->state->params->get('maximum', 20);
215220
}
216221
}
222+
217223
$this->setState('list.limit', $limit);
218224

219225
$offset = $app->input->get('limitstart', 0, 'uint');
@@ -222,18 +228,22 @@ protected function populateState($ordering = 'c.core_title', $direction = 'ASC')
222228
$itemid = $pkString . ':' . $app->input->get('Itemid', 0, 'int');
223229
$orderCol = $app->getUserStateFromRequest('com_tags.tag.list.' . $itemid . '.filter_order', 'filter_order', '', 'string');
224230
$orderCol = !$orderCol ? $this->state->params->get('tag_list_orderby', 'c.core_title') : $orderCol;
231+
225232
if (!in_array($orderCol, $this->filter_fields))
226233
{
227234
$orderCol = 'c.core_title';
228235
}
236+
229237
$this->setState('list.ordering', $orderCol);
230238

231239
$listOrder = $app->getUserStateFromRequest('com_tags.tag.list.' . $itemid . '.filter_order_direction', 'filter_order_Dir', '', 'string');
232240
$listOrder = !$listOrder ? $this->state->params->get('tag_list_orderby_direction', 'ASC') : $listOrder;
241+
233242
if (!in_array(strtoupper($listOrder), array('ASC', 'DESC', '')))
234243
{
235244
$listOrder = 'ASC';
236245
}
246+
237247
$this->setState('list.direction', $listOrder);
238248

239249
$this->setState('tag.state', 1);

includes/framework.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
// Installation check, and check on removal of the install directory.
1515
if (!file_exists(JPATH_CONFIGURATION . '/configuration.php')
16-
|| (filesize(JPATH_CONFIGURATION . '/configuration.php') < 10) /*|| file_exists(JPATH_INSTALLATION . '/index.php')*/)
16+
|| (filesize(JPATH_CONFIGURATION . '/configuration.php') < 10) || file_exists(JPATH_INSTALLATION . '/index.php'))
1717
{
1818
if (file_exists(JPATH_INSTALLATION . '/index.php'))
1919
{

libraries/cms/helper/tags.php

Lines changed: 63 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,6 @@ public function deleteTagData(JTable $table, $contentItemId)
367367
*/
368368
public function getItemTags($contentType, $id, $getTagData = true)
369369
{
370-
if (is_array($id))
371-
{
372-
$id = implode($id);
373-
}
374-
375370
// Initialize some variables.
376371
$db = JFactory::getDbo();
377372
$query = $db->getQuery(true)
@@ -380,7 +375,7 @@ public function getItemTags($contentType, $id, $getTagData = true)
380375
->where(
381376
array(
382377
$db->quoteName('m.type_alias') . ' = ' . $db->quote($contentType),
383-
$db->quoteName('m.content_item_id') . ' = ' . $id,
378+
$db->quoteName('m.content_item_id') . ' = ' . (int) $id,
384379
$db->quoteName('t.published') . ' = 1'
385380
)
386381
);
@@ -420,45 +415,51 @@ public function getItemTags($contentType, $id, $getTagData = true)
420415
* Method to get a list of tags for a given item.
421416
* Normally used for displaying a list of tags within a layout
422417
*
423-
* @param integer $id The id (primary key) of the item to be tagged.
424-
* @param string $prefix Dot separated string with the option and view to be used for a url.
418+
* @param mixed $ids The id or array of ids (primary key) of the item to be tagged.
419+
* @param string $prefix Dot separated string with the option and view to be used for a url.
425420
*
426421
* @return string Comma separated list of tag Ids.
427422
*
428423
* @since 3.1
429424
*/
430-
public function getTagIds($id, $prefix)
425+
public function getTagIds($ids, $prefix)
431426
{
432-
if (!empty($id))
427+
if (empty($ids))
433428
{
434-
if (is_array($id))
435-
{
436-
$id = implode(',', $id);
437-
}
429+
return;
430+
}
438431

439-
$db = JFactory::getDbo();
432+
/**
433+
* Ids possible formats:
434+
* ---------------------
435+
* $id = 1;
436+
* $id = array(1,2);
437+
* $id = array('1,3,4,19');
438+
* $id = '1,3';
439+
*/
440+
$ids = (array) $ids;
441+
$ids = implode(',', $ids);
442+
$ids = explode(',', $ids);
443+
JArrayHelper::toInteger($ids);
440444

441-
// Load the tags.
442-
$query = $db->getQuery(true)
443-
->select($db->quoteName('t.id'))
444-
->from($db->quoteName('#__tags') . ' AS t ')
445-
->join(
446-
'INNER', $db->quoteName('#__contentitem_tag_map') . ' AS m'
447-
. ' ON ' . $db->quoteName('m.tag_id') . ' = ' . $db->quoteName('t.id')
448-
. ' AND ' . $db->quoteName('m.type_alias') . ' = ' . $db->quote($prefix)
449-
. ' AND ' . $db->quoteName('m.content_item_id') . ' IN ( ' . $id . ')'
450-
);
445+
$db = JFactory::getDbo();
451446

452-
$db->setQuery($query);
447+
// Load the tags.
448+
$query = $db->getQuery(true)
449+
->select($db->quoteName('t.id'))
450+
->from($db->quoteName('#__tags') . ' AS t ')
451+
->join(
452+
'INNER', $db->quoteName('#__contentitem_tag_map') . ' AS m'
453+
. ' ON ' . $db->quoteName('m.tag_id') . ' = ' . $db->quoteName('t.id')
454+
. ' AND ' . $db->quoteName('m.type_alias') . ' = ' . $db->quote($prefix)
455+
. ' AND ' . $db->quoteName('m.content_item_id') . ' IN ( ' . implode(',', $ids) . ')'
456+
);
453457

454-
// Add the tags to the content data.
455-
$tagsList = $db->loadColumn();
456-
$this->tags = implode(',', $tagsList);
457-
}
458-
else
459-
{
460-
$this->tags = null;
461-
}
458+
$db->setQuery($query);
459+
460+
// Add the tags to the content data.
461+
$tagsList = $db->loadColumn();
462+
$this->tags = implode(',', $tagsList);
462463

463464
return $this->tags;
464465
}
@@ -491,39 +492,30 @@ public function getTagItemsQuery($tagId, $typesr = null, $includeChildren = fals
491492

492493
$ntagsr = substr_count($tagId, ',') + 1;
493494

495+
// Force ids to array and sanitize
496+
$tagIds = (array) $tagId;
497+
$tagIds = implode(',', $tagIds);
498+
$tagIds = explode(',', $tagIds);
499+
JArrayHelper::toInteger($tagIds);
500+
494501
// If we want to include children we have to adjust the list of tags.
495502
// We do not search child tags when the match all option is selected.
496503
if ($includeChildren)
497504
{
498-
if (!is_array($tagId))
499-
{
500-
$tagIdArray = explode(',', $tagId);
501-
}
502-
else
503-
{
504-
$tagIdArray = $tagId;
505-
}
506-
507505
$tagTreeList = '';
506+
$tagTreeArray = array();
508507

509-
foreach ($tagIdArray as $tag)
508+
foreach ($tagIds as $tag)
510509
{
511-
if ($this->getTagTreeArray($tag, $tagTreeArray))
512-
{
513-
$tagTreeList .= implode(',', $this->getTagTreeArray($tag, $tagTreeArray)) . ',';
514-
}
510+
$this->getTagTreeArray($tag, $tagTreeArray);
515511
}
516512

517-
if ($tagTreeList)
518-
{
519-
$tagId = trim($tagTreeList, ',');
520-
}
513+
$tagIds = array_unique(array_merge($tagIds, $tagTreeArray));
521514
}
522515

523-
if (is_array($tagId))
524-
{
525-
$tagId = implode(',', $tagId);
526-
}
516+
// Sanitize filter states
517+
$stateFilters = explode(',', $stateFilter);
518+
JArrayHelper::toInteger($stateFilters);
527519

528520
// M is the mapping table. C is the core_content table. Ct is the content_types table.
529521
$query->select('m.type_alias, m.content_item_id, m.core_content_id, count(m.tag_id) AS match_count, MAX(m.tag_date) as tag_date, MAX(c.core_title) AS core_title')
@@ -545,8 +537,8 @@ public function getTagItemsQuery($tagId, $typesr = null, $includeChildren = fals
545537

546538
->join('LEFT', '#__users AS ua ON ua.id = c.core_created_user_id')
547539

548-
->where('m.tag_id IN (' . $tagId . ')')
549-
->where('c.core_state IN (' . $stateFilter . ')');
540+
->where('m.tag_id IN (' . implode(',', $tagIds) . ')')
541+
->where('c.core_state IN (' . implode(',', $stateFilters) . ')');
550542

551543
// Optionally filter on language
552544
if (empty($language))
@@ -585,7 +577,7 @@ public function getTagItemsQuery($tagId, $typesr = null, $includeChildren = fals
585577
if ($ntagsr > 1 && $anyOrAll != 1 && $includeChildren != 1)
586578
{
587579
// The number of results should equal the number of tags requested.
588-
$query->having("COUNT('m.tag_id') = " . $ntagsr);
580+
$query->having("COUNT('m.tag_id') = " . (int) $ntagsr);
589581
}
590582

591583
// Set up the order by using the option chosen
@@ -595,7 +587,7 @@ public function getTagItemsQuery($tagId, $typesr = null, $includeChildren = fals
595587
}
596588
else
597589
{
598-
$orderBy = 'MAX(' . $orderByOption . ')';
590+
$orderBy = 'MAX(' . $db->quoteName($orderByOption) . ')';
599591
}
600592

601593
$query->order($orderBy . ' ' . $orderDir);
@@ -619,13 +611,12 @@ public function getTagNames($tagIds)
619611
if (is_array($tagIds) && count($tagIds) > 0)
620612
{
621613
JArrayHelper::toInteger($tagIds);
622-
$tagIds = implode(',', $tagIds);
623614

624615
$db = JFactory::getDbo();
625616
$query = $db->getQuery(true)
626617
->select($db->quoteName('title'))
627618
->from($db->quoteName('#__tags'))
628-
->where($db->quoteName('id') . ' IN (' . $tagIds . ')');
619+
->where($db->quoteName('id') . ' IN (' . implode(',', $tagIds) . ')');
629620
$query->order($db->quoteName('title'));
630621

631622
$db->setQuery($query);
@@ -652,7 +643,7 @@ public function getTagTreeArray($id, &$tagTreeArray = array())
652643

653644
if ($table->isLeaf($id))
654645
{
655-
$tagTreeArray[] .= $id;
646+
$tagTreeArray[] = $id;
656647

657648
return $tagTreeArray;
658649
}
@@ -709,18 +700,19 @@ public static function getTypes($arrayType = 'objectList', $selectTypes = null,
709700

710701
if (!empty($selectTypes))
711702
{
712-
if (is_array($selectTypes))
713-
{
714-
$selectTypes = implode(',', $selectTypes);
715-
}
703+
$selectTypes = (array) $selectTypes;
716704

717705
if ($useAlias)
718706
{
719-
$query->where($db->quoteName('type_alias') . ' IN (' . $db->quote($selectTypes) . ')');
707+
$selectTypes = array_map(array($db, 'quote'), $selectTypes);
708+
709+
$query->where($db->quoteName('type_alias') . ' IN (' . implode(',', $selectTypes) . ')');
720710
}
721711
else
722712
{
723-
$query->where($db->quoteName('type_id') . ' IN (' . $selectTypes . ')');
713+
JArrayHelper::toInteger($selectTypes);
714+
715+
$query->where($db->quoteName('type_id') . ' IN (' . implode(',', $selectTypes) . ')');
724716
}
725717
}
726718

@@ -1024,6 +1016,8 @@ public function unTagItem($contentId, $table, $tags = array())
10241016

10251017
if (is_array($tags) && count($tags) > 0)
10261018
{
1019+
JArrayHelper::toInteger($tags);
1020+
10271021
$query->where($db->quoteName('tag_id') . ' IN ' . implode(',', $tags));
10281022
}
10291023

libraries/cms/version/version.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ final class JVersion
2525
public $RELEASE = '3.2';
2626

2727
/** @var string Maintenance version. */
28-
public $DEV_LEVEL = '3-dev';
28+
public $DEV_LEVEL = '3';
2929

3030
/** @var string Development STATUS. */
31-
public $DEV_STATUS = 'Development';
31+
public $DEV_STATUS = 'Stable';
3232

3333
/** @var string Build number. */
3434
public $BUILD = '';
@@ -37,10 +37,10 @@ final class JVersion
3737
public $CODENAME = 'Ember';
3838

3939
/** @var string Release date. */
40-
public $RELDATE = '6-February-2014';
40+
public $RELDATE = '6-March-2014';
4141

4242
/** @var string Release time. */
43-
public $RELTIME = '16:00';
43+
public $RELTIME = '14:30';
4444

4545
/** @var string Release timezone. */
4646
public $RELTZ = 'GMT';

0 commit comments

Comments
 (0)