diff --git a/.gitignore b/.gitignore index 062c89aeebc92..9cfa3c08dc80d 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,8 @@ Desktop.ini /libraries/vendor/ircmaxell/password-compat/phpunit.xml.dist /libraries/vendor/ircmaxell/password-compat/README.md /libraries/vendor/ircmaxell/password-compat/version-test.php +/libraries/vendor/joomla/*/.gitignore +/libraries/vendor/joomla/*/.gitmodules /libraries/vendor/joomla/*/docs /libraries/vendor/joomla/*/Tests /libraries/vendor/joomla/*/vendor diff --git a/.travis.yml b/.travis.yml index daca2af981830..6d528c3ffd0fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,10 @@ matrix: env: RUN_PHPCS="yes" INSTALL_APCU="yes" - php: 7.0 env: INSTALL_APCU="yes" INSTALL_APCU_BC_BETA="no" INSTALL_MEMCACHE="no" INSTALL_MEMCACHED="no" INSTALL_REDIS="no" # Disabled apcu_bc install until https://github.com/travis-ci/travis-ci/issues/5207 is resolved + - php: hhvm + env: INSTALL_APCU_BC_BETA="no" INSTALL_MEMCACHE="no" INSTALL_MEMCACHED="no" INSTALL_REDIS="no" # Disabled items that currently do not work in travis-ci hhvm + allow_failures: + - php: hhvm services: - memcache diff --git a/administrator/components/com_admin/models/sysinfo.php b/administrator/components/com_admin/models/sysinfo.php index 380811284370d..e618573e93e9d 100644 --- a/administrator/components/com_admin/models/sysinfo.php +++ b/administrator/components/com_admin/models/sysinfo.php @@ -251,6 +251,7 @@ public function &getPhpSettings() 'zip' => function_exists('zip_open') && function_exists('zip_read'), 'mbstring' => extension_loaded('mbstring'), 'iconv' => function_exists('iconv'), + 'mcrypt' => extension_loaded('mcrypt'), 'max_input_vars' => ini_get('max_input_vars'), ); diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index fdf723edc7ed6..728217ed3e31a 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -19,7 +19,7 @@ class JoomlaInstallerScript /** * Method to update Joomla! * - * @param JInstallerFile $installer The class calling this method + * @param JInstallerAdapterFile $installer The class calling this method * * @return void */ @@ -31,13 +31,13 @@ public function update($installer) JLog::addLogger($options, JLog::INFO, array('Update', 'databasequery', 'jerror')); JLog::add(JText::_('COM_JOOMLAUPDATE_UPDATE_LOG_DELETE_FILES'), JLog::INFO, 'Update'); - $this->deleteUnexistingFiles(); $this->updateManifestCaches(); $this->updateDatabase(); $this->clearRadCache(); $this->updateAssets(); $this->clearStatsCache(); $this->convertTablesToUtf8mb4(); + $this->cleanJoomlaCache(); // VERY IMPORTANT! THIS METHOD SHOULD BE CALLED LAST, SINCE IT COULD // LOGOUT ALL THE USERS @@ -1853,6 +1853,8 @@ private function serverClaimsUtf8mb4Support($format) * @param string $query The query to convert * * @return string The converted query + * + * @since 3.5 */ private function convertUtf8mb4QueryToUtf8($query) { @@ -1868,4 +1870,18 @@ private function convertUtf8mb4QueryToUtf8($query) // Replace utf8mb4 with utf8 return str_replace('utf8mb4', 'utf8', $query); } + + /** + * This method clean the Joomla Cache using the method `clean` from the com_cache model + * + * @return void + * + * @since 3.5.1 + */ + private function cleanJoomlaCache() + { + JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_cache/models'); + $model = JModelLegacy::getInstance('cache', 'CacheModel'); + $model->clean(); + } } diff --git a/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql b/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql index f51d375859d8e..cd40e0b8ae7b3 100644 --- a/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql +++ b/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql @@ -12,9 +12,19 @@ -- The file for step 2 will the be processed with reporting exceptions. -- +ALTER TABLE `#__banners` DROP KEY `idx_metakey_prefix`; +ALTER TABLE `#__banner_clients` DROP KEY `idx_metakey_prefix`; +ALTER TABLE `#__categories` DROP KEY `idx_path`; ALTER TABLE `#__categories` DROP KEY `idx_alias`; +ALTER TABLE `#__content_types` DROP KEY `idx_alias`; +ALTER TABLE `#__finder_links` DROP KEY `idx_title`; ALTER TABLE `#__menu` DROP KEY `idx_alias`; ALTER TABLE `#__menu` DROP KEY `idx_client_id_parent_id_alias_language`; +ALTER TABLE `#__menu` DROP KEY `idx_path`; ALTER TABLE `#__redirect_links` DROP KEY `idx_old_url`; +ALTER TABLE `#__tags` DROP KEY `idx_path`; ALTER TABLE `#__tags` DROP KEY `idx_alias`; ALTER TABLE `#__ucm_content` DROP KEY `idx_alias`; +ALTER TABLE `#__ucm_content` DROP KEY `idx_title`; +ALTER TABLE `#__ucm_content` DROP KEY `idx_content_type`; +ALTER TABLE `#__users` DROP KEY `idx_name`; diff --git a/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql b/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql index 7b9f9d9ef0e66..7bb87849af6c6 100644 --- a/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql +++ b/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql @@ -1,42 +1,52 @@ -- -- Step 2 of the UTF-8 Multibyte (utf8mb4) conversion for MySQL -- --- Add back indexes previosly dropped with step 1, utf8mb4-conversion-01.sql, --- but with limited lenghts of columns, and then perform the conversions --- for utf8mb4. +-- Enlarge some database columns to avoid data losses, then convert all tables +-- to utf8mb4 or utf8, then set default character sets and collations for all +-- tables, then add back indexes previosly dropped with step 1, +-- utf8mb4-conversion-01.sql, but addd them back with limited lenghts of +-- columns. -- -- Do not rename this file or any other of the utf8mb4-conversion-*.sql -- files unless you want to change PHP code, too. -- --- This file here will the be processed with reporting exceptions. +-- IMPORTANT: When adding an index modification to this file for limiting the +-- length by which one or more columns go into that index, -- - +-- 1. remember to add the statement to drop the index to the file for step 1, +-- utf8mb4-conversion-01.sql, and -- --- Step 2.1: Limit indexes to first 100 so their max allowed lengths would not get exceeded with utf8mb4 +-- 2. check if the index is created created or modified in some old schema +-- update sql in an "ALTER TABLE" statement and limit the column length +-- there, too ("CREATE TABLE" is ok, no need to modify those). +-- +-- This file here will the be processed with reporting exceptions, in opposite +-- to the file for step 1. -- - -ALTER TABLE `#__categories` ADD KEY `idx_alias` (`alias`(100)); -ALTER TABLE `#__menu` ADD KEY `idx_alias` (`alias`(100)); -ALTER TABLE `#__menu` ADD UNIQUE `idx_client_id_parent_id_alias_language` (`client_id`,`parent_id`,`alias`(100),`language`); -ALTER TABLE `#__redirect_links` ADD KEY `idx_old_url` (`old_url`(100)); -ALTER TABLE `#__tags` ADD KEY `idx_alias` (`alias`(100)); -ALTER TABLE `#__ucm_content` ADD KEY `idx_alias` (`core_alias`(100)); -- --- Step 2.2: Enlarge columns to avoid data loss on later conversion to utf8mb4 +-- Step 2.1: Enlarge columns to avoid data loss on later conversion to utf8mb4 -- ALTER TABLE `#__banners` MODIFY `alias` varchar(400) NOT NULL DEFAULT ''; +ALTER TABLE `#__banners` MODIFY `metakey_prefix` varchar(400) NOT NULL DEFAULT ''; +ALTER TABLE `#__categories` MODIFY `path` varchar(400) NOT NULL DEFAULT ''; ALTER TABLE `#__categories` MODIFY `alias` varchar(400) NOT NULL DEFAULT ''; +ALTER TABLE `#__content_types` MODIFY `type_alias` varchar(400) NOT NULL DEFAULT ''; +ALTER TABLE `#__finder_links` MODIFY `title` varchar(400) DEFAULT NULL; ALTER TABLE `#__contact_details` MODIFY `alias` varchar(400) NOT NULL DEFAULT ''; ALTER TABLE `#__content` MODIFY `alias` varchar(400) NOT NULL DEFAULT ''; ALTER TABLE `#__menu` MODIFY `alias` varchar(400) NOT NULL COMMENT 'The SEF alias of the menu item.'; ALTER TABLE `#__newsfeeds` MODIFY `alias` varchar(400) NOT NULL DEFAULT ''; +ALTER TABLE `#__tags` MODIFY `path` varchar(400) NOT NULL DEFAULT ''; ALTER TABLE `#__tags` MODIFY `alias` varchar(400) NOT NULL DEFAULT ''; +ALTER TABLE `#__ucm_content` MODIFY `core_type_alias` varchar(400) NOT NULL DEFAULT '' COMMENT 'FK to the content types table'; +ALTER TABLE `#__ucm_content` MODIFY `core_title` varchar(400) NOT NULL; ALTER TABLE `#__ucm_content` MODIFY `core_alias` varchar(400) NOT NULL DEFAULT ''; +ALTER TABLE `#__users` MODIFY `name` varchar(400) NOT NULL DEFAULT ''; -- --- Step 2.3: Convert all tables to utf8mb4 chracter set with utf8mb4_unicode_ci collation +-- Step 2.2: Convert all tables to utf8mb4 chracter set with utf8mb4_unicode_ci collation -- except #__finder_xxx tables, those will have utf8mb4_general_ci collation. -- Note: The database driver for mysql will change utf8mb4 to utf8 if utf8mb4 is not supported -- @@ -111,7 +121,7 @@ ALTER TABLE `#__utf8_conversion` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb ALTER TABLE `#__viewlevels` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -- --- Step 2.4: Set collation to utf8mb4_bin for formerly utf8_bin collated columns +-- Step 2.3: Set collation to utf8mb4_bin for formerly utf8_bin collated columns -- and for the lang_code column of the languages table -- @@ -126,7 +136,7 @@ ALTER TABLE `#__tags` MODIFY `alias` varchar(400) CHARACTER SET utf8mb4 COLLATE ALTER TABLE `#__ucm_content` MODIFY `core_alias` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT ''; -- --- Step 2.5: Set default character set and collation for all tables +-- Step 2.4: Set default character set and collation for all tables -- ALTER TABLE `#__assets` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; @@ -197,3 +207,24 @@ ALTER TABLE `#__user_profiles` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_uni ALTER TABLE `#__user_usergroup_map` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE `#__utf8_conversion` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE `#__viewlevels` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- +-- Step 2.5: Limit indexes to first 100 so their max allowed lengths would not get exceeded with utf8mb4 +-- + +ALTER TABLE `#__banners` ADD KEY `idx_metakey_prefix` (`metakey_prefix`(100)); +ALTER TABLE `#__banner_clients` ADD KEY `idx_metakey_prefix` (`metakey_prefix`(100)); +ALTER TABLE `#__categories` ADD KEY `idx_path` (`path`(100)); +ALTER TABLE `#__categories` ADD KEY `idx_alias` (`alias`(100)); +ALTER TABLE `#__content_types` ADD KEY `idx_alias` (`type_alias`(100)); +ALTER TABLE `#__finder_links` ADD KEY `idx_title` (`title`(100)); +ALTER TABLE `#__menu` ADD KEY `idx_alias` (`alias`(100)); +ALTER TABLE `#__menu` ADD UNIQUE `idx_client_id_parent_id_alias_language` (`client_id`,`parent_id`,`alias`(100),`language`); +ALTER TABLE `#__menu` ADD KEY `idx_path` (`path`(100)); +ALTER TABLE `#__redirect_links` ADD KEY `idx_old_url` (`old_url`(100)); +ALTER TABLE `#__tags` ADD KEY `idx_path` (`path`(100)); +ALTER TABLE `#__tags` ADD KEY `idx_alias` (`alias`(100)); +ALTER TABLE `#__ucm_content` ADD KEY `idx_alias` (`core_alias`(100)); +ALTER TABLE `#__ucm_content` ADD KEY `idx_title` (`core_title`(100)); +ALTER TABLE `#__ucm_content` ADD KEY `idx_content_type` (`core_type_alias`(100)); +ALTER TABLE `#__users` ADD KEY `idx_name` (`name`(100)); diff --git a/administrator/components/com_admin/sql/updates/mysql/2.5.0-2011-12-24.sql b/administrator/components/com_admin/sql/updates/mysql/2.5.0-2011-12-24.sql index 8f7014c7014f2..bbaaff3f6193c 100644 --- a/administrator/components/com_admin/sql/updates/mysql/2.5.0-2011-12-24.sql +++ b/administrator/components/com_admin/sql/updates/mysql/2.5.0-2011-12-24.sql @@ -1,3 +1,8 @@ ALTER TABLE `#__menu` DROP INDEX `idx_client_id_parent_id_alias`; -ALTER TABLE `#__menu` ADD UNIQUE `idx_client_id_parent_id_alias_language` ( `client_id` , `parent_id` , `alias` , `language` ); \ No newline at end of file +-- +-- The following statment had to be modified for utf8mb4 in Joomla! 3.5.1, changing +-- `alias` to `alias`(100) +-- + +ALTER TABLE `#__menu` ADD UNIQUE `idx_client_id_parent_id_alias_language` ( `client_id` , `parent_id` , `alias`(100) , `language` ); \ No newline at end of file diff --git a/administrator/components/com_admin/sql/updates/mysql/3.5.1-2016-03-25.sql b/administrator/components/com_admin/sql/updates/mysql/3.5.1-2016-03-25.sql new file mode 100644 index 0000000000000..f6c320b8cc24e --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.5.1-2016-03-25.sql @@ -0,0 +1,5 @@ +-- +-- Make #__user_keys.user_id fit to #__users.username +-- + +ALTER TABLE `#__user_keys` MODIFY `user_id` varchar(150) NOT NULL; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.5.1-2016-03-29.sql b/administrator/components/com_admin/sql/updates/mysql/3.5.1-2016-03-29.sql new file mode 100644 index 0000000000000..86ecda89c6258 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.5.1-2016-03-29.sql @@ -0,0 +1,7 @@ +-- +-- Reset UTF-8 Multibyte (utf8mb4) or UTF-8 conversion status +-- to force a new conversion when updating from version 3.5.0 +-- + +UPDATE `#__utf8_conversion` SET `converted` = 0 + WHERE (SELECT COUNT(*) FROM `#__schemas` WHERE `extension_id`=700 AND `version_id` LIKE '3.5.0%') = 1; \ No newline at end of file diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.1.0.sql b/administrator/components/com_admin/sql/updates/postgresql/3.1.0.sql index c6df8f526cffa..fe5c364e0a808 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.1.0.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.1.0.sql @@ -47,7 +47,7 @@ CREATE TABLE "#__contentitem_tag_map" ( CONSTRAINT "uc_ItemnameTagid" UNIQUE ("type_alias", "content_item_id", "tag_id") ); -CREATE INDEX "#__contentitem_tag_map_idx_tag_name" ON "#__contentitem_tag_map" ("tag_id", "type_alias"); +CREATE INDEX "#__contentitem_tag_map_idx_tag_type" ON "#__contentitem_tag_map" ("tag_id", "type_alias"); CREATE INDEX "#__contentitem_tag_map_idx_date_id" ON "#__contentitem_tag_map" ("tag_date", "tag_id"); CREATE INDEX "#__contentitem_tag_map_idx_tag" ON "#__contentitem_tag_map" ("tag_id"); CREATE INDEX "#__contentitem_tag_map_idx_core_content_id" ON "#__contentitem_tag_map" ("core_content_id"); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.5.0-2015-10-26.sql b/administrator/components/com_admin/sql/updates/postgresql/3.5.0-2015-10-26.sql index ef806600996c1..05080ce112570 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.5.0-2015-10-26.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.5.0-2015-10-26.sql @@ -1,2 +1,2 @@ -ALTER TABLE "#__contentitem_tag_map" DROP INDEX "#__contentitem_tag_map_idx_tag"; -ALTER TABLE "#__contentitem_tag_map" DROP INDEX "#__contentitem_tag_map_idx_type"; +DROP INDEX "#__contentitem_tag_map_idx_tag"; +DROP INDEX "#__contentitem_tag_map_idx_type"; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.5.0-2016-03-01.sql b/administrator/components/com_admin/sql/updates/postgresql/3.5.0-2016-03-01.sql index b7a38334eec57..804efa3edd1dc 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.5.0-2016-03-01.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.5.0-2016-03-01.sql @@ -1,5 +1,5 @@ -ALTER TABLE "#__redirect_links" DROP CONSTRAINT "#__redirect_links_idx_link_old" -ALTER TABLE "#__redirect_links" ALTER COLUMN "old_url" TYPE varchar(2048); -ALTER TABLE "#__redirect_links" ALTER COLUMN "new_url" TYPE varchar(2048); -ALTER TABLE "#__redirect_links" ALTER COLUMN "referer" TYPE varchar(2048); +ALTER TABLE "#__redirect_links" DROP CONSTRAINT "#__redirect_links_idx_link_old"; +ALTER TABLE "#__redirect_links" ALTER COLUMN "old_url" TYPE character varying(2048); +ALTER TABLE "#__redirect_links" ALTER COLUMN "new_url" TYPE character varying(2048); +ALTER TABLE "#__redirect_links" ALTER COLUMN "referer" TYPE character varying(2048); CREATE INDEX "#__idx_link_old" ON "#__redirect_links" ("old_url"); diff --git a/administrator/components/com_admin/views/sysinfo/tmpl/default_phpsettings.php b/administrator/components/com_admin/views/sysinfo/tmpl/default_phpsettings.php index 3be760867ba62..6d88f141ff5f8 100644 --- a/administrator/components/com_admin/views/sysinfo/tmpl/default_phpsettings.php +++ b/administrator/components/com_admin/views/sysinfo/tmpl/default_phpsettings.php @@ -157,6 +157,14 @@ php_settings['iconv']); ?> + + + + + + php_settings['mcrypt']); ?> + + diff --git a/administrator/components/com_admin/views/sysinfo/view.text.php b/administrator/components/com_admin/views/sysinfo/view.text.php index 13f5b2864d756..e71c9bf622f81 100644 --- a/administrator/components/com_admin/views/sysinfo/view.text.php +++ b/administrator/components/com_admin/views/sysinfo/view.text.php @@ -33,6 +33,7 @@ public function display($tpl = null) return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } + header('Content-Type: text/plain; charset=utf-8'); header('Content-Description: File Transfer'); header('Content-Disposition: attachment; filename="systeminfo-' . date("c") . '.txt"'); header('Cache-Control: must-revalidate'); diff --git a/administrator/components/com_banners/tables/banner.php b/administrator/components/com_banners/tables/banner.php index 6f9cfa3635826..f853ec9b7619a 100644 --- a/administrator/components/com_banners/tables/banner.php +++ b/administrator/components/com_banners/tables/banner.php @@ -92,6 +92,21 @@ public function check() $this->ordering = self::getNextOrder($this->_db->quoteName('catid') . '=' . $this->_db->quote($this->catid) . ' AND state>=0'); } + if (empty($this->publish_up)) + { + $this->publish_up = $this->getDbo()->getNullDate(); + } + + if (empty($this->publish_down)) + { + $this->publish_down = $this->getDbo()->getNullDate(); + } + + if (empty($this->modified)) + { + $this->modified = $this->getDbo()->getNullDate(); + } + return true; } @@ -178,19 +193,19 @@ public function store($updateNulls = false) break; case 2: $date = JFactory::getDate('+1 year ' . date('Y-m-d', strtotime('now'))); - $this->reset = $this->_db->quote($date->toSql()); + $this->reset = $date->toSql(); break; case 3: $date = JFactory::getDate('+1 month ' . date('Y-m-d', strtotime('now'))); - $this->reset = $this->_db->quote($date->toSql()); + $this->reset = $date->toSql(); break; case 4: $date = JFactory::getDate('+7 day ' . date('Y-m-d', strtotime('now'))); - $this->reset = $this->_db->quote($date->toSql()); + $this->reset = $date->toSql(); break; case 5: $date = JFactory::getDate('+1 day ' . date('Y-m-d', strtotime('now'))); - $this->reset = $this->_db->quote($date->toSql()); + $this->reset = $date->toSql(); break; } diff --git a/administrator/components/com_banners/views/banners/view.html.php b/administrator/components/com_banners/views/banners/view.html.php index eb76316fca4c8..dc842b884bb39 100644 --- a/administrator/components/com_banners/views/banners/view.html.php +++ b/administrator/components/com_banners/views/banners/view.html.php @@ -111,19 +111,19 @@ protected function addToolbar() if ($canDo->get('core.edit.state')) { - if ($this->state->get('filter.state') != 2) + if ($this->state->get('filter.published') != 2) { JToolbarHelper::publish('banners.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('banners.unpublish', 'JTOOLBAR_UNPUBLISH', true); } - if ($this->state->get('filter.state') != -1) + if ($this->state->get('filter.published') != -1) { - if ($this->state->get('filter.state') != 2) + if ($this->state->get('filter.published') != 2) { JToolbarHelper::archiveList('banners.archive'); } - elseif ($this->state->get('filter.state') == 2) + elseif ($this->state->get('filter.published') == 2) { JToolbarHelper::unarchiveList('banners.publish'); } @@ -149,7 +149,7 @@ protected function addToolbar() JToolbar::getInstance('toolbar')->appendButton('Custom', $dhtml, 'batch'); } - if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) + if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'banners.delete', 'JTOOLBAR_EMPTY_TRASH'); } diff --git a/administrator/components/com_cache/controller.php b/administrator/components/com_cache/controller.php index 94606d98fc371..b5db29dc36009 100644 --- a/administrator/components/com_cache/controller.php +++ b/administrator/components/com_cache/controller.php @@ -76,18 +76,24 @@ public function delete() $cid = $this->input->post->get('cid', array(), 'array'); - $model = $this->getModel('cache'); - if (empty($cid)) { - JError::raiseWarning(500, JText::_('JERROR_NO_ITEMS_SELECTED')); + JFactory::getApplication()->enqueueMessage(JText::_('JERROR_NO_ITEMS_SELECTED'), 'warning'); } else { - $model->cleanlist($cid); - } + $result = $this->getModel('cache')->cleanlist($cid); - $this->setRedirect('index.php?option=com_cache&client=' . $model->getClient()->id); + if ($result !== array()) + { + JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_CACHE_EXPIRED_ITEMS_DELETE_ERROR', implode(', ', $result)), 'error'); + } + else + { + JFactory::getApplication()->enqueueMessage(JText::_('COM_CACHE_EXPIRED_ITEMS_HAVE_BEEN_DELETED'), 'message'); + } + } + $this->setRedirect('index.php?option=com_cache'); } /** @@ -100,18 +106,14 @@ public function purge() // Check for request forgeries JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); - $model = $this->getModel('cache'); - $ret = $model->purge(); - - $msg = JText::_('COM_CACHE_EXPIRED_ITEMS_HAVE_BEEN_PURGED'); - $msgType = 'message'; - - if ($ret === false) + if (!$this->getModel('cache')->purge()) { - $msg = JText::_('COM_CACHE_EXPIRED_ITEMS_PURGING_ERROR'); - $msgType = 'error'; + JFactory::getApplication()->enqueueMessage(JText::_('COM_CACHE_EXPIRED_ITEMS_PURGING_ERROR'), 'error'); } - - $this->setRedirect('index.php?option=com_cache&view=purge', $msg, $msgType); + else + { + JFactory::getApplication()->enqueueMessage(JText::_('COM_CACHE_EXPIRED_ITEMS_HAVE_BEEN_PURGED'), 'message'); + } + $this->setRedirect('index.php?option=com_cache&view=purge'); } } diff --git a/administrator/components/com_cache/helpers/cache.php b/administrator/components/com_cache/helpers/cache.php index 034bbb8d697fd..9b9e61e307d93 100644 --- a/administrator/components/com_cache/helpers/cache.php +++ b/administrator/components/com_cache/helpers/cache.php @@ -20,6 +20,8 @@ class CacheHelper * Get a list of filter options for the application clients. * * @return array An array of JHtmlOption elements. + * + * @deprecated 4.0 No replacement. */ public static function getClientOptions() { diff --git a/administrator/components/com_cache/models/cache.php b/administrator/components/com_cache/models/cache.php index 6056bdfbe5036..1b592e4a1935c 100644 --- a/administrator/components/com_cache/models/cache.php +++ b/administrator/components/com_cache/models/cache.php @@ -185,6 +185,8 @@ public function getCache() * Method to get client data. * * @return array + * + * @deprecated 4.0 No replacement. */ public function getClient() { @@ -227,12 +229,11 @@ public function getPagination() * * @param string $group Cache group name. * - * @return void + * @return boolean True on success, false otherwise */ public function clean($group = '') { - $cache = $this->getCache(); - $cache->clean($group); + return $this->getCache()->clean($group); } /** @@ -240,14 +241,21 @@ public function clean($group = '') * * @param array $array Array of cache group names. * - * @return void + * @return array Array with errors, if they exist. */ public function cleanlist($array) { + $errors = array(); + foreach ($array as $group) { - $this->clean($group); + if (!$this->clean($group)) + { + $errors[] = $group; + } } + + return $errors; } /** @@ -257,8 +265,6 @@ public function cleanlist($array) */ public function purge() { - $cache = JFactory::getCache(''); - - return $cache->gc(); + return JFactory::getCache('')->gc(); } } diff --git a/administrator/components/com_categories/models/categories.php b/administrator/components/com_categories/models/categories.php index afe98851f241a..9567a10fad494 100644 --- a/administrator/components/com_categories/models/categories.php +++ b/administrator/components/com_categories/models/categories.php @@ -360,16 +360,48 @@ public function getItems() { $extension = $this->getState('filter.extension'); - // Load Helper file of the component for which com_categories displays the categories - $classname = ucfirst(substr($extension, 4)) . 'Helper'; + $this->countItems($items, $extension); + } + + return $items; + } - if (class_exists($classname) && method_exists($classname, 'countItems')) + /** + * Method to load the countItems method from the extensions + * + * @param stdClass[] &$items The category items + * @param string $extension The category extension + * + * @return void + * + * @since 3.5 + */ + public function countItems(&$items, $extension) + { + $parts = explode('.', $extension); + $component = $parts[0]; + $section = null; + + if (count($parts) > 1) + { + $section = $parts[1]; + } + + // Try to find the component helper. + $eName = str_replace('com_', '', $component); + $file = JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/helpers/' . $eName . '.php'); + + if (file_exists($file)) + { + require_once $file; + + $prefix = ucfirst(str_replace('com_', '', $component)); + $cName = $prefix . 'Helper'; + + if (class_exists($cName) && is_callable(array($cName, 'countItems'))) { - // Get the SQL to extend the com_category $query object with item count (published, unpublished, trashed) - $classname::countItems($items); + call_user_func(array($cName, 'countItems'), $items, $section); } } - - return $items; } } diff --git a/administrator/components/com_categories/views/categories/tmpl/default.php b/administrator/components/com_categories/views/categories/tmpl/default.php index 05ce824cec0df..b565caa7b1b86 100644 --- a/administrator/components/com_categories/views/categories/tmpl/default.php +++ b/administrator/components/com_categories/views/categories/tmpl/default.php @@ -9,6 +9,8 @@ defined('_JEXEC') or die; +use Joomla\String\Inflector; + // Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); @@ -24,7 +26,22 @@ $listDirn = $this->escape($this->state->get('list.direction')); $ordering = ($listOrder == 'a.lft'); $saveOrder = ($listOrder == 'a.lft' && strtolower($listDirn) == 'asc'); -$component = $app->input->get('extension'); +$parts = explode('.', $extension); +$component = $parts[0]; +$section = null; + +if (count($parts) > 1) +{ + $section = $parts[1]; + + $inflector = Inflector::getInstance(); + + if (!$inflector->isPlural($section)) + { + $section = $inflector->toPlural($section); + } +} + $columns = 7; if ($saveOrder) @@ -193,25 +210,25 @@ items[0]) && property_exists($this->items[0], 'count_published')) : ?> - " title="" href="id . '&filter[published]=1' . '&filter[level]=' . (int) $item->level);?>"> + " title="" href="id . '&filter[published]=1' . '&filter[level]=' . (int) $item->level);?>"> count_published; ?> items[0]) && property_exists($this->items[0], 'count_unpublished')) : ?> - " title="" href="id . '&filter[published]=0' . '&filter[level]=' . (int) $item->level);?>"> + " title="" href="id . '&filter[published]=0' . '&filter[level]=' . (int) $item->level);?>"> count_unpublished; ?> items[0]) && property_exists($this->items[0], 'count_archived')) : ?> - " title="" href="id . '&filter[published]=2' . '&filter[level]=' . (int) $item->level);?>"> + " title="" href="id . '&filter[published]=2' . '&filter[level]=' . (int) $item->level);?>"> count_archived; ?> items[0]) && property_exists($this->items[0], 'count_trashed')) : ?> - " title="" href="id . '&filter[published]=-2' . '&filter[level]=' . (int) $item->level);?>"> + " title="" href="id . '&filter[published]=-2' . '&filter[level]=' . (int) $item->level);?>"> count_trashed; ?> diff --git a/administrator/components/com_config/model/application.php b/administrator/components/com_config/model/application.php index c546cbba44390..ba9d509739d88 100644 --- a/administrator/components/com_config/model/application.php +++ b/administrator/components/com_config/model/application.php @@ -118,6 +118,36 @@ public function save($data) return false; } + // Check if we can set the Force SSL option + if ((int) $data['force_ssl'] !== 0 && (int) $data['force_ssl'] !== (int) JFactory::getConfig()->get('force_ssl', '0')) + { + try + { + // Make an HTTPS request to check if the site is available in HTTPS. + $host = JUri::getInstance()->getHost(); + $options = new \Joomla\Registry\Registry; + $options->set('userAgent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0'); + $options->set('transport.curl', array(CURLOPT_SSL_VERIFYPEER => false)); + $response = JHttpFactory::getHttp($options)->get('https://' . $host . JUri::root(true) . '/', array('Host' => $host), 10); + + // If available in HTTPS check also the status code. + if (!in_array($response->code, array(200, 503, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310), true)) + { + throw new RuntimeException('HTTPS version of the site returned an invalid HTTP status code.'); + } + } + catch (RuntimeException $e) + { + $data['force_ssl'] = 0; + + // Also update the user state + $app->setUserState('com_config.config.global.data.force_ssl', 0); + + // Inform the user + $app->enqueueMessage(JText::_('COM_CONFIG_ERROR_SSL_NOT_AVAILABLE'), 'warning'); + } + } + // Save the rules if (isset($data['rules'])) { diff --git a/administrator/components/com_contact/helpers/contact.php b/administrator/components/com_contact/helpers/contact.php index b39ea369fc480..8b55524bcbafd 100644 --- a/administrator/components/com_contact/helpers/contact.php +++ b/administrator/components/com_contact/helpers/contact.php @@ -63,7 +63,7 @@ public static function countItems(&$items) $query->select('published AS state, count(*) AS count') ->from($db->qn('#__contact_details')) ->where('catid = ' . (int) $item->id) - ->group('state'); + ->group('published'); $db->setQuery($query); $contacts = $db->loadObjectList(); diff --git a/administrator/components/com_contact/models/contacts.php b/administrator/components/com_contact/models/contacts.php index e750529ed6195..d400f7195ec32 100644 --- a/administrator/components/com_contact/models/contacts.php +++ b/administrator/components/com_contact/models/contacts.php @@ -245,6 +245,7 @@ protected function getListQuery() 'ul.name' , 'ul.email', 'l.title' , + 'l.image' , 'uc.name' , 'ag.title' , 'c.title' diff --git a/administrator/components/com_content/models/article.php b/administrator/components/com_content/models/article.php index ecb9555427681..391808f106cc7 100644 --- a/administrator/components/com_content/models/article.php +++ b/administrator/components/com_content/models/article.php @@ -772,4 +772,16 @@ protected function cleanCache($group = null, $client_id = 0) parent::cleanCache('mod_articles_news'); parent::cleanCache('mod_articles_popular'); } + + /** + * Void hit function for pagebreak when editing content from frontend + * + * @return void + * + * @since 3.5.2 + */ + public function hit() + { + return; + } } diff --git a/administrator/components/com_installer/controllers/discover.php b/administrator/components/com_installer/controllers/discover.php index 2040bad450b13..2670fd8de849d 100644 --- a/administrator/components/com_installer/controllers/discover.php +++ b/administrator/components/com_installer/controllers/discover.php @@ -27,7 +27,7 @@ public function refresh() { $model = $this->getModel('discover'); $model->discover(); - $this->setRedirect(JRoute::_('index.php?option=com_installer&view=discover', false), $model->_message); + $this->setRedirect(JRoute::_('index.php?option=com_installer&view=discover', false)); } /** diff --git a/administrator/components/com_installer/models/database.php b/administrator/components/com_installer/models/database.php index ea580d539bf40..66ac0d92bc0d5 100644 --- a/administrator/components/com_installer/models/database.php +++ b/administrator/components/com_installer/models/database.php @@ -42,6 +42,10 @@ protected function populateState($ordering = null, $direction = null) $this->setState('extension_message', $app->getUserState('com_installer.extension_message')); $app->setUserState('com_installer.message', ''); $app->setUserState('com_installer.extension_message', ''); + + // Prepare the utf8mb4 conversion check table + $this->prepareUtf8mb4StatusTable(); + parent::populateState('name', 'asc'); } @@ -67,9 +71,16 @@ public function fix() $installer->deleteUnexistingFiles(); $this->fixDefaultTextFilters(); - // Finally make sure the database is converted to utf8mb4 or, if not suported - // by the server, compatible to it - $this->convertTablesToUtf8mb4(); + /* + * Finally, if the schema updates succeeded, make sure the database is + * converted to utf8mb4 or, if not suported by the server, compatible to it. + */ + $statusArray = $changeSet->getStatus(); + + if (count($statusArray['error']) == 0) + { + $this->convertTablesToUtf8mb4(); + } } /** diff --git a/administrator/components/com_installer/views/install/tmpl/default.php b/administrator/components/com_installer/views/install/tmpl/default.php index 90f50feedd7a3..ec4292e78286c 100644 --- a/administrator/components/com_installer/views/install/tmpl/default.php +++ b/administrator/components/com_installer/views/install/tmpl/default.php @@ -51,7 +51,7 @@ var form = document.getElementById("adminForm"); // do field validation - if (form.install_url.value == "" || form.install_url.value == "http://") { + if (form.install_url.value == "" || form.install_url.value == "http://" || form.install_url.value == "https://") { alert("' . JText::_('COM_INSTALLER_MSG_INSTALL_ENTER_A_URL', true) . '"); } else @@ -169,7 +169,7 @@
- +
diff --git a/administrator/components/com_installer/views/warnings/tmpl/default.php b/administrator/components/com_installer/views/warnings/tmpl/default.php index 2b147f89d4f5a..debd56f6465ce 100644 --- a/administrator/components/com_installer/views/warnings/tmpl/default.php +++ b/administrator/components/com_installer/views/warnings/tmpl/default.php @@ -19,12 +19,7 @@
- messages)) : ?> -
- × - -
- + messages)) : ?> 'warning0')); ?> messages as $message) : ?> @@ -35,7 +30,7 @@ - +
@@ -43,4 +38,4 @@
-
\ No newline at end of file + diff --git a/administrator/components/com_installer/views/warnings/view.html.php b/administrator/components/com_installer/views/warnings/view.html.php index fa46df366367f..5cee0fc778fa7 100644 --- a/administrator/components/com_installer/views/warnings/view.html.php +++ b/administrator/components/com_installer/views/warnings/view.html.php @@ -32,6 +32,15 @@ public function display($tpl = null) $items = $this->get('Items'); $this->messages = &$items; parent::display($tpl); + + if (count($items) > 0) + { + JFactory::getApplication()->enqueueMessage(JText::_('COM_INSTALLER_MSG_WARNINGS_NOTICE'), 'warning'); + } + else + { + JFactory::getApplication()->enqueueMessage(JText::_('COM_INSTALLER_MSG_WARNINGS_NONE'), 'notice'); + } } /** diff --git a/administrator/components/com_joomlaupdate/restore_finalisation.php b/administrator/components/com_joomlaupdate/restore_finalisation.php new file mode 100644 index 0000000000000..12ea98c878bf1 --- /dev/null +++ b/administrator/components/com_joomlaupdate/restore_finalisation.php @@ -0,0 +1,190 @@ +unlink($fileName); + } + } +} + +// Fake the JFolder class, mapping it to Restore's post-processing class +if (!class_exists('JFolder')) +{ + /** + * JFolder mock class proxing behaviour in the post-upgrade script to that of either native PHP or restore.php + * + * @since 3.5.1 + */ + abstract class JFolder + { + /** + * Proxies checking a folder exists to the native php version + * + * @param string $folderName The path to the folder to be checked + * + * @return bool + * + * @since 3.5.1 + */ + public static function exists($folderName) + { + return @is_dir($folderName); + } + + /** + * Proxies deleting a folder to the restore.php version + * + * @param string $folderName The path to the folder to be deleted + * + * @return void + * + * @since 3.5.1 + */ + public static function delete($folderName) + { + recursive_remove_directory($folderName); + } + } +} + +// Fake the JText class - we aren't going to show errors to people anyhow +if (!class_exists('JText')) +{ + /** + * JText mock class proxing behaviour in the post-upgrade script to that of either native PHP or restore.php + * + * @since 3.5.1 + */ + abstract class JText + { + /** + * No need for translations in a non-interactive script, so always return an empty string here + * + * @param string $text A language constant + * + * @return string + * + * @since 3.5.1 + */ + public static function sprintf($text) + { + return ''; + } + } +} + +if (!function_exists('finalizeRestore')) +{ + /** + * Run part of the Joomla! finalisation script, namely the part that cleans up unused files/folders + * + * @param string $siteRoot The root to the Joomla! site + * @param string $restorePath The base path to restore.php + * + * @return void + * + * @since 3.5.1 + */ + function finalizeRestore($siteRoot, $restorePath) + { + if (!defined('JPATH_ROOT')) + { + define('JPATH_ROOT', $siteRoot); + } + + $filePath = JPATH_ROOT . '/administrator/components/com_admin/script.php'; + + if (file_exists($filePath)) + { + require_once ($filePath); + } + + // Make sure Joomla!'s code can figure out which files exist and need be removed + clearstatcache(); + + // Remove obsolete files - prevents errors occuring in some system plugins + if (class_exists('JoomlaInstallerScript')) + { + $script = new JoomlaInstallerScript; + $script->deleteUnexistingFiles(); + } + + // Clear OPcache + if (function_exists('opcache_reset')) + { + opcache_reset(); + } + elseif (function_exists('apc_clear_cache')) + { + @apc_clear_cache(); + } + } +} diff --git a/administrator/components/com_languages/helpers/multilangstatus.php b/administrator/components/com_languages/helpers/multilangstatus.php index 9509cbbc47e00..71d7b54754257 100644 --- a/administrator/components/com_languages/helpers/multilangstatus.php +++ b/administrator/components/com_languages/helpers/multilangstatus.php @@ -143,19 +143,65 @@ public static function getStatus() public static function getContacts() { $db = JFactory::getDbo(); + $languages = count(JLanguageHelper::getLanguages()); + + // Get the number of contact with all as language + $alang = $db->getQuery(true) + ->select('count(*)') + ->from('#__contact_details AS cd') + ->where('cd.user_id=u.id') + ->where('cd.published=1') + ->where('cd.language=' . $db->quote('*')); + + // Get the number of languages for the contact + $slang = $db->getQuery(true) + ->select('count(distinct(l.lang_code))') + ->from('#__languages as l') + ->join('LEFT', '#__contact_details AS cd ON cd.language=l.lang_code') + ->where('cd.user_id=u.id') + ->where('cd.published=1') + ->where('l.published=1'); + + // Get the number of multiple contact/language + $mlang = $db->getQuery(true) + ->select('count(*)') + ->from('#__languages as l') + ->join('LEFT', '#__contact_details AS cd ON cd.language=l.lang_code') + ->where('cd.user_id=u.id') + ->where('cd.published=1') + ->where('l.published=1') + ->group('l.lang_code') + ->having('count(*) > 1'); + + // Get the contacts $query = $db->getQuery(true) - ->select('u.name, count(cd.language) as counted, MAX(cd.language=' . $db->quote('*') . ') as all_languages') + ->select('u.name, (' . $alang . ') as alang, (' . $slang . ') as slang, (' . $mlang . ') as mlang') ->from('#__users AS u') ->join('LEFT', '#__contact_details AS cd ON cd.user_id=u.id') - ->join('LEFT', '#__languages as l on cd.language=l.lang_code') - ->where('EXISTS (SELECT * from #__content as c where c.created_by=u.id)') - ->where('(l.published=1 or cd.language=' . $db->quote('*') . ')') - ->where('cd.published=1') - ->group('u.id') - ->having('(counted !=' . count(JLanguageHelper::getLanguages()) . ' OR all_languages=1)') - ->having('(counted !=1 OR all_languages=0)'); - $db->setQuery($query); + ->where('EXISTS (SELECT 1 from #__content as c where c.created_by=u.id)') + ->group('u.id'); - return $db->loadObjectList(); + $db->setQuery($query); + $warnings = $db->loadObjectList(); + + foreach ($warnings as $index => $warn) + { + if (($warn->alang == 1) && ($warn->slang == 0)) + { + unset($warnings[$index]); + } + + if (($warn->alang == 0) && (($warn->slang == 0) && (empty($warn->mlang)))) + { + unset($warnings[$index]); + } + + if (($warn->alang == 0) && (($warn->slang == $languages) && (empty($warn->mlang)))) + { + unset($warnings[$index]); + } + } + + return $warnings; } } diff --git a/administrator/components/com_languages/views/language/tmpl/edit.php b/administrator/components/com_languages/views/language/tmpl/edit.php index 2bea8dd94df7d..68a578764777f 100644 --- a/administrator/components/com_languages/views/language/tmpl/edit.php +++ b/administrator/components/com_languages/views/language/tmpl/edit.php @@ -40,7 +40,7 @@ ); ?> -
+ diff --git a/administrator/components/com_languages/views/language/view.html.php b/administrator/components/com_languages/views/language/view.html.php index 179f137cbd2b1..6aa594d2a3884 100644 --- a/administrator/components/com_languages/views/language/view.html.php +++ b/administrator/components/com_languages/views/language/view.html.php @@ -90,7 +90,5 @@ protected function addToolbar() JToolbarHelper::divider(); JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_EDIT'); - - $this->sidebar = JHtmlSidebar::render(); } } diff --git a/administrator/components/com_media/controllers/file.php b/administrator/components/com_media/controllers/file.php index 56802456a4ff3..2610996826a98 100644 --- a/administrator/components/com_media/controllers/file.php +++ b/administrator/components/com_media/controllers/file.php @@ -94,6 +94,7 @@ public function upload() foreach ($files as &$file) { $file['name'] = JFile::makeSafe($file['name']); + $file['name'] = str_replace(' ', '-', $file['name']); $file['filepath'] = JPath::clean(implode(DIRECTORY_SEPARATOR, array(COM_MEDIA_BASE, $this->folder, $file['name']))); if (($file['error'] == 1) diff --git a/administrator/components/com_media/views/media/tmpl/default.php b/administrator/components/com_media/views/media/tmpl/default.php index 2a1cfd745dfda..bcf405961f0ab 100644 --- a/administrator/components/com_media/views/media/tmpl/default.php +++ b/administrator/components/com_media/views/media/tmpl/default.php @@ -127,7 +127,7 @@ 'footer' => '' ), - '
preview
' + '
preview
' ); echo JHtml::_( diff --git a/administrator/components/com_menus/views/item/tmpl/edit.php b/administrator/components/com_menus/views/item/tmpl/edit.php index 202c577f0240e..79ac6a21da8a1 100644 --- a/administrator/components/com_menus/views/item/tmpl/edit.php +++ b/administrator/components/com_menus/views/item/tmpl/edit.php @@ -80,7 +80,7 @@ ?> - + diff --git a/administrator/components/com_modules/views/modules/tmpl/modal.php b/administrator/components/com_modules/views/modules/tmpl/modal.php index bc76e763077e6..b4144b95be848 100644 --- a/administrator/components/com_modules/views/modules/tmpl/modal.php +++ b/administrator/components/com_modules/views/modules/tmpl/modal.php @@ -9,6 +9,11 @@ defined('_JEXEC') or die; +if (JFactory::getApplication()->isSite()) +{ + JSession::checkToken('get') or die(JText::_('JINVALID_TOKEN')); +} + JHtml::_('bootstrap.tooltip'); JHtml::_('formbehavior.chosen', 'select'); diff --git a/administrator/components/com_modules/views/modules/view.html.php b/administrator/components/com_modules/views/modules/view.html.php index d7b439dd19857..99642a752aa9f 100644 --- a/administrator/components/com_modules/views/modules/view.html.php +++ b/administrator/components/com_modules/views/modules/view.html.php @@ -27,7 +27,9 @@ class ModulesViewModules extends JViewLegacy * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * - * @return void + * @return mixed A string if successful, otherwise a Error object. + * + * @since 1.6 */ public function display($tpl = null) { @@ -49,11 +51,16 @@ public function display($tpl = null) return false; } - $this->addToolbar(); + // We don't need the toolbar in the modal window. + if ($this->getLayout() !== 'modal') + { + $this->addToolbar(); + } // Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); - parent::display($tpl); + + return parent::display($tpl); } /** diff --git a/administrator/components/com_newsfeeds/models/newsfeeds.php b/administrator/components/com_newsfeeds/models/newsfeeds.php index 637043d593fbc..4a2733914e4f1 100644 --- a/administrator/components/com_newsfeeds/models/newsfeeds.php +++ b/administrator/components/com_newsfeeds/models/newsfeeds.php @@ -181,7 +181,7 @@ protected function getListQuery() $query->select('COUNT(asso2.id)>1 as association') ->join('LEFT', '#__associations AS asso ON asso.id = a.id AND asso.context=' . $db->quote('com_newsfeeds.item')) ->join('LEFT', '#__associations AS asso2 ON asso2.key = asso.key') - ->group('a.id, l.title, uc.name, ag.title, c.title'); + ->group('a.id, l.title, l.image, uc.name, ag.title, c.title'); } // Filter by access level. diff --git a/administrator/components/com_redirect/models/fields/redirect.php b/administrator/components/com_redirect/models/fields/redirect.php index 1d108a7c6905e..2752d4d7f690f 100644 --- a/administrator/components/com_redirect/models/fields/redirect.php +++ b/administrator/components/com_redirect/models/fields/redirect.php @@ -85,6 +85,7 @@ class JFormFieldRedirect extends JFormFieldList 428 => 'HTTP/1.1 428 Precondition Required', 429 => 'HTTP/1.1 429 Too Many Requests', 431 => 'HTTP/1.1 431 Request Header Fields Too Large', + 451 => 'HTTP/1.1 451 Unavailable For Legal Reasons', 500 => 'HTTP/1.1 500 Internal Server Error', 501 => 'HTTP/1.1 501 Not Implemented', 502 => 'HTTP/1.1 502 Bad Gateway', diff --git a/administrator/components/com_tags/tables/tag.php b/administrator/components/com_tags/tables/tag.php index fc82993198203..57933449fecb0 100644 --- a/administrator/components/com_tags/tables/tag.php +++ b/administrator/components/com_tags/tables/tag.php @@ -58,7 +58,7 @@ public function bind($array, $ignore = '') $array['metadata'] = (string) $registry; } - if (isset($array['urls']) && $array['urls']) + if (isset($array['urls']) && is_array($array['urls'])) { $registry = new Registry; $registry->loadArray($array['urls']); diff --git a/administrator/components/com_templates/models/template.php b/administrator/components/com_templates/models/template.php index 4faba95082efa..99a61f6e6167c 100644 --- a/administrator/components/com_templates/models/template.php +++ b/administrator/components/com_templates/models/template.php @@ -512,7 +512,11 @@ public function save($data) return false; } + // Make sure EOL is Unix + $data['source'] = str_replace(array("\r\n", "\r"), "\n", $data['source']); + $return = JFile::write($filePath, $data['source']); + if (!$return) { $app->enqueueMessage(JText::sprintf('COM_TEMPLATES_ERROR_FAILED_TO_SAVE_FILENAME', $fileName), 'error'); diff --git a/administrator/components/com_users/models/group.php b/administrator/components/com_users/models/group.php index 8909aef0d1233..dd5f2c4404c77 100644 --- a/administrator/components/com_users/models/group.php +++ b/administrator/components/com_users/models/group.php @@ -135,7 +135,7 @@ protected function preprocessForm(JForm $form, $data, $group = '') */ public function save($data) { - // Include the content plugins for events. + // Include the user plugins for events. JPluginHelper::importPlugin($this->events_map['save']); /** diff --git a/administrator/components/com_users/views/users/tmpl/modal.php b/administrator/components/com_users/views/users/tmpl/modal.php index e63a8d653e177..6550f92934148 100644 --- a/administrator/components/com_users/views/users/tmpl/modal.php +++ b/administrator/components/com_users/views/users/tmpl/modal.php @@ -75,7 +75,7 @@ + data-user-field="escape($field);?>" onclick="if (window.parent) window.parent.jSelectUser(this);"> name; ?> diff --git a/administrator/language/en-GB/en-GB.com_admin.ini b/administrator/language/en-GB/en-GB.com_admin.ini index da16992f8ffc7..d3e0399a2b8a4 100644 --- a/administrator/language/en-GB/en-GB.com_admin.ini +++ b/administrator/language/en-GB/en-GB.com_admin.ini @@ -112,6 +112,7 @@ COM_ADMIN_LOG_DIRECTORY="(Log folder)" COM_ADMIN_MAGIC_QUOTES="Magic Quotes" COM_ADMIN_MAX_INPUT_VARS="Maximum Input Variables" COM_ADMIN_MBSTRING_ENABLED="Multibyte String (mbstring) Enabled" +COM_ADMIN_MCRYPT_ENABLED="Mcrypt Enabled" COM_ADMIN_NA="n/a" COM_ADMIN_OPEN_BASEDIR="Open basedir" COM_ADMIN_OUTPUT_BUFFERING="Output Buffering" diff --git a/administrator/language/en-GB/en-GB.com_cache.ini b/administrator/language/en-GB/en-GB.com_cache.ini index 8090057c56a07..2a3ee9568095e 100644 --- a/administrator/language/en-GB/en-GB.com_cache.ini +++ b/administrator/language/en-GB/en-GB.com_cache.ini @@ -11,8 +11,10 @@ COM_CACHE_CLEAR_CACHE_ADMIN_TITLE="Maintenance: Clear Cache (Administrator)" COM_CACHE_CLEAR_CACHE_SITE_TITLE="Maintenance: Clear Cache (Site)" COM_CACHE_PURGE_EXPIRED_CACHE="Maintenance: Clear Expired Cache" COM_CACHE_CONFIGURATION="Cache: Options" -COM_CACHE_EXPIRED_ITEMS_HAVE_BEEN_PURGED="Expired items have been cleared." -COM_CACHE_EXPIRED_ITEMS_PURGING_ERROR="Error clearing expired items." +COM_CACHE_EXPIRED_ITEMS_HAVE_BEEN_DELETED="The selected cache group(s) have been cleared." +COM_CACHE_EXPIRED_ITEMS_HAVE_BEEN_PURGED="Expired cached items have been cleared." +COM_CACHE_EXPIRED_ITEMS_DELETE_ERROR="Error clearing cache group(s): %s." +COM_CACHE_EXPIRED_ITEMS_PURGING_ERROR="Error clearing expired cached items." COM_CACHE_GROUP="Cache Group" COM_CACHE_HEADING_GROUP_ASC="Cache Group ascending" COM_CACHE_HEADING_GROUP_DESC="Cache Group descending" diff --git a/administrator/language/en-GB/en-GB.com_config.ini b/administrator/language/en-GB/en-GB.com_config.ini index 0bdc95f6c96b4..028f5edd14be2 100644 --- a/administrator/language/en-GB/en-GB.com_config.ini +++ b/administrator/language/en-GB/en-GB.com_config.ini @@ -28,6 +28,7 @@ COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTWRITABLE="Could not make configuration.php COM_CONFIG_ERROR_HELPREFRESH_ERROR_STORE="The new Help Sites list could not be saved." COM_CONFIG_ERROR_HELPREFRESH_FETCH="The current Help Sites list could not be fetched from the remote server." COM_CONFIG_ERROR_ROOT_ASSET_NOT_FOUND="The asset for global configuration could not be found. Permissions have not been saved." +COM_CONFIG_ERROR_SSL_NOT_AVAILABLE="HTTPS has not been enabled as it is not available on this server." COM_CONFIG_ERROR_REMOVING_SUPER_ADMIN="You can't remove your own Super User permissions." COM_CONFIG_ERROR_WRITE_FAILED="Could not write to the configuration file" COM_CONFIG_FIELD_CACHE_HANDLER_DESC="Choose cache handler to enable caching. Native caching mechanism is file-based. Please make sure the cache folders are writable." @@ -52,7 +53,7 @@ COM_CONFIG_FIELD_DATABASE_TYPE_DESC="The type of database in use entered during COM_CONFIG_FIELD_DATABASE_TYPE_LABEL="Database Type" COM_CONFIG_FIELD_DATABASE_USERNAME_DESC="The username for access to your database entered during the installation process. Do not edit this field unless absolutely necessary (eg the transfer of the database to a new hosting provider)." COM_CONFIG_FIELD_DATABASE_USERNAME_LABEL="Database Username" -COM_CONFIG_FIELD_DEBUG_LANG_DESC="Select whether the debugging indicators (**...**) or (??...??) for the Joomla Language files will be displayed. Debug Language will work without Debug System being activated, but you will not get the additional detailed references that will help you correct any errors." +COM_CONFIG_FIELD_DEBUG_LANG_DESC="Select whether the debugging indicators (** ... **) or (?? ... ??) for the Joomla Language files will be displayed. Debug Language will work without Debug System being activated, but you will not get the additional detailed references that will help you correct any errors." COM_CONFIG_FIELD_DEBUG_LANG_LABEL="Debug Language" COM_CONFIG_FIELD_DEBUG_SYSTEM_DESC="If enabled, diagnostic information, language translation and SQL errors (if present) will be displayed. The information will be displayed at the foot of every page you view within the Joomla Backend and Frontend. It is not advisable to leave the debug mode activated when running a live website." COM_CONFIG_FIELD_DEBUG_SYSTEM_LABEL="Debug System" @@ -80,8 +81,8 @@ COM_CONFIG_FRONTEDITING_LABEL="Mouse-over Edit Icons for" COM_CONFIG_FRONTEDITING_MENUSANDMODULES="Modules & Menus" COM_CONFIG_FRONTEDITING_MENUSANDMODULES_ADMIN_TOO="Modules & Menus (administrator too)" COM_CONFIG_FRONTEDITING_MODULES="Modules" -COM_CONFIG_FIELD_FORCE_SSL_DESC="Force site access to always occur under SSL (https) for selected areas. You will not be able to access selected areas under non-ssl. Note, you must have SSL enabled on your server to utilise this option." -COM_CONFIG_FIELD_FORCE_SSL_LABEL="Force SSL" +COM_CONFIG_FIELD_FORCE_SSL_DESC="Force site access in the selected areas to occur only with HTTPS (encrypted HTTP connections with the https:// protocol prefix). Note, you must have HTTPS enabled on your server to utilise this option." +COM_CONFIG_FIELD_FORCE_SSL_LABEL="Force HTTPS" COM_CONFIG_FIELD_FTP_ENABLE_DESC="Enable the built in FTP (File Transfer Protocol) functionality which is needed in some server environments to be used instead of the normal upload functionality of Joomla." COM_CONFIG_FIELD_FTP_ENABLE_LABEL="Enable FTP" COM_CONFIG_FIELD_FTP_HOST_DESC="Enter the name of the host of your FTP server." @@ -118,9 +119,9 @@ COM_CONFIG_FIELD_MAIL_SMTP_HOST_DESC="Enter the name of the SMTP host." COM_CONFIG_FIELD_MAIL_SMTP_HOST_LABEL="SMTP Host" COM_CONFIG_FIELD_MAIL_SMTP_PASSWORD_DESC="Enter the password for the SMTP host." COM_CONFIG_FIELD_MAIL_SMTP_PASSWORD_LABEL="SMTP Password" -COM_CONFIG_FIELD_MAIL_SMTP_PORT_DESC="Enter the port number of your SMTP server. Use 25 for most unsecured servers and 465 for most secure servers." +COM_CONFIG_FIELD_MAIL_SMTP_PORT_DESC="Enter the port number of the SMTP server Joomla will use to send emails. Usually:
- 25 when using an unsecure mail server
- 465 when using a secure server with SMTPS
- 25 or 587 when using a secure server with SMTP with STARTTLS extension." COM_CONFIG_FIELD_MAIL_SMTP_PORT_LABEL="SMTP Port" -COM_CONFIG_FIELD_MAIL_SMTP_SECURE_DESC="Select the security model that your SMTP server uses." +COM_CONFIG_FIELD_MAIL_SMTP_SECURE_DESC="Select the security model of the SMTP server Joomla will use to send emails.
- None for no encryption
- SSL/TLS for SMTPS (usually on port 465)
- STARTTLS for SMTP with STARTTLS extension (usually on port 25 or port 587)" COM_CONFIG_FIELD_MAIL_SMTP_SECURE_LABEL="SMTP Security" COM_CONFIG_FIELD_MAIL_SMTP_USERNAME_DESC="Enter the username for access to the SMTP host." COM_CONFIG_FIELD_MAIL_SMTP_USERNAME_LABEL="SMTP Username" @@ -211,9 +212,9 @@ COM_CONFIG_FIELD_VALUE_SENDMAIL="Sendmail" COM_CONFIG_FIELD_VALUE_SIMPLE="Simple" COM_CONFIG_FIELD_VALUE_SITE_EMAIL="Site Email" COM_CONFIG_FIELD_VALUE_SMTP="SMTP" -COM_CONFIG_FIELD_VALUE_SSL="SSL" +COM_CONFIG_FIELD_VALUE_SSL="SSL/TLS" COM_CONFIG_FIELD_VALUE_SYSTEM_DEFAULT="System Default" -COM_CONFIG_FIELD_VALUE_TLS="TLS" +COM_CONFIG_FIELD_VALUE_TLS="STARTTLS" COM_CONFIG_FTP_DETAILS="FTP Login Details" COM_CONFIG_FTP_DETAILS_TIP="For updating your configuration.php file, Joomla will most likely need your FTP account details. Please enter them in the form fields below." COM_CONFIG_FTP_SETTINGS="FTP Settings" diff --git a/administrator/language/en-GB/en-GB.com_contact.ini b/administrator/language/en-GB/en-GB.com_contact.ini index c7ee1a7a4429d..48391fd7c0de9 100644 --- a/administrator/language/en-GB/en-GB.com_contact.ini +++ b/administrator/language/en-GB/en-GB.com_contact.ini @@ -38,11 +38,11 @@ COM_CONTACT_FIELD_CATEGORY_DESC="Select a contact category to display." COM_CONTACT_FIELD_CATEGORY_LABEL="Select a Category" COM_CONTACT_FIELD_CONFIG_ALLOW_VCARD_DESC="Allow vCard to be displayed." COM_CONTACT_FIELD_CONFIG_ALLOW_VCARD_LABEL="Allow vCard" -COM_CONTACT_FIELD_CONFIG_BANNED_EMAIL_DESC="Email addresses not allowed to submit contact form." +COM_CONTACT_FIELD_CONFIG_BANNED_EMAIL_DESC="Email addresses not allowed to submit contact form. Separate multiple email addresses with a semi-colon." COM_CONTACT_FIELD_CONFIG_BANNED_EMAIL_LABEL="Banned Email" -COM_CONTACT_FIELD_CONFIG_BANNED_SUBJECT_DESC="Subjects not allowed in contact form." +COM_CONTACT_FIELD_CONFIG_BANNED_SUBJECT_DESC="Subjects not allowed in contact form. Separate multiple subjects with a semi-colon." COM_CONTACT_FIELD_CONFIG_BANNED_SUBJECT_LABEL="Banned Subject" -COM_CONTACT_FIELD_CONFIG_BANNED_TEXT_DESC="Text not allowed in contact form body." +COM_CONTACT_FIELD_CONFIG_BANNED_TEXT_DESC="Text not allowed in contact form body. Separate multiple words with a semi-colon." COM_CONTACT_FIELD_CONFIG_BANNED_TEXT_LABEL="Banned Text" COM_CONTACT_FIELD_CONFIG_CATEGORIES_DESC="These settings apply for Contact Categories Options unless they are changed for a specific menu item." COM_CONTACT_FIELD_CONFIG_CATEGORY_DESC="These settings apply for Contact Category Options unless they are changed for a specific menu item." @@ -291,4 +291,4 @@ COM_CONTACT_XML_DESCRIPTION="This component shows a listing of contact informati JGLOBAL_FIELDSET_MISCELLANEOUS="Miscellaneous Information" JGLOBAL_NEWITEMSLAST_DESC="New Contacts default to the last position. Ordering can be changed after this Contact is saved." JLIB_HTML_BATCH_USER_LABEL="Set Linked User" -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." \ No newline at end of file +JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." diff --git a/administrator/language/en-GB/en-GB.com_cpanel.ini b/administrator/language/en-GB/en-GB.com_cpanel.ini index ac51480c16435..3807ed2beb57d 100644 --- a/administrator/language/en-GB/en-GB.com_cpanel.ini +++ b/administrator/language/en-GB/en-GB.com_cpanel.ini @@ -27,7 +27,7 @@ COM_CPANEL_MSG_PHPVERSION_BODY="Beginning with Joomla! 3.3, the version of PHP t COM_CPANEL_MSG_PHPVERSION_TITLE="Your PHP Version Will Be Unsupported in Joomla! 3.3" COM_CPANEL_MSG_ROBOTS_TITLE="robots.txt Update" COM_CPANEL_MSG_ROBOTS_BODY="A change to the default robots.txt files was made in Joomla! 3.3 to allow Google to access templates and media files by default to improve SEO. This change is not applied automatically on upgrades and users are recommended to review the changes in the robots.txt.dist file and implement these change in their own robots.txt file." -COM_CPANEL_MSG_STATS_COLLECTION_BODY="Since Joomla! 3.5 a statistics plugin will submit anonymous data to the Joomla Project. This will only submit the Joomla version, PHP version, database engine and version, and server operating system.

This data is collected to ensure that future versions of Joomla can take advantage of the latest database and PHP features without effecting significant numbers of users. The need for this became clear when a minimum of PHP 5.3.10 was required when Joomla! 3.3 implemented the more secure Bcrypt passwords.

In the interest of full transparency and to help developers this data is publicly available. An API and graphs will show the Joomla version, PHP versions and database engines in use.

If you do not wish to provide the Joomla Project with this information you can disable the plugin called System - Joomla Statistics." +COM_CPANEL_MSG_STATS_COLLECTION_BODY="Since Joomla! 3.5 a statistics plugin will submit anonymous data to the Joomla Project. This will only submit the Joomla version, PHP version, database engine and version, and server operating system.

This data is collected to ensure that future versions of Joomla can take advantage of the latest database and PHP features without affecting significant numbers of users. The need for this became clear when a minimum of PHP 5.3.10 was required when Joomla! 3.3 implemented the more secure Bcrypt passwords.

In the interest of full transparency and to help developers this data is publicly available. An API and graphs will show the Joomla version, PHP versions and database engines in use.

If you do not wish to provide the Joomla Project with this information you can disable the plugin called System - Joomla Statistics." COM_CPANEL_MSG_STATS_COLLECTION_TITLE="Stats Collection in Joomla" COM_CPANEL_WELCOME_BEGINNERS_MESSAGE="

Community resources are available for new users

" COM_CPANEL_WELCOME_BEGINNERS_TITLE="Welcome to Joomla!" diff --git a/administrator/language/en-GB/en-GB.com_installer.ini b/administrator/language/en-GB/en-GB.com_installer.ini index 896ea932b2e14..7c7e9b551b0f7 100644 --- a/administrator/language/en-GB/en-GB.com_installer.ini +++ b/administrator/language/en-GB/en-GB.com_installer.ini @@ -145,6 +145,7 @@ COM_INSTALLER_MSG_WARNINGS_MEDMEMORYDESC="Potentially low PHP memory limit." COM_INSTALLER_MSG_WARNINGS_MEDMEMORYWARN="Your PHP memory limit is set below 16MB which may cause some issues when installing large extensions. Please set your memory limit to at least 16MB." COM_INSTALLER_MSG_WARNINGS_NONE="No warnings detected." COM_INSTALLER_MSG_WARNINGS_NOTCOMPLETE="

Warning: Update Not Complete!

The update is only partially complete. Please do the second update to complete the process.

" +COM_INSTALLER_MSG_WARNINGS_NOTICE="There are some warnings detected." COM_INSTALLER_MSG_WARNINGS_PHPUPLOADNOTSET="The PHP temporary folder is not set." COM_INSTALLER_MSG_WARNINGS_PHPUPLOADNOTSETDESC="The PHP temporary folder is the folder that PHP uses to store an uploaded file before Joomla can access this file. Whilst the folder not being set isn't always a problem, if you are having issues with manifest files not being detected or uploaded files not being detected, setting this in your php.ini file might fix the issue." COM_INSTALLER_MSG_WARNINGS_PHPUPLOADNOTWRITEABLE="The PHP temporary folder is not writeable." diff --git a/administrator/language/en-GB/en-GB.com_joomlaupdate.ini b/administrator/language/en-GB/en-GB.com_joomlaupdate.ini index 2ef11974fe574..b7a14c049829e 100644 --- a/administrator/language/en-GB/en-GB.com_joomlaupdate.ini +++ b/administrator/language/en-GB/en-GB.com_joomlaupdate.ini @@ -29,11 +29,11 @@ COM_JOOMLAUPDATE_VIEW_COMPLETE_MESSAGE="Your site has been successfully updated. COM_JOOMLAUPDATE_VIEW_DEFAULT_DOWNLOAD_IN_PROGRESS="Downloading update file. Please wait ..." COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL="We can't find a download URL" COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL_DESC="An update to Joomla %1$s was found, but it wasn't possible to fetch the download URL for that update. There are two possibilities why this happens:
- Your host doesn't support the minimum requirements for Joomla %1$s and there is no alternative download for your configuration available.
- There is a problem with Joomla Update Server.

Please try to download the update package from the official Joomla download page and use the Upload and Install tab." -COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_DIRECTORY="FTP folder" -COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_HOSTNAME="FTP host" -COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_PASSWORD="FTP password" -COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_PORT="FTP port" -COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_USERNAME="FTP username" +CCOM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_DIRECTORY="FTP Root" +COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_HOSTNAME="FTP Host" +COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_PASSWORD="FTP Password" +COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_PORT="FTP Port" +COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_USERNAME="FTP Username" COM_JOOMLAUPDATE_VIEW_DEFAULT_INFOURL="Additional Information" COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALLAGAIN="Reinstall Joomla core files" COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALLED="Installed Joomla version" diff --git a/administrator/language/en-GB/en-GB.com_media.ini b/administrator/language/en-GB/en-GB.com_media.ini index 68488ac3fe1ea..f111be394d71a 100644 --- a/administrator/language/en-GB/en-GB.com_media.ini +++ b/administrator/language/en-GB/en-GB.com_media.ini @@ -38,7 +38,7 @@ COM_MEDIA_ERROR_UNABLE_TO_DELETE_FOLDER_NOT_EMPTY="Unable to delete: %s. Fo COM_MEDIA_ERROR_UNABLE_TO_DELETE_FOLDER_WARNDIRNAME="Unable to delete: %s." COM_MEDIA_ERROR_UNABLE_TO_DELETE=" Unable to delete: " COM_MEDIA_ERROR_UNABLE_TO_UPLOAD_FILE="Unable to upload file." -COM_MEDIA_ERROR_UPLOAD_INPUT="Please input a file for upload" +COM_MEDIA_ERROR_UPLOAD_INPUT="Please input a file to upload" COM_MEDIA_ERROR_WARNFILENAME="File name must only contain alphanumeric characters and no spaces." COM_MEDIA_ERROR_WARNFILETOOLARGE="This file is too large to upload." COM_MEDIA_ERROR_WARNFILETYPE="This file type is not supported." @@ -52,13 +52,13 @@ COM_MEDIA_FIELD_CHECK_MIME_DESC="Use MIME Magic or Fileinfo to attempt to verify COM_MEDIA_FIELD_CHECK_MIME_LABEL="Check MIME Types" COM_MEDIA_FIELD_IGNORED_EXTENSIONS_DESC="Ignored file extensions for MIME type checking and restricted uploads." COM_MEDIA_FIELD_IGNORED_EXTENSIONS_LABEL="Ignored Extensions" -COM_MEDIA_FIELD_ILLEGAL_MIME_TYPES_DESC="A comma separated list of illegal MIME types for upload (blacklist)." +COM_MEDIA_FIELD_ILLEGAL_MIME_TYPES_DESC="A comma separated list of illegal MIME types to upload (blacklist)." COM_MEDIA_FIELD_ILLEGAL_MIME_TYPES_LABEL="Illegal MIME Types" COM_MEDIA_FIELD_LEGAL_EXTENSIONS_DESC=" Extensions (file types) you are allowed to upload (comma separated)." COM_MEDIA_FIELD_LEGAL_EXTENSIONS_LABEL="Legal Extensions (File Types)" COM_MEDIA_FIELD_LEGAL_IMAGE_EXTENSIONS_DESC=" Image extensions (file types) you are allowed to upload (comma separated). These are used to check for valid image headers." COM_MEDIA_FIELD_LEGAL_IMAGE_EXTENSIONS_LABEL="Legal Image Extensions (File Types)" -COM_MEDIA_FIELD_LEGAL_MIME_TYPES_DESC="A comma separated list of legal MIME types for upload." +COM_MEDIA_FIELD_LEGAL_MIME_TYPES_DESC="A comma separated list of legal MIME types to upload." COM_MEDIA_FIELD_LEGAL_MIME_TYPES_LABEL="Legal MIME Types" COM_MEDIA_FIELD_MAXIMUM_SIZE_DESC="The maximum size for an upload (in megabytes). Use zero for no limit. Note: your server has a maximum limit." COM_MEDIA_FIELD_MAXIMUM_SIZE_LABEL="Maximum Size (in MB)" diff --git a/administrator/language/en-GB/en-GB.com_menus.ini b/administrator/language/en-GB/en-GB.com_menus.ini index 331f4e414a0c8..0dde0f26e2db0 100644 --- a/administrator/language/en-GB/en-GB.com_menus.ini +++ b/administrator/language/en-GB/en-GB.com_menus.ini @@ -101,7 +101,7 @@ COM_MENUS_ITEM_FIELD_PAGE_TITLE_DESC="Optional text for the "Browser page t COM_MENUS_ITEM_FIELD_PAGE_TITLE_LABEL="Browser Page Title" COM_MENUS_ITEM_FIELD_PARENT_DESC="Select a parent item." COM_MENUS_ITEM_FIELD_PARENT_LABEL="Parent Item" -COM_MENUS_ITEM_FIELD_SECURE_DESC="Selects whether or not this link should use SSL and the Secure Site URL." +COM_MENUS_ITEM_FIELD_SECURE_DESC="Selects whether or not this link should use HTTPS (encrypted HTTP connections with the https:// protocol prefix). Note, you must have HTTPS enabled on your server to utilise this option." COM_MENUS_ITEM_FIELD_SECURE_LABEL="Secure" COM_MENUS_ITEM_FIELD_SHOW_PAGE_HEADING_DESC="Show or hide the Browser Page Title in the heading of the page ( If no optional text entered - will default to value based on the Menu Item Title ). The Page heading is usually displayed inside the "H1" tag." COM_MENUS_ITEM_FIELD_SHOW_PAGE_HEADING_LABEL="Show Page Heading" diff --git a/administrator/language/en-GB/en-GB.com_users.ini b/administrator/language/en-GB/en-GB.com_users.ini index 9701cecf6aaef..9312c3b332f5b 100644 --- a/administrator/language/en-GB/en-GB.com_users.ini +++ b/administrator/language/en-GB/en-GB.com_users.ini @@ -164,7 +164,7 @@ COM_USERS_MAIL_DETAILS="Details" COM_USERS_MAIL_EMAIL_SENT_TO_N_USERS="Email sent to %s users." COM_USERS_MAIL_EMAIL_SENT_TO_N_USERS_1="Email sent to one user." COM_USERS_MAIL_FIELD_EMAIL_DISABLED_USERS_DESC="If checked, disabled users will be included when sending mail." -COM_USERS_MAIL_FIELD_EMAIL_DISABLED_USERS_LABEL="Send to Disabled Users." +COM_USERS_MAIL_FIELD_EMAIL_DISABLED_USERS_LABEL="Send to Disabled Users" COM_USERS_MAIL_FIELD_GROUP_DESC="Choose a group to send the mail to." COM_USERS_MAIL_FIELD_GROUP_LABEL="Group:" COM_USERS_MAIL_FIELD_MESSAGE_DESC="Enter a default message." diff --git a/administrator/language/en-GB/en-GB.ini b/administrator/language/en-GB/en-GB.ini index acdceb6bb2927..1b4b31c1f8345 100644 --- a/administrator/language/en-GB/en-GB.ini +++ b/administrator/language/en-GB/en-GB.ini @@ -557,6 +557,7 @@ JGLOBAL_TITLE_REVERSE_ALPHABETICAL="Title Reverse Alphabetical" JGLOBAL_TOGGLE_FEATURED="Toggle featured status." JGLOBAL_TOP="Top" JGLOBAL_TPL_CPANEL_LINK_TEXT="Return to Control Panel" +JGLOBAL_TYPE_OR_SELECT_SOME_OPTIONS="Type or select some options" JGLOBAL_USE_GLOBAL="Use Global" JGLOBAL_USERNAME="Username" JGLOBAL_VALIDATION_FORM_FAILED="Invalid form" diff --git a/administrator/language/en-GB/en-GB.mod_login.ini b/administrator/language/en-GB/en-GB.mod_login.ini index ed65673ec26d7..693ac62c2a5c1 100644 --- a/administrator/language/en-GB/en-GB.mod_login.ini +++ b/administrator/language/en-GB/en-GB.mod_login.ini @@ -4,7 +4,7 @@ ; Note : All ini files need to be saved as UTF-8 MOD_LOGIN="Login Form" -MOD_LOGIN_FIELD_USESECURE_DESC="Submit encrypted login data (requires SSL). Do not enable this option if Joomla is not accessible using the https:// protocol prefix." +MOD_LOGIN_FIELD_USESECURE_DESC="Submit encrypted login data using HTTPS (encrypted HTTP connections with the https:// protocol prefix). Note, you must have HTTPS enabled on your server to utilise this option." MOD_LOGIN_FIELD_USESECURE_LABEL="Encrypt Login Form" MOD_LOGIN_LANGUAGE="Language" MOD_LOGIN_LOGIN="Log in" diff --git a/administrator/language/en-GB/en-GB.plg_captcha_recaptcha.ini b/administrator/language/en-GB/en-GB.plg_captcha_recaptcha.ini index 0370d3570e870..fe797151c5b34 100644 --- a/administrator/language/en-GB/en-GB.plg_captcha_recaptcha.ini +++ b/administrator/language/en-GB/en-GB.plg_captcha_recaptcha.ini @@ -3,7 +3,7 @@ ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; Note : All ini files need to be saved as UTF-8 -PLG_CAPTCHA_RECAPTCHA_XML_DESCRIPTION="This CAPTCHA plugin uses the reCAPTCHA service to prevent spammers while it helps to digitize books, newspapers and old radio shows. To get a site and secret key for your domain, go to http://www.google.com/recaptcha. To use this for new account registration, go to Options in the User Manager and select CAPTCHA - reCAPTCHA as the CAPTCHA." +PLG_CAPTCHA_RECAPTCHA_XML_DESCRIPTION="This CAPTCHA plugin uses the reCAPTCHA service to prevent spammers while it helps to digitize books, newspapers and old radio shows. To get a site and secret key for your domain, go to https://www.google.com/recaptcha. To use this for new account registration, go to Options in the User Manager and select CAPTCHA - reCAPTCHA as the CAPTCHA." PLG_CAPTCHA_RECAPTCHA="CAPTCHA - reCAPTCHA" ; Params diff --git a/administrator/language/en-GB/en-GB.plg_captcha_recaptcha.sys.ini b/administrator/language/en-GB/en-GB.plg_captcha_recaptcha.sys.ini index 5c681eb793750..6d60c263adbb7 100644 --- a/administrator/language/en-GB/en-GB.plg_captcha_recaptcha.sys.ini +++ b/administrator/language/en-GB/en-GB.plg_captcha_recaptcha.sys.ini @@ -3,5 +3,5 @@ ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; Note : All ini files need to be saved as UTF-8 -PLG_CAPTCHA_RECAPTCHA_XML_DESCRIPTION="This CAPTCHA plugin uses the reCAPTCHA service to prevent spammers while it helps to digitize books, newspapers and old radio shows. To get a site and secret key for your domain, go to http://www.google.com/recaptcha. To use this for new account registration, go to Options in the User Manager and select Captcha - reCaptcha as the Captcha." +PLG_CAPTCHA_RECAPTCHA_XML_DESCRIPTION="This CAPTCHA plugin uses the reCAPTCHA service to prevent spammers while it helps to digitize books, newspapers and old radio shows. To get a site and secret key for your domain, go to https://www.google.com/recaptcha. To use this for new account registration, go to Options in the User Manager and select Captcha - reCaptcha as the Captcha." PLG_CAPTCHA_RECAPTCHA="Captcha - ReCaptcha" diff --git a/administrator/language/en-GB/en-GB.plg_editors_codemirror.ini b/administrator/language/en-GB/en-GB.plg_editors_codemirror.ini index a79224c0da8d8..2f38710d7e8b1 100644 --- a/administrator/language/en-GB/en-GB.plg_editors_codemirror.ini +++ b/administrator/language/en-GB/en-GB.plg_editors_codemirror.ini @@ -15,7 +15,7 @@ PLG_CODEMIRROR_FIELD_AUTOFOCUS_DESC="Auto focus." PLG_CODEMIRROR_FIELD_AUTOFOCUS_LABEL="Auto Focus" PLG_CODEMIRROR_FIELD_CODEFOLDING_DESC="Allow blocks of code to be folded." PLG_CODEMIRROR_FIELD_CODEFOLDING_LABEL="Code Folding" -PLG_CODEMIRROR_FIELD_FONT_FAMILY_DESC="The font to use in the editor. If not installed, will be loaded from http://www.google.com/webfonts." +PLG_CODEMIRROR_FIELD_FONT_FAMILY_DESC="The font to use in the editor. If not installed, will be loaded from https://www.google.com/fonts/." PLG_CODEMIRROR_FIELD_FONT_FAMILY_LABEL="Font" PLG_CODEMIRROR_FIELD_FONT_SIZE_DESC="The size of the font in the editor." PLG_CODEMIRROR_FIELD_FONT_SIZE_LABEL="Font Size (px)" diff --git a/administrator/language/en-GB/en-GB.plg_system_languagecode.ini b/administrator/language/en-GB/en-GB.plg_system_languagecode.ini index 9aa8da151e654..c8c871eb220d4 100644 --- a/administrator/language/en-GB/en-GB.plg_system_languagecode.ini +++ b/administrator/language/en-GB/en-GB.plg_system_languagecode.ini @@ -7,4 +7,4 @@ PLG_SYSTEM_LANGUAGECODE="System - Language Code" PLG_SYSTEM_LANGUAGECODE_FIELD_DESC="Changes the language code used for the %s language." PLG_SYSTEM_LANGUAGECODE_FIELDSET_DESC="Changes the language code for the generated HTML document. Example of use: You have installed the fr-FR language pack and want the Search Engines to recognise the page as aimed at French-speaking Canada. Add the tag 'fr-CA' to the corresponding field for 'fr-FR' to resolve this." PLG_SYSTEM_LANGUAGECODE_FIELDSET_LABEL="Language Codes" -PLG_SYSTEM_LANGUAGECODE_XML_DESCRIPTION="Provides the ability to change the language code in the generated HTML document to improve SEO.
The fields will appear when the plugin is enabled and saved.
More information at W3.org." +PLG_SYSTEM_LANGUAGECODE_XML_DESCRIPTION="Provides the ability to change the language code in the generated HTML document to improve SEO.
The fields will appear when the plugin is enabled and saved.
More information at W3.org." diff --git a/administrator/language/en-GB/en-GB.plg_system_p3p.ini b/administrator/language/en-GB/en-GB.plg_system_p3p.ini index 9b7ee58fab8d6..78a37b57bd595 100644 --- a/administrator/language/en-GB/en-GB.plg_system_p3p.ini +++ b/administrator/language/en-GB/en-GB.plg_system_p3p.ini @@ -5,5 +5,5 @@ PLG_P3P_XML_DESCRIPTION="The system P3P policy plugin allows Joomla! to send a customised string of P3P policy tags in the HTTP header. This is required for the sessions to work on certain browsers, ie Internet Explorer 6 and 7." PLG_SYSTEM_P3P="System - P3P Policy" -PLG_P3P_HEADER_DESCRIPTION="Enter your P3P policy tags. For more information consult The Platform for Privacy Preferences specification, http://www.w3.org/TR/P3P/" +PLG_P3P_HEADER_DESCRIPTION="Enter your P3P policy tags. For more information consult The Platform for Privacy Preferences specification, https://www.w3.org/TR/P3P/" PLG_P3P_HEADER_LABEL="P3P Tags" \ No newline at end of file diff --git a/administrator/language/en-GB/en-GB.plg_twofactorauth_totp.ini b/administrator/language/en-GB/en-GB.plg_twofactorauth_totp.ini index fff3db4ce6536..c13b21b58a6cc 100644 --- a/administrator/language/en-GB/en-GB.plg_twofactorauth_totp.ini +++ b/administrator/language/en-GB/en-GB.plg_twofactorauth_totp.ini @@ -8,7 +8,7 @@ PLG_TWOFACTORAUTH_TOTP_ERR_VALIDATIONFAILED="You did not enter a valid security PLG_TWOFACTORAUTH_TOTP_INTRO="This feature allows you to use Google Authenticator, or a compatible application, for two factor authentication. In addition to your username and password you will also need to provide a six digit security code generated by Google Authenticator to be able to login to this site. The security code is rotated every 30 seconds. This provides extra protection against hackers logging in to your account even if they were able to get hold of your password." PLG_TWOFACTORAUTH_TOTP_METHOD_TITLE="Google Authenticator" PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_TITLE="Two Factor Authentication is Available" -PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_BODY="Joomla! comes with a built-in two factor authentication system. It secures your site login with a secondary secret code that's changing every 30 seconds. You can use your mobile device and the Google Authenticator app to produce that code.
By selecting the button below:" +PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_BODY="Joomla! comes with a built-in two factor authentication system. It secures your site login with a secondary secret code that's changing every 30 seconds. You can use your mobile device and the Google Authenticator app to produce that code.
By selecting the button below:" PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_ACTION="Enable two factor authentication" PLG_TWOFACTORAUTH_TOTP_SECTION_ADMIN="Administrator (Backend)" PLG_TWOFACTORAUTH_TOTP_SECTION_BOTH="Both" @@ -18,10 +18,10 @@ PLG_TWOFACTORAUTH_TOTP_SECTION_SITE="Site (Frontend)" PLG_TWOFACTORAUTH_TOTP_STEP1_HEAD="Step 1 - Get Google Authenticator" PLG_TWOFACTORAUTH_TOTP_STEP1_ITEM1="Official Google Authenticator app for Android, iOS and BlackBerry" ; Check the URL and change the part hl=en to your language tag if this is available (example hl=de; hl=zh-cn; hl=zh-tw) -PLG_TWOFACTORAUTH_TOTP_STEP1_ITEM1_LINK="http://support.google.com/accounts/bin/answer.py?hl=en&answer=1066447" +PLG_TWOFACTORAUTH_TOTP_STEP1_ITEM1_LINK="https://support.google.com/accounts/bin/answer.py?hl=en&answer=1066447" PLG_TWOFACTORAUTH_TOTP_STEP1_ITEM2="Compatible clients for other devices and operating system (listed in Wikipedia)." ; Change and check this link if there is a translation in your language available. (current: German, Spanish, French, Japanese, Polish) -PLG_TWOFACTORAUTH_TOTP_STEP1_ITEM2_LINK="http://en.wikipedia.org/wiki/Google_Authenticator#Implementation" +PLG_TWOFACTORAUTH_TOTP_STEP1_ITEM2_LINK="https://en.wikipedia.org/wiki/Google_Authenticator#Implementation" PLG_TWOFACTORAUTH_TOTP_STEP1_TEXT="Download and install Google Authenticator, or a compatible application, on your smartphone or desktop. Use one of the following:" PLG_TWOFACTORAUTH_TOTP_STEP1_WARN="Please remember to sync your device's clock with a time-server. Time drift in your device may cause an inability to log in to your site." PLG_TWOFACTORAUTH_TOTP_STEP2_ACCOUNT="Account" diff --git a/administrator/language/en-GB/en-GB.plg_twofactorauth_yubikey.ini b/administrator/language/en-GB/en-GB.plg_twofactorauth_yubikey.ini index 11b6943154906..016336818ae07 100644 --- a/administrator/language/en-GB/en-GB.plg_twofactorauth_yubikey.ini +++ b/administrator/language/en-GB/en-GB.plg_twofactorauth_yubikey.ini @@ -18,5 +18,5 @@ PLG_TWOFACTORAUTH_YUBIKEY_SECTION_SITE="Site (Frontend)" PLG_TWOFACTORAUTH_YUBIKEY_SECURITYCODE="Security Code" PLG_TWOFACTORAUTH_YUBIKEY_STEP1_HEAD="Set up" PLG_TWOFACTORAUTH_YUBIKEY_STEP1_TEXT="Please insert your YubiKey device into your computer's USB port. Select the Security Code field below. Then touch the gold disk on your YubiKey device for one second. Afterwards, please save your user profile. If the code generated by your YubiKey is validated by YubiCloud the Two Factor Authentication feature will be enabled and this YubiKey will be linked with your user account." -PLG_TWOFACTORAUTH_YUBIKEY_XML_DESCRIPTION="Allows users on your site to use two factor authentication using a YubiKey secure hardware token. Users need their own Yubikey available from http://www.yubico.com/. To use two factor authentication users have to edit their user profile and enable two factor authentication." +PLG_TWOFACTORAUTH_YUBIKEY_XML_DESCRIPTION="Allows users on your site to use two factor authentication using a YubiKey secure hardware token. Users need their own Yubikey available from https://www.yubico.com/. To use two factor authentication users have to edit their user profile and enable two factor authentication." diff --git a/administrator/language/en-GB/en-GB.plg_twofactorauth_yubikey.sys.ini b/administrator/language/en-GB/en-GB.plg_twofactorauth_yubikey.sys.ini index d69dc419a4c9c..e79f48bd5af1b 100644 --- a/administrator/language/en-GB/en-GB.plg_twofactorauth_yubikey.sys.ini +++ b/administrator/language/en-GB/en-GB.plg_twofactorauth_yubikey.sys.ini @@ -4,4 +4,4 @@ ; Note : All ini files need to be saved as UTF-8 PLG_TWOFACTORAUTH_YUBIKEY="Two Factor Authentication - YubiKey" -PLG_TWOFACTORAUTH_YUBIKEY_XML_DESCRIPTION="Allows users on your site to use two factor authentication using a YubiKey secure hardware token. Users need their own Yubikey available from http://www.yubico.com/. To use two factor authentication users have to edit their user profile and enable two factor authentication." +PLG_TWOFACTORAUTH_YUBIKEY_XML_DESCRIPTION="Allows users on your site to use two factor authentication using a YubiKey secure hardware token. Users need their own Yubikey available from https://www.yubico.com/. To use two factor authentication users have to edit their user profile and enable two factor authentication." diff --git a/administrator/language/en-GB/en-GB.plg_user_profile.ini b/administrator/language/en-GB/en-GB.plg_user_profile.ini index b5f26d23ca14b..e3401e50b2ac6 100644 --- a/administrator/language/en-GB/en-GB.plg_user_profile.ini +++ b/administrator/language/en-GB/en-GB.plg_user_profile.ini @@ -7,7 +7,7 @@ COM_CONTENT_CHANGE_ARTICLE="Select or Change article" COM_CONTENT_CHANGE_ARTICLE_BUTTON="Select/Change" COM_CONTENT_SELECT_AN_ARTICLE="Select an Article" PLG_USER_PROFILE="User - Profile" -PLG_USER_PROFILE_ERROR_INVALID_DOB="The date of birth you entered is invalid. Please enter valid date." +PLG_USER_PROFILE_ERROR_INVALID_DOB="The date of birth you entered is invalid. Please enter a valid date." PLG_USER_PROFILE_FIELD_ABOUT_ME_DESC="Choose an option for the field About Me." PLG_USER_PROFILE_FIELD_ABOUT_ME_LABEL="About Me:" PLG_USER_PROFILE_FIELD_ADDRESS1_DESC="Choose an option for the field Address1." diff --git a/administrator/language/en-GB/en-GB.xml b/administrator/language/en-GB/en-GB.xml index 84a494375fd46..e2d47c59fe441 100644 --- a/administrator/language/en-GB/en-GB.xml +++ b/administrator/language/en-GB/en-GB.xml @@ -1,8 +1,8 @@ English (en-GB) - 3.5.0 - November 2015 + 3.5.2 + April 2016 Joomla! Project admin@joomla.org www.joomla.org diff --git a/administrator/language/en-GB/install.xml b/administrator/language/en-GB/install.xml index 00db4dc9f953b..871c930acbdcb 100644 --- a/administrator/language/en-GB/install.xml +++ b/administrator/language/en-GB/install.xml @@ -2,7 +2,7 @@ English (United Kingdom) en-GB - 3.5.0 + 3.5.2 2013-03-07 Joomla! Project admin@joomla.org diff --git a/administrator/manifests/files/joomla.xml b/administrator/manifests/files/joomla.xml index 186918d8daaac..8da7a9985e7cd 100644 --- a/administrator/manifests/files/joomla.xml +++ b/administrator/manifests/files/joomla.xml @@ -6,8 +6,8 @@ www.joomla.org (C) 2005 - 2016 Open Source Matters. All rights reserved GNU General Public License version 2 or later; see LICENSE.txt - 3.5.0-rc4 - March 2016 + 3.5.2-dev + April 2016 FILES_JOOMLA_XML_DESCRIPTION administrator/components/com_admin/script.php diff --git a/administrator/modules/mod_logged/tmpl/default.php b/administrator/modules/mod_logged/tmpl/default.php index 7c7a38a050f9b..c334efa989869 100644 --- a/administrator/modules/mod_logged/tmpl/default.php +++ b/administrator/modules/mod_logged/tmpl/default.php @@ -24,8 +24,7 @@ editLink)) : ?> - name; ?> - + name; ?> name; ?> diff --git a/administrator/modules/mod_menu/menu.php b/administrator/modules/mod_menu/menu.php index cb19500ea0fdb..56f0a7d5efd82 100644 --- a/administrator/modules/mod_menu/menu.php +++ b/administrator/modules/mod_menu/menu.php @@ -128,6 +128,8 @@ public function renderMenu($id = 'menu', $class = '') } echo "\n"; + + echo ''; } if ($this->_css) @@ -162,6 +164,11 @@ public function renderLevel($depth) if ($this->_current->hasChildren() && $this->_current->class) { $class = ' class="dropdown-submenu"'; + + if ($this->_current->class == 'scrollable-menu') + { + $class = ' class="dropdown scrollable-menu"'; + } } if ($this->_current->class == 'disabled') @@ -187,6 +194,10 @@ public function renderLevel($depth) $dropdownCaret = ' '; } } + else + { + $linkClass[] = 'no-dropdown'; + } if ($this->_current->link != null && $this->_current->getParent()->title != 'ROOT') { @@ -231,11 +242,11 @@ public function renderLevel($depth) $id = ' id="menu-' . strtolower($this->_current->id) . '"'; } - echo '' . "\n"; + echo '' . "\n"; } else { - echo '', '', 1, 19, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 8, '', '', 1, 0, '', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (22, 120, 'Getting Started', 'getting-started', '

It''s easy to get started creating your website. Knowing some of the basics will help.

What is a Content Management System?

@@ -464,7 +464,7 @@ INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext]
  • Unexpected behavior--anything that is working differently than it did in 2.5.
  • Report problems

    -

    If you find a problem please report it to the CMS Issue Tracker. You will need to register for a github.com account if you don''t have one.

    +

    If you find a problem please report it to the CMS Issue Tracker. You will need to register for a github.com account if you don''t have one.

    More Testing Ideas

    • Pick one module or view and test all of the parameters.
    • @@ -476,10 +476,10 @@ INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext]
    • Try with SEF URLS on or off and also with Apache rewrite on or off (if you are on Apache).
    • Try different combinations of browsers (Chrome, IE, FireFox, Opera to start) and operating systems (Mac, Windows, Linux).
    • Yes grammar and spelling errors are bugs too -- just keep in mind that we use British spelling.
    • -
    • Visit the Feature Tracker and test a new feature.
    • +
    • Visit the Feature Tracker and test a new feature.

    Testing changes

    -

    You can also help Joomla by testing bug fixes and new features. A useful tool is the patchtester component which helps to simplify and automate the process. Report your feedback on the CMS Issue Tracker. If you enjoy helping Joomla this way, you may want to join the Joomla Bug Squad.

    +

    You can also help Joomla by testing bug fixes and new features. A useful tool is the patchtester component which helps to simplify and automate the process. Report your feedback on the CMS Issue Tracker. If you enjoy helping Joomla this way, you may want to join the Joomla Bug Squad.

    ', '', 1, 19, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 716, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","urls_position":"","alternative_readmore":"","article_layout":""}', 4, 2, '', '', 1, 73, '{"robots":"","author":"","rights":"","xreference":""}', 1, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (25, 123, 'Koala', 'koala', '

    @@ -487,7 +487,7 @@ INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext]

    ', ' -

    ', 1, 72, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"images\/sampledata\/parks\/animals\/180px_koala_ag1.jpg","float_intro":"","image_intro_alt":"Koala Thumbnail","image_intro_caption":"","image_fulltext":"images\/sampledata\/parks\/animals\/800px_koala_ag1.jpg","float_fulltext":"","image_fulltext_alt":"Koala Climbing Tree","image_fulltext_caption":"Source: http:\/\/commons.wikimedia.org\/wiki\/File:Koala-ag1.jpg Author: Arnaud Gaillard License: Creative Commons Share Alike Attribution Generic 1.0"}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); +

    ', 1, 72, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"images\/sampledata\/parks\/animals\/180px_koala_ag1.jpg","float_intro":"","image_intro_alt":"Koala Thumbnail","image_intro_caption":"","image_fulltext":"images\/sampledata\/parks\/animals\/800px_koala_ag1.jpg","float_fulltext":"","image_fulltext_alt":"Koala Climbing Tree","image_fulltext_caption":"Source: https:\/\/commons.wikimedia.org\/wiki\/File:Koala-ag1.jpg Author: Arnaud Gaillard License: Creative Commons Share Alike Attribution Generic 1.0"}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (26, 124, 'Language Switcher', 'language-switcher', '

    The language switcher module allows you to take advantage of the language tags that are available when content, modules and menu links are created.

    This module displays a list of available Content Languages for switching between them.

    When switching languages, it redirects to the Home page, or associated menu item, defined for the chosen language. Thereafter, the navigation will be the one defined for that language.

    @@ -511,10 +511,10 @@ INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext]

    ', '', 1, 19, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 10, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (33, 131, 'Phyllopteryx', 'phyllopteryx', '

    ', ' -

    ', 1, 72, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"images\/sampledata\/parks\/animals\/200px_phyllopteryx_taeniolatus1.jpg","float_intro":"","image_intro_alt":"Phyllopteryx","image_intro_caption":"","image_fulltext":"images\/sampledata\/parks\/animals\/800px_phyllopteryx_taeniolatus1.jpg","float_fulltext":"","image_fulltext_alt":"Phyllopteryx","image_fulltext_caption":"Source: http:\/\/en.wikipedia.org\/wiki\/File:Phyllopteryx_taeniolatus1.jpg Author: Richard Ling License: GNU Free Documentation License v 1.2 or later"}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 3, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); +

    ', 1, 72, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"images\/sampledata\/parks\/animals\/200px_phyllopteryx_taeniolatus1.jpg","float_intro":"","image_intro_alt":"Phyllopteryx","image_intro_caption":"","image_fulltext":"images\/sampledata\/parks\/animals\/800px_phyllopteryx_taeniolatus1.jpg","float_fulltext":"","image_fulltext_alt":"Phyllopteryx","image_fulltext_caption":"Source: https:\/\/en.wikipedia.org\/wiki\/File:Phyllopteryx_taeniolatus1.jpg Author: Richard Ling License: GNU Free Documentation License v 1.2 or later"}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 3, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (34, 132, 'Pinnacles', 'pinnacles', '

    ', ' -

    ', 1, 73, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"images\/sampledata\/parks\/landscape\/120px_pinnacles_western_australia.jpg","float_intro":"","image_intro_alt":"Kings Canyon","image_intro_caption":"","image_fulltext":"images\/sampledata\/parks\/landscape\/800px_pinnacles_western_australia.jpg","float_fulltext":"","image_fulltext_alt":"Kings Canyon","image_fulltext_caption":"Source: http:\/\/commons.wikimedia.org\/wiki\/File:Pinnacles_Western_Australia.jpg Author: Martin Gloss License: GNU Free Documentation license v 1.2 or later."}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); +

    ', 1, 73, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"images\/sampledata\/parks\/landscape\/120px_pinnacles_western_australia.jpg","float_intro":"","image_intro_alt":"Kings Canyon","image_intro_caption":"","image_fulltext":"images\/sampledata\/parks\/landscape\/800px_pinnacles_western_australia.jpg","float_fulltext":"","image_fulltext_alt":"Kings Canyon","image_fulltext_caption":"Source: https:\/\/commons.wikimedia.org\/wiki\/File:Pinnacles_Western_Australia.jpg Author: Martin Gloss License: GNU Free Documentation license v 1.2 or later."}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (35, 133, 'Professionals', 'professionals', '

    Joomla! 2.5 continues development of the Joomla Framework and CMS as a powerful and flexible way to bring your vision of the web to reality. With the administrator now fully MVC, the ability to control its look and the management of extensions is now complete.

    ', '

    Working with multiple template styles and overrides for the same views, creating the design you want is easier than it has ever been. Limiting support to PHP 5.2.4 and above makes Joomla lighter and faster than ever. Languages files can now be overridden without having your changes lost during an upgrade. With the proper xml your users update extensions with a single click.

    @@ -563,7 +563,7 @@ INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext] INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (43, 141, 'Spotted Quoll', 'spotted-quoll', '

    ', ' -

    ', 1, 72, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"images\/sampledata\/parks\/animals\/220px_spottedquoll_2005_seanmcclean.jpg","float_intro":"","image_intro_alt":"Spotted Quoll","image_intro_caption":"","image_fulltext":"images\/sampledata\/parks\/animals\/789px_spottedquoll_2005_seanmcclean.jpg","float_fulltext":"","image_fulltext_alt":"Spotted Quoll","image_fulltext_caption":"Source: http:\/\/en.wikipedia.org\/wiki\/File:SpottedQuoll_2005_SeanMcClean.jpg Author: Sean McClean License: GNU Free Documentation License v 1.2 or later"}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); +

    ', 1, 72, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"images\/sampledata\/parks\/animals\/220px_spottedquoll_2005_seanmcclean.jpg","float_intro":"","image_intro_alt":"Spotted Quoll","image_intro_caption":"","image_fulltext":"images\/sampledata\/parks\/animals\/789px_spottedquoll_2005_seanmcclean.jpg","float_fulltext":"","image_fulltext_alt":"Spotted Quoll","image_fulltext_caption":"Source: https:\/\/en.wikipedia.org\/wiki\/File:SpottedQuoll_2005_SeanMcClean.jpg Author: Sean McClean License: GNU Free Documentation License v 1.2 or later"}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 4, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (44, 142, 'Statistics Module', 'statistics', '

    This module shows information about your server installation together with statistics on the Web site users, number of Articles in your database and the number of Web links you provide.

    {loadmodule mod_stats,Statistics}
    ', '', 1, 67, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 5, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (45, 143, 'Syndicate Module', 'syndicate-module', '

    The syndicate module will display a link that allows users to take a feed from your site. It will only display on pages for which feeds are possible. That means it will not display on single article, or contact pages, such as this one. Help

    @@ -582,7 +582,7 @@ INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext]
  • Redirect Help
  • ', '', 1, 25, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (47, 145, 'The Joomla! Community', 'the-joomla-community', '

    Joomla means All Together, and it is a community of people all working and having fun together that makes Joomla possible. Thousands of people each year participate in the Joomla community, and we hope you will be one of them.

    -

    People with all kinds of skills, of all skill levels and from around the world are welcome to join in. Participate in the Joomla.org family of websites (the forum is a great place to start). Come to a Joomla! event. Join or start a Joomla! Users Group. Whether you are a developer, site administrator, designer, end user or fan, there are ways for you to participate and contribute.

    ', '', 1, 19, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 3, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); +

    People with all kinds of skills, of all skill levels and from around the world are welcome to join in. Participate in the Joomla.org family of websites (the forum is a great place to start). Come to a Joomla! event. Join or start a Joomla! Users Group. Whether you are a developer, site administrator, designer, end user or fan, there are ways for you to participate and contribute.

    ', '', 1, 19, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 3, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (48, 146, 'The Joomla! Project', 'the-joomla-project', '

    The Joomla Project consists of all of the people who make and support the Joomla Web Platform and Content Management System.

    Our mission is to provide a flexible platform for digital publishing and collaboration.

    The core values are:

    @@ -633,7 +633,7 @@ INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext]
    {loadmodule whosonline,Who''s Online}
    ', '', 1, 65, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 1, '', '', 1, 0, '', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (57, 155, 'Wobbegone', 'wobbegone', '

    ', ' -

    ', 1, 72, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"images\/sampledata\/parks\/animals\/180px_wobbegong.jpg","float_intro":"","image_intro_alt":"Wobbegon","image_intro_caption":"","image_fulltext":"images\/sampledata\/parks\/animals\/800px_wobbegong.jpg","float_fulltext":"","image_fulltext_alt":"Wobbegon","image_fulltext_caption":"Source: http:\/\/en.wikipedia.org\/wiki\/File:Wobbegong.jpg Author: Richard Ling Rights: GNU Free Documentation License v 1.2 or later"}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 1, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); +

    ', 1, 72, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"images\/sampledata\/parks\/animals\/180px_wobbegong.jpg","float_intro":"","image_intro_alt":"Wobbegon","image_intro_caption":"","image_fulltext":"images\/sampledata\/parks\/animals\/800px_wobbegong.jpg","float_fulltext":"","image_fulltext_alt":"Wobbegon","image_fulltext_caption":"Source: https:\/\/en.wikipedia.org\/wiki\/File:Wobbegong.jpg Author: Richard Ling Rights: GNU Free Documentation License v 1.2 or later"}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 1, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (58, 156, 'Wonderful Watermelon', 'wonderful-watermelon', '

    Watermelon is a wonderful and healthy treat. We grow the world''s sweetest watermelon. We have the largest watermelon patch in our country.

    ', '', 1, 30, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 1, '', '', 1, 0, '', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (59, 157, 'Wrapper Module', 'wrapper-module', '

    This module shows an iFrame window to specified location. Help

    {loadmodule wrapper,Wrapper}
    ', '', 1, 67, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 1, '', '', 1, 0, '', 0, '*', ''); @@ -652,10 +652,10 @@ INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext] ', '', 1, 25, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 7, '', '', 1, 0, '', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (64, 162, 'Blue Mountain Rain Forest', 'blue-mountain-rain-forest', '

    ', ' -

    ', 1, 73, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"images\/sampledata\/parks\/landscape\/120px_rainforest_bluemountainsnsw.jpg","float_intro":"none","image_intro_alt":"Rain Forest Blue Mountains","image_intro_caption":"","image_fulltext":"images\/sampledata\/parks\/landscape\/727px_rainforest_bluemountainsnsw.jpg","float_fulltext":"","image_fulltext_alt":"Rain Forest Blue Mountains","image_fulltext_caption":"Source: http:\/\/commons.wikimedia.org\/wiki\/File:Rainforest,bluemountainsNSW.jpg Author: Adam J.W.C. License: GNU Free Documentation License"}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); +

    ', 1, 73, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"images\/sampledata\/parks\/landscape\/120px_rainforest_bluemountainsnsw.jpg","float_intro":"none","image_intro_alt":"Rain Forest Blue Mountains","image_intro_caption":"","image_fulltext":"images\/sampledata\/parks\/landscape\/727px_rainforest_bluemountainsnsw.jpg","float_fulltext":"","image_fulltext_alt":"Rain Forest Blue Mountains","image_fulltext_caption":"Source: https:\/\/commons.wikimedia.org\/wiki\/File:Rainforest,bluemountainsNSW.jpg Author: Adam J.W.C. License: GNU Free Documentation License"}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 2, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (65, 163, 'Ormiston Pound', 'ormiston-pound', '

    ', ' -

    ', 1, 73, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"images\/sampledata\/parks\/landscape\/180px_ormiston_pound.jpg","float_intro":"none","image_intro_alt":"Ormiston Pound","image_intro_caption":"","image_fulltext":"images\/sampledata\/parks\/landscape\/800px_ormiston_pound.jpg","float_fulltext":"","image_fulltext_alt":"Ormiston Pound","image_fulltext_caption":"Source: http:\/\/commons.wikimedia.org\/wiki\/File:Ormiston_Pound.JPG Author: License: GNU Free Public Documentation License"}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 3, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); +

    ', 1, 73, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '{"image_intro":"images\/sampledata\/parks\/landscape\/180px_ormiston_pound.jpg","float_intro":"none","image_intro_alt":"Ormiston Pound","image_intro_caption":"","image_fulltext":"images\/sampledata\/parks\/landscape\/800px_ormiston_pound.jpg","float_fulltext":"","image_fulltext_alt":"Ormiston Pound","image_fulltext_caption":"Source: https:\/\/commons.wikimedia.org\/wiki\/File:Ormiston_Pound.JPG Author: License: GNU Free Public Documentation License"}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 3, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (66, 165, 'Latest Users Module', 'latest-users-module', '

    This module displays the latest registered users. Help

    {loadmodule users_latest,Users Latest}
    ', '', 1, 65, '2011-01-01 00:00:00', 793, 'Joomla', '1900-01-01 00:00:00', 0, 0, '1900-01-01 00:00:00', '2011-01-01 00:00:00', '1900-01-01 00:00:00', '', '', '{"show_title":"1","link_titles":"","show_intro":"","show_category":"1","link_category":"1","show_parent_category":"","link_parent_category":"","show_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_readmore":"","show_print_icon":"","show_email_icon":"","show_hits":"","page_title":"","alternative_readmore":"","layout":""}', 1, 3, '', '', 1, 0, '', 0, '*', ''); INSERT [#__content] ([id], [asset_id], [title], [alias], [introtext], [fulltext], [state], [catid], [created], [created_by], [created_by_alias], [modified], [modified_by], [checked_out], [checked_out_time], [publish_up], [publish_down], [images], [urls], [attribs], [version], [ordering], [metakey], [metadesc], [access], [hits], [metadata], [featured], [language], [xreference]) VALUES (67, 168, 'What''s New in 1.5?', 'whats-new-in-15', '

    This article deliberately archived as an example.

    As with previous releases, Joomla! provides a unified and easy-to-use framework for delivering content for Web sites of all kinds. To support the changing nature of the Internet and emerging Web technologies, Joomla! required substantial restructuring of its core functionality and we also used this effort to simplify many challenges within the current user interface. Joomla! 1.5 has many new features.

    @@ -719,7 +719,7 @@ INSERT [#__menu] ([id], [menutype], [title], [alias], [note], [path], [link], [t INSERT [#__menu] ([id], [menutype], [title], [alias], [note], [path], [link], [type], [published], [parent_id], [level], [component_id], [checked_out], [checked_out_time], [browserNav], [access], [img], [template_style_id], [params], [lft], [rgt], [home], [language], [client_id]) VALUES (21, 'menu', 'com_finder', 'Smart Search', '', 'Smart Search', 'index.php?option=com_finder', 'component', 0, 1, 1, 27, 0, '1900-01-01 00:00:00', 0, 0, 'class:finder', 0, '', 33, 34, 0, '*', 1); INSERT [#__menu] ([id], [menutype], [title], [alias], [note], [path], [link], [type], [published], [parent_id], [level], [component_id], [checked_out], [checked_out_time], [browserNav], [access], [img], [template_style_id], [params], [lft], [rgt], [home], [language], [client_id]) VALUES (22, 'menu', 'com_joomlaupdate', 'Joomla! Update', '', 'Joomla! Update', 'index.php?option=com_joomlaupdate', 'component', 0, 1, 1, 28, 0, '1900-01-01 00:00:00', 0, 0, 'class:joomlaupdate', 0, '', 33, 34, 0, '*', 1); INSERT [#__menu] ([id], [menutype], [title], [alias], [note], [path], [link], [type], [published], [parent_id], [level], [component_id], [checked_out], [checked_out_time], [browserNav], [access], [img], [template_style_id], [params], [lft], [rgt], [home], [language], [client_id]) VALUES (201, 'usermenu', 'Your Profile', 'your-profile', '', 'your-profile', 'index.php?option=com_users&view=profile', 'component', 1, 1, 1, 25, 0, '1900-01-01 00:00:00', 0, 2, '', 0, '{"menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"page_title":"","show_page_heading":0,"page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 95, 96, 0, '*', 0); -INSERT [#__menu] ([id], [menutype], [title], [alias], [note], [path], [link], [type], [published], [parent_id], [level], [component_id], [checked_out], [checked_out_time], [browserNav], [access], [img], [template_style_id], [params], [lft], [rgt], [home], [language], [client_id]) VALUES (207, 'top', 'Joomla.org', 'joomlaorg', '', 'joomlaorg', 'http://joomla.org', 'url', 1, 1, 1, 0, 0, '1900-01-01 00:00:00', 0, 1, '', 0, '{"menu-anchor_title":"","menu-anchor_css":"","menu_image":""}', 93, 94, 0, '*', 0); +INSERT [#__menu] ([id], [menutype], [title], [alias], [note], [path], [link], [type], [published], [parent_id], [level], [component_id], [checked_out], [checked_out_time], [browserNav], [access], [img], [template_style_id], [params], [lft], [rgt], [home], [language], [client_id]) VALUES (207, 'top', 'Joomla.org', 'joomlaorg', '', 'joomlaorg', 'https://www.joomla.org/', 'url', 1, 1, 1, 0, 0, '1900-01-01 00:00:00', 0, 1, '', 0, '{"menu-anchor_title":"","menu-anchor_css":"","menu_image":""}', 93, 94, 0, '*', 0); INSERT [#__menu] ([id], [menutype], [title], [alias], [note], [path], [link], [type], [published], [parent_id], [level], [component_id], [checked_out], [checked_out_time], [browserNav], [access], [img], [template_style_id], [params], [lft], [rgt], [home], [language], [client_id]) VALUES (229, 'frontendviews', 'Single Contact', 'single-contact', '', 'single-contact', 'index.php?option=com_contact&view=contact&id=1', 'component', 1, 1, 1, 8, 0, '1900-01-01 00:00:00', 0, 1, '', 0, '{"show_category_crumb":"","presentation_style":"","show_contact_category":"","show_contact_list":"","show_name":"","show_position":"","show_email":"","show_street_address":"","show_suburb":"","show_state":"","show_postcode":"","show_country":"","show_telephone":"","show_mobile":"","show_fax":"","show_webpage":"","show_misc":"","show_image":"","allow_vcard":"","show_articles":"","show_links":"","linka_name":"","linkb_name":"","linkc_name":"","linkd_name":"","linke_name":"","show_email_form":"","show_email_copy":"","banned_email":"","banned_subject":"","banned_text":"","validate_session":"","custom_reply":"","redirect":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 161, 162, 0, '*', 0); INSERT [#__menu] ([id], [menutype], [title], [alias], [note], [path], [link], [type], [published], [parent_id], [level], [component_id], [checked_out], [checked_out_time], [browserNav], [access], [img], [template_style_id], [params], [lft], [rgt], [home], [language], [client_id]) VALUES (233, 'mainmenu', 'Login', 'login', '', 'login', 'index.php?option=com_users&view=login', 'component', 1, 1, 1, 25, 0, '1900-01-01 00:00:00', 0, 1, '', 0, '{"menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 3, 4, 0, '*', 0); INSERT [#__menu] ([id], [menutype], [title], [alias], [note], [path], [link], [type], [published], [parent_id], [level], [component_id], [checked_out], [checked_out_time], [browserNav], [access], [img], [template_style_id], [params], [lft], [rgt], [home], [language], [client_id]) VALUES (234, 'parks', 'Park Blog', 'park-blog', '', 'park-blog', 'index.php?option=com_content&view=category&layout=blog&id=27', 'component', 1, 1, 1, 22, 0, '1900-01-01 00:00:00', 0, 1, '', 114, '{"maxLevel":"","show_empty_categories":"","show_description":"1","show_description_image":"1","show_category_title":"","show_cat_num_articles":"","num_leading_articles":"1","num_intro_articles":"4","num_columns":"1","num_links":"4","multi_column_order":"","orderby_pri":"","orderby_sec":"","order_date":"","show_pagination":"2","show_noauth":"","show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_readmore":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_hits":"","show_feed_link":"1","feed_summary":"","menu-anchor_title":"","menu-anchor_css":"","menu_image":"","show_page_heading":0,"page_title":"","page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}', 99, 100, 0, 'en-GB', 0); @@ -878,7 +878,7 @@ INSERT [#__modules] ([id], [title], [note], [content], [ordering], [position], [ INSERT [#__modules] ([id], [title], [note], [content], [ordering], [position], [checked_out], [checked_out_time], [publish_up], [publish_down], [published], [module], [access], [showtitle], [params], [client_id], [language]) VALUES (37, 'Syndicate Feeds', '', '', 1, 'syndicateload', 0, '1900-01-01 00:00:00', '1900-01-01 00:00:00', '1900-01-01 00:00:00', 1, 'mod_syndicate', 1, 1, '{"text":"Feed Entries","format":"rss","layout":"","moduleclass_sfx":"","cache":"0"}', 0, '*'); INSERT [#__modules] ([id], [title], [note], [content], [ordering], [position], [checked_out], [checked_out_time], [publish_up], [publish_down], [published], [module], [access], [showtitle], [params], [client_id], [language]) VALUES (38, 'Users Latest', '', '', 1, '', 0, '1900-01-01 00:00:00', '1900-01-01 00:00:00', '1900-01-01 00:00:00', 1, 'mod_users_latest', 1, 1, '{"shownumber":"5","linknames":"0","layout":"_:default","moduleclass_sfx":"","cache":"0","cache_time":"900","cachemode":"static"}', 0, '*'); INSERT [#__modules] ([id], [title], [note], [content], [ordering], [position], [checked_out], [checked_out_time], [publish_up], [publish_down], [published], [module], [access], [showtitle], [params], [client_id], [language]) VALUES (39, 'Who''s Online', '', '', 1, '', 0, '1900-01-01 00:00:00', '1900-01-01 00:00:00', '1900-01-01 00:00:00', 1, 'mod_whosonline', 1, 1, '{"showmode":"2","linknames":"0","layout":"_:default","moduleclass_sfx":"","cache":"0"}', 0, '*'); -INSERT [#__modules] ([id], [title], [note], [content], [ordering], [position], [checked_out], [checked_out_time], [publish_up], [publish_down], [published], [module], [access], [showtitle], [params], [client_id], [language]) VALUES (40, 'Wrapper', '', '', 1, '', 0, '1900-01-01 00:00:00', '1900-01-01 00:00:00', '1900-01-01 00:00:00', 1, 'mod_wrapper', 1, 1, '{"url":"http:\/\/www.youtube.com\/embed\/vb2eObvmvdI","add":"1","scrolling":"auto","width":"640","height":"390","height_auto":"1","target":"","layout":"_:default","moduleclass_sfx":"","cache":"1","cache_time":"900","cachemode":"static"}', 0, '*'); +INSERT [#__modules] ([id], [title], [note], [content], [ordering], [position], [checked_out], [checked_out_time], [publish_up], [publish_down], [published], [module], [access], [showtitle], [params], [client_id], [language]) VALUES (40, 'Wrapper', '', '', 1, '', 0, '1900-01-01 00:00:00', '1900-01-01 00:00:00', '1900-01-01 00:00:00', 1, 'mod_wrapper', 1, 1, '{"url":"https:\/\/www.youtube.com\/embed\/vb2eObvmvdI","add":"1","scrolling":"auto","width":"640","height":"390","height_auto":"1","target":"","layout":"_:default","moduleclass_sfx":"","cache":"1","cache_time":"900","cachemode":"static"}', 0, '*'); INSERT [#__modules] ([id], [title], [note], [content], [ordering], [position], [checked_out], [checked_out_time], [publish_up], [publish_down], [published], [module], [access], [showtitle], [params], [client_id], [language]) VALUES (41, 'Footer', '', '', 1, '', 0, '1900-01-01 00:00:00', '1900-01-01 00:00:00', '1900-01-01 00:00:00', 1, 'mod_footer', 1, 1, '{"layout":"_:default","moduleclass_sfx":"","cache":"1","cache_time":"900","cachemode":"static"}', 0, '*'); INSERT [#__modules] ([id], [title], [note], [content], [ordering], [position], [checked_out], [checked_out_time], [publish_up], [publish_down], [published], [module], [access], [showtitle], [params], [client_id], [language]) VALUES (44, 'Login', '', '', 1, '', 0, '1900-01-01 00:00:00', '1900-01-01 00:00:00', '1900-01-01 00:00:00', 1, 'mod_login', 1, 1, '{"pretext":"","posttext":"","login":"280","logout":"280","greeting":"1","name":"0","usesecure":"0","layout":"_:default","moduleclass_sfx":"","cache":"0"}', 0, '*'); INSERT [#__modules] ([id], [title], [note], [content], [ordering], [position], [checked_out], [checked_out_time], [publish_up], [publish_down], [published], [module], [access], [showtitle], [params], [client_id], [language]) VALUES (45, 'Menu Example', '', '', 1, '', 0, '1900-01-01 00:00:00', '1900-01-01 00:00:00', '1900-01-01 00:00:00', 1, 'mod_menu', 1, 1, '{"menutype":"mainmenu","startLevel":"1","endLevel":"0","showAllChildren":"0","tag_id":"","class_sfx":"","window_open":"","layout":"_:default","moduleclass_sfx":"","cache":"0","cache_time":"900","cachemode":"itemid"}', 0, '*'); @@ -1157,7 +1157,7 @@ INSERT [#__ucm_content] ([core_content_id], [core_type_alias], [core_title], [co
  • Unexpected behavior--anything that is working differently than it did in 2.5.
  • Report problems

    -

    If you find a problem please report it to the CMS Issue Tracker. You will need to register for a github.com account if you don''t have one.

    +

    If you find a problem please report it to the CMS Issue Tracker. You will need to register for a github.com account if you don''t have one.

    More Testing Ideas

    • Pick one module or view and test all of the parameters.
    • @@ -1169,10 +1169,10 @@ INSERT [#__ucm_content] ([core_content_id], [core_type_alias], [core_title], [co
    • Try with SEF URLS on or off and also with Apache rewrite on or off (if you are on Apache).
    • Try different combinations of browsers (Chrome, IE, FireFox, Opera to start) and operating systems (Mac, Windows, Linux).
    • Yes grammar and spelling errors are bugs too -- just keep in mind that we use British spelling.
    • -
    • Visit the Feature Tracker and test a new feature.
    • +
    • Visit the Feature Tracker and test a new feature.

    Testing changes

    -

    You can also help Joomla by testing bug fixes and new features. A useful tool is the patchtester component which helps to simplify and automate the process. Report your feedback on the CMS Issue Tracker. If you enjoy helping Joomla this way, you may want to join the Joomla Bug Squad.

    +

    You can also help Joomla by testing bug fixes and new features. A useful tool is the patchtester component which helps to simplify and automate the process. Report your feedback on the CMS Issue Tracker. If you enjoy helping Joomla this way, you may want to join the Joomla Bug Squad.

    ', 1, '', 0, 1, '{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","urls_position":"","alternative_readmore":"","article_layout":""}', 1, '{"robots":"","author":"","rights":"","xreference":""}', 716, '', '2011-01-01 00:00:00', 0, CAST(0x0050D200B3370B0000 AS DateTime2), '*', '2011-01-01 00:00:00', '1900-01-01 00:00:00', 24, 180, '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}', 59, 3, 2, '', '', 19, '', 1); INSERT [#__ucm_content] ([core_content_id], [core_type_alias], [core_title], [core_alias], [core_body], [core_state], [core_checked_out_time], [core_checked_out_user_id], [core_access], [core_params], [core_featured], [core_metadata], [core_created_user_id], [core_created_by_alias], [core_created_time], [core_modified_user_id], [core_modified_time], [core_language], [core_publish_up], [core_publish_down], [core_content_item_id], [asset_id], [core_images], [core_urls], [core_hits], [core_version], [core_ordering], [core_metakey], [core_metadesc], [core_catid], [core_xreference], [core_type_id]) VALUES (2, 'com_content.article', 'Similar Tags', 'archive-module-3', '

    This module shows a list of items that have a similar list of tags to the current item.

    {loadmodule tags_similar,Similar Tags}
    ', 1, '', 0, 1, '{"show_title":"","link_titles":"","show_tags":"","show_intro":"","info_block_position":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","urls_position":"","alternative_readmore":"","article_layout":""}', 0, '{"robots":"","author":"","rights":"","xreference":""}', 716, '', '2011-01-01 00:00:00', 0, CAST(0x0093D200B3370B0000 AS DateTime2), '*', '2011-01-01 00:00:00', '1900-01-01 00:00:00', 72, 182, '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":false,"urlatext":"","targeta":"","urlb":false,"urlbtext":"","targetb":"","urlc":false,"urlctext":"","targetc":""}', 1, 3, 0, 'modules, content', '', 64, '', 1); diff --git a/language/en-GB/en-GB.com_media.ini b/language/en-GB/en-GB.com_media.ini index 9a44dce5f3e27..6734833c394ef 100644 --- a/language/en-GB/en-GB.com_media.ini +++ b/language/en-GB/en-GB.com_media.ini @@ -33,13 +33,13 @@ COM_MEDIA_FIELD_CHECK_MIME_DESC="Use MIME Magic or Fileinfo to attempt to verify COM_MEDIA_FIELD_CHECK_MIME_LABEL="Check MIME Types" COM_MEDIA_FIELD_IGNORED_EXTENSIONS_DESC="Ignored file extensions for MIME type checking and restricted uploads." COM_MEDIA_FIELD_IGNORED_EXTENSIONS_LABEL="Ignored Extensions" -COM_MEDIA_FIELD_ILLEGAL_MIME_TYPES_DESC="A comma separated list of illegal MIME types for upload (blacklist)." +COM_MEDIA_FIELD_ILLEGAL_MIME_TYPES_DESC="A comma separated list of illegal MIME types to upload (blacklist)." COM_MEDIA_FIELD_ILLEGAL_MIME_TYPES_LABEL="Illegal MIME Types" COM_MEDIA_FIELD_LEGAL_EXTENSIONS_DESC=" Extensions (file types) you are allowed to upload (comma separated)." COM_MEDIA_FIELD_LEGAL_EXTENSIONS_LABEL="Legal Extensions (File Types)" COM_MEDIA_FIELD_LEGAL_IMAGE_EXTENSIONS_DESC=" Image extensions (file types) you are allowed to upload (comma separated). These are used to check for valid image headers." COM_MEDIA_FIELD_LEGAL_IMAGE_EXTENSIONS_LABEL="Legal Image Extensions (File Types)" -COM_MEDIA_FIELD_LEGAL_MIME_TYPES_DESC="A comma separated list of legal MIME types for upload." +COM_MEDIA_FIELD_LEGAL_MIME_TYPES_DESC="A comma separated list of legal MIME types to upload." COM_MEDIA_FIELD_LEGAL_MIME_TYPES_LABEL="Legal MIME Types" COM_MEDIA_FIELD_MAXIMUM_SIZE_DESC="The maximum size for an upload (in bytes). Use zero for no limit. Note: your server has a maximum limit." COM_MEDIA_FIELD_MAXIMUM_SIZE_LABEL="Maximum Size" diff --git a/language/en-GB/en-GB.ini b/language/en-GB/en-GB.ini index bef1b624aa85a..4b52faa7ec6de 100644 --- a/language/en-GB/en-GB.ini +++ b/language/en-GB/en-GB.ini @@ -48,6 +48,7 @@ JACTION_MANAGE="Access Administration Interface" JADMINISTRATOR="Administrator" JALL="All" JALL_LANGUAGE="All" +JAPPLY="Save" JARCHIVED="Archived" JAUTHOR="Author" JCANCEL="Cancel" @@ -178,7 +179,9 @@ JGLOBAL_CREATED_DATE_ON="Created on %s" JGLOBAL_DESCRIPTION="Description" JGLOBAL_DISPLAY_NUM="Display #" JGLOBAL_EDIT="Edit" +JGLOBAL_EDIT_TITLE="Edit article" JGLOBAL_EMAIL="Email" +JGLOBAL_EMAIL_TITLE="Email this link to a friend" JGLOBAL_FIELD_CREATED_BY_ALIAS_DESC="Uses another name than the author's for display." JGLOBAL_FIELD_CREATED_BY_ALIAS_LABEL="Author's Alias" JGLOBAL_FIELD_FEATURED_DESC="Assign the article to the featured blog layout." @@ -210,6 +213,7 @@ JGLOBAL_OTPMETHOD_NONE="Disable Two Factor Authentication" JGLOBAL_PASSWORD="Password" JGLOBAL_PASSWORD_RESET_REQUIRED="You are required to reset your password before proceeding." JGLOBAL_PRINT="Print" +JGLOBAL_PRINT_TITLE="Print article < %s >" JGLOBAL_RECORD_NUMBER="Record ID: %d" JGLOBAL_REMEMBER_ME="Remember me" JGLOBAL_REMEMBER_MUST_LOGIN="For security reasons you must login before editing your personal information." @@ -225,6 +229,7 @@ JGLOBAL_START_PUBLISH_AFTER_FINISH="Item start publishing date must be before fi JGLOBAL_SUBCATEGORIES="Subcategories" JGLOBAL_SUBHEADING_DESC="Optional text to show as a subheading." JGLOBAL_TITLE="Title" +JGLOBAL_TYPE_OR_SELECT_SOME_OPTIONS="Type or select some options" JGLOBAL_USE_GLOBAL="Use Global" JGLOBAL_USERNAME="Username" JGLOBAL_VALIDATION_FORM_FAILED="Invalid form" diff --git a/language/en-GB/en-GB.mod_login.ini b/language/en-GB/en-GB.mod_login.ini index c7c54394e7cea..8933d1ed59420 100644 --- a/language/en-GB/en-GB.mod_login.ini +++ b/language/en-GB/en-GB.mod_login.ini @@ -16,7 +16,7 @@ MOD_LOGIN_FIELD_POST_TEXT_DESC="This is the text or HTML that is displayed below MOD_LOGIN_FIELD_POST_TEXT_LABEL="Post-text" MOD_LOGIN_FIELD_PRE_TEXT_DESC="This is the text or HTML that is displayed above the login form." MOD_LOGIN_FIELD_PRE_TEXT_LABEL="Pre-text" -MOD_LOGIN_FIELD_USESECURE_DESC="Submit encrypted login data (requires SSL). Do not enable this option if Joomla is not accessible using the https:// protocol prefix." +MOD_LOGIN_FIELD_USESECURE_DESC="Submit encrypted login data using HTTPS (encrypted HTTP connections with the https:// protocol prefix). Note, you must have HTTPS enabled on your server to utilise this option." MOD_LOGIN_FIELD_USESECURE_LABEL="Encrypt Login Form" MOD_LOGIN_FIELD_USETEXT_DESC="Choose text or icons to display the field labels. Default is icons." MOD_LOGIN_FIELD_USETEXT_LABEL="Display Labels" diff --git a/language/en-GB/en-GB.tpl_beez3.ini b/language/en-GB/en-GB.tpl_beez3.ini index cb7c2b0955f70..0f3c9d3799914 100644 --- a/language/en-GB/en-GB.tpl_beez3.ini +++ b/language/en-GB/en-GB.tpl_beez3.ini @@ -56,5 +56,5 @@ TPL_BEEZ3_SMALLER="Smaller" TPL_BEEZ3_SYSTEM_MESSAGE="Error" TPL_BEEZ3_TEXTRIGHTCLOSE="Close info" TPL_BEEZ3_TEXTRIGHTOPEN="Open info" -TPL_BEEZ3_XML_DESCRIPTION="Accessible template for Joomla! Beez, the HTML 4 version." +TPL_BEEZ3_XML_DESCRIPTION="Accessible site template for Joomla! 3.x. Beez3, the HTML5 version." TPL_BEEZ3_YOUR_SITE_DESCRIPTION="Your site description" diff --git a/language/en-GB/en-GB.tpl_beez3.sys.ini b/language/en-GB/en-GB.tpl_beez3.sys.ini index 2c74c440118e2..12491be7e484e 100644 --- a/language/en-GB/en-GB.tpl_beez3.sys.ini +++ b/language/en-GB/en-GB.tpl_beez3.sys.ini @@ -20,4 +20,4 @@ TPL_BEEZ3_POSITION_POSITION-6="Right top" TPL_BEEZ3_POSITION_POSITION-7="Left top" TPL_BEEZ3_POSITION_POSITION-8="Right middle" TPL_BEEZ3_POSITION_POSITION-9="Footer top" -TPL_BEEZ3_XML_DESCRIPTION="Accessible template for Joomla! Beez, the HTML 4 version." +TPL_BEEZ3_XML_DESCRIPTION="Accessible site template for Joomla! 3.x. Beez3, the HTML5 version." diff --git a/language/en-GB/en-GB.xml b/language/en-GB/en-GB.xml index fcbca525c0409..423796c0a5c2a 100644 --- a/language/en-GB/en-GB.xml +++ b/language/en-GB/en-GB.xml @@ -1,8 +1,8 @@ English (en-GB) - 3.5.0 - November 2015 + 3.5.2 + April 2016 Joomla! Project admin@joomla.org www.joomla.org diff --git a/language/en-GB/install.xml b/language/en-GB/install.xml index bc628bb32526c..7fab36e319313 100644 --- a/language/en-GB/install.xml +++ b/language/en-GB/install.xml @@ -2,7 +2,7 @@ English (United Kingdom) en-GB - 3.5.0 + 3.5.2 2013-03-07 Joomla! Project admin@joomla.org diff --git a/layouts/joomla/form/field/user.php b/layouts/joomla/form/field/user.php index 0905e6651b2de..01b4d399d6f30 100644 --- a/layouts/joomla/form/field/user.php +++ b/layouts/joomla/form/field/user.php @@ -47,7 +47,7 @@ */ $link = 'index.php?option=com_users&view=users&layout=modal&tmpl=component&required=' - . ($required ? 1 : 0) . '&field={field-user-id}' + . ($required ? 1 : 0) . '&field=' . htmlspecialchars($id, ENT_COMPAT, 'UTF-8') . (isset($groups) ? ('&groups=' . base64_encode(json_encode($groups))) : '') . (isset($excluded) ? ('&excluded=' . base64_encode(json_encode($excluded))) : ''); diff --git a/libraries/cms/application/site.php b/libraries/cms/application/site.php index 12ece1c37bfa5..dadadbf455904 100644 --- a/libraries/cms/application/site.php +++ b/libraries/cms/application/site.php @@ -181,7 +181,7 @@ public function dispatch($component = null) // Add version number or not based on global configuration if ($this->get('MetaVersion', 0)) { - $document->setGenerator('Joomla! - Open Source Content Management - Version ' . JVERSION); + $document->setGenerator('Joomla! - Open Source Content Management - Version ' . JVERSION); } else { diff --git a/libraries/cms/form/field/captcha.php b/libraries/cms/form/field/captcha.php index 089fcb37e7694..04a0ce55c89f7 100644 --- a/libraries/cms/form/field/captcha.php +++ b/libraries/cms/form/field/captcha.php @@ -19,7 +19,8 @@ class JFormFieldCaptcha extends JFormField /** * The field type. * - * @var string + * @var string + * @since 2.5 */ protected $type = 'Captcha'; @@ -71,7 +72,7 @@ public function __set($name, $value) /** * Method to attach a JForm object to the field. * - * @param SimpleXMLElement $element The SimpleXMLElement object representing the tag for the form field object. + * @param SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the diff --git a/libraries/cms/form/field/editor.php b/libraries/cms/form/field/editor.php index 633a426736a03..1ca0da75434f4 100644 --- a/libraries/cms/form/field/editor.php +++ b/libraries/cms/form/field/editor.php @@ -184,7 +184,7 @@ public function __set($name, $value) /** * Method to attach a JForm object to the field. * - * @param SimpleXMLElement $element The SimpleXMLElement object representing the tag for the form field object. + * @param SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the diff --git a/libraries/cms/form/field/media.php b/libraries/cms/form/field/media.php index e96ec5a44d266..e954a84274aca 100644 --- a/libraries/cms/form/field/media.php +++ b/libraries/cms/form/field/media.php @@ -100,9 +100,11 @@ class JFormFieldMedia extends JFormField /** * Layout to render * - * @var string + * @var string + * @since 3.5 */ protected $layout = 'joomla.form.field.media'; + /** * Method to get certain otherwise inaccessible properties from the form field object. * @@ -168,7 +170,7 @@ public function __set($name, $value) /** * Method to attach a JForm object to the field. * - * @param SimpleXMLElement $element The SimpleXMLElement object representing the tag for the form field object. + * @param SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the diff --git a/libraries/cms/form/field/menuitem.php b/libraries/cms/form/field/menuitem.php index 0be93c58c6ebf..df1c5beabd615 100644 --- a/libraries/cms/form/field/menuitem.php +++ b/libraries/cms/form/field/menuitem.php @@ -117,7 +117,7 @@ public function __set($name, $value) /** * Method to attach a JForm object to the field. * - * @param SimpleXMLElement $element The SimpleXMLElement object representing the tag for the form field object. + * @param SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the diff --git a/libraries/cms/form/field/moduleposition.php b/libraries/cms/form/field/moduleposition.php index a92460b63df54..2832c1953a12b 100644 --- a/libraries/cms/form/field/moduleposition.php +++ b/libraries/cms/form/field/moduleposition.php @@ -80,7 +80,7 @@ public function __set($name, $value) /** * Method to attach a JForm object to the field. * - * @param SimpleXMLElement $element The SimpleXMLElement object representing the tag for the form field object. + * @param SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the diff --git a/libraries/cms/form/field/ordering.php b/libraries/cms/form/field/ordering.php index 11ee9540e8108..c0070f7c5a76d 100644 --- a/libraries/cms/form/field/ordering.php +++ b/libraries/cms/form/field/ordering.php @@ -78,7 +78,7 @@ public function __set($name, $value) /** * Method to attach a JForm object to the field. * - * @param SimpleXMLElement $element The SimpleXMLElement object representing the tag for the form field object. + * @param SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the diff --git a/libraries/cms/form/field/templatestyle.php b/libraries/cms/form/field/templatestyle.php index 0c205a3a33b17..fd83aa0409567 100644 --- a/libraries/cms/form/field/templatestyle.php +++ b/libraries/cms/form/field/templatestyle.php @@ -91,7 +91,7 @@ public function __set($name, $value) /** * Method to attach a JForm object to the field. * - * @param SimpleXMLElement $element The SimpleXMLElement object representing the tag for the form field object. + * @param SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the diff --git a/libraries/cms/form/rule/captcha.php b/libraries/cms/form/rule/captcha.php index e99b0231ac096..32b9b00c3510d 100644 --- a/libraries/cms/form/rule/captcha.php +++ b/libraries/cms/form/rule/captcha.php @@ -21,7 +21,7 @@ class JFormRuleCaptcha extends JFormRule /** * Method to test if the Captcha is correct. * - * @param SimpleXMLElement $element The SimpleXMLElement object representing the tag for the form field object. + * @param SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the diff --git a/libraries/cms/form/rule/notequals.php b/libraries/cms/form/rule/notequals.php index af3f7ba515e0a..5cb3d12017c8d 100644 --- a/libraries/cms/form/rule/notequals.php +++ b/libraries/cms/form/rule/notequals.php @@ -23,7 +23,7 @@ class JFormRuleNotequals extends JFormRule * XML needs a validate attribute of equals and a field attribute * that is equal to the field to test against. * - * @param SimpleXMLElement $element The SimpleXMLElement object representing the tag for the form field object. + * @param SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the diff --git a/libraries/cms/form/rule/password.php b/libraries/cms/form/rule/password.php index 1f3e0a8526f22..077443272db59 100644 --- a/libraries/cms/form/rule/password.php +++ b/libraries/cms/form/rule/password.php @@ -23,7 +23,7 @@ class JFormRulePassword extends JFormRule * XML needs a validate attribute of equals and a field attribute * that is equal to the field to test against. * - * @param SimpleXMLElement $element The SimpleXMLElement object representing the tag for the form field object. + * @param SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the diff --git a/libraries/cms/html/behavior.php b/libraries/cms/html/behavior.php index f7311875c71ef..b710be04b9bdf 100644 --- a/libraries/cms/html/behavior.php +++ b/libraries/cms/html/behavior.php @@ -708,7 +708,10 @@ public static function highlighter(array $terms, $start = 'highlighter-start', $ JHtml::_('script', 'system/highlighter.js', false, true); - $terms = str_replace('"', '\"', $terms); + foreach ($terms as $i => $term) + { + $terms[$i] = JFilterOutput::stringJSSafe($term); + } $document = JFactory::getDocument(); $document->addScriptDeclaration(" @@ -886,11 +889,14 @@ protected static function calendartranslation() /** * Add unobtrusive JavaScript support to keep a tab state. * - * Note that keeping tab state only works for inner tabs if in accordance with the following example + * Note that keeping tab state only works for inner tabs if in accordance with the following example: + * + * ``` * parent tab = permissions * child tab = permission- + * ``` * - * Each tab header "a" tag also should have a unique href attribute + * Each tab header `` tag also should have a unique href attribute * * @return void * diff --git a/libraries/cms/html/bootstrap.php b/libraries/cms/html/bootstrap.php index 3a1bc4bcccab2..a396ce27cfc95 100644 --- a/libraries/cms/html/bootstrap.php +++ b/libraries/cms/html/bootstrap.php @@ -271,17 +271,17 @@ public static function modal($selector = 'modal', $params = array()) * @param string $selector The ID selector for the modal. * @param array $params An array of options for the modal. * Options for the modal can be: - * - title string The modal title - * - backdrop mixed A boolean select if a modal-backdrop element should be included (default = true) - * The string 'static' includes a backdrop which doesn't close the modal on click. - * - keyboard boolean Closes the modal when escape key is pressed (default = true) + * - title string The modal title + * - backdrop mixed A boolean select if a modal-backdrop element should be included (default = true) + * The string 'static' includes a backdrop which doesn't close the modal on click. + * - keyboard boolean Closes the modal when escape key is pressed (default = true) * - closeButton boolean Display modal close button (default = true) - * - animation boolean Fade in from the top of the page (default = true) - * - footer string Optional markup for the modal footer - * - url string URL of a resource to be inserted as an element + * Write a ` element or message if not supported. + * @return string * * @since 1.5 */ @@ -550,7 +550,7 @@ protected static function includeRelativeFiles($folder, $file, $relative, $detec } /** - * Write a element + * Write a `` element * * @param string $file The relative or absolute URL to use for the src attribute. * @param string $alt The alt text. @@ -584,14 +584,14 @@ public static function image($file, $alt, $attribs = null, $relative = false, $p } /** - * Write a element + * Write a `` element to load a CSS file * * @param string $file path to file * @param array $attribs attributes to be added to the stylesheet * @param boolean $relative path to file is relative to /media folder * @param boolean $path_only return the path to the file only * @param boolean $detect_browser detect browser to include specific browser css files - * will try to include file, file_*browser*, file_*browser*_*major*, file_*browser*_*major*_*minor* + * will try to include file, `file_*browser*`, `file_*browser*_*major*`, `file_*browser*_*major*_*minor*` * * * @@ -614,7 +614,6 @@ public static function image($file, $alt, $attribs = null, $relative = false, $p * * *
    Navigator browser major.minor
    Firefox mozilla 5.0
    - * a lot of others * @param boolean $detect_debug detect debug to search for compressed files if debug is on * * @return mixed nothing if $path_only is false, null, path or array of path if specific css browser files were detected @@ -655,7 +654,7 @@ public static function stylesheet($file, $attribs = array(), $relative = false, } /** - * Write a element + * Write a ` + * `` * will generate an alert message containing 'Default' - * it will generate a 'Default' string + * `` will generate a 'Default' string * * @param string $string The string to translate. * @param mixed $jsSafe Boolean: Make the result javascript safe. @@ -140,8 +140,8 @@ private static function passSprintf(&$string, $jsSafe = false, $interpretBackSla * Translates a string into the current language. * * Examples: - * it will generate a 'All' string in English but a "Toutes" string in French - * it will generate a 'All' string in English but a "Tous" string in French + * `` will generate a 'All' string in English but a "Toutes" string in French + * `` will generate a 'All' string in English but a "Tous" string in French * * @param string $string The string to translate. * @param string $alt The alternate option for global string @@ -181,9 +181,9 @@ public static function alt($string, $alt, $jsSafe = false, $interpretBackSlashes * script is a boolean to indicate that the string will be push in the javascript language store. * * Examples: - * + * `` * will generate an alert message containing '1 plugin successfully disabled' - * it will generate a '1 plugin successfully disabled' string + * `` will generate a '1 plugin successfully disabled' string * * @param string $string The format string. * @param integer $n The number of items diff --git a/libraries/joomla/mail/mail.php b/libraries/joomla/mail/mail.php index ab0b37e703605..42fecf90e498a 100644 --- a/libraries/joomla/mail/mail.php +++ b/libraries/joomla/mail/mail.php @@ -17,13 +17,17 @@ class JMail extends PHPMailer { /** - * @var array JMail instances container. + * JMail instances container. + * + * @var JMail[] * @since 11.3 */ protected static $instances = array(); /** - * @var string Charset of the message. + * Charset of the message. + * + * @var string * @since 11.1 */ public $CharSet = 'utf-8'; @@ -31,32 +35,48 @@ class JMail extends PHPMailer /** * Constructor * + * @param boolean $exceptions Flag if Exceptions should be thrown + * * @since 11.1 */ - public function __construct() + public function __construct($exceptions = true) { + parent::__construct($exceptions); + // PHPMailer has an issue using the relative path for its language files $this->setLanguage('joomla', __DIR__ . '/language'); + + // Configure a callback function to handle errors when $this->edebug() is called + $this->Debugoutput = function ($message, $level) + { + JLog::add(sprintf('Error in JMail API: %s', $message), JLog::ERROR, 'mail'); + }; + + // If debug mode is enabled then set SMTPDebug to the maximum level + if (defined('JDEBUG') && JDEBUG) + { + $this->SMTPDebug = 4; + } } /** - * Returns the global email object, only creating it - * if it doesn't already exist. + * Returns the global email object, only creating it if it doesn't already exist. * * NOTE: If you need an instance to use that does not have the global configuration * values, use an id string that is not 'Joomla'. * - * @param string $id The id string for the JMail instance [optional] + * @param string $id The id string for the JMail instance [optional] + * @param boolean $exceptions Flag if Exceptions should be thrown [optional] * * @return JMail The global JMail object * * @since 11.1 */ - public static function getInstance($id = 'Joomla') + public static function getInstance($id = 'Joomla', $exceptions = true) { if (empty(self::$instances[$id])) { - self::$instances[$id] = new JMail; + self::$instances[$id] = new JMail($exceptions); } return self::$instances[$id]; @@ -86,7 +106,37 @@ public function Send() } } - $result = parent::send(); + try + { + // Try sending with default settings + $result = parent::send(); + + } + catch (phpmailerException $e) + { + $result = false; + + if ($this->SMTPAutoTLS) + { + /** + * PHPMailer has an issue with servers with invalid certificates + * + * See: https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting#opportunistic-tls + */ + $this->SMTPAutoTLS = false; + + try + { + // Try it again with TLS turned off + $result = parent::send(); + } + catch (phpmailerException $e) + { + // Keep false for B/C compatibility + $result = false; + } + } + } if ($result == false) { diff --git a/libraries/joomla/microdata/microdata.php b/libraries/joomla/microdata/microdata.php index 6dfac2b24cc0b..a9ade1e2e61f7 100644 --- a/libraries/joomla/microdata/microdata.php +++ b/libraries/joomla/microdata/microdata.php @@ -686,7 +686,7 @@ public static function getExpectedTypes($type, $property) * In which way to display the Property: * normal -> itemprop="name" * nested -> itemprop="director" itemscope itemtype="https://schema.org/Person" - * meta -> + * meta -> `` * * @param string $type The Type where to find the Property * @param string $property The Property to process @@ -769,7 +769,7 @@ public static function isTypeAvailable($type) } /** - * Return Microdata semantics in a tag with content for machines. + * Return Microdata semantics in a `` tag with content for machines. * * @param string $content The machine content to display * @param string $property The Property @@ -786,7 +786,7 @@ public static function htmlMeta($content, $property, $scope = '', $invert = fals } /** - * Return Microdata semantics in a tag. + * Return Microdata semantics in a `` tag. * * @param string $content The human content * @param string $property Optional, the human content to display @@ -803,7 +803,7 @@ public static function htmlSpan($content, $property = '', $scope = '', $invert = } /** - * Return Microdata semantics in a
    tag. + * Return Microdata semantics in a `
    ` tag. * * @param string $content The human content * @param string $property Optional, the human content to display diff --git a/libraries/joomla/profiler/profiler.php b/libraries/joomla/profiler/profiler.php index f1ecb457b8942..27cc903584c96 100644 --- a/libraries/joomla/profiler/profiler.php +++ b/libraries/joomla/profiler/profiler.php @@ -97,12 +97,9 @@ public static function getInstance($prefix = '') /** * Output a time mark * - * The mark is returned as text enclosed in
    tags - * with a CSS class of 'profiler'. - * * @param string $label A label for the time mark * - * @return string Mark enclosed in
    tags + * @return string * * @since 11.1 */ diff --git a/libraries/joomla/session/handler/native.php b/libraries/joomla/session/handler/native.php index b6245be82a5ec..9b439b6d9c3eb 100644 --- a/libraries/joomla/session/handler/native.php +++ b/libraries/joomla/session/handler/native.php @@ -38,7 +38,6 @@ class JSessionHandlerNative implements JSessionHandlerInterface * @return boolean True if started * * @since 3.5 - * @throws RuntimeException If something goes wrong starting the session. */ public function start() { @@ -47,42 +46,7 @@ public function start() return true; } - // Register our function as shutdown method, so we can manipulate it - register_shutdown_function(array($this, 'save')); - - // Disable the cache limiter - session_cache_limiter('none'); - - /* - * Extended checks to determine if the session has already been started - */ - - // If running PHP 5.4, try to use the native API - if (version_compare(PHP_VERSION, '5.4', 'ge') && PHP_SESSION_ACTIVE === session_status()) - { - throw new RuntimeException('Failed to start the session: already started by PHP.'); - } - - // Fallback check for PHP 5.3 - if (version_compare(PHP_VERSION, '5.4', 'lt') && !$this->closed && isset($_SESSION) && $this->getId()) - { - throw new RuntimeException('Failed to start the session: already started by PHP ($_SESSION is set).'); - } - - // If we are using cookies (default true) and headers have already been started (early output), - if (ini_get('session.use_cookies') && headers_sent($file, $line)) - { - throw new RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line)); - } - - // Ok to try and start the session - if (!session_start()) - { - throw new RuntimeException('Failed to start the session'); - } - - // Mark ourselves as started - $this->started = true; + $this->doSessionStart(); return true; } @@ -191,12 +155,12 @@ public function regenerate($destroy = false, $lifetime = null) if (isset($_SESSION)) { $backup = $_SESSION; - session_start(); + $this->doSessionStart(); $_SESSION = $backup; } else { - session_start(); + $this->doSessionStart(); } return $return; @@ -251,4 +215,52 @@ public function clear() $this->closed = true; $this->started = false; } + + /** + * Performs the session start mechanism + * + * @return void + * + * @since 3.5.1 + * @throws RuntimeException If something goes wrong starting the session. + */ + private function doSessionStart() + { + // Register our function as shutdown method, so we can manipulate it + register_shutdown_function(array($this, 'save')); + + // Disable the cache limiter + session_cache_limiter('none'); + + /* + * Extended checks to determine if the session has already been started + */ + + // If running PHP 5.4, try to use the native API + if (version_compare(PHP_VERSION, '5.4', 'ge') && PHP_SESSION_ACTIVE === session_status()) + { + throw new RuntimeException('Failed to start the session: already started by PHP.'); + } + + // Fallback check for PHP 5.3 + if (version_compare(PHP_VERSION, '5.4', 'lt') && !$this->closed && isset($_SESSION) && $this->getId()) + { + throw new RuntimeException('Failed to start the session: already started by PHP ($_SESSION is set).'); + } + + // If we are using cookies (default true) and headers have already been started (early output), + if (ini_get('session.use_cookies') && headers_sent($file, $line)) + { + throw new RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line)); + } + + // Ok to try and start the session + if (!session_start()) + { + throw new RuntimeException('Failed to start the session'); + } + + // Mark ourselves as started + $this->started = true; + } } diff --git a/libraries/joomla/session/session.php b/libraries/joomla/session/session.php index 08262e1ab26e0..61a510a22f956 100644 --- a/libraries/joomla/session/session.php +++ b/libraries/joomla/session/session.php @@ -604,8 +604,16 @@ public function start() // Perform security checks if (!$this->_validate()) { - // Destroy the session if it's not valid - $this->destroy(); + // If the session isn't valid because it expired try to restart it + // else destroy it. + if ($this->_state === 'expired') + { + $this->restart(); + } + else + { + $this->destroy(); + } } if ($this->_dispatcher instanceof JEventDispatcher) @@ -724,13 +732,16 @@ public function restart() $this->_state = 'restart'; // Regenerate session id - $this->_handler->regenerate(true, null); $this->_start(); + $this->_handler->regenerate(true, null); $this->_state = 'active'; if (!$this->_validate()) { - // Destroy the session if it's not valid + /** + * Destroy the session if it's not valid - we can't restart the session here unlike in the start method + * else we risk recursion. + */ $this->destroy(); } diff --git a/libraries/joomla/table/user.php b/libraries/joomla/table/user.php index c3fc467d62a5a..c9fb1d81ab62a 100644 --- a/libraries/joomla/table/user.php +++ b/libraries/joomla/table/user.php @@ -217,6 +217,12 @@ public function check() $this->lastvisitDate = $this->_db->getNullDate(); } + // Set the lastResetTime timestamp + if (empty($this->lastResetTime)) + { + $this->lastResetTime = $this->_db->getNullDate(); + } + // Check for existing username $query = $this->_db->getQuery(true) ->select($this->_db->quoteName('id')) diff --git a/libraries/joomla/twitter/statuses.php b/libraries/joomla/twitter/statuses.php index 7caf75e9c9f08..7286afcd4ec59 100644 --- a/libraries/joomla/twitter/statuses.php +++ b/libraries/joomla/twitter/statuses.php @@ -25,7 +25,7 @@ class JTwitterStatuses extends JTwitterObject * @param boolean $entities When set to true, each tweet will include a node called "entities,". This node offers a variety of metadata * about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. * @param boolean $my_retweet When set to either true, t or 1, any statuses returned that have been retweeted by the authenticating user will - * include an additional current_user_retweet node, containing the ID of the source status for the retweet. + * include an additional current_user_retweet node, containing the ID of the source status for the retweet. * * @return array The decoded JSON response * @@ -77,7 +77,7 @@ public function getTweetById($id, $trim_user = null, $entities = null, $my_retwe * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only * the status author's numerical ID. * @param boolean $contributor This parameter enhances the contributors element of the status response to include the screen_name of the - * contributor. By default only the user_id of the contributor is included. + * contributor. By default only the user_id of the contributor is included. * * @return array The decoded JSON response * @@ -231,7 +231,7 @@ public function tweet($status, $in_reply_to_status_id = null, $lat = null, $long * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only * the status author's numerical ID. * @param string $contributor This parameter enhances the contributors element of the status response to include the screen_name - * of the contributor. + * of the contributor. * * @return array The decoded JSON response * @@ -294,14 +294,14 @@ public function getMentions($count = 20, $include_rts = null, $entities = null, * Method to get the most recent tweets of the authenticated user that have been retweeted by others. * * @param integer $count Specifies the number of tweets to try and retrieve, up to a maximum of 200. Retweets are always included - * in the count, so it is always suggested to set $include_rts to true + * in the count, so it is always suggested to set $include_rts to true * @param integer $since_id Returns results with an ID greater than (that is, more recent than) the specified ID. * @param boolean $entities When set to true, each tweet will include a node called "entities,". This node offers a variety of metadata - * about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. + * about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. * @param boolean $user_entities The user entities node will be disincluded when set to false. * @param integer $max_id Returns results with an ID less than (that is, older than) the specified ID. * @param boolean $trim_user When set to true, each tweet returned in a timeline will include a user object including only - * the status author's numerical ID. + * the status author's numerical ID. * * @return array The decoded JSON response * @@ -358,9 +358,9 @@ public function getRetweetsOfMe($count = 20, $since_id = 0, $entities = null, $u * @param integer $id The numerical ID of the desired status. * @param integer $count Specifies the number of retweets to try and retrieve, up to a maximum of 100. * @param integer $cursor Causes the list of IDs to be broken into pages of no more than 100 IDs at a time. - * The number of IDs returned is not guaranteed to be 100 as suspended users are - * filtered out after connections are queried. If no cursor is provided, a value of - * -1 will be assumed, which is the first "page." + * The number of IDs returned is not guaranteed to be 100 as suspended users are + * filtered out after connections are queried. If no cursor is provided, a value of + * -1 will be assumed, which is the first "page." * @param boolean $stringify_ids Set to true to return IDs as strings, false to return as integers. * * @return array The decoded JSON response @@ -565,17 +565,18 @@ public function tweetWithMedia($status, $media, $in_reply_to_status_id = null, $ * @param integer $id The Tweet/status ID to return embed code for. * @param string $url The URL of the Tweet/status to be embedded. * @param integer $maxwidth The maximum width in pixels that the embed should be rendered at. This value is constrained to be - * between 250 and 550 pixels. + * between 250 and 550 pixels. * @param boolean $hide_media Specifies whether the embedded Tweet should automatically expand images which were uploaded via - * POST statuses/update_with_media. + * POST statuses/update_with_media. * @param boolean $hide_thread Specifies whether the embedded Tweet should automatically show the original message in the case that - * the embedded Tweet is a reply. - * @param boolean $omit_script Specifies whether the embedded Tweet HTML should include a "; - - return $txt; + JHtml::script('media/editors/none/none.min.js', false, false, false, false, true); + + return null; } /** @@ -94,24 +73,12 @@ public function onSetContent($id, $html) * * @param string $id The id of the editor field * - * @return boolean returns true when complete + * @return void */ public function onGetInsertMethod($id) { - static $done = false; - - // Do this only once. - if (!$done) - { - $doc = JFactory::getDocument(); - $js = "\tfunction jInsertEditorText(text, editor) - { - insertAtCursor(document.getElementById(editor), text); - }"; - $doc->addScriptDeclaration($js); - } - return true; + return null; } /** @@ -150,9 +117,9 @@ public function onDisplay($name, $content, $width, $height, $col, $row, $buttons $height .= 'px'; } - $buttons = $this->_displayButtons($id, $buttons, $asset, $author); - $editor = "" - . $buttons; + $editor = '' + . $this->_displayButtons($id, $buttons, $asset, $author); return $editor; } diff --git a/plugins/editors/tinymce/tinymce.php b/plugins/editors/tinymce/tinymce.php index c1373b1422adb..22aa61678883e 100644 --- a/plugins/editors/tinymce/tinymce.php +++ b/plugins/editors/tinymce/tinymce.php @@ -1023,12 +1023,12 @@ private function tinyButtons($name, $excluded) $btnsNames = array(); // Build the script - foreach ($buttons as $button) + foreach ($buttons as $i => $button) { if ($button->get('name')) { // Set some vars - $name = str_replace(" ", "", $button->get('text')); + $name = 'button-' . $i . str_replace(" ", "", $button->get('text')); $title = $button->get('text'); $onclick = ($button->get('onclick')) ? $button->get('onclick') : null; $options = $button->get('options'); diff --git a/plugins/system/sef/sef.php b/plugins/system/sef/sef.php index 3fa5a85457ebb..876fa0d419f17 100644 --- a/plugins/system/sef/sef.php +++ b/plugins/system/sef/sef.php @@ -40,20 +40,42 @@ public function onAfterDispatch() return; } - $uri = JUri::getInstance(); - $domain = $this->params->get('domain'); + $sefDomain = $this->params->get('domain', ''); - if ($domain === false || $domain === '') + // Don't add a canonical html tag if no alternative domain has added in SEF plugin domain field. + if (empty($sefDomain)) { - $domain = $uri->toString(array('scheme', 'host', 'port')); + return; } - $link = $domain . JRoute::_('index.php?' . http_build_query($this->app->getRouter()->getVars()), false); + // Check if a canonical html tag already exists (for instance, added by a component). + $canonical = ''; + foreach ($doc->_links as $linkUrl => $link) + { + if (isset($link['relation']) && $link['relation'] === 'canonical') + { + $canonical = $linkUrl; + break; + } + } - if (rawurldecode($uri->toString()) !== $link) + // If a canonical html tag already exists get the canonical and change it to use the SEF plugin domain field. + if (!empty($canonical)) { - $doc->addHeadLink(htmlspecialchars($link), 'canonical'); + // Remove current canonical link. + unset($doc->_links[$canonical]); + + // Set the current canonical link but use the SEF system plugin domain field. + $canonical = $sefDomain . JUri::getInstance($canonical)->toString(array('path', 'query', 'fragment')); + } + // If a canonical html doesn't exists already add a canonical html tag using the SEF plugin domain field. + else + { + $canonical = $sefDomain . JUri::getInstance()->toString(array('path', 'query', 'fragment')); } + + // Add the canonical link. + $doc->addHeadLink(htmlspecialchars($canonical), 'canonical'); } /** @@ -90,7 +112,7 @@ public function onAfterRender() { if (strpos($buffer, $attribute) !== false) { - $regex = '#\s+' . $attribute . '"(?!/|' . $protocols . '|\#|\')([^"]+)"#m'; + $regex = '#\s+' . $attribute . '"(?!/|' . $protocols . '|\#|\')([^"]*)"#m'; $buffer = preg_replace($regex, ' ' . $attribute . '"' . $base . '$1"', $buffer); $this->checkBuffer($buffer); } diff --git a/plugins/system/sef/sef.xml b/plugins/system/sef/sef.xml index c28b3b0afa04d..107f30dae7348 100644 --- a/plugins/system/sef/sef.xml +++ b/plugins/system/sef/sef.xml @@ -22,6 +22,7 @@ diff --git a/plugins/system/updatenotification/updatenotification.php b/plugins/system/updatenotification/updatenotification.php index 1a46a7c5e5829..91c065f311eb1 100644 --- a/plugins/system/updatenotification/updatenotification.php +++ b/plugins/system/updatenotification/updatenotification.php @@ -72,7 +72,7 @@ public function onAfterRender() } catch (Exception $e) { - // If we can't lock the tables it's too risk continuing execution + // If we can't lock the tables it's too risky to continue execution return; } diff --git a/plugins/user/profile/profile.php b/plugins/user/profile/profile.php index 523f16daed046..7d45e2208f9d0 100644 --- a/plugins/user/profile/profile.php +++ b/plugins/user/profile/profile.php @@ -362,11 +362,24 @@ public function onUserBeforeSave($user, $isnew, $data) // Throw an exception if date is not valid. throw new InvalidArgumentException(JText::_('PLG_USER_PROFILE_ERROR_INVALID_DOB')); } + if (JDate::getInstance('now') < $date) + { + // Throw an exception if dob is greather than now. + throw new InvalidArgumentException(JText::_('PLG_USER_PROFILE_ERROR_INVALID_DOB')); + } } - // Check that the tos are valid if required and not in backend. - if ((!($data['profile']['tos'])) && ($this->params->get('register-require_tos', 0) == 2) && (!JFactory::getApplication()->isAdmin())) + // Check that the tos is checked if required ie only in registration from frontend. + $task = JFactory::getApplication()->input->getCmd('task'); + $option = JFactory::getApplication()->input->getCmd('option'); + $tosarticle = $this->params->get('register_tos_article'); + $tosenabled = ($this->params->get('register-require_tos', 0) == 2) ? true : false; + if (($task == 'register') && ($tosenabled) && ($tosarticle) && ($option == 'com_users')) { - throw new InvalidArgumentException(JText::_('PLG_USER_PROFILE_FIELD_TOS_DESC_SITE')); + // Check that the tos is checked. + if ((!($data['profile']['tos']))) + { + throw new InvalidArgumentException(JText::_('PLG_USER_PROFILE_FIELD_TOS_DESC_SITE')); + } } return true; diff --git a/templates/beez3/language/en-GB/en-GB.tpl_beez3.ini b/templates/beez3/language/en-GB/en-GB.tpl_beez3.ini index 36f3b756bd2c8..31253eab868ca 100644 --- a/templates/beez3/language/en-GB/en-GB.tpl_beez3.ini +++ b/templates/beez3/language/en-GB/en-GB.tpl_beez3.ini @@ -56,5 +56,5 @@ TPL_BEEZ3_SMALLER="Smaller" TPL_BEEZ3_SYSTEM_MESSAGE="Error" TPL_BEEZ3_TEXTRIGHTCLOSE="Close info" TPL_BEEZ3_TEXTRIGHTOPEN="Open info" -TPL_BEEZ3_XML_DESCRIPTION="Accessible template for Joomla! Beez, the HTML 4 version." +TPL_BEEZ3_XML_DESCRIPTION="Accessible site template for Joomla! 3.x. Beez3, the HTML5 version." TPL_BEEZ3_YOUR_SITE_DESCRIPTION="Your site description" diff --git a/templates/beez3/language/en-GB/en-GB.tpl_beez3.sys.ini b/templates/beez3/language/en-GB/en-GB.tpl_beez3.sys.ini index 1ee379cb50c71..a25770eb786de 100644 --- a/templates/beez3/language/en-GB/en-GB.tpl_beez3.sys.ini +++ b/templates/beez3/language/en-GB/en-GB.tpl_beez3.sys.ini @@ -20,5 +20,5 @@ TPL_BEEZ3_POSITION_POSITION-6="Right top" TPL_BEEZ3_POSITION_POSITION-7="Left top" TPL_BEEZ3_POSITION_POSITION-8="Right middle" TPL_BEEZ3_POSITION_POSITION-9="Footer top" -TPL_BEEZ3_XML_DESCRIPTION="Accessible template for Joomla! Beez, the HTML 4 version." +TPL_BEEZ3_XML_DESCRIPTION="Accessible site template for Joomla! 3.x. Beez3, the HTML5 version." diff --git a/templates/protostar/html/com_media/images/default.php b/templates/protostar/html/com_media/images/default.php deleted file mode 100644 index 5d0b81aad93e6..0000000000000 --- a/templates/protostar/html/com_media/images/default.php +++ /dev/null @@ -1,170 +0,0 @@ -input; -$params = JComponentHelper::getParams('com_media'); -$lang = JFactory::getLanguage(); - -JHtml::_('formbehavior.chosen', 'select'); - -// Load tooltip instance without HTML support because we have a HTML tag in the tip -JHtml::_('bootstrap.tooltip', '.noHtmlTip', array('html' => false)); - -// Include jQuery -JHtml::_('jquery.framework'); -JHtml::_('script', 'media/popup-imagemanager.min.js', false, true, false, false, true); -JHtml::_('stylesheet', 'media/popup-imagemanager.css', array(), true); - -if ($lang->isRtl()) -{ - JHtml::_('stylesheet', 'media/popup-imagemanager_rtl.css', array(), true); -} - -JFactory::getDocument()->addScriptDeclaration( - " - var image_base_path = '" . $params->get('image_path', 'images') . "/'; - " -); -?> -
    - - -
    -
    - - -
    -
    -
    -
    - -
    -
    - folderList; ?> - -
    -
    -
    - - -
    -
    -
    - - - -
    -
    -
    -
    - -
    -
    - -
    -
    - state->get('field.id')):?> -
    -
    - -
    -
    - -
    -
    - -
    - state->get('field.id')):?> -
    -
    -
    - -
    -
    - -
    -
    -
    -
    - -
    -
    - -
    -
    -
    -
    -
    -
    - -
    -
    - -
    -
    -
    -
    - -
    -
    - - - -
    -
    -
    - - - - - - -
    - -
    -
    - authorise('core.create', 'com_media')) : ?> -
    -
    -
    -
    -
    - -
    -
    - -

    config->get('upload_maxsize') == '0' ? JText::_('COM_MEDIA_UPLOAD_FILES_NOLIMIT') : JText::sprintf('COM_MEDIA_UPLOAD_FILES', $this->config->get('upload_maxsize')); ?>

    -
    -
    -
    - set('com_media.return_url', 'index.php?option=com_media&view=images&tmpl=component&fieldid=' . $input->getCmd('fieldid', '') . '&e_name=' . $input->getCmd('e_name') . '&asset=' . $input->getCmd('asset') . '&author=' . $input->getCmd('author')); ?> -
    -
    - - -
    -
    -
    diff --git a/templates/protostar/html/layouts/joomla/form/field/media.php b/templates/protostar/html/layouts/joomla/form/field/media.php deleted file mode 100644 index c941fec9b1f8c..0000000000000 --- a/templates/protostar/html/layouts/joomla/form/field/media.php +++ /dev/null @@ -1,149 +0,0 @@ - section in form XML. - * @var boolean $hidden Is this field hidden in the form? - * @var string $hint Placeholder for the field. - * @var string $id DOM id of the field. - * @var string $label Label of the field. - * @var string $labelclass Classes to apply to the label. - * @var boolean $multiple Does this field support multiple values? - * @var string $name Name of the input field. - * @var string $onchange Onchange attribute for the field. - * @var string $onclick Onclick attribute for the field. - * @var string $pattern Pattern (Reg Ex) of value of the form field. - * @var boolean $readonly Is this field read only? - * @var boolean $repeat Allows extensions to duplicate elements. - * @var boolean $required Is this field required? - * @var integer $size Size attribute of the input. - * @var boolean $spellcheck Spellcheck state for the form field. - * @var string $validate Validation rules to apply. - * @var string $value Value attribute of the field. - * @var array $checkedOptions Options that will be set as checked. - * @var boolean $hasValue Has this field a value assigned? - * @var array $options Options available for this field. - * - * @var string $preview The preview image relative path - * @var integer $previewHeight The image preview height - * @var integer $previewWidth The image preview width - * @var string $asset The asset text - * @var string $authorField The label text - * @var string $folder The folder text - * @var string $link The link text - */ -extract($displayData); - -// The button. -if ($disabled != true) -{ - JHtml::_('bootstrap.tooltip'); -} - -$attr = ''; - -// Initialize some field attributes. -$attr .= !empty($class) ? ' class="input-small hasTooltip field-media-input ' . $class . '"' : ' class="input-small hasTooltip field-media-input"'; -$attr .= !empty($size) ? ' size="' . $size . '"' : ''; - -// Initialize JavaScript field attributes. -$attr .= !empty($onchange) ? ' onchange="' . $onchange . '"' : ''; - -switch ($preview) -{ - case 'no': // Deprecated parameter value - case 'false': - case 'none': - $showPreview = false; - $showAsTooltip = false; - break; - case 'yes': // Deprecated parameter value - case 'true': - case 'show': - case 'tooltip': - default: - $showPreview = true; - $showAsTooltip = true; - break; -} - -// Pre fill the contents of the popover -if ($showPreview) -{ - if ($value && file_exists(JPATH_ROOT . '/' . $value)) - { - $src = JUri::root() . $value; - } - else - { - $src = JText::_('JLIB_FORM_MEDIA_PREVIEW_EMPTY'); - } -} - -// The url for the modal -$url = ($readonly ? '' - : ($link ? $link - : 'index.php?option=com_media&view=images&tmpl=component&asset=' - . $asset . '&author=' . $authorId) - . '&fieldid={field-media-id}&folder=' . $folder); -?> -
    - JText::_('JLIB_FORM_CHANGE_IMAGE'), - 'closeButton' => true, - 'footer' => '' - ) - ); - - JHtml::_('script', 'media/mediafield.min.js', false, true, false, false, true); - ?> - -
    - - - - -
    - - /> - - - "> - -
    -
    diff --git a/tests/unit/bootstrap.php b/tests/unit/bootstrap.php index e71c27a4432ae..425da8151eb14 100644 --- a/tests/unit/bootstrap.php +++ b/tests/unit/bootstrap.php @@ -117,3 +117,6 @@ function jexit($message = 0) // Register the deprecation handler TestHelper::registerDeprecationHandler(); + +// Register the logger if enabled +TestHelper::registerLogger(); diff --git a/tests/unit/core/case/cache.php b/tests/unit/core/case/cache.php new file mode 100644 index 0000000000000..9c3eef9b677cb --- /dev/null +++ b/tests/unit/core/case/cache.php @@ -0,0 +1,168 @@ +saveFactoryState(); + + JFactory::$application = $this->getMockCmsApp(); + JFactory::$session = $this->getMockSession(); + + $this->id = bin2hex(random_bytes(8)); + } + + /** + * Tears down the fixture, for example, close a network connection. + * This method is called after a test is executed. + * + * @return void + */ + protected function tearDown() + { + $this->restoreFactoryState(); + + if ($this->handler instanceof JCacheStorage) + { + $this->handler->clean($this->group); + } + + parent::tearDown(); + } + + /** + * Check if the adapter is blacklisted in an environment + * + * @param string $name The name of the adapter + * + * @return boolean + */ + protected function isBlacklisted($name) + { + // Memcached & Redis test as supported on the Jenkins server but data processing fails, temporarily block them only in this environment + return in_array($name, array('memcached', 'redis')) && isset($_ENV['BUILD_TAG']) && strpos($_ENV['BUILD_TAG'], 'jenkins-cms-') === 0; + } + + /** + * @testdox Data is correctly stored to and retrieved from the cache storage handler + */ + public function testCacheHit() + { + $data = 'testData'; + + $this->assertTrue($this->handler->store($this->id, $this->group, $data), 'Initial Store Failed'); + $this->assertSame($this->handler->get($this->id, $this->group), $data, 'Failed retrieving data from the cache store'); + } + + /** + * @testdox Non-existing data cannot be retrieved from the cache storage handler + */ + public function testCacheMiss() + { + $this->assertFalse($this->handler->get($this->id, $this->group), 'No data should be returned from the cache store when the key has not been previously set.'); + } + + /** + * @testdox The cache handler correctly handles expired cache data + * + * @medium + */ + public function testCacheTimeout() + { + $data = 'testData'; + + $this->handler->_lifetime = 2; + + $this->assertTrue($this->handler->store($this->id, $this->group, $data), 'Initial Store Failed'); + + sleep(5); + + $this->assertFalse($this->handler->get($this->id, $this->group), 'No data should be returned from the cache store when expired.'); + } + + /** + * @testdox Data is removed from the cache store + */ + public function testCacheRemove() + { + $data = 'testData'; + + $this->assertTrue($this->handler->store($this->id, $this->group, $data), 'Initial Store Failed'); + $this->assertTrue($this->handler->remove($this->id, $this->group), 'Removal Failed'); + $this->assertFalse($this->handler->get($this->id, $this->group), 'No data should be returned from the cache store after being removed.'); + } + + /** + * @testdox Data within a group is removed from the cache store + */ + public function testCacheClearGroup() + { + $data = 'testData'; + + $this->assertTrue($this->handler->store($this->id, $this->group, $data), 'Initial Store Failed'); + $this->assertTrue($this->handler->clean($this->group, 'group'), 'Removal Failed'); + $this->assertFalse($this->handler->get($this->id, $this->group), 'No data should be returned from the cache store after being removed.'); + } + + /** + * @testdox Data not within the specified group is removed from the cache store + */ + public function testCacheClearNotGroup() + { + $data = 'testData'; + $secondId = bin2hex(random_bytes(8)); + $secondGroup = 'group2'; + + $this->assertTrue($this->handler->store($this->id, $this->group, $data), 'Initial Store Failed'); + $this->assertTrue($this->handler->store($secondId, $data, $secondGroup), 'Initial Store Failed'); + $this->assertTrue($this->handler->clean($this->group, 'notgroup'), 'Removal Failed'); + $this->assertSame($this->handler->get($this->id, $this->group), $data, 'Data in the group specified in JCacheStorage::clean() should still exist'); + $this->assertFalse($this->handler->get($secondId, $secondGroup), 'Data in the groups not specified in JCacheStorage::clean() should not exist'); + } + + /** + * @testdox The cache handler is supported in this environment + */ + public function testIsSupported() + { + $this->assertTrue($this->handler->isSupported(), 'Claims the cache handler is not supported.'); + } +} diff --git a/tests/unit/core/case/database.php b/tests/unit/core/case/database.php index c1a8f86c54129..5a1dc357862f8 100644 --- a/tests/unit/core/case/database.php +++ b/tests/unit/core/case/database.php @@ -89,29 +89,29 @@ public static function setUpBeforeClass() try { // Attempt to instantiate the driver. - self::$driver = JDatabaseDriver::getInstance($options); + static::$driver = JDatabaseDriver::getInstance($options); // Create a new PDO instance for an SQLite memory database and load the test schema into it. $pdo = new PDO('sqlite::memory:'); $pdo->exec(file_get_contents(JPATH_TESTS . '/schema/ddl.sql')); // Set the PDO instance to the driver using reflection whizbangery. - TestReflection::setValue(self::$driver, 'connection', $pdo); + TestReflection::setValue(static::$driver, 'connection', $pdo); } catch (RuntimeException $e) { - self::$driver = null; + static::$driver = null; } // If for some reason an exception object was returned set our database object to null. - if (self::$driver instanceof Exception) + if (static::$driver instanceof Exception) { - self::$driver = null; + static::$driver = null; } // Setup the factory pointer for the driver and stash the old one. self::$_stash = JFactory::$database; - JFactory::$database = self::$driver; + JFactory::$database = static::$driver; } /** @@ -124,7 +124,7 @@ public static function setUpBeforeClass() public static function tearDownAfterClass() { JFactory::$database = self::$_stash; - self::$driver = null; + static::$driver = null; } /** @@ -359,9 +359,9 @@ class_exists('JApplicationWeb'); */ protected function getConnection() { - if (!is_null(self::$driver)) + if (!is_null(static::$driver)) { - return $this->createDefaultDBConnection(self::$driver->getConnection(), ':memory:'); + return $this->createDefaultDBConnection(static::$driver->getConnection(), ':memory:'); } else { diff --git a/tests/unit/core/case/database/mysql.php b/tests/unit/core/case/database/mysql.php index 88d15fd3cce07..d87c9b09cf7ce 100644 --- a/tests/unit/core/case/database/mysql.php +++ b/tests/unit/core/case/database/mysql.php @@ -45,19 +45,17 @@ public static function setUpBeforeClass() { if (PHP_MAJOR_VERSION >= 7) { - self::markTestSkipped('ext/mysql is unsupported on PHP 7.'); + static::markTestSkipped('ext/mysql is unsupported on PHP 7.'); } // First let's look to see if we have a DSN defined or in the environment variables. - if (defined('JTEST_DATABASE_MYSQL_DSN') || getenv('JTEST_DATABASE_MYSQL_DSN')) + if (!defined('JTEST_DATABASE_MYSQL_DSN') && !getenv('JTEST_DATABASE_MYSQL_DSN')) { - $dsn = defined('JTEST_DATABASE_MYSQL_DSN') ? JTEST_DATABASE_MYSQL_DSN : getenv('JTEST_DATABASE_MYSQL_DSN'); - } - else - { - return; + static::markTestSkipped('The MySQL driver is not configured.'); } + $dsn = defined('JTEST_DATABASE_MYSQL_DSN') ? JTEST_DATABASE_MYSQL_DSN : getenv('JTEST_DATABASE_MYSQL_DSN'); + // First let's trim the mysql: part off the front of the DSN if it exists. if (strpos($dsn, 'mysql:') === 0) { @@ -92,22 +90,22 @@ public static function setUpBeforeClass() try { // Attempt to instantiate the driver. - self::$driver = JDatabaseDriver::getInstance(self::$_options); + static::$driver = JDatabaseDriver::getInstance(self::$_options); } catch (RuntimeException $e) { - self::$driver = null; + static::$driver = null; } // If for some reason an exception object was returned set our database object to null. - if (self::$driver instanceof Exception) + if (static::$driver instanceof Exception) { - self::$driver = null; + static::$driver = null; } // Setup the factory pointer for the driver and stash the old one. self::$_stash = JFactory::$database; - JFactory::$database = self::$driver; + JFactory::$database = static::$driver; } /** @@ -120,7 +118,7 @@ public static function setUpBeforeClass() public static function tearDownAfterClass() { JFactory::$database = self::$_stash; - self::$driver = null; + static::$driver = null; } /** diff --git a/tests/unit/core/case/database/mysqli.php b/tests/unit/core/case/database/mysqli.php index a98f4e0b671fb..123361fc3d223 100644 --- a/tests/unit/core/case/database/mysqli.php +++ b/tests/unit/core/case/database/mysqli.php @@ -44,15 +44,13 @@ abstract class TestCaseDatabaseMysqli extends TestCaseDatabase public static function setUpBeforeClass() { // First let's look to see if we have a DSN defined or in the environment variables. - if (defined('JTEST_DATABASE_MYSQLI_DSN') || getenv('JTEST_DATABASE_MYSQLI_DSN')) + if (!defined('JTEST_DATABASE_MYSQLI_DSN') && !getenv('JTEST_DATABASE_MYSQLI_DSN')) { - $dsn = defined('JTEST_DATABASE_MYSQLI_DSN') ? JTEST_DATABASE_MYSQLI_DSN : getenv('JTEST_DATABASE_MYSQLI_DSN'); - } - else - { - return; + static::markTestSkipped('The MySQLi driver is not configured.'); } + $dsn = defined('JTEST_DATABASE_MYSQLI_DSN') ? JTEST_DATABASE_MYSQLI_DSN : getenv('JTEST_DATABASE_MYSQLI_DSN'); + // First let's trim the mysql: part off the front of the DSN if it exists. if (strpos($dsn, 'mysql:') === 0) { @@ -87,22 +85,22 @@ public static function setUpBeforeClass() try { // Attempt to instantiate the driver. - self::$driver = JDatabaseDriver::getInstance(self::$_options); + static::$driver = JDatabaseDriver::getInstance(self::$_options); } catch (RuntimeException $e) { - self::$driver = null; + static::$driver = null; } // If for some reason an exception object was returned set our database object to null. - if (self::$driver instanceof Exception) + if (static::$driver instanceof Exception) { - self::$driver = null; + static::$driver = null; } // Setup the factory pointer for the driver and stash the old one. self::$_stash = JFactory::$database; - JFactory::$database = self::$driver; + JFactory::$database = static::$driver; } /** @@ -115,7 +113,7 @@ public static function setUpBeforeClass() public static function tearDownAfterClass() { JFactory::$database = self::$_stash; - self::$driver = null; + static::$driver = null; } /** diff --git a/tests/unit/core/case/database/pdomysql.php b/tests/unit/core/case/database/pdomysql.php index 237b1e348938c..e29fbeb802399 100644 --- a/tests/unit/core/case/database/pdomysql.php +++ b/tests/unit/core/case/database/pdomysql.php @@ -44,15 +44,13 @@ abstract class TestCaseDatabasePdomysql extends TestCaseDatabase public static function setUpBeforeClass() { // First let's look to see if we have a DSN defined or in the environment variables. - if (defined('JTEST_DATABASE_PDO_MYSQL_DSN') || getenv('JTEST_DATABASE_PDO_MYSQL_DSN')) + if (!defined('JTEST_DATABASE_PDO_MYSQL_DSN') && !getenv('JTEST_DATABASE_PDO_MYSQL_DSN')) { - $dsn = defined('JTEST_DATABASE_PDO_MYSQL_DSN') ? JTEST_DATABASE_PDO_MYSQL_DSN : getenv('JTEST_DATABASE_PDO_MYSQL_DSN'); - } - else - { - return; + static::markTestSkipped('The PDO MySQL driver is not configured.'); } + $dsn = defined('JTEST_DATABASE_PDO_MYSQL_DSN') ? JTEST_DATABASE_PDO_MYSQL_DSN : getenv('JTEST_DATABASE_PDO_MYSQL_DSN'); + // First let's trim the mysql: part off the front of the DSN if it exists. if (strpos($dsn, 'mysql:') === 0) { @@ -87,22 +85,22 @@ public static function setUpBeforeClass() try { // Attempt to instantiate the driver. - self::$driver = JDatabaseDriver::getInstance(self::$_options); + static::$driver = JDatabaseDriver::getInstance(self::$_options); } catch (RuntimeException $e) { - self::$driver = null; + static::$driver = null; } // If for some reason an exception object was returned set our database object to null. - if (self::$driver instanceof Exception) + if (static::$driver instanceof Exception) { - self::$driver = null; + static::$driver = null; } // Setup the factory pointer for the driver and stash the old one. self::$_stash = JFactory::$database; - JFactory::$database = self::$driver; + JFactory::$database = static::$driver; } /** @@ -115,7 +113,7 @@ public static function setUpBeforeClass() public static function tearDownAfterClass() { JFactory::$database = self::$_stash; - self::$driver = null; + static::$driver = null; } /** diff --git a/tests/unit/core/case/database/postgresql.php b/tests/unit/core/case/database/postgresql.php index 6735fc5e771d1..1798ec2b20330 100644 --- a/tests/unit/core/case/database/postgresql.php +++ b/tests/unit/core/case/database/postgresql.php @@ -44,15 +44,13 @@ abstract class TestCaseDatabasePostgresql extends TestCaseDatabase public static function setUpBeforeClass() { // First let's look to see if we have a DSN defined or in the environment variables. - if (defined('JTEST_DATABASE_POSTGRESQL_DSN') || getenv('JTEST_DATABASE_POSTGRESQL_DSN')) + if (!defined('JTEST_DATABASE_POSTGRESQL_DSN') && !getenv('JTEST_DATABASE_POSTGRESQL_DSN')) { - $dsn = defined('JTEST_DATABASE_POSTGRESQL_DSN') ? JTEST_DATABASE_POSTGRESQL_DSN : getenv('JTEST_DATABASE_POSTGRESQL_DSN'); - } - else - { - return; + static::markTestSkipped('The PostgreSQL driver is not configured.'); } + $dsn = defined('JTEST_DATABASE_POSTGRESQL_DSN') ? JTEST_DATABASE_POSTGRESQL_DSN : getenv('JTEST_DATABASE_POSTGRESQL_DSN'); + // First let's trim the pgsql: part off the front of the DSN if it exists. if (strpos($dsn, 'pgsql:') === 0) { @@ -90,22 +88,22 @@ public static function setUpBeforeClass() try { // Attempt to instantiate the driver. - self::$driver = JDatabaseDriver::getInstance(self::$_options); + static::$driver = JDatabaseDriver::getInstance(self::$_options); } catch (RuntimeException $e) { - self::$driver = null; + static::$driver = null; } // If for some reason an exception object was returned set our database object to null. - if (self::$driver instanceof Exception) + if (static::$driver instanceof Exception) { - self::$driver = null; + static::$driver = null; } // Setup the factory pointer for the driver and stash the old one. self::$_stash = JFactory::$database; - JFactory::$database = self::$driver; + JFactory::$database = static::$driver; } /** @@ -118,7 +116,7 @@ public static function setUpBeforeClass() public static function tearDownAfterClass() { JFactory::$database = self::$_stash; - self::$driver = null; + static::$driver = null; } /** diff --git a/tests/unit/core/case/database/sqlsrv.php b/tests/unit/core/case/database/sqlsrv.php index 16e7213d17475..8bd96dcb0f8e4 100644 --- a/tests/unit/core/case/database/sqlsrv.php +++ b/tests/unit/core/case/database/sqlsrv.php @@ -44,15 +44,13 @@ abstract class TestCaseDatabaseSqlsrv extends TestCaseDatabase public static function setUpBeforeClass() { // First let's look to see if we have a DSN defined or in the environment variables. - if (defined('JTEST_DATABASE_SQLSRV_DSN') || getenv('JTEST_DATABASE_SQLSRV_DSN')) + if (!defined('JTEST_DATABASE_SQLSRV_DSN') && !getenv('JTEST_DATABASE_SQLSRV_DSN')) { - $dsn = defined('JTEST_DATABASE_SQLSRV_DSN') ? JTEST_DATABASE_SQLSRV_DSN : getenv('JTEST_DATABASE_SQLSRV_DSN'); - } - else - { - return; + static::markTestSkipped('The SQL Server driver is not configured.'); } + $dsn = defined('JTEST_DATABASE_SQLSRV_DSN') ? JTEST_DATABASE_SQLSRV_DSN : getenv('JTEST_DATABASE_SQLSRV_DSN'); + // First let's trim the sqlsrv: part off the front of the DSN if it exists. if (strpos($dsn, 'sqlsrv:') === 0) { @@ -87,22 +85,22 @@ public static function setUpBeforeClass() try { // Attempt to instantiate the driver. - self::$driver = JDatabaseDriver::getInstance(self::$options); + static::$driver = JDatabaseDriver::getInstance(self::$options); } catch (RuntimeException $e) { - self::$driver = null; + static::$driver = null; } // If for some reason an exception object was returned set our database object to null. - if (self::$driver instanceof Exception) + if (static::$driver instanceof Exception) { - self::$driver = null; + static::$driver = null; } // Setup the factory pointer for the driver and stash the old one. self::$stash = JFactory::$database; - JFactory::$database = self::$driver; + JFactory::$database = static::$driver; } /** @@ -115,7 +113,7 @@ public static function setUpBeforeClass() public static function tearDownAfterClass() { JFactory::$database = self::$stash; - self::$driver = null; + static::$driver = null; } /** diff --git a/tests/unit/core/helper/helper.php b/tests/unit/core/helper/helper.php index ab22c74483515..1c621e0c55d18 100644 --- a/tests/unit/core/helper/helper.php +++ b/tests/unit/core/helper/helper.php @@ -163,6 +163,21 @@ public static function registerDeprecationHandler() } } + /** + * Adds optional logging support for the unit test run + * + * @return void + * + * @since 3.5 + */ + public static function registerLogger() + { + if (defined('JOOMLA_TEST_LOGGING') && JOOMLA_TEST_LOGGING === 'yes') + { + JLog::addLogger(array('logger' => 'formattedtext', 'text_file' => 'unit_test.php', 'text_file_path' => JPATH_ROOT . '/logs')); + } + } + /** * Detects if the CLI output supports color codes * diff --git a/tests/unit/suites/database/driver/pdomysql/JDatabaseDriverPdomysqlTest.php b/tests/unit/suites/database/driver/pdomysql/JDatabaseDriverPdomysqlTest.php index 60da486c648a4..e36336eeae1ca 100644 --- a/tests/unit/suites/database/driver/pdomysql/JDatabaseDriverPdomysqlTest.php +++ b/tests/unit/suites/database/driver/pdomysql/JDatabaseDriverPdomysqlTest.php @@ -629,17 +629,7 @@ public function testExecute() "REPLACE INTO `jos_dbtest` SET `id` = 5, `title` = 'testTitle', `start_date` = '2014-08-17 00:00:00', `description` = 'testDescription'" ); - $this->assertThat( - (bool) self::$driver->execute(), - $this->isTrue(), - __LINE__ - ); - - $this->assertThat( - self::$driver->insertid(), - $this->equalTo(5), - __LINE__ - ); + $this->assertInstanceOf('PDOStatement', self::$driver->execute()); } diff --git a/tests/unit/suites/libraries/cms/schema/JSchemaChangeitemTest.php b/tests/unit/suites/libraries/cms/schema/JSchemaChangeitemTest.php new file mode 100644 index 0000000000000..94532c99ae4af --- /dev/null +++ b/tests/unit/suites/libraries/cms/schema/JSchemaChangeitemTest.php @@ -0,0 +1,70 @@ + array('Mysql', 'Mysql', 'mysql'), + 'MySQLi' => array('Mysqli', 'Mysql', 'mysql'), + 'PDO MySQL' => array('Pdomysql', 'Mysql', 'mysql'), + 'PostgreSQL' => array('Postgresql', 'Postgresql', 'postgresql'), + 'SQL Server' => array('Sqlsrv', 'Sqlsrv', 'sqlazure'), + 'SQL Azure' => array('Sqlazure', 'Sqlsrv', 'sqlazure'), + ); + } + + /** + * @testdox getInstance() returns the correct object + * + * @param string $dbDriver The database driver to be mocked + * @param string $itemSubclass The subclass of JSchemaChangeitem that is expected + * @param string $dbFolder The name of the folder where the stubs are located + * + * @covers JSchemaChangeitem::__construct + * @covers JSchemaChangeitem::getInstance + * + * @dataProvider dataGetInstance + */ + public function testGetInstanceReturnsTheCorrectObject($dbDriver, $itemSubclass, $dbFolder) + { + $file = __DIR__ . '/stubs/' . $dbFolder . '/3.5.0-2016-03-01.sql'; + $dbo = $this->getMockDatabase($dbDriver); + $queries = JDatabaseDriver::splitSql(file_get_contents($file)); + + $item = JSchemaChangeitem::getInstance($dbo, $file, $queries[0]); + + $this->assertInstanceOf('JSchemaChangeitem' . $itemSubclass, $item, 'The correct JSchemaChangeitem subclass was not instantiated'); + } + + /** + * @testdox getInstance() throws an Exception for an unsupported driver + * + * @covers JSchemaChangeitem::getInstance + * + * @expectedException RuntimeException + */ + public function testGetInstanceThrowsAnExceptionForAnUnsupportedDriver() + { + $file = __DIR__ . '/stubs/mysql/3.5.0-2016-03-01.sql'; + $dbo = $this->getMockDatabase('Sqlite'); + $query = 'SELECT foo FROM bar'; + + JSchemaChangeitem::getInstance($dbo, $file, $query); + } +} diff --git a/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTest.php b/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTest.php deleted file mode 100644 index 44765b534c625..0000000000000 --- a/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTest.php +++ /dev/null @@ -1,147 +0,0 @@ -saveFactoryState(); - - JFactory::$database = $this->getMockDatabase('Mysqli'); - - // Register the object - $this->object = JSchemaChangeset::getInstance(JFactory::getDbo(), null); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - * - * @return void - * - * @since 3.0 - */ - protected function tearDown() - { - // Restore the factory state - $this->restoreFactoryState(); - - parent::tearDown(); - } - - /** - * Provides the testable database drivers - * - * @return array - */ - public function dataDriver() - { - return array( - array('Mysql'), - array('Postgresql'), - array('Sqlsrv'), - ); - } - - /** - * Tests the __construct method with the given driver - * - * @medium - * - * @param string $driver Driver to test against - * - * @return void - * - * @dataProvider dataDriver - * @since 3.0 - */ - public function test__construct($driver) - { - // Skip the Mysql driver on PHP 7 - if ($driver === 'Mysql' && PHP_MAJOR_VERSION >= 7) - { - $this->markTestSkipped('ext/mysql is unsupported on PHP 7.'); - } - - $db = $this->getMockDatabase($driver); - $schema = new JSchemaChangeset($db, null); - - $this->assertAttributeInstanceOf('JDatabaseDriver' . $driver, 'db', $schema); - } - - /** - * Tests the getInstance method with the MySQLi driver - * - * @return void - * - * @since 3.0 - */ - public function testGetInstanceMysqli() - { - $this->assertAttributeInstanceOf('JDatabaseDriverMysqli', 'db', $this->object); - } - - /** - * Tests the getStatus method - * - * @return void - * - * @since 3.0 - */ - public function testGetStatus() - { - $this->assertInternalType('array', $this->object->getStatus()); - } - - /** - * Tests the getSchema method - * - * @return void - * - * @since 3.0 - */ - public function testGetSchema() - { - $this->assertInternalType('string', $this->object->getSchema()); - } -} diff --git a/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTestMysql.php b/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTestMysql.php new file mode 100644 index 0000000000000..fa957d8ea7e63 --- /dev/null +++ b/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTestMysql.php @@ -0,0 +1,73 @@ +object = new JSchemaChangeset(static::$driver, __DIR__ . '/stubs'); + } + + /** + * @testdox The object is instantiated correctly + * + * @covers JSchemaChangeset::__construct + * @covers JSchemaChangeset::getUpdateFiles + * @covers JSchemaChangeset::getUpdateQueries + * @medium + */ + public function testTheObjectIsInstantiatedCorrectly() + { + $this->assertAttributeInstanceOf('JDatabaseDriverMysql', 'db', $this->object, 'The database driver was not correctly injected'); + $this->assertAttributeContainsOnly('JSchemaChangeitemMysql', 'changeItems', $this->object, null, 'The list of change items was not correctly set'); + } + + /** + * @testdox The schema's status is correctly validated + * + * @covers JSchemaChangeset::getStatus + */ + public function testTheSchemaStatusIsCorrectlyValidated() + { + $status = $this->object->getStatus(); + + $this->assertArrayHasKey('unchecked', $status, 'An array should be returned containing a list of unchecked items'); + $this->assertContainsOnlyInstancesOf('JSchemaChangeitemMysql', $status['unchecked'], 'The unchecked items array should only contain JSchemaChangeitem objects'); + } + + /** + * @testdox The latest schema version is returned + * + * @covers JSchemaChangeset::getStatus + * @covers JSchemaChangeset::getUpdateFiles + */ + public function testTheLatestSchemaVersionIsReturned() + { + $this->assertSame('3.5.0-2016-03-01', $this->object->getSchema(), 'The latest schema version was not returned'); + } +} diff --git a/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTestMysqli.php b/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTestMysqli.php new file mode 100644 index 0000000000000..6bda14ff7849e --- /dev/null +++ b/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTestMysqli.php @@ -0,0 +1,73 @@ +object = new JSchemaChangeset(static::$driver, __DIR__ . '/stubs'); + } + + /** + * @testdox The object is instantiated correctly + * + * @covers JSchemaChangeset::__construct + * @covers JSchemaChangeset::getUpdateFiles + * @covers JSchemaChangeset::getUpdateQueries + * @medium + */ + public function testTheObjectIsInstantiatedCorrectly() + { + $this->assertAttributeInstanceOf('JDatabaseDriverMysqli', 'db', $this->object, 'The database driver was not correctly injected'); + $this->assertAttributeContainsOnly('JSchemaChangeitemMysql', 'changeItems', $this->object, null, 'The list of change items was not correctly set'); + } + + /** + * @testdox The schema's status is correctly validated + * + * @covers JSchemaChangeset::getStatus + */ + public function testTheSchemaStatusIsCorrectlyValidated() + { + $status = $this->object->getStatus(); + + $this->assertArrayHasKey('unchecked', $status, 'An array should be returned containing a list of unchecked items'); + $this->assertContainsOnlyInstancesOf('JSchemaChangeitemMysql', $status['unchecked'], 'The unchecked items array should only contain JSchemaChangeitem objects'); + } + + /** + * @testdox The latest schema version is returned + * + * @covers JSchemaChangeset::getStatus + * @covers JSchemaChangeset::getUpdateFiles + */ + public function testTheLatestSchemaVersionIsReturned() + { + $this->assertSame('3.5.0-2016-03-01', $this->object->getSchema(), 'The latest schema version was not returned'); + } +} diff --git a/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTestPdomysql.php b/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTestPdomysql.php new file mode 100644 index 0000000000000..d9e87e68806fd --- /dev/null +++ b/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTestPdomysql.php @@ -0,0 +1,73 @@ +object = new JSchemaChangeset(static::$driver, __DIR__ . '/stubs'); + } + + /** + * @testdox The object is instantiated correctly + * + * @covers JSchemaChangeset::__construct + * @covers JSchemaChangeset::getUpdateFiles + * @covers JSchemaChangeset::getUpdateQueries + * @medium + */ + public function testTheObjectIsInstantiatedCorrectly() + { + $this->assertAttributeInstanceOf('JDatabaseDriverPdomysql', 'db', $this->object, 'The database driver was not correctly injected'); + $this->assertAttributeContainsOnly('JSchemaChangeitemMysql', 'changeItems', $this->object, null, 'The list of change items was not correctly set'); + } + + /** + * @testdox The schema's status is correctly validated + * + * @covers JSchemaChangeset::getStatus + */ + public function testTheSchemaStatusIsCorrectlyValidated() + { + $status = $this->object->getStatus(); + + $this->assertArrayHasKey('unchecked', $status, 'An array should be returned containing a list of unchecked items'); + $this->assertContainsOnlyInstancesOf('JSchemaChangeitemMysql', $status['unchecked'], 'The unchecked items array should only contain JSchemaChangeitem objects'); + } + + /** + * @testdox The latest schema version is returned + * + * @covers JSchemaChangeset::getStatus + * @covers JSchemaChangeset::getUpdateFiles + */ + public function testTheLatestSchemaVersionIsReturned() + { + $this->assertSame('3.5.0-2016-03-01', $this->object->getSchema(), 'The latest schema version was not returned'); + } +} diff --git a/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTestPostgresql.php b/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTestPostgresql.php new file mode 100644 index 0000000000000..29baf55d570f9 --- /dev/null +++ b/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTestPostgresql.php @@ -0,0 +1,73 @@ +object = new JSchemaChangeset(static::$driver, __DIR__ . '/stubs'); + } + + /** + * @testdox The object is instantiated correctly + * + * @covers JSchemaChangeset::__construct + * @covers JSchemaChangeset::getUpdateFiles + * @covers JSchemaChangeset::getUpdateQueries + * @medium + */ + public function testTheObjectIsInstantiatedCorrectly() + { + $this->assertAttributeInstanceOf('JDatabaseDriverPostgresql', 'db', $this->object, 'The database driver was not correctly injected'); + $this->assertAttributeContainsOnly('JSchemaChangeitemPostgresql', 'changeItems', $this->object, null, 'The list of change items was not correctly set'); + } + + /** + * @testdox The schema's status is correctly validated + * + * @covers JSchemaChangeset::getStatus + */ + public function testTheSchemaStatusIsCorrectlyValidated() + { + $status = $this->object->getStatus(); + + $this->assertArrayHasKey('unchecked', $status, 'An array should be returned containing a list of unchecked items'); + $this->assertContainsOnlyInstancesOf('JSchemaChangeitemPostgresql', $status['unchecked'], 'The unchecked items array should only contain JSchemaChangeitem objects'); + } + + /** + * @testdox The latest schema version is returned + * + * @covers JSchemaChangeset::getStatus + * @covers JSchemaChangeset::getUpdateFiles + */ + public function testTheLatestSchemaVersionIsReturned() + { + $this->assertSame('3.5.0-2016-03-01', $this->object->getSchema(), 'The latest schema version was not returned'); + } +} diff --git a/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTestSqlsrv.php b/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTestSqlsrv.php new file mode 100644 index 0000000000000..a53b1ae5c89ed --- /dev/null +++ b/tests/unit/suites/libraries/cms/schema/JSchemaChangesetTestSqlsrv.php @@ -0,0 +1,73 @@ +object = new JSchemaChangeset(static::$driver, __DIR__ . '/stubs'); + } + + /** + * @testdox The object is instantiated correctly + * + * @covers JSchemaChangeset::__construct + * @covers JSchemaChangeset::getUpdateFiles + * @covers JSchemaChangeset::getUpdateQueries + * @medium + */ + public function testTheObjectIsInstantiatedCorrectly() + { + $this->assertAttributeInstanceOf('JDatabaseDriverSqlsrv', 'db', $this->object, 'The database driver was not correctly injected'); + $this->assertAttributeContainsOnly('JSchemaChangeitemSqlsrv', 'changeItems', $this->object, null, 'The list of change items was not correctly set'); + } + + /** + * @testdox The schema's status is correctly validated + * + * @covers JSchemaChangeset::getStatus + */ + public function testTheSchemaStatusIsCorrectlyValidated() + { + $status = $this->object->getStatus(); + + $this->assertArrayHasKey('unchecked', $status, 'An array should be returned containing a list of unchecked items'); + $this->assertContainsOnlyInstancesOf('JSchemaChangeitemSqlsrv', $status['unchecked'], 'The unchecked items array should only contain JSchemaChangeitem objects'); + } + + /** + * @testdox The latest schema version is returned + * + * @covers JSchemaChangeset::getStatus + * @covers JSchemaChangeset::getUpdateFiles + */ + public function testTheLatestSchemaVersionIsReturned() + { + $this->assertSame('3.5.0-2016-03-01', $this->object->getSchema(), 'The latest schema version was not returned'); + } +} diff --git a/tests/unit/suites/libraries/cms/schema/stubs/mysql/3.0.0.sql b/tests/unit/suites/libraries/cms/schema/stubs/mysql/3.0.0.sql new file mode 100644 index 0000000000000..3c0deb57c80c0 --- /dev/null +++ b/tests/unit/suites/libraries/cms/schema/stubs/mysql/3.0.0.sql @@ -0,0 +1,147 @@ +ALTER TABLE `#__users` DROP INDEX `usertype`; +ALTER TABLE `#__session` DROP INDEX `whosonline`; + +DROP TABLE IF EXISTS `#__update_categories`; + +ALTER TABLE `#__contact_details` DROP `imagepos`; +ALTER TABLE `#__content` DROP COLUMN `title_alias`; +ALTER TABLE `#__content` DROP COLUMN `sectionid`; +ALTER TABLE `#__content` DROP COLUMN `mask`; +ALTER TABLE `#__content` DROP COLUMN `parentid`; +ALTER TABLE `#__newsfeeds` DROP COLUMN `filename`; +ALTER TABLE `#__menu` DROP COLUMN `ordering`; +ALTER TABLE `#__session` DROP COLUMN `usertype`; +ALTER TABLE `#__users` DROP COLUMN `usertype`; +ALTER TABLE `#__updates` DROP COLUMN `categoryid`; + +UPDATE `#__extensions` SET protected = 0 WHERE +`name` = 'com_search' OR +`name` = 'mod_articles_archive' OR +`name` = 'mod_articles_latest' OR +`name` = 'mod_banners' OR +`name` = 'mod_feed' OR +`name` = 'mod_footer' OR +`name` = 'mod_users_latest' OR +`name` = 'mod_articles_category' OR +`name` = 'mod_articles_categories' OR +`name` = 'plg_content_pagebreak' OR +`name` = 'plg_content_pagenavigation' OR +`name` = 'plg_content_vote' OR +`name` = 'plg_editors_tinymce' OR +`name` = 'plg_system_p3p' OR +`name` = 'plg_user_contactcreator' OR +`name` = 'plg_user_profile'; + +DELETE FROM `#__extensions` WHERE `extension_id` = 800; + +ALTER TABLE `#__assets` ENGINE=InnoDB; +ALTER TABLE `#__associations` ENGINE=InnoDB; +ALTER TABLE `#__banners` ENGINE=InnoDB; +ALTER TABLE `#__banner_clients` ENGINE=InnoDB; +ALTER TABLE `#__banner_tracks` ENGINE=InnoDB; +ALTER TABLE `#__categories` ENGINE=InnoDB; +ALTER TABLE `#__contact_details` ENGINE=InnoDB; +ALTER TABLE `#__content` ENGINE=InnoDB; +ALTER TABLE `#__content_frontpage` ENGINE=InnoDB; +ALTER TABLE `#__content_rating` ENGINE=InnoDB; +ALTER TABLE `#__core_log_searches` ENGINE=InnoDB; +ALTER TABLE `#__extensions` ENGINE=InnoDB; +ALTER TABLE `#__finder_filters` ENGINE=InnoDB; +ALTER TABLE `#__finder_links` ENGINE=InnoDB; +ALTER TABLE `#__finder_links_terms0` ENGINE=InnoDB; +ALTER TABLE `#__finder_links_terms1` ENGINE=InnoDB; +ALTER TABLE `#__finder_links_terms2` ENGINE=InnoDB; +ALTER TABLE `#__finder_links_terms3` ENGINE=InnoDB; +ALTER TABLE `#__finder_links_terms4` ENGINE=InnoDB; +ALTER TABLE `#__finder_links_terms5` ENGINE=InnoDB; +ALTER TABLE `#__finder_links_terms6` ENGINE=InnoDB; +ALTER TABLE `#__finder_links_terms7` ENGINE=InnoDB; +ALTER TABLE `#__finder_links_terms8` ENGINE=InnoDB; +ALTER TABLE `#__finder_links_terms9` ENGINE=InnoDB; +ALTER TABLE `#__finder_links_termsa` ENGINE=InnoDB; +ALTER TABLE `#__finder_links_termsb` ENGINE=InnoDB; +ALTER TABLE `#__finder_links_termsc` ENGINE=InnoDB; +ALTER TABLE `#__finder_links_termsd` ENGINE=InnoDB; +ALTER TABLE `#__finder_links_termse` ENGINE=InnoDB; +ALTER TABLE `#__finder_links_termsf` ENGINE=InnoDB; +ALTER TABLE `#__finder_taxonomy` ENGINE=InnoDB; +ALTER TABLE `#__finder_taxonomy_map` ENGINE=InnoDB; +ALTER TABLE `#__finder_terms` ENGINE=InnoDB; +ALTER TABLE `#__finder_terms_common` ENGINE=InnoDB; +ALTER TABLE `#__finder_types` ENGINE=InnoDB; +ALTER TABLE `#__languages` ENGINE=InnoDB; +ALTER TABLE `#__menu` ENGINE=InnoDB; +ALTER TABLE `#__menu_types` ENGINE=InnoDB; +ALTER TABLE `#__messages` ENGINE=InnoDB; +ALTER TABLE `#__messages_cfg` ENGINE=InnoDB; +ALTER TABLE `#__modules` ENGINE=InnoDB; +ALTER TABLE `#__modules_menu` ENGINE=InnoDB; +ALTER TABLE `#__newsfeeds` ENGINE=InnoDB; +ALTER TABLE `#__overrider` ENGINE=InnoDB; +ALTER TABLE `#__redirect_links` ENGINE=InnoDB; +ALTER TABLE `#__schemas` ENGINE=InnoDB; +ALTER TABLE `#__session` ENGINE=InnoDB; +ALTER TABLE `#__template_styles` ENGINE=InnoDB; +ALTER TABLE `#__updates` ENGINE=InnoDB; +ALTER TABLE `#__update_sites` ENGINE=InnoDB; +ALTER TABLE `#__update_sites_extensions` ENGINE=InnoDB; +ALTER TABLE `#__users` ENGINE=InnoDB; +ALTER TABLE `#__usergroups` ENGINE=InnoDB; +ALTER TABLE `#__user_notes` ENGINE=InnoDB; +ALTER TABLE `#__user_profiles` ENGINE=InnoDB; +ALTER TABLE `#__user_usergroup_map` ENGINE=InnoDB; +ALTER TABLE `#__viewlevels` ENGINE=InnoDB; + +ALTER TABLE `#__newsfeeds` ADD COLUMN `description` text NOT NULL; +ALTER TABLE `#__newsfeeds` ADD COLUMN `version` int(10) unsigned NOT NULL DEFAULT '1'; +ALTER TABLE `#__newsfeeds` ADD COLUMN `hits` int(10) unsigned NOT NULL DEFAULT '0'; +ALTER TABLE `#__newsfeeds` ADD COLUMN `images` text NOT NULL; +ALTER TABLE `#__contact_details` ADD COLUMN `version` int(10) unsigned NOT NULL DEFAULT '1'; +ALTER TABLE `#__contact_details` ADD COLUMN `hits` int(10) unsigned NOT NULL DEFAULT '0'; +ALTER TABLE `#__banners` ADD COLUMN `created_by` int(10) unsigned NOT NULL DEFAULT '0'; +ALTER TABLE `#__banners` ADD COLUMN `created_by_alias` varchar(255) NOT NULL DEFAULT ''; +ALTER TABLE `#__banners` ADD COLUMN `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00'; +ALTER TABLE `#__banners` ADD COLUMN `modified_by` int(10) unsigned NOT NULL DEFAULT '0'; +ALTER TABLE `#__banners` ADD COLUMN `version` int(10) unsigned NOT NULL DEFAULT '1'; +ALTER TABLE `#__categories` ADD COLUMN `version` int(10) unsigned NOT NULL DEFAULT '1'; +UPDATE `#__assets` SET name=REPLACE( name, 'com_user.notes.category','com_users.category' ); +UPDATE `#__categories` SET extension=REPLACE( extension, 'com_user.notes.category','com_users.category' ); + +ALTER TABLE `#__finder_terms` ADD COLUMN `language` char(3) NOT NULL DEFAULT ''; +ALTER TABLE `#__finder_tokens` ADD COLUMN `language` char(3) NOT NULL DEFAULT ''; +ALTER TABLE `#__finder_tokens_aggregate` ADD COLUMN `language` char(3) NOT NULL DEFAULT ''; + +INSERT INTO `#__extensions` + (`name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) + VALUES + ('isis', 'template', 'isis', '', 1, 1, 1, 0, '{"name":"isis","type":"template","creationDate":"3\\/30\\/2012","author":"Kyle Ledbetter","copyright":"Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"","version":"1.0","description":"TPL_ISIS_XML_DESCRIPTION","group":""}', '{"templateColor":"","logoFile":""}', '', '', 0, '0000-00-00 00:00:00', 0, 0), + ('protostar', 'template', 'protostar', '', 0, 1, 1, 0, '{"name":"protostar","type":"template","creationDate":"4\\/30\\/2012","author":"Kyle Ledbetter","copyright":"Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"","version":"1.0","description":"TPL_PROTOSTAR_XML_DESCRIPTION","group":""}', '{"templateColor":"","logoFile":"","googleFont":"1","googleFontName":"Open+Sans","fluidContainer":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0), + ('beez3', 'template', 'beez3', '', 0, 1, 1, 0, '{"legacy":false,"name":"beez3","type":"template","creationDate":"25 November 2009","author":"Angie Radtke","copyright":"Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.","authorEmail":"a.radtke@derauftritt.de","authorUrl":"http:\\/\\/www.der-auftritt.de","version":"1.6.0","description":"TPL_BEEZ3_XML_DESCRIPTION","group":""}', '{"wrapperSmall":"53","wrapperLarge":"72","sitetitle":"","sitedescription":"","navposition":"center","templatecolor":"nature"}', '', '', 0, '0000-00-00 00:00:00', 0, 0); + +INSERT INTO `#__template_styles` (`template`, `client_id`, `home`, `title`, `params`) VALUES + ('protostar', 0, '0', 'protostar - Default', '{"templateColor":"","logoFile":"","googleFont":"1","googleFontName":"Open+Sans","fluidContainer":"0"}'), + ('isis', 1, '1', 'isis - Default', '{"templateColor":"","logoFile":""}'), + ('beez3', 0, '0', 'beez3 - Default', '{"wrapperSmall":53,"wrapperLarge":72,"logo":"","sitetitle":"","sitedescription":"","navposition":"center","bootstrap":"","templatecolor":"nature","headerImage":"","backgroundcolor":"#eee"}'); + +UPDATE `#__template_styles` +SET home = (CASE WHEN (SELECT count FROM (SELECT count(`id`) AS count + FROM `#__template_styles` + WHERE home = '1' + AND client_id = 1) as c) = 0 + THEN '1' + ELSE '0' + END) +WHERE template = 'isis' +AND home != '1'; + +UPDATE `#__template_styles` +SET home = 0 +WHERE template = 'bluestork'; + +INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES +(315, 'mod_stats_admin', 'module', 'mod_stats_admin', '', 1, 1, 1, 0, '{"name":"mod_stats_admin","type":"module","creationDate":"September 2012","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"MOD_STATS_XML_DESCRIPTION","group":""}', '{"serverinfo":"0","siteinfo":"0","counter":"0","increase":"0","cache":"1","cache_time":"900","cachemode":"static"}', '', '', 0, '0000-00-00 00:00:00', 0, 0); + +UPDATE `#__update_sites` +SET location = 'http://update.joomla.org/language/translationlist_3.xml' +WHERE location = 'http://update.joomla.org/language/translationlist.xml' +AND name = 'Accredited Joomla! Translations'; diff --git a/tests/unit/suites/libraries/cms/schema/stubs/mysql/3.2.0.sql b/tests/unit/suites/libraries/cms/schema/stubs/mysql/3.2.0.sql new file mode 100644 index 0000000000000..20efac2137959 --- /dev/null +++ b/tests/unit/suites/libraries/cms/schema/stubs/mysql/3.2.0.sql @@ -0,0 +1,93 @@ +/* Core 3.2 schema updates */ + +ALTER TABLE `#__content_types` ADD COLUMN `content_history_options` VARCHAR(5120) NOT NULL COMMENT 'JSON string for com_contenthistory options'; + +UPDATE `#__content_types` SET `content_history_options` = '{"formFile":"administrator\\/components\\/com_content\\/models\\/forms\\/article.xml", "hideFields":["asset_id","checked_out","checked_out_time","version"],"ignoreChanges":["modified_by", "modified", "checked_out", "checked_out_time", "version", "hits"],"convertToInt":["publish_up", "publish_down", "featured", "ordering"],"displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"} ]}' WHERE `type_alias` = 'com_content.article'; +UPDATE `#__content_types` SET `content_history_options` = '{"formFile":"administrator\\/components\\/com_contact\\/models\\/forms\\/contact.xml","hideFields":["default_con","checked_out","checked_out_time","version","xreference"],"ignoreChanges":["modified_by", "modified", "checked_out", "checked_out_time", "version", "hits"],"convertToInt":["publish_up", "publish_down", "featured", "ordering"], "displayLookup":[ {"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"} ] }' WHERE `type_alias` = 'com_contact.contact'; +UPDATE `#__content_types` SET `content_history_options` = '{"formFile":"administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml", "hideFields":["asset_id","checked_out","checked_out_time","version","lft","rgt","level","path","extension"], "ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", "hits", "path"],"convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}]}' WHERE `type_alias` IN ('com_content.category', 'com_contact.category', 'com_newsfeeds.category'); +UPDATE `#__content_types` SET `content_history_options` = '{"formFile":"administrator\\/components\\/com_newsfeeds\\/models\\/forms\\/newsfeed.xml","hideFields":["asset_id","checked_out","checked_out_time","version"],"ignoreChanges":["modified_by", "modified", "checked_out", "checked_out_time", "version", "hits"],"convertToInt":["publish_up", "publish_down", "featured", "ordering"],"displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}]}' WHERE `type_alias` = 'com_newsfeeds.newsfeed'; +UPDATE `#__content_types` SET `content_history_options` = '{"formFile":"administrator\\/components\\/com_tags\\/models\\/forms\\/tag.xml", "hideFields":["checked_out","checked_out_time","version", "lft", "rgt", "level", "path", "urls", "publish_up", "publish_down"],"ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", "hits", "path"],"convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}, {"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"}, {"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}]}' WHERE `type_alias` = 'com_tags.tag'; + +INSERT INTO `#__content_types` (`type_title`, `type_alias`, `table`, `rules`, `field_mappings`, `router`, `content_history_options`) VALUES +('Banner', 'com_banners.banner', '{"special":{"dbtable":"#__banners","key":"id","type":"Banner","prefix":"BannersTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}', '', '{"common":{"core_content_item_id":"id","core_title":"name","core_state":"published","core_alias":"alias","core_created_time":"created","core_modified_time":"modified","core_body":"description", "core_hits":"null","core_publish_up":"publish_up","core_publish_down":"publish_down","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"images", "core_urls":"link", "core_version":"version", "core_ordering":"ordering", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"catid", "core_xreference":"null", "asset_id":"null"}, "special":{"imptotal":"imptotal", "impmade":"impmade", "clicks":"clicks", "clickurl":"clickurl", "custombannercode":"custombannercode", "cid":"cid", "purchase_type":"purchase_type", "track_impressions":"track_impressions", "track_clicks":"track_clicks"}}', '', '{"formFile":"administrator\\/components\\/com_banners\\/models\\/forms\\/banner.xml", "hideFields":["checked_out","checked_out_time","version", "reset"],"ignoreChanges":["modified_by", "modified", "checked_out", "checked_out_time", "version", "imptotal", "impmade", "reset"], "convertToInt":["publish_up", "publish_down", "ordering"], "displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}, {"sourceColumn":"cid","targetTable":"#__banner_clients","targetColumn":"id","displayColumn":"name"}, {"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}]}'), +('Banners Category', 'com_banners.category', '{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}', '', '{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"}, "special": {"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}', '', '{"formFile":"administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml", "hideFields":["asset_id","checked_out","checked_out_time","version","lft","rgt","level","path","extension"], "ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", "hits", "path"], "convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}]}'), +('Banner Client', 'com_banners.client', '{"special":{"dbtable":"#__banner_clients","key":"id","type":"Client","prefix":"BannersTable"}}', '', '', '', '{"formFile":"administrator\\/components\\/com_banners\\/models\\/forms\\/client.xml", "hideFields":["checked_out","checked_out_time"], "ignoreChanges":["checked_out", "checked_out_time"], "convertToInt":[], "displayLookup":[]}'), +('User Notes', 'com_users.note', '{"special":{"dbtable":"#__user_notes","key":"id","type":"Note","prefix":"UsersTable"}}', '', '', '', '{"formFile":"administrator\\/components\\/com_users\\/models\\/forms\\/note.xml", "hideFields":["checked_out","checked_out_time", "publish_up", "publish_down"],"ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time"], "convertToInt":["publish_up", "publish_down"],"displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}, {"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}, {"sourceColumn":"user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}, {"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}]}'), +('User Notes Category', 'com_users.category', '{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}', '', '{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"}, "special":{"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}', '', '{"formFile":"administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml", "hideFields":["checked_out","checked_out_time","version","lft","rgt","level","path","extension"], "ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", "hits", "path"], "convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}, {"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}]}'); + +UPDATE `#__extensions` SET `params` = '{"template_positions_display":"0","upload_limit":"2","image_formats":"gif,bmp,jpg,jpeg,png","source_formats":"txt,less,ini,xml,js,php,css","font_formats":"woff,ttf,otf","compressed_formats":"zip"}' WHERE `extension_id` = 20; +UPDATE `#__extensions` SET `params` = '{"lineNumbers":"1","lineWrapping":"1","matchTags":"1","matchBrackets":"1","marker-gutter":"1","autoCloseTags":"1","autoCloseBrackets":"1","autoFocus":"1","theme":"default","tabmode":"indent"}' WHERE `extension_id` = 410; + +INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES +(30, 'com_contenthistory', 'component', 'com_contenthistory', '', 1, 1, 1, 0, '{"name":"com_contenthistory","type":"component","creationDate":"May 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"COM_CONTENTHISTORY_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(31, 'com_ajax', 'component', 'com_ajax', '', 1, 1, 1, 0, '{"name":"com_ajax","type":"component","creationDate":"August 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"COM_AJAX_DESC","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(32, 'com_postinstall', 'component', 'com_postinstall', '', 1, 1, 1, 1, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(105, 'FOF', 'library', 'fof', '', 0, 1, 1, 1, '{"legacy":false,"name":"FOF","type":"library","creationDate":"2013-10-08","author":"Nicholas K. Dionysopoulos \/ Akeeba Ltd","copyright":"(C)2011-2013 Nicholas K. Dionysopoulos","authorEmail":"nicholas@akeebabackup.com","authorUrl":"https:\/\/www.akeebabackup.com","version":"2.1.rc4","description":"Framework-on-Framework (FOF) - A rapid component development framework for Joomla!","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(448, 'plg_twofactorauth_totp', 'plugin', 'totp', 'twofactorauth', 0, 0, 1, 0, '{"name":"plg_twofactorauth_totp","type":"plugin","creationDate":"August 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"PLG_TWOFACTORAUTH_TOTP_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(449, 'plg_authentication_cookie', 'plugin', 'cookie', 'authentication', 0, 1, 1, 0, '{"name":"plg_authentication_cookie","type":"plugin","creationDate":"July 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"PLG_AUTH_COOKIE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), +(450, 'plg_twofactorauth_yubikey', 'plugin', 'yubikey', 'twofactorauth', 0, 0, 1, 0, '{"name":"plg_twofactorauth_yubikey","type":"plugin","creationDate":"Se[ptember 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"PLG_TWOFACTORAUTH_YUBIKEY_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0); + +INSERT INTO `#__menu` (`menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) VALUES +('main', 'com_postinstall', 'Post-installation messages', '', 'Post-installation messages', 'index.php?option=com_postinstall', 'component', 0, 1, 1, 32, 0, '0000-00-00 00:00:00', 0, 1, 'class:postinstall', 0, '', 45, 46, 0, '*', 1); + +ALTER TABLE `#__modules` ADD COLUMN `asset_id` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'FK to the #__assets table.' AFTER `id`; + +CREATE TABLE `#__postinstall_messages` ( + `postinstall_message_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `extension_id` bigint(20) NOT NULL DEFAULT '700' COMMENT 'FK to #__extensions', + `title_key` varchar(255) NOT NULL DEFAULT '' COMMENT 'Lang key for the title', + `description_key` varchar(255) NOT NULL DEFAULT '' COMMENT 'Lang key for description', + `action_key` varchar(255) NOT NULL DEFAULT '', + `language_extension` varchar(255) NOT NULL DEFAULT 'com_postinstall' COMMENT 'Extension holding lang keys', + `language_client_id` tinyint(3) NOT NULL DEFAULT '1', + `type` varchar(10) NOT NULL DEFAULT 'link' COMMENT 'Message type - message, link, action', + `action_file` varchar(255) DEFAULT '' COMMENT 'RAD URI to the PHP file containing action method', + `action` varchar(255) DEFAULT '' COMMENT 'Action method name or URL', + `condition_file` varchar(255) DEFAULT NULL COMMENT 'RAD URI to file holding display condition method', + `condition_method` varchar(255) DEFAULT NULL COMMENT 'Display condition method, must return boolean', + `version_introduced` varchar(50) NOT NULL DEFAULT '3.2.0' COMMENT 'Version when this message was introduced', + `enabled` tinyint(3) NOT NULL DEFAULT '1', + PRIMARY KEY (`postinstall_message_id`) +) DEFAULT CHARSET=utf8; + +INSERT INTO `#__postinstall_messages` (`extension_id`, `title_key`, `description_key`, `action_key`, `language_extension`, `language_client_id`, `type`, `action_file`, `action`, `condition_file`, `condition_method`, `version_introduced`, `enabled`) VALUES +(700, 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_TITLE', 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_BODY', 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_ACTION', 'plg_twofactorauth_totp', 1, 'action', 'site://plugins/twofactorauth/totp/postinstall/actions.php', 'twofactorauth_postinstall_action', 'site://plugins/twofactorauth/totp/postinstall/actions.php', 'twofactorauth_postinstall_condition', '3.2.0', 1), +(700, 'COM_CPANEL_MSG_EACCELERATOR_TITLE', 'COM_CPANEL_MSG_EACCELERATOR_BODY', 'COM_CPANEL_MSG_EACCELERATOR_BUTTON', 'com_cpanel', 1, 'action', 'admin://components/com_admin/postinstall/eaccelerator.php', 'admin_postinstall_eaccelerator_action', 'admin://components/com_admin/postinstall/eaccelerator.php', 'admin_postinstall_eaccelerator_condition', '3.2.0', 1); + +CREATE TABLE IF NOT EXISTS `#__ucm_history` ( + `version_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `ucm_item_id` int(10) unsigned NOT NULL, + `ucm_type_id` int(10) unsigned NOT NULL, + `version_note` varchar(255) NOT NULL DEFAULT '' COMMENT 'Optional version name', + `save_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `editor_user_id` int(10) unsigned NOT NULL DEFAULT '0', + `character_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Number of characters in this version.', + `sha1_hash` varchar(50) NOT NULL DEFAULT '' COMMENT 'SHA1 hash of the version_data column.', + `version_data` mediumtext NOT NULL COMMENT 'json-encoded string of version data', + `keep_forever` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=auto delete; 1=keep', + PRIMARY KEY (`version_id`), + KEY `idx_ucm_item_id` (`ucm_type_id`,`ucm_item_id`), + KEY `idx_save_date` (`save_date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +ALTER TABLE `#__users` ADD COLUMN `otpKey` varchar(1000) NOT NULL DEFAULT '' COMMENT 'Two factor authentication encrypted keys'; +ALTER TABLE `#__users` ADD COLUMN `otep` varchar(1000) NOT NULL DEFAULT '' COMMENT 'One time emergency passwords'; + +CREATE TABLE IF NOT EXISTS `#__user_keys` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `user_id` varchar(255) NOT NULL, + `token` varchar(255) NOT NULL, + `series` varchar(255) NOT NULL, + `invalid` tinyint(4) NOT NULL, + `time` varchar(200) NOT NULL, + `uastring` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `series` (`series`), + UNIQUE KEY `series_2` (`series`), + UNIQUE KEY `series_3` (`series`), + KEY `user_id` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +/* Update bad params for two cpanel modules */ + +UPDATE `#__modules` SET `params` = REPLACE(`params`, '"bootstrap_size":"1"', '"bootstrap_size":"0"') WHERE `id` IN (3,4); diff --git a/tests/unit/suites/libraries/cms/schema/stubs/mysql/3.5.0-2016-03-01.sql b/tests/unit/suites/libraries/cms/schema/stubs/mysql/3.5.0-2016-03-01.sql new file mode 100644 index 0000000000000..38ab528a6cadd --- /dev/null +++ b/tests/unit/suites/libraries/cms/schema/stubs/mysql/3.5.0-2016-03-01.sql @@ -0,0 +1,5 @@ +ALTER TABLE `#__redirect_links` DROP INDEX `idx_link_old`; +ALTER TABLE `#__redirect_links` MODIFY `old_url` VARCHAR(2048) NOT NULL; +ALTER TABLE `#__redirect_links` MODIFY `new_url` VARCHAR(2048) NOT NULL; +ALTER TABLE `#__redirect_links` MODIFY `referer` VARCHAR(2048) NOT NULL; +ALTER TABLE `#__redirect_links` ADD INDEX `idx_old_url` (`old_url`(100)); diff --git a/tests/unit/suites/libraries/cms/schema/stubs/postgresql/3.0.0.sql b/tests/unit/suites/libraries/cms/schema/stubs/postgresql/3.0.0.sql new file mode 100644 index 0000000000000..9a6e816e7276e --- /dev/null +++ b/tests/unit/suites/libraries/cms/schema/stubs/postgresql/3.0.0.sql @@ -0,0 +1 @@ +-- Placeholder file for database changes for version 3.0.0 \ No newline at end of file diff --git a/tests/unit/suites/libraries/cms/schema/stubs/postgresql/3.2.0.sql b/tests/unit/suites/libraries/cms/schema/stubs/postgresql/3.2.0.sql new file mode 100644 index 0000000000000..82047821dfbb2 --- /dev/null +++ b/tests/unit/suites/libraries/cms/schema/stubs/postgresql/3.2.0.sql @@ -0,0 +1,121 @@ +/* Core 3.2 schema updates */ + +ALTER TABLE "#__content_types" ADD COLUMN "content_history_options" varchar(5120) DEFAULT NULL; + +UPDATE "#__content_types" SET "content_history_options" = '{"formFile":"administrator\\/components\\/com_content\\/models\\/forms\\/article.xml", "hideFields":["asset_id","checked_out","checked_out_time","version"],"ignoreChanges":["modified_by", "modified", "checked_out", "checked_out_time", "version", "hits"],"convertToInt":["publish_up", "publish_down", "featured", "ordering"],"displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"} ]}' WHERE "type_alias" = 'com_content.article'; +UPDATE "#__content_types" SET "content_history_options" = '{"formFile":"administrator\\/components\\/com_contact\\/models\\/forms\\/contact.xml","hideFields":["default_con","checked_out","checked_out_time","version","xreference"],"ignoreChanges":["modified_by", "modified", "checked_out", "checked_out_time", "version", "hits"],"convertToInt":["publish_up", "publish_down", "featured", "ordering"], "displayLookup":[ {"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"} ] }' WHERE "type_alias" = 'com_contact.contact'; +UPDATE "#__content_types" SET "content_history_options" = '{"formFile":"administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml", "hideFields":["asset_id","checked_out","checked_out_time","version","lft","rgt","level","path","extension"], "ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", "hits", "path"],"convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}]}' WHERE "type_alias" IN ('com_content.category', 'com_contact.category', 'com_newsfeeds.category'); +UPDATE "#__content_types" SET "content_history_options" = '{"formFile":"administrator\\/components\\/com_newsfeeds\\/models\\/forms\\/newsfeed.xml","hideFields":["asset_id","checked_out","checked_out_time","version"],"ignoreChanges":["modified_by", "modified", "checked_out", "checked_out_time", "version", "hits"],"convertToInt":["publish_up", "publish_down", "featured", "ordering"],"displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}]}' WHERE "type_alias" = 'com_newsfeeds.newsfeed'; +UPDATE "#__content_types" SET "content_history_options" = '{"formFile":"administrator\\/components\\/com_tags\\/models\\/forms\\/tag.xml", "hideFields":["checked_out","checked_out_time","version", "lft", "rgt", "level", "path", "urls", "publish_up", "publish_down"],"ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", "hits", "path"],"convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}, {"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"}, {"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}]}' WHERE "type_alias" = 'com_tags.tag'; + +INSERT INTO "#__content_types" ("type_title", "type_alias", "table", "rules", "field_mappings", "router", "content_history_options") VALUES +('Banner', 'com_banners.banner', '{"special":{"dbtable":"#__banners","key":"id","type":"Banner","prefix":"BannersTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}', '', '{"common":{"core_content_item_id":"id","core_title":"name","core_state":"published","core_alias":"alias","core_created_time":"created","core_modified_time":"modified","core_body":"description", "core_hits":"null","core_publish_up":"publish_up","core_publish_down":"publish_down","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"images", "core_urls":"link", "core_version":"version", "core_ordering":"ordering", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"catid", "core_xreference":"null", "asset_id":"null"}, "special":{"imptotal":"imptotal", "impmade":"impmade", "clicks":"clicks", "clickurl":"clickurl", "custombannercode":"custombannercode", "cid":"cid", "purchase_type":"purchase_type", "track_impressions":"track_impressions", "track_clicks":"track_clicks"}}', '', '{"formFile":"administrator\\/components\\/com_banners\\/models\\/forms\\/banner.xml", "hideFields":["checked_out","checked_out_time","version", "reset"],"ignoreChanges":["modified_by", "modified", "checked_out", "checked_out_time", "version", "imptotal", "impmade", "reset"], "convertToInt":["publish_up", "publish_down", "ordering"], "displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}, {"sourceColumn":"cid","targetTable":"#__banner_clients","targetColumn":"id","displayColumn":"name"}, {"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}]}'), +('Banners Category', 'com_banners.category', '{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}', '', '{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"}, "special": {"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}', '', '{"formFile":"administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml", "hideFields":["asset_id","checked_out","checked_out_time","version","lft","rgt","level","path","extension"], "ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", "hits", "path"], "convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}]}'), +('Banner Client', 'com_banners.client', '{"special":{"dbtable":"#__banner_clients","key":"id","type":"Client","prefix":"BannersTable"}}', '', '', '', '{"formFile":"administrator\\/components\\/com_banners\\/models\\/forms\\/client.xml", "hideFields":["checked_out","checked_out_time"], "ignoreChanges":["checked_out", "checked_out_time"], "convertToInt":[], "displayLookup":[]}'), +('User Notes', 'com_users.note', '{"special":{"dbtable":"#__user_notes","key":"id","type":"Note","prefix":"UsersTable"}}', '', '', '', '{"formFile":"administrator\\/components\\/com_users\\/models\\/forms\\/note.xml", "hideFields":["checked_out","checked_out_time", "publish_up", "publish_down"],"ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time"], "convertToInt":["publish_up", "publish_down"],"displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}, {"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}, {"sourceColumn":"user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}, {"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}]}'), +('User Notes Category', 'com_users.category', '{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}', '', '{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"}, "special":{"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}', '', '{"formFile":"administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml", "hideFields":["checked_out","checked_out_time","version","lft","rgt","level","path","extension"], "ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", "hits", "path"], "convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}, {"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}]}'); + +UPDATE "#__extensions" SET "params" = '{"template_positions_display":"0","upload_limit":"2","image_formats":"gif,bmp,jpg,jpeg,png","source_formats":"txt,less,ini,xml,js,php,css","font_formats":"woff,ttf,otf","compressed_formats":"zip"}' WHERE "extension_id" = 20; +UPDATE "#__extensions" SET "params" = '{"lineNumbers":"1","lineWrapping":"1","matchTags":"1","matchBrackets":"1","marker-gutter":"1","autoCloseTags":"1","autoCloseBrackets":"1","autoFocus":"1","theme":"default","tabmode":"indent"}' WHERE "extension_id" = 410; + +INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") VALUES +(30, 'com_contenthistory', 'component', 'com_contenthistory', '', 1, 1, 1, 0, '{"name":"com_contenthistory","type":"component","creationDate":"May 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"COM_CONTENTHISTORY_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(31, 'com_ajax', 'component', 'com_ajax', '', 1, 1, 1, 0, '{"name":"com_ajax","type":"component","creationDate":"August 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"COM_AJAX_DESC","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(32, 'com_postinstall', 'component', 'com_postinstall', '', 1, 1, 1, 1, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(105, 'FOF', 'library', 'fof', '', 0, 1, 1, 1, '{"legacy":false,"name":"FOF","type":"library","creationDate":"2013-10-08","author":"Nicholas K. Dionysopoulos \/ Akeeba Ltd","copyright":"(C)2011-2013 Nicholas K. Dionysopoulos","authorEmail":"nicholas@akeebabackup.com","authorUrl":"https:\/\/www.akeebabackup.com","version":"2.1.rc4","description":"Framework-on-Framework (FOF) - A rapid component development framework for Joomla!","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(448, 'plg_twofactorauth_totp', 'plugin', 'totp', 'twofactorauth', 0, 0, 1, 0, '{"name":"plg_twofactorauth_totp","type":"plugin","creationDate":"August 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"PLG_TWOFACTORAUTH_TOTP_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(449, 'plg_authentication_cookie', 'plugin', 'cookie', 'authentication', 0, 1, 1, 0, '{"name":"plg_authentication_cookie","type":"plugin","creationDate":"July 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"PLG_AUTH_COOKIE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(450, 'plg_twofactorauth_yubikey', 'plugin', 'yubikey', 'twofactorauth', 0, 0, 1, 0, '{"name":"plg_twofactorauth_yubikey","type":"plugin","creationDate":"Se[ptember 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"PLG_TWOFACTORAUTH_YUBIKEY_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); + +INSERT INTO "#__menu" ("menutype", "title", "alias", "note", "path", "link", "type", "published", "parent_id", "level", "component_id", "checked_out", "checked_out_time", "browserNav", "access", "img", "template_style_id", "params", "lft", "rgt", "home", "language", "client_id") VALUES +('main', 'com_postinstall', 'Post-installation messages', '', 'Post-installation messages', 'index.php?option=com_postinstall', 'component', 0, 1, 1, 32, 0, '1970-01-01 00:00:00', 0, 1, 'class:postinstall', 0, '', 45, 46, 0, '*', 1); + +ALTER TABLE "#__modules" ADD COLUMN "asset_id" bigint DEFAULT 0 NOT NULL; + +CREATE TABLE "#__postinstall_messages" ( + "postinstall_message_id" serial NOT NULL, + "extension_id" bigint NOT NULL DEFAULT 700, + "title_key" varchar(255) NOT NULL DEFAULT '', + "description_key" varchar(255) NOT NULL DEFAULT '', + "action_key" varchar(255) NOT NULL DEFAULT '', + "language_extension" varchar(255) NOT NULL DEFAULT 'com_postinstall', + "language_client_id" smallint NOT NULL DEFAULT 1, + "type" varchar(10) NOT NULL DEFAULT 'link', + "action_file" varchar(255) DEFAULT '', + "action" varchar(255) DEFAULT '', + "condition_file" varchar(255) DEFAULT NULL, + "condition_method" varchar(255) DEFAULT NULL, + "version_introduced" varchar(255) NOT NULL DEFAULT '3.2.0', + "enabled" smallint NOT NULL DEFAULT 1, + PRIMARY KEY ("postinstall_message_id") +); + +COMMENT ON COLUMN "#__postinstall_messages"."extension_id" IS 'FK to jos_extensions'; +COMMENT ON COLUMN "#__postinstall_messages"."title_key" IS 'Lang key for the title'; +COMMENT ON COLUMN "#__postinstall_messages"."description_key" IS 'Lang key for description'; +COMMENT ON COLUMN "#__postinstall_messages"."language_extension" IS 'Extension holding lang keys'; +COMMENT ON COLUMN "#__postinstall_messages"."type" IS 'Message type - message, link, action'; +COMMENT ON COLUMN "#__postinstall_messages"."action_file" IS 'RAD URI to the PHP file containing action method'; +COMMENT ON COLUMN "#__postinstall_messages"."action" IS 'Action method name or URL'; +COMMENT ON COLUMN "#__postinstall_messages"."condition_file" IS 'RAD URI to file holding display condition method'; +COMMENT ON COLUMN "#__postinstall_messages"."condition_method" IS 'Display condition method, must return boolean'; +COMMENT ON COLUMN "#__postinstall_messages"."version_introduced" IS 'Version when this message was introduced'; + +INSERT INTO "#__postinstall_messages" ("extension_id", "title_key", "description_key", "action_key", "language_extension", "language_client_id", "type", "action_file", "action", "condition_file", "condition_method", "version_introduced", "enabled") VALUES +(700, 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_TITLE', 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_BODY', 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_ACTION', 'plg_twofactorauth_totp', 1, 'action', 'site://plugins/twofactorauth/totp/postinstall/actions.php', 'twofactorauth_postinstall_action', 'site://plugins/twofactorauth/totp/postinstall/actions.php', 'twofactorauth_postinstall_condition', '3.2.0', 1), +(700, 'COM_CPANEL_MSG_EACCELERATOR_TITLE', 'COM_CPANEL_MSG_EACCELERATOR_BODY', 'COM_CPANEL_MSG_EACCELERATOR_BUTTON', 'com_cpanel', 1, 'action', 'admin://components/com_admin/postinstall/eaccelerator.php', 'admin_postinstall_eaccelerator_action', 'admin://components/com_admin/postinstall/eaccelerator.php', 'admin_postinstall_eaccelerator_condition', '3.2.0', 1); + +CREATE TABLE "#__ucm_history" ( + "version_id" serial NOT NULL, + "ucm_item_id" integer NOT NULL, + "ucm_type_id" integer NOT NULL, + "version_note" varchar(255) NOT NULL DEFAULT '', + "save_date" timestamp with time zone NOT NULL DEFAULT '1970-01-01 00:00:00', + "editor_user_id" integer NOT NULL DEFAULT 0, + "character_count" integer NOT NULL DEFAULT 0, + "sha1_hash" varchar(50) NOT NULL DEFAULT '', + "version_data" text NOT NULL, + "keep_forever" smallint NOT NULL DEFAULT 0, + PRIMARY KEY ("version_id") +); +CREATE INDEX "#__ucm_history_idx_ucm_item_id" ON "#__ucm_history" ("ucm_type_id", "ucm_item_id"); +CREATE INDEX "#__ucm_history_idx_save_date" ON "#__ucm_history" ("save_date"); + +COMMENT ON COLUMN "#__ucm_history"."version_note" IS 'Optional version name'; +COMMENT ON COLUMN "#__ucm_history"."character_count" IS 'Number of characters in this version.'; +COMMENT ON COLUMN "#__ucm_history"."sha1_hash" IS 'SHA1 hash of the version_data column.'; +COMMENT ON COLUMN "#__ucm_history"."version_data" IS 'json-encoded string of version data'; +COMMENT ON COLUMN "#__ucm_history"."keep_forever" IS '0=auto delete; 1=keep'; + +ALTER TABLE "#__users" ADD COLUMN "otpKey" varchar(1000) DEFAULT '' NOT NULL; +ALTER TABLE "#__users" ADD COLUMN "otep" varchar(1000) DEFAULT '' NOT NULL; + +CREATE TABLE "#__user_keys" ( + "id" serial NOT NULL, + "user_id" varchar(255) NOT NULL, + "token" varchar(255) NOT NULL, + "series" varchar(255) NOT NULL, + "invalid" smallint NOT NULL, + "time" varchar(200) NOT NULL, + "uastring" varchar(255) NOT NULL, + PRIMARY KEY ("id"), + CONSTRAINT "#__user_keys_series" UNIQUE ("series"), + CONSTRAINT "#__user_keys_series_2" UNIQUE ("series"), + CONSTRAINT "#__user_keys_series_3" UNIQUE ("series") +); +CREATE INDEX "#__user_keys_idx_user_id" ON "#__user_keys" ("user_id"); + +/* Queries below sync the schema to MySQL where able without causing errors */ + +ALTER TABLE "#__contentitem_tag_map" ADD COLUMN "type_id" integer NOT NULL; + +CREATE INDEX "#__contentitem_tag_map_idx_tag_type" ON "#__contentitem_tag_map" ("tag_id", "type_id"); +CREATE INDEX "#__contentitem_tag_map_idx_type" ON "#__contentitem_tag_map" ("type_id"); + +COMMENT ON COLUMN "#__contentitem_tag_map"."type_id" IS 'PK from the content_type table'; + +ALTER TABLE "#__session" DROP COLUMN "usertype"; + +ALTER TABLE "#__updates" DROP COLUMN "categoryid"; + +ALTER TABLE "#__users" DROP COLUMN "usertype"; diff --git a/tests/unit/suites/libraries/cms/schema/stubs/postgresql/3.5.0-2016-03-01.sql b/tests/unit/suites/libraries/cms/schema/stubs/postgresql/3.5.0-2016-03-01.sql new file mode 100644 index 0000000000000..804efa3edd1dc --- /dev/null +++ b/tests/unit/suites/libraries/cms/schema/stubs/postgresql/3.5.0-2016-03-01.sql @@ -0,0 +1,5 @@ +ALTER TABLE "#__redirect_links" DROP CONSTRAINT "#__redirect_links_idx_link_old"; +ALTER TABLE "#__redirect_links" ALTER COLUMN "old_url" TYPE character varying(2048); +ALTER TABLE "#__redirect_links" ALTER COLUMN "new_url" TYPE character varying(2048); +ALTER TABLE "#__redirect_links" ALTER COLUMN "referer" TYPE character varying(2048); +CREATE INDEX "#__idx_link_old" ON "#__redirect_links" ("old_url"); diff --git a/tests/unit/suites/libraries/cms/schema/stubs/sqlazure/3.0.0.sql b/tests/unit/suites/libraries/cms/schema/stubs/sqlazure/3.0.0.sql new file mode 100644 index 0000000000000..b2aa72ce27783 --- /dev/null +++ b/tests/unit/suites/libraries/cms/schema/stubs/sqlazure/3.0.0.sql @@ -0,0 +1 @@ +# Placeholder file for database changes for version 3.0.0 diff --git a/tests/unit/suites/libraries/cms/schema/stubs/sqlazure/3.2.0.sql b/tests/unit/suites/libraries/cms/schema/stubs/sqlazure/3.2.0.sql new file mode 100644 index 0000000000000..5da55b5b7413e --- /dev/null +++ b/tests/unit/suites/libraries/cms/schema/stubs/sqlazure/3.2.0.sql @@ -0,0 +1,162 @@ +/* Core 3.2 schema updates */ + +ALTER TABLE [#__content_types] ADD [content_history_options] [nvarchar] (max) NULL; + +UPDATE [#__content_types] SET [content_history_options] = '{"formFile":"administrator\/components\/com_content\/models\/forms\/article.xml", "hideFields":["asset_id","checked_out","checked_out_time","version"],"ignoreChanges":["modified_by", "modified", "checked_out", "checked_out_time", "version", "hits"],"convertToInt":["publish_up", "publish_down", "featured", "ordering"],"displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"} ]}' WHERE [type_alias] = 'com_content.article'; +UPDATE [#__content_types] SET [content_history_options] = '{"formFile":"administrator\/components\/com_contact\/models\/forms\/contact.xml","hideFields":["default_con","checked_out","checked_out_time","version","xreference"],"ignoreChanges":["modified_by", "modified", "checked_out", "checked_out_time", "version", "hits"],"convertToInt":["publish_up", "publish_down", "featured", "ordering"], "displayLookup":[ {"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"} ] }' WHERE [type_alias] = 'com_contact.contact'; +UPDATE [#__content_types] SET [content_history_options] = '{"formFile":"administrator\/components\/com_categories\/models\/forms\/category.xml", "hideFields":["asset_id","checked_out","checked_out_time","version","lft","rgt","level","path","extension"], "ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", "hits", "path"],"convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}]}' WHERE [type_alias] IN ('com_content.category', 'com_contact.category', 'com_newsfeeds.category'); +UPDATE [#__content_types] SET [content_history_options] = '{"formFile":"administrator\/components\/com_newsfeeds\/models\/forms\/newsfeed.xml","hideFields":["asset_id","checked_out","checked_out_time","version"],"ignoreChanges":["modified_by", "modified", "checked_out", "checked_out_time", "version", "hits"],"convertToInt":["publish_up", "publish_down", "featured", "ordering"],"displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}]}' WHERE [type_alias] = 'com_newsfeeds.newsfeed'; +UPDATE [#__content_types] SET [content_history_options] = '{"formFile":"administrator\/components\/com_tags\/models\/forms\/tag.xml", "hideFields":["checked_out","checked_out_time","version", "lft", "rgt", "level", "path", "urls", "publish_up", "publish_down"],"ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", "hits", "path"],"convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}, {"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"}, {"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}]}' WHERE [type_alias] = 'com_tags.tag'; + +INSERT [#__content_types] ([type_title], [type_alias], [table], [rules], [field_mappings], [router], [content_history_options]) +SELECT 'Banner', 'com_banners.banner', '{"special":{"dbtable":"#__banners","key":"id","type":"Banner","prefix":"BannersTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}', '', '{"common":{"core_content_item_id":"id","core_title":"name","core_state":"published","core_alias":"alias","core_created_time":"created","core_modified_time":"modified","core_body":"description", "core_hits":"null","core_publish_up":"publish_up","core_publish_down":"publish_down","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"images", "core_urls":"link", "core_version":"version", "core_ordering":"ordering", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"catid", "core_xreference":"null", "asset_id":"null"}, "special":{"imptotal":"imptotal", "impmade":"impmade", "clicks":"clicks", "clickurl":"clickurl", "custombannercode":"custombannercode", "cid":"cid", "purchase_type":"purchase_type", "track_impressions":"track_impressions", "track_clicks":"track_clicks"}}', '', '{"formFile":"administrator\/components\/com_banners\/models\/forms\/banner.xml", "hideFields":["checked_out","checked_out_time","version", "reset"],"ignoreChanges":["modified_by", "modified", "checked_out", "checked_out_time", "version", "imptotal", "impmade", "reset"], "convertToInt":["publish_up", "publish_down", "ordering"], "displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}, {"sourceColumn":"cid","targetTable":"#__banner_clients","targetColumn":"id","displayColumn":"name"}, {"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}]}' +UNION ALL +SELECT 'Banners Category', 'com_banners.category', '{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}', '', '{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"}, "special": {"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}', '', '{"formFile":"administrator\/components\/com_categories\/models\/forms\/category.xml", "hideFields":["asset_id","checked_out","checked_out_time","version","lft","rgt","level","path","extension"], "ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", "hits", "path"], "convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}]}' +UNION ALL +SELECT 'Banner Client', 'com_banners.client', '{"special":{"dbtable":"#__banner_clients","key":"id","type":"Client","prefix":"BannersTable"}}', '', '', '', '{"formFile":"administrator\/components\/com_banners\/models\/forms\/client.xml", "hideFields":["checked_out","checked_out_time"], "ignoreChanges":["checked_out", "checked_out_time"], "convertToInt":[], "displayLookup":[]}' +UNION ALL +SELECT 'User Notes', 'com_users.note', '{"special":{"dbtable":"#__user_notes","key":"id","type":"Note","prefix":"UsersTable"}}', '', '', '', '{"formFile":"administrator\/components\/com_users\/models\/forms\/note.xml", "hideFields":["checked_out","checked_out_time", "publish_up", "publish_down"],"ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time"], "convertToInt":["publish_up", "publish_down"],"displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}, {"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}, {"sourceColumn":"user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}, {"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}]}' +UNION ALL +SELECT 'User Notes Category', 'com_users.category', '{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}', '', '{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"}, "special":{"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}', '', '{"formFile":"administrator\/components\/com_categories\/models\/forms\/category.xml", "hideFields":["checked_out","checked_out_time","version","lft","rgt","level","path","extension"], "ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", "hits", "path"], "convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}, {"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}]}'; + +UPDATE [#__extensions] SET [params] = '{"template_positions_display":"0","upload_limit":"2","image_formats":"gif,bmp,jpg,jpeg,png","source_formats":"txt,less,ini,xml,js,php,css","font_formats":"woff,ttf,otf","compressed_formats":"zip"}' WHERE [extension_id] = 20; +UPDATE [#__extensions] SET [params] = '{"lineNumbers":"1","lineWrapping":"1","matchTags":"1","matchBrackets":"1","marker-gutter":"1","autoCloseTags":"1","autoCloseBrackets":"1","autoFocus":"1","theme":"default","tabmode":"indent"}' WHERE [extension_id] = 410; + +SET IDENTITY_INSERT [#__extensions] ON; + +INSERT [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) +SELECT 30, 'com_contenthistory', 'component', 'com_contenthistory', '', 1, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 31, 'com_ajax', 'component', 'com_ajax', '', 1, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 32, 'com_postinstall', 'component', 'com_postinstall', '', 1, 1, 1, 1, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 105, 'FOF', 'library', 'fof', '', 0, 1, 1, 1, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 448, 'plg_twofactorauth_totp', 'plugin', 'totp', 'twofactorauth', 0, 0, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 449, 'plg_authentication_cookie', 'plugin', 'cookie', 'authentication', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0 +UNION ALL +SELECT 450, 'plg_twofactorauth_yubikey', 'plugin', 'yubikey', 'twofactorauth', 0, 0, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0; + +SET IDENTITY_INSERT [#__extensions] OFF; + +INSERT INTO [#__menu] ([menutype], [title], [alias], [note], [path], [link], [type], [published], [parent_id], [level], [component_id], [checked_out], [checked_out_time], [browserNav], [access], [img], [template_style_id], [params], [lft], [rgt], [home], [language], [client_id]) +SELECT 'menu', 'com_postinstall', 'Post-installation messages', '', 'Post-installation messages', 'index.php?option=com_postinstall', 'component', 0, 1, 1, 32, 0, '1900-01-01 00:00:00', 0, 1, 'class:postinstall', 0, '', 45, 46, 0, '*', 1; + +ALTER TABLE [#__modules] ADD [asset_id] [bigint] NOT NULL DEFAULT 0; + +CREATE TABLE [#__postinstall_messages] ( + [postinstall_message_id] [bigint] IDENTITY(1,1) NOT NULL, + [extension_id] [bigint] NOT NULL DEFAULT 700, + [title_key] [nvarchar](255) NOT NULL DEFAULT '', + [description_key] [nvarchar](255) NOT NULL DEFAULT '', + [action_key] [nvarchar](255) NOT NULL DEFAULT '', + [language_extension] [nvarchar](255) NOT NULL DEFAULT 'com_postinstall', + [language_client_id] [int] NOT NULL DEFAULT 1, + [type] [nvarchar](10) NOT NULL DEFAULT 'link', + [action_file] [nvarchar](255) DEFAULT '', + [action] [nvarchar](255) DEFAULT '', + [condition_file] [nvarchar](255) DEFAULT NULL, + [condition_method] [nvarchar](255) DEFAULT NULL, + [version_introduced] [nvarchar](50) NOT NULL DEFAULT '3.2.0', + [enabled] [int] NOT NULL DEFAULT 1, + CONSTRAINT [PK_#__postinstall_message_id] PRIMARY KEY CLUSTERED + ( + [postinstall_message_id] ASC + )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY]; + +INSERT INTO [#__postinstall_messages] ([extension_id], [title_key], [description_key], [action_key], [language_extension], [language_client_id], [type], [action_file], [action], [condition_file], [condition_method], [version_introduced], [enabled]) +SELECT 700, 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_TITLE', 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_BODY', 'PLG_TWOFACTORAUTH_TOTP_POSTINSTALL_ACTION', 'plg_twofactorauth_totp', 1, 'action', 'site://plugins/twofactorauth/totp/postinstall/actions.php', 'twofactorauth_postinstall_action', 'site://plugins/twofactorauth/totp/postinstall/actions.php', 'twofactorauth_postinstall_condition', '3.2.0', 1 +UNION ALL +SELECT 700, 'COM_CPANEL_MSG_EACCELERATOR_TITLE', 'COM_CPANEL_MSG_EACCELERATOR_BODY', 'COM_CPANEL_MSG_EACCELERATOR_BUTTON', 'com_cpanel', 1, 'action', 'admin://components/com_admin/postinstall/eaccelerator.php', 'admin_postinstall_eaccelerator_action', 'admin://components/com_admin/postinstall/eaccelerator.php', 'admin_postinstall_eaccelerator_condition', '3.2.0', 1; + +CREATE TABLE [#__ucm_history] ( + [version_id] [bigint] IDENTITY(1,1) NOT NULL, + [ucm_item_id] [bigint] NOT NULL, + [ucm_type_id] [bigint] NOT NULL, + [version_note] [nvarchar](255) NOT NULL DEFAULT '', + [save_date] [datetime] NOT NULL DEFAULT '1900-01-01T00:00:00.000', + [editor_user_id] [bigint] NOT NULL DEFAULT 0, + [character_count] [bigint] NOT NULL DEFAULT 0, + [sha1_hash] [nvarchar](50) NOT NULL DEFAULT '', + [version_data] [nvarchar](max) NOT NULL, + [keep_forever] [smallint] NOT NULL DEFAULT 0, + CONSTRAINT [PK_#__ucm_history_version_id] PRIMARY KEY CLUSTERED + ( + [version_id] ASC + )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]; + +CREATE NONCLUSTERED INDEX [idx_ucm_item_id] ON [#__ucm_history] +( + [ucm_type_id] ASC, + [ucm_item_id] ASC +)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +CREATE NONCLUSTERED INDEX [idx_save_date] ON [#__ucm_history] +( + [save_date] ASC +)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +ALTER TABLE [#__users] ADD [otpKey] [nvarchar](1000) NOT NULL DEFAULT ''; + +ALTER TABLE [#__users] ADD [otep] [nvarchar](1000) NOT NULL DEFAULT ''; + +CREATE TABLE [#__user_keys] ( + [id] [bigint] IDENTITY(1,1) NOT NULL, + [user_id] [nvarchar](255) NOT NULL, + [token] [nvarchar](255) NOT NULL, + [series] [nvarchar](255) NOT NULL, + [invalid] [smallint] NOT NULL, + [time] [nvarchar](200) NOT NULL, + [uastring] [nvarchar](255) NOT NULL, + CONSTRAINT [PK_#__user_keys_id] PRIMARY KEY CLUSTERED + ( + [id] ASC + )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY], + CONSTRAINT [#__user_keys$series] UNIQUE NONCLUSTERED + ( + [series] ASC + )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY], + CONSTRAINT [#__user_keys$series_2] UNIQUE NONCLUSTERED + ( + [series] ASC + )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY], + CONSTRAINT [#__user_keys$series_3] UNIQUE NONCLUSTERED + ( + [series] ASC + )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY]; + +CREATE NONCLUSTERED INDEX [user_id] ON [#__user_keys] +( + [user_id] ASC +)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +/* Queries below sync the schema to MySQL where able without causing errors */ + +ALTER TABLE [#__contentitem_tag_map] ADD [type_id] [int] NOT NULL; + +CREATE NONCLUSTERED INDEX [idx_type] ON [#__contentitem_tag_map] +( + [type_id] ASC +)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); + +ALTER TABLE [#__newsfeeds] ALTER COLUMN [alias] [nvarchar](255) NOT NULL; + +ALTER TABLE [#__overrider] ALTER COLUMN [constant] [nvarchar](255) NOT NULL; +ALTER TABLE [#__overrider] ALTER COLUMN [string] [nvarchar](max) NOT NULL; +ALTER TABLE [#__overrider] ALTER COLUMN [file] [nvarchar](255) NOT NULL; + +ALTER TABLE [#__session] DROP COLUMN [usertype]; + +ALTER TABLE [#__ucm_content] ALTER COLUMN [core_metadata] [nvarchar](2048) NOT NULL; + +ALTER TABLE [#__updates] DROP COLUMN [categoryid]; +ALTER TABLE [#__updates] ALTER COLUMN [infourl] [nvarchar](max) NOT NULL; + +/* Update bad params for two cpanel modules */ + +UPDATE [#__modules] SET [params] = REPLACE([params], '"bootstrap_size":"1"', '"bootstrap_size":"0"') WHERE [id] IN (3,4); diff --git a/tests/unit/suites/libraries/cms/schema/stubs/sqlazure/3.5.0-2016-03-01.sql b/tests/unit/suites/libraries/cms/schema/stubs/sqlazure/3.5.0-2016-03-01.sql new file mode 100644 index 0000000000000..e0a8f66108285 --- /dev/null +++ b/tests/unit/suites/libraries/cms/schema/stubs/sqlazure/3.5.0-2016-03-01.sql @@ -0,0 +1,8 @@ +ALTER TABLE [#__redirect_links] DROP CONSTRAINT [#__redirect_links$idx_link_old]; +ALTER TABLE [#__redirect_links] ALTER COLUMN [old_url] [nvarchar](2048) NOT NULL; +ALTER TABLE [#__redirect_links] ALTER COLUMN [new_url] [nvarchar](2048) NOT NULL; +ALTER TABLE [#__redirect_links] ALTER COLUMN [referer] [nvarchar](2048) NOT NULL; +CREATE NONCLUSTERED INDEX [idx_old_url] ON [#__redirect_links] +( + [old_url] ASC +)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); diff --git a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageApcTest.php b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageApcTest.php index 5e96718be345e..ece53115fc9ea 100644 --- a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageApcTest.php +++ b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageApcTest.php @@ -9,24 +9,9 @@ /** * Test class for JCacheStorageApc. - * Generated by PHPUnit on 2009-10-08 at 21:44:48. - * - * @package Joomla.UnitTest - * @subpackage Cache - * @since 11.1 */ -class JCacheStorageApcTest extends PHPUnit_Framework_TestCase +class JCacheStorageApcTest extends TestCaseCache { - /** - * @var JCacheStorageApc - */ - protected $object; - - /** - * @var boolean - */ - protected $extensionAvailable; - /** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. @@ -35,31 +20,28 @@ class JCacheStorageApcTest extends PHPUnit_Framework_TestCase */ protected function setUp() { + if (!JCacheStorageApc::isSupported() || $this->isBlacklisted('apc')) + { + $this->markTestSkipped('The APC cache handler is not supported on this system.'); + } + parent::setUp(); - $this->extensionAvailable = extension_loaded('apc'); + $this->handler = new JCacheStorageApc; - if ($this->extensionAvailable) - { - $this->object = JCacheStorage::getInstance('apc'); - } - else - { - $this->markTestSkipped('This caching method is not supported on this system.'); - } + // Override the lifetime because the JCacheStorage API multiplies it by 60 (converts minutes to seconds) + $this->handler->_lifetime = 2; } /** - * Testing isSupported(). + * Overrides TestCaseCache::testCacheTimeout to skip the test due to an environment incompatibility * - * @return void + * @testdox The cache handler correctly handles expired cache data + * + * @ticket https://bugs.php.net/bug.php?id=58084 */ - public function testIsSupported() + public function testCacheTimeout() { - $this->assertEquals( - $this->extensionAvailable, - $this->object->isSupported(), - 'Claims APC is not loaded.' - ); + $this->markTestSkipped('The APC cache TTL is not working in a single process/request. See https://bugs.php.net/bug.php?id=58084'); } } diff --git a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageApcuTest.php b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageApcuTest.php index d656b8cc6cfa4..82cb12a405381 100644 --- a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageApcuTest.php +++ b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageApcuTest.php @@ -10,18 +10,8 @@ /** * Test class for JCacheStorageApcu. */ -class JCacheStorageApcuTest extends PHPUnit_Framework_TestCase +class JCacheStorageApcuTest extends TestCaseCache { - /** - * @var JCacheStorageApcu - */ - protected $object; - - /** - * @var boolean - */ - protected $extensionAvailable; - /** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. @@ -30,31 +20,28 @@ class JCacheStorageApcuTest extends PHPUnit_Framework_TestCase */ protected function setUp() { + if (!JCacheStorageApcu::isSupported() || $this->isBlacklisted('apcu')) + { + $this->markTestSkipped('The APCu cache handler is not supported on this system.'); + } + parent::setUp(); - $this->extensionAvailable = JCacheStorageApcu::isSupported(); + $this->handler = new JCacheStorageApcu; - if ($this->extensionAvailable) - { - $this->object = JCacheStorage::getInstance('apcu'); - } - else - { - $this->markTestSkipped('This caching method is not supported on this system.'); - } + // Override the lifetime because the JCacheStorage API multiplies it by 60 (converts minutes to seconds) + $this->handler->_lifetime = 2; } /** - * Testing isSupported(). + * Overrides TestCaseCache::testCacheTimeout to skip the test due to an environment incompatibility * - * @return void + * @testdox The cache handler correctly handles expired cache data + * + * @ticket https://bugs.php.net/bug.php?id=58084 */ - public function testIsSupported() + public function testCacheTimeout() { - $this->assertEquals( - $this->extensionAvailable, - $this->object->isSupported(), - 'Claims APCu is not loaded.' - ); + $this->markTestSkipped('The APC cache TTL is not working in a single process/request. See https://bugs.php.net/bug.php?id=58084'); } } diff --git a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageCacheliteTest.php b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageCacheliteTest.php index 9fcd91d501d22..529c7b7ff3e1f 100644 --- a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageCacheliteTest.php +++ b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageCacheliteTest.php @@ -1,71 +1,71 @@ isBlacklisted('cachelite')) + { + $this->markTestSkipped('The Cache_Lite cache handler is not supported on this system.'); + } + parent::setUp(); - $this->extensionAvailable = class_exists('Cache_Lite'); + $this->handler = new JCacheStorageCachelite(array('caching' => true, 'cachebase' => JPATH_TESTS . '/tmp')); - if ($this->extensionAvailable) - { - $options = array( - 'cachebase' => JPATH_TESTS . '/tmp', - 'caching' => true - ); - - $this->object = JCacheStorage::getInstance('cachelite', $options); - } - else - { - $this->markTestSkipped('This caching method is not supported on this system.'); - } + // Override the lifetime because the JCacheStorage API multiplies it by 60 (converts minutes to seconds) + $this->handler->_lifetime = 2; } /** - * Testing isSupported(). + * Tears down the fixture, for example, close a network connection. + * This method is called after a test is executed. * * @return void */ - public function testIsSupported() + protected function tearDown() + { + parent::tearDown(); + + // Reset the Cache_Lite instance. + TestReflection::setValue('JCacheStorageCachelite', 'CacheLiteInstance', null); + } + + /** + * Overrides TestCaseCache::testCacheTimeout to deal with the adapter's stored time values in this test + * + * @testdox The cache handler correctly handles expired cache data + * + * @medium + */ + public function testCacheTimeout() { - $this->assertEquals( - $this->extensionAvailable, - $this->object->isSupported(), - 'Claims Cache_Lite is not loaded.' - ); + /** @var Cache_Lite $cacheLiteInstance */ + $cacheLiteInstance = TestReflection::getValue('JCacheStorageCachelite', 'CacheLiteInstance'); + $cacheLiteInstance->_lifeTime = 2; + + $data = 'testData'; + + $this->assertTrue($this->handler->store($this->id, $this->group, $data), 'Initial Store Failed'); + + sleep(5); + + $this->assertFalse($this->handler->get($this->id, $this->group), 'No data should be returned from the cache store when expired.'); } } diff --git a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageFileTest.php b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageFileTest.php index ef8a8d641dea0..0e8228d3d28dc 100644 --- a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageFileTest.php +++ b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageFileTest.php @@ -9,198 +9,47 @@ /** * Test class for JCacheStorageFile. - * - * @package Joomla.UnitTest - * @subpackage Cache - * - * @since 11.1 */ -class JCacheStorageFileTest extends PHPUnit_Framework_TestCase +class JCacheStorageFileTest extends TestCaseCache { - /** - * @var JCacheStorageFile - */ - protected $object; - - /** - * @var boolean - */ - protected $extensionAvailable; - /** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. * - * @return void + * @return void */ protected function setUp() { - parent::setUp(); - - $this->extensionAvailable = is_writable(JPATH_BASE . '/cache'); - - if ($this->extensionAvailable) - { - $this->object = JCacheStorage::getInstance('file', array('cachebase' => JPATH_BASE . '/cache')); - } - else + if (!JCacheStorageFile::isSupported() || $this->isBlacklisted('file')) { - $this->markTestSkipped('This caching method is not supported on this system.'); + $this->markTestSkipped('The file cache handler is not supported on this system.'); } - } - /** - * Test Cases for get() / store() - * - * @return array - */ - public function casesStore() - { - return array( - 'souls' => array( - 42, - '_testing', - 'And this is the cache that tries men\'s souls', - true, - ), - 'again' => array( - 43, - '_testing', - 'The summer coder and the sunshine developer.', - true, - ), - ); - } + parent::setUp(); - /** - * Testing store() and get() - * - * @param string $id element ID - * @param string $group group - * @param string $data string to be cached - * @param string $checktime True to verify cache time expiration threshold - * - * @return void - * - * @dataProvider casesStore - */ - public function testStoreAndGet($id, $group, $data, $checktime) - { - $this->assertTrue( - $this->object->store($id, $group, $data), - 'Should store the data properly' - ); + $this->handler = new JCacheStorageFile(array('cachebase' => JPATH_CACHE)); - $this->assertEquals( - $data, - $this->object->get($id, $group, $checktime), - 'Should retrieve the data properly' - ); + // Override the lifetime because the JCacheStorage API multiplies it by 60 (converts minutes to seconds) + $this->handler->_lifetime = 2; } /** - * Test... + * Overrides TestCaseCache::testCacheTimeout to deal with the adapter's stored time values in this test * - * @return void - */ - public function testGetAll() - { - $this->markTestIncomplete('This test has not been implemented yet.'); - } - - /** - * Testing remove() - * - * @return void - */ - public function testRemove() - { - $this->object->store(42, '_testing', 'And this is the cache that tries men\'s souls'); - - $this->assertEquals( - 'And this is the cache that tries men\'s souls', - $this->object->get(42, '_testing', true) - ); - - $this->assertTrue( - $this->object->remove(42, '_testing') - ); - - $this->assertFalse( - $this->object->get(42, '_testing', true) - ); - } - - /** - * Test clean() + * @testdox The cache handler correctly handles expired cache data * - * @return void + * @medium */ - public function testClean() + public function testCacheTimeout() { - $this->object->store(42, '_testing', 'And this is the cache that tries men\'s souls'); - $this->object->store(43, '_testing', 'The summer coder and the sunshine developer.'); - $this->object->store(44, '_nottesting', 'Now is the time for all good developers to cry'); - $this->object->store(45, '_testing', 'Do not go gentle into that good night'); - - $this->assertEquals( - 'And this is the cache that tries men\'s souls', - $this->object->get(42, '_testing', true) - ); - - $this->assertTrue( - $this->object->clean('_testing', 'group') - ); + $data = 'testData'; - $this->assertFalse( - $this->object->get(42, '_testing', true) - ); + $this->assertTrue($this->handler->store($this->id, $this->group, $data), 'Initial Store Failed'); - $this->assertFalse( - $this->object->get(43, '_testing', true) - ); + sleep(5); - $this->assertEquals( - 'Now is the time for all good developers to cry', - $this->object->get(44, '_nottesting', true) - ); + $this->handler->_now = time(); - $this->assertFalse( - $this->object->get(45, '_testing', true) - ); - - $this->assertTrue( - (bool) $this->object->clean('_testing', 'notgroup') - ); - - $this->assertFalse( - $this->object->get(44, '_nottesting', true) - ); - } - - /** - * Test gc() - * - * @return void - */ - public function testGc() - { - $this->assertTrue( - (bool) $this->object->gc() - ); - } - - /** - * Testing isSupported(). - * - * @return void - */ - public function testIsSupported() - { - $this->assertEquals( - $this->extensionAvailable, - $this->object->isSupported(), - 'Claims File is not loaded.' - ); + $this->assertFalse($this->handler->get($this->id, $this->group), 'No data should be returned from the cache store when expired.'); } } diff --git a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageMainTest.php b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageMainTest.php deleted file mode 100644 index d1e1a0e197f49..0000000000000 --- a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageMainTest.php +++ /dev/null @@ -1,260 +0,0 @@ -saveFactoryState(); - - JFactory::$application = $this->getMockCmsApp(); - JFactory::$session = $this->getMockSession(); - - require_once dirname(__DIR__) . '/controller/JCacheControllerRaw.php'; - } - - /** - * Tears down the fixture, for example, close a network connection. - * This method is called after a test is executed. - * - * @return void - * - * @since 3.4 - */ - protected function tearDown() - { - $this->restoreFactoryState(); - - parent::tearDown(); - } - - /** - * Test provider - * - * @return array - */ - public static function provider() - { - static $ret = array(); - - if (empty($ret)) - { - $names = JCache::getStores(); - - foreach ($names as $name) - { - // Make sure the adapter is not in our blacklist; this means the adapter cannot be tested or there is an internal failure - if (!in_array($name, array('redis'))) - { - $ret["$name adapter"] = array($name); - } - } - } - - return $ret; - } - - /** - * Test... - * - * @param string $store The store. - * - * @return void - * - * @dataProvider provider - */ - public function testCacheHit($store) - { - $id = 'randomTestID'; - $group = '_testing'; - $data = 'testData'; - - $cache = JCache::getInstance('', array('storage' => $store)); - $cache->setCaching(true); - $this->assertTrue($cache->store($data, $id, $group), 'Initial Store Failed'); - unset($cache); - - $cache = JCache::getInstance('', array('storage' => $store)); - $cache->setCaching(true); - $new = $cache->get($id, $group); - $this->assertSame($new, $data, 'Expected: ' . $data . ' Actual: ' . $new); - unset($cache); - } - - /** - * Test... - * - * @param string $store The store. - * - * @return void - * - * @dataProvider provider - */ - public function testCacheMiss($store) - { - $id = 'randomTestID2423423'; - $group = '_testing'; - $data = 'testData'; - - $cache = JCache::getInstance('', array('storage' => $store)); - $cache->setCaching(true); - $new = $cache->get($id, $group); - $this->assertFalse($new, 'Expected: false Actual: ' . $new); - unset($cache); - } - - /** - * Test... - * - * @medium - * - * @dataProvider provider - * - * @param string $store The store. - * - * @return void - */ - public function testCacheTimeout($store) - { - $id = 'randomTestID'; - $group = '_testing'; - $data = 'testData'; - - $cache = JCache::getInstance('', array('storage' => $store)); - $cache->setCaching(true); - $cache->setLifeTime(2); - $this->assertTrue($cache->store($data, $id, $group), 'Initial Store Failed'); - unset($cache); - - sleep(5); - - $cache = JCache::getInstance('', array('storage' => $store)); - $cache->setLifeTime(2); - $new = $cache->get($id, $group); - $this->assertFalse($new, 'Expected: false Actual: ' . ((string) $new)); - unset($cache); - } - - /** - * Test... - * - * @param string $store The store. - * - * @return void - * - * @dataProvider provider - */ - public function testCacheRemove($store) - { - $id = 'randomTestID'; - $group = '_testing'; - $data = 'testData'; - - $cache = JCache::getInstance('', array('storage' => $store)); - $cache->setCaching(true); - $this->assertTrue($cache->store($data, $id, $group), 'Initial Store Failed'); - unset($cache); - - $cache = JCache::getInstance('', array('storage' => $store)); - $cache->setCaching(true); - $test = $cache->remove($id, $group); - $this->assertTrue($test, 'Removal Failed'); - unset($cache); - - $cache = JCache::getInstance('', array('storage' => $store)); - $cache->setCaching(true); - $new = $cache->get($id, $group); - $this->assertFalse($new, 'Expected: false Actual: ' . ((string) $new)); - unset($cache); - } - - /** - * Test... - * - * @param string $store The store. - * - * @return void - * - * @dataProvider provider - */ - public function testCacheClearGroup($store) - { - $id = 'randomTestID'; - $group = '_testing'; - $data = 'testData'; - - $cache = JCache::getInstance('', array('storage' => $store)); - $cache->setCaching(true); - $this->assertTrue($cache->store($data, $id, $group), 'Initial Store Failed'); - unset($cache); - - $cache = JCache::getInstance('', array('storage' => $store)); - $cache->setCaching(true); - $this->assertTrue($cache->clean($group), 'Clean Failed'); - unset($cache); - - $cache = JCache::getInstance('', array('storage' => $store)); - $cache->setCaching(true); - $new = $cache->get($id, $group); - $this->assertFalse($new, 'Expected: false Actual: ' . ((string) $new)); - unset($cache); - } - - /** - * Test... - * - * @param string $store The store. - * - * @return void - * - * @dataProvider provider - */ - public function testCacheClearNotGroup($store) - { - $id = 'randomTestID'; - $group = '_testing'; - $data = 'testData'; - $cache = JCache::getInstance('', array('storage' => $store)); - $cache->setCaching(true); - $this->assertTrue($cache->store($data, $id, $group), 'Initial Store Failed'); - unset($cache); - - $cache = JCache::getInstance('', array('storage' => $store)); - $cache->setCaching(true); - $this->assertTrue((bool) $cache->clean($group, 'notgroup'), 'Clean Failed'); - unset($cache); - - $cache = JCache::getInstance('', array('storage' => $store)); - $cache->setCaching(true); - $new = $cache->get($id, $group); - $this->assertSame($new, $data, 'Expected: ' . $data . ' Actual: ' . ((string) $new)); - unset($cache); - } -} diff --git a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageMemcacheTest.php b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageMemcacheTest.php index e16597c564e7f..808874895976f 100644 --- a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageMemcacheTest.php +++ b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageMemcacheTest.php @@ -9,23 +9,9 @@ /** * Test class for JCacheStorageMemcache. - * - * @package Joomla.UnitTest - * @subpackage Cache - * @since 11.1 */ -class JCacheStorageMemcacheTest extends PHPUnit_Framework_TestCase +class JCacheStorageMemcacheTest extends TestCaseCache { - /** - * @var JCacheStorageMemcache - */ - protected $object; - - /** - * @var boolean - */ - protected $extensionAvailable; - /** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. @@ -34,54 +20,16 @@ class JCacheStorageMemcacheTest extends PHPUnit_Framework_TestCase */ protected function setUp() { - $memcachetest = false; - - if (extension_loaded('memcache') || class_exists('Memcache')) + if (!JCacheStorageMemcache::isSupported() || $this->isBlacklisted('memcache')) { - $config = JFactory::getConfig(); - $host = $config->get('memcache_server_host', 'localhost'); - $port = $config->get('memcache_server_port', 11211); - - $memcache = new Memcache; - $memcachetest = @$memcache->connect($host, $port); + $this->markTestSkipped('The Memcache cache handler is not supported on this system.'); } - $this->extensionAvailable = $memcachetest; - - if ($this->extensionAvailable) - { - $this->object = JCacheStorage::getInstance('memcache'); - } - else - { - $this->markTestSkipped('This caching method is not supported on this system.'); - } - } + parent::setUp(); - /** - * Testing gc(). - * - * @return void - */ - public function testGc() - { - $this->assertTrue( - $this->object->gc(), - 'Should return default true' - ); - } + $this->handler = new JCacheStorageMemcache; - /** - * Testing isSupported(). - * - * @return void - */ - public function testIsSupported() - { - $this->assertEquals( - $this->extensionAvailable, - $this->object->isSupported(), - 'Claims Memcache is not loaded.' - ); + // Override the lifetime because the JCacheStorage API multiplies it by 60 (converts minutes to seconds) + $this->handler->_lifetime = 2; } } diff --git a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageMemcachedTest.php b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageMemcachedTest.php index 3e86e70278b7c..046bebcb65374 100644 --- a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageMemcachedTest.php +++ b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageMemcachedTest.php @@ -9,23 +9,9 @@ /** * Test class for JCacheStorageMemcached. - * - * @package Joomla.UnitTest - * @subpackage Cache - * @since 11.1 */ -class JCacheStorageMemcachedTest extends TestCase +class JCacheStorageMemcachedTest extends TestCaseCache { - /** - * @var JCacheStorageMemcached - */ - protected $object; - - /** - * @var boolean - */ - protected $extensionAvailable; - /** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. @@ -34,68 +20,16 @@ class JCacheStorageMemcachedTest extends TestCase */ protected function setUp() { - $memcachedtest = false; - - if (extension_loaded('memcached') || class_exists('Memcached')) - { - $config = JFactory::getConfig(); - $host = $config->get('memcached_server_host', 'localhost'); - $port = $config->get('memcached_server_port', 11211); - - $memcached = new Memcached; - $memcachedtest = @$memcached->addServer($host, $port); - } - - $this->extensionAvailable = $memcachedtest; - - $this->saveFactoryState(); - - if ($this->extensionAvailable) - { - JFactory::$session = $this->getMockSession(); - $this->object = JCacheStorage::getInstance('memcached'); - } - else + if (!JCacheStorageMemcached::isSupported() || $this->isBlacklisted('memcached')) { - $this->markTestSkipped('This caching method is not supported on this system.'); + $this->markTestSkipped('The Memcached cache handler is not supported on this system.'); } - } - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - * - * @return void - */ - protected function tearDown() - { - $this->restoreFactoryState(); - } + parent::setUp(); - /** - * Testing gc(). - * - * @return void - */ - public function testGc() - { - $this->assertTrue( - $this->object->gc(), - 'Should return default true' - ); - } + $this->handler = new JCacheStorageMemcached; - /** - * Testing isSupported(). - * - * @return void - */ - public function testIsSupported() - { - $this->assertEquals( - $this->extensionAvailable, - $this->object->isSupported(), - 'Claims Memcache is not loaded.' - ); + // Override the lifetime because the JCacheStorage API multiplies it by 60 (converts minutes to seconds) + $this->handler->_lifetime = 2; } } diff --git a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageRedisTest.php b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageRedisTest.php index 1e555b3ecd553..eb554d64e4ccb 100644 --- a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageRedisTest.php +++ b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageRedisTest.php @@ -9,75 +9,27 @@ /** * Test class for JCacheStorageRedis. - * - * @package Joomla.UnitTest - * @subpackage Cache - * @since 3.4 */ -class JCacheStorageRedisTest extends TestCase +class JCacheStorageRedisTest extends TestCaseCache { - /** - * @var JCacheStorageRedis - */ - protected $object; - - /** - * @var boolean - */ - protected $extensionAvailable; - /** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. * * @return void - * - * @since 3.4 */ protected function setUp() { - parent::setUp(); - - $this->saveFactoryState(); - - JFactory::$application = $this->getMockCmsApp(); - - $this->extensionAvailable = class_exists('Redis'); - - if ($this->extensionAvailable) - { - $this->object = JCacheStorage::getInstance('redis'); - } - else + if (!JCacheStorageRedis::isSupported() || $this->isBlacklisted('redis')) { - $this->markTestSkipped('This caching method is not supported on this system.'); + $this->markTestSkipped('The Redis cache handler is not supported on this system.'); } - } - /** - * Tears down the fixture, for example, close a network connection. - * This method is called after a test is executed. - * - * @return void - * - * @since 3.4 - */ - protected function tearDown() - { - $this->restoreFactoryState(); - } + parent::setUp(); - /** - * Testing isSupported(). - * - * @return void - */ - public function testIsSupported() - { - $this->assertEquals( - $this->extensionAvailable, - $this->object->isSupported(), - 'Claims APC is not loaded.' - ); + $this->handler = new JCacheStorageRedis; + + // Override the lifetime because the JCacheStorage API multiplies it by 60 (converts minutes to seconds) + $this->handler->_lifetime = 2; } } diff --git a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageWincacheTest.php b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageWincacheTest.php index e02cfc07e70a4..d126b3362d72e 100644 --- a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageWincacheTest.php +++ b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageWincacheTest.php @@ -1,31 +1,17 @@ extensionAvailable = extension_loaded('wincache') && function_exists('wincache_ucache_get') && !strcmp(ini_get('wincache.ucenabled'), '1'); - - if ($this->extensionAvailable) + if (!JCacheStorageWincache::isSupported() || $this->isBlacklisted('wincache')) { - $this->object = JCacheStorage::getInstance('wincache'); + $this->markTestSkipped('The WinCache cache handler is not supported on this system.'); } - else - { - $this->markTestSkipped('This caching method is not supported on this system.'); - } - } - /** - * Testing isSupported(). - * - * @return void - */ - public function testIsSupported() - { - $this->assertEquals( - $this->extensionAvailable, - $this->object->isSupported(), - 'Claims Wincache is not loaded.' - ); - } + parent::setUp(); - /** - * Testing lock(). - * - * @return void - */ - public function testLock() - { - $this->assertFalse( - $this->object->lock(), - 'Should return default false' - ); - } + $this->handler = new JCacheStorageWincache; - /** - * Testing unlock(). - * - * @return void - */ - public function testUnlock() - { - $this->assertFalse( - $this->object->unlock(), - 'Should return default false' - ); + // Override the lifetime because the JCacheStorage API multiplies it by 60 (converts minutes to seconds) + $this->handler->_lifetime = 2; } } diff --git a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageXCacheTest.php b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageXCacheTest.php deleted file mode 100644 index 389bc9872ab41..0000000000000 --- a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageXCacheTest.php +++ /dev/null @@ -1,129 +0,0 @@ -extensionAvailable = $xcachetest; - - if ($this->extensionAvailable) - { - $this->object = JCacheStorage::getInstance('xcache'); - } - else - { - $this->markTestSkipped('This caching method is not supported on this system.'); - } - } - - /** - * Testing gc(). - * - * @return void - */ - public function testGc() - { - $this->assertTrue( - $this->object->gc(), - 'Should return default true' - ); - } - - /** - * Testing isSupported(). - * - * @return void - */ - public function testIsSupported() - { - $this->assertEquals( - $this->extensionAvailable, - $this->object->isSupported(), - 'Claims Wincache is not loaded.' - ); - } - - /** - * Testing lock(). - * - * @return void - */ - public function testLock() - { - $this->assertFalse( - $this->object->lock(), - 'Should return default false' - ); - } - - /** - * Testing unlock(). - * - * @return void - */ - public function testUnlock() - { - $this->assertFalse( - $this->object->unlock(), - 'Should return default false' - ); - } -} diff --git a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageXcacheTest.php b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageXcacheTest.php new file mode 100644 index 0000000000000..f8bdbdf52e966 --- /dev/null +++ b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageXcacheTest.php @@ -0,0 +1,35 @@ +isBlacklisted('xcache')) + { + $this->markTestSkipped('The XCache cache handler is not supported on this system.'); + } + + parent::setUp(); + + $this->handler = new JCacheStorageXcache; + + // Override the lifetime because the JCacheStorage API multiplies it by 60 (converts minutes to seconds) + $this->handler->_lifetime = 2; + } +} diff --git a/tests/unit/suites/libraries/joomla/user/JUserHelperTest.php b/tests/unit/suites/libraries/joomla/user/JUserHelperTest.php index 1a3b6a0997c4b..43810ac131de3 100644 --- a/tests/unit/suites/libraries/joomla/user/JUserHelperTest.php +++ b/tests/unit/suites/libraries/joomla/user/JUserHelperTest.php @@ -52,6 +52,7 @@ protected function setUp() protected function tearDown() { $this->restoreFactoryState(); + TestReflection::setValue('JPluginHelper', 'plugins', null); parent::tearDown(); } diff --git a/tests/unit/tmp/.gitignore b/tests/unit/tmp/.gitignore index 2f05f0e7bc237..d6b7ef32c8478 100644 --- a/tests/unit/tmp/.gitignore +++ b/tests/unit/tmp/.gitignore @@ -1,5 +1,2 @@ -/cache/*.php -/cache/_testing -/media -/themes -/error.* +* +!.gitignore