Skip to content

Commit

Permalink
Merge branch 'staging' into improveReinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
zero-24 committed Aug 11, 2016
2 parents a188bb5 + fca5d57 commit 1e4c71c
Show file tree
Hide file tree
Showing 170 changed files with 61 additions and 20,673 deletions.
10 changes: 0 additions & 10 deletions .gitignore
Expand Up @@ -18,16 +18,6 @@

# Test Related Files #
/phpunit.xml
/tests/system/webdriver/tests/logs/
/tests/system/servers/configdef.php
codecept.phar
tests/codeception/_output/*
tests/codeception/vendor/*
tests/codeception/testingsite*
tests/codeception/tests/acceptance.suite.yml
tests/codeception/tests/acceptance/*Tester.php
tests/codeception/tests/functional/*Tester.php
tests/codeception/tests/unit/*Tester.php

# phpDocumentor Logs #
phpdoc-*
Expand Down
1 change: 1 addition & 0 deletions administrator/components/com_checkin/models/checkin.php
Expand Up @@ -238,6 +238,7 @@ public function getItems()

// Pagination
$limit = (int) $this->getState('list.limit');

if ($limit !== 0)
{
$this->items = array_slice($results, $this->getState('list.start'), $limit);
Expand Down
Expand Up @@ -148,7 +148,7 @@
<?php echo JStringPunycode::emailToUTF8($this->escape($item->email)); ?>
</td>
<td class="hidden-phone hidden-tablet">
<?php if ($item->lastvisitDate != '0000-00-00 00:00:00'):?>
<?php if ($item->lastvisitDate != $this->db->getNullDate()):?>
<?php echo JHtml::_('date', $item->lastvisitDate, 'Y-m-d H:i:s'); ?>
<?php else:?>
<?php echo JText::_('JNEVER'); ?>
Expand Down
33 changes: 33 additions & 0 deletions administrator/components/com_users/views/users/view.html.php
Expand Up @@ -39,6 +39,38 @@ class UsersViewUsers extends JViewLegacy
* @since 1.6
*/
protected $state;

/**
* A JForm instance with filter fields.
*
* @var JForm
* @since 3.6
*/
public $filterForm;

/**
* An array with active filters.
*
* @var array
* @since 3.6
*/
public $activeFilters;

/**
* An ACL object to verify user rights.
*
* @var JObject
* @since 3.6
*/
protected $canDo;

/**
* An instance of JDatabaseDriver.
*
* @var JDatabaseDriver
* @since 3.6
*/
protected $db;

/**
* Display the view
Expand All @@ -55,6 +87,7 @@ public function display($tpl = null)
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
$this->canDo = JHelperContent::getActions('com_users');
$this->db = JFactory::getDbo();

UsersHelper::addSubmenu('users');

Expand Down
Expand Up @@ -190,7 +190,7 @@
<?php echo $this->escape($item->email); ?>
</td>
<td class="center">
<?php if ($item->lastvisitDate != '0000-00-00 00:00:00') : ?>
<?php if ($item->lastvisitDate != $this->db->getNullDate()) : ?>
<?php echo JHtml::_('date', $item->lastvisitDate, 'Y-m-d H:i:s'); ?>
<?php else:?>
<?php echo JText::_('JNEVER'); ?>
Expand Down
Expand Up @@ -95,7 +95,7 @@
<?php endif; ?>

<?php if ($this->item->state == 0 || strtotime($this->item->publish_up) > strtotime(JFactory::getDate())
|| ((strtotime($this->item->publish_down) < strtotime(JFactory::getDate())) && $this->item->publish_down != '0000-00-00 00:00:00' )) : ?>
|| ((strtotime($this->item->publish_down) < strtotime(JFactory::getDate())) && $this->item->publish_down != $this->db->getNullDate() )) : ?>
</div>
<?php endif; ?>

Expand Down
10 changes: 9 additions & 1 deletion components/com_content/views/featured/view.html.php
Expand Up @@ -31,6 +31,14 @@ class ContentViewFeatured extends JViewLegacy
protected $link_items = array();

protected $columns = 1;

/**
* An instance of JDatabaseDriver.
*
* @var JDatabaseDriver
* @since 3.6
*/
protected $db;

/**
* Execute and display a template script.
Expand Down Expand Up @@ -62,7 +70,6 @@ public function display($tpl = null)
// Get the metrics for the structural page layout.
$numLeading = (int) $params->def('num_leading_articles', 1);
$numIntro = (int) $params->def('num_intro_articles', 4);
$numLinks = (int) $params->def('num_links', 4);

// Compute the article slugs and prepare introtext (runs content plugins).
foreach ($items as &$item)
Expand Down Expand Up @@ -145,6 +152,7 @@ public function display($tpl = null)
$this->items = &$items;
$this->pagination = &$pagination;
$this->user = &$user;
$this->db = JFactory::getDbo();

$this->_prepareDocument();

Expand Down
2 changes: 1 addition & 1 deletion components/com_users/views/profile/tmpl/default_core.php
Expand Up @@ -38,7 +38,7 @@
<?php echo JText::_('COM_USERS_PROFILE_LAST_VISITED_DATE_LABEL'); ?>
</dt>

<?php if ($this->data->lastvisitDate != '0000-00-00 00:00:00') : ?>
<?php if ($this->data->lastvisitDate != $this->db->getNullDate()) : ?>
<dd>
<?php echo JHtml::_('date', $this->data->lastvisitDate); ?>
</dd>
Expand Down
9 changes: 9 additions & 0 deletions components/com_users/views/profile/view.html.php
Expand Up @@ -24,6 +24,14 @@ class UsersViewProfile extends JViewLegacy

protected $state;

/**
* An instance of JDatabaseDriver.
*
* @var JDatabaseDriver
* @since 3.6
*/
protected $db;

/**
* Execute and display a template script.
*
Expand All @@ -43,6 +51,7 @@ public function display($tpl = null)
$this->twofactorform = $this->get('Twofactorform');
$this->twofactormethods = UsersHelper::getTwoFactorMethods();
$this->otpConfig = $this->get('OtpConfig');
$this->db = JFactory::getDbo();

// Check for errors.
if (count($errors = $this->get('Errors')))
Expand Down
2 changes: 1 addition & 1 deletion installation/sql/postgresql/sample_data.sql
Expand Up @@ -44,7 +44,7 @@ INSERT INTO "#__assets" VALUES
(36,1,69,70,1,'com_tags','com_tags','{"core.admin":{"8":1},"core.manage":{"7":1},"core.create":{"6":1,"3":1},"core.delete":{"6":1},"core.edit":{"6":1,"4":1},"core.edit.state":{"6":1,"5":1}}'),
(37,1,71,72,1,'com_contenthistory','com_contenthistory','{}'),
(38,1,73,74,1,'com_ajax','com_ajax','{}'),
(39,1,75,76,1,'com_postinstall','com_postinstall','{}n');
(39,1,75,76,1,'com_postinstall','com_postinstall','{}');

SELECT setval('#__assets_id_seq', max(id)) FROM #__assets;

Expand Down
5 changes: 1 addition & 4 deletions libraries/joomla/database/driver/sqlsrv.php
Expand Up @@ -382,10 +382,7 @@ public function getTableColumns($table, $typeOnly = true)
{
foreach ($fields as $field)
{
if (stristr(strtolower($field->Type), "nvarchar"))
{
$field->Default = "";
}
$field->Default = preg_replace("/(^(\(\(|\('|\(N'|\()|(('\)|(?<!\()\)\)|\))$))/i", '', $field->Default);
$result[$field->Field] = $field;
}
}
Expand Down
3 changes: 0 additions & 3 deletions libraries/joomla/updater/update.php
Expand Up @@ -391,9 +391,6 @@ public function _characterData($parser, $data)
{
$tag = $this->_getLastTag();

// @todo remove code: if(!isset($this->$tag->_data)) $this->$tag->_data = '';
// @todo remove code: $this->$tag->_data .= $data;

// Throw the data for this item together
$tag = strtolower($tag);

Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/user/helper.php
Expand Up @@ -243,7 +243,7 @@ public static function activateUser($activation)
->from($db->quoteName('#__users'))
->where($db->quoteName('activation') . ' = ' . $db->quote($activation))
->where($db->quoteName('block') . ' = 1')
->where($db->quoteName('lastvisitDate') . ' = ' . $db->quote('0000-00-00 00:00:00'));
->where($db->quoteName('lastvisitDate') . ' = ' . $db->quote($db->getNullDate()));
$db->setQuery($query);
$id = (int) $db->loadResult();

Expand Down
2 changes: 1 addition & 1 deletion plugins/system/debug/debug.php
Expand Up @@ -360,7 +360,7 @@ protected function display($item, array $errors = array())
return __METHOD__ . ' -- Unknown method: ' . $fncName . '<br />';
}

$html = '';
$html = array();

$js = "toggleContainer('dbg_container_" . $item . "');";

Expand Down
4 changes: 1 addition & 3 deletions tests/README.md
@@ -1,10 +1,8 @@
Testing Joomla CMS
==========

The current folder contains the Tests for Quality Assurance of the Joomla Content Management System. The Tests are divided into 3 main subfolders:
The current folder contains the Tests for Quality Assurance of the Joomla Content Management System.

* unit: contains the Joomla-cms unit tests based on PHPUnit
* system: contains the Webdriver-Nearsoft based Selenium tests
* codeception: contains the new System Tests based on the Codeception Testing Framework

Find more details inside each folder.
46 changes: 0 additions & 46 deletions tests/codeception/README.md

This file was deleted.

102 changes: 0 additions & 102 deletions tests/codeception/cli/getjoomlacli.php

This file was deleted.

10 changes: 0 additions & 10 deletions tests/codeception/codeception.yml

This file was deleted.

14 changes: 0 additions & 14 deletions tests/codeception/composer.json

This file was deleted.

0 comments on commit 1e4c71c

Please sign in to comment.