diff --git a/.appveyor.yml b/.appveyor.yml index d8fb063b7af86..7bbd2ee4f0c3d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -33,13 +33,13 @@ install: $VC = "vc14" $PHPBuild = "x64" } - - cinst -y sqlite + - appveyor-retry cinst -y sqlite - cd C:\tools\php # Get the MSSQL DLL's - ps: >- If ($env:PHP -eq "1") { If ($env:php_ver_target -eq "5.6") { - appveyor DownloadFile https://files.nette.org/misc/php-sqlsrv.zip + appveyor-retry appveyor DownloadFile https://cdn.joomla.org/ci/php-sqlsrv.zip 7z x -y php-sqlsrv.zip > $null copy SQLSRV\php_sqlsrv_56_nts.dll ext\php_sqlsrv_nts.dll copy SQLSRV\php_pdo_sqlsrv_56_nts.dll ext\php_pdo_sqlsrv_nts.dll @@ -83,7 +83,7 @@ install: If ($env:PHP -eq "1") { If ($env:php_ver_target -eq "5.6") {$wincache = "1.3.7.12"} Else {$wincache = "2.0.0.8"} cd c:\tools\php\ext - appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip + appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip 7z x -y php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip > $null Remove-Item C:\tools\php\ext* -include .zip cd c:\tools\php} diff --git a/.gitignore b/.gitignore index bbfb1deaa049f..fe2b19d07b093 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,16 @@ phpdoc-* # Install from Web plugin # /plugins/installer/webinstaller +# Languages # +administrator/language/* +!administrator/language/en-GB +administrator/manifests/packages/* +!administrator/manifests/packages/pkg_en-GB.xml +!administrator/language/overrides/index.html +language/* +!language/en-GB +!language/overrides/index.html + # OSX # ._* .Spotlight-V100 @@ -95,9 +105,13 @@ Desktop.ini /libraries/vendor/paragonie/random_compat/other /libraries/vendor/paragonie/random_compat/CHANGELOG.md /libraries/vendor/paragonie/random_compat/ERRATA.md +/libraries/vendor/paragonie/random_compat/RATIONALE.md /libraries/vendor/paragonie/random_compat/README.md /libraries/vendor/paragonie/random_compat/SECURITY.md +/libraries/vendor/paragonie/random_compat/build-phar.sh /libraries/vendor/paragonie/random_compat/composer.json +/libraries/vendor/paragonie/random_compat/psalm-autoload.php +/libraries/vendor/paragonie/random_compat/psalm.xml /libraries/vendor/paragonie/random_compat/tests /libraries/vendor/phpmailer/phpmailer/docs /libraries/vendor/phpmailer/phpmailer/examples diff --git a/.travis.yml b/.travis.yml index 8595f2f766792..14dae27f2374f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,10 @@ env: matrix: fast_finish: true include: + - 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: 7.1 + 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: 5.3 env: INSTALL_APC="yes" - php: 5.4 @@ -21,27 +25,6 @@ matrix: env: INSTALL_APCU="yes" - php: 5.6 env: 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: 7.1 - 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 - sudo: true - dist: trusty - group: edge # until the next update - addons: - apt: - packages: - - mysql-server-5.6 - - mysql-client-core-5.6 - - mysql-client-5.6 - services: - - mysql - - postgresql - - redis-server - env: INSTALL_APCU_BC_BETA="no" INSTALL_MEMCACHE="no" INSTALL_MEMCACHED="no" # Disabled items that currently do not work in travis-ci hhvm - allow_failures: - - php: hhvm services: - memcache diff --git a/README.md b/README.md index 00e0c5964b458..2b631d9f72d89 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ What is this? --------------------- * This is a Joomla! 3.x installation/upgrade package. * Joomla's [Official website](https://www.joomla.org). -* Joomla! 3.7 [version history](https://docs.joomla.org/Joomla_3.7_version_history). +* Joomla! 3.7 [version history](https://docs.joomla.org/Special:MyLanguage/Joomla_3.7_version_history). * Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/master). What is Joomla? @@ -26,20 +26,20 @@ What is Joomla? Is Joomla! for you? --------------------- -* Joomla! is [the right solution for most content web projects](https://docs.joomla.org/Portal:Learn_More). +* Joomla! is [the right solution for most content web projects](https://docs.joomla.org/Special:MyLanguage/Portal:Learn_More). * View Joomla's [core features here](https://www.joomla.org/core-features.html). * Try it out for yourself in our [online demo](https://demo.joomla.org). How to find a Joomla! translation? --------------------- * Repository of [accredited language packs](https://community.joomla.org/translations.html). -* You can also [add languages](https://docs.joomla.org/J3.x:Setup_a_Multilingual_Site/Installing_New_Language) directly to your website via your Joomla! administration panel. -* Learn how to [setup a Multilingual Joomla! Site](https://docs.joomla.org/J3.x:Setup_a_Multilingual_Site) +* You can also [add languages](https://docs.joomla.org/Special:MyLanguage/J3.x:Setup_a_Multilingual_Site/Installing_New_Language) directly to your website via your Joomla! administration panel. +* Learn how to [setup a Multilingual Joomla! Site](https://docs.joomla.org/Special:MyLanguage/J3.x:Setup_a_Multilingual_Site) Learn Joomla! --------------------- -* Read ['Getting Started with Joomla!'](https://docs.joomla.org/J3.x:Getting_Started_with_Joomla!) to learn the basics. -* Before installing, read the ['Beginners' Guide'](https://docs.joomla.org/Portal:Beginners). +* Read ['Getting Started with Joomla!'](https://docs.joomla.org/Special:MyLanguage/J3.x:Getting_Started_with_Joomla!) to learn the basics. +* Before installing, read the ['Beginners' Guide'](https://docs.joomla.org/Special:MyLanguage/Portal:Beginners). What are the benefits of Joomla? --------------------- @@ -51,13 +51,13 @@ Is it easy to change the layout display? --------------------- * The layout is controlled by templates that you can edit. * There are a lot of ready-made professional templates that you can download. -* Template management information is [available here](https://docs.joomla.org/Portal:Template_Management). +* Template management information is [available here](https://docs.joomla.org/Special:MyLanguage/Portal:Template_Management). Ready to install Joomla? --------------------- * Check the [minimum requirements](https://downloads.joomla.org/technical-requirements). -* How do you [install Joomla](https://docs.joomla.org/J3.x:Installing_Joomla)? -* You could start your Joomla! experience by [building your site on a local test server](https://docs.joomla.org/Installing_Joomla_locally). +* How do you [install Joomla](https://docs.joomla.org/Special:MyLanguage/J3.x:Installing_Joomla)? +* You could start your Joomla! experience by [building your site on a local test server](https://docs.joomla.org/Special:MyLanguage/Installing_Joomla_locally). When ready, it can be moved to an online hosting account of your choice. Updates are free! @@ -66,9 +66,9 @@ Updates are free! Where can you get support and help? --------------------- -* [The Joomla! Documentation](https://docs.joomla.org/Main_Page); -* [Frequently Asked Questions](https://docs.joomla.org/Category:FAQ) (FAQ); -* Find the [information you need](https://docs.joomla.org/Start_here); +* [The Joomla! Documentation](https://docs.joomla.org/Special:MyLanguage/Main_Page); +* [Frequently Asked Questions](https://docs.joomla.org/Special:MyLanguage/Category:FAQ) (FAQ); +* Find the [information you need](https://docs.joomla.org/Special:MyLanguage/Start_here); * Find [help and other users](https://www.joomla.org/about-joomla/create-and-share.html); * Post questions at [our forums](https://forum.joomla.org); * [Joomla Resources Directory](https://resources.joomla.org/) (JRD). @@ -76,21 +76,21 @@ Where can you get support and help? Do you already have a Joomla! site that isn't built with Joomla! 3.x? --------------------- * What's [new in Joomla! 3.x](https://www.joomla.org/3)? -* What are the [main differences between 2.5 and 3.x](https://docs.joomla.org/What_are_the_major_differences_between_Joomla!_2.5_and_3.x%3F)? -* How to [migrate from 2.5.x to 3.x](https://docs.joomla.org/Joomla_2.5_to_3.x_Step_by_Step_Migration). -* How to [migrate from 1.5.x to 3.x](https://docs.joomla.org/Joomla_1.5_to_3.x_Step_by_Step_Migration). +* What are the [main differences between 2.5 and 3.x](https://docs.joomla.org/Special:MyLanguage/What_are_the_major_differences_between_Joomla!_2.5_and_3.x%3F)? +* How to [migrate from 2.5.x to 3.x](https://docs.joomla.org/Special:MyLanguage/Joomla_2.5_to_3.x_Step_by_Step_Migration). +* How to [migrate from 1.5.x to 3.x](https://docs.joomla.org/Special:MyLanguage/Joomla_1.5_to_3.x_Step_by_Step_Migration). Do you want to improve Joomla? -------------------- * Where to [request a feature](https://issues.joomla.org/)? -* How do you [report a bug](https://docs.joomla.org/Filing_bugs_and_issues) on the [Issue Tracker](https://issues.joomla.org/)? +* How do you [report a bug](https://docs.joomla.org/Special:MyLanguage/Filing_bugs_and_issues) on the [Issue Tracker](https://issues.joomla.org/)? * Get Involved: Joomla! is community developed software. [Join the community](https://volunteers.joomla.org/). -* Documentation for [Developers](https://docs.joomla.org/Portal:Developers). -* Documentation for [Web designers](https://docs.joomla.org/Web_designers). +* Documentation for [Developers](https://docs.joomla.org/Special:MyLanguage/Portal:Developers). +* Documentation for [Web designers](https://docs.joomla.org/Special:MyLanguage/Web_designers). Copyright --------------------- * Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved. -* [Special Thanks](https://docs.joomla.org/Joomla!_Credits_and_Thanks) +* [Special Thanks](https://docs.joomla.org/Special:MyLanguage/Joomla!_Credits_and_Thanks) * Distributed under the GNU General Public License version 2 or later -* See [License details](https://docs.joomla.org/Joomla_Licenses) +* See [License details](https://docs.joomla.org/Special:MyLanguage/Joomla_Licenses) diff --git a/README.txt b/README.txt index 9881b46597896..a9c9c1789e1cf 100644 --- a/README.txt +++ b/README.txt @@ -1,7 +1,7 @@ 1- What is this? * This is a Joomla! installation/upgrade package to version 3.x * Joomla! Official site: https://www.joomla.org - * Joomla! 3.7 version history - https://docs.joomla.org/Joomla_3.7_version_history + * Joomla! 3.7 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_3.7_version_history * Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/master 2- What is Joomla? @@ -11,18 +11,18 @@ You can find full technical requirements here: https://downloads.joomla.org/technical-requirements. 3- Is Joomla! for you? - * Joomla! is the right solution for most content web projects: https://docs.joomla.org/Portal:Learn_More + * Joomla! is the right solution for most content web projects: https://docs.joomla.org/Special:MyLanguage/Portal:Learn_More * See Joomla's core features - https://www.joomla.org/core-features.html * Try out our online demo: https://demo.joomla.org/ 4- How to find a Joomla! translation? * Repository of accredited language packs: https://community.joomla.org/translations.html - * You can also add languages directly to your website via your Joomla! administration panel: https://docs.joomla.org/J3.x:Setup_a_Multilingual_Site/Installing_New_Language - * Learn how to setup a Multilingual Joomla! Site: https://docs.joomla.org/J3.x:Setup_a_Multilingual_Site + * You can also add languages directly to your website via your Joomla! administration panel: https://docs.joomla.org/Special:MyLanguage/J3.x:Setup_a_Multilingual_Site/Installing_New_Language + * Learn how to setup a Multilingual Joomla! Site: https://docs.joomla.org/Special:MyLanguage/J3.x:Setup_a_Multilingual_Site 5- Learn Joomla! - * Read Getting Started with Joomla to find out the basics: https://docs.joomla.org/J3.x:Getting_Started_with_Joomla! - * Before installing, read the beginners guide: https://docs.joomla.org/Portal:Beginners + * Read Getting Started with Joomla to find out the basics: https://docs.joomla.org/Special:MyLanguage/J3.x:Getting_Started_with_Joomla! + * Before installing, read the beginners guide: https://docs.joomla.org/Special:MyLanguage/Portal:Beginners 6- What are the benefits of Joomla? * The functionality of a Joomla! website can be extended by installing extensions that you can create (or download) to suit your needs. @@ -32,41 +32,41 @@ 7- Is it easy to change the layout display? * The layout is controlled by templates that you can edit. * There are a lot of ready-made professional templates that you can download. - * Check out the template management information: https://docs.joomla.org/Portal:Template_Management + * Check out the template management information: https://docs.joomla.org/Special:MyLanguage/Portal:Template_Management 8- Ready to install Joomla? * Check the minimum requirements here: https://downloads.joomla.org/technical-requirements - * How do you install Joomla - https://docs.joomla.org/J3.x:Installing_Joomla + * How do you install Joomla - https://docs.joomla.org/Special:MyLanguage/J3.x:Installing_Joomla * You could start your Joomla! experience building your site on a local test server. When ready it can be moved to an online hosting account of your choice. - See the tutorial: https://docs.joomla.org/Installing_Joomla_locally + See the tutorial: https://docs.joomla.org/Special:MyLanguage/Installing_Joomla_locally 9- Updates are free! * Always use the latest version: https://downloads.joomla.org/latest 10- Where can you get support and help? - * The Joomla! Documentation: https://docs.joomla.org/Main_Page - * FAQ Frequently Asked Questions: https://docs.joomla.org/Category:FAQ - * Find the information you need: https://docs.joomla.org/Start_here + * The Joomla! Documentation: https://docs.joomla.org/Special:MyLanguage/Main_Page + * FAQ Frequently Asked Questions: https://docs.joomla.org/Special:MyLanguage/Category:FAQ + * Find the information you need: https://docs.joomla.org/Special:MyLanguage/Start_here * Find help and other users: https://www.joomla.org/about-joomla/create-and-share.html * Post questions at our forums: https://forum.joomla.org * Joomla! Resources Directory (JRD): https://resources.joomla.org/ 11- Do you already have a Joomla! site that's not built with Joomla! 3.x ? * What's new in Joomla! 3.x: https://www.joomla.org/3 - * What are the main differences from 2.5 to 3? https://docs.joomla.org/What_are_the_major_differences_between_Joomla!_2.5_and_3.x%3F - * How to migrate from 2.5.x to 3.x? Tutorial: https://docs.joomla.org/Joomla_2.5_to_3.x_Step_by_Step_Migration - * How to migrate from 1.5.x to 3.x? Tutorial: https://docs.joomla.org/Joomla_1.5_to_3.x_Step_by_Step_Migration + * What are the main differences from 2.5 to 3? https://docs.joomla.org/Special:MyLanguage/What_are_the_major_differences_between_Joomla!_2.5_and_3.x%3F + * How to migrate from 2.5.x to 3.x? Tutorial: https://docs.joomla.org/Special:MyLanguage/Joomla_2.5_to_3.x_Step_by_Step_Migration + * How to migrate from 1.5.x to 3.x? Tutorial: https://docs.joomla.org/Special:MyLanguage/Joomla_1.5_to_3.x_Step_by_Step_Migration 12- Do you want to improve Joomla? * Where to request a feature? https://issues.joomla.org/ - * How do you report a bug? https://docs.joomla.org/Filing_bugs_and_issues + * How do you report a bug? https://docs.joomla.org/Special:MyLanguage/Filing_bugs_and_issues * Get Involved: Joomla! is a community developed software. Join the community at https://volunteers.joomla.org/ - * Documentation for Developers: https://docs.joomla.org/Portal:Developers - * Documentation for Web designers: https://docs.joomla.org/Web_designers + * Documentation for Developers: https://docs.joomla.org/Special:MyLanguage/Portal:Developers + * Documentation for Web designers: https://docs.joomla.org/Special:MyLanguage/Web_designers Copyright: * Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved. - * Special Thanks: https://docs.joomla.org/Joomla!_Credits_and_Thanks + * Special Thanks: https://docs.joomla.org/Special:MyLanguage/Joomla!_Credits_and_Thanks * Distributed under the GNU General Public License version 2 or later - * See Licenses details at https://docs.joomla.org/Joomla_Licenses + * See Licenses details at https://docs.joomla.org/Special:MyLanguage/Joomla_Licenses diff --git a/administrator/components/com_admin/models/sysinfo.php b/administrator/components/com_admin/models/sysinfo.php index c8d8850f46558..b2c9ea6ed1abf 100644 --- a/administrator/components/com_admin/models/sysinfo.php +++ b/administrator/components/com_admin/models/sysinfo.php @@ -482,18 +482,13 @@ public function getExtensions() 'authorUrl' => 'unknown', ); - $manifest = json_decode($extension->manifest_cache); - - if (!$manifest instanceof stdClass) - { - continue; - } + $manifest = new Registry($extension->manifest_cache); $extraData = array( - 'author' => $manifest->author, - 'version' => $manifest->version, - 'creationDate' => $manifest->creationDate, - 'authorUrl' => $manifest->authorUrl, + 'author' => $manifest->get('author', ''), + 'version' => $manifest->get('version', ''), + 'creationDate' => $manifest->get('creationDate', ''), + 'authorUrl' => $manifest->get('authorUrl', '') ); $installed[$extension->name] = array_merge($installed[$extension->name], $extraData); diff --git a/administrator/components/com_admin/postinstall/joomla40checks.php b/administrator/components/com_admin/postinstall/joomla40checks.php index 7f921fa3629e7..c55571c29015e 100644 --- a/administrator/components/com_admin/postinstall/joomla40checks.php +++ b/administrator/components/com_admin/postinstall/joomla40checks.php @@ -18,7 +18,7 @@ * * @since 3.7 * - * @see https://developer.joomla.org/news/658-joomla4-manifesto.html + * @link https://developer.joomla.org/news/658-joomla4-manifesto.html */ function admin_postinstall_joomla40checks_condition() { diff --git a/administrator/components/com_admin/postinstall/languageaccess340.php b/administrator/components/com_admin/postinstall/languageaccess340.php index 86186a95d355d..d55964eb122dd 100644 --- a/administrator/components/com_admin/postinstall/languageaccess340.php +++ b/administrator/components/com_admin/postinstall/languageaccess340.php @@ -15,8 +15,8 @@ /** * Checks if the installation is affected by the issue with content languages access in 3.4.0 * - * @see https://github.com/joomla/joomla-cms/pull/6172 - * @see https://github.com/joomla/joomla-cms/pull/6194 + * @link https://github.com/joomla/joomla-cms/pull/6172 + * @link https://github.com/joomla/joomla-cms/pull/6194 * * @return boolean * diff --git a/administrator/components/com_admin/postinstall/phpversion.php b/administrator/components/com_admin/postinstall/phpversion.php deleted file mode 100644 index 7e1a4aec28533..0000000000000 --- a/administrator/components/com_admin/postinstall/phpversion.php +++ /dev/null @@ -1,24 +0,0 @@ - 0 THEN MAX(p.published) ELSE MIN(p.published) END AS newPublished FROM `#__categories` AS `c2` @@ -6,6 +7,7 @@ UPDATE `#__categories` AS `c` INNER JOIN ( ON c.id = c2.id SET published = c2.newPublished; +UPDATE `#__menu` SET `published` = 1 WHERE `alias` = 'root'; UPDATE `#__menu` AS `c` INNER JOIN ( SELECT c2.id, CASE WHEN MIN(p.published) > 0 THEN MAX(p.published) ELSE MIN(p.published) END AS newPublished FROM `#__menu` AS `c2` diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-04-19.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-04-19.sql new file mode 100644 index 0000000000000..35327661646c8 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-04-19.sql @@ -0,0 +1,3 @@ +-- Set integer field default values. +UPDATE `#__extensions` SET `params` = '{"multiple":"0","first":"1","last":"100","step":"1"}' WHERE `name` = 'plg_fields_integer'; + diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-08-29.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-08-29.sql index 1515c80895030..1676d972db1fa 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-08-29.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-08-29.sql @@ -66,12 +66,12 @@ CREATE TABLE "#__fields_groups" ( "access" bigint DEFAULT 0 NOT NULL, PRIMARY KEY ("id") ); -CREATE INDEX "#__fields_idx_checked_out" ON "#__fields_groups" ("checked_out"); -CREATE INDEX "#__fields_idx_state" ON "#__fields_groups" ("state"); -CREATE INDEX "#__fields_idx_created_by" ON "#__fields_groups" ("created_by"); -CREATE INDEX "#__fields_idx_access" ON "#__fields_groups" ("access"); -CREATE INDEX "#__fields_idx_context" ON "#__fields_groups" ("context"); -CREATE INDEX "#__fields_idx_language" ON "#__fields_groups" ("language"); +CREATE INDEX "#__fields_groups_idx_checked_out" ON "#__fields_groups" ("checked_out"); +CREATE INDEX "#__fields_groups_idx_state" ON "#__fields_groups" ("state"); +CREATE INDEX "#__fields_groups_idx_created_by" ON "#__fields_groups" ("created_by"); +CREATE INDEX "#__fields_groups_idx_access" ON "#__fields_groups" ("access"); +CREATE INDEX "#__fields_groups_idx_context" ON "#__fields_groups" ("context"); +CREATE INDEX "#__fields_groups_idx_language" ON "#__fields_groups" ("language"); -- -- Table: #__fields_values diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-03-09.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-03-09.sql index 109609388f86a..08aa07b95e254 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-03-09.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-03-09.sql @@ -1,3 +1,4 @@ +UPDATE "#__categories" SET published = 1 WHERE alias = 'root'; UPDATE "#__categories" AS "c" SET published = c2.newPublished FROM ( @@ -7,6 +8,7 @@ INNER JOIN "#__categories" AS "p" ON p.lft <= c2.lft AND c2.rgt <= p.rgt GROUP BY c2.id) AS c2 WHERE c2.id = c.id; +UPDATE "#__menu" SET published = 1 WHERE alias = 'root'; UPDATE "#__menu" AS "c" SET published = c2.newPublished FROM ( diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-04-19.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-04-19.sql new file mode 100644 index 0000000000000..5df4318cc3680 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-04-19.sql @@ -0,0 +1,2 @@ +-- Set integer field default values. +UPDATE `#__extensions` SET `params` = '{"multiple":"0","first":"1","last":"100","step":"1"}' WHERE `name` = 'plg_fields_integer'; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-03-09.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-03-09.sql index d250fb881f58a..feb0fc106b9f7 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-03-09.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-03-09.sql @@ -1,3 +1,4 @@ +UPDATE "#__categories" SET published = 1 WHERE alias = 'root'; UPDATE "c" SET published = c2.newPublished FROM "#__categories" AS "c" @@ -7,6 +8,7 @@ FROM "#__categories" AS "c2" INNER JOIN "#__categories" AS "p" ON p.lft <= c2.lft AND c2.rgt <= p.rgt GROUP BY c2.id) AS c2 ON c2.id = c.id; +UPDATE "#__menu" SET published = 1 WHERE alias = 'root'; UPDATE "c" SET published = c2.newPublished FROM "#__menu" AS "c" diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-04-19.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-04-19.sql new file mode 100644 index 0000000000000..042487bcbc4d3 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-04-19.sql @@ -0,0 +1,3 @@ +-- Set integer field default values. +UPDATE [#__extensions] SET [params] = '{"multiple":"0","first":"1","last":"100","step":"1"}' WHERE [name] = 'plg_fields_integer'; + diff --git a/administrator/components/com_admin/views/profile/view.html.php b/administrator/components/com_admin/views/profile/view.html.php index d23010b43fe92..fbe3e3747f3cd 100644 --- a/administrator/components/com_admin/views/profile/view.html.php +++ b/administrator/components/com_admin/views/profile/view.html.php @@ -58,9 +58,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } $this->form->setValue('password', null); diff --git a/administrator/components/com_admin/views/sysinfo/view.html.php b/administrator/components/com_admin/views/sysinfo/view.html.php index fc1a93a1bf795..b406ed27f8885 100644 --- a/administrator/components/com_admin/views/sysinfo/view.html.php +++ b/administrator/components/com_admin/views/sysinfo/view.html.php @@ -70,7 +70,7 @@ public function display($tpl = null) // Access check. if (!JFactory::getUser()->authorise('core.admin')) { - return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); + throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403); } $this->php_settings = $this->get('PhpSettings'); diff --git a/administrator/components/com_admin/views/sysinfo/view.json.php b/administrator/components/com_admin/views/sysinfo/view.json.php index 92455c573581b..4d7a9b7c08eed 100644 --- a/administrator/components/com_admin/views/sysinfo/view.json.php +++ b/administrator/components/com_admin/views/sysinfo/view.json.php @@ -30,7 +30,7 @@ public function display($tpl = null) // Access check. if (!JFactory::getUser()->authorise('core.admin')) { - return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); + throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403); } header('MIME-Version: 1.0'); diff --git a/administrator/components/com_admin/views/sysinfo/view.text.php b/administrator/components/com_admin/views/sysinfo/view.text.php index f284e2cf3e6b7..d90a045be1c35 100644 --- a/administrator/components/com_admin/views/sysinfo/view.text.php +++ b/administrator/components/com_admin/views/sysinfo/view.text.php @@ -30,7 +30,7 @@ public function display($tpl = null) // Access check. if (!JFactory::getUser()->authorise('core.admin')) { - return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); + throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403); } header('Content-Type: text/plain; charset=utf-8'); diff --git a/administrator/components/com_associations/controllers/association.php b/administrator/components/com_associations/controllers/association.php index 69fb8c7371a24..60d5234559b58 100644 --- a/administrator/components/com_associations/controllers/association.php +++ b/administrator/components/com_associations/controllers/association.php @@ -31,9 +31,9 @@ class AssociationsControllerAssociation extends JControllerForm */ public function edit($key = null, $urlVar = null) { - list($extensionName, $typeName) = explode('.', $this->input->get('itemtype')); + list($extensionName, $typeName) = explode('.', $this->input->get('itemtype', '', 'string')); - $id = $this->input->get('id', 0); + $id = $this->input->get('id', 0, 'int'); // Check if reference item can be edited. if (!AssociationsHelper::allowEdit($extensionName, $typeName, $id)) @@ -52,7 +52,7 @@ public function edit($key = null, $urlVar = null) * * @param string $key The name of the primary key of the URL variable. * - * @return void. + * @return void * * @since 3.7.0 */ @@ -60,7 +60,7 @@ public function cancel($key = null) { JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); - list($extensionName, $typeName) = explode('.', $this->input->get('itemtype')); + list($extensionName, $typeName) = explode('.', $this->input->get('itemtype', '', 'string')); // Only check in, if component item type allows to check out. if (AssociationsHelper::typeSupportsCheckout($extensionName, $typeName)) @@ -73,7 +73,7 @@ public function cancel($key = null) $ids = array_unique(explode(',', $targetId)); } - $ids[] = $this->input->get('id', 0); + $ids[] = $this->input->get('id', 0, 'int'); foreach ($ids as $key => $id) { diff --git a/administrator/components/com_associations/controllers/associations.php b/administrator/components/com_associations/controllers/associations.php index 8ec6606574b6b..23cbb6d04908e 100644 --- a/administrator/components/com_associations/controllers/associations.php +++ b/administrator/components/com_associations/controllers/associations.php @@ -68,4 +68,63 @@ public function clean() $this->getModel('associations')->clean(); $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false)); } + + /** + * Method to check in an item from the association item overview. + * + * @return void + * + * @since 3.7.1 + */ + public function checkin() + { + // Set the redirect so we can just stop processing when we find a condition we can't process + $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false)); + + // Figure out if the item supports checking and check it in + $type = null; + + list($extensionName, $typeName) = explode('.', $this->input->get('itemtype')); + + $extension = AssociationsHelper::getSupportedExtension($extensionName); + $types = $extension->get('types'); + + if (!array_key_exists($typeName, $types)) + { + return; + } + + if (AssociationsHelper::typeSupportsCheckout($extensionName, $typeName) === false) + { + // How on earth we came to that point, eject internet + return; + } + + $cid = $this->input->get('cid', array(), 'array'); + + if (empty($cid)) + { + // Seems we don't have an id to work with. + return; + } + + // We know the first element is the one we need because we don't allow multi selection of rows + $id = $cid[0]; + + if (AssociationsHelper::canCheckinItem($extensionName, $typeName, $id) === true) + { + $item = AssociationsHelper::getItem($extensionName, $typeName, $id); + + $item->checkIn($id); + + return; + } + + $this->setRedirect( + JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list), + JText::_('COM_ASSOCIATIONS_YOU_ARE_NOT_ALLOWED_TO_CHECKIN_THIS_ITEM') + ); + + return; + } } diff --git a/administrator/components/com_associations/helpers/associations.php b/administrator/components/com_associations/helpers/associations.php index 02bb2c2d3a0aa..38b9193b8a2cf 100644 --- a/administrator/components/com_associations/helpers/associations.php +++ b/administrator/components/com_associations/helpers/associations.php @@ -641,4 +641,33 @@ public static function getTypeFieldName($extensionName, $typeName, $fieldName) return $helper->getTypeFieldName($typeName, $fieldName); } + + /** + * Gets the language filter system plugin extension id. + * + * @return int The language filter system plugin extension id. + * + * @since 3.7.2 + */ + public static function getLanguagefilterPluginId() + { + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select($db->quoteName('extension_id')) + ->from($db->quoteName('#__extensions')) + ->where($db->quoteName('folder') . ' = ' . $db->quote('system')) + ->where($db->quoteName('element') . ' = ' . $db->quote('languagefilter')); + $db->setQuery($query); + + try + { + $result = (int) $db->loadResult(); + } + catch (RuntimeException $e) + { + JError::raiseWarning(500, $e->getMessage()); + } + + return $result; + } } diff --git a/administrator/components/com_associations/models/associations.php b/administrator/components/com_associations/models/associations.php index 03a3696e3d78e..67114f93fbcf0 100644 --- a/administrator/components/com_associations/models/associations.php +++ b/administrator/components/com_associations/models/associations.php @@ -151,7 +151,6 @@ protected function getStoreId($id = '') protected function getListQuery() { $type = null; - $listOrdering = $this->getState('list.fullordering'); list($extensionName, $typeName) = explode('.', $this->state->get('itemtype')); @@ -403,11 +402,11 @@ protected function getListQuery() // Add the group by clause $query->group($db->qn($groupby)); - // Add the list ordering clause. - if (!empty($listOrdering)) - { - $query->order($db->escape($listOrdering)); - } + // Add the list ordering clause + $listOrdering = $this->state->get('list.ordering', 'id'); + $orderDirn = $this->state->get('list.direction', 'ASC'); + + $query->order($db->escape($listOrdering) . ' ' . $db->escape($orderDirn)); return $query; } diff --git a/administrator/components/com_associations/models/fields/itemlanguage.php b/administrator/components/com_associations/models/fields/itemlanguage.php index 04bbafd7948d3..459a91a7c2c6f 100644 --- a/administrator/components/com_associations/models/fields/itemlanguage.php +++ b/administrator/components/com_associations/models/fields/itemlanguage.php @@ -40,7 +40,7 @@ protected function getOptions() { $input = JFactory::getApplication()->input; - list($extensionName, $typeName) = explode('.', $input->get('itemtype')); + list($extensionName, $typeName) = explode('.', $input->get('itemtype', '', 'string')); // Get the extension specific helper method $helper = AssociationsHelper::getExtensionHelper($extensionName); diff --git a/administrator/components/com_associations/models/fields/modalassociation.php b/administrator/components/com_associations/models/fields/modalassociation.php index 64371e85df692..5f2278dc70b5f 100644 --- a/administrator/components/com_associations/models/fields/modalassociation.php +++ b/administrator/components/com_associations/models/fields/modalassociation.php @@ -95,8 +95,8 @@ protected function getInput() 'width' => '800px', 'bodyHeight' => '70', 'modalWidth' => '80', - 'footer' => '', + 'footer' => '
items as $i => $item) : - $canCheckin = true; $canEdit = AssociationsHelper::allowEdit($this->extensionName, $this->typeName, $item->id); $canCheckin = $canManageCheckin || AssociationsHelper::canCheckinItem($this->extensionName, $this->typeName, $item->id); $isCheckout = AssociationsHelper::isCheckoutItem($this->extensionName, $this->typeName, $item->id); @@ -122,9 +121,13 @@ ', ) ); diff --git a/administrator/components/com_associations/views/association/tmpl/edit.php b/administrator/components/com_associations/views/association/tmpl/edit.php index ced7000ad5d54..d4e6b689a5c78 100644 --- a/administrator/components/com_associations/views/association/tmpl/edit.php +++ b/administrator/components/com_associations/views/association/tmpl/edit.php @@ -22,7 +22,7 @@ 'id' => $this->referenceId, ); ?> - diff --git a/administrator/components/com_associations/views/association/view.html.php b/administrator/components/com_associations/views/association/view.html.php index 4d77a8d7ef012..00bdcb4467b72 100644 --- a/administrator/components/com_associations/views/association/view.html.php +++ b/administrator/components/com_associations/views/association/view.html.php @@ -62,6 +62,7 @@ class AssociationsViewAssociation extends JViewLegacy * @return void * * @since 3.7.0 + * @throws Exception */ public function display($tpl = null) { @@ -69,8 +70,6 @@ public function display($tpl = null) if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors), 500); - - return false; } $this->app = JFactory::getApplication(); @@ -78,7 +77,7 @@ public function display($tpl = null) $input = $this->app->input; $this->referenceId = $input->get('id', 0, 'int'); - list($extensionName, $typeName) = explode('.', $input->get('itemtype')); + list($extensionName, $typeName) = explode('.', $input->get('itemtype', '', 'string')); $extension = AssociationsHelper::getSupportedExtension($extensionName); $types = $extension->get('types'); @@ -135,7 +134,7 @@ public function display($tpl = null) $this->targetId = $matches[1]; $this->targetLanguage = $matches[0]; $task = $typeName . '.' . $this->targetAction; - $this->defaultTargetSrc = JRoute::_($this->editUri . '&task= ' . $task . ' &id=' . (int) $this->targetId); + $this->defaultTargetSrc = JRoute::_($this->editUri . '&task=' . $task . '&id=' . (int) $this->targetId); $this->form->setValue('itemlanguage', '', $this->targetLanguage . ':' . $this->targetId . ':' . $this->targetAction); } @@ -198,13 +197,13 @@ protected function addToolbar() $bar->appendButton( 'Custom', '', 'reference' ); $bar->appendButton( 'Custom', '', 'target' ); diff --git a/administrator/components/com_associations/views/associations/tmpl/default.php b/administrator/components/com_associations/views/associations/tmpl/default.php index 9b6dbaa6893c5..b00dd9f74f10c 100644 --- a/administrator/components/com_associations/views/associations/tmpl/default.php +++ b/administrator/components/com_associations/views/associations/tmpl/default.php @@ -16,7 +16,7 @@ JHtml::_('behavior.multiselect'); JHtml::_('formbehavior.chosen', 'select'); -$listOrder = $this->escape($this->state->get('list.fullordering')); +$listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $canManageCheckin = JFactory::getUser()->authorise('core.manage', 'com_checkin'); $colSpan = 5; @@ -110,7 +110,6 @@- +