CoreFiles by mySites.guru
languageaccess340.php43 lines, 1,264 bytes, from Joomla_6.2.0-Stable-Full_Package.zip
Raw History Compare with 6.1.4
md5
6f95f181f103a31084d13f490399a60c
sha1
7524141aa73d46448b4123c79190acba4f16aa6b
sha256
7fa20bfa90be12439a69fa26e76aec4eb95df2eed48bdbf883bf02ff95aa488e
<?php

/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 *
 * This file contains post-installation message handling for the checks if the installation is
 * affected by the issue with content languages access in 3.4.0
 */

use Joomla\CMS\Factory;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Checks if the installation is affected by the issue with content languages access in 3.4.0
 *
 * @link    https://github.com/joomla/joomla-cms/pull/6172
 * @link    https://github.com/joomla/joomla-cms/pull/6194
 *
 * @return  boolean
 *
 * @since   3.4.1
 */
function admin_postinstall_languageaccess340_condition()
{
    $db    = Factory::getDbo();
    $query = $db->createQuery()
        ->select($db->quoteName('access'))
        ->from($db->quoteName('#__languages'))
        ->where($db->quoteName('access') . ' = ' . $db->quote('0'));
    $db->setQuery($query);
    $db->execute();
    $numRows = $db->getNumRows();

    // Return true if we have have at minimum one row with access set to 0
    return $numRows > 0;
}

The same content is in 9 releases, Joomla 6.2.0-alpha2 to 6.2.1-rc1. See them all, or every version of this file.