diff --git a/.appveyor.yml b/.appveyor.yml index ba159debdd..0aca957045 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -15,12 +15,14 @@ environment: matrix: - php_ver_target: 7.2 DLLVersion: "5.3.0" + WINCACHE: "2.0.0.8" - php_ver_target: 7.3 + WINCACHE: "2.0.0.8" init: - SET PATH=C:\Program Files\OpenSSL;C:\tools\php;%PATH% - SET COMPOSER_NO_INTERACTION=1 - - SET PHP=1 # This var relates to caching the php install + - SET PHP=1 # This var relates to caching the php install - SET ANSICON=121x90 (121x90) services: - mssql2014 @@ -33,14 +35,14 @@ install: - IF EXIST C:\tools\php (SET PHP=0) # TODO: This is a workaround for https://github.com/chocolatey/choco/issues/1843. Once this is fixed we # should go back to latest version in appveyor saving ourselves test time - - ps: choco install chocolatey -y --version 0.10.13 --allow-downgrade + - ps: choco upgrade chocolatey -y --version 0.10.13 --allow-downgrade - ps: >- If ($env:PHP -eq "1") { appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','') } - appveyor-retry cinst -y sqlite - cd C:\tools\php - # Get the MSSQL DLL's + # Get the MSSQL DLLs - ps: >- If ($env:PHP -eq "1") { cd c:\tools\php\ext @@ -52,10 +54,11 @@ install: $source = "https://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($env:DLLVersion)/php_pdo_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip" $destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip" Invoke-WebRequest $source -OutFile $destination - #appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($env:DLLVersion)/php_pdo_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip + #appveyor-retry appveyor DownloadFile https://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($env:DLLVersion)/php_pdo_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip 7z x -y php_pdo_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip > $null Remove-Item c:\tools\php\ext* -include .zip - cd c:\tools\php} + cd c:\tools\php + } - IF %PHP%==1 copy php.ini-production php.ini /Y - IF %PHP%==1 echo date.timezone="UTC" >> php.ini - IF %PHP%==1 echo extension_dir=ext >> php.ini @@ -80,18 +83,19 @@ install: - IF %PHP%==1 echo extension=php_curl.dll >> php.ini # Get the Wincache DLLs - ps: >- - If ($env:PHP -eq "1") { - $wincache = "2.0.0.8" + If ($env:PHP -eq "1" -and $env:WINCACHE) { cd c:\tools\php\ext - $source = "http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip" - $destination = "c:\tools\php\ext\php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip" + $source = "https://windows.php.net/downloads/pecl/releases/wincache/$($env:WINCACHE)/php_wincache-$($env:WINCACHE)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip" + $destination = "c:\tools\php\ext\php_wincache-$($env:WINCACHE)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip" Invoke-WebRequest $source -OutFile $destination - #appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip - 7z x -y php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip > $null + #appveyor-retry appveyor DownloadFile https://windows.php.net/downloads/pecl/releases/wincache/$($env:WINCACHE)/php_wincache-$($env:WINCACHE)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip + 7z x -y php_wincache-$($env:WINCACHE)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip > $null Remove-Item C:\tools\php\ext* -include .zip - cd c:\tools\php} - - IF %PHP%==1 echo extension=php_wincache.dll >> php.ini - - IF %PHP%==1 echo wincache.enablecli = 1 >> php.ini + cd c:\tools\php + Add-Content php.ini "`nextension=php_wincache.dll" + Add-Content php.ini "`wincache.enablecli = 1" + Add-Content php.ini "`n" + } - IF %PHP%==1 echo zend_extension=php_opcache.dll >> php.ini - IF %PHP%==1 echo opcache.enable_cli=1 >> php.ini - IF %PHP%==1 echo extension=php_ldap.dll >> php.ini diff --git a/.drone.yml b/.drone.yml index 3dc1713583..1d63c73f3a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,16 +11,14 @@ steps: settings: restore: true mount: - - ./node_modules - ./libraries/vendor - - ./administrator/components/com_media/node_modules cache_key: [ DRONE_REPO_NAMESPACE, DRONE_REPO_NAME, DRONE_BRANCH, DRONE_STAGE_NUMBER ] volumes: - name: cache path: /cache - name: composer - image: joomlaprojects/docker-tools:develop + image: joomlaprojects/docker-images:php7.3-composer depends_on: [ restore-cache ] commands: - composer validate --no-check-all --strict @@ -35,20 +33,46 @@ steps: - echo $(date) - name: npm - image: joomlaprojects/docker-tools:develop + image: node:current-alpine depends_on: [ phpcs ] commands: - npm ci --unsafe-perm + - name: publish-diff + image: joomlaprojects/docker-images:patchtester + depends_on: [ npm ] + environment: + CMP_ARCHIVE_NAME: "build" + CMP_MASTER_FOLDER: "/reference" + CMP_SLAVE_FOLDER: "." # The directory the current repo is in + FTP_USERNAME: + from_secret: ftpusername + FTP_PASSWORD: + from_secret: ftppassword + FTP_HOSTNAME: ci.joomla.org + FTP_PORT: "21" + FTP_DEST_DIR: /artifacts + FTP_VERIFY: "false" + FTP_SECURE: "true" + BRANCH_NAME: "4.0-dev" # Current branch to check against (from repo joomla/joomla-cms) + DRONE_PULL_REQUEST: DRONE_PULL_REQUEST + commands: + - export PULL_ID=$DRONE_PULL_REQUEST + - /bin/compare.sh + volumes: + - name: reference + path: /reference + when: + branch: + - 4.0-dev + - name: rebuild-cache image: drillster/drone-volume-cache depends_on: [ npm ] settings: rebuild: true mount: - - ./node_modules - ./libraries/vendor - - ./administrator/components/com_media/node_modules cache_key: [ DRONE_REPO_NAMESPACE, DRONE_REPO_NAME, DRONE_BRANCH, DRONE_STAGE_NUMBER ] volumes: - name: cache @@ -121,32 +145,34 @@ steps: - php -v - ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist -# - name: php73-integration-pgsql -# depends_on: [ npm ] -# image: joomlaprojects/docker-images:php7.3 -# commands: -# - php -v -# - ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist - -# - name: php74-integration-pgsql -# depends_on: [ npm ] -# image: joomlaprojects/docker-images:php7.4 -# failure: ignore -# commands: -# - php -v -# - ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist - -# - name: php80-integration-pgsql -# depends_on: [ npm ] -# image: joomlaprojects/docker-images:php8.0 -# failure: ignore -# commands: -# - php -v -# - ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist + - name: php73-integration-pgsql + depends_on: [ npm ] + image: joomlaprojects/docker-images:php7.3 + commands: + - php -v + - ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist + + - name: php74-integration-pgsql + depends_on: [ npm ] + image: joomlaprojects/docker-images:php7.4 + failure: ignore + commands: + - php -v + - ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist + + - name: php80-integration-pgsql + depends_on: [ npm ] + image: joomlaprojects/docker-images:php8.0 + failure: ignore + commands: + - php -v + - ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist - name: javascript-cs depends_on: [ npm ] - image: joomlaprojects/docker-systemtests:develop + image: joomlaprojects/docker-images:systemtests + environment: + JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 commands: - export DISPLAY=:0 - Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 & @@ -156,7 +182,9 @@ steps: - name: javascript-tests depends_on: [ npm ] - image: joomlaprojects/docker-systemtests:develop + image: joomlaprojects/docker-images:systemtests + environment: + JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 commands: - export DISPLAY=:0 - Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 & @@ -166,26 +194,39 @@ steps: - name: system-tests-mysql depends_on: [ javascript-tests ] - image: joomlaprojects/docker-systemtests:latest + image: joomlaprojects/docker-images:systemtests + environment: + JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 commands: - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql - name: system-tests-mysql8 depends_on: [ system-tests-mysql ] - image: joomlaprojects/docker-systemtests:latest - failure: ignore + image: joomlaprojects/docker-images:systemtests + environment: + JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 commands: - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8 - name: system-tests-postgres depends_on: [ system-tests-mysql8 ] - image: joomlaprojects/docker-systemtests:latest + image: joomlaprojects/docker-images:systemtests + environment: + JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 commands: - bash tests/Codeception/drone-system-run.sh "$(pwd)" postgres + - name: api-tests + depends_on: [ system-tests-postgres ] + image: joomlaprojects/docker-images:systemtests + environment: + JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 + commands: + - bash tests/Codeception/drone-api-run.sh "$(pwd)" + - name: artifacts-system-tests image: cschlosser/drone-ftps - depends_on: [ system-tests-postgres ] + depends_on: [ api-tests ] environment: FTP_USERNAME: from_secret: ftpusername @@ -197,21 +238,15 @@ steps: PLUGIN_SECURE: false PLUGIN_EXCLUDE: ^\.git/$ commands: - - export PLUGIN_DEST_DIR=$PLUGIN_DEST_DIR/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST_$DRONE_BUILD_NUMBER/system-tests + - export PLUGIN_DEST_DIR=$PLUGIN_DEST_DIR/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER - echo https://ci.joomla.org:444$PLUGIN_DEST_DIR - /bin/upload.sh when: status: - - failure - - - name: api-tests - depends_on: [ system-tests-postgres ] - image: joomlaprojects/docker-systemtests:latest - commands: - - bash tests/Codeception/drone-api-run.sh "$(pwd)" + - failure - name: analysis4x - image: rips/rips-cli:1.2.1 + image: rips/rips-cli:3.2.2 depends_on: [ api-tests ] when: repo: @@ -220,10 +255,11 @@ steps: - 4.0-dev commands: - export RIPS_BASE_URI='https://api.rips.joomla.org' - - rips-cli rips:scan:start -a 3 -t 1 -R -k -p $(pwd) -t 1 -T $DRONE_REPO_NAMESPACE-$DRONE_BRANCH || { echo "Please contact the security team at security@joomla.org"; exit 1; } + - rips-cli rips:list --table=scans -n -p filter='{"__and":[{"__lessThan":{"percent":100}}]}' + - rips-cli rips:scan:start -G -a 2 -t 1 -R -k -p $(pwd) -t 1 -T $DRONE_REPO_NAMESPACE-$DRONE_BRANCH || { echo "Please contact the security team at security@joomla.org"; exit 1; } environment: - RIPS_USERNAME: - from_secret: RIPS_USERNAME + RIPS_EMAIL: + from_secret: RIPS_EMAIL RIPS_PASSWORD: from_secret: RIPS_PASSWORD @@ -234,6 +270,9 @@ volumes: - name: cache host: path: /tmp/cache +- name: reference + host: + path: /tmp/reference services: - name: mysql @@ -270,6 +309,6 @@ services: --- kind: signature -hmac: 5cdcb0e095c87e88b88c3b90a80343bd4f1d61b7df795aca67870eaa3bc1b112 +hmac: bf9ea2d23f5b94fc80c2cb5fbd9b8c5f7b1423319c01a904b0b499233eb873f6 ... diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000..0be9be57ae --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +custom: https://community.joomla.org/sponsorship-campaigns.html diff --git a/SECURITY.md b/.github/SECURITY.md similarity index 87% rename from SECURITY.md rename to .github/SECURITY.md index 449c2a5978..52af74f0b6 100644 --- a/SECURITY.md +++ b/.github/SECURITY.md @@ -9,9 +9,7 @@ This document outlines security procedures and policies for the `Joomla! Project ## Reporting a Bug -The `Joomla` team and community take all security bugs in `Joomla` seriously. - -The Joomla! Project takes security vulnerabilities very seriously. As such, the Joomla! Security Strike Team (JSST) oversees the project's security issues and follows some specific procedures when dealing with these issues. +The `Joomla` team and community take all security bugs in `Joomla` seriously. The Joomla! Security Strike Team (JSST) oversees the project's security issues and follows some specific procedures when dealing with these issues. If you find a possible vulnerability, please report it to the JSST using the [online form](https://developer.joomla.org/security/contact-the-team.html) or via email at security@joomla.org @@ -25,7 +23,7 @@ Thank you for improving the security of `Joomla`. ## Response Handling -The JSST aims to ensure all issues are handled in a timely manner and for clear communication between the team and issue reporters. As such, we have established the following guidelines for responding to issue reports: +The JSST aims to ensure all issues are handled in a timely manner and for clear communication between the team and issue reporters. We have established the following guidelines for responding to issue reports: * Within 24 hours every report gets acknowledged * Within 7 days every report gets a further response stating either diff --git a/README.md b/README.md index 618890eef1..660bc70609 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Build Status | ------------- | ------------- | | [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=4.0-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/4.0-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | -What is this? +Overview --------------------- * This is the source of Joomla! 4.x. * Joomla's [Official website](https://www.joomla.org). diff --git a/README.txt b/README.txt index 09203ba7d7..898e3565d6 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,6 @@ -1- What is this? +Joomla! CMS™ + +1- Overview * This is a Joomla! 4.x installation/upgrade package. * Joomla! Official site: https://www.joomla.org * Joomla! 4.0 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_4.0_version_history diff --git a/RoboFile.php b/RoboFile.php deleted file mode 100644 index 4223b3680b..0000000000 --- a/RoboFile.php +++ /dev/null @@ -1,494 +0,0 @@ -getSuiteConfig()['modules']['config']['Helper\\Acceptance']['cmsPath']; - $localUser = $this->getSuiteConfig()['modules']['config']['Helper\\Acceptance']['localUser']; - - // Clean old testing site - if (is_dir($cmsPath)) - { - try - { - $this->taskDeleteDir($cmsPath)->run(); - } - catch (Exception $e) - { - // Sorry, we tried :( - $this->say('Sorry, you will have to delete ' . $cmsPath . ' manually.'); - - exit(1); - } - } - - $exclude = [ - '.drone', - '.github', - '.git', - '.run', - '.idea', - 'build', - 'dev', - 'node_modules', - 'tests', - 'test-install', - '.appveyor.yml', - '.babelrc', - '.drone.yml', - '.editorconfig', - '.eslintignore', - '.eslintrc', - '.gitignore', - '.hound.yml', - '.php_cs', - '.travis.yml', - 'appveyor-phpunit.xml', - 'build.js', - 'build.xml', - 'codeception.yml', - 'composer.json', - 'composer.lock', - 'configuration.php', - 'drone-package.json', - 'Gemfile', - 'htaccess.txt', - 'karma.conf.js', - 'package.json', - 'package-lock.json', - 'phpunit.xml.dist', - 'RoboFile.dist.ini', - 'RoboFile.php', - 'robots.txt.dist', - 'scss-lint.yml', - 'selenium.log', - 'travisci-phpunit.xml', - ]; - - $this->copyJoomla($cmsPath, $exclude); - - // Optionally change owner to fix permissions issues - if (!empty($localUser)) - { - $this->_exec('chown -R ' . $localUser . ' ' . $cmsPath); - } - - // Optionally uses Joomla default htaccess file. Used by TravisCI - if ($useHtaccess == true) - { - $this->say('Renaming htaccess.txt to .htaccess'); - $this->_copy('./htaccess.txt', $cmsPath . '/.htaccess'); - $this->_exec('sed -e "s,# RewriteBase /,RewriteBase /test-install/joomla-cms,g" -in-place test-install/joomla-cms/.htaccess'); - } - } - - /** - * Copy the Joomla installation excluding folders - * - * @param string $dst Target folder - * @param array $exclude Exclude list of folders - * - * @throws Exception - * - * @since 3.7.3 - * - * @return void - */ - protected function copyJoomla($dst, $exclude = array()) - { - $dir = @opendir("."); - - if (false === $dir) - { - throw new Exception($this, "Cannot open source directory"); - } - - if (!is_dir($dst)) - { - mkdir($dst, 0755, true); - } - - while (false !== ($file = readdir($dir))) - { - if (in_array($file, $exclude)) - { - continue; - } - - if (($file !== '.') && ($file !== '..')) - { - $srcFile = "." . '/' . $file; - $destFile = $dst . '/' . $file; - - if (is_dir($srcFile)) - { - $this->_copyDir($srcFile, $destFile); - } - else - { - copy($srcFile, $destFile); - } - } - } - - closedir($dir); - } - - /** - * Executes all the Selenium System Tests in a suite on your machine - * - * @param array $opts Array of configuration options: - * - 'use-htaccess': renames and enable embedded Joomla .htaccess file - * - 'env': set a specific environment to get configuration from - * - * @return void - * @since 3.7.3 - * - * @throws Exception - */ - public function runTests($opts = ['use-htaccess' => false, 'env' => 'desktop']) - { - $this->say("Running tests"); - - $pathToCodeception = $this->prepareRun($opts); - - $suites = [ - 'acceptance/install/', - 'acceptance/administrator/components/com_content', - 'acceptance/administrator/components/com_media', - 'acceptance/administrator/components/com_menu', - 'acceptance/administrator/components/com_users', - ]; - - foreach ($suites as $suite) { - $this->taskCodecept($pathToCodeception) - ->arg('--fail-fast') - ->arg('--steps') - ->arg('--debug') - ->env($opts['env']) - ->arg($this->testsPath . $suite) - ->run() - ->stopOnFail(); - } - } - - /** - * Install only Joomla - * - * @param array $opts Additional options - * - * @return void - * @since 4.0.0 - * - * @throws Exception - */ - public function runInstall($opts = ['use-htaccess' => false, 'env' => 'desktop']) - { - $this->say("Running Installation"); - - $pathToCodeception = $this->prepareRun($opts); - - $this->taskCodecept($pathToCodeception) - ->arg('--fail-fast') - ->arg('--steps') - ->arg('--debug') - ->env($opts['env']) - ->arg($this->testsPath . 'acceptance/install/') - ->run() - ->stopOnFail(); - } - - /** - * Prepare the installation - * - * @param array $opts Optional Options - * - * @return string Path to codeception - * - * @since 4.0.0 - * @throws Exception - */ - protected function prepareRun($opts = ['use-htaccess' => false, 'env' => 'desktop']) - { - $this->createTestingSite($opts['use-htaccess']); - - $this->taskRunSelenium(self::SELENIUM_FOLDER, $this->getWebdriver())->run(); - - // Wait until the server started - sleep(3); - - // Make sure to run the build command to generate AcceptanceTester - if ($this->isWindows()) - { - $this->_exec('php ' . $this->getWindowsPath($this->vendorPath . 'bin/codecept') . ' build'); - $pathToCodeception = $this->getWindowsPath($this->vendorPath . 'bin/codecept'); - } - else - { - $this->_exec('php ' . $this->vendorPath . 'bin/codecept build'); - - $pathToCodeception = $this->vendorPath . 'bin/codecept'; - } - - return $pathToCodeception; - } - - /** - * Executes a specific Selenium System Tests in your machine - * - * @param string $pathToTestFile Optional name of the test to be run - * @param string $suite Optional name of the suite containing the tests, Acceptance by default. - * - * @since 3.7.3 - * - * @throws Exception if test not found - * - * @return void - */ - public function runTest($pathToTestFile = null, $suite = 'acceptance') - { - $this->taskRunSelenium(self::SELENIUM_FOLDER, $this->getWebdriver()); - - // Make sure to run the build command to generate AcceptanceTester - $path = $this->vendorPath . 'bin/codecept'; - $this->_exec('php ' . $this->isWindows() ? $this->getWindowsPath($path) : $path . ' build'); - - if (!$pathToTestFile) - { - $this->say('Available tests in the system:'); - - $iterator = new RecursiveIteratorIterator( - new RecursiveDirectoryIterator( - $this->testsPath . '/' . $suite, - RecursiveDirectoryIterator::SKIP_DOTS - ), - RecursiveIteratorIterator::SELF_FIRST - ); - - $tests = array(); - $i = 1; - - $iterator->rewind(); - - while ($iterator->valid()) - { - if (strripos($iterator->getSubPathName(), 'cept.php') - || strripos($iterator->getSubPathName(), 'cest.php') - || strripos($iterator->getSubPathName(), '.feature') - ) - { - $this->say('[' . $i . '] ' . $iterator->getSubPathName()); - - $tests[$i] = $iterator->getSubPathName(); - $i++; - } - - $iterator->next(); - } - - $this->say(''); - $testNumber = $this->ask('Type the number of the test in the list that you want to run...'); - $test = $tests[$testNumber]; - } - - $pathToTestFile = $this->testsPath . '/' . $suite . '/' . $test; - - // Loading the class to display the methods in the class - - // Logic to fetch the class name from the file name - $fileName = explode("/", $test); - - // If the selected file is cest only then we will give the option to execute individual methods, we don't need this in cept or feature files - $i = 1; - - if (isset($fileName[1]) && strripos($fileName[1], 'cest')) - { - require $this->testsPath . '/' . $suite . '/' . $test; - - $className = explode(".", $fileName[1]); - $class_methods = get_class_methods($className[0]); - - $this->say('[' . $i . '] ' . 'All'); - - $methods[$i] = 'All'; - $i++; - - foreach ($class_methods as $method_name) - { - $reflect = new ReflectionMethod($className[0], $method_name); - - if (!$reflect->isConstructor() && $reflect->isPublic()) - { - $this->say('[' . $i . '] ' . $method_name); - - $methods[$i] = $method_name; - - $i++; - } - } - - $this->say(''); - $methodNumber = $this->ask('Please choose the method in the test that you would want to run...'); - $method = $methods[$methodNumber]; - } - - if (isset($method) && $method != 'All') - { - $pathToTestFile = $pathToTestFile . ':' . $method; - } - - $testPathCodecept = $this->vendorPath . 'bin/codecept'; - - $this->taskCodecept($this->isWindows() ? $this->getWindowsPath($testPathCodecept) : $testPathCodecept) - ->test($pathToTestFile) - ->arg('--steps') - ->arg('--debug') - ->run() - ->stopOnFail(); - } - - /** - * Check if local OS is Windows - * - * @return bool - * - * @since 3.7.3 - */ - private function isWindows() - { - return strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'; - } - - /** - * Return the correct path for Windows (needed by CMD) - * - * @param string $path Linux path - * - * @return string - * - * @since 3.7.3 - */ - private function getWindowsPath($path) - { - return str_replace('/', DIRECTORY_SEPARATOR, $path); - } - - /** - * Detect the correct driver for selenium - * - * @return string the webdriver string to use with selenium - * - * @since 3.7.3 - */ - public function getWebdriver() - { - $suiteConfig = $this->getSuiteConfig(); - $driver = $suiteConfig['modules']['config']['JoomlaBrowser']['browser']; - - return $driver; - } - - /** - * Get the suite configuration - * - * @param string $suite Name of the test suite - * - * @return array - * - * @since 3.7.3 - */ - private function getSuiteConfig($suite = 'acceptance') - { - if (!$this->suiteConfig) - { - $this->suiteConfig = Symfony\Component\Yaml\Yaml::parse(file_get_contents(__DIR__ . '/tests/Codeception/' . $suite . '.suite.yml')); - } - - return $this->suiteConfig; - } -} diff --git a/administrator/components/com_actionlogs/Field/ExtensionField.php b/administrator/components/com_actionlogs/Field/ExtensionField.php index 4c420de9b5..18909fd6d0 100644 --- a/administrator/components/com_actionlogs/Field/ExtensionField.php +++ b/administrator/components/com_actionlogs/Field/ExtensionField.php @@ -4,7 +4,7 @@ * @subpackage com_actionlogs * * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Component\Actionlogs\Administrator\Field; diff --git a/administrator/components/com_actionlogs/Field/LogcreatorField.php b/administrator/components/com_actionlogs/Field/LogcreatorField.php index 28ff4cb68d..bedc838c15 100644 --- a/administrator/components/com_actionlogs/Field/LogcreatorField.php +++ b/administrator/components/com_actionlogs/Field/LogcreatorField.php @@ -4,7 +4,7 @@ * @subpackage com_actionlogs * * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Component\Actionlogs\Administrator\Field; @@ -58,12 +58,12 @@ protected function getOptions() // Construct the query $query = $db->getQuery(true) ->select($db->quoteName('u.id', 'value')) - ->select($db->quoteName('u.name', 'text')) + ->select($db->quoteName('u.username', 'text')) ->from($db->quoteName('#__users', 'u')) ->join('INNER', $db->quoteName('#__action_logs', 'c') . ' ON ' . $db->quoteName('c.user_id') . ' = ' . $db->quoteName('u.id')) ->group($db->quoteName('u.id')) - ->group($db->quoteName('u.name')) - ->order($db->quoteName('u.name')); + ->group($db->quoteName('u.username')) + ->order($db->quoteName('u.username')); // Setup the query $db->setQuery($query); diff --git a/administrator/components/com_actionlogs/Field/LogsdaterangeField.php b/administrator/components/com_actionlogs/Field/LogsdaterangeField.php index 44f37727d2..643235bed6 100644 --- a/administrator/components/com_actionlogs/Field/LogsdaterangeField.php +++ b/administrator/components/com_actionlogs/Field/LogsdaterangeField.php @@ -4,7 +4,7 @@ * @subpackage com_actionlogs * * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Component\Actionlogs\Administrator\Field; diff --git a/administrator/components/com_actionlogs/Field/LogtypeField.php b/administrator/components/com_actionlogs/Field/LogtypeField.php index 4a82a9fe16..cd26bff607 100644 --- a/administrator/components/com_actionlogs/Field/LogtypeField.php +++ b/administrator/components/com_actionlogs/Field/LogtypeField.php @@ -4,7 +4,7 @@ * @subpackage com_actionlogs * * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Component\Actionlogs\Administrator\Field; diff --git a/administrator/components/com_actionlogs/Helper/ActionlogsHelper.php b/administrator/components/com_actionlogs/Helper/ActionlogsHelper.php index dfa7388bc7..64a0cd4896 100644 --- a/administrator/components/com_actionlogs/Helper/ActionlogsHelper.php +++ b/administrator/components/com_actionlogs/Helper/ActionlogsHelper.php @@ -26,6 +26,14 @@ */ class ActionlogsHelper { + /** + * Array of characters starting a formula + * + * @var array + * @since 3.9.7 + */ + private static $characters = array('=', '+', '-', '@'); + /** * Method to convert logs objects array to an iterable type for use with a CSV export * @@ -49,8 +57,10 @@ public static function getCsvData($data): Generator ); } + $disabledText = Text::_('COM_ACTIONLOGS_DISABLED'); + // Header row - yield ['Id', 'Message', 'Date', 'Extension', 'User', 'Ip']; + yield ['Id', 'Action', 'Extension', 'Date', 'Name', 'IP Address']; foreach ($data as $log) { @@ -58,14 +68,14 @@ public static function getCsvData($data): Generator static::loadTranslationFiles($extension); - yield [ + yield array( 'id' => $log->id, - 'message' => strip_tags(static::getHumanReadableLogMessage($log, false)), + 'message' => self::escapeCsvFormula(strip_tags(static::getHumanReadableLogMessage($log, false))), + 'extension' => self::escapeCsvFormula(Text::_($extension)), 'date' => (new Date($log->log_date, new \DateTimeZone('UTC')))->format('Y-m-d H:i:s T'), - 'extension' => Text::_($extension), - 'name' => $log->name, - 'ip_address' => Text::_($log->ip_address), - ]; + 'name' => self::escapeCsvFormula($log->name), + 'ip_address' => self::escapeCsvFormula($log->ip_address === 'COM_ACTIONLOGS_DISABLED' ? $disabledText : $log->ip_address) + ); } } @@ -196,7 +206,7 @@ public static function getHumanReadableLogMessage($log, $generateLinks = true) $messageData['type'] = Text::_($messageData['type']); } - $linkMode = Factory::getApplication()->get('force_ssl', 0) >= 1 ? 1 : -1; + $linkMode = Factory::getApplication()->get('force_ssl', 0) >= 1 ? Route::TLS_FORCE : Route::TLS_IGNORE; foreach ($messageData as $key => $value) { @@ -330,4 +340,28 @@ public static function loadActionLogPluginsLanguage() // Load com_privacy too. $lang->load('com_privacy', JPATH_ADMINISTRATOR, null, false, true); } + + /** + * Escapes potential characters that start a formula in a CSV value to prevent injection attacks + * + * @param mixed $value csv field value + * + * @return mixed + * + * @since 3.9.7 + */ + protected static function escapeCsvFormula($value) + { + if ($value == '') + { + return $value; + } + + if (in_array($value[0], self::$characters, true)) + { + $value = ' ' . $value; + } + + return $value; + } } diff --git a/administrator/components/com_actionlogs/Model/ActionlogsModel.php b/administrator/components/com_actionlogs/Model/ActionlogsModel.php index 4b2a9b504f..9a71e58694 100644 --- a/administrator/components/com_actionlogs/Model/ActionlogsModel.php +++ b/administrator/components/com_actionlogs/Model/ActionlogsModel.php @@ -151,7 +151,7 @@ protected function getListQuery() $date = $this->buildDateRange($dateRange); // If the chosen range is not more than a year ago - if ($date['dNow'] != false) + if ($date['dNow'] !== false && $date['dStart'] !== false) { $dStart = $date['dStart']->format('Y-m-d H:i:s'); $dNow = $date['dNow']->format('Y-m-d H:i:s'); diff --git a/administrator/components/com_actionlogs/View/Actionlogs/HtmlView.php b/administrator/components/com_actionlogs/View/Actionlogs/HtmlView.php index dd42b5e14f..0e9385a365 100644 --- a/administrator/components/com_actionlogs/View/Actionlogs/HtmlView.php +++ b/administrator/components/com_actionlogs/View/Actionlogs/HtmlView.php @@ -101,7 +101,7 @@ public function display($tpl = null) $params = ComponentHelper::getParams('com_actionlogs'); $this->showIpColumn = (bool) $params->get('ip_logging', 0); - if (count($errors = $this->get('Errors'))) + if (count($errors = $model->getErrors())) { throw new GenericDataException(implode("\n", $errors), 500); } diff --git a/administrator/components/com_actionlogs/actionlogs.xml b/administrator/components/com_actionlogs/actionlogs.xml index 758465b5b5..46360db19a 100644 --- a/administrator/components/com_actionlogs/actionlogs.xml +++ b/administrator/components/com_actionlogs/actionlogs.xml @@ -27,8 +27,8 @@ View - language/en-GB.com_actionlogs.ini - language/en-GB.com_actionlogs.sys.ini + language/en-GB/com_actionlogs.ini + language/en-GB/com_actionlogs.sys.ini diff --git a/administrator/components/com_actionlogs/forms/filter_actionlogs.xml b/administrator/components/com_actionlogs/forms/filter_actionlogs.xml index 4d3da01e0a..1c4dcf657f 100644 --- a/administrator/components/com_actionlogs/forms/filter_actionlogs.xml +++ b/administrator/components/com_actionlogs/forms/filter_actionlogs.xml @@ -4,7 +4,9 @@ COM_ACTIONLOGS_EXTENSION_DESC - - + + diff --git a/administrator/components/com_actionlogs/tmpl/actionlogs/default.php b/administrator/components/com_actionlogs/tmpl/actionlogs/default.php index 9679d10230..4cb948d35c 100644 --- a/administrator/components/com_actionlogs/tmpl/actionlogs/default.php +++ b/administrator/components/com_actionlogs/tmpl/actionlogs/default.php @@ -9,7 +9,6 @@ defined('_JEXEC') or die; -use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; @@ -22,34 +21,7 @@ $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); -Factory::getDocument()->addScriptDeclaration(' - Joomla.submitbutton = function(task) - { - if (task == "actionlogs.exportLogs") - { - Joomla.submitform(task, document.getElementById("exportForm")); - - return; - } - - if (task == "actionlogs.exportSelectedLogs") - { - // Get id of selected action logs item and pass it to export form hidden input - var cids = []; - - jQuery("input[name=\'cid[]\']:checked").each(function() { - cids.push(jQuery(this).val()); - }); - - document.exportForm.cids.value = cids.join(","); - Joomla.submitform(task, document.getElementById("exportForm")); - - return; - } - - Joomla.submitform(task); - }; -'); +HTMLHelper::_('script', 'com_actiologs/admin-actionlogs-default.js', ['relative' => true, 'version' => 'auto']); ?>
@@ -71,24 +43,24 @@ - + - + - + - + showIpColumn) : ?> - + - + @@ -101,27 +73,27 @@ id); ?> - + - + escape(Text::_($extension)); ?> - + log_date); ?>
log_date, Text::_('DATE_FORMAT_LC6')); ?>
- + name; ?> showIpColumn) : ?> - + escape($item->ip_address)); ?> - + id; ?> diff --git a/administrator/components/com_admin/Model/SysinfoModel.php b/administrator/components/com_admin/Model/SysinfoModel.php index e699a022a9..8d990a3bde 100644 --- a/administrator/components/com_admin/Model/SysinfoModel.php +++ b/administrator/components/com_admin/Model/SysinfoModel.php @@ -308,16 +308,18 @@ public function &getInfo() $db = $this->getDbo(); $this->info = array( - 'php' => php_uname(), - 'dbserver' => $db->getServerType(), - 'dbversion' => $db->getVersion(), - 'dbcollation' => $db->getCollation(), - 'dbconnectioncollation' => $db->getConnectionCollation(), - 'phpversion' => PHP_VERSION, - 'server' => $_SERVER['SERVER_SOFTWARE'] ?? getenv('SERVER_SOFTWARE'), - 'sapi_name' => PHP_SAPI, - 'version' => (new Version)->getLongVersion(), - 'useragent' => $_SERVER['HTTP_USER_AGENT'] ?? '', + 'php' => php_uname(), + 'dbserver' => $db->getServerType(), + 'dbversion' => $db->getVersion(), + 'dbcollation' => $db->getCollation(), + 'dbconnectioncollation' => $db->getConnectionCollation(), + 'dbconnectionencryption' => $db->getConnectionEncryption(), + 'dbconnencryptsupported' => $db->isConnectionEncryptionSupported(), + 'phpversion' => PHP_VERSION, + 'server' => $_SERVER['SERVER_SOFTWARE'] ?? getenv('SERVER_SOFTWARE'), + 'sapi_name' => PHP_SAPI, + 'version' => (new Version)->getLongVersion(), + 'useragent' => $_SERVER['HTTP_USER_AGENT'] ?? '', ); return $this->info; @@ -530,7 +532,7 @@ public function getDirectory($public = false) foreach ($admin_langs as $folder) { - if (!$folder->isDir() || $folder->isDot()) + if ($folder->isDot() || !$folder->isDir()) { continue; } @@ -546,7 +548,7 @@ public function getDirectory($public = false) foreach ($manifests as $folder) { - if (!$folder->isDir() || $folder->isDot()) + if ($folder->isDot() || !$folder->isDir()) { continue; } @@ -569,7 +571,7 @@ public function getDirectory($public = false) foreach ($image_folders as $folder) { - if (!$folder->isDir() || $folder->isDot()) + if ($folder->isDot() || !$folder->isDir()) { continue; } @@ -587,7 +589,7 @@ public function getDirectory($public = false) foreach ($site_langs as $folder) { - if (!$folder->isDir() || $folder->isDot()) + if ($folder->isDot() || !$folder->isDir()) { continue; } @@ -605,7 +607,7 @@ public function getDirectory($public = false) foreach ($plugin_groups as $folder) { - if (!$folder->isDir() || $folder->isDot()) + if ($folder->isDot() || !$folder->isDir()) { continue; } diff --git a/administrator/components/com_admin/admin.xml b/administrator/components/com_admin/admin.xml index 2614d4fc38..5c49dbb177 100644 --- a/administrator/components/com_admin/admin.xml +++ b/administrator/components/com_admin/admin.xml @@ -27,8 +27,8 @@ View - language/en-GB.com_admin.ini - language/en-GB.com_admin.sys.ini + language/en-GB/com_admin.ini + language/en-GB/com_admin.sys.ini diff --git a/administrator/components/com_admin/postinstall/eaccelerator.php b/administrator/components/com_admin/postinstall/eaccelerator.php deleted file mode 100644 index 0be79e70fc..0000000000 --- a/administrator/components/com_admin/postinstall/eaccelerator.php +++ /dev/null @@ -1,83 +0,0 @@ -get('cacheHandler', ''); - - return (ucfirst($cacheHandler) == 'Eaccelerator'); -} - -/** - * Disables the unsupported eAccelerator caching method, replacing it with the "file" caching method. - * - * @return void - * - * @since 3.2 - */ -function admin_postinstall_eaccelerator_action() -{ - $prev = ArrayHelper::fromObject(new JConfig); - $data = array_merge($prev, array('cacheHandler' => 'file')); - - $config = new Registry($data); - - // Set the configuration file path. - $file = JPATH_CONFIGURATION . '/configuration.php'; - - // Get the new FTP credentials. - $ftp = ClientHelper::getCredentials('ftp', true); - - // Attempt to make the file writeable if using FTP. - if (!$ftp['enabled'] && Path::isOwner($file) && !Path::setPermissions($file, '0644')) - { - Factory::getApplication()->enqueueMessage(Text::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTWRITABLE'), 'notice'); - } - - // Attempt to write the configuration file as a PHP class named JConfig. - $configuration = $config->toString('PHP', array('class' => 'JConfig', 'closingtag' => false)); - - if (!File::write($file, $configuration)) - { - Factory::getApplication()->enqueueMessage(Text::_('COM_CONFIG_ERROR_WRITE_FAILED'), 'error'); - - return; - } - - // Attempt to make the file unwriteable if using FTP. - if (!$ftp['enabled'] && Path::isOwner($file) && !Path::setPermissions($file, '0444')) - { - Factory::getApplication()->enqueueMessage(Text::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTUNWRITABLE'), 'notice'); - } -} diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index 517af38206..ebb8c56ed0 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -784,6 +784,7 @@ public function deleteUnexistingFiles() '/administrator/components/com_contact/models/forms/fields/mail.xml', '/administrator/components/com_contact/models/forms/filter_contacts.xml', '/administrator/components/com_contact/tables/contact.php', + '/administrator/components/com_contact/tmpl/contacts/default_batch.php', '/administrator/components/com_contact/views/contact/tmpl/edit.php', '/administrator/components/com_contact/views/contact/tmpl/edit_associations.php', '/administrator/components/com_contact/views/contact/tmpl/edit_metadata.php', @@ -6075,4 +6076,354 @@ private function cleanJoomlaCache() $model->setState('client_id', 1); $model->clean(); } + + /** + * Called after any type of action + * + * @param string $action Which action is happening (install|uninstall|discover_install|update) + * @param Installer $installer The class calling this method + * + * @return boolean True on success + * + * @since __DEPLOY_VERSION__ + */ + public function postflight($action, $installer) + { + if ($action !== 'update') + { + return true; + } + + if (empty($this->fromVersion) || version_compare($this->fromVersion, '4.0.0', 'ge')) + { + return true; + } + + $db = Factory::getDbo(); + Table::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_menus/Table/'); + + $tableItem = new \Joomla\Component\Menus\Administrator\Table\MenuTable($db); + + $contactItems = $this->contactItems($tableItem); + $finderItems = $this->finderItems($tableItem); + + $menuItems = array_merge($contactItems, $finderItems); + + foreach ($menuItems as $menuItem) + { + // Check an existing record + $keys = [ + 'menutype' => $menuItem['menutype'], + 'type' => $menuItem['type'], + 'title' => $menuItem['title'], + 'parent_id' => $menuItem['parent_id'], + 'client_id' => $menuItem['client_id'], + ]; + + if ($tableItem->load($keys)) + { + continue; + } + + $newTableItem = new \Joomla\Component\Menus\Administrator\Table\MenuTable($db); + + // Bind the data. + if (!$newTableItem->bind($menuItem)) + { + return false; + } + + $newTableItem->setLocation($menuItem['parent_id'], 'last-child'); + + // Check the data. + if (!$newTableItem->check()) + { + return false; + } + + // Store the data. + if (!$newTableItem->store()) + { + return false; + } + + // Rebuild the tree path. + if (!$newTableItem->rebuildPath($newTableItem->id)) + { + return false; + } + } + + return true; + } + + /** + * Prepare the contact menu items + * + * @return array Menu items + * + * @since __DEPLOY_VERSION__ + */ + private function contactItems(Table $tableItem): array + { + // Check for the Contact parent Id Menu Item + $keys = [ + 'menutype' => 'main', + 'type' => 'component', + 'title' => 'com_contact', + 'parent_id' => 1, + 'client_id' => 1, + ]; + + $contactMenuitem = $tableItem->load($keys); + + if (!$contactMenuitem) + { + return []; + } + + $parentId = $tableItem->id; + $componentId = ExtensionHelper::getExtensionRecord('com_fields')->extension_id; + + // Add Contact Fields Menu Items. + $menuItems = [ + [ + 'menutype' => 'main', + 'title' => '-', + 'alias' => microtime(true), + 'note' => '', + 'path' => '', + 'link' => '#', + 'type' => 'separator', + 'published' => 1, + 'parent_id' => $parentId, + 'level' => 2, + 'component_id' => $componentId, + 'checked_out' => 0, + 'checked_out_time' => null, + 'browserNav' => 0, + 'access' => 0, + 'img' => '', + 'template_style_id' => 0, + 'params' => '{}', + 'home' => 0, + 'language' => '*', + 'client_id' => 1, + 'publish_up' => null, + 'publish_down' => null, + ], + [ + 'menutype' => 'main', + 'title' => 'mod_menu_fields', + 'alias' => 'Contact Custom Fields', + 'note' => '', + 'path' => 'contact/Custom Fields', + 'link' => 'index.php?option=com_fields&context=com_contact.contact', + 'type' => 'component', + 'published' => 1, + 'parent_id' => $parentId, + 'level' => 2, + 'component_id' => $componentId, + 'checked_out' => 0, + 'checked_out_time' => null, + 'browserNav' => 0, + 'access' => 0, + 'img' => '', + 'template_style_id' => 0, + 'params' => '{}', + 'home' => 0, + 'language' => '*', + 'client_id' => 1, + 'publish_up' => null, + 'publish_down' => null, + ], + [ + 'menutype' => 'main', + 'title' => 'mod_menu_fields_group', + 'alias' => 'Contact Custom Fields Group', + 'note' => '', + 'path' => 'contact/Custom Fields Group', + 'link' => 'index.php?option=com_fields&view=groups&context=com_contact.contact', + 'type' => 'component', + 'published' => 1, + 'parent_id' => $parentId, + 'level' => 2, + 'component_id' => $componentId, + 'checked_out' => 0, + 'checked_out_time' => null, + 'browserNav' => 0, + 'access' => 0, + 'img' => '', + 'template_style_id' => 0, + 'params' => '{}', + 'home' => 0, + 'language' => '*', + 'client_id' => 1, + 'publish_up' => null, + 'publish_down' => null, + ] + ]; + + return $menuItems; + } + + /** + * Prepare the finder menu items + * + * @return array Menu items + * + * @since __DEPLOY_VERSION__ + */ + private function finderItems(Table $tableItem): array + { + // Check for the Finder parent Id Menu Item + $keys = [ + 'menutype' => 'main', + 'type' => 'component', + 'title' => 'com_finder', + 'parent_id' => 1, + 'client_id' => 1, + ]; + + $finderMenuitem = $tableItem->load($keys); + + if (!$finderMenuitem) + { + return []; + } + + $parentId = $tableItem->id; + $componentId = ExtensionHelper::getExtensionRecord('com_finder')->extension_id; + + // Add Finder Fields Menu Items. + $menuItems = [ + [ + 'menutype' => 'main', + 'title' => '-', + 'alias' => microtime(true), + 'note' => '', + 'path' => '', + 'link' => '#', + 'type' => 'separator', + 'published' => 1, + 'parent_id' => $parentId, + 'level' => 2, + 'component_id' => $componentId, + 'checked_out' => 0, + 'checked_out_time' => null, + 'browserNav' => 0, + 'access' => 0, + 'img' => '', + 'template_style_id' => 0, + 'params' => '{}', + 'home' => 0, + 'language' => '*', + 'client_id' => 1, + 'publish_up' => null, + 'publish_down' => null, + ], + [ + 'menutype' => 'main', + 'title' => 'com_finder_index', + 'alias' => 'Smart-Search-Index', + 'note' => '', + 'path' => 'Smart Search/Index', + 'link' => 'index.php?option=com_finder&view=index', + 'type' => 'component', + 'published' => 1, + 'parent_id' => $parentId, + 'level' => 2, + 'component_id' => $componentId, + 'checked_out' => 0, + 'checked_out_time' => null, + 'browserNav' => 0, + 'access' => 0, + 'img' => '', + 'template_style_id' => 0, + 'params' => '{}', + 'home' => 0, + 'language' => '*', + 'client_id' => 1, + 'publish_up' => null, + 'publish_down' => null, + ], + [ + 'menutype' => 'main', + 'title' => 'com_finder_maps', + 'alias' => 'Smart-Search-Maps', + 'note' => '', + 'path' => 'Smart Search/Maps', + 'link' => 'index.php?option=com_finder&view=maps', + 'type' => 'component', + 'published' => 1, + 'parent_id' => $parentId, + 'level' => 2, + 'component_id' => $componentId, + 'checked_out' => 0, + 'checked_out_time' => null, + 'browserNav' => 0, + 'access' => 0, + 'img' => '', + 'template_style_id' => 0, + 'params' => '{}', + 'home' => 0, + 'language' => '*', + 'client_id' => 1, + 'publish_up' => null, + 'publish_down' => null, + ], + [ + 'menutype' => 'main', + 'title' => 'com_finder_filters', + 'alias' => 'Smart-Search-Filters', + 'note' => '', + 'path' => 'Smart Search/Filters', + 'link' => 'index.php?option=com_finder&view=filters', + 'type' => 'component', + 'published' => 1, + 'parent_id' => $parentId, + 'level' => 2, + 'component_id' => $componentId, + 'checked_out' => 0, + 'checked_out_time' => null, + 'browserNav' => 0, + 'access' => 0, + 'img' => '', + 'template_style_id' => 0, + 'params' => '{}', + 'home' => 0, + 'language' => '*', + 'client_id' => 1, + 'publish_up' => null, + 'publish_down' => null, + ], + [ + 'menutype' => 'main', + 'title' => 'com_finder_searches', + 'alias' => 'Smart-Search-Searches', + 'note' => '', + 'path' => 'Smart Search/Searches', + 'link' => 'index.php?option=com_finder&view=searches', + 'type' => 'component', + 'published' => 1, + 'parent_id' => $parentId, + 'level' => 2, + 'component_id' => $componentId, + 'checked_out' => 0, + 'checked_out_time' => null, + 'browserNav' => 0, + 'access' => 0, + 'img' => '', + 'template_style_id' => 0, + 'params' => '{}', + 'home' => 0, + 'language' => '*', + 'client_id' => 1, + 'publish_up' => null, + 'publish_down' => null, + ] + ]; + + return $menuItems; + } } diff --git a/administrator/components/com_admin/sql/updates/mysql/3.8.0-2017-07-28.sql b/administrator/components/com_admin/sql/updates/mysql/3.8.0-2017-07-28.sql deleted file mode 100644 index 3ea86df61f..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.8.0-2017-07-28.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `#__fields_groups` ADD COLUMN `params` TEXT NOT NULL AFTER `ordering`; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.8.0-2017-07-31.sql b/administrator/components/com_admin/sql/updates/mysql/3.8.0-2017-07-31.sql deleted file mode 100644 index 08693d56b7..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.8.0-2017-07-31.sql +++ /dev/null @@ -1,5 +0,0 @@ -INSERT INTO `#__extensions` -(`package_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 - (0, 'mod_sampledata', 'module', 'mod_sampledata', '', 1, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), - (0, 'plg_sampledata_blog', 'plugin', 'blog', 'sampledata', 0, 0, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.8.2-2017-10-14.sql b/administrator/components/com_admin/sql/updates/mysql/3.8.2-2017-10-14.sql deleted file mode 100644 index d379ef208d..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.8.2-2017-10-14.sql +++ /dev/null @@ -1,5 +0,0 @@ --- --- Add index for alias check #__content --- - -ALTER TABLE `#__content` ADD INDEX `idx_alias` (`alias`(191)); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.8.4-2018-01-16.sql b/administrator/components/com_admin/sql/updates/mysql/3.8.4-2018-01-16.sql deleted file mode 100644 index 1d204b7f63..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.8.4-2018-01-16.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `#__user_keys` DROP INDEX `series_2`; -ALTER TABLE `#__user_keys` DROP INDEX `series_3`; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.8.8-2018-05-18.sql b/administrator/components/com_admin/sql/updates/mysql/3.8.8-2018-05-18.sql deleted file mode 100644 index 981549dd05..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.8.8-2018-05-18.sql +++ /dev/null @@ -1,3 +0,0 @@ -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, 'COM_CPANEL_MSG_UPDATEDEFAULTSETTINGS_TITLE', 'COM_CPANEL_MSG_UPDATEDEFAULTSETTINGS_BODY', '', 'com_cpanel', 1, 'message', '', '', 'admin://components/com_admin/postinstall/updatedefaultsettings.php', 'admin_postinstall_updatedefaultsettings_condition', '3.8.8', 1); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.8.9-2018-06-19.sql b/administrator/components/com_admin/sql/updates/mysql/3.8.9-2018-06-19.sql deleted file mode 100644 index cd46b4624a..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.8.9-2018-06-19.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Enable Sample Data Module. -UPDATE `#__extensions` SET `enabled` = '1' WHERE `name` = 'mod_sampledata'; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-02.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-02.sql deleted file mode 100644 index 705bd93688..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-02.sql +++ /dev/null @@ -1,16 +0,0 @@ -INSERT INTO `#__extensions` (`extension_id`, `package_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 -(35, 0, 'com_privacy', 'component', 'com_privacy', '', 1, 1, 1, 1, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0); - -CREATE TABLE IF NOT EXISTS `#__privacy_requests` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `email` varchar(100) NOT NULL DEFAULT '', - `requested_at` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `status` tinyint(4) NOT NULL DEFAULT 0, - `request_type` varchar(25) NOT NULL DEFAULT '', - `confirm_token` varchar(100) NOT NULL DEFAULT '', - `confirm_token_created_at` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `checked_out` int(11) NOT NULL DEFAULT 0, - `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - PRIMARY KEY (`id`), - KEY `idx_checkout` (`checked_out`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-03.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-03.sql deleted file mode 100644 index d1f294af6a..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-03.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `#__extensions` (`extension_id`, `package_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 -(482, 0, 'plg_content_confirmconsent', 'plugin', 'confirmconsent', 'content', 0, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-05.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-05.sql deleted file mode 100644 index 78db9a8d1c..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-05.sql +++ /dev/null @@ -1,85 +0,0 @@ -INSERT INTO `#__extensions` (`extension_id`, `package_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 -(36, 0, 'com_actionlogs', 'component', 'com_actionlogs', '', 1, 1, 1, 1, '', '{"ip_logging":0,"csv_delimiter":",","loggable_extensions":["com_banners","com_cache","com_categories","com_config","com_contact","com_content","com_installer","com_media","com_menus","com_messages","com_modules","com_newsfeeds","com_plugins","com_redirect","com_tags","com_templates","com_users"]}', '', '', 0, '0000-00-00 00:00:00', 0, 0), -(483, 0, 'plg_system_actionlogs', 'plugin', 'actionlogs', 'system', 0, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), -(484, 0, 'plg_actionlog_joomla', 'plugin', 'joomla', 'actionlog', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0); - - --- --- Table structure for table `#__action_logs` --- - -CREATE TABLE IF NOT EXISTS `#__action_logs` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `message_language_key` varchar(255) NOT NULL DEFAULT '', - `message` text NOT NULL, - `log_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `extension` varchar(50) NOT NULL DEFAULT '', - `user_id` int(11) NOT NULL DEFAULT 0, - `item_id` int(11) NOT NULL DEFAULT 0, - `ip_address` VARCHAR(40) NOT NULL DEFAULT '0.0.0.0', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; - --- --- Table structure for table `#__action_logs_extensions` --- - -CREATE TABLE IF NOT EXISTS `#__action_logs_extensions` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `extension` varchar(255) NOT NULL DEFAULT '', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; - -INSERT INTO `#__action_logs_extensions` (`id`, `extension`) VALUES -(1, 'com_banners'), -(2, 'com_cache'), -(3, 'com_categories'), -(4, 'com_config'), -(5, 'com_contact'), -(6, 'com_content'), -(7, 'com_installer'), -(8, 'com_media'), -(9, 'com_menus'), -(10, 'com_messages'), -(11, 'com_modules'), -(12, 'com_newsfeeds'), -(13, 'com_plugins'), -(14, 'com_redirect'), -(15, 'com_tags'), -(16, 'com_templates'), -(17, 'com_users'); - --- --- Table structure for table `#__action_log_config` --- - -CREATE TABLE IF NOT EXISTS `#__action_log_config` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `type_title` varchar(255) NOT NULL DEFAULT '', - `type_alias` varchar(255) NOT NULL DEFAULT '', - `id_holder` varchar(255), - `title_holder` varchar(255), - `table_name` varchar(255), - `text_prefix` varchar(255), - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; - -INSERT INTO `#__action_log_config` (`id`, `type_title`, `type_alias`, `id_holder`, `title_holder`, `table_name`, `text_prefix`) VALUES -(1, 'article', 'com_content.article', 'id' ,'title' , '#__content', 'PLG_ACTIONLOG_JOOMLA'), -(2, 'article', 'com_content.form', 'id', 'title' , '#__content', 'PLG_ACTIONLOG_JOOMLA'), -(3, 'banner', 'com_banners.banner', 'id' ,'name' , '#__banners', 'PLG_ACTIONLOG_JOOMLA'), -(4, 'user_note', 'com_users.note', 'id', 'subject' ,'#__user_notes', 'PLG_ACTIONLOG_JOOMLA'), -(5, 'media', 'com_media.file', '' , 'name' , '', 'PLG_ACTIONLOG_JOOMLA'), -(6, 'category', 'com_categories.category', 'id' , 'title' , '#__categories', 'PLG_ACTIONLOG_JOOMLA'), -(7, 'menu', 'com_menus.menu', 'id' ,'title' , '#__menu_types', 'PLG_ACTIONLOG_JOOMLA'), -(8, 'menu_item', 'com_menus.item', 'id' , 'title' , '#__menu', 'PLG_ACTIONLOG_JOOMLA'), -(9, 'newsfeed', 'com_newsfeeds.newsfeed', 'id' ,'name' , '#__newsfeeds', 'PLG_ACTIONLOG_JOOMLA'), -(10, 'link', 'com_redirect.link', 'id', 'old_url' , '#__redirect_links', 'PLG_ACTIONLOG_JOOMLA'), -(11, 'tag', 'com_tags.tag', 'id', 'title' , '#__tags', 'PLG_ACTIONLOG_JOOMLA'), -(12, 'style', 'com_templates.style', 'id' , 'title' , '#__template_styles', 'PLG_ACTIONLOG_JOOMLA'), -(13, 'plugin', 'com_plugins.plugin', 'extension_id' , 'name' , '#__extensions', 'PLG_ACTIONLOG_JOOMLA'), -(14, 'component_config', 'com_config.component', 'extension_id' , 'name', '', 'PLG_ACTIONLOG_JOOMLA'), -(15, 'contact', 'com_contact.contact', 'id', 'name', '#__contact_details', 'PLG_ACTIONLOG_JOOMLA'), -(16, 'module', 'com_modules.module', 'id' ,'title', '#__modules', 'PLG_ACTIONLOG_JOOMLA'), -(17, 'access_level', 'com_users.level', 'id' , 'title', '#__viewlevels', 'PLG_ACTIONLOG_JOOMLA'), -(18, 'banner_client', 'com_banners.client', 'id', 'name', '#__banner_clients', 'PLG_ACTIONLOG_JOOMLA'); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-19.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-19.sql deleted file mode 100644 index 512acbd7f7..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-19.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `#__extensions` (`extension_id`, `package_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 -(481, 0, 'plg_fields_repeatable', 'plugin', 'repeatable', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-20.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-20.sql deleted file mode 100644 index 8b918f8c25..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-20.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `#__extensions` (`extension_id`, `package_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 -(319, 0, 'mod_latestactions', 'module', 'mod_latestactions', '', 1, 1, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-24.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-24.sql deleted file mode 100644 index f743b9c076..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-24.sql +++ /dev/null @@ -1,14 +0,0 @@ -INSERT INTO `#__extensions` (`extension_id`, `package_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 -(485, 0, 'plg_system_privacyconsent', 'plugin', 'privacyconsent', 'system', 0, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0); - -CREATE TABLE IF NOT EXISTS `#__privacy_consents` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned NOT NULL DEFAULT 0, - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `subject` varchar(255) NOT NULL DEFAULT '', - `body` text NOT NULL, - `remind` tinyint(4) NOT NULL DEFAULT 0, - `token` varchar(100) NOT NULL DEFAULT '', - PRIMARY KEY (`id`), - KEY `idx_user_id` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-27.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-27.sql deleted file mode 100644 index ab0958e02c..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-05-27.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO `#__extensions` (`extension_id`, `package_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 -(486, 0, 'plg_system_logrotation', 'plugin', 'logrotation', 'system', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), -(487, 0, 'plg_privacy_user', 'plugin', 'user', 'privacy', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-06-02.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-06-02.sql deleted file mode 100644 index 4dea034967..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-06-02.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `#__content` ADD COLUMN `note` VARCHAR(255) NOT NULL DEFAULT ''; - -UPDATE `#__content_types` SET `field_mappings` = -'{"common":{"core_content_item_id":"id","core_title":"title","core_state":"state","core_alias":"alias","core_created_time":"created","core_modified_time":"modified","core_body":"introtext", "core_hits":"hits","core_publish_up":"publish_up","core_publish_down":"publish_down","core_access":"access", "core_params":"attribs", "core_featured":"featured", "core_metadata":"metadata", "core_language":"language", "core_images":"images", "core_urls":"urls", "core_version":"version", "core_ordering":"ordering", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"catid", "core_xreference":"xreference", "asset_id":"asset_id", "note":"note"}, "special":{"fulltext":"fulltext"}}' WHERE `type_title` = 'Article'; \ No newline at end of file diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-06-12.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-06-12.sql deleted file mode 100644 index c45e9d6c7d..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-06-12.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `#__extensions` (`extension_id`, `package_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 -(320, 0, 'mod_privacy_dashboard', 'module', 'mod_privacy_dashboard', '', 1, 1, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-06-13.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-06-13.sql deleted file mode 100644 index edda438809..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-06-13.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `#__extensions` (`extension_id`, `package_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 -(488, 0, 'plg_quickicon_privacycheck', 'plugin', 'privacycheck', 'quickicon', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-06-14.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-06-14.sql deleted file mode 100644 index cc18b1d191..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-06-14.sql +++ /dev/null @@ -1,3 +0,0 @@ -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, 'COM_ACTIONLOGS_POSTINSTALL_TITLE', 'COM_ACTIONLOGS_POSTINSTALL_BODY', '', 'com_actionlogs', 1, 'message', '', '', '', '', '3.9.0', 1), -(700, 'COM_PRIVACY_POSTINSTALL_TITLE', 'COM_PRIVACY_POSTINSTALL_BODY', '', 'com_privacy', 1, 'message', '', '', '', '', '3.9.0', 1); \ No newline at end of file diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-06-17.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-06-17.sql deleted file mode 100644 index d3d3ee5f93..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-06-17.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `#__extensions` (`extension_id`, `package_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 -(489, 0, 'plg_user_terms', 'plugin', 'terms', 'user', 0, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-07-09.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-07-09.sql deleted file mode 100644 index 7c8215c3f9..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-07-09.sql +++ /dev/null @@ -1,4 +0,0 @@ -INSERT INTO `#__extensions` (`extension_id`, `package_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 -(490, 0, 'plg_privacy_contact', 'plugin', 'contact', 'privacy', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), -(491, 0, 'plg_privacy_content', 'plugin', 'content', 'privacy', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), -(492, 0, 'plg_privacy_message', 'plugin', 'message', 'privacy', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-07-10.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-07-10.sql deleted file mode 100644 index 3c8c70a81a..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-07-10.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `#__action_log_config` (`id`, `type_title`, `type_alias`, `id_holder`, `title_holder`, `table_name`, `text_prefix`) - VALUES (19, 'application_config', 'com_config.application', '', 'name', '', 'PLG_ACTIONLOG_JOOMLA'); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-07-11.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-07-11.sql deleted file mode 100644 index a6b89c858e..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-07-11.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `#__extensions` (`extension_id`, `package_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 -(493, 0, 'plg_privacy_actionlogs', 'plugin', 'actionlogs', 'privacy', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-08-12.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-08-12.sql deleted file mode 100644 index e1c5cee804..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-08-12.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `#__privacy_consents` ADD COLUMN `state` INT(10) NOT NULL DEFAULT 1 AFTER `user_id`; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-08-28.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-08-28.sql deleted file mode 100644 index e181ed56f8..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-08-28.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `#__session` MODIFY `session_id` varbinary(192) NOT NULL; -ALTER TABLE `#__session` MODIFY `guest` tinyint(3) unsigned DEFAULT 1; -ALTER TABLE `#__session` MODIFY `time` int(11) NOT NULL DEFAULT 0; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-08-29.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-08-29.sql deleted file mode 100644 index 9fe0097bbc..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-08-29.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `#__extensions` (`extension_id`, `package_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 -(494, 0, 'plg_captcha_recaptcha_invisible', 'plugin', 'recaptcha_invisible', 'captcha', 0, 0, 1, 0, '', '{"public_key":"","private_key":"","theme":"clean"}', '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-09-04.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-09-04.sql deleted file mode 100644 index 14bfe2497e..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-09-04.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE IF NOT EXISTS `#__action_logs_users` ( - `user_id` int(11) UNSIGNED NOT NULL, - `notify` tinyint(1) UNSIGNED NOT NULL, - `extensions` text NOT NULL, - PRIMARY KEY (`user_id`), - KEY `idx_notify` (`notify`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-10-15.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-10-15.sql deleted file mode 100644 index c9a13c1f64..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-10-15.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `#__action_logs` ADD INDEX `idx_user_id` (`user_id`); -ALTER TABLE `#__action_logs` ADD INDEX `idx_user_id_logdate` (`user_id`, `log_date`); -ALTER TABLE `#__action_logs` ADD INDEX `idx_user_id_extension` (`user_id`, `extension`); -ALTER TABLE `#__action_logs` ADD INDEX `idx_extension_item_id` (`extension`, `item_id`); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-10-20.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-10-20.sql deleted file mode 100644 index 79f266d890..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-10-20.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `#__privacy_requests` DROP INDEX `idx_checkout`; -ALTER TABLE `#__privacy_requests` DROP COLUMN `checked_out`; -ALTER TABLE `#__privacy_requests` DROP COLUMN `checked_out_time`; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-10-21.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-10-21.sql deleted file mode 100644 index 1fafdfdc2c..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-10-21.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `#__extensions` (`extension_id`, `package_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 -(495, 0, 'plg_privacy_consents', 'plugin', 'consents', 'privacy', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.3-2019-01-12.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.3-2019-01-12.sql deleted file mode 100644 index f5d2d6ca9c..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.3-2019-01-12.sql +++ /dev/null @@ -1,6 +0,0 @@ -UPDATE `#__extensions` -SET `params` = REPLACE(`params`, '"com_categories",', '"com_categories","com_checkin",') -WHERE `name` = 'com_actionlogs'; - -INSERT INTO `#__action_logs_extensions` (`extension`) VALUES -('com_checkin'); \ No newline at end of file diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.3-2019-02-07.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.3-2019-02-07.sql deleted file mode 100644 index 4536e316ad..0000000000 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.3-2019-02-07.sql +++ /dev/null @@ -1,3 +0,0 @@ -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, 'COM_CPANEL_MSG_ADDNOSNIFF_TITLE', 'COM_CPANEL_MSG_ADDNOSNIFF_BODY', '', 'com_cpanel', 1, 'message', '', '', 'admin://components/com_admin/postinstall/addnosniff.php', 'admin_postinstall_addnosniff_condition', '3.9.3', 1); diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-05-15.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-05-15.sql index d265768211..7bbedc437e 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-05-15.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-05-15.sql @@ -12,10 +12,12 @@ CREATE TABLE IF NOT EXISTS `#__workflows` ( `default` tinyint(1) NOT NULL DEFAULT 0, `core` tinyint(1) NOT NULL DEFAULT 0, `ordering` int(11) NOT NULL DEFAULT 0, - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` datetime NOT NULL, `created_by` int(10) NOT NULL DEFAULT 0, - `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `modified` datetime NOT NULL, `modified_by` int(10) NOT NULL DEFAULT 0, + `checked_out_time` datetime, + `checked_out` int(10) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_asset_id` (`asset_id`), KEY `idx_title` (`title`(191)), @@ -24,15 +26,16 @@ CREATE TABLE IF NOT EXISTS `#__workflows` ( KEY `idx_created` (`created`), KEY `idx_created_by` (`created_by`), KEY `idx_modified` (`modified`), - KEY `idx_modified_by` (`modified_by`) + KEY `idx_modified_by` (`modified_by`), + KEY `idx_checked_out` (`checked_out`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; -- -- Dumping data for table `#__workflows` -- -INSERT INTO `#__workflows` (`id`, `asset_id`, `published`, `title`, `description`, `extension`, `default`, `core`, `ordering`, `created`, `created_by`, `modified`, `modified_by`) VALUES -(1, 0, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, 1, '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 0); +INSERT INTO `#__workflows` (`id`, `asset_id`, `published`, `title`, `description`, `extension`, `default`, `core`,`ordering`, `created`, `created_by`, `modified`, `modified_by`, `checked_out_time`, `checked_out`) VALUES +(1, 0, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, 1, CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, NULL, 0); -- -- Table structure for table `#__workflow_associations` @@ -63,8 +66,11 @@ CREATE TABLE IF NOT EXISTS `#__workflow_stages` ( `description` text NOT NULL, `condition` int(10) DEFAULT 0, `default` tinyint(1) NOT NULL DEFAULT 0, + `checked_out_time` datetime, + `checked_out` int(10) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_workflow_id` (`workflow_id`), + KEY `idx_checked_out` (`checked_out`), KEY `idx_title` (`title`(191)), KEY `idx_asset_id` (`asset_id`), KEY `idx_default` (`default`) @@ -74,11 +80,11 @@ CREATE TABLE IF NOT EXISTS `#__workflow_stages` ( -- Dumping data for table `#__workflow_stages` -- -INSERT INTO `#__workflow_stages` (`id`, `asset_id`, `ordering`, `workflow_id`, `published`, `title`, `description`, `condition`, `default`) VALUES -(1, 0, 1, 1, 1, 'JUNPUBLISHED', '', 0, 1), -(2, 0, 2, 1, 1, 'JPUBLISHED', '', 1, 0), -(3, 0, 3, 1, 1, 'JTRASHED', '', -2, 0), -(4, 0, 4, 1, 1, 'JARCHIVED', '', 2, 0); +INSERT INTO `#__workflow_stages` (`id`, `asset_id`, `ordering`, `workflow_id`, `published`, `title`, `description`, `condition`, `default`, `checked_out_time`, `checked_out`) VALUES +(1, 0, 1, 1, 1, 'JUNPUBLISHED', '', 0, 1, NULL, 0), +(2, 0, 2, 1, 1, 'JPUBLISHED', '', 1, 0, NULL, 0), +(3, 0, 3, 1, 1, 'JTRASHED', '', -2, 0, NULL, 0), +(4, 0, 4, 1, 1, 'JARCHIVED', '', 2, 0, NULL, 0); -- -- Table structure for table `#__workflow_transitions` @@ -94,9 +100,12 @@ CREATE TABLE IF NOT EXISTS `#__workflow_transitions` ( `description` text NOT NULL, `from_stage_id` int(10) NOT NULL, `to_stage_id` int(10) NOT NULL, + `checked_out_time` datetime, + `checked_out` int(10) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `idx_title` (`title`(191)), KEY `idx_asset_id` (`asset_id`), + KEY `idx_checked_out` (`checked_out`), KEY `idx_from_stage_id` (`from_stage_id`), KEY `idx_to_stage_id` (`to_stage_id`), KEY `idx_workflow_id` (`workflow_id`) @@ -106,11 +115,11 @@ CREATE TABLE IF NOT EXISTS `#__workflow_transitions` ( -- Dumping data for table `#__workflow_transitions` -- -INSERT INTO `#__workflow_transitions` (`id`, `asset_id`, `published`, `ordering`, `workflow_id`, `title`, `description`, `from_stage_id`, `to_stage_id`) VALUES -(1, 0, 1, 1, 1, 'Unpublish', '', -1, 1), -(2, 0, 1, 2, 1, 'Publish', '', -1, 2), -(3, 0, 1, 3, 1, 'Trash', '', -1, 3), -(4, 0, 1, 4, 1, 'Archive', '', -1, 4); +INSERT INTO `#__workflow_transitions` (`id`, `asset_id`, `published`, `ordering`, `workflow_id`, `title`, `description`, `from_stage_id`, `to_stage_id`, `checked_out_time`, `checked_out`) VALUES +(1, 0, 1, 1, 1, 'Unpublish', '', -1, 1, NULL, 0), +(2, 0, 1, 2, 1, 'Publish', '', -1, 2, NULL, 0), +(3, 0, 1, 3, 1, 'Trash', '', -1, 3, NULL, 0), +(4, 0, 1, 4, 1, 'Archive', '', -1, 4, NULL, 0); -- -- Creating extension entry diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-06-03.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-06-03.sql index fd6dff11bb..a89f316264 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-06-03.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-06-03.sql @@ -8,8 +8,8 @@ CREATE TABLE IF NOT EXISTS `#__csp` ( `blocked_uri` varchar(500) NOT NULL DEFAULT '', `directive` varchar(500) NOT NULL DEFAULT '', `client` varchar(500) NOT NULL DEFAULT '', - `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created` datetime NOT NULL, + `modified` datetime NOT NULL, `published` tinyint(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-07-19.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-07-19.sql index 2b1edfa05c..d3686b39ca 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-07-19.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-07-19.sql @@ -6,8 +6,8 @@ CREATE TABLE IF NOT EXISTS `#__template_overrides` ( `state` tinyint(1) NOT NULL DEFAULT 0, `action` varchar(50) NOT NULL DEFAULT '', `client_id` tinyint(1) unsigned NOT NULL DEFAULT 0, - `created_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `modified_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `created_date` datetime NOT NULL, + `modified_date` datetime, PRIMARY KEY (`id`), KEY `idx_template` (`template`), KEY `idx_extension_id` (`extension_id`) diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-07-29.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-07-29.sql index daad748af9..b87744b9d3 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-07-29.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-07-29.sql @@ -4,11 +4,19 @@ INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, TRUNCATE TABLE `#__finder_filters`; ALTER TABLE `#__finder_filters` MODIFY `created_by` int(10) unsigned NOT NULL DEFAULT 0; ALTER TABLE `#__finder_filters` MODIFY `created_by_alias` varchar(255) NOT NULL DEFAULT ''; +ALTER TABLE `#__finder_filters` MODIFY `created` datetime NOT NULL; +ALTER TABLE `#__finder_filters` MODIFY `modified` datetime NOT NULL; +ALTER TABLE `#__finder_filters` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; TRUNCATE TABLE `#__finder_links`; ALTER TABLE `#__finder_links` CHANGE `language` `language` CHAR(7) NOT NULL DEFAULT '' AFTER `access`; ALTER TABLE `#__finder_links` MODIFY `state` int(5) NOT NULL DEFAULT 1; ALTER TABLE `#__finder_links` MODIFY `access` int(5) NOT NULL DEFAULT 0; +ALTER TABLE `#__finder_links` MODIFY `indexdate` datetime NOT NULL; +ALTER TABLE `#__finder_links` MODIFY `publish_start_date` datetime NULL DEFAULT NULL; +ALTER TABLE `#__finder_links` MODIFY `publish_end_date` datetime NULL DEFAULT NULL; +ALTER TABLE `#__finder_links` MODIFY `start_date` datetime NULL DEFAULT NULL; +ALTER TABLE `#__finder_links` MODIFY `end_date` datetime NULL DEFAULT NULL; ALTER TABLE `#__finder_links` ADD INDEX `idx_language` (`language`); CREATE TABLE `#__finder_links_terms` ( @@ -76,14 +84,17 @@ TRUNCATE TABLE `#__finder_terms`; ALTER TABLE `#__finder_terms` CHANGE `language` `language` CHAR(7) NOT NULL DEFAULT '' AFTER `links`; ALTER TABLE `#__finder_terms` MODIFY `stem` varchar(75) NOT NULL DEFAULT ''; ALTER TABLE `#__finder_terms` MODIFY `soundex` varchar(75) NOT NULL DEFAULT ''; -ALTER TABLE `#__finder_terms` DROP INDEX `idx_term`, ADD INDEX `idx_stem` (`stem`), ADD INDEX `idx_language` (`language`), ADD INDEX `language` (`language`), ADD UNIQUE INDEX `idx_term` (`term`, `language`); +ALTER TABLE `#__finder_terms` DROP INDEX `idx_term`; +ALTER TABLE `#__finder_terms` ADD INDEX `idx_stem` (`stem`); +ALTER TABLE `#__finder_terms` ADD INDEX `idx_language` (`language`); +ALTER TABLE `#__finder_terms` ADD UNIQUE INDEX `idx_term_language` (`term`, `language`); DROP TABLE IF EXISTS `#__finder_terms_common`; CREATE TABLE `#__finder_terms_common` ( `term` varchar(75) NOT NULL DEFAULT '', `language` char(7) NOT NULL DEFAULT '', `custom` int(11) NOT NULL DEFAULT '0', - UNIQUE KEY `idx_word_lang` (`term`,`language`), + UNIQUE KEY `idx_term_language` (`term`,`language`), KEY `idx_lang` (`language`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_bin; INSERT INTO `#__finder_terms_common` (`term`, `language`, `custom`) VALUES diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-08-01.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-08-01.sql new file mode 100644 index 0000000000..7a73a8e1f5 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-08-01.sql @@ -0,0 +1,12 @@ +ALTER TABLE `#__ucm_content` MODIFY `core_created_time` datetime NOT NULL; +ALTER TABLE `#__ucm_content` MODIFY `core_modified_time` datetime NOT NULL; + +ALTER TABLE `#__ucm_content` MODIFY `core_publish_up` datetime NULL DEFAULT NULL; +ALTER TABLE `#__ucm_content` MODIFY `core_publish_down` datetime NULL DEFAULT NULL; + +-- Only on MySQL: Update empty strings to null date before converting the column from varchar to datetime +UPDATE `#__ucm_content` SET `core_checked_out_time` = '0000-00-00 00:00:00' WHERE `core_checked_out_time` = ''; + +ALTER TABLE `#__ucm_content` MODIFY `core_checked_out_time` datetime NULL DEFAULT NULL; + +ALTER TABLE `#__ucm_history` MODIFY `save_date` datetime NOT NULL; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-08-29.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-08-29.sql index 3786f39217..210f1dc1d5 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-08-29.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-08-29.sql @@ -3,7 +3,6 @@ ALTER TABLE `#__modules` MODIFY `publish_down` datetime NULL DEFAULT NULL; ALTER TABLE `#__modules` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; -- Use 0 instead of '0000-00-00 00:00:00' if you get 'Invalid default value for ...' -UPDATE `#__modules` SET - `publish_up` = CASE WHEN `publish_up` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `publish_up` END, - `publish_down` = CASE WHEN `publish_down` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `publish_down` END, - `checked_out_time` = CASE WHEN `checked_out_time` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `checked_out_time` END; +UPDATE `#__modules` SET `publish_up` = NULL WHERE `publish_up` = '0000-00-00 00:00:00'; +UPDATE `#__modules` SET `publish_down` = NULL WHERE `publish_down` = '0000-00-00 00:00:00'; +UPDATE `#__modules` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-01-16.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-01-16.sql new file mode 100644 index 0000000000..f9c79a385b --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-01-16.sql @@ -0,0 +1,15 @@ +INSERT INTO `#__extensions` (`name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES +('com_mails', 'component', 'com_mails', '', 1, 1, 1, 1, '{"name":"com_mails","type":"component","creationDate":"January 2019","author":"Joomla! Project","copyright":"(C) 2005 - 2019 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"4.0.0","description":"COM_MAILS_XML_DESCRIPTION","group":""}', '{}', 0, '0000-00-00 00:00:00', 0, 0); + +CREATE TABLE IF NOT EXISTS `#__mail_templates` ( + `template_id` VARCHAR(127) NOT NULL DEFAULT '', + `language` char(7) NOT NULL DEFAULT '', + `subject` VARCHAR(255) NOT NULL DEFAULT '', + `body` TEXT NOT NULL, + `htmlbody` TEXT NOT NULL, + `attachments` TEXT NOT NULL, + `params` TEXT NOT NULL, + PRIMARY KEY (`template_id`, `language`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; + +INSERT INTO `#__mail_templates` (`template_id`, `language`, `subject`, `body`, `htmlbody`, `attachments`, `params`) VALUES ('com_config.test_mail', '', 'COM_CONFIG_SENDMAIL_SUBJECT', 'COM_CONFIG_SENDMAIL_BODY', '', '', '{"tags":["sitename","method"]}'); diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-03-30.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-03-30.sql index 6fb809e2d9..61c154232e 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-03-30.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-03-30.sql @@ -1,2 +1,6 @@ -ALTER TABLE `#__menu` ADD COLUMN `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00'; -ALTER TABLE `#__menu` ADD COLUMN `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00'; +ALTER TABLE `#__menu` ADD COLUMN `publish_up` datetime; +ALTER TABLE `#__menu` ADD COLUMN `publish_down` datetime; + +ALTER TABLE `#__menu` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; + +UPDATE `#__menu` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-04-15.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-04-15.sql new file mode 100644 index 0000000000..baa717f019 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-04-15.sql @@ -0,0 +1,2 @@ +INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES +(0, 'plg_fields_subfields', 'plugin', 'subfields', 'fields', 0, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-04-22.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-04-22.sql index 9459c3d8ab..4ff06909bd 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-04-22.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-04-22.sql @@ -1,8 +1,26 @@ +ALTER TABLE `#__contact_details` MODIFY `created` datetime NOT NULL; +ALTER TABLE `#__contact_details` MODIFY `modified` datetime NOT NULL; + ALTER TABLE `#__contact_details` MODIFY `publish_up` datetime NULL DEFAULT NULL; ALTER TABLE `#__contact_details` MODIFY `publish_down` datetime NULL DEFAULT NULL; ALTER TABLE `#__contact_details` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; -UPDATE `#__contact_details` SET - `publish_up` = CASE WHEN `publish_up` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `publish_up` END, - `publish_down` = CASE WHEN `publish_down` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `publish_down` END, - `checked_out_time` = CASE WHEN `checked_out_time` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `checked_out_time` END; +UPDATE `#__contact_details` SET `modified` = `created`, `modified_by` = `created_by` WHERE `modified` = '0000-00-00 00:00:00'; + +UPDATE `#__contact_details` SET `publish_up` = NULL WHERE `publish_up` = '0000-00-00 00:00:00'; +UPDATE `#__contact_details` SET `publish_down` = NULL WHERE `publish_down` = '0000-00-00 00:00:00'; +UPDATE `#__contact_details` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00'; + +UPDATE `#__ucm_content` SET `core_modified_time` = `core_created_time` + WHERE `core_type_alias` = 'com_contact.contact' + AND `core_modified_time` = '0000-00-00 00:00:00'; + +UPDATE `#__ucm_content` SET `core_publish_up` = NULL + WHERE `core_type_alias` = 'com_contact.contact' + AND `core_publish_up` = '0000-00-00 00:00:00'; +UPDATE `#__ucm_content` SET `core_publish_down` = NULL + WHERE `core_type_alias` = 'com_contact.contact' + AND `core_publish_down` = '0000-00-00 00:00:00'; +UPDATE `#__ucm_content` SET `core_checked_out_time` = NULL + WHERE `core_type_alias` = 'com_contact.contact' + AND `core_checked_out_time` = '0000-00-00 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-06-28.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-06-28.sql index d100360692..2334345537 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-06-28.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-06-28.sql @@ -1,8 +1,32 @@ +ALTER TABLE `#__banners` MODIFY `created` datetime NOT NULL; +ALTER TABLE `#__banners` MODIFY `modified` datetime NOT NULL; + +ALTER TABLE `#__banners` MODIFY `reset` datetime NULL DEFAULT NULL; ALTER TABLE `#__banners` MODIFY `publish_up` datetime NULL DEFAULT NULL; ALTER TABLE `#__banners` MODIFY `publish_down` datetime NULL DEFAULT NULL; ALTER TABLE `#__banners` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; - UPDATE `#__banners` SET - `publish_up` = CASE WHEN `publish_up` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `publish_up` END, - `publish_down` = CASE WHEN `publish_down` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `publish_down` END, - `checked_out_time` = CASE WHEN `checked_out_time` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `checked_out_time` END; \ No newline at end of file +ALTER TABLE `#__banner_clients` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; + +UPDATE `#__banners` SET `modified` = `created`, `modified_by` = `created_by` WHERE `modified` = '0000-00-00 00:00:00'; + +UPDATE `#__banners` SET `reset` = NULL WHERE `reset` = '0000-00-00 00:00:00'; +UPDATE `#__banners` SET `publish_up` = NULL WHERE `publish_up` = '0000-00-00 00:00:00'; +UPDATE `#__banners` SET `publish_down` = NULL WHERE `publish_down` = '0000-00-00 00:00:00'; +UPDATE `#__banners` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00'; + +UPDATE `#__banner_clients` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00'; + +UPDATE `#__ucm_content` SET `core_modified_time` = `core_created_time` + WHERE `core_type_alias` = 'com_banners.banner' + AND `core_modified_time` = '0000-00-00 00:00:00'; + +UPDATE `#__ucm_content` SET `core_publish_up` = NULL + WHERE `core_type_alias` = 'com_banners.banner' + AND `core_publish_up` = '0000-00-00 00:00:00'; +UPDATE `#__ucm_content` SET `core_publish_down` = NULL + WHERE `core_type_alias` = 'com_banners.banner' + AND `core_publish_down` = '0000-00-00 00:00:00'; +UPDATE `#__ucm_content` SET `core_checked_out_time` = NULL + WHERE `core_type_alias` = 'com_banners.banner' + AND `core_checked_out_time` = '0000-00-00 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-06-29.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-06-29.sql index 02424cf0e2..130d1610e2 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-06-29.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-06-29.sql @@ -1,8 +1,26 @@ +ALTER TABLE `#__newsfeeds` MODIFY `created` datetime NOT NULL; +ALTER TABLE `#__newsfeeds` MODIFY `modified` datetime NOT NULL; + ALTER TABLE `#__newsfeeds` MODIFY `publish_up` datetime NULL DEFAULT NULL; ALTER TABLE `#__newsfeeds` MODIFY `publish_down` datetime NULL DEFAULT NULL; ALTER TABLE `#__newsfeeds` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; -UPDATE `#__newsfeeds` SET - `publish_up` = CASE WHEN `publish_up` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `publish_up` END, - `publish_down` = CASE WHEN `publish_down` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `publish_down` END, - `checked_out_time` = CASE WHEN `checked_out_time` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `checked_out_time` END; \ No newline at end of file +UPDATE `#__newsfeeds` SET `modified` = `created`, `modified_by` = `created_by` WHERE `modified` = '0000-00-00 00:00:00'; + +UPDATE `#__newsfeeds` SET `publish_up` = NULL WHERE `publish_up` = '0000-00-00 00:00:00'; +UPDATE `#__newsfeeds` SET `publish_down` = NULL WHERE `publish_down` = '0000-00-00 00:00:00'; +UPDATE `#__newsfeeds` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00'; + +UPDATE `#__ucm_content` SET `core_modified_time` = `core_created_time` + WHERE `core_type_alias` = 'com_newsfeeds.newsfeed' + AND `core_modified_time` = '0000-00-00 00:00:00'; + +UPDATE `#__ucm_content` SET `core_publish_up` = NULL + WHERE `core_type_alias` = 'com_newsfeeds.newsfeed' + AND `core_publish_up` = '0000-00-00 00:00:00'; +UPDATE `#__ucm_content` SET `core_publish_down` = NULL + WHERE `core_type_alias` = 'com_newsfeeds.newsfeed' + AND `core_publish_down` = '0000-00-00 00:00:00'; +UPDATE `#__ucm_content` SET `core_checked_out_time` = NULL + WHERE `core_type_alias` = 'com_newsfeeds.newsfeed' + AND `core_checked_out_time` = '0000-00-00 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-07-13.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-07-13.sql index 6a17e6faea..6096aeff05 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-07-13.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-07-13.sql @@ -15,23 +15,23 @@ INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `c INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0); INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES -('System Submenu', '', '', 1, 'cpanel-system', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"system","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"12","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); +('System Dashboard', '', '', 1, 'cpanel-system', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"system","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"12","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0); INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES -('Content Submenu', '', '', 1, 'cpanel-content', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"content","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"3","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); +('Content Dashboard', '', '', 1, 'cpanel-content', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"content","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"3","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0); INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES -('Menus Submenu', '', '', 1, 'cpanel-menus', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"menus","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); +('Menus Dashboard', '', '', 1, 'cpanel-menus', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"menus","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0); INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES -('Components Submenu', '', '', 1, 'cpanel-components', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"components","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"12","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); +('Components Dashboard', '', '', 1, 'cpanel-components', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"components","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"12","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0); INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES -('Users Submenu', '', '', 1, 'cpanel-users', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"users","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); +('Users Dashboard', '', '', 1, 'cpanel-users', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"users","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0); INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES @@ -77,7 +77,7 @@ INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0 UPDATE `#__modules` SET `title` = 'Update Checks',`ordering` = 3,`position` = 'icon',`showtitle` = 1,`params` = '{"context":"update_quickicon","header_icon":"fa fa-sync","show_global":"0","show_checkin":"0","show_cache":"0","show_users":"0","show_articles":"0","show_categories":"0","show_media":"0","show_menuItems":"0","show_modules":"0","show_plugins":"0","show_templates":"0","layout":"_:default","moduleclass_sfx":"","cache":1,"cache_time":900,"style":"0","module_tag":"div","bootstrap_size":"12","header_tag":"h3","header_class":""}' WHERE `#__modules`.`id` = 9; INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES -('Help Submenu', '', '', 1, 'cpanel-help', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"help","layout":"_:default","moduleclass_sfx":"","style":"System-none","module_tag":"div","bootstrap_size":"0","header_tag":"h3","header_class":""}', 1, '*'); +('Help Dashboard', '', '', 1, 'cpanel-help', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"help","layout":"_:default","moduleclass_sfx":"","style":"System-none","module_tag":"div","bootstrap_size":"0","header_tag":"h3","header_class":""}', 1, '*'); INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0); UPDATE `#__modules` SET `ordering` = 2,`position` = 'status' WHERE `#__modules`.`id` = 79; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-08-03.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-08-03.sql new file mode 100644 index 0000000000..a8df63a72d --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-08-03.sql @@ -0,0 +1,2 @@ +ALTER TABLE `#__update_sites` ADD COLUMN `checked_out` int(10) unsigned NOT NULL DEFAULT 0; +ALTER TABLE `#__update_sites` ADD COLUMN `checked_out_time` datetime NULL DEFAULT NULL; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-08-20.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-08-20.sql new file mode 100644 index 0000000000..ac27656237 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-08-20.sql @@ -0,0 +1,2 @@ +ALTER TABLE `#__content_frontpage` ADD COLUMN `featured_up` datetime; +ALTER TABLE `#__content_frontpage` ADD COLUMN `featured_down` datetime; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-08-21.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-08-21.sql new file mode 100644 index 0000000000..49b8e0564a --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-08-21.sql @@ -0,0 +1,15 @@ +INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES +(0, 'plg_webservices_banners', 'plugin', 'banners', 'webservices', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0), +(0, 'plg_webservices_config', 'plugin', 'config', 'webservices', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0), +(0, 'plg_webservices_contact', 'plugin', 'contact', 'webservices', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0), +(0, 'plg_webservices_languages', 'plugin', 'languages', 'webservices', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0), +(0, 'plg_webservices_menus', 'plugin', 'menus', 'webservices', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0), +(0, 'plg_webservices_messages', 'plugin', 'messages', 'webservices', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0), +(0, 'plg_webservices_modules', 'plugin', 'modules', 'webservices', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0), +(0, 'plg_webservices_newsfeeds', 'plugin', 'newsfeeds', 'webservices', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0), +(0, 'plg_webservices_plugins', 'plugin', 'plugins', 'webservices', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0), +(0, 'plg_webservices_privacy', 'plugin', 'privacy', 'webservices', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0), +(0, 'plg_webservices_redirect', 'plugin', 'redirect', 'webservices', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0), +(0, 'plg_webservices_tags', 'plugin', 'tags', 'webservices', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0), +(0, 'plg_webservices_templates', 'plugin', 'templates', 'webservices', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0), +(0, 'plg_webservices_users', 'plugin', 'users', 'webservices', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-13.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-13.sql new file mode 100644 index 0000000000..911dddca67 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-13.sql @@ -0,0 +1,2 @@ +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`, `publish_up`, `publish_down`) +SELECT 'main', 'com_messages_manager', 'Private Messages', '', 'Messaging/Private Messages', 'index.php?option=com_messages&view=messages', 'component', 1, 10, 2, `extension_id`, 0, NULL, 0, 0, 'class:messages-add', 0, '', 18, 19, 0, '*', 1, NULL, NULL FROM `#__extensions` WHERE `name` = 'com_messages'; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-14.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-14.sql new file mode 100644 index 0000000000..66e9e02f9f --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-14.sql @@ -0,0 +1,26 @@ +ALTER TABLE `#__content` MODIFY `created` datetime NOT NULL; +ALTER TABLE `#__content` MODIFY `modified` datetime NOT NULL; + +ALTER TABLE `#__content` MODIFY `publish_up` datetime NULL DEFAULT NULL; +ALTER TABLE `#__content` MODIFY `publish_down` datetime NULL DEFAULT NULL; +ALTER TABLE `#__content` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; + +UPDATE `#__content` SET `modified` = `created`, `modified_by` = `created_by` WHERE `modified` = '0000-00-00 00:00:00'; + +UPDATE `#__content` SET `publish_up` = NULL WHERE `publish_up` = '0000-00-00 00:00:00'; +UPDATE `#__content` SET `publish_down` = NULL WHERE `publish_down` = '0000-00-00 00:00:00'; +UPDATE `#__content` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00'; + +UPDATE `#__ucm_content` SET `core_modified_time` = `core_created_time` + WHERE `core_type_alias` = 'com_content.article' + AND `core_modified_time` = '0000-00-00 00:00:00'; + +UPDATE `#__ucm_content` SET `core_publish_up` = NULL + WHERE `core_type_alias` = 'com_content.article' + AND `core_publish_up` = '0000-00-00 00:00:00'; +UPDATE `#__ucm_content` SET `core_publish_down` = NULL + WHERE `core_type_alias` = 'com_content.article' + AND `core_publish_down` = '0000-00-00 00:00:00'; +UPDATE `#__ucm_content` SET `core_checked_out_time` = NULL + WHERE `core_type_alias` = 'com_content.article' + AND `core_checked_out_time` = '0000-00-00 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-22.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-22.sql new file mode 100644 index 0000000000..0a057c9184 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-22.sql @@ -0,0 +1 @@ +ALTER TABLE `#__messages` MODIFY `date_time` datetime NOT NULL; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-23.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-23.sql new file mode 100644 index 0000000000..1e7592530f --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-23.sql @@ -0,0 +1,4 @@ +ALTER TABLE `#__redirect_links` MODIFY `created_date` datetime NOT NULL; +ALTER TABLE `#__redirect_links` MODIFY `modified_date` datetime NOT NULL; + +UPDATE `#__redirect_links` SET `modified_date` = `created_date` WHERE `modified_date` = '0000-00-00 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-24.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-24.sql new file mode 100644 index 0000000000..758702a577 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-24.sql @@ -0,0 +1 @@ +ALTER TABLE `#__action_logs` MODIFY `log_date` datetime NOT NULL; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-25.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-25.sql new file mode 100644 index 0000000000..4fcfd5b2d7 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-25.sql @@ -0,0 +1,13 @@ +ALTER TABLE `#__fields` MODIFY `created_time` datetime NOT NULL; +ALTER TABLE `#__fields` MODIFY `modified_time` datetime NOT NULL; +ALTER TABLE `#__fields` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; + +ALTER TABLE `#__fields_groups` MODIFY `created` datetime NOT NULL; +ALTER TABLE `#__fields_groups` MODIFY `modified` datetime NOT NULL; +ALTER TABLE `#__fields_groups` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; + +UPDATE `#__fields` SET `modified_time` = `created_time`, `modified_by` = `created_user_id` WHERE `modified_time` = '0000-00-00 00:00:00'; +UPDATE `#__fields` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00'; + +UPDATE `#__fields_groups` SET `modified` = `created`, `modified_by` = `created_by` WHERE `modified` = '0000-00-00 00:00:00'; +UPDATE `#__fields_groups` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-26.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-26.sql new file mode 100644 index 0000000000..103b3f622b --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-26.sql @@ -0,0 +1,6 @@ +ALTER TABLE `#__privacy_requests` MODIFY `requested_at` datetime NOT NULL; +ALTER TABLE `#__privacy_requests` MODIFY `confirm_token_created_at` datetime NULL DEFAULT NULL; + +ALTER TABLE `#__privacy_consents` MODIFY `created` datetime NOT NULL; + +UPDATE `#__privacy_requests` SET `confirm_token_created_at` = NULL WHERE `confirm_token_created_at` = '0000-00-00 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-27.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-27.sql new file mode 100644 index 0000000000..b0b6d94741 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-27.sql @@ -0,0 +1,26 @@ +ALTER TABLE `#__tags` MODIFY `created_time` datetime NOT NULL; +ALTER TABLE `#__tags` MODIFY `modified_time` datetime NOT NULL; + +ALTER TABLE `#__tags` MODIFY `publish_up` datetime NULL DEFAULT NULL; +ALTER TABLE `#__tags` MODIFY `publish_down` datetime NULL DEFAULT NULL; +ALTER TABLE `#__tags` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; + +UPDATE `#__tags` SET `modified_time` = `created_time`, `modified_user_id` = `created_user_id` WHERE `modified_time` = '0000-00-00 00:00:00'; + +UPDATE `#__tags` SET `publish_up` = NULL WHERE `publish_up` = '0000-00-00 00:00:00'; +UPDATE `#__tags` SET `publish_down` = NULL WHERE `publish_down` = '0000-00-00 00:00:00'; +UPDATE `#__tags` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00'; + +UPDATE `#__ucm_content` SET `core_modified_time` = `core_created_time` + WHERE `core_type_alias` = 'com_tags.tag' + AND `core_modified_time` = '0000-00-00 00:00:00'; + +UPDATE `#__ucm_content` SET `core_publish_up` = NULL + WHERE `core_type_alias` = 'com_tags.tag' + AND `core_publish_up` = '0000-00-00 00:00:00'; +UPDATE `#__ucm_content` SET `core_publish_down` = NULL + WHERE `core_type_alias` = 'com_tags.tag' + AND `core_publish_down` = '0000-00-00 00:00:00'; +UPDATE `#__ucm_content` SET `core_checked_out_time` = NULL + WHERE `core_type_alias` = 'com_tags.tag' + AND `core_checked_out_time` = '0000-00-00 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-28.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-28.sql new file mode 100644 index 0000000000..c5ed4de469 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-28.sql @@ -0,0 +1,28 @@ +ALTER TABLE `#__user_notes` MODIFY `created_time` datetime NOT NULL; +ALTER TABLE `#__user_notes` MODIFY `modified_time` datetime NOT NULL; + +ALTER TABLE `#__user_notes` MODIFY `review_time` datetime NULL DEFAULT NULL; +ALTER TABLE `#__user_notes` MODIFY `publish_up` datetime NULL DEFAULT NULL; +ALTER TABLE `#__user_notes` MODIFY `publish_down` datetime NULL DEFAULT NULL; +ALTER TABLE `#__user_notes` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; + +UPDATE `#__user_notes` SET `modified_time` = `created_time`, `modified_user_id` = `created_user_id` WHERE `modified_time` = '0000-00-00 00:00:00'; + +UPDATE `#__user_notes` SET `review_time` = NULL WHERE `review_time` = '0000-00-00 00:00:00'; +UPDATE `#__user_notes` SET `publish_up` = NULL WHERE `publish_up` = '0000-00-00 00:00:00'; +UPDATE `#__user_notes` SET `publish_down` = NULL WHERE `publish_down` = '0000-00-00 00:00:00'; +UPDATE `#__user_notes` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00'; + +UPDATE `#__ucm_content` SET `core_modified_time` = `core_created_time` + WHERE `core_type_alias` = 'com_users.note' + AND `core_modified_time` = '0000-00-00 00:00:00'; + +UPDATE `#__ucm_content` SET `core_publish_up` = NULL + WHERE `core_type_alias` = 'com_users.note' + AND `core_publish_up` = '0000-00-00 00:00:00'; +UPDATE `#__ucm_content` SET `core_publish_down` = NULL + WHERE `core_type_alias` = 'com_users.note' + AND `core_publish_down` = '0000-00-00 00:00:00'; +UPDATE `#__ucm_content` SET `core_checked_out_time` = NULL + WHERE `core_type_alias` = 'com_users.note' + AND `core_checked_out_time` = '0000-00-00 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-29.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-29.sql new file mode 100644 index 0000000000..4083cdc103 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-09-29.sql @@ -0,0 +1,16 @@ +ALTER TABLE `#__categories` MODIFY `created_time` datetime NOT NULL; +ALTER TABLE `#__categories` MODIFY `modified_time` datetime NOT NULL; + +ALTER TABLE `#__categories` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; + +UPDATE `#__categories` SET `modified_time` = `created_time`, `modified_user_id` = `created_user_id` WHERE `modified_time` = '0000-00-00 00:00:00'; + +UPDATE `#__categories` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00'; + +UPDATE `#__ucm_content` SET `core_modified_time` = `core_created_time` + WHERE `core_type_alias` IN ('com_content.category', 'com_contact.category', 'com_newsfeeds.category', 'com_banners.category', 'com_users.category') + AND `core_modified_time` = '0000-00-00 00:00:00'; + +UPDATE `#__ucm_content` SET `core_checked_out_time` = NULL + WHERE `core_type_alias`IN ('com_content.category', 'com_contact.category', 'com_newsfeeds.category', 'com_banners.category', 'com_users.category') + AND `core_checked_out_time` = '0000-00-00 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-10-06.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-10-06.sql new file mode 100644 index 0000000000..d1b860f579 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-10-06.sql @@ -0,0 +1,3 @@ +ALTER TABLE `#__extensions` MODIFY `checked_out_time` datetime NULL DEFAULT NULL; + +UPDATE `#__extensions` SET `checked_out_time` = NULL WHERE `checked_out_time` = '0000-00-00 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-10-13.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-10-13.sql new file mode 100644 index 0000000000..c3a158a8b1 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-10-13.sql @@ -0,0 +1,3 @@ +UPDATE `#__content_types` + SET `field_mappings` = REPLACE(`field_mappings`,'"core_created_time":"registerdate"','"core_created_time":"registerDate"') + WHERE `type_alias` = 'com_users.user'; diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-10-17.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-10-17.sql new file mode 100644 index 0000000000..e7c5735ff4 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2019-10-17.sql @@ -0,0 +1,11 @@ +ALTER TABLE `#__users` MODIFY `registerDate` datetime NOT NULL; + +ALTER TABLE `#__users` MODIFY `lastvisitDate` datetime NULL DEFAULT NULL; +ALTER TABLE `#__users` MODIFY `lastResetTime` datetime NULL DEFAULT NULL; + +UPDATE `#__users` SET `lastvisitDate` = NULL WHERE `lastvisitDate` = '0000-00-00 00:00:00'; +UPDATE `#__users` SET `lastResetTime` = NULL WHERE `lastResetTime` = '0000-00-00 00:00:00'; + +UPDATE `#__content_types` + SET `field_mappings` = REPLACE(`field_mappings`,'"core_modified_time":"lastvisitDate"','"core_modified_time":"null"') + WHERE `type_alias` = 'com_users.user'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.8.0-2017-07-28.sql b/administrator/components/com_admin/sql/updates/postgresql/3.8.0-2017-07-28.sql deleted file mode 100644 index 6b88b64d45..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.8.0-2017-07-28.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "#__fields_groups" ADD COLUMN "params" TEXT NOT NULL; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.8.0-2017-07-31.sql b/administrator/components/com_admin/sql/updates/postgresql/3.8.0-2017-07-31.sql deleted file mode 100644 index e98b0248b1..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.8.0-2017-07-31.sql +++ /dev/null @@ -1,5 +0,0 @@ -INSERT INTO "#__extensions" -("package_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 - (0, 'mod_sampledata', 'module', 'mod_sampledata', '', 1, 0, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), - (0, 'plg_sampledata_blog', 'plugin', 'blog', 'sampledata', 0, 0, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.8.2-2017-10-14.sql b/administrator/components/com_admin/sql/updates/postgresql/3.8.2-2017-10-14.sql deleted file mode 100644 index f7183db8bd..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.8.2-2017-10-14.sql +++ /dev/null @@ -1,5 +0,0 @@ --- --- Add index for alias check #__content --- - -CREATE INDEX "#__content_idx_alias" ON "#__content" ("alias"); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.8.4-2018-01-16.sql b/administrator/components/com_admin/sql/updates/postgresql/3.8.4-2018-01-16.sql deleted file mode 100644 index 4546bab50b..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.8.4-2018-01-16.sql +++ /dev/null @@ -1,2 +0,0 @@ -DROP INDEX "#__user_keys_series_2"; -DROP INDEX "#__user_keys_series_3"; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.8.8-2018-05-18.sql b/administrator/components/com_admin/sql/updates/postgresql/3.8.8-2018-05-18.sql deleted file mode 100644 index 975876d250..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.8.8-2018-05-18.sql +++ /dev/null @@ -1,3 +0,0 @@ -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, 'COM_CPANEL_MSG_UPDATEDEFAULTSETTINGS_TITLE', 'COM_CPANEL_MSG_UPDATEDEFAULTSETTINGS_BODY', '', 'com_cpanel', 1, 'message', '', '', 'admin://components/com_admin/postinstall/updatedefaultsettings.php', 'admin_postinstall_updatedefaultsettings_condition', '3.8.8', 1); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.8.9-2018-06-19.sql b/administrator/components/com_admin/sql/updates/postgresql/3.8.9-2018-06-19.sql deleted file mode 100644 index 666def7ad5..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.8.9-2018-06-19.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Enable Sample Data Module. -UPDATE "#__extensions" SET "enabled" = '1' WHERE "name" = 'mod_sampledata'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-02.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-02.sql deleted file mode 100644 index 9eec675a8f..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-02.sql +++ /dev/null @@ -1,17 +0,0 @@ -INSERT INTO "#__extensions" ("extension_id", "package_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 -(35, 0, 'com_privacy', 'component', 'com_privacy', '', 1, 1, 1, 1, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0); - -CREATE TABLE "#__privacy_requests" ( - "id" serial NOT NULL, - "email" varchar(100) DEFAULT '' NOT NULL, - "requested_at" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, - "status" smallint DEFAULT 0 NOT NULL, - "request_type" varchar(25) DEFAULT '' NOT NULL, - "confirm_token" varchar(100) DEFAULT '' NOT NULL, - "confirm_token_created_at" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, - "checked_out" integer DEFAULT 0 NOT NULL, - "checked_out_time" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, - PRIMARY KEY ("id") -); -CREATE INDEX "#__privacy_requests_idx_checked_out" ON "#__privacy_requests" ("checked_out"); -CREATE INDEX "#__privacy_requests_idx_user_id" ON "#__privacy_requests" ("user_id"); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-03.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-03.sql deleted file mode 100644 index 6ef9999e73..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-03.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO "#__extensions" ("extension_id", "package_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 -(482, 0, 'plg_content_confirmconsent', 'plugin', 'confirmconsent', 'content', 0, 0, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-05.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-05.sql deleted file mode 100644 index 94366fa954..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-05.sql +++ /dev/null @@ -1,92 +0,0 @@ -INSERT INTO "#__extensions" ("extension_id", "package_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 -(36, 0, 'com_actionlogs', 'component', 'com_actionlogs', '', 1, 1, 1, 1, '', '{"ip_logging":0,"csv_delimiter":",","loggable_extensions":["com_banners","com_cache","com_categories","com_config","com_contact","com_content","com_installer","com_media","com_menus","com_messages","com_modules","com_newsfeeds","com_plugins","com_redirect","com_tags","com_templates","com_users"]}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(483, 0, 'plg_system_actionlogs', 'plugin', 'actionlogs', 'system', 0, 0, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(484, 0, 'plg_actionlog_joomla', 'plugin', 'joomla', 'actionlog', 0, 1, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); - --- --- Table: #__action_logs --- -CREATE TABLE "#__action_logs" ( - "id" serial NOT NULL, - "message_language_key" varchar(255) NOT NULL DEFAULT '', - "message" text NOT NULL DEFAULT '', - "log_date" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, - "extension" varchar(50) NOT NULL DEFAULT '', - "user_id" integer DEFAULT 0 NOT NULL, - "item_id" integer DEFAULT 0 NOT NULL, - "ip_address" varchar(40) NOT NULL DEFAULT '0.0.0.0', - PRIMARY KEY ("id") -); - --- Table: #__action_logs_extensions --- -CREATE TABLE "#__action_logs_extensions" ( - "id" serial NOT NULL, - "extension" varchar(50) NOT NULL DEFAULT '', - PRIMARY KEY ("id") -); - --- --- Dumping data for table '#__action_logs_extensions' --- -INSERT INTO "#__action_logs_extensions" ("id", "extension") VALUES -(1, 'com_banners'), -(2, 'com_cache'), -(3, 'com_categories'), -(4, 'com_config'), -(5, 'com_contact'), -(6, 'com_content'), -(7, 'com_installer'), -(8, 'com_media'), -(9, 'com_menus'), -(10, 'com_messages'), -(11, 'com_modules'), -(12, 'com_newsfeeds'), -(13, 'com_plugins'), -(14, 'com_redirect'), -(15, 'com_tags'), -(16, 'com_templates'), -(17, 'com_users'); - -SELECT setval('#__action_logs_extensions_id_seq', 18, false); --- -------------------------------------------------------- - --- --- Table: #__action_log_config --- -CREATE TABLE "#__action_log_config" ( - "id" serial NOT NULL, - "type_title" varchar(255) NOT NULL DEFAULT '', - "type_alias" varchar(255) NOT NULL DEFAULT '', - "id_holder" varchar(255) NULL, - "title_holder" varchar(255) NULL, - "table_name" varchar(255) NULL, - "text_prefix" varchar(255) NULL, - PRIMARY KEY ("id") -); - --- --- Dumping data for table #__action_log_config --- -INSERT INTO "#__action_log_config" ("id", "type_title", "type_alias", "id_holder", "title_holder", "table_name", "text_prefix") VALUES -(1, 'article', 'com_content.article', 'id' ,'title' , '#__content', 'PLG_ACTIONLOG_JOOMLA'), -(2, 'article', 'com_content.form', 'id', 'title' , '#__content', 'PLG_ACTIONLOG_JOOMLA'), -(3, 'banner', 'com_banners.banner', 'id' ,'name' , '#__banners', 'PLG_ACTIONLOG_JOOMLA'), -(4, 'user_note', 'com_users.note', 'id', 'subject' ,'#__user_notes', 'PLG_ACTIONLOG_JOOMLA'), -(5, 'media', 'com_media.file', '' , 'name' , '', 'PLG_ACTIONLOG_JOOMLA'), -(6, 'category', 'com_categories.category', 'id' , 'title' , '#__categories', 'PLG_ACTIONLOG_JOOMLA'), -(7, 'menu', 'com_menus.menu', 'id' ,'title' , '#__menu_types', 'PLG_ACTIONLOG_JOOMLA'), -(8, 'menu_item', 'com_menus.item', 'id' , 'title' , '#__menu', 'PLG_ACTIONLOG_JOOMLA'), -(9, 'newsfeed', 'com_newsfeeds.newsfeed', 'id' ,'name' , '#__newsfeeds', 'PLG_ACTIONLOG_JOOMLA'), -(10, 'link', 'com_redirect.link', 'id', 'old_url' , '#__redirect_links', 'PLG_ACTIONLOG_JOOMLA'), -(11, 'tag', 'com_tags.tag', 'id', 'title' , '#__tags', 'PLG_ACTIONLOG_JOOMLA'), -(12, 'style', 'com_templates.style', 'id' , 'title' , '#__template_styles', 'PLG_ACTIONLOG_JOOMLA'), -(13, 'plugin', 'com_plugins.plugin', 'extension_id' , 'name' , '#__extensions', 'PLG_ACTIONLOG_JOOMLA'), -(14, 'component_config', 'com_config.component', 'extension_id' , 'name', '', 'PLG_ACTIONLOG_JOOMLA'), -(15, 'contact', 'com_contact.contact', 'id', 'name', '#__contact_details', 'PLG_ACTIONLOG_JOOMLA'), -(16, 'module', 'com_modules.module', 'id' ,'title', '#__modules', 'PLG_ACTIONLOG_JOOMLA'), -(17, 'access_level', 'com_users.level', 'id' , 'title', '#__viewlevels', 'PLG_ACTIONLOG_JOOMLA'), -(18, 'banner_client', 'com_banners.client', 'id', 'name', '#__banner_clients', 'PLG_ACTIONLOG_JOOMLA'); - - -SELECT setval('#__action_log_config_id_seq', 18, false); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-19.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-19.sql deleted file mode 100644 index b8ce724e76..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-19.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO "#__extensions" ("extension_id", "package_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 -(481, 0, 'plg_fields_repeatable', 'plugin', 'repeatable', 'fields', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-20.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-20.sql deleted file mode 100644 index 1245f67a7d..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-20.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO "#__extensions" ("extension_id", "package_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 -(319, 0, 'mod_latestactions', 'module', 'mod_latestactions', '', 1, 1, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-24.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-24.sql deleted file mode 100644 index 649caf5771..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-24.sql +++ /dev/null @@ -1,18 +0,0 @@ -INSERT INTO "#__extensions" ("extension_id", "package_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 -(485, 0, 'plg_system_privacyconsent', 'plugin', 'privacyconsent', 'system', 0, 0, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); - --- --- Table structure for table `#__privacy_consents` --- - -CREATE TABLE "#__privacy_consents" ( - "id" serial NOT NULL, - "user_id" bigint DEFAULT 0 NOT NULL, - "created" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, - "subject" varchar(255) DEFAULT '' NOT NULL, - "body" text NOT NULL, - "remind" smallint DEFAULT 0 NOT NULL, - "token" varchar(100) DEFAULT '' NOT NULL, - PRIMARY KEY ("id") -); -CREATE INDEX "#__privacy_consents_idx_user_id" ON "#__privacy_consents" ("user_id"); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-27.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-27.sql deleted file mode 100644 index 9d13ef54ad..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-05-27.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO "#__extensions" ("extension_id", "package_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 -(486, 0, 'plg_system_logrotation', 'plugin', 'logrotation', 'system', 0, 1, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(487, 0, 'plg_privacy_user', 'plugin', 'user', 'privacy', 0, 1, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-06-02.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-06-02.sql deleted file mode 100644 index 2551f21d93..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-06-02.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE "#__content" ADD COLUMN "note" VARCHAR(255) NOT NULL DEFAULT ''; - -UPDATE "#__content_types" SET "field_mappings" = -'{"common":{"core_content_item_id":"id","core_title":"title","core_state":"state","core_alias":"alias","core_created_time":"created","core_modified_time":"modified","core_body":"introtext", "core_hits":"hits","core_publish_up":"publish_up","core_publish_down":"publish_down","core_access":"access", "core_params":"attribs", "core_featured":"featured", "core_metadata":"metadata", "core_language":"language", "core_images":"images", "core_urls":"urls", "core_version":"version", "core_ordering":"ordering", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"catid", "core_xreference":"xreference", "asset_id":"asset_id", "note":"note"}, "special":{"fulltext":"fulltext"}}' WHERE "type_title" = 'Article'; \ No newline at end of file diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-06-12.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-06-12.sql deleted file mode 100644 index f1d2dffb8e..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-06-12.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO "#__extensions" ("extension_id", "package_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 -(320, 0, 'mod_privacy_dashboard', 'module', 'mod_privacy_dashboard', '', 1, 1, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-06-13.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-06-13.sql deleted file mode 100644 index 86a8fa6ba7..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-06-13.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO "#__extensions" ("extension_id", "package_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 -(488, 0, 'plg_quickicon_privacycheck', 'plugin', 'privacycheck', 'quickicon', 0, 1, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-06-14.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-06-14.sql deleted file mode 100644 index f2e932fee5..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-06-14.sql +++ /dev/null @@ -1,3 +0,0 @@ -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, 'COM_ACTIONLOGS_POSTINSTALL_TITLE', 'COM_ACTIONLOGS_POSTINSTALL_BODY', '', 'com_actionlogs', 1, 'message', '', '', '', '', '3.9.0', 1), -(700, 'COM_PRIVACY_POSTINSTALL_TITLE', 'COM_PRIVACY_POSTINSTALL_BODY', '', 'com_privacy', 1, 'message', '', '', '', '', '3.9.0', 1); \ No newline at end of file diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-06-17.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-06-17.sql deleted file mode 100644 index e10fe5087a..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-06-17.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO "#__extensions" ("extension_id", "package_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 -(489, 0, 'plg_user_terms', 'plugin', 'terms', 'user', 0, 0, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-07-09.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-07-09.sql deleted file mode 100644 index 951914be74..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-07-09.sql +++ /dev/null @@ -1,4 +0,0 @@ -INSERT INTO "#__extensions" ("extension_id", "package_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 -(490, 0, 'plg_privacy_contact', 'plugin', 'contact', 'privacy', 0, 1, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(491, 0, 'plg_privacy_content', 'plugin', 'content', 'privacy', 0, 1, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(492, 0, 'plg_privacy_message', 'plugin', 'message', 'privacy', 0, 1, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-07-10.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-07-10.sql deleted file mode 100644 index 74e65fd4b1..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-07-10.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO "#__action_log_config" ("id", "type_title", "type_alias", "id_holder", "title_holder", "table_name", "text_prefix") - VALUES (19, 'application_config', 'com_config.application', '', 'name', '', 'PLG_ACTIONLOG_JOOMLA'); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-07-11.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-07-11.sql deleted file mode 100644 index 270a1af635..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-07-11.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO "#__extensions" ("extension_id", "package_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 -(493, 0, 'plg_privacy_actionlogs', 'plugin', 'actionlogs', 'privacy', 0, 1, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-08-12.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-08-12.sql deleted file mode 100644 index 4e56e40bb7..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-08-12.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "#__privacy_consents" ADD COLUMN "state" smallint DEFAULT 1 NOT NULL; \ No newline at end of file diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-08-28.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-08-28.sql deleted file mode 100644 index 2492ac1788..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-08-28.sql +++ /dev/null @@ -1,7 +0,0 @@ -ALTER TABLE "#__session" ALTER COLUMN "session_id" DROP DEFAULT; -ALTER TABLE "#__session" ALTER COLUMN "session_id" TYPE bytea USING "session_id"::bytea; -ALTER TABLE "#__session" ALTER COLUMN "session_id" SET NOT NULL; -ALTER TABLE "#__session" ALTER COLUMN "time" DROP DEFAULT, - ALTER COLUMN "time" TYPE integer USING "time"::integer; -ALTER TABLE "#__session" ALTER COLUMN "time" SET DEFAULT 0; -ALTER TABLE "#__session" ALTER COLUMN "time" SET NOT NULL; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-08-29.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-08-29.sql deleted file mode 100644 index b4421597d8..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-08-29.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO "#__extensions" ("extension_id", "package_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 -(494, 0, 'plg_captcha_recaptcha_invisible', 'plugin', 'recaptcha_invisible', 'captcha', 0, 0, 1, 0, '', '{"public_key":"","private_key":"","theme":"clean"}', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-09-04.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-09-04.sql deleted file mode 100644 index 1823a0a8fe..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-09-04.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE TABLE "#__action_logs_users" ( - "user_id" integer NOT NULL, - "notify" integer NOT NULL, - "extensions" text NOT NULL, - PRIMARY KEY ("user_id") -); - -CREATE INDEX "#__action_logs_users_idx_notify" ON "#__action_logs_users" ("notify"); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-10-15.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-10-15.sql deleted file mode 100644 index 358decd0a4..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-10-15.sql +++ /dev/null @@ -1,4 +0,0 @@ -CREATE INDEX "#__action_logs_idx_user_id" ON "#__action_logs" ("user_id"); -CREATE INDEX "#__action_logs_idx_user_id_logdate" ON "#__action_logs" ("user_id", "log_date"); -CREATE INDEX "#__action_logs_idx_user_id_extension" ON "#__action_logs" ("user_id", "extension"); -CREATE INDEX "#__action_logs_idx_extension_itemid" ON "#__action_logs" ("extension", "item_id"); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-10-20.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-10-20.sql deleted file mode 100644 index a33f707516..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-10-20.sql +++ /dev/null @@ -1,3 +0,0 @@ -DROP INDEX "#__privacy_requests_idx_checked_out"; -ALTER TABLE "#__privacy_requests" DROP COLUMN "checked_out"; -ALTER TABLE "#__privacy_requests" DROP COLUMN "checked_out_time"; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-10-21.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-10-21.sql deleted file mode 100644 index 271663e64f..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.0-2018-10-21.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO "#__extensions" ("extension_id", "package_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 -(495, 0, 'plg_privacy_consents', 'plugin', 'consents', 'privacy', 0, 1, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.3-2019-01-12.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.3-2019-01-12.sql deleted file mode 100644 index c31ae5d911..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.3-2019-01-12.sql +++ /dev/null @@ -1,8 +0,0 @@ -UPDATE "#__extensions" -SET "params" = REPLACE("params", '"com_categories",', '"com_categories","com_checkin",') -WHERE "name" = 'com_actionlogs'; - -INSERT INTO "#__action_logs_extensions" ("extension") VALUES -('com_checkin'); - -SELECT setval('#__action_logs_extensions_id_seq', max(id)) FROM "#__action_logs_extensions"; \ No newline at end of file diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.3-2019-02-07.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.3-2019-02-07.sql deleted file mode 100644 index 228a572d13..0000000000 --- a/administrator/components/com_admin/sql/updates/postgresql/3.9.3-2019-02-07.sql +++ /dev/null @@ -1,3 +0,0 @@ -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, 'COM_CPANEL_MSG_ADDNOSNIFF_TITLE', 'COM_CPANEL_MSG_ADDNOSNIFF_BODY', '', 'com_cpanel', 1, 'message', '', '', 'admin://components/com_admin/postinstall/addnosniff.php', 'admin_postinstall_addnosniff_condition', '3.9.3', 1); diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-05-15.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-05-15.sql index f7e6cca7fd..a41ff39e4f 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-05-15.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-05-15.sql @@ -12,10 +12,12 @@ CREATE TABLE IF NOT EXISTS "#__workflows" ( "default" smallint NOT NULL DEFAULT 0, "core" smallint NOT NULL DEFAULT 0, "ordering" bigint NOT NULL DEFAULT 0, - "created" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, + "created" timestamp without time zone NOT NULL, "created_by" bigint DEFAULT 0 NOT NULL, - "modified" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, + "modified" timestamp without time zone NOT NULL, "modified_by" bigint DEFAULT 0 NOT NULL, + "checked_out_time" timestamp without time zone, + "checked_out" bigint DEFAULT 0 NOT NULL, PRIMARY KEY ("id") ); @@ -27,9 +29,10 @@ CREATE INDEX "#__workflows_idx_created" ON "#__workflows" ("created"); CREATE INDEX "#__workflows_idx_created_by" ON "#__workflows" ("created_by"); CREATE INDEX "#__workflows_idx_modified" ON "#__workflows" ("modified"); CREATE INDEX "#__workflows_idx_modified_by" ON "#__workflows" ("modified_by"); +CREATE INDEX "#__workflows_idx_checked_out" ON "#__workflows" ("checked_out"); -INSERT INTO "#__workflows" ("id", "asset_id", "published", "title", "description", "extension", "default", "core", "ordering", "created", "created_by", "modified", "modified_by") VALUES -(1, 0, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, 1, '1970-01-01 00:00:00', 0, '1970-01-01 00:00:00', 0); +INSERT INTO "#__workflows" ("id", "asset_id", "published", "title", "description", "extension", "default", "core", "ordering", "created", "created_by", "modified", "modified_by", "checked_out_time", "checked_out") VALUES +(1, 0, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, 1, CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, NULL, 0); -- -- Table structure for table "#__workflow_associations" @@ -63,22 +66,25 @@ CREATE TABLE IF NOT EXISTS "#__workflow_stages" ( "description" text NOT NULL, "condition" bigint DEFAULT 0 NOT NULL, "default" smallint NOT NULL DEFAULT 0, + "checked_out_time" timestamp without time zone, + "checked_out" bigint DEFAULT 0 NOT NULL, PRIMARY KEY ("id") ); CREATE INDEX "#__workflow_stages_idx_workflow_id" ON "#__workflow_stages" ("workflow_id"); CREATE INDEX "#__workflow_stages_idx_title" ON "#__workflow_stages" ("title"); CREATE INDEX "#__workflow_stages_idx_asset_id" ON "#__workflow_stages" ("asset_id"); CREATE INDEX "#__workflow_stages_idx_default" ON "#__workflow_stages" ("default"); +CREATE INDEX "#__workflow_stages_idx_checked_out" ON "#__workflow_stages" ("checked_out"); -- -- Dumping data for table "#__workflow_stages" -- -INSERT INTO "#__workflow_stages" ("id", "asset_id", "ordering", "workflow_id", "published", "title", "description", "condition", "default") VALUES -(1, 0, 1, 1, 1, 'JUNPUBLISHED', '', 0, 1), -(2, 0, 2, 1, 1, 'JPUBLISHED', '', 1, 0), -(3, 0, 3, 1, 1, 'JTRASHED', '', -2, 0), -(4, 0, 4, 1, 1, 'JARCHIVED', '', 2, 0); +INSERT INTO "#__workflow_stages" ("id", "asset_id", "ordering", "workflow_id", "published", "title", "description", "condition", "default", "checked_out_time", "checked_out") VALUES +(1, 0, 1, 1, 1, 'JUNPUBLISHED', '', 0, 1, NULL, 0), +(2, 0, 2, 1, 1, 'JPUBLISHED', '', 1, 0, NULL, 0), +(3, 0, 3, 1, 1, 'JTRASHED', '', -2, 0, NULL, 0), +(4, 0, 4, 1, 1, 'JARCHIVED', '', 2, 0, NULL, 0); -- -- Table structure for table "#__workflow_transitions" @@ -94,6 +100,8 @@ CREATE TABLE IF NOT EXISTS "#__workflow_transitions" ( "description" text NOT NULL, "from_stage_id" bigint DEFAULT 0 NOT NULL, "to_stage_id" bigint DEFAULT 0 NOT NULL, + "checked_out_time" timestamp without time zone, + "checked_out" bigint DEFAULT 0 NOT NULL, PRIMARY KEY ("id") ); CREATE INDEX "#__workflow_transitions_idx_title" ON "#__workflow_transitions" ("title"); @@ -101,12 +109,13 @@ CREATE INDEX "#__workflow_transitions_idx_asset_id" ON "#__workflow_transitions" CREATE INDEX "#__workflow_transitions_idx_from_stage_id" ON "#__workflow_transitions" ("from_stage_id"); CREATE INDEX "#__workflow_transitions_idx_to_stage_id" ON "#__workflow_transitions" ("to_stage_id"); CREATE INDEX "#__workflow_transitions_idx_workflow_id" ON "#__workflow_transitions" ("workflow_id"); +CREATE INDEX "#__workflow_transitions_idx_checked_out" ON "#__workflow_transitions" ("checked_out"); -INSERT INTO "#__workflow_transitions" ("id", "asset_id", "published", "ordering", "workflow_id", "title", "description", "from_stage_id", "to_stage_id") VALUES -(1, 0, 1, 1, 1, 'Unpublish', '', -1, 1), -(2, 0, 1, 2, 1, 'Publish', '', -1, 2), -(3, 0, 1, 3, 1, 'Trash', '', -1, 3), -(4, 0, 1, 4, 1, 'Archive', '', -1, 4); +INSERT INTO "#__workflow_transitions" ("id", "asset_id", "published", "ordering", "workflow_id", "title", "description", "from_stage_id", "to_stage_id", "checked_out_time", "checked_out") VALUES +(1, 0, 1, 1, 1, 'Unpublish', '', -1, 1, NULL, 0), +(2, 0, 1, 2, 1, 'Publish', '', -1, 2, NULL, 0), +(3, 0, 1, 3, 1, 'Trash', '', -1, 3, NULL, 0), +(4, 0, 1, 4, 1, 'Archive', '', -1, 4, NULL, 0); -- -- Creating extension entry diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-06-03.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-06-03.sql index 2c37e314ef..cd09733ade 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-06-03.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-06-03.sql @@ -8,8 +8,8 @@ CREATE TABLE IF NOT EXISTS "#__csp" ( "blocked_uri" varchar(500) NOT NULL DEFAULT '', "directive" varchar(500) NOT NULL DEFAULT '', "client" varchar(500) NOT NULL DEFAULT '', - "created" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, - "modified" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, + "created" timestamp without time zone NOT NULL, + "modified" timestamp without time zone NOT NULL, "published" smallint DEFAULT 0 NOT NULL, PRIMARY KEY ("id") ); diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-07-19.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-07-19.sql index 9225b99b1b..00d490e576 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-07-19.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-07-19.sql @@ -6,8 +6,8 @@ CREATE TABLE IF NOT EXISTS "#__template_overrides" ( "state" smallint DEFAULT 0 NOT NULL, "action" varchar(50) DEFAULT '' NOT NULL, "client_id" smallint DEFAULT 0 NOT NULL, - "created_date" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, - "modified_date" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, + "created_date" timestamp without time zone NOT NULL, + "modified_date" timestamp without time zone, PRIMARY KEY ("id") ); CREATE INDEX "#__template_overrides_idx_template" ON "#__template_overrides" ("template"); diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-07-29.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-07-29.sql index 53d9a7aa58..f194b3e15c 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-07-29.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-07-29.sql @@ -4,11 +4,25 @@ INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", TRUNCATE TABLE "#__finder_filters"; ALTER TABLE "#__finder_filters" ALTER COLUMN "created_by" SET DEFAULT 0; ALTER TABLE "#__finder_filters" ALTER COLUMN "created_by_alias" SET DEFAULT ''; +ALTER TABLE "#__finder_filters" ALTER COLUMN "created" DROP DEFAULT; +ALTER TABLE "#__finder_filters" ALTER COLUMN "modified" DROP DEFAULT; +ALTER TABLE "#__finder_filters" ALTER COLUMN "checked_out_time" DROP NOT NULL; +ALTER TABLE "#__finder_filters" ALTER COLUMN "checked_out_time" DROP DEFAULT; TRUNCATE TABLE "#__finder_links"; ALTER TABLE "#__finder_links" ALTER COLUMN "state" SET NOT NULL; ALTER TABLE "#__finder_links" ALTER COLUMN "access" SET NOT NULL; -ALTER TABLE "#__finder_links" ALTER COLUMN "language" TYPE VARCHAR(7), ALTER COLUMN "language" SET DEFAULT ''; +ALTER TABLE "#__finder_links" ALTER COLUMN "language" TYPE character varying(7); +ALTER TABLE "#__finder_links" ALTER COLUMN "language" SET DEFAULT ''; +ALTER TABLE "#__finder_links" ALTER COLUMN "indexdate" DROP DEFAULT; +ALTER TABLE "#__finder_links" ALTER COLUMN "publish_start_date" DROP NOT NULL; +ALTER TABLE "#__finder_links" ALTER COLUMN "publish_start_date" DROP DEFAULT; +ALTER TABLE "#__finder_links" ALTER COLUMN "publish_end_date" DROP NOT NULL; +ALTER TABLE "#__finder_links" ALTER COLUMN "publish_end_date" DROP DEFAULT; +ALTER TABLE "#__finder_links" ALTER COLUMN "start_date" DROP NOT NULL; +ALTER TABLE "#__finder_links" ALTER COLUMN "start_date" DROP DEFAULT; +ALTER TABLE "#__finder_links" ALTER COLUMN "end_date" DROP NOT NULL; +ALTER TABLE "#__finder_links" ALTER COLUMN "end_date" DROP DEFAULT; CREATE INDEX "#__finder_links_idx_language" on "#__finder_links" ("language"); CREATE TABLE "#__finder_links_terms" ( @@ -75,21 +89,22 @@ INSERT INTO "#__finder_taxonomy" ("id", "parent_id", "lft", "rgt", "level", "pat SELECT setval('#__finder_taxonomy_id_seq', 2, false); TRUNCATE TABLE "#__finder_terms"; -ALTER TABLE "#__finder_terms" ALTER COLUMN "language" TYPE CHAR(7), ALTER COLUMN "language" SET DEFAULT ''; +ALTER TABLE "#__finder_terms" ALTER COLUMN "language" TYPE character varying(7); +ALTER TABLE "#__finder_terms" ALTER COLUMN "language" SET DEFAULT ''; ALTER TABLE "#__finder_terms" ALTER COLUMN "stem" SET DEFAULT ''; ALTER TABLE "#__finder_terms" ALTER COLUMN "soundex" SET DEFAULT ''; CREATE INDEX "#__finder_terms_idx_stem" on "#__finder_terms" ("stem"); CREATE INDEX "#__finder_terms_idx_language" on "#__finder_terms" ("language"); -ALTER TABLE "#__finder_terms" DROP CONSTRAINT "#__finder_terms_idx_term", ADD CONSTRAINT "#__finder_terms_idx_term_language" UNIQUE ("term", "language"); +ALTER TABLE "#__finder_terms" DROP CONSTRAINT "#__finder_terms_idx_term"; +ALTER TABLE "#__finder_terms" ADD CONSTRAINT "#__finder_terms_idx_term_language" UNIQUE ("term", "language"); DROP TABLE IF EXISTS "#__finder_terms_common"; CREATE TABLE "#__finder_terms_common" ( "term" varchar(75) NOT NULL, "language" varchar(7) DEFAULT '' NOT NULL, "custom" integer DEFAULT 0 NOT NULL, - CONSTRAINT "#__finder_terms_idx_term" UNIQUE ("term", "language") + CONSTRAINT "#__finder_terms_common_idx_term_language" UNIQUE ("term", "language") ); -CREATE INDEX "#__finder_terms_common_idx_word_lang" on "#__finder_terms_common" ("term", "language"); CREATE INDEX "#__finder_terms_common_idx_lang" on "#__finder_terms_common" ("language"); INSERT INTO "#__finder_terms_common" ("term", "language", "custom") VALUES ('i', 'en', 0), @@ -267,12 +282,14 @@ INSERT INTO "#__finder_terms_common" ("term", "language", "custom") VALUES ('too', 'en', 0), ('very', 'en', 0); -ALTER TABLE "#__finder_tokens" ALTER COLUMN "language" TYPE VARCHAR(7), ALTER COLUMN "language" SET DEFAULT ''; +ALTER TABLE "#__finder_tokens" ALTER COLUMN "language" TYPE character varying(7); +ALTER TABLE "#__finder_tokens" ALTER COLUMN "language" SET DEFAULT ''; ALTER TABLE "#__finder_tokens" ALTER COLUMN "stem" SET DEFAULT ''; CREATE INDEX "#__finder_tokens_idx_stem" on "#__finder_tokens" ("stem"); CREATE INDEX "#__finder_tokens_idx_language" on "#__finder_tokens" ("language"); -ALTER TABLE "#__finder_tokens_aggregate" ALTER COLUMN "language" TYPE VARCHAR(7), ALTER COLUMN "language" SET DEFAULT ''; +ALTER TABLE "#__finder_tokens_aggregate" ALTER COLUMN "language" TYPE character varying(7); +ALTER TABLE "#__finder_tokens_aggregate" ALTER COLUMN "language" SET DEFAULT ''; ALTER TABLE "#__finder_tokens_aggregate" DROP COLUMN "map_suffix"; ALTER TABLE "#__finder_tokens_aggregate" ALTER COLUMN "stem" SET DEFAULT ''; ALTER TABLE "#__finder_tokens_aggregate" ALTER COLUMN "term_weight" SET DEFAULT 0; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-08-01.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-08-01.sql new file mode 100644 index 0000000000..e0958379aa --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-08-01.sql @@ -0,0 +1,14 @@ +ALTER TABLE "#__ucm_content" ALTER COLUMN "core_created_time" DROP DEFAULT; + +ALTER TABLE "#__ucm_content" ALTER COLUMN "core_modified_time" DROP DEFAULT; + +ALTER TABLE "#__ucm_content" ALTER COLUMN "core_publish_up" DROP NOT NULL; +ALTER TABLE "#__ucm_content" ALTER COLUMN "core_publish_up" DROP DEFAULT; + +ALTER TABLE "#__ucm_content" ALTER COLUMN "core_publish_down" DROP NOT NULL; +ALTER TABLE "#__ucm_content" ALTER COLUMN "core_publish_down" DROP DEFAULT; + +ALTER TABLE "#__ucm_content" ALTER COLUMN "core_checked_out_time" DROP NOT NULL; +ALTER TABLE "#__ucm_content" ALTER COLUMN "core_checked_out_time" DROP DEFAULT; + +ALTER TABLE "#__ucm_history" ALTER COLUMN "save_date" DROP DEFAULT; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-08-29.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-08-29.sql index 723794f171..80c8a1b3f7 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-08-29.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-08-29.sql @@ -7,7 +7,6 @@ ALTER TABLE "#__modules" ALTER COLUMN "publish_down" DROP DEFAULT; ALTER TABLE "#__modules" ALTER COLUMN "checked_out_time" DROP NOT NULL; ALTER TABLE "#__modules" ALTER COLUMN "checked_out_time" DROP DEFAULT; -UPDATE "#__modules" SET - "publish_up" = CASE WHEN "publish_up" = '1970-01-01 00:00:00' THEN NULL ELSE "publish_up" END, - "publish_down" = CASE WHEN "publish_down" = '1970-01-01 00:00:00' THEN NULL ELSE "publish_down" END, - "checked_out_time" = CASE WHEN "checked_out_time" = '1970-01-01 00:00:00' THEN NULL ELSE "checked_out_time" END; +UPDATE "#__modules" SET "publish_up" = NULL WHERE "publish_up" = '1970-01-01 00:00:00'; +UPDATE "#__modules" SET "publish_down" = NULL WHERE "publish_down" = '1970-01-01 00:00:00'; +UPDATE "#__modules" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-01-16.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-01-16.sql new file mode 100644 index 0000000000..5b93fae6ad --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-01-16.sql @@ -0,0 +1,17 @@ +INSERT INTO "#__extensions" ("name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "checked_out", "checked_out_time", "ordering", "state") VALUES +('com_mails', 'component', 'com_mails', '', 1, 1, 1, 1, '{"name":"com_mails","type":"component","creationDate":"January 2019","author":"Joomla! Project","copyright":"(C) 2005 - 2019 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"4.0.0","description":"COM_MAILS_XML_DESCRIPTION","group":""}', '{}', 0, '1970-01-01 00:00:00', 0, 0); + +CREATE TABLE IF NOT EXISTS "#__mail_templates" ( + "template_id" varchar(127) NOT NULL DEFAULT '', + "language" char(7) NOT NULL DEFAULT '', + "subject" varchar(255) NOT NULL DEFAULT '', + "body" TEXT NOT NULL, + "htmlbody" TEXT NOT NULL, + "attachments" TEXT NOT NULL, + "params" TEXT NOT NULL, + CONSTRAINT "#__mail_templates_idx_template_id_language" UNIQUE ("template_id", "language") +); +CREATE INDEX "#__mail_templates_idx_template_id" ON "#__mail_templates" ("template_id"); +CREATE INDEX "#__mail_templates_idx_language" ON "#__mail_templates" ("language"); + +INSERT INTO "#__mail_templates" ("template_id", "language", "subject", "body", "htmlbody", "attachments", "params") VALUES ('com_config.test_mail', '', 'COM_CONFIG_SENDMAIL_SUBJECT', 'COM_CONFIG_SENDMAIL_BODY', '', '', '{"tags":["sitename","method"]}'); diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-03-30.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-03-30.sql index f3ce56ffcb..9601b6b1dd 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-03-30.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-03-30.sql @@ -1,2 +1,7 @@ -ALTER TABLE "#__menu" ADD COLUMN "publish_up" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL; -ALTER TABLE "#__menu" ADD COLUMN "publish_down" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL; +ALTER TABLE "#__menu" ADD COLUMN "publish_up" timestamp without time zone; +ALTER TABLE "#__menu" ADD COLUMN "publish_down" timestamp without time zone; + +ALTER TABLE "#__menu" ALTER COLUMN "checked_out_time" DROP NOT NULL; +ALTER TABLE "#__menu" ALTER COLUMN "checked_out_time" DROP DEFAULT; + +UPDATE "#__menu" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-04-15.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-04-15.sql new file mode 100644 index 0000000000..0fd58a8314 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-04-15.sql @@ -0,0 +1,2 @@ +INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "checked_out", "checked_out_time", "ordering", "state") VALUES +(0, 'plg_fields_subfields', 'plugin', 'subfields', 'fields', 0, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-04-22.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-04-22.sql index 32d91acc14..35f2270d9f 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-04-22.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-04-22.sql @@ -1,3 +1,7 @@ +ALTER TABLE "#__contact_details" ALTER COLUMN "created" DROP DEFAULT; + +ALTER TABLE "#__contact_details" ALTER COLUMN "modified" DROP DEFAULT; + ALTER TABLE "#__contact_details" ALTER COLUMN "publish_up" DROP NOT NULL; ALTER TABLE "#__contact_details" ALTER COLUMN "publish_up" DROP DEFAULT; @@ -7,7 +11,22 @@ ALTER TABLE "#__contact_details" ALTER COLUMN "publish_down" DROP DEFAULT; ALTER TABLE "#__contact_details" ALTER COLUMN "checked_out_time" DROP NOT NULL; ALTER TABLE "#__contact_details" ALTER COLUMN "checked_out_time" DROP DEFAULT; -UPDATE "#__contact_details" SET - "publish_up" = CASE WHEN "publish_up" = '1970-01-01 00:00:00' THEN NULL ELSE "publish_up" END, - "publish_down" = CASE WHEN "publish_down" = '1970-01-01 00:00:00' THEN NULL ELSE "publish_down" END, - "checked_out_time" = CASE WHEN "checked_out_time" = '1970-01-01 00:00:00' THEN NULL ELSE "checked_out_time" END; +UPDATE "#__contact_details" SET "modified" = "created", "modified_by" = "created_by" WHERE "modified" = '1970-01-01 00:00:00'; + +UPDATE "#__contact_details" SET "publish_up" = NULL WHERE "publish_up" = '1970-01-01 00:00:00'; +UPDATE "#__contact_details" SET "publish_down" = NULL WHERE "publish_down" = '1970-01-01 00:00:00'; +UPDATE "#__contact_details" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00'; + +UPDATE "#__ucm_content" SET "core_modified_time" = "core_created_time" + WHERE "core_type_alias" = 'com_contact.contact' + AND "core_modified_time" = '1970-01-01 00:00:00'; + +UPDATE "#__ucm_content" SET "core_publish_up" = NULL + WHERE "core_type_alias" = 'com_contact.contact' + AND "core_publish_up" = '1970-01-01 00:00:00'; +UPDATE "#__ucm_content" SET "core_publish_down" = NULL + WHERE "core_type_alias" = 'com_contact.contact' + AND "core_publish_down" = '1970-01-01 00:00:00'; +UPDATE "#__ucm_content" SET "core_checked_out_time" = NULL + WHERE "core_type_alias" = 'com_contact.contact' + AND "core_checked_out_time" = '1970-01-01 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-05-20.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-05-20.sql index b88dee5e25..a97c2aff35 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-05-20.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-05-20.sql @@ -1 +1 @@ -ALTER TABLE "#__extensions" ADD COLUMN "note" varchar(255); +ALTER TABLE "#__extensions" ADD COLUMN "note" character varying(255); diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-06-28.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-06-28.sql index 279ea358b3..ba3220ba6b 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-06-28.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-06-28.sql @@ -1,3 +1,10 @@ +ALTER TABLE "#__banners" ALTER COLUMN "created" DROP DEFAULT; + +ALTER TABLE "#__banners" ALTER COLUMN "modified" DROP DEFAULT; + +ALTER TABLE "#__banners" ALTER COLUMN "reset" DROP NOT NULL; +ALTER TABLE "#__banners" ALTER COLUMN "reset" DROP DEFAULT; + ALTER TABLE "#__banners" ALTER COLUMN "publish_up" DROP NOT NULL; ALTER TABLE "#__banners" ALTER COLUMN "publish_up" DROP DEFAULT; @@ -7,7 +14,28 @@ ALTER TABLE "#__banners" ALTER COLUMN "publish_down" DROP DEFAULT; ALTER TABLE "#__banners" ALTER COLUMN "checked_out_time" DROP NOT NULL; ALTER TABLE "#__banners" ALTER COLUMN "checked_out_time" DROP DEFAULT; - UPDATE "#__banners" SET - "publish_up" = CASE WHEN "publish_up" = '1970-01-01 00:00:00' THEN NULL ELSE "publish_up" END, - "publish_down" = CASE WHEN "publish_down" = '1970-01-01 00:00:00' THEN NULL ELSE "publish_down" END, - "checked_out_time" = CASE WHEN "checked_out_time" = '1970-01-01 00:00:00' THEN NULL ELSE "checked_out_time" END; \ No newline at end of file +ALTER TABLE "#__banner_clients" ALTER COLUMN "checked_out_time" DROP NOT NULL; +ALTER TABLE "#__banner_clients" ALTER COLUMN "checked_out_time" DROP DEFAULT; + +UPDATE "#__banners" SET "modified" = "created", "modified_by" = "created_by" WHERE "modified" = '1970-01-01 00:00:00'; + +UPDATE "#__banners" SET "reset" = NULL WHERE "reset" = '1970-01-01 00:00:00'; +UPDATE "#__banners" SET "publish_up" = NULL WHERE "publish_up" = '1970-01-01 00:00:00'; +UPDATE "#__banners" SET "publish_down" = NULL WHERE "publish_down" = '1970-01-01 00:00:00'; +UPDATE "#__banners" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00'; + +UPDATE "#__banner_clients" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00'; + +UPDATE "#__ucm_content" SET "core_modified_time" = "core_created_time" + WHERE "core_type_alias" = 'com_banners.banner' + AND "core_modified_time" = '1970-01-01 00:00:00'; + +UPDATE "#__ucm_content" SET "core_publish_up" = NULL + WHERE "core_type_alias" = 'com_banners.banner' + AND "core_publish_up" = '1970-01-01 00:00:00'; +UPDATE "#__ucm_content" SET "core_publish_down" = NULL + WHERE "core_type_alias" = 'com_banners.banner' + AND "core_publish_down" = '1970-01-01 00:00:00'; +UPDATE "#__ucm_content" SET "core_checked_out_time" = NULL + WHERE "core_type_alias" = 'com_banners.banner' + AND "core_checked_out_time" = '1970-01-01 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-06-29.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-06-29.sql index ed15ad49b0..c3b2c27d38 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-06-29.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-06-29.sql @@ -1,3 +1,7 @@ +ALTER TABLE "#__newsfeeds" ALTER COLUMN "created" DROP DEFAULT; + +ALTER TABLE "#__newsfeeds" ALTER COLUMN "modified" DROP DEFAULT; + ALTER TABLE "#__newsfeeds" ALTER COLUMN "publish_up" DROP NOT NULL; ALTER TABLE "#__newsfeeds" ALTER COLUMN "publish_up" DROP DEFAULT; @@ -7,7 +11,22 @@ ALTER TABLE "#__newsfeeds" ALTER COLUMN "publish_down" DROP DEFAULT; ALTER TABLE "#__newsfeeds" ALTER COLUMN "checked_out_time" DROP NOT NULL; ALTER TABLE "#__newsfeeds" ALTER COLUMN "checked_out_time" DROP DEFAULT; -UPDATE "#__newsfeeds" SET - "publish_up" = CASE WHEN "publish_up" = '1970-01-01 00:00:00' THEN NULL ELSE "publish_up" END, - "publish_down" = CASE WHEN "publish_down" = '1970-01-01 00:00:00' THEN NULL ELSE "publish_down" END, - "checked_out_time" = CASE WHEN "checked_out_time" = '1970-01-01 00:00:00' THEN NULL ELSE "checked_out_time" END; \ No newline at end of file +UPDATE "#__newsfeeds" SET "modified" = "created", "modified_by" = "created_by" WHERE "modified" = '1970-01-01 00:00:00'; + +UPDATE "#__newsfeeds" SET "publish_up" = NULL WHERE "publish_up" = '1970-01-01 00:00:00'; +UPDATE "#__newsfeeds" SET "publish_down" = NULL WHERE "publish_down" = '1970-01-01 00:00:00'; +UPDATE "#__newsfeeds" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00'; + +UPDATE "#__ucm_content" SET "core_modified_time" = "core_created_time" + WHERE "core_type_alias" = 'com_newsfeeds.newsfeed' + AND "core_modified_time" = '1970-01-01 00:00:00'; + +UPDATE "#__ucm_content" SET "core_publish_up" = NULL + WHERE "core_type_alias" = 'com_newsfeeds.newsfeed' + AND "core_publish_up" = '1970-01-01 00:00:00'; +UPDATE "#__ucm_content" SET "core_publish_down" = NULL + WHERE "core_type_alias" = 'com_newsfeeds.newsfeed' + AND "core_publish_down" = '1970-01-01 00:00:00'; +UPDATE "#__ucm_content" SET "core_checked_out_time" = NULL + WHERE "core_type_alias" = 'com_newsfeeds.newsfeed' + AND "core_checked_out_time" = '1970-01-01 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-07-13.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-07-13.sql index efde3728bb..29f3f92c8f 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-07-13.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-07-13.sql @@ -14,23 +14,23 @@ INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "c INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0); INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES -('System Submenu', '', '', 1, 'cpanel-system', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"system","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"12","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); +('System Dashboard', '', '', 1, 'cpanel-system', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"system","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"12","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0); INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES -('Content Submenu', '', '', 1, 'cpanel-content', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"content","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"3","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); +('Content Dashboard', '', '', 1, 'cpanel-content', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"content","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"3","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0); INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES -('Menus Submenu', '', '', 1, 'cpanel-menus', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"menus","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); +('Menus Dashboard', '', '', 1, 'cpanel-menus', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"menus","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0); INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES -('Components Submenu', '', '', 1, 'cpanel-components', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"components","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"12","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); +('Components Dashboard', '', '', 1, 'cpanel-components', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"components","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"12","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0); INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES -('Users Submenu', '', '', 1, 'cpanel-users', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"users","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); +('Users Dashboard', '', '', 1, 'cpanel-users', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"users","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*'); INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0); INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES @@ -76,7 +76,7 @@ INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_seri UPDATE "#__modules" SET "title" = 'Update Checks',"ordering" = 3,"position" = 'icon',"showtitle" = 1,"params" = '{"context":"update_quickicon","header_icon":"fa fa-sync","layout":"_:default","moduleclass_sfx":"","cache":1,"cache_time":900,"style":"0","module_tag":"div","bootstrap_size":"12","header_tag":"h3","header_class":""}' WHERE "#__modules"."id" = 9; INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES -('Help Submenu', '', '', 1, 'cpanel-help', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"help","layout":"_:default","moduleclass_sfx":"","style":"System-none","module_tag":"div","bootstrap_size":"0","header_tag":"h3","header_class":""}', 1, '*'); +('Help Dashboard', '', '', 1, 'cpanel-help', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"help","layout":"_:default","moduleclass_sfx":"","style":"System-none","module_tag":"div","bootstrap_size":"0","header_tag":"h3","header_class":""}', 1, '*'); INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0); UPDATE "#__modules" SET "ordering" = 2,"position" = 'status' WHERE "#__modules"."id" = 79; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-08-03.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-08-03.sql new file mode 100644 index 0000000000..a09ac565d0 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-08-03.sql @@ -0,0 +1,2 @@ +ALTER TABLE "#__update_sites" ADD COLUMN "checked_out" bigint DEFAULT 0 NOT NULL; +ALTER TABLE "#__update_sites" ADD COLUMN "checked_out_time" timestamp without time zone DEFAULT NULL; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-08-20.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-08-20.sql new file mode 100644 index 0000000000..144e4685d2 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-08-20.sql @@ -0,0 +1,2 @@ +ALTER TABLE "#__content_frontpage" ADD COLUMN "featured_up" timestamp without time zone; +ALTER TABLE "#__content_frontpage" ADD COLUMN "featured_down" timestamp without time zone; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-08-21.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-08-21.sql new file mode 100644 index 0000000000..76161234bf --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-08-21.sql @@ -0,0 +1,15 @@ +INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "checked_out", "checked_out_time", "ordering", "state") VALUES +(0, 'plg_webservices_banners', 'plugin', 'banners', 'webservices', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0), +(0, 'plg_webservices_config', 'plugin', 'config', 'webservices', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0), +(0, 'plg_webservices_contact', 'plugin', 'contact', 'webservices', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0), +(0, 'plg_webservices_languages', 'plugin', 'languages', 'webservices', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0), +(0, 'plg_webservices_menus', 'plugin', 'menus', 'webservices', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0), +(0, 'plg_webservices_messages', 'plugin', 'messages', 'webservices', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0), +(0, 'plg_webservices_modules', 'plugin', 'modules', 'webservices', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0), +(0, 'plg_webservices_newsfeeds', 'plugin', 'newsfeeds', 'webservices', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0), +(0, 'plg_webservices_plugins', 'plugin', 'plugins', 'webservices', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0), +(0, 'plg_webservices_privacy', 'plugin', 'privacy', 'webservices', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0), +(0, 'plg_webservices_redirect', 'plugin', 'redirect', 'webservices', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0), +(0, 'plg_webservices_tags', 'plugin', 'tags', 'webservices', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0), +(0, 'plg_webservices_templates', 'plugin', 'templates', 'webservices', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0), +(0, 'plg_webservices_users', 'plugin', 'users', 'webservices', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-13.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-13.sql new file mode 100644 index 0000000000..04dc591e0c --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-13.sql @@ -0,0 +1,2 @@ +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", "publish_up", "publish_down") +SELECT 'main', 'com_messages_manager', 'Private Messages', '', 'Messaging/Private Messages', 'index.php?option=com_messages&view=messages', 'component', 1, 10, 2, "extension_id", 0, NULL, 0, 0, 'class:messages-add', 0, '', 18, 19, 0, '*', 1, NULL, NULL FROM "#__extensions" WHERE "name" = 'com_messages'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-14.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-14.sql new file mode 100644 index 0000000000..0130655747 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-14.sql @@ -0,0 +1,32 @@ +ALTER TABLE "#__content" ALTER COLUMN "created" DROP DEFAULT; + +ALTER TABLE "#__content" ALTER COLUMN "modified" DROP DEFAULT; + +ALTER TABLE "#__content" ALTER COLUMN "publish_up" DROP NOT NULL; +ALTER TABLE "#__content" ALTER COLUMN "publish_up" DROP DEFAULT; + +ALTER TABLE "#__content" ALTER COLUMN "publish_down" DROP NOT NULL; +ALTER TABLE "#__content" ALTER COLUMN "publish_down" DROP DEFAULT; + +ALTER TABLE "#__content" ALTER COLUMN "checked_out_time" DROP NOT NULL; +ALTER TABLE "#__content" ALTER COLUMN "checked_out_time" DROP DEFAULT; + +UPDATE "#__content" SET "modified" = "created", "modified_by" = "created_by" WHERE "modified" = '1970-01-01 00:00:00'; + +UPDATE "#__content" SET "publish_up" = NULL WHERE "publish_up" = '1970-01-01 00:00:00'; +UPDATE "#__content" SET "publish_down" = NULL WHERE "publish_down" = '1970-01-01 00:00:00'; +UPDATE "#__content" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00'; + +UPDATE "#__ucm_content" SET "core_modified_time" = "core_created_time" + WHERE "core_type_alias" = 'com_content.article' + AND "core_modified_time" = '1970-01-01 00:00:00'; + +UPDATE "#__ucm_content" SET "core_publish_up" = NULL + WHERE "core_type_alias" = 'com_content.article' + AND "core_publish_up" = '1970-01-01 00:00:00'; +UPDATE "#__ucm_content" SET "core_publish_down" = NULL + WHERE "core_type_alias" = 'com_content.article' + AND "core_publish_down" = '1970-01-01 00:00:00'; +UPDATE "#__ucm_content" SET "core_checked_out_time" = NULL + WHERE "core_type_alias" = 'com_content.article' + AND "core_checked_out_time" = '1970-01-01 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-22.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-22.sql new file mode 100644 index 0000000000..517cd37548 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-22.sql @@ -0,0 +1 @@ +ALTER TABLE "#__messages" ALTER COLUMN "date_time" DROP DEFAULT; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-23.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-23.sql new file mode 100644 index 0000000000..9b99ebe587 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-23.sql @@ -0,0 +1,4 @@ +ALTER TABLE "#__redirect_links" ALTER COLUMN "created_date" DROP DEFAULT; +ALTER TABLE "#__redirect_links" ALTER COLUMN "modified_date" DROP DEFAULT; + +UPDATE "#__redirect_links" SET "modified_date" = "created_date" WHERE "modified_date" = '1970-01-01 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-24.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-24.sql new file mode 100644 index 0000000000..fadf8a2e69 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-24.sql @@ -0,0 +1 @@ +ALTER TABLE "#__action_logs" ALTER COLUMN "log_date" DROP DEFAULT; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-25.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-25.sql new file mode 100644 index 0000000000..b8401c8622 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-25.sql @@ -0,0 +1,15 @@ +ALTER TABLE "#__fields" ALTER COLUMN "created_time" DROP DEFAULT; +ALTER TABLE "#__fields" ALTER COLUMN "modified_time" DROP DEFAULT; +ALTER TABLE "#__fields" ALTER COLUMN "checked_out_time" DROP NOT NULL; +ALTER TABLE "#__fields" ALTER COLUMN "checked_out_time" DROP DEFAULT; + +ALTER TABLE "#__fields_groups" ALTER COLUMN "created" DROP DEFAULT; +ALTER TABLE "#__fields_groups" ALTER COLUMN "modified" DROP DEFAULT; +ALTER TABLE "#__fields_groups" ALTER COLUMN "checked_out_time" DROP NOT NULL; +ALTER TABLE "#__fields_groups" ALTER COLUMN "checked_out_time" DROP DEFAULT; + +UPDATE "#__fields" SET "modified_time" = "created_time", "modified_by" = "created_user_id" WHERE "modified_time" = '1970-01-01 00:00:00'; +UPDATE "#__fields" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00'; + +UPDATE "#__fields_groups" SET "modified" = "created", "modified_by" = "created_by" WHERE "modified" = '1970-01-01 00:00:00'; +UPDATE "#__fields_groups" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-26.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-26.sql new file mode 100644 index 0000000000..e68bd6e91c --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-26.sql @@ -0,0 +1,8 @@ +ALTER TABLE "#__privacy_requests" ALTER COLUMN "requested_at" DROP DEFAULT; + +ALTER TABLE "#__privacy_requests" ALTER COLUMN "confirm_token_created_at" DROP NOT NULL; +ALTER TABLE "#__privacy_requests" ALTER COLUMN "confirm_token_created_at" DROP DEFAULT; + +ALTER TABLE "#__privacy_consents" ALTER COLUMN "created" DROP DEFAULT; + +UPDATE "#__privacy_requests" SET "confirm_token_created_at" = NULL WHERE "confirm_token_created_at" = '1970-01-01 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-27.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-27.sql new file mode 100644 index 0000000000..1678cbae2b --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-27.sql @@ -0,0 +1,32 @@ +ALTER TABLE "#__tags" ALTER COLUMN "created_time" DROP DEFAULT; + +ALTER TABLE "#__tags" ALTER COLUMN "modified_time" DROP DEFAULT; + +ALTER TABLE "#__tags" ALTER COLUMN "publish_up" DROP NOT NULL; +ALTER TABLE "#__tags" ALTER COLUMN "publish_up" DROP DEFAULT; + +ALTER TABLE "#__tags" ALTER COLUMN "publish_down" DROP NOT NULL; +ALTER TABLE "#__tags" ALTER COLUMN "publish_down" DROP DEFAULT; + +ALTER TABLE "#__tags" ALTER COLUMN "checked_out_time" DROP NOT NULL; +ALTER TABLE "#__tags" ALTER COLUMN "checked_out_time" DROP DEFAULT; + +UPDATE "#__tags" SET "modified_time" = "created_time", "modified_user_id" = "created_user_id" WHERE "modified_time" = '1970-01-01 00:00:00'; + +UPDATE "#__tags" SET "publish_up" = NULL WHERE "publish_up" = '1970-01-01 00:00:00'; +UPDATE "#__tags" SET "publish_down" = NULL WHERE "publish_down" = '1970-01-01 00:00:00'; +UPDATE "#__tags" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00'; + +UPDATE "#__ucm_content" SET "core_modified_time" = "core_created_time" + WHERE "core_type_alias" = 'com_tags.tag' + AND "core_modified_time" = '1970-01-01 00:00:00'; + +UPDATE "#__ucm_content" SET "core_publish_up" = NULL + WHERE "core_type_alias" = 'com_tags.tag' + AND "core_publish_up" = '1970-01-01 00:00:00'; +UPDATE "#__ucm_content" SET "core_publish_down" = NULL + WHERE "core_type_alias" = 'com_tags.tag' + AND "core_publish_down" = '1970-01-01 00:00:00'; +UPDATE "#__ucm_content" SET "core_checked_out_time" = NULL + WHERE "core_type_alias" = 'com_tags.tag' + AND "core_checked_out_time" = '1970-01-01 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-28.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-28.sql new file mode 100644 index 0000000000..6545c19f7c --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-28.sql @@ -0,0 +1,36 @@ +ALTER TABLE "#__user_notes" ALTER COLUMN "created_time" DROP DEFAULT; + +ALTER TABLE "#__user_notes" ALTER COLUMN "modified_time" DROP DEFAULT; + +ALTER TABLE "#__user_notes" ALTER COLUMN "review_time" DROP NOT NULL; +ALTER TABLE "#__user_notes" ALTER COLUMN "review_time" DROP DEFAULT; + +ALTER TABLE "#__user_notes" ALTER COLUMN "publish_up" DROP NOT NULL; +ALTER TABLE "#__user_notes" ALTER COLUMN "publish_up" DROP DEFAULT; + +ALTER TABLE "#__user_notes" ALTER COLUMN "publish_down" DROP NOT NULL; +ALTER TABLE "#__user_notes" ALTER COLUMN "publish_down" DROP DEFAULT; + +ALTER TABLE "#__user_notes" ALTER COLUMN "checked_out_time" DROP NOT NULL; +ALTER TABLE "#__user_notes" ALTER COLUMN "checked_out_time" DROP DEFAULT; + +UPDATE "#__user_notes" SET "modified_time" = "created_time", "modified_user_id" = "created_user_id" WHERE "modified_time" = '1970-01-01 00:00:00'; + +UPDATE "#__user_notes" SET "review_time" = NULL WHERE "review_time" = '1970-01-01 00:00:00'; +UPDATE "#__user_notes" SET "publish_up" = NULL WHERE "publish_up" = '1970-01-01 00:00:00'; +UPDATE "#__user_notes" SET "publish_down" = NULL WHERE "publish_down" = '1970-01-01 00:00:00'; +UPDATE "#__user_notes" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00'; + +UPDATE "#__ucm_content" SET "core_modified_time" = "core_created_time" + WHERE "core_type_alias" = 'com_users.note' + AND "core_modified_time" = '1970-01-01 00:00:00'; + +UPDATE "#__ucm_content" SET "core_publish_up" = NULL + WHERE "core_type_alias" = 'com_users.note' + AND "core_publish_up" = '1970-01-01 00:00:00'; +UPDATE "#__ucm_content" SET "core_publish_down" = NULL + WHERE "core_type_alias" = 'com_users.note' + AND "core_publish_down" = '1970-01-01 00:00:00'; +UPDATE "#__ucm_content" SET "core_checked_out_time" = NULL + WHERE "core_type_alias" = 'com_users.note' + AND "core_checked_out_time" = '1970-01-01 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-29.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-29.sql new file mode 100644 index 0000000000..b5e21af114 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-09-29.sql @@ -0,0 +1,18 @@ +ALTER TABLE "#__categories" ALTER COLUMN "created_time" DROP DEFAULT; + +ALTER TABLE "#__categories" ALTER COLUMN "modified_time" DROP DEFAULT; + +ALTER TABLE "#__categories" ALTER COLUMN "checked_out_time" DROP NOT NULL; +ALTER TABLE "#__categories" ALTER COLUMN "checked_out_time" DROP DEFAULT; + +UPDATE "#__categories" SET "modified_time" = "created_time", "modified_user_id" = "created_user_id" WHERE "modified_time" = '1970-01-01 00:00:00'; + +UPDATE "#__categories" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00'; + +UPDATE "#__ucm_content" SET "core_modified_time" = "core_created_time" + WHERE "core_type_alias" IN ('com_content.category', 'com_contact.category', 'com_newsfeeds.category', 'com_banners.category', 'com_users.category') + AND "core_modified_time" = '1970-01-01 00:00:00'; + +UPDATE "#__ucm_content" SET "core_checked_out_time" = NULL + WHERE "core_type_alias" IN ('com_content.category', 'com_contact.category', 'com_newsfeeds.category', 'com_banners.category', 'com_users.category') + AND "core_checked_out_time" = '1970-01-01 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-10-06.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-10-06.sql new file mode 100644 index 0000000000..c94aa62bcb --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-10-06.sql @@ -0,0 +1,4 @@ +ALTER TABLE "#__extensions" ALTER COLUMN "checked_out_time" DROP NOT NULL; +ALTER TABLE "#__extensions" ALTER COLUMN "checked_out_time" DROP DEFAULT; + +UPDATE "#__extensions" SET "checked_out_time" = NULL WHERE "checked_out_time" = '1970-01-01 00:00:00'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-10-13.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-10-13.sql new file mode 100644 index 0000000000..180afe8a5f --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-10-13.sql @@ -0,0 +1,3 @@ +UPDATE "#__content_types" + SET "field_mappings" = REPLACE("field_mappings",'"core_created_time":"registerdate"','"core_created_time":"registerDate"') + WHERE "type_alias" = 'com_users.user'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-10-17.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-10-17.sql new file mode 100644 index 0000000000..1e1d753f63 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2019-10-17.sql @@ -0,0 +1,14 @@ +ALTER TABLE "#__users" ALTER COLUMN "registerDate" DROP DEFAULT; + +ALTER TABLE "#__users" ALTER COLUMN "lastvisitDate" DROP NOT NULL; +ALTER TABLE "#__users" ALTER COLUMN "lastvisitDate" DROP DEFAULT; + +ALTER TABLE "#__users" ALTER COLUMN "lastResetTime" DROP NOT NULL; +ALTER TABLE "#__users" ALTER COLUMN "lastResetTime" DROP DEFAULT; + +UPDATE "#__users" SET "lastvisitDate" = NULL WHERE "lastvisitDate" = '1970-01-01 00:00:00'; +UPDATE "#__users" SET "lastResetTime" = NULL WHERE "lastResetTime" = '1970-01-01 00:00:00'; + +UPDATE "#__content_types" + SET "field_mappings" = REPLACE("field_mappings",'"core_modified_time":"lastvisitDate"','"core_modified_time":"null"') + WHERE "type_alias" = 'com_users.user'; diff --git a/administrator/components/com_admin/tmpl/sysinfo/default.php b/administrator/components/com_admin/tmpl/sysinfo/default.php index 7437ebe1c8..44aee526f6 100644 --- a/administrator/components/com_admin/tmpl/sysinfo/default.php +++ b/administrator/components/com_admin/tmpl/sysinfo/default.php @@ -14,7 +14,6 @@ /** @var \Joomla\Component\Admin\Administrator\View\Sysinfo\HtmlView $this */ -HTMLHelper::_('behavior.tabstate'); ?>
diff --git a/administrator/components/com_admin/tmpl/sysinfo/default_system.php b/administrator/components/com_admin/tmpl/sysinfo/default_system.php index b5b787cf6e..91be588930 100644 --- a/administrator/components/com_admin/tmpl/sysinfo/default_system.php +++ b/administrator/components/com_admin/tmpl/sysinfo/default_system.php @@ -71,6 +71,22 @@ info['dbconnectioncollation']; ?> + + + + + + info['dbconnectionencryption'] ?: Text::_('JNONE'); ?> + + + + + + + + info['dbconnencryptsupported'] ? Text::_('JYES') : Text::_('JNO'); ?> + + diff --git a/administrator/components/com_ajax/ajax.xml b/administrator/components/com_ajax/ajax.xml index 75d3134253..e7e672ee41 100644 --- a/administrator/components/com_ajax/ajax.xml +++ b/administrator/components/com_ajax/ajax.xml @@ -13,15 +13,15 @@ ajax.php - language/en-GB.com_ajax.ini + language/en-GB/com_ajax.ini ajax.php - language/en-GB.com_ajax.ini - language/en-GB.com_ajax.sys.ini + language/en-GB/com_ajax.ini + language/en-GB/com_ajax.sys.ini diff --git a/administrator/components/com_associations/Field/ItemlanguageField.php b/administrator/components/com_associations/Field/ItemlanguageField.php index 3f23450b9c..49f0481736 100644 --- a/administrator/components/com_associations/Field/ItemlanguageField.php +++ b/administrator/components/com_associations/Field/ItemlanguageField.php @@ -60,7 +60,7 @@ protected function getOptions() $canCreate = AssociationsHelper::allowAdd($extensionName, $typeName); // Gets existing languages. - $existingLanguages = LanguageHelper::getContentLanguages(array(0, 1)); + $existingLanguages = LanguageHelper::getContentLanguages(array(0, 1), false); $options = array(); diff --git a/administrator/components/com_associations/Field/Modal/AssociationField.php b/administrator/components/com_associations/Field/Modal/AssociationField.php index f0ebb62078..3090a2d9e5 100644 --- a/administrator/components/com_associations/Field/Modal/AssociationField.php +++ b/administrator/components/com_associations/Field/Modal/AssociationField.php @@ -45,8 +45,8 @@ protected function getInput() // The active item id field. $value = (int) $this->value > 0 ? (int) $this->value : ''; - Factory::getDocument()->addScriptOptions('modal-associations', ['itemId' => $value]); - HTMLHelper::_('script', 'com_associations/modal-associations.min.js', ['version' => 'auto', 'relative' => true]); + Factory::getDocument()->addScriptOptions('admin_associations_modal', ['itemId' => $value]); + HTMLHelper::_('script', 'com_associations/admin_associations_modal.min.js', ['version' => 'auto', 'relative' => true]); // Setup variables for display. $html = array(); diff --git a/administrator/components/com_associations/Helper/AssociationsHelper.php b/administrator/components/com_associations/Helper/AssociationsHelper.php index ecdcc48031..651a1b4c63 100644 --- a/administrator/components/com_associations/Helper/AssociationsHelper.php +++ b/administrator/components/com_associations/Helper/AssociationsHelper.php @@ -19,6 +19,7 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Router\Route; +use Joomla\Database\ParameterType; use Joomla\Registry\Registry; /** @@ -222,7 +223,17 @@ public static function getAssociationHtmlList($extensionName, $typeName, $itemId $titleFieldName = self::getTypeFieldName($extensionName, $typeName, 'title'); // Get all content languages. - $languages = LanguageHelper::getContentLanguages(array(0, 1)); + $languages = LanguageHelper::getContentLanguages(array(0, 1), false); + $content_languages = array_column($languages, 'lang_code'); + + // Display warning if Content Language is trashed or deleted + foreach ($items as $item) + { + if (!in_array($item['language'], $content_languages)) + { + Factory::getApplication()->enqueueMessage(Text::sprintf('JGLOBAL_ASSOCIATIONS_CONTENTLANGUAGE_WARNING', $item['language']), 'warning'); + } + } $canEditReference = self::allowEdit($extensionName, $typeName, $itemId); $canCreate = self::allowAdd($extensionName, $typeName); @@ -263,12 +274,13 @@ public static function getAssociationHtmlList($extensionName, $typeName, $itemId $query = $db->getQuery(true) ->select($db->quoteName('title')) ->from($db->quoteName('#__categories')) - ->where($db->quoteName('id') . ' = ' . $db->quote($items[$langCode]['catid'])); + ->where($db->quoteName('id') . ' = :id') + ->bind(':id', $items[$langCode]['catid'], ParameterType::INTEGER); $db->setQuery($query); - $category_title = $db->loadResult(); + $categoryTitle = $db->loadResult(); - $additional = '' . Text::sprintf('JCATEGORY_SPRINTF', $category_title) . '
'; + $additional = '' . Text::sprintf('JCATEGORY_SPRINTF', $categoryTitle) . '
'; } elseif (isset($items[$langCode]['menutype'])) { @@ -278,12 +290,13 @@ public static function getAssociationHtmlList($extensionName, $typeName, $itemId $query = $db->getQuery(true) ->select($db->quoteName('title')) ->from($db->quoteName('#__menu_types')) - ->where($db->quoteName('menutype') . ' = ' . $db->quote($items[$langCode]['menutype'])); + ->where($db->quoteName('menutype') . ' = :menutype') + ->bind(':menutype', $items[$langCode]['menutype']); $db->setQuery($query); - $menutype_title = $db->loadResult(); + $menutypeTitle = $db->loadResult(); - $additional = '' . Text::sprintf('COM_MENUS_MENU_SPRINTF', $menutype_title) . '
'; + $additional = '' . Text::sprintf('COM_MENUS_MENU_SPRINTF', $menutypeTitle) . '
'; } $labelClass = 'badge-secondary'; @@ -324,7 +337,7 @@ public static function getAssociationHtmlList($extensionName, $typeName, $itemId . htmlspecialchars($title, ENT_QUOTES, 'UTF-8') . '

' . $additional; $classes = 'badge ' . $labelClass; - $items[$langCode]['link'] = '' . $text . '' + $items[$langCode]['link'] = '' . $text . '' . '
' . $tooltip . '
'; } diff --git a/administrator/components/com_associations/Model/AssociationsModel.php b/administrator/components/com_associations/Model/AssociationsModel.php index d4e0d2379f..42d1fb221a 100644 --- a/administrator/components/com_associations/Model/AssociationsModel.php +++ b/administrator/components/com_associations/Model/AssociationsModel.php @@ -18,6 +18,7 @@ use Joomla\CMS\Table\Table; use Joomla\Component\Associations\Administrator\Helper\AssociationsHelper; use Joomla\Database\Exception\ExecutionFailureException; +use Joomla\Database\ParameterType; /** * Methods supporting a list of article records. @@ -231,16 +232,27 @@ protected function getListQuery() $query->select($db->quoteName($fields['language'], 'language')) ->select($db->quoteName('l.title', 'language_title')) ->select($db->quoteName('l.image', 'language_image')) - ->join('LEFT', $db->quoteName('#__languages', 'l') . ' ON ' . $db->quoteName('l.lang_code') . ' = ' . $db->quoteName($fields['language'])); + ->join( + 'LEFT', + $db->quoteName('#__languages', 'l'), + $db->quoteName('l.lang_code') . ' = ' . $db->quoteName($fields['language']) + ); + $extensionNameItem = $extensionName . '.item'; // Join over the associations. $query->select('COUNT(' . $db->quoteName('asso2.id') . ') > 1 AS ' . $db->quoteName('association')) ->join( 'LEFT', - $db->quoteName('#__associations', 'asso') . ' ON ' . $db->quoteName('asso.id') . ' = ' . $db->quoteName($fields['id']) - . ' AND ' . $db->quoteName('asso.context') . ' = ' . $db->quote($extensionName . '.item') + $db->quoteName('#__associations', 'asso'), + $db->quoteName('asso.id') . ' = ' . $db->quoteName($fields['id']) + . ' AND ' . $db->quoteName('asso.context') . ' = :context' + ) + ->join( + 'LEFT', + $db->quoteName('#__associations', 'asso2'), + $db->quoteName('asso2.key') . ' = ' . $db->quoteName('asso.key') ) - ->join('LEFT', $db->quoteName('#__associations', 'asso2') . ' ON ' . $db->quoteName('asso2.key') . ' = ' . $db->quoteName('asso.key')); + ->bind(':context', $extensionNameItem); // Prepare the group by clause. $groupby = array( @@ -268,7 +280,11 @@ protected function getListQuery() // Join over the users. $query->select($db->quoteName('u.name', 'editor')) - ->join('LEFT', $db->quoteName('#__users', 'u') . ' ON ' . $db->quoteName('u.id') . ' = ' . $db->quoteName($fields['checked_out'])); + ->join( + 'LEFT', + $db->quoteName('#__users', 'u'), + $db->quoteName('u.id') . ' = ' . $db->quoteName($fields['checked_out']) + ); $groupby[] = 'u.name'; $groupby[] = $fields['checked_out']; @@ -306,7 +322,11 @@ protected function getListQuery() // Join over the categories. $query->select($db->quoteName('c.title', 'category_title')) - ->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON ' . $db->quoteName('c.id') . ' = ' . $db->quoteName($fields['catid'])); + ->join( + 'LEFT', + $db->quoteName('#__categories', 'c'), + $db->quoteName('c.id') . ' = ' . $db->quoteName($fields['catid']) + ); $groupby[] = 'c.title'; $groupby[] = $fields['catid']; @@ -320,7 +340,11 @@ protected function getListQuery() // Join over the menu types. $query->select($db->quoteName('mt.title', 'menutype_title')) ->select($db->quoteName('mt.id', 'menutypeid')) - ->join('LEFT', $db->quoteName('#__menu_types', 'mt') . ' ON ' . $db->quoteName('mt.menutype') . ' = ' . $db->quoteName($fields['menutype'])); + ->join( + 'LEFT', + $db->quoteName('#__menu_types', 'mt'), + $db->quoteName('mt.menutype') . ' = ' . $db->quoteName($fields['menutype']) + ); $groupby[] = 'mt.title'; $groupby[] = 'mt.id'; @@ -334,7 +358,11 @@ protected function getListQuery() // Join over the access levels. $query->select($db->quoteName('ag.title', 'access_level')) - ->join('LEFT', $db->quoteName('#__viewlevels', 'ag') . ' ON ' . $db->quoteName('ag.id') . ' = ' . $db->quoteName($fields['access'])); + ->join( + 'LEFT', + $db->quoteName('#__viewlevels', 'ag'), + $db->quoteName('ag.id') . ' = ' . $db->quoteName($fields['access']) + ); $groupby[] = 'ag.title'; $groupby[] = $fields['access']; @@ -342,7 +370,8 @@ protected function getListQuery() // Implement View Level Access. if (!$user->authorise('core.admin', $extensionName)) { - $query->where($fields['access'] . ' IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')'); + $groups = $user->getAuthorisedViewLevels(); + $query->whereIn($db->quoteName($fields['access']), $groups); } } @@ -356,21 +385,25 @@ protected function getListQuery() // If component item type is category we need to remove all other component categories. if ($typeName === 'category') { - $query->where($db->quoteName('a.extension') . ' = ' . $db->quote($extensionName)); + $query->where($db->quoteName('a.extension') . ' = :extensionname') + ->bind(':extensionname', $extensionName); } elseif ($typeNameExploded = explode('.', $typeName)) { if (count($typeNameExploded) > 1 && array_pop($typeNameExploded) === 'category') { $section = implode('.', $typeNameExploded); - $query->where($db->quoteName('a.extension') . ' = ' . $db->quote($extensionName . '.' . $section)); + $extensionNameSection = $extensionName . '.' . $section; + $query->where($db->quoteName('a.extension') . ' = :extensionsection') + ->bind(':extensionsection', $extensionNameSection); } } // Filter on the language. if ($language = $this->getState('language')) { - $query->where($db->quoteName($fields['language']) . ' = ' . $db->quote($language)); + $query->where($db->quoteName($fields['language']) . ' = :language') + ->bind(':language', $language); } // Filter by item state. @@ -378,11 +411,13 @@ protected function getListQuery() if (is_numeric($state)) { - $query->where($db->quoteName($fields['state']) . ' = ' . (int) $state); + $state = (int) $state; + $query->where($db->quoteName($fields['state']) . ' = :state') + ->bind(':state', $state, ParameterType::INTEGER); } elseif ($state === '') { - $query->where($db->quoteName($fields['state']) . ' IN (0, 1)'); + $query->whereIn($db->quoteName($fields['state']), [0, 1]); } // Filter on the category. @@ -394,26 +429,35 @@ protected function getListQuery() $categoryTable->load($categoryId); $baselevel = (int) $categoryTable->level; - $query->where($db->quoteName('c.lft') . ' >= ' . (int) $categoryTable->lft) - ->where($db->quoteName('c.rgt') . ' <= ' . (int) $categoryTable->rgt); + $lft = (int) $categoryTable->lft; + $rgt = (int) $categoryTable->rgt; + $query->where($db->quoteName('c.lft') . ' >= :lft') + ->where($db->quoteName('c.rgt') . ' <= :rgt') + ->bind(':lft', $lft, ParameterType::INTEGER) + ->bind(':rgt', $rgt, ParameterType::INTEGER); } // Filter on the level. if ($level = $this->getState('filter.level')) { - $query->where($db->quoteName('a.level') . ' <= ' . ((int) $level + (int) $baselevel - 1)); + $queryLevel = ((int) $level + (int) $baselevel - 1); + $query->where($db->quoteName('a.level') . ' <= :alevel') + ->bind(':alevel', $queryLevel, ParameterType::INTEGER); } // Filter by menu type. if ($menutype = $this->getState('filter.menutype')) { - $query->where($fields['menutype'] . ' = ' . $db->quote($menutype)); + $query->where($db->quoteName($fields['menutype']) . ' = :menutype2') + ->bind(':menutype2', $menutype); } // Filter by access level. if ($access = $this->getState('filter.access')) { - $query->where($fields['access'] . ' = ' . (int) $access); + $access = (int) $access; + $query->where($db->quoteName($fields['access']) . ' = :access') + ->bind(':access', $access, ParameterType::INTEGER); } // Filter by search in name. @@ -421,14 +465,18 @@ protected function getListQuery() { if (stripos($search, 'id:') === 0) { - $query->where($db->quoteName($fields['id']) . ' = ' . (int) substr($search, 3)); + $search = (int) substr($search, 3); + $query->where($db->quoteName($fields['id']) . ' = :searchid') + ->bind(':searchid', $search, ParameterType::INTEGER); } else { - $search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%')); - $query->where('(' . $db->quoteName($fields['title']) . ' LIKE ' . $search - . ' OR ' . $db->quoteName($fields['alias']) . ' LIKE ' . $search . ')' - ); + $search = '%' . str_replace(' ', '%', trim($search)) . '%'; + $query->where('(' . $db->quoteName($fields['title']) . ' LIKE :title' + . ' OR ' . $db->quoteName($fields['alias']) . ' LIKE :alias)' + ) + ->bind(':title', $search) + ->bind(':alias', $search); } } @@ -463,13 +511,15 @@ public function purge($context = '', $key = '') // Filter by associations context. if ($context) { - $query->where($db->quoteName('context') . ' = ' . $db->quote($context)); + $query->where($db->quoteName('context') . ' = :context') + ->bind(':context', $context); } // Filter by key. if ($key) { - $query->where($db->quoteName('key') . ' = ' . $db->quote($key)); + $query->where($db->quoteName('key') . ' = :key') + ->bind(':key', $key); } $db->setQuery($query); @@ -516,13 +566,15 @@ public function clean($context = '', $key = '') // Filter by associations context. if ($context) { - $query->where($db->quoteName('context') . ' = ' . $db->quote($context)); + $query->where($db->quoteName('context') . ' = :context') + ->bind(':context', $context); } // Filter by key. if ($key) { - $query->where($db->quoteName('key') . ' = ' . $db->quote($key)); + $query->where($db->quoteName('key') . ' = :key') + ->bind(':key', $key); } $db->setQuery($query); @@ -536,7 +588,8 @@ public function clean($context = '', $key = '') { $query->clear() ->delete($db->quoteName('#__associations')) - ->where($db->quoteName('key') . ' = ' . $db->quote($value->key)); + ->where($db->quoteName('key') . ' = :valuekey') + ->bind(':valuekey', $value->key); $db->setQuery($query); diff --git a/administrator/components/com_associations/View/Association/HtmlView.php b/administrator/components/com_associations/View/Association/HtmlView.php index f1a412e225..3569ef1207 100644 --- a/administrator/components/com_associations/View/Association/HtmlView.php +++ b/administrator/components/com_associations/View/Association/HtmlView.php @@ -11,13 +11,21 @@ defined('_JEXEC') or die; +use Joomla\CMS\Application\AdministratorApplication; use Joomla\CMS\Factory; +use Joomla\CMS\Form\Form; use Joomla\CMS\Language\Text; +use Joomla\CMS\MVC\View\GenericDataException; use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; +use Joomla\CMS\Object\CMSObject; +use Joomla\CMS\Pagination\Pagination; use Joomla\CMS\Router\Route; use Joomla\CMS\Toolbar\Toolbar; use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\Component\Associations\Administrator\Helper\AssociationsHelper; +use Joomla\Component\Associations\Administrator\Model\AssociationModel; +use Joomla\Input\Input; +use Joomla\Registry\Registry; use Joomla\Utilities\ArrayHelper; /** @@ -34,12 +42,12 @@ class HtmlView extends BaseHtmlView * * @since 3.7.0 */ - protected $items; + protected $items = []; /** * The pagination object * - * @var \Joomla\CMS\Pagination\Pagination + * @var Pagination * * @since 3.7.0 */ @@ -48,7 +56,7 @@ class HtmlView extends BaseHtmlView /** * The model state * - * @var object + * @var CMSObject * * @since 3.7.0 */ @@ -57,11 +65,147 @@ class HtmlView extends BaseHtmlView /** * Selected item type properties. * - * @var \Joomla\Registry\Registry + * @var Registry * * @since 3.7.0 */ - public $itemType = null; + protected $itemType; + + /** + * The application + * + * @var AdministratorApplication + * @since 3.7.0 + */ + protected $app; + + /** + * The ID of the reference language + * + * @var integer + * @since 3.7.0 + */ + protected $referenceId = 0; + + /** + * The type name + * + * @var string + * @since 3.7.0 + */ + protected $typeName = ''; + + /** + * The reference language + * + * @var string + * @since 3.7.0 + */ + protected $referenceLanguage = ''; + + /** + * The title of the reference language + * + * @var string + * @since 3.7.0 + */ + protected $referenceTitle = ''; + + /** + * The value of the reference title + * + * @var string + * @since 3.7.0 + */ + protected $referenceTitleValue = ''; + + /** + * The URL to the edit screen + * + * @var string + * @since 3.7.0 + */ + protected $editUri = ''; + + /** + * The ID of the target field + * + * @var string + * @since 3.7.0 + */ + protected $targetId = ''; + + /** + * The target language + * + * @var string + * @since 3.7.0 + */ + protected $targetLanguage = ''; + + /** + * The source of the target field + * + * @var string + * @since 3.7.0 + */ + protected $defaultTargetSrc = ''; + + /** + * The action to perform for the target field + * + * @var string + * @since 3.7.0 + */ + protected $targetAction = ''; + + /** + * The title of the target field + * + * @var string + * @since 3.7.0 + */ + protected $targetTitle = ''; + + /** + * The edit form + * + * @var Form + * @since 3.7.0 + */ + protected $form; + + /** + * Set if the option is set to save as copy + * + * @var boolean + * @since 3.7.0 + */ + private $save2copy = false; + + /** + * The type of language + * + * @var Registry + * @since 3.7.0 + */ + private $type; + + /** + * The supported types + * + * @var array + * @since 3.7.0 + */ + private $typeSupports = []; + + /** + * The extension name + * + * @var string + * @since 3.7.0 + */ + private $extensionName = ''; /** * Display the view @@ -71,36 +215,42 @@ class HtmlView extends BaseHtmlView * @return void * * @since 3.7.0 + * * @throws \Exception */ - public function display($tpl = null) + public function display($tpl = null): void { + /** @var AssociationModel $model */ + $model = $this->getModel(); + // Check for errors. - if (count($errors = $this->get('Errors'))) + if (count($errors = $model->getErrors())) { - throw new \Exception(implode("\n", $errors), 500); + throw new GenericDataException(implode("\n", $errors), 500); } $this->app = Factory::getApplication(); - $this->form = $this->get('Form'); - $input = $this->app->input; + $this->form = $model->getForm(); + /** @var Input $input */ + $input = $this->app->input; $this->referenceId = $input->get('id', 0, 'int'); - list($extensionName, $typeName) = explode('.', $input->get('itemtype', '', 'string'), 2); + [$extensionName, $typeName] = explode('.', $input->get('itemtype', '', 'string'), 2); + /** @var Registry $extension */ $extension = AssociationsHelper::getSupportedExtension($extensionName); $types = $extension->get('types'); if (array_key_exists($typeName, $types)) { - $this->type = $types[$typeName]; - $this->typeSupports = array(); - $details = $this->type->get('details'); - $this->save2copy = false; + $this->type = $types[$typeName]; + $this->typeSupports = []; + $details = $this->type->get('details'); + $this->save2copy = false; if (array_key_exists('support', $details)) { - $support = $details['support']; + $support = $details['support']; $this->typeSupports = $support; } @@ -112,14 +262,15 @@ public function display($tpl = null) $this->extensionName = $extensionName; $this->typeName = $typeName; - $this->itemtype = $extensionName . '.' . $typeName; + $this->itemType = $extensionName . '.' . $typeName; $languageField = AssociationsHelper::getTypeFieldName($extensionName, $typeName, 'language'); $referenceId = $input->get('id', 0, 'int'); $reference = ArrayHelper::fromObject(AssociationsHelper::getItem($extensionName, $typeName, $referenceId)); - $this->referenceLanguage = $reference[$languageField]; - $this->referenceTitle = AssociationsHelper::getTypeFieldName($extensionName, $typeName, 'title'); + $this->referenceLanguage = $reference[$languageField]; + $this->referenceTitle = AssociationsHelper::getTypeFieldName($extensionName, $typeName, 'title'); + $this->referenceTitleValue = $reference[$this->referenceTitle]; // Check for special case category $typeNameExploded = explode('.', $typeName); @@ -133,21 +284,21 @@ public function display($tpl = null) $extensionName .= '.' . implode('.', $typeNameExploded); } - $options = array( + $options = [ 'option' => 'com_categories', 'view' => 'category', 'extension' => $extensionName, 'tmpl' => 'component', - ); + ]; } else { - $options = array( + $options = [ 'option' => $extensionName, 'view' => $typeName, 'extension' => $extensionName, 'tmpl' => 'component', - ); + ]; } // Reference and target edit links. @@ -162,19 +313,18 @@ public function display($tpl = null) if ($target = $input->get('target', '', 'string')) { - $matches = preg_split("#[\:]+#", $target); - $this->targetAction = $matches[2]; - $this->targetId = $matches[1]; - $this->targetLanguage = $matches[0]; - $this->targetTitle = AssociationsHelper::getTypeFieldName($extensionName, $typeName, 'title'); - $task = $typeName . '.' . $this->targetAction; - - /* + $matches = preg_split("#[\:]+#", $target); + $this->targetAction = $matches[2]; + $this->targetId = $matches[1]; + $this->targetLanguage = $matches[0]; + $this->targetTitle = AssociationsHelper::getTypeFieldName($extensionName, $typeName, 'title'); + $task = $typeName . '.' . $this->targetAction; + + /** * Let's put the target src into a variable to use in the javascript code - * to avoid race conditions when the reference iframe loads. + * to avoid race conditions when the reference iframe loads. */ - $document = Factory::getDocument(); - $document->addScriptOptions('targetSrc', Route::_($this->editUri . '&task=' . $task . '&id=' . (int) $this->targetId)); + $this->document->addScriptOptions('targetSrc', Route::_($this->editUri . '&task=' . $task . '&id=' . (int) $this->targetId)); $this->form->setValue('itemlanguage', '', $this->targetLanguage . ':' . $this->targetId . ':' . $this->targetAction); } @@ -189,11 +339,13 @@ public function display($tpl = null) * @return void * * @since 3.7.0 + * + * @throws \Exception */ - protected function addToolbar() + protected function addToolbar(): void { // Hide main menu. - Factory::getApplication()->input->set('hidemainmenu', 1); + $this->app->input->set('hidemainmenu', 1); $helper = AssociationsHelper::getExtensionHelper($this->extensionName); $title = $helper->getTypeTitle($this->typeName); @@ -205,9 +357,16 @@ protected function addToolbar() $languageKey = strtoupper($this->extensionName) . '_CATEGORIES'; } - ToolbarHelper::title(Text::sprintf('COM_ASSOCIATIONS_TITLE_EDIT', Text::_($this->extensionName), Text::_($languageKey)), 'language assoc'); + ToolbarHelper::title( + Text::sprintf( + 'COM_ASSOCIATIONS_TITLE_EDIT', + Text::_($this->extensionName), + Text::_($languageKey) + ), + 'language assoc' + ); - $bar = Toolbar::getInstance('toolbar'); + $bar = Toolbar::getInstance(); $bar->appendButton( 'Custom', '