Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/joomla/staging' into ux-la…
Browse files Browse the repository at this point in the history
…nguage-button
  • Loading branch information
andrepereiradasilva committed Jan 2, 2016
2 parents 63c45ef + 30e724f commit 3021bf3
Show file tree
Hide file tree
Showing 107 changed files with 1,930 additions and 1,097 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Expand Up @@ -16,11 +16,11 @@ matrix:
- php: 5.4
env: INSTALL_APC="yes"
- php: 5.5
env: INSTALL_APCU_STABLE="yes"
env: INSTALL_APCU="yes"
- php: 5.6
env: RUN_PHPCS="yes" INSTALL_APCU_STABLE="yes"
env: RUN_PHPCS="yes" INSTALL_APCU="yes"
- php: 7.0
env: INSTALL_APCU_BETA="yes" INSTALL_MEMCACHED="no" INSTALL_REDIS="no"
env: INSTALL_APCU_BC_BETA="no" INSTALL_MEMCACHED="no" INSTALL_REDIS="no" # Disabled apcu_bc install until https://github.com/travis-ci/travis-ci/issues/5207 is resolved

services:
- memcached
Expand All @@ -39,8 +39,8 @@ before_script:
# Enable additional PHP extensions
- if [ "$INSTALL_MEMCACHED" == "yes" ]; then phpenv config-add build/travis/phpenv/memcached.ini; fi
- if [ "$INSTALL_APC" == "yes" ]; then phpenv config-add build/travis/phpenv/apc-$TRAVIS_PHP_VERSION.ini; fi
- if [ "$INSTALL_APCU_STABLE" == "yes" ]; then printf "\n" | pecl install apcu; fi
- if [ "$INSTALL_APCU_BETA" == "yes" ]; then printf "\n" | pecl install apcu-beta; fi
- if [ "$INSTALL_APCU" == "yes" ]; then printf "\n" | pecl install apcu-4.0.10; fi
- if [ "$INSTALL_APCU_BC_BETA" == "yes" ]; then printf "\n" | pecl install apcu_bc-beta; fi
- if [ "$INSTALL_REDIS" == "yes" ]; then phpenv config-add build/travis/phpenv/redis.ini; fi

script:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -3,7 +3,7 @@ Joomla! CMS™ [![Analytics](https://ga-beacon.appspot.com/UA-544070-3/joomla-cm

Build Status
---------------------
Travis-CI: [![Build Status](https://travis-ci.org/joomla/joomla-cms.png)](https://travis-ci.org/joomla/joomla-cms)
Travis-CI: [![Build Status](https://travis-ci.org/joomla/joomla-cms.svg?branch=staging)](https://travis-ci.org/joomla/joomla-cms)
Jenkins: [![Build Status](http://build.joomla.org/job/cms/badge/icon)](http://build.joomla.org/job/cms/)

What is this?
Expand Down
56 changes: 56 additions & 0 deletions administrator/components/com_admin/script.php
Expand Up @@ -37,6 +37,10 @@ public function update($installer)
$this->clearRadCache();
$this->updateAssets();
$this->clearStatsCache();

// VERY IMPORTANT! THIS METHOD SHOULD BE CALLED LAST, SINCE IT COULD
// LOGOUT ALL THE USERS
$this->flushSessions();
}

/**
Expand Down Expand Up @@ -1569,4 +1573,56 @@ public function updateAssets()

return true;
}

/**
* If we migrated the session from the previous system, flush all the active sessions.
* Otherwise users will be logged in, but not able to do anything since they don't have
* a valid session
*
* @return boolean
*/
public function flushSessions()
{
/**
* The session may have not been started yet (e.g. CLI-based Joomla! update scripts). Let's make sure we do
* have a valid session.
*/
JFactory::getSession()->restart();

// If $_SESSION['__default'] is no longer set we do not have a migrated session, therefore we can quit.
if (!isset($_SESSION['__default']))
{
return true;
}

$db = JFactory::getDbo();

try
{
switch ($db->name)
{
// MySQL database, use TRUNCATE (faster, more resilient)
case 'pdomysql':
case 'mysql':
case 'mysqli':
$db->truncateTable($db->qn('#__sessions'));
break;

// Non-MySQL databases, use a simple DELETE FROM query
default:
$query = $db->getQuery(true)
->delete($db->qn('#__sessions'));
$db->setQuery($query)->execute();
break;
}
}
catch (Exception $e)
{
echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '<br />';

return false;
}

return true;
}
}
@@ -1,2 +1,2 @@
ALTER TABLE `#__redirect_links` ADD header smallint(3) NOT NULL DEFAULT 301;
ALTER TABLE `#__redirect_links` MODIFY new_url varchar(255);
ALTER TABLE `#__redirect_links` ADD COLUMN `header` smallint(3) NOT NULL DEFAULT 301;
ALTER TABLE `#__redirect_links` MODIFY `new_url` varchar(255);
7 changes: 5 additions & 2 deletions administrator/components/com_categories/models/category.php
Expand Up @@ -574,9 +574,12 @@ public function save($data)
// Adding self to the association
$associations = $data['associations'];

// Unset any invalid associations
$associations = Joomla\Utilities\ArrayHelper::toInteger($associations);

foreach ($associations as $tag => $id)
{
if (empty($id))
if (!$id)
{
unset($associations[$tag]);
}
Expand Down Expand Up @@ -620,7 +623,7 @@ public function save($data)

foreach ($associations as $id)
{
$query->values($id . ',' . $db->quote($this->associationsContext) . ',' . $db->quote($key));
$query->values(((int) $id) . ',' . $db->quote($this->associationsContext) . ',' . $db->quote($key));
}

$db->setQuery($query);
Expand Down

This file was deleted.

16 changes: 0 additions & 16 deletions administrator/components/com_config/controllers/application.php
Expand Up @@ -66,22 +66,6 @@ public function cancel()
return $controller->execute();
}

/**
* Method to refresh the help display.
*
* @return void
*
* @deprecated 4.0 Use ConfigControllerApplicationRefreshhelp instead.
*/
public function refreshHelp()
{
JLog::add('ConfigControllerApplication is deprecated. Use ConfigControllerApplicationRefreshhelp instead.', JLog::WARNING, 'deprecated');

$controller = new ConfigControllerApplicationRefreshhelp;

$controller->execute();
}

/**
* Method to remove the root property from the configuration.
*
Expand Down
Expand Up @@ -948,7 +948,9 @@
name="helpurl"
type="helpsite"
label="COM_CONFIG_FIELD_HELP_SERVER_LABEL"
description="COM_CONFIG_FIELD_HELP_SERVER_DESC" />
description="COM_CONFIG_FIELD_HELP_SERVER_DESC"
showDefault="false"
/>
</fieldset>

<fieldset
Expand Down
Expand Up @@ -76,16 +76,17 @@
<option value="a.name DESC">JGLOBAL_TITLE_DESC</option>
<option value="category_title ASC">JCATEGORY_ASC</option>
<option value="category_title DESC">JCATEGORY_DESC</option>
<option value="a.access ASC">JGRID_HEADING_ACCESS_ASC</option>
<option value="a.access DESC">JGRID_HEADING_ACCESS_DESC</option>
<option value="ul.name ASC">COM_CONTACT_FIELD_LINKED_USER_LABEL_ASC</option>
<option value="ul.name DESC">COM_CONTACT_FIELD_LINKED_USER_LABEL_DESC</option>
<option value="language ASC">JGRID_HEADING_LANGUAGE_ASC</option>
<option value="language DESC">JGRID_HEADING_LANGUAGE_DESC</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
<option value="a.featured ASC">JFEATURED_ASC</option>
<option value="a.featured DESC">JFEATURED_DESC</option>
<option value="a.access ASC">JGRID_HEADING_ACCESS_ASC</option>
<option value="a.access DESC">JGRID_HEADING_ACCESS_DESC</option>
<option value="a.language ASC">JGRID_HEADING_LANGUAGE_ASC</option>
<option value="a.language DESC">JGRID_HEADING_LANGUAGE_DESC</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>

</field>
<field
name="limit"
Expand Down
Expand Up @@ -54,36 +54,36 @@
<thead>
<tr>
<th width="1%" class="nowrap center hidden-phone">
<?php echo JHtml::_('grid.sort', '<span class="icon-menu-2"></span>', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>
<?php echo JHtml::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<th width="1%" class="center">
<?php echo JHtml::_('grid.checkall'); ?>
</th>
<th width="1%" style="min-width:55px" class="nowrap center">
<?php echo JHtml::_('grid.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
</th>
<th>
<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.name', $listDirn, $listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.name', $listDirn, $listOrder); ?>
</th>
<th class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'COM_CONTACT_FIELD_LINKED_USER_LABEL', 'ul.name', $listDirn, $listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'COM_CONTACT_FIELD_LINKED_USER_LABEL', 'ul.name', $listDirn, $listOrder); ?>
</th>
<th width="5%" class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'JFEATURED', 'a.featured', $listDirn, $listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'JFEATURED', 'a.featured', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?>
</th>
<?php if ($assoc) : ?>
<th width="5%" class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'COM_CONTACT_HEADING_ASSOCIATION', 'association', $listDirn, $listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'COM_CONTACT_HEADING_ASSOCIATION', 'association', $listDirn, $listOrder); ?>
</th>
<?php endif;?>
<th width="5%" class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder); ?>
</th>
<th width="1%" class="nowrap hidden-phone">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
Expand Down
Expand Up @@ -92,7 +92,7 @@ public static function mapslist()

// Compile the options.
$options = array();
$options[] = JHtml::_('select.option', '1', JText::_('COM_FINDER_MAPS_BRANCHES'));
$options[] = JHtml::_('select.option', '1', JText::_('COM_FINDER_MAPS_SELECT_BRANCH'));

foreach ($rows as $row)
{
Expand Down
74 changes: 36 additions & 38 deletions administrator/components/com_finder/models/forms/filter_maps.xml
@@ -1,44 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<form>
<fieldset addfieldpath="/administrator/components/com_templates/models/fields" />
<fieldset addfieldpath="/administrator/components/com_templates/models/fields" />

<fields name="filter">
<field
name="search"
type="text"
label="COM_FINDER_FILTER_SEARCH_DESC"
hint="JSEARCH_FILTER"
/>
<field
name="state"
type="status"
filter="*,0,1"
label="COM_FINDER_FILTER_PUBLISHED"
description="COM_FINDER_FILTER_PUBLISHED_DESC"
onchange="this.form.submit();"
>
<option value="">JOPTION_SELECT_PUBLISHED</option>
</field>
<fields name="filter">
<field
name="search"
type="text"
label="COM_FINDER_FILTER_SEARCH_DESC"
hint="JSEARCH_FILTER"
/>
<field
name="state"
type="status"
filter="*,0,1"
label="COM_FINDER_FILTER_PUBLISHED"
description="COM_FINDER_FILTER_PUBLISHED_DESC"
onchange="this.form.submit();"
>
<option value="">JOPTION_SELECT_PUBLISHED</option>
</field>

<field
name="branch"
type="branches"
default="0"
onchange="this.form.submit();"
>
<option value="">COM_FINDER_MAPS_SELECT_BRANCHE</option>
</field>
<field
name="branch"
type="branches"
default="0"
onchange="this.form.submit();"
/>

</fields>
<fields name="list">
<field
name="limit"
type="limitbox"
class="input-mini"
default="25"
label="COM_FINDER_LIST_LIMIT"
description="COM_FINDER_LIST_LIMIT_DESC"
onchange="this.form.submit();"
/>
</fields>
</fields>
<fields name="list">
<field
name="limit"
type="limitbox"
class="input-mini"
default="25"
label="COM_FINDER_LIST_LIMIT"
description="COM_FINDER_LIST_LIMIT_DESC"
onchange="this.form.submit();"
/>
</fields>
</form>
Expand Up @@ -113,7 +113,7 @@
<td>
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'index.', $canChange, 'cb'); ?>
</td>
<td class="pull-left break-word">
<td class="break-word">
<label for="cb<?php echo $i ?>">
<strong>
<?php echo $this->escape($item->title); ?>
Expand Down

0 comments on commit 3021bf3

Please sign in to comment.