9bc9d1da by Yokihito Oki

git 管理ファイル整理の為 リポジトリ再作成

0 parents
Showing 1000 changed files with 4277 additions and 0 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

app/administrator/cache/*
administrator/logs/*
cache
files
images
php5.6-back
.git.back/
\ No newline at end of file
# AddHandler x-httpd-php5619 .php
Options +SymLinksIfOwnerMatch
Options -Indexes
RewriteEngine on
## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on Joomla!
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.
## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects
##
# Uncomment the following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##
# RewriteBase /
## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.
RewriteEngine On
# RewriteCond %{HTTPS} off
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
#20200122 - IPアクセスリダイレクトnozaki
RewriteBase /
RewriteCond %{HTTP_HOST} ^18\.178\.92\.128$ [NC]
RewriteRule .* https://www.nifs-k.ac.jp%{REQUEST_URI} [R=302,L]
<IfModule mod_siteguard.c>
SiteGuard_User_ExcludeSig ip(202.95.45.168)
SiteGuard_User_ExcludeSig ip(202.24.160.0/21)
SiteGuard_User_ExcludeSig ip(210.137.6.192/26)
SiteGuard_User_ExcludeSig ip(210.237.39.72)
SiteGuard_User_ExcludeSig ip(210.237.36.185)
SiteGuard_User_ExcludeSig ip(18.178.92.128)
</IfModule>
File mode changed
This diff is collapsed. Click to expand it.
<?php
/**
* PHPMailer SPL autoloader.
* PHP Version 5
* @package PHPMailer
* @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2012 - 2014 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
* PHPMailer SPL autoloader.
* @param string $classname The name of the class to load
*/
function PHPMailerAutoload($classname)
{
//Can't use __DIR__ as it's only in PHP 5.3+
$filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php';
if (is_readable($filename)) {
require $filename;
}
}
if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
//SPL autoloading was introduced in PHP 5.1.2
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
spl_autoload_register('PHPMailerAutoload', true, true);
} else {
spl_autoload_register('PHPMailerAutoload');
}
} else {
/**
* Fall back to traditional autoload for old PHP versions
* @param string $classname The name of the class to load
*/
function __autoload($classname)
{
PHPMailerAutoload($classname);
}
}
1- What is this?
* This is a Joomla! installation/upgrade package to version 3.x
* Joomla! Official site: https://www.joomla.org
* Joomla! 3.9 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_3.9_version_history
* Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/staging
2- What is Joomla?
* Joomla! is a Content Management System (CMS) which enables you to build Web sites and powerful online applications.
* It's a free and Open Source software, distributed under the GNU General Public License version 2 or later.
* This is a simple and powerful web server application and it requires a server with PHP and either MySQL, PostgreSQL or SQL Server to run.
You can find full technical requirements here: https://downloads.joomla.org/technical-requirements.
3- Is Joomla! for you?
* Joomla! is the right solution for most content web projects: https://docs.joomla.org/Special:MyLanguage/Portal:Learn_More
* See Joomla's core features - https://www.joomla.org/core-features.html
* Try out our free hosting service: https://launch.joomla.org
4- How to find a Joomla! translation?
* Repository of accredited language packs: https://community.joomla.org/translations.html
* You can also add languages directly to your website via your Joomla! administration panel: https://docs.joomla.org/Special:MyLanguage/J3.x:Setup_a_Multilingual_Site/Installing_New_Language
* Learn how to setup a Multilingual Joomla! Site: https://docs.joomla.org/Special:MyLanguage/J3.x:Setup_a_Multilingual_Site
5- Learn Joomla!
* Read Getting Started with Joomla to find out the basics: https://docs.joomla.org/Special:MyLanguage/J3.x:Getting_Started_with_Joomla!
* Before installing, read the beginners guide: https://docs.joomla.org/Special:MyLanguage/Portal:Beginners
6- What are the benefits of Joomla?
* The functionality of a Joomla! website can be extended by installing extensions that you can create (or download) to suit your needs.
* There are many ready-made extensions that you can download and install.
* Check out the Joomla! Extensions Directory (JED): https://extensions.joomla.org
7- Is it easy to change the layout display?
* The layout is controlled by templates that you can edit.
* There are a lot of ready-made professional templates that you can download.
* Check out the template management information: https://docs.joomla.org/Special:MyLanguage/Portal:Template_Management
8- Ready to install Joomla?
* Check the minimum requirements here: https://downloads.joomla.org/technical-requirements
* How do you install Joomla - https://docs.joomla.org/Special:MyLanguage/J3.x:Installing_Joomla
* You could start your Joomla! experience building your site on a local test server.
When ready it can be moved to an online hosting account of your choice.
See the tutorial: https://docs.joomla.org/Special:MyLanguage/Installing_Joomla_locally
9- Updates are free!
* Always use the latest version: https://downloads.joomla.org/latest
10- Where can you get support and help?
* The Joomla! Documentation: https://docs.joomla.org/Special:MyLanguage/Main_Page
* FAQ Frequently Asked Questions: https://docs.joomla.org/Special:MyLanguage/Category:FAQ
* Find the information you need: https://docs.joomla.org/Special:MyLanguage/Start_here
* Find help and other users: https://www.joomla.org/about-joomla/create-and-share.html
* Post questions at our forums: https://forum.joomla.org
* Joomla! Resources Directory (JRD): https://resources.joomla.org/
11- Do you already have a Joomla! site that's not built with Joomla! 3.x ?
* What's new in Joomla! 3.x: https://www.joomla.org/3
* What are the main differences from 2.5 to 3? https://docs.joomla.org/Special:MyLanguage/What_are_the_major_differences_between_Joomla!_2.5_and_3.x%3F
* How to migrate from 2.5.x to 3.x? Tutorial: https://docs.joomla.org/Special:MyLanguage/Joomla_2.5_to_3.x_Step_by_Step_Migration
* How to migrate from 1.5.x to 3.x? Tutorial: https://docs.joomla.org/Special:MyLanguage/Joomla_1.5_to_3.x_Step_by_Step_Migration
12- Do you want to improve Joomla?
* Where to request a feature? https://issues.joomla.org
* How do you report a bug? https://docs.joomla.org/Special:MyLanguage/Filing_bugs_and_issues
* Get Involved: Joomla! is a community developed software. Join the community at https://volunteers.joomla.org
* Documentation for Developers: https://docs.joomla.org/Special:MyLanguage/Portal:Developers
* Documentation for Web designers: https://docs.joomla.org/Special:MyLanguage/Web_designers
Copyright:
* Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.
* Distributed under the GNU General Public License version 2 or later
* See License details at https://docs.joomla.org/Special:MyLanguage/Joomla_Licenses
File mode changed
# wIP̂݋
order deny,allow
deny from all
allow from 202.24.160.0/21
allow from 210.137.6.192/26
allow from 119.47.143.238
allow from 124.146.74.107
allow from 210.237.39.72
allow from 119.104.47.100
\ No newline at end of file
# 指定IPのみ許可
order deny,allow
deny from all
#鹿屋体育大学
allow from 202.24.160.0/21
allow from 210.137.6.192/26
#Em
allow from 114.142.103.192
#Ek
allow from 203.111.201.163
allow from 120.51.222.209
allow from 203.145.109.98
#MBC
allow from 210.237.39.72
# wIP̂݋
order deny,allow
deny from all
allow from 202.24.160.0/21
allow from 210.137.6.192/26
allow from 119.47.143.238
allow from 124.146.74.107
allow from 210.237.39.72
allow from 124.150.217.38
\ No newline at end of file
<?php
/**
* @package Joomla.Administrator
* @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.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
if (!Factory::getUser()->authorise('core.admin'))
{
throw new NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
}
$controller = BaseController::getInstance('Actionlogs');
$controller->execute(Factory::getApplication()->input->get('task'));
$controller->redirect();
<?xml version="1.0" encoding="UTF-8"?>
<extension version="3.9" type="component" method="upgrade">
<name>com_actionlogs</name>
<author>Joomla! Project</author>
<creationDate>May 2018</creationDate>
<copyright>Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>3.9.0</version>
<description>COM_ACTIONLOGS_XML_DESCRIPTION</description>
<administration>
<menu>COM_ACTIONLOGS</menu>
<files folder="admin">
<file>actionlogs.php</file>
<file>config.xml</file>
<file>access.xml</file>
<file>controller.php</file>
<folder>controllers</folder>
<folder>helpers</folder>
<folder>models</folder>
<folder>views</folder>
</files>
<languages folder="admin">
<language tag="en-GB">language/en-GB.com_actionlogs.ini</language>
<language tag="en-GB">language/en-GB.com_actionlogs.sys.ini</language>
</languages>
</administration>
</extension>
<?xml version="1.0" encoding="utf-8"?>
<config>
<fieldset name="actionlogs" label="COM_ACTIONLOGS_OPTIONS" addfieldpath="/administrator/components/com_actionlogs/models/fields">
<field
name="ip_logging"
type="radio"
label="COM_ACTIONLOGS_IP_LOGGING_LABEL"
description="COM_ACTIONLOGS_IP_LOGGING_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="csv_delimiter"
type="list"
label="COM_ACTIONLOGS_CSV_DELIMITER_LABEL"
description="COM_ACTIONLOGS_CSV_DELIMITER_DESC"
default=","
>
<option value=",">COM_ACTIONLOGS_COMMA</option>
<option value=";">COM_ACTIONLOGS_SEMICOLON</option>
</field>
<field
name="loggable_extensions"
type="logtype"
label="COM_ACTIONLOGS_LOG_EXTENSIONS_LABEL"
description="COM_ACTIONLOGS_LOG_EXTENSIONS_DESC"
multiple="true"
default="com_banners,com_cache,com_categories,com_checkin,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"
/>
</fieldset>
</config>
<?php
/**
* @package Joomla.Administrator
* @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.txt
*/
defined('_JEXEC') or die;
/**
* Actionlogs Controller
*
* @since 3.9.0
*/
class ActionlogsController extends JControllerLegacy
{
}
<?php
/**
* @package Joomla.Administrator
* @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.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Date\Date;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Utilities\ArrayHelper;
JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');
/**
* Actionlogs list controller class.
*
* @since 3.9.0
*/
class ActionlogsControllerActionlogs extends JControllerAdmin
{
/**
* Constructor.
*
* @param array $config An optional associative array of configuration settings.
*
* @since 3.9.0
*/
public function __construct(array $config = array())
{
parent::__construct($config);
$this->registerTask('exportSelectedLogs', 'exportLogs');
}
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return object The model.
*
* @since 3.9.0
*/
public function getModel($name = 'Actionlogs', $prefix = 'ActionlogsModel', $config = array('ignore_request' => true))
{
// Return the model
return parent::getModel($name, $prefix, $config);
}
/**
* Method to export logs
*
* @return void
*
* @since 3.9.0
*/
public function exportLogs()
{
// Check for request forgeries.
$this->checkToken();
$task = $this->getTask();
$pks = array();
if ($task == 'exportSelectedLogs')
{
// Get selected logs
$pks = ArrayHelper::toInteger(explode(',', $this->input->post->getString('cids')));
}
/** @var ActionlogsModelActionlogs $model */
$model = $this->getModel();
// Get the logs data
$data = $model->getLogDataAsIterator($pks);
if (count($data))
{
try
{
$rows = ActionlogsHelper::getCsvData($data);
}
catch (InvalidArgumentException $exception)
{
$this->setMessage(Text::_('COM_ACTIONLOGS_ERROR_COULD_NOT_EXPORT_DATA'), 'error');
$this->setRedirect(Route::_('index.php?option=com_actionlogs&view=actionlogs', false));
return;
}
// Destroy the iterator now
unset($data);
$date = new Date('now', new DateTimeZone('UTC'));
$filename = 'logs_' . $date->format('Y-m-d_His_T');
$csvDelimiter = ComponentHelper::getComponent('com_actionlogs')->getParams()->get('csv_delimiter', ',');
$app = Factory::getApplication();
$app->setHeader('Content-Type', 'application/csv', true)
->setHeader('Content-Disposition', 'attachment; filename="' . $filename . '.csv"', true)
->setHeader('Cache-Control', 'must-revalidate', true)
->sendHeaders();
$output = fopen("php://output", "w");
foreach ($rows as $row)
{
fputcsv($output, $row, $csvDelimiter);
}
fclose($output);
$app->triggerEvent('onAfterLogExport', array());
$app->close();
}
else
{
$this->setMessage(Text::_('COM_ACTIONLOGS_NO_LOGS_TO_EXPORT'));
$this->setRedirect(Route::_('index.php?option=com_actionlogs&view=actionlogs', false));
}
}
/**
* Clean out the logs
*
* @return void
*
* @since 3.9.0
*/
public function purge()
{
// Check for request forgeries.
$this->checkToken();
$model = $this->getModel();
if ($model->purge())
{
$message = Text::_('COM_ACTIONLOGS_PURGE_SUCCESS');
}
else
{
$message = Text::_('COM_ACTIONLOGS_PURGE_FAIL');
}
$this->setRedirect(Route::_('index.php?option=com_actionlogs&view=actionlogs', false), $message);
}
}
<?php
/**
* @package Joomla.Administrator
* @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.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Date\Date;
use Joomla\CMS\Factory;
use Joomla\CMS\Filesystem\Path;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\String\StringHelper;
/**
* Actionlogs component helper.
*
* @since 3.9.0
*/
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
*
* @param array|Traversable $data The logs data objects to be exported
*
* @return array|Generator For PHP 5.5 and newer, a Generator is returned; PHP 5.4 and earlier use an array
*
* @since 3.9.0
* @throws InvalidArgumentException
*/
public static function getCsvData($data)
{
if (!is_iterable($data))
{
throw new InvalidArgumentException(
sprintf(
'%s() requires an array or object implementing the Traversable interface, a %s was given.',
__METHOD__,
gettype($data) === 'object' ? get_class($data) : gettype($data)
)
);
}
if (version_compare(PHP_VERSION, '5.5', '>='))
{
// Only include the PHP 5.5 helper in this conditional to prevent the potential of parse errors for PHP 5.4 or earlier
JLoader::register('ActionlogsHelperPhp55', __DIR__ . '/actionlogsphp55.php');
return ActionlogsHelperPhp55::getCsvAsGenerator($data);
}
$disabledText = Text::_('COM_ACTIONLOGS_DISABLED');
$rows = array();
// Header row
$rows[] = array('Id', 'Message', 'Date', 'Extension', 'User', 'Ip');
foreach ($data as $log)
{
$date = new Date($log->log_date, new DateTimeZone('UTC'));
$extension = strtok($log->extension, '.');
static::loadTranslationFiles($extension);
$rows[] = array(
'id' => $log->id,
'message' => self::escapeCsvFormula(strip_tags(static::getHumanReadableLogMessage($log, false))),
'date' => $date->format('Y-m-d H:i:s T'),
'extension' => self::escapeCsvFormula(Text::_($extension)),
'name' => self::escapeCsvFormula($log->name),
'ip_address' => self::escapeCsvFormula($log->ip_address === 'COM_ACTIONLOGS_DISABLED' ? $disabledText : $log->ip_address)
);
}
return $rows;
}
/**
* Load the translation files for an extension
*
* @param string $extension Extension name
*
* @return void
*
* @since 3.9.0
*/
public static function loadTranslationFiles($extension)
{
static $cache = array();
$extension = strtolower($extension);
if (isset($cache[$extension]))
{
return;
}
$lang = Factory::getLanguage();
$source = '';
switch (substr($extension, 0, 3))
{
case 'com':
default:
$source = JPATH_ADMINISTRATOR . '/components/' . $extension;
break;
case 'lib':
$source = JPATH_LIBRARIES . '/' . substr($extension, 4);
break;
case 'mod':
$source = JPATH_SITE . '/modules/' . $extension;
break;
case 'plg':
$parts = explode('_', $extension, 3);
if (count($parts) > 2)
{
$source = JPATH_PLUGINS . '/' . $parts[1] . '/' . $parts[2];
}
break;
case 'pkg':
$source = JPATH_SITE;
break;
case 'tpl':
$source = JPATH_BASE . '/templates/' . substr($extension, 4);
break;
}
$lang->load($extension, JPATH_ADMINISTRATOR, null, false, true)
|| $lang->load($extension, $source, null, false, true);
if (!$lang->hasKey(strtoupper($extension)))
{
$lang->load($extension . '.sys', JPATH_ADMINISTRATOR, null, false, true)
|| $lang->load($extension . '.sys', $source, null, false, true);
}
$cache[$extension] = true;
}
/**
* Get parameters to be
*
* @param string $context The context of the content
*
* @return mixed An object contains content type parameters, or null if not found
*
* @since 3.9.0
*/
public static function getLogContentTypeParams($context)
{
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select('a.*')
->from($db->quoteName('#__action_log_config', 'a'))
->where($db->quoteName('a.type_alias') . ' = ' . $db->quote($context));
$db->setQuery($query);
return $db->loadObject();
}
/**
* Get human readable log message for a User Action Log
*
* @param stdClass $log A User Action log message record
* @param boolean $generateLinks Flag to disable link generation when creating a message
*
* @return string
*
* @since 3.9.0
*/
public static function getHumanReadableLogMessage($log, $generateLinks = true)
{
static $links = array();
$message = Text::_($log->message_language_key);
$messageData = json_decode($log->message, true);
// Special handling for translation extension name
if (isset($messageData['extension_name']))
{
static::loadTranslationFiles($messageData['extension_name']);
$messageData['extension_name'] = Text::_($messageData['extension_name']);
}
// Translating application
if (isset($messageData['app']))
{
$messageData['app'] = Text::_($messageData['app']);
}
// Translating type
if (isset($messageData['type']))
{
$messageData['type'] = Text::_($messageData['type']);
}
$linkMode = Factory::getApplication()->get('force_ssl', 0) >= 1 ? Route::TLS_FORCE : Route::TLS_IGNORE;
foreach ($messageData as $key => $value)
{
// Convert relative url to absolute url so that it is clickable in action logs notification email
if ($generateLinks && StringHelper::strpos($value, 'index.php?') === 0)
{
if (!isset($links[$value]))
{
$links[$value] = Route::link('administrator', $value, false, $linkMode);
}
$value = $links[$value];
}
$message = str_replace('{' . $key . '}', $value, $message);
}
return $message;
}
/**
* Get link to an item of given content type
*
* @param string $component
* @param string $contentType
* @param integer $id
* @param string $urlVar
*
* @return string Link to the content item
*
* @since 3.9.0
*/
public static function getContentTypeLink($component, $contentType, $id, $urlVar = 'id')
{
// Try to find the component helper.
$eName = str_replace('com_', '', $component);
$file = Path::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/helpers/' . $eName . '.php');
if (file_exists($file))
{
$prefix = ucfirst(str_replace('com_', '', $component));
$cName = $prefix . 'Helper';
JLoader::register($cName, $file);
if (class_exists($cName) && is_callable(array($cName, 'getContentTypeLink')))
{
return $cName::getContentTypeLink($contentType, $id);
}
}
if (empty($urlVar))
{
$urlVar = 'id';
}
// Return default link to avoid having to implement getContentTypeLink in most of our components
return 'index.php?option=' . $component . '&task=' . $contentType . '.edit&' . $urlVar . '=' . $id;
}
/**
* Load both enabled and disabled actionlog plugins language file.
*
* It is used to make sure actions log is displayed properly instead of only language items displayed when a plugin is disabled.
*
* @return void
*
* @since 3.9.0
*/
public static function loadActionLogPluginsLanguage()
{
$lang = Factory::getLanguage();
$db = Factory::getDbo();
// Get all (both enabled and disabled) actionlog plugins
$query = $db->getQuery(true)
->select(
$db->quoteName(
array(
'folder',
'element',
'params',
'extension_id'
),
array(
'type',
'name',
'params',
'id'
)
)
)
->from('#__extensions')
->where('type = ' . $db->quote('plugin'))
->where('folder = ' . $db->quote('actionlog'))
->where('state IN (0,1)')
->order('ordering');
$db->setQuery($query);
try
{
$rows = $db->loadObjectList();
}
catch (RuntimeException $e)
{
$rows = array();
}
if (empty($rows))
{
return;
}
foreach ($rows as $row)
{
$name = $row->name;
$type = $row->type;
$extension = 'Plg_' . $type . '_' . $name;
$extension = strtolower($extension);
// If language already loaded, don't load it again.
if ($lang->getPaths($extension))
{
continue;
}
$lang->load($extension, JPATH_ADMINISTRATOR, null, false, true)
|| $lang->load($extension, JPATH_PLUGINS . '/' . $type . '/' . $name, null, false, true);
}
// 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;
}
}
<?php
/**
* @package Joomla.Administrator
* @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.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Date\Date;
use Joomla\CMS\Language\Text;
/**
* Actionlogs component helper for newer PHP versions.
*
* This file should only be included in environments running PHP 5.5 or newer and may potentially cause a parse error on older versions.
*
* @since 3.9.0
* @deprecated Will be inlined back into ActionlogsHelper when PHP 5.5 or newer is the minimum supported PHP version
* @internal
*/
class ActionlogsHelperPhp55
{
/**
* Array of characters starting a formula
*
* @var array
* @since 3.9.7
*/
private static $characters = array('=', '+', '-', '@');
/**
* Method to convert logs objects array to a Generator for use with a CSV export
*
* @param array|Traversable $data The logs data objects to be exported
*
* @return Generator
*
* @since 3.9.0
* @throws InvalidArgumentException
*/
public static function getCsvAsGenerator($data)
{
if (!is_iterable($data))
{
throw new InvalidArgumentException(
sprintf(
'%s() requires an array or object implementing the Traversable interface, a %s was given.',
__METHOD__,
gettype($data) === 'object' ? get_class($data) : gettype($data)
)
);
}
$disabledText = Text::_('COM_ACTIONLOGS_DISABLED');
// Header row
yield array('Id', 'Message', 'Date', 'Extension', 'User', 'Ip');
foreach ($data as $log)
{
$extension = strtok($log->extension, '.');
ActionlogsHelper::loadTranslationFiles($extension);
yield array(
'id' => $log->id,
'message' => self::escapeCsvFormula(strip_tags(ActionlogsHelper::getHumanReadableLogMessage($log, false))),
'date' => (new Date($log->log_date, new DateTimeZone('UTC')))->format('Y-m-d H:i:s T'),
'extension' => self::escapeCsvFormula(Text::_($extension)),
'name' => self::escapeCsvFormula($log->name),
'ip_address' => self::escapeCsvFormula($log->ip_address === 'COM_ACTIONLOGS_DISABLED' ? $disabledText : $log->ip_address)
);
}
}
/**
* 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;
}
}
<?php
/**
* @package Joomla.Administrator
* @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.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
Factory::getLanguage()->load("com_actionlogs", JPATH_ADMINISTRATOR, null, false, true);
$messages = $displayData['messages'];
$showIpColumn = $displayData['showIpColumn'];
?>
<h1>
<?php echo Text::_('COM_ACTIONLOGS_EMAIL_SUBJECT'); ?>
</h1>
<h2>
<?php echo Text::_('COM_ACTIONLOGS_EMAIL_DESC'); ?>
</h2>
<table>
<thead>
<th><?php echo Text::_('COM_ACTIONLOGS_ACTION'); ?></th>
<th><?php echo Text::_('COM_ACTIONLOGS_DATE'); ?></th>
<th><?php echo Text::_('COM_ACTIONLOGS_EXTENSION'); ?></th>
<th><?php echo Text::_('COM_ACTIONLOGS_NAME'); ?></th>
<?php if ($showIpColumn) : ?>
<th><?php echo Text::_('COM_ACTIONLOGS_IP_ADDRESS'); ?></th>
<?php endif; ?>
</thead>
<tbody>
<?php foreach ($messages as $message) : ?>
<tr>
<td><?php echo $message->message; ?></td>
<td><?php echo HTMLHelper::_('date', $message->log_date, 'Y-m-d H:i:s T', 'UTC'); ?></td>
<td><?php echo $message->extension; ?></td>
<td><?php echo $displayData['username']; ?></td>
<?php if ($showIpColumn) : ?>
<td><?php echo Text::_($message->ip_address); ?></td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php
/**
* @package Joomla.Administrator
* @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.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
BaseDatabaseModel::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_actionlogs/models', 'ActionlogsModel');
/**
* Abstract Action Log Plugin
*
* @since 3.9.0
*/
abstract class ActionLogPlugin extends JPlugin
{
/**
* Application object.
*
* @var JApplicationCms
* @since 3.9.0
*/
protected $app;
/**
* Database object.
*
* @var JDatabaseDriver
* @since 3.9.0
*/
protected $db;
/**
* Load plugin language file automatically so that it can be used inside component
*
* @var boolean
* @since 3.9.0
*/
protected $autoloadLanguage = true;
/**
* Proxy for ActionlogsModelUserlog addLog method
*
* This method adds a record to #__action_logs contains (message_language_key, message, date, context, user)
*
* @param array $messages The contents of the messages to be logged
* @param string $messageLanguageKey The language key of the message
* @param string $context The context of the content passed to the plugin
* @param int $userId ID of user perform the action, usually ID of current logged in user
*
* @return void
*
* @since 3.9.0
*/
protected function addLog($messages, $messageLanguageKey, $context, $userId = null)
{
$user = Factory::getUser();
foreach ($messages as $index => $message)
{
if (!array_key_exists('userid', $message))
{
$message['userid'] = $user->id;
}
if (!array_key_exists('username', $message))
{
$message['username'] = $user->username;
}
if (!array_key_exists('accountlink', $message))
{
$message['accountlink'] = 'index.php?option=com_users&task=user.edit&id=' . $user->id;
}
if (array_key_exists('type', $message))
{
$message['type'] = strtoupper($message['type']);
}
if (array_key_exists('app', $message))
{
$message['app'] = strtoupper($message['app']);
}
$messages[$index] = $message;
}
/** @var ActionlogsModelActionlog $model **/
$model = BaseDatabaseModel::getInstance('Actionlog', 'ActionlogsModel');
$model->addLog($messages, strtoupper($messageLanguageKey), $context, $userId);
}
}
<?php
/**
* @package Joomla.Administrator
* @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.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\Utilities\IpHelper;
JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');
/**
* Methods supporting a list of Actionlog records.
*
* @since 3.9.0
*/
class ActionlogsModelActionlog extends JModelLegacy
{
/**
* Function to add logs to the database
* This method adds a record to #__action_logs contains (message_language_key, message, date, context, user)
*
* @param array $messages The contents of the messages to be logged
* @param string $messageLanguageKey The language key of the message
* @param string $context The context of the content passed to the plugin
* @param integer $userId ID of user perform the action, usually ID of current logged in user
*
* @return void
*
* @since 3.9.0
*/
public function addLog($messages, $messageLanguageKey, $context, $userId = null)
{
$user = Factory::getUser($userId);
$db = $this->getDbo();
$date = Factory::getDate();
$params = ComponentHelper::getComponent('com_actionlogs')->getParams();
if ($params->get('ip_logging', 0))
{
$ip = IpHelper::getIp();
if (!filter_var($ip, FILTER_VALIDATE_IP))
{
$ip = 'COM_ACTIONLOGS_IP_INVALID';
}
}
else
{
$ip = 'COM_ACTIONLOGS_DISABLED';
}
$loggedMessages = array();
foreach ($messages as $message)
{
$logMessage = new stdClass;
$logMessage->message_language_key = $messageLanguageKey;
$logMessage->message = json_encode($message);
$logMessage->log_date = (string) $date;
$logMessage->extension = $context;
$logMessage->user_id = $user->id;
$logMessage->ip_address = $ip;
$logMessage->item_id = isset($message['id']) ? (int) $message['id'] : 0;
try
{
$db->insertObject('#__action_logs', $logMessage);
$loggedMessages[] = $logMessage;
}
catch (RuntimeException $e)
{
// Ignore it
}
}
// Send notification email to users who choose to be notified about the action logs
$this->sendNotificationEmails($loggedMessages, $user->name, $context);
}
/**
* Send notification emails about the action log
*
* @param array $messages The logged messages
* @param string $username The username
* @param string $context The Context
*
* @return void
*
* @since 3.9.0
*/
protected function sendNotificationEmails($messages, $username, $context)
{
$db = $this->getDbo();
$query = $db->getQuery(true);
$params = ComponentHelper::getParams('com_actionlogs');
$showIpColumn = (bool) $params->get('ip_logging', 0);
$query
->select($db->quoteName(array('u.email', 'l.extensions')))
->from($db->quoteName('#__users', 'u'))
->join(
'INNER',
$db->quoteName('#__action_logs_users', 'l') . ' ON ( ' . $db->quoteName('l.notify') . ' = 1 AND '
. $db->quoteName('l.user_id') . ' = ' . $db->quoteName('u.id') . ')'
);
$db->setQuery($query);
try
{
$users = $db->loadObjectList();
}
catch (RuntimeException $e)
{
JError::raiseWarning(500, $e->getMessage());
return;
}
$recipients = array();
foreach ($users as $user)
{
$extensions = json_decode($user->extensions, true);
if ($extensions && in_array(strtok($context, '.'), $extensions))
{
$recipients[] = $user->email;
}
}
if (empty($recipients))
{
return;
}
$layout = new FileLayout('components.com_actionlogs.layouts.logstable', JPATH_ADMINISTRATOR);
$extension = strtok($context, '.');
ActionlogsHelper::loadTranslationFiles($extension);
foreach ($messages as $message)
{
$message->extension = Text::_($extension);
$message->message = ActionlogsHelper::getHumanReadableLogMessage($message);
}
$displayData = array(
'messages' => $messages,
'username' => $username,
'showIpColumn' => $showIpColumn,
);
$body = $layout->render($displayData);
$mailer = Factory::getMailer();
$mailer->addRecipient($recipients);
$mailer->setSubject(Text::_('COM_ACTIONLOGS_EMAIL_SUBJECT'));
$mailer->isHTML(true);
$mailer->Encoding = 'base64';
$mailer->setBody($body);
if (!$mailer->Send())
{
JError::raiseWarning(500, Text::_('JERROR_SENDING_EMAIL'));
}
}
}
<?php
/**
* @package Joomla.Administrator
* @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.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Date\Date;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\Utilities\ArrayHelper;
/**
* Methods supporting a list of article records.
*
* @since 3.9.0
*/
class ActionlogsModelActionlogs extends JModelList
{
/**
* Constructor.
*
* @param array $config An optional associative array of configuration settings.
*
* @since 3.9.0
*/
public function __construct($config = array())
{
if (empty($config['filter_fields']))
{
$config['filter_fields'] = array(
'a.id', 'id',
'a.extension', 'extension',
'a.user_id', 'user',
'a.message', 'message',
'a.log_date', 'log_date',
'a.ip_address', 'ip_address',
'dateRange',
);
}
parent::__construct($config);
}
/**
* Method to auto-populate the model state.
*
* @return void
*
* @since 3.9.0
*/
protected function populateState($ordering = 'a.id', $direction = 'desc')
{
$app = Factory::getApplication();
$search = $app->getUserStateFromRequest($this->context . 'filter.search', 'filter_search', '', 'string');
$this->setState('filter.search', $search);
$user = $app->getUserStateFromRequest($this->context . 'filter.user', 'filter_user', '', 'string');
$this->setState('filter.user', $user);
$extension = $app->getUserStateFromRequest($this->context . 'filter.extension', 'filter_extension', '', 'string');
$this->setState('filter.extension', $extension);
$ip_address = $app->getUserStateFromRequest($this->context . 'filter.ip_address', 'filter_ip_address', '', 'string');
$this->setState('filter.ip_address', $ip_address);
$dateRange = $app->getUserStateFromRequest($this->context . 'filter.dateRange', 'filter_dateRange', '', 'string');
$this->setState('filter.dateRange', $dateRange);
parent::populateState($ordering, $direction);
}
/**
* Build an SQL query to load the list data.
*
* @return JDatabaseQuery
*
* @since 3.9.0
*/
protected function getListQuery()
{
$db = $this->getDbo();
$query = $db->getQuery(true)
->select('a.*, u.name')
->from('#__action_logs AS a')
->leftJoin('#__users AS u ON a.user_id = u.id');
// Get ordering
$fullorderCol = $this->state->get('list.fullordering', 'a.id DESC');
// Apply ordering
if (!empty($fullorderCol))
{
$query->order($db->escape($fullorderCol));
}
// Get filter by user
$user = $this->getState('filter.user');
// Apply filter by user
if (!empty($user))
{
$query->where($db->quoteName('a.user_id') . ' = ' . (int) $user);
}
// Get filter by extension
$extension = $this->getState('filter.extension');
// Apply filter by extension
if (!empty($extension))
{
$query->where($db->quoteName('a.extension') . ' LIKE ' . $db->quote($extension . '%'));
}
// Get filter by date range
$dateRange = $this->getState('filter.dateRange');
// Apply filter by date range
if (!empty($dateRange))
{
$date = $this->buildDateRange($dateRange);
// If the chosen range is not more than a year ago
if ($date['dNow'] != false)
{
$query->where(
$db->qn('a.log_date') . ' >= ' . $db->quote($date['dStart']->format('Y-m-d H:i:s')) .
' AND ' . $db->qn('a.log_date') . ' <= ' . $db->quote($date['dNow']->format('Y-m-d H:i:s'))
);
}
}
// Filter the items over the search string if set.
$search = $this->getState('filter.search');
if (!empty($search))
{
if (stripos($search, 'id:') === 0)
{
$query->where($db->quoteName('a.id') . ' = ' . (int) substr($search, 3));
}
elseif (stripos($search, 'item_id:') === 0)
{
$query->where($db->quoteName('a.item_id') . ' = ' . (int) substr($search, 8));
}
else
{
$search = $db->quote('%' . $db->escape($search, true) . '%');
$query->where('(' . $db->quoteName('u.username') . ' LIKE ' . $search . ')');
}
}
return $query;
}
/**
* Construct the date range to filter on.
*
* @param string $range The textual range to construct the filter for.
*
* @return array The date range to filter on.
*
* @since 3.9.0
*/
private function buildDateRange($range)
{
// Get UTC for now.
$dNow = new Date;
$dStart = clone $dNow;
switch ($range)
{
case 'past_week':
$dStart->modify('-7 day');
break;
case 'past_1month':
$dStart->modify('-1 month');
break;
case 'past_3month':
$dStart->modify('-3 month');
break;
case 'past_6month':
$dStart->modify('-6 month');
break;
case 'past_year':
$dStart->modify('-1 year');
break;
case 'today':
// Ranges that need to align with local 'days' need special treatment.
$offset = Factory::getApplication()->get('offset');
// Reset the start time to be the beginning of today, local time.
$dStart = new Date('now', $offset);
$dStart->setTime(0, 0, 0);
// Now change the timezone back to UTC.
$tz = new DateTimeZone('GMT');
$dStart->setTimezone($tz);
break;
}
return array('dNow' => $dNow, 'dStart' => $dStart);
}
/**
* Get all log entries for an item
*
* @param string $extension The extension the item belongs to
* @param integer $itemId The item ID
*
* @return array
*
* @since 3.9.0
*/
public function getLogsForItem($extension, $itemId)
{
$db = $this->getDbo();
$query = $db->getQuery(true)
->select('a.*, u.name')
->from('#__action_logs AS a')
->innerJoin('#__users AS u ON a.user_id = u.id')
->where($db->quoteName('a.extension') . ' = ' . $db->quote($extension))
->where($db->quoteName('a.item_id') . ' = ' . (int) $itemId);
// Get ordering
$fullorderCol = $this->getState('list.fullordering', 'a.id DESC');
// Apply ordering
if (!empty($fullorderCol))
{
$query->order($db->escape($fullorderCol));
}
$db->setQuery($query);
return $db->loadObjectList();
}
/**
* Get logs data into JTable object
*
* @param integer[]|null $pks An optional array of log record IDs to load
*
* @return array All logs in the table
*
* @since 3.9.0
*/
public function getLogsData($pks = null)
{
$db = $this->getDbo();
$query = $this->getLogDataQuery($pks);
$db->setQuery($query);
return $db->loadObjectList();
}
/**
* Get logs data as a database iterator
*
* @param integer[]|null $pks An optional array of log record IDs to load
*
* @return JDatabaseIterator
*
* @since 3.9.0
*/
public function getLogDataAsIterator($pks = null)
{
$db = $this->getDbo();
$query = $this->getLogDataQuery($pks);
$db->setQuery($query);
return $db->getIterator();
}
/**
* Get the query for loading logs data
*
* @param integer[]|null $pks An optional array of log record IDs to load
*
* @return JDatabaseQuery
*
* @since 3.9.0
*/
private function getLogDataQuery($pks = null)
{
$db = $this->getDbo();
$query = $db->getQuery(true)
->select('a.*, u.name')
->from('#__action_logs AS a')
->innerJoin('#__users AS u ON a.user_id = u.id');
if (is_array($pks) && count($pks) > 0)
{
$query->where($db->quoteName('a.id') . ' IN (' . implode(',', ArrayHelper::toInteger($pks)) . ')');
}
return $query;
}
/**
* Delete logs
*
* @param array $pks Primary keys of logs
*
* @return boolean
*
* @since 3.9.0
*/
public function delete(&$pks)
{
$db = $this->getDbo();
$query = $db->getQuery(true)
->delete($db->quoteName('#__action_logs'))
->where($db->quoteName('id') . ' IN (' . implode(',', ArrayHelper::toInteger($pks)) . ')');
$db->setQuery($query);
try
{
$db->execute();
}
catch (RuntimeException $e)
{
$this->setError($e->getMessage());
return false;
}
Factory::getApplication()->triggerEvent('onAfterLogPurge', array());
return true;
}
/**
* Removes all of logs from the table.
*
* @return boolean result of operation
*
* @since 3.9.0
*/
public function purge()
{
try
{
$this->getDbo()->truncateTable('#__action_logs');
}
catch (Exception $e)
{
return false;
}
Factory::getApplication()->triggerEvent('onAfterLogPurge', array());
return true;
}
/**
* Get the filter form
*
* @param array $data data
* @param boolean $loadData load current data
*
* @return \JForm|boolean The \JForm object or false on error
*
* @since 3.9.0
*/
public function getFilterForm($data = array(), $loadData = true)
{
$form = parent::getFilterForm($data, $loadData);
$params = ComponentHelper::getParams('com_actionlogs');
$ipLogging = (bool) $params->get('ip_logging', 0);
// Add ip sort options to sort dropdown
if ($form && $ipLogging)
{
/* @var JFormFieldList $field */
$field = $form->getField('fullordering', 'list');
$field->addOption(Text::_('COM_ACTIONLOGS_IP_ADDRESS_ASC'), array('value' => 'a.ip_address ASC'));
$field->addOption(Text::_('COM_ACTIONLOGS_IP_ADDRESS_DESC'), array('value' => 'a.ip_address DESC'));
}
return $form;
}
}
<?php
/**
* @package Joomla.Administrator
* @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.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
FormHelper::loadFieldClass('list');
JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');
/**
* Field to load a list of all extensions that have logged actions
*
* @since 3.9.0
*/
class JFormFieldExtension extends JFormFieldList
{
/**
* The form field type.
*
* @var string
* @since 3.9.0
*/
protected $type = 'extension';
/**
* Method to get the options to populate list
*
* @return array The field option objects.
*
* @since 3.9.0
*/
public function getOptions()
{
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select('DISTINCT ' . $db->quoteName('extension'))
->from($db->quoteName('#__action_logs'))
->order($db->quoteName('extension'));
$db->setQuery($query);
$context = $db->loadColumn();
$options = array();
if (count($context) > 0)
{
foreach ($context as $item)
{
$extensions[] = strtok($item, '.');
}
$extensions = array_unique($extensions);
foreach ($extensions as $extension)
{
ActionlogsHelper::loadTranslationFiles($extension);
$options[] = HTMLHelper::_('select.option', $extension, Text::_($extension));
}
}
return array_merge(parent::getOptions(), $options);
}
}
<?php
/**
* @package Joomla.Administrator
* @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.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\FormHelper;
FormHelper::loadFieldClass('list');
/**
* Field to load a list of all users that have logged actions
*
* @since 3.9.0
*/
class JFormFieldLogCreator extends JFormFieldList
{
/**
* The form field type.
*
* @var string
* @since 3.9.0
*/
protected $type = 'LogCreator';
/**
* Cached array of the category items.
*
* @var array
* @since 3.9.0
*/
protected static $options = array();
/**
* Method to get the options to populate list
*
* @return array The field option objects.
*
* @since 3.9.0
*/
protected function getOptions()
{
// Accepted modifiers
$hash = md5($this->element);
if (!isset(static::$options[$hash]))
{
static::$options[$hash] = parent::getOptions();
$options = array();
$db = Factory::getDbo();
// Construct the query
$query = $db->getQuery(true)
->select($db->quoteName('u.id', 'value'))
->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.username'))
->order($db->quoteName('u.username'));
// Setup the query
$db->setQuery($query);
// Return the result
if ($options = $db->loadObjectList())
{
static::$options[$hash] = array_merge(static::$options[$hash], $options);
}
}
return static::$options[$hash];
}
}
<?php
/**
* @package Joomla.Administrator
* @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.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\FormHelper;
FormHelper::loadFieldClass('predefinedlist');
/**
* Field to show a list of range dates to sort with
*
* @since 3.9.0
*/
class JFormFieldLogsDateRange extends JFormFieldPredefinedList
{
/**
* The form field type.
*
* @var string
* @since 3.9.0
*/
protected $type = 'logsdaterange';
/**
* Available options
*
* @var array
* @since 3.9.0
*/
protected $predefinedOptions = array(
'today' => 'COM_ACTIONLOGS_OPTION_RANGE_TODAY',
'past_week' => 'COM_ACTIONLOGS_OPTION_RANGE_PAST_WEEK',
'past_1month' => 'COM_ACTIONLOGS_OPTION_RANGE_PAST_1MONTH',
'past_3month' => 'COM_ACTIONLOGS_OPTION_RANGE_PAST_3MONTH',
'past_6month' => 'COM_ACTIONLOGS_OPTION_RANGE_PAST_6MONTH',
'past_year' => 'COM_ACTIONLOGS_OPTION_RANGE_PAST_YEAR',
);
/**
* Method to instantiate the form field object.
*
* @param JForm $form The form to attach to the form field object.
*
* @since 3.9.0
*/
public function __construct($form = null)
{
parent::__construct($form);
// Load the required language
$lang = Factory::getLanguage();
$lang->load('com_actionlogs', JPATH_ADMINISTRATOR);
}
}
<?php
/**
* @package Joomla.Administrator
* @subpackage System.actionlogs
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
FormHelper::loadFieldClass('checkboxes');
JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');
/**
* Field to load a list of all users that have logged actions
*
* @since 3.9.0
*/
class JFormFieldLogType extends JFormFieldCheckboxes
{
/**
* The form field type.
*
* @var string
* @since 3.9.0
*/
protected $type = 'LogType';
/**
* Method to get the field options.
*
* @return array The field option objects.
*
* @since 3.9.0
*/
public function getOptions()
{
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('extension'))
->from($db->quoteName('#__action_logs_extensions'));
$extensions = $db->setQuery($query)->loadColumn();
$options = array();
$tmp = array('checked' => true);
foreach ($extensions as $extension)
{
ActionlogsHelper::loadTranslationFiles($extension);
$option = HTMLHelper::_('select.option', $extension, Text::_($extension));
$options[ApplicationHelper::stringURLSafe(Text::_($extension)) . '_' . $extension] = (object) array_merge($tmp, (array) $option);
}
ksort($options);
return array_merge(parent::getOptions(), array_values($options));
}
}
<?php
/**
* @package Joomla.Administrator
* @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.txt
*/
defined('JPATH_BASE') or die;
/**
* Information field.
*
* @since 3.9.2
*/
class JFormFieldPluginInfo extends JFormField
{
/**
* The form field type.
*
* @var string
* @since 3.9.2
*/
protected $type = 'PluginInfo';
/**
* Method to get the field input markup.
*
* @return string The field input markup.
*
* @since 3.9.2
*/
protected function getInput()
{
$db = JFactory::getDbo();
$result = null;
$query = $db->getQuery(true)
->select($db->quoteName('extension_id'))
->from($db->quoteName('#__extensions'))
->where($db->quoteName('folder') . ' = ' . $db->quote('actionlog'))
->where($db->quoteName('element') . ' = ' . $db->quote('joomla'));
$db->setQuery($query);
try
{
$result = (int) $db->loadResult();
}
catch (RuntimeException $e)
{
JError::raiseWarning(500, $e->getMessage());
}
$link = JHtml::_(
'link',
JRoute::_('index.php?option=com_plugins&task=plugin.edit&extension_id=' . $result),
JText::_('PLG_SYSTEM_ACTIONLOGS_JOOMLA_ACTIONLOG_DISABLED'),
array('class' => 'alert-link')
);
return '<div class="alert alert-info">'
. JText::sprintf('PLG_SYSTEM_ACTIONLOGS_JOOMLA_ACTIONLOG_DISABLED_REDIRECT', $link)
. '</div>';
}
}
<?xml version="1.0" encoding="UTF-8"?>
<form>
<fields name="filter">
<field
name="search"
type="text"
description="COM_ACTIONLOGS_FILTER_SEARCH_DESC"
hint="JSEARCH_FILTER"
/>
<field
name="extension"
type="extension"
label="COM_ACTIONLOGS_EXTENSION"
description="COM_ACTIONLOGS_EXTENSION_FILTER_DESC"
onchange="this.form.submit()"
>
<option value="">COM_ACTIONLOGS_SELECT_EXTENSION</option>
</field>
<field
name="dateRange"
type="logsdaterange"
label="COM_ACTIONLOGS_OPTION_FILTER_DATE"
description="COM_ACTIONLOGS_OPTION_FILTER_DATE"
onchange="this.form.submit();"
>
<option value="">COM_ACTIONLOGS_OPTION_FILTER_DATE</option>
</field>
<field
name="user"
type="logcreator"
onchange="this.form.submit();"
>
<option value="">COM_ACTIONLOGS_SELECT_USER</option>
</field>
</fields>
<fields name="list">
<field
name="fullordering"
type="list"
label="COM_ACTIONLOGS_LIST_FULL_ORDERING"
description="COM_ACTIONLOGS_LIST_FULL_ORDERING_DESC"
onchange="this.form.submit();"
default="a.id DESC"
validate="options"
>
<option value="">JGLOBAL_SORT_BY</option>
<option value="a.message ASC">COM_ACTIONLOGS_ACTION_ASC</option>
<option value="a.message DESC">COM_ACTIONLOGS_ACTION_DESC</option>
<option value="a.extension ASC">COM_ACTIONLOGS_EXTENSION_ASC</option>
<option value="a.extension DESC">COM_ACTIONLOGS_EXTENSION_DESC</option>
<option value="a.log_date ASC">JDATE_ASC</option>
<option value="a.log_date DESC">JDATE_DESC</option>
<option value="a.user_id ASC">COM_ACTIONLOGS_NAME_ASC</option>
<option value="a.user_id DESC">COM_ACTIONLOGS_NAME_DESC</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
</field>
</fields>
<fields name="list">
<field
name="limit"
type="limitbox"
label="COM_ACTIONLOGS_LIST_LIMIT"
description="COM_ACTIONLOGS_LIST_LIMIT_DESC"
class="input-mini"
onchange="this.form.submit();"
default="25"
/>
</fields>
</form>
<?php
/**
* @package Joomla.Administrator
* @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.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
/** @var ActionlogsViewActionlogs $this */
JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');
HTMLHelper::_('bootstrap.tooltip');
HTMLHelper::_('behavior.multiselect');
HTMLHelper::_('formbehavior.chosen', 'select');
$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);
};
');
?>
<form action="<?php echo Route::_('index.php?option=com_actionlogs&view=actionlogs'); ?>" method="post" name="adminForm" id="adminForm">
<div id="j-main-container">
<?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-no-items">
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
<table class="table table-striped table-hover" id="logsList">
<thead>
<th width="1%" class="center">
<?php echo HTMLHelper::_('grid.checkall'); ?>
</th>
<th>
<?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_ACTION', 'a.message', $listDirn, $listOrder); ?>
</th>
<th width="15%" class="nowrap">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_EXTENSION', 'a.extension', $listDirn, $listOrder); ?>
</th>
<th width="15%" class="nowrap">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_DATE', 'a.log_date', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_NAME', 'a.user_id', $listDirn, $listOrder); ?>
</th>
<?php if ($this->showIpColumn) : ?>
<th width="10%" class="nowrap">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_IP_ADDRESS', 'a.ip_address', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th width="1%" class="nowrap hidden-phone">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</thead>
<tfoot>
<tr>
<td colspan="7">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>
<?php foreach ($this->items as $i => $item) :
$extension = strtok($item->extension, '.');
ActionlogsHelper::loadTranslationFiles($extension); ?>
<tr class="row<?php echo $i % 2; ?>">
<td class="center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
</td>
<td>
<?php echo ActionlogsHelper::getHumanReadableLogMessage($item); ?>
</td>
<td>
<?php echo $this->escape(Text::_($extension)); ?>
</td>
<td>
<span class="hasTooltip" title="<?php echo HTMLHelper::_('date', $item->log_date, Text::_('DATE_FORMAT_LC6')); ?>">
<?php echo HTMLHelper::_('date.relative', $item->log_date); ?>
</span>
</td>
<td>
<?php echo $item->name; ?>
</td>
<?php if ($this->showIpColumn) : ?>
<td>
<?php echo Text::_($this->escape($item->ip_address)); ?>
</td>
<?php endif;?>
<td class="hidden-phone">
<?php echo (int) $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif;?>
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<?php echo HTMLHelper::_('form.token'); ?>
</div>
</form>
<form action="<?php echo Route::_('index.php?option=com_actionlogs&view=actionlogs'); ?>" method="post" name="exportForm" id="exportForm">
<input type="hidden" name="task" value="" />
<input type="hidden" name="cids" value="" />
<?php echo HTMLHelper::_('form.token'); ?>
</form>
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_ACTIONLOGS_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_ACTIONLOGS_VIEW_DEFAULT_DESC]]>
</message>
</layout>
</metadata>
<?php
/**
* @package Joomla.Administrator
* @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.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');
/**
* View class for a list of logs.
*
* @since 3.9.0
*/
class ActionlogsViewActionlogs extends JViewLegacy
{
/**
* An array of items.
*
* @var array
* @since 3.9.0
*/
protected $items;
/**
* The model state
*
* @var array
* @since 3.9.0
*/
protected $state;
/**
* The pagination object
*
* @var JPagination
* @since 3.9.0
*/
protected $pagination;
/**
* The active search filters
*
* @var array
* @since 3.9.0
*/
public $activeFilters;
/**
* Method to display the view.
*
* @param string $tpl A template file to load. [optional]
*
* @return mixed A string if successful, otherwise an Error object.
*
* @since 3.9.0
*/
public function display($tpl = null)
{
$params = ComponentHelper::getParams('com_actionlogs');
$this->items = $this->get('Items');
$this->state = $this->get('State');
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
$this->pagination = $this->get('Pagination');
$this->showIpColumn = (bool) $params->get('ip_logging', 0);
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->addToolBar();
// Load all actionlog plugins language files
ActionlogsHelper::loadActionLogPluginsLanguage();
return parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 3.9.0
*/
protected function addToolbar()
{
ToolbarHelper::title(Text::_('COM_ACTIONLOGS_MANAGER_USERLOGS'), 'list-2');
ToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'actionlogs.delete');
$bar = Toolbar::getInstance('toolbar');
$bar->appendButton('Confirm', 'COM_ACTIONLOGS_PURGE_CONFIRM', 'delete', 'COM_ACTIONLOGS_TOOLBAR_PURGE', 'actionlogs.purge', false);
ToolbarHelper::preferences('com_actionlogs');
ToolbarHelper::help('JHELP_COMPONENTS_ACTIONLOGS');
ToolBarHelper::custom('actionlogs.exportSelectedLogs', 'download', '', 'COM_ACTIONLOGS_EXPORT_CSV', true);
ToolBarHelper::custom('actionlogs.exportLogs', 'download', '', 'COM_ACTIONLOGS_EXPORT_ALL_CSV', false);
}
}
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::_('behavior.tabstate');
// No access check.
$controller = JControllerLegacy::getInstance('Admin');
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->redirect();
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.1" method="upgrade">
<name>com_admin</name>
<author>Joomla! Project</author>
<creationDate>April 2006</creationDate>
<copyright>(C) 2005 - 2019 Open Source Matters. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>3.0.0</version>
<description>COM_ADMIN_XML_DESCRIPTION</description>
<media />
<administration>
<files folder="admin">
<filename>admin.php</filename>
<filename>controller.php</filename>
<folder>helpers</folder>
<folder>models</folder>
<folder>views</folder>
</files>
<languages folder="admin">
<language tag="en-GB">language/en-GB.com_admin.ini</language>
<language tag="en-GB">language/en-GB.com_admin.sys.ini</language>
</languages>
</administration>
</extension>
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Admin Controller
*
* @since 1.6
*/
class AdminController extends JControllerLegacy
{
}
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* User profile controller class.
*
* @since 1.6
*/
class AdminControllerProfile extends JControllerForm
{
/**
* Method to check if you can edit a record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
return isset($data['id']) && $data['id'] == JFactory::getUser()->id;
}
/**
* Overrides parent save method to check the submitted passwords match.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 3.2
*/
public function save($key = null, $urlVar = null)
{
$this->setRedirect(JRoute::_('index.php?option=com_admin&view=profile&layout=edit&id=' . JFactory::getUser()->id, false));
$return = parent::save();
if ($this->getTask() != 'apply')
{
// Redirect to the main page.
$this->setRedirect(JRoute::_('index.php', false));
}
return $return;
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 1.6
*/
public function cancel($key = null)
{
$return = parent::cancel($key);
// Redirect to the main page.
$this->setRedirect(JRoute::_('index.php', false));
return $return;
}
}
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Utility class working with directory
*
* @since 1.6
*/
abstract class JHtmlDirectory
{
/**
* Method to generate a (un)writable message for directory
*
* @param boolean $writable is the directory writable?
*
* @return string html code
*/
public static function writable($writable)
{
if ($writable)
{
return '<span class="badge badge-success">' . JText::_('COM_ADMIN_WRITABLE') . '</span>';
}
return '<span class="badge badge-important">' . JText::_('COM_ADMIN_UNWRITABLE') . '</span>';
}
/**
* Method to generate a message for a directory
*
* @param string $dir the directory
* @param boolean $message the message
* @param boolean $visible is the $dir visible?
*
* @return string html code
*/
public static function message($dir, $message, $visible = true)
{
$output = $visible ? $dir : '';
if (empty($message))
{
return $output;
}
return $output . ' <strong>' . JText::_($message) . '</strong>';
}
}
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Utility class working with phpsetting
*
* @since 1.6
*/
abstract class JHtmlPhpSetting
{
/**
* Method to generate a boolean message for a value
*
* @param boolean $val is the value set?
*
* @return string html code
*/
public static function boolean($val)
{
return JText::_($val ? 'JON' : 'JOFF');
}
/**
* Method to generate a boolean message for a value
*
* @param boolean $val is the value set?
*
* @return string html code
*/
public static function set($val)
{
return JText::_($val ? 'JYES' : 'JNO');
}
/**
* Method to generate a string message for a value
*
* @param string $val a php ini value
*
* @return string html code
*/
public static function string($val)
{
return !empty($val) ? $val : JText::_('JNONE');
}
/**
* Method to generate an integer from a value
*
* @param string $val a php ini value
*
* @return string html code
*
* @deprecated 4.0 Use intval() or casting instead.
*/
public static function integer($val)
{
try
{
JLog::add(sprintf('%s() is deprecated. Use intval() or casting instead.', __METHOD__), JLog::WARNING, 'deprecated');
}
catch (RuntimeException $exception)
{
// Informational log only
}
return (int) $val;
}
}
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Utility class working with system
*
* @since 1.6
*/
abstract class JHtmlSystem
{
/**
* Method to generate a string message for a value
*
* @param string $val a php ini value
*
* @return string html code
*/
public static function server($val)
{
return !empty($val) ? $val : JText::_('COM_ADMIN_NA');
}
}
<?xml version="1.0" encoding="utf-8"?>
<form>
<fieldset name="user_details">
<field
name="name"
type="text"
label="COM_ADMIN_USER_HEADING_NAME"
description="COM_ADMIN_USER_FIELD_NAME_DESC"
required="true"
size="30"
/>
<field
name="username"
type="text"
label="COM_ADMIN_USER_FIELD_USERNAME_LABEL"
description="COM_ADMIN_USER_FIELD_USERNAME_DESC"
required="true"
size="30"
/>
<field
name="password2"
type="password"
label="JGLOBAL_PASSWORD"
description="COM_ADMIN_USER_FIELD_PASSWORD_DESC"
autocomplete="off"
class="validate-password"
field="password"
filter="raw"
message="COM_ADMIN_USER_FIELD_PASSWORD1_MESSAGE"
size="30"
validate="equals"
/>
<field
name="password"
type="password"
label="COM_ADMIN_USER_FIELD_PASSWORD2_LABEL"
description="COM_ADMIN_USER_FIELD_PASSWORD2_DESC"
autocomplete="off"
class="validate-password"
filter="raw"
size="30"
validate="password"
/>
<field
name="email"
type="email"
label="JGLOBAL_EMAIL"
description="COM_ADMIN_USER_FIELD_EMAIL_DESC"
class="validate-email"
required="true"
size="30"
validate="email"
validDomains="com_users.domains"
/>
<field
name="registerDate"
type="calendar"
label="COM_ADMIN_USER_FIELD_REGISTERDATE_LABEL"
description="COM_ADMIN_USER_FIELD_REGISTERDATE_DESC"
class="readonly"
readonly="true"
translateformat="true"
showtime="true"
size="22"
filter="user_utc"
/>
<field
name="lastvisitDate"
type="calendar"
label="COM_ADMIN_USER_FIELD_LASTVISIT_LABEL"
description="COM_ADMIN_USER_FIELD_LASTVISIT_DESC"
class="readonly"
readonly="true"
translateformat="true"
showtime="true"
size="22"
filter="user_utc"
/>
<field
name="id"
type="number"
label="JGLOBAL_FIELD_ID_LABEL"
description="JGLOBAL_FIELD_ID_DESC"
class="readonly"
default="0"
readonly="true"
filter="unset"
/>
</fieldset>
<fields name="params">
<!-- Basic user account settings. -->
<fieldset name="settings" label="COM_ADMIN_USER_SETTINGS_FIELDSET_LABEL">
<field
name="admin_style"
type="templatestyle"
label="COM_ADMIN_USER_FIELD_BACKEND_TEMPLATE_LABEL"
description="COM_ADMIN_USER_FIELD_BACKEND_TEMPLATE_DESC"
client="administrator"
filter="uint"
>
<option value="">JOPTION_USE_DEFAULT</option>
</field>
<field
name="admin_language"
type="language"
label="COM_ADMIN_USER_FIELD_BACKEND_LANGUAGE_LABEL"
description="COM_ADMIN_USER_FIELD_BACKEND_LANGUAGE_DESC"
client="administrator"
>
<option value="">JOPTION_USE_DEFAULT</option>
</field>
<field
name="language"
type="language"
label="COM_ADMIN_USER_FIELD_FRONTEND_LANGUAGE_LABEL"
description="COM_ADMIN_USER_FIELD_FRONTEND_LANGUAGE_DESC"
client="site"
>
<option value="">JOPTION_USE_DEFAULT</option>
</field>
<field
name="editor"
type="plugins"
label="COM_ADMIN_USER_FIELD_EDITOR_LABEL"
description="COM_ADMIN_USER_FIELD_EDITOR_DESC"
folder="editors"
useaccess="true"
>
<option value="">JOPTION_USE_DEFAULT</option>
</field>
<field
name="timezone"
type="timezone"
label="COM_ADMIN_USER_FIELD_TIMEZONE_LABEL"
description="COM_ADMIN_USER_FIELD_TIMEZONE_DESC"
>
<option value="">JOPTION_USE_DEFAULT</option>
</field>
</fieldset>
</fields>
</form>
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\String\StringHelper;
/**
* Admin Component Help Model
*
* @since 1.6
*/
class AdminModelHelp extends JModelLegacy
{
/**
* The search string
*
* @var string
* @since 1.6
*/
protected $help_search = null;
/**
* The page to be viewed
*
* @var string
* @since 1.6
*/
protected $page = null;
/**
* The ISO language tag
*
* @var string
* @since 1.6
*/
protected $lang_tag = null;
/**
* Table of contents
*
* @var array
* @since 1.6
*/
protected $toc = null;
/**
* URL for the latest version check
*
* @var string
* @since 1.6
*/
protected $latest_version_check = null;
/**
* Method to get the help search string
*
* @return string Help search string
*
* @since 1.6
*/
public function &getHelpSearch()
{
if (is_null($this->help_search))
{
$this->help_search = JFactory::getApplication()->input->getString('helpsearch');
}
return $this->help_search;
}
/**
* Method to get the page
*
* @return string The page
*
* @since 1.6
*/
public function &getPage()
{
if (is_null($this->page))
{
$this->page = JHelp::createUrl(JFactory::getApplication()->input->get('page', 'JHELP_START_HERE'));
}
return $this->page;
}
/**
* Method to get the lang tag
*
* @return string lang iso tag
*
* @since 1.6
*/
public function getLangTag()
{
if (is_null($this->lang_tag))
{
$this->lang_tag = JFactory::getLanguage()->getTag();
if (!is_dir(JPATH_BASE . '/help/' . $this->lang_tag))
{
// Use English as fallback
$this->lang_tag = 'en-GB';
}
}
return $this->lang_tag;
}
/**
* Method to get the table of contents
*
* @return array Table of contents
*/
public function &getToc()
{
if (!is_null($this->toc))
{
return $this->toc;
}
// Get vars
$lang_tag = $this->getLangTag();
$help_search = $this->getHelpSearch();
// New style - Check for a TOC JSON file
if (file_exists(JPATH_BASE . '/help/' . $lang_tag . '/toc.json'))
{
$data = json_decode(file_get_contents(JPATH_BASE . '/help/' . $lang_tag . '/toc.json'));
// Loop through the data array
foreach ($data as $key => $value)
{
$this->toc[$key] = JText::_('COM_ADMIN_HELP_' . $value);
}
// Sort the Table of Contents
asort($this->toc);
return $this->toc;
}
// Get Help files
jimport('joomla.filesystem.folder');
$files = JFolder::files(JPATH_BASE . '/help/' . $lang_tag, '\.xml$|\.html$');
$this->toc = array();
foreach ($files as $file)
{
$buffer = file_get_contents(JPATH_BASE . '/help/' . $lang_tag . '/' . $file);
if (!preg_match('#<title>(.*?)</title>#', $buffer, $m))
{
continue;
}
$title = trim($m[1]);
if (!$title)
{
continue;
}
// Translate the page title
$title = JText::_($title);
// Strip the extension
$file = preg_replace('#\.xml$|\.html$#', '', $file);
if ($help_search && StringHelper::strpos(StringHelper::strtolower(strip_tags($buffer)), StringHelper::strtolower($help_search)) === false)
{
continue;
}
// Add an item in the Table of Contents
$this->toc[$file] = $title;
}
// Sort the Table of Contents
asort($this->toc);
return $this->toc;
}
/**
* Method to get the latest version check
*
* @return string Latest Version Check URL
*/
public function &getLatestVersionCheck()
{
if (!$this->latest_version_check)
{
$override = 'https://help.joomla.org/proxy/index.php?keyref=Help{major}{minor}:'
. 'Joomla_Version_{major}_{minor}_{maintenance}/{langcode}&amp;lang={langcode}';
$this->latest_version_check = JHelp::createUrl('JVERSION', false, $override);
}
return $this->latest_version_check;
}
}
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JLoader::register('UsersModelUser', JPATH_ADMINISTRATOR . '/components/com_users/models/user.php');
/**
* User model.
*
* @since 1.6
*/
class AdminModelProfile extends UsersModelUser
{
/**
* Method to get the record form.
*
* @param array $data An optional array of data for the form to interogate.
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
*
* @return JForm A JForm object on success, false on failure
*
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{
// Get the form.
$form = $this->loadForm('com_admin.profile', 'profile', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
{
return false;
}
// Check for username compliance and parameter set
$isUsernameCompliant = true;
if ($this->loadFormData()->username)
{
$username = $this->loadFormData()->username;
$isUsernameCompliant = !(preg_match('#[<>"\'%;()&\\\\]|\\.\\./#', $username) || strlen(utf8_decode($username)) < 2
|| trim($username) != $username);
}
$this->setState('user.username.compliant', $isUsernameCompliant);
if (!JComponentHelper::getParams('com_users')->get('change_login_name') && $isUsernameCompliant)
{
$form->setFieldAttribute('username', 'required', 'false');
$form->setFieldAttribute('username', 'readonly', 'true');
$form->setFieldAttribute('username', 'description', 'COM_ADMIN_USER_FIELD_NOCHANGE_USERNAME_DESC');
}
// When multilanguage is set, a user's default site language should also be a Content Language
if (JLanguageMultilang::isEnabled())
{
$form->setFieldAttribute('language', 'type', 'frontend_language', 'params');
}
// If the user needs to change their password, mark the password fields as required
if (JFactory::getUser()->requireReset)
{
$form->setFieldAttribute('password', 'required', 'true');
$form->setFieldAttribute('password2', 'required', 'true');
}
return $form;
}
/**
* Method to get the data that should be injected in the form.
*
* @return mixed The data for the form.
*
* @since 1.6
*/
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = JFactory::getApplication()->getUserState('com_users.edit.user.data', array());
if (empty($data))
{
$data = $this->getItem();
}
// Load the users plugins.
JPluginHelper::importPlugin('user');
$this->preprocessData('com_admin.profile', $data);
return $data;
}
/**
* Method to get a single record.
*
* @param integer $pk The id of the primary key.
*
* @return mixed Object on success, false on failure.
*
* @since 1.6
*/
public function getItem($pk = null)
{
return parent::getItem(JFactory::getUser()->id);
}
/**
* Method to save the form data.
*
* @param array $data The form data.
*
* @return boolean True on success.
*
* @since 1.6
*/
public function save($data)
{
$user = JFactory::getUser();
unset($data['id']);
unset($data['groups']);
unset($data['sendEmail']);
unset($data['block']);
$isUsernameCompliant = $this->getState('user.username.compliant');
if (!JComponentHelper::getParams('com_users')->get('change_login_name') && $isUsernameCompliant)
{
unset($data['username']);
}
// Bind the data.
if (!$user->bind($data))
{
$this->setError($user->getError());
return false;
}
$user->groups = null;
// Store the data.
if (!$user->save())
{
$this->setError($user->getError());
return false;
}
$this->setState('user.id', $user->id);
return true;
}
}
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* This file contains post-installation message handling for notifying users of a change
* in the default .htaccess and web.config files.
*/
defined('_JEXEC') or die;
/**
* Notifies users of the add the nosniff headers by applying the changes from the default .htaccess or web.config file
*
* This check returns true regardless of condition.
*
* @return boolean
*
* @since 3.4
*/
function admin_postinstall_addnosniff_condition()
{
return true;
}
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* This file contains post-installation message handling for eAccelerator compatibility.
*/
defined('_JEXEC') or die;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;
/**
* Checks if the eAccelerator caching method is enabled.
*
* This check should be done through the 3.x series as the issue impacts migrated sites which will
* most often come from the previous LTS release (2.5). Remove for version 4 or when eAccelerator support is added.
*
* This check returns true when the eAccelerator caching method is user, meaning that the message concerning it should be displayed.
*
* @return integer
*
* @since 3.2
*/
function admin_postinstall_eaccelerator_condition()
{
$app = JFactory::getApplication();
$cacheHandler = $app->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);
jimport('joomla.filesystem.path');
jimport('joomla.filesystem.file');
// Set the configuration file path.
$file = JPATH_CONFIGURATION . '/configuration.php';
// Get the new FTP credentials.
$ftp = JClientHelper::getCredentials('ftp', true);
// Attempt to make the file writeable if using FTP.
if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0644'))
{
JError::raiseNotice(500, JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTWRITABLE'));
}
// Attempt to write the configuration file as a PHP class named JConfig.
$configuration = $config->toString('PHP', array('class' => 'JConfig', 'closingtag' => false));
if (!JFile::write($file, $configuration))
{
JFactory::getApplication()->enqueueMessage(JText::_('COM_CONFIG_ERROR_WRITE_FAILED'), 'error');
return;
}
// Attempt to make the file unwriteable if using FTP.
if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0444'))
{
JError::raiseNotice(500, JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTUNWRITABLE'));
}
}
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* This file contains post-installation message handling for notifying users of a change
* in the default .htaccess and web.config files.
*/
defined('_JEXEC') or die;
/**
* Notifies users of a change in the default .htaccess or web.config file
*
* This check returns true regardless of condition.
*
* @return boolean
*
* @since 3.4
*/
function admin_postinstall_htaccess_condition()
{
return true;
}
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* This file contains post-installation message handling for Joomla 4.0 pre checks
*/
defined('_JEXEC') or die;
/**
* Checks if the installation meets the current requirements for Joomla 4
*
* @return boolean True if any check fails.
*
* @since 3.7
*
* @link https://developer.joomla.org/news/658-joomla4-manifesto.html
* @link https://developer.joomla.org/news/704-looking-forward-with-joomla-4.html
* @link https://developer.joomla.org/news/788-joomla-4-on-the-move.html
*/
function admin_postinstall_joomla40checks_condition()
{
$db = JFactory::getDbo();
$serverType = $db->getServerType();
$serverVersion = $db->getVersion();
if ($serverType == 'mssql')
{
// MS SQL support will be dropped
return true;
}
if ($serverType == 'postgresql' && version_compare($serverVersion, '11.0', 'lt'))
{
// PostgreSQL minimum version is 11.0
return true;
}
// Check whether we have a MariaDB version string and extract the proper version from it
if ($serverType == 'mysql' && stripos($serverVersion, 'mariadb') !== false)
{
$serverVersion = preg_replace('/^5\.5\.5-/', '', $serverVersion);
// MariaDB minimum version is 10.1
if (version_compare($serverVersion, '10.1', 'lt'))
{
return true;
}
}
if ($serverType == 'mysql' && version_compare($serverVersion, '5.6', 'lt'))
{
// MySQL minimum version is 5.6.0
return true;
}
if ($db->name === 'mysql')
{
// Using deprecated MySQL driver
return true;
}
if ($db->name === 'postgresql')
{
// Using deprecated PostgreSQL driver
return true;
}
// PHP minimum version is 7.2.5
return version_compare(PHP_VERSION, '7.2.5', 'lt');
}
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @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
*/
defined('_JEXEC') or die;
/**
* 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 = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('access'))
->from($db->quoteName('#__languages'))
->where($db->quoteName('access') . ' = ' . $db->quote('0'));
$db->setQuery($query);
$db->execute();
$numRows = $db->getNumRows();
if (isset($numRows) && $numRows != 0)
{
// We have rows here so we have at minumum one row with access set to 0
return true;
}
// All good the query return nothing.
return false;
}
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* This file contains post-installation message handling for the checking minimum PHP version support
*/
defined('_JEXEC') or die;
/**
* Alerts the user we are collecting anonymous data as of Joomla 3.5.0.
*
* @return boolean
*
* @since 3.5
*/
function admin_postinstall_statscollection_condition()
{
return true;
}
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* This file contains post-installation message handling for notifying users of a change
* in various default settings.
*/
defined('_JEXEC') or die;
/**
* Notifies users of a change in various default settings
*
* This check returns true regardless of condition.
*
* @return boolean
*
* @since 3.8.8
*/
function admin_postinstall_updatedefaultsettings_condition()
{
return true;
}
This diff could not be displayed because it is too large.
--
-- Step 1 of the UTF-8 Multibyte (utf8mb4) conversion for MySQL
--
-- Drop indexes which will be added again in step 2, utf8mb4-conversion-02.sql.
--
-- Do not rename this file or any other of the utf8mb4-conversion-*.sql
-- files unless you want to change PHP code, too.
--
-- This file here will be processed ignoring any exceptions caused by indexes
-- to be dropped do not exist.
--
-- The file for step 2 will the be processed with reporting exceptions.
--
ALTER TABLE `#__banners` DROP KEY `idx_metakey_prefix`;
ALTER TABLE `#__banner_clients` DROP KEY `idx_metakey_prefix`;
ALTER TABLE `#__categories` DROP KEY `idx_path`;
ALTER TABLE `#__categories` DROP KEY `idx_alias`;
ALTER TABLE `#__content` DROP KEY `idx_alias`;
ALTER TABLE `#__content_types` DROP KEY `idx_alias`;
ALTER TABLE `#__fields` DROP KEY `idx_context`;
ALTER TABLE `#__fields_groups` DROP KEY `idx_context`;
ALTER TABLE `#__fields_values` DROP KEY `idx_item_id`;
ALTER TABLE `#__finder_links` DROP KEY `idx_title`;
ALTER TABLE `#__menu` DROP KEY `idx_alias`;
ALTER TABLE `#__menu` DROP KEY `idx_client_id_parent_id_alias_language`;
ALTER TABLE `#__menu` DROP KEY `idx_path`;
ALTER TABLE `#__redirect_links` DROP KEY `idx_old_url`;
ALTER TABLE `#__tags` DROP KEY `idx_path`;
ALTER TABLE `#__tags` DROP KEY `idx_alias`;
ALTER TABLE `#__ucm_content` DROP KEY `idx_alias`;
ALTER TABLE `#__ucm_content` DROP KEY `idx_title`;
ALTER TABLE `#__ucm_content` DROP KEY `idx_content_type`;
ALTER TABLE `#__users` DROP KEY `idx_name`;
INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(437, 'plg_quickicon_joomlaupdate', 'plugin', 'joomlaupdate', 'quickicon', 0, 1, 1, 1, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(438, 'plg_quickicon_extensionupdate', 'plugin', 'extensionupdate', 'quickicon', 0, 1, 1, 1, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);
ALTER TABLE `#__update_sites` ADD COLUMN `last_check_timestamp` bigint(20) DEFAULT '0' AFTER `enabled`;
REPLACE INTO `#__update_sites` VALUES
(1, 'Joomla Core', 'collection', 'https://update.joomla.org/core/list.xml', 1, 0),
(2, 'Joomla Extension Directory', 'collection', 'https://update.joomla.org/jed/list.xml', 1, 0);
CREATE TABLE IF NOT EXISTS `#__overrider` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
`constant` varchar(255) NOT NULL,
`string` text NOT NULL,
`file` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8;
\ No newline at end of file
CREATE TABLE IF NOT EXISTS `#__user_notes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL DEFAULT '0',
`catid` int(10) unsigned NOT NULL DEFAULT '0',
`subject` varchar(100) NOT NULL DEFAULT '',
`body` text NOT NULL,
`state` tinyint(3) NOT NULL DEFAULT '0',
`checked_out` int(10) unsigned NOT NULL DEFAULT '0',
`checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`created_user_id` int(10) unsigned NOT NULL DEFAULT '0',
`created_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified_user_id` int(10) unsigned NOT NULL,
`modified_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`review_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`publish_up` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`publish_down` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `idx_user_id` (`user_id`),
KEY `idx_category_id` (`catid`)
) DEFAULT CHARSET=utf8;
SELECT @old_params:= CONCAT(SUBSTRING_INDEX(SUBSTRING(params, LOCATE('"filters":', params)), '}}', 1), '}}') as filters
FROM `#__extensions`
WHERE name="com_content";
UPDATE `#__extensions`
SET params=CONCAT('{',SUBSTRING(params, 2, CHAR_LENGTH(params)-2),IF(params='','',','),@old_params,'}')
WHERE name="com_config";
\ No newline at end of file
INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(27, 'com_finder', 'component', 'com_finder', '', 1, 1, 0, 0, '', '{"show_description":"1","description_length":255,"allow_empty_query":"0","show_url":"1","show_advanced":"1","expand_advanced":"0","show_date_filters":"0","highlight_terms":"1","opensearch_name":"","opensearch_description":"","batch_size":"50","memory_table_limit":30000,"title_multiplier":"1.7","text_multiplier":"0.7","meta_multiplier":"1.2","path_multiplier":"2.0","misc_multiplier":"0.3","stemmer":"porter_en"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(439, 'plg_captcha_recaptcha', 'plugin', 'recaptcha', 'captcha', 0, 1, 1, 0, '{}', '{"public_key":"","private_key":"","theme":"clean"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(440, 'plg_system_highlight', 'plugin', 'highlight', 'system', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 7, 0),
(441, 'plg_content_finder', 'plugin', 'finder', 'content', 0, 0, 1, 0, '{"legacy":false,"name":"plg_content_finder","type":"plugin","creationDate":"December 2011","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"1.7.0","description":"PLG_CONTENT_FINDER_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
(442, 'plg_finder_categories', 'plugin', 'categories', 'finder', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
(443, 'plg_finder_contacts', 'plugin', 'contacts', 'finder', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 2, 0),
(444, 'plg_finder_content', 'plugin', 'content', 'finder', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 3, 0),
(445, 'plg_finder_newsfeeds', 'plugin', 'newsfeeds', 'finder', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 4, 0),
(446, 'plg_finder_weblinks', 'plugin', 'weblinks', 'finder', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 5, 0),
(223, 'mod_finder', 'module', 'mod_finder', '', 0, 1, 0, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
CREATE TABLE IF NOT EXISTS `#__finder_links_terms0` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_links_terms1` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_links_terms2` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_links_terms3` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_links_terms4` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_links_terms5` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_links_terms6` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_links_terms7` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_links_terms8` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_links_terms9` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_links_termsa` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_links_termsb` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_links_termsc` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_links_termsd` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_links_termse` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_links_termsf` (
`link_id` int(10) unsigned NOT NULL,
`term_id` int(10) unsigned NOT NULL,
`weight` float unsigned NOT NULL,
PRIMARY KEY (`link_id`,`term_id`),
KEY `idx_term_weight` (`term_id`,`weight`),
KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_taxonomy` (
`id` int(10) unsigned NOT NULL auto_increment,
`parent_id` int(10) unsigned NOT NULL default '0',
`title` varchar(255) NOT NULL,
`state` tinyint(1) unsigned NOT NULL default '1',
`access` tinyint(1) unsigned NOT NULL default '0',
`ordering` tinyint(1) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `parent_id` (`parent_id`),
KEY `state` (`state`),
KEY `ordering` (`ordering`),
KEY `access` (`access`),
KEY `idx_parent_published` (`parent_id`,`state`,`access`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_taxonomy_map` (
`link_id` int(10) unsigned NOT NULL,
`node_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`link_id`,`node_id`),
KEY `link_id` (`link_id`),
KEY `node_id` (`node_id`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_terms` (
`term_id` int(10) unsigned NOT NULL auto_increment,
`term` varchar(75) NOT NULL,
`stem` varchar(75) NOT NULL,
`common` tinyint(1) unsigned NOT NULL default '0',
`phrase` tinyint(1) unsigned NOT NULL default '0',
`weight` float unsigned NOT NULL default '0',
`soundex` varchar(75) NOT NULL,
`links` int(10) NOT NULL default '0',
PRIMARY KEY (`term_id`),
UNIQUE KEY `idx_term` (`term`),
KEY `idx_term_phrase` (`term`,`phrase`),
KEY `idx_stem_phrase` (`stem`,`phrase`),
KEY `idx_soundex_phrase` (`soundex`,`phrase`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_terms_common` (
`term` varchar(75) NOT NULL,
`language` varchar(3) NOT NULL,
KEY `idx_word_lang` (`term`,`language`),
KEY `idx_lang` (`language`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_tokens` (
`term` varchar(75) NOT NULL,
`stem` varchar(75) NOT NULL,
`common` tinyint(1) unsigned NOT NULL default '0',
`phrase` tinyint(1) unsigned NOT NULL default '0',
`weight` float unsigned NOT NULL default '1',
`context` tinyint(1) unsigned NOT NULL default '2',
KEY `idx_word` (`term`),
KEY `idx_context` (`context`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_tokens_aggregate` (
`term_id` int(10) unsigned NOT NULL,
`map_suffix` char(1) NOT NULL,
`term` varchar(75) NOT NULL,
`stem` varchar(75) NOT NULL,
`common` tinyint(1) unsigned NOT NULL default '0',
`phrase` tinyint(1) unsigned NOT NULL default '0',
`term_weight` float unsigned NOT NULL,
`context` tinyint(1) unsigned NOT NULL default '2',
`context_weight` float unsigned NOT NULL,
`total_weight` float unsigned NOT NULL,
KEY `token` (`term`),
KEY `keyword_id` (`term_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_types` (
`id` int(10) unsigned NOT NULL auto_increment,
`title` varchar(100) NOT NULL,
`mime` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `title` (`title`)
) DEFAULT CHARSET=utf8;
REPLACE INTO `#__finder_taxonomy` (`id`, `parent_id`, `title`, `state`, `access`, `ordering`) VALUES
(1, 0, 'ROOT', 0, 0, 0);
REPLACE INTO `#__finder_terms_common` (`term`, `language`) VALUES
('a', 'en'),
('about', 'en'),
('after', 'en'),
('ago', 'en'),
('all', 'en'),
('am', 'en'),
('an', 'en'),
('and', 'en'),
('ani', 'en'),
('any', 'en'),
('are', 'en'),
('aren''t', 'en'),
('as', 'en'),
('at', 'en'),
('be', 'en'),
('but', 'en'),
('by', 'en'),
('for', 'en'),
('from', 'en'),
('get', 'en'),
('go', 'en'),
('how', 'en'),
('if', 'en'),
('in', 'en'),
('into', 'en'),
('is', 'en'),
('isn''t', 'en'),
('it', 'en'),
('its', 'en'),
('me', 'en'),
('more', 'en'),
('most', 'en'),
('must', 'en'),
('my', 'en'),
('new', 'en'),
('no', 'en'),
('none', 'en'),
('not', 'en'),
('noth', 'en'),
('nothing', 'en'),
('of', 'en'),
('off', 'en'),
('often', 'en'),
('old', 'en'),
('on', 'en'),
('onc', 'en'),
('once', 'en'),
('onli', 'en'),
('only', 'en'),
('or', 'en'),
('other', 'en'),
('our', 'en'),
('ours', 'en'),
('out', 'en'),
('over', 'en'),
('page', 'en'),
('she', 'en'),
('should', 'en'),
('small', 'en'),
('so', 'en'),
('some', 'en'),
('than', 'en'),
('thank', 'en'),
('that', 'en'),
('the', 'en'),
('their', 'en'),
('theirs', 'en'),
('them', 'en'),
('then', 'en'),
('there', 'en'),
('these', 'en'),
('they', 'en'),
('this', 'en'),
('those', 'en'),
('thus', 'en'),
('time', 'en'),
('times', 'en'),
('to', 'en'),
('too', 'en'),
('true', 'en'),
('under', 'en'),
('until', 'en'),
('up', 'en'),
('upon', 'en'),
('use', 'en'),
('user', 'en'),
('users', 'en'),
('veri', 'en'),
('version', 'en'),
('very', 'en'),
('via', 'en'),
('want', 'en'),
('was', 'en'),
('way', 'en'),
('were', 'en'),
('what', 'en'),
('when', 'en'),
('where', 'en'),
('whi', 'en'),
('which', 'en'),
('who', 'en'),
('whom', 'en'),
('whose', 'en'),
('why', 'en'),
('wide', 'en'),
('will', 'en'),
('with', 'en'),
('within', 'en'),
('without', 'en'),
('would', 'en'),
('yes', 'en'),
('yet', 'en'),
('you', 'en'),
('your', 'en'),
('yours', 'en');
INSERT INTO `#__menu` (`menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `ordering`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) VALUES
('menu', 'com_finder', 'Smart Search', '', 'Smart Search', 'index.php?option=com_finder', 'component', 0, 1, 1, 27, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:finder', 0, '', 41, 42, 0, '*', 1);
CREATE TABLE IF NOT EXISTS `#__finder_filters` (
`filter_id` int(10) unsigned NOT NULL auto_increment,
`title` varchar(255) NOT NULL,
`alias` varchar(255) NOT NULL,
`state` tinyint(1) NOT NULL default '1',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`created_by` int(10) unsigned NOT NULL,
`created_by_alias` varchar(255) NOT NULL,
`modified` datetime NOT NULL default '0000-00-00 00:00:00',
`modified_by` int(10) unsigned NOT NULL default '0',
`checked_out` int(10) unsigned NOT NULL default '0',
`checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00',
`map_count` int(10) unsigned NOT NULL default '0',
`data` text NOT NULL,
`params` mediumtext,
PRIMARY KEY (`filter_id`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__finder_links` (
`link_id` int(10) unsigned NOT NULL auto_increment,
`url` varchar(255) NOT NULL,
`route` varchar(255) NOT NULL,
`title` varchar(255) default NULL,
`description` varchar(255) default NULL,
`indexdate` datetime NOT NULL default '0000-00-00 00:00:00',
`md5sum` varchar(32) default NULL,
`published` tinyint(1) NOT NULL default '1',
`state` int(5) default '1',
`access` int(5) default '0',
`language` varchar(8) NOT NULL,
`publish_start_date` datetime NOT NULL default '0000-00-00 00:00:00',
`publish_end_date` datetime NOT NULL default '0000-00-00 00:00:00',
`start_date` datetime NOT NULL default '0000-00-00 00:00:00',
`end_date` datetime NOT NULL default '0000-00-00 00:00:00',
`list_price` double unsigned NOT NULL default '0',
`sale_price` double unsigned NOT NULL default '0',
`type_id` int(11) NOT NULL,
`object` mediumblob NOT NULL,
PRIMARY KEY (`link_id`),
KEY `idx_type` (`type_id`),
KEY `idx_title` (`title`),
KEY `idx_md5` (`md5sum`),
KEY `idx_url` (`url`(75)),
KEY `idx_published_list` (`published`,`state`,`access`,`publish_start_date`,`publish_end_date`,`list_price`),
KEY `idx_published_sale` (`published`,`state`,`access`,`publish_start_date`,`publish_end_date`,`sale_price`)
) DEFAULT CHARSET=utf8;
ALTER TABLE `#__menu` DROP INDEX `idx_client_id_parent_id_alias`;
--
-- The following statment had to be modified for utf8mb4 in Joomla! 3.5.1, changing
-- `alias` to `alias`(100)
--
ALTER TABLE `#__menu` ADD UNIQUE `idx_client_id_parent_id_alias_language` ( `client_id` , `parent_id` , `alias`(100) , `language` );
\ No newline at end of file
ALTER TABLE `#__updates` ADD COLUMN `infourl` text NOT NULL AFTER `detailsurl`;
ALTER TABLE `#__languages` CHANGE `sitename` `sitename` VARCHAR( 1024 ) NOT NULL DEFAULT '';
INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(314, 'mod_version', 'module', 'mod_version', '', 1, 1, 1, 0, '{"legacy":false,"name":"mod_version","type":"module","creationDate":"January 2012","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"2.5.0","description":"MOD_VERSION_XML_DESCRIPTION","group":""}', '{"format":"short","product":"1","cache":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 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
('Joomla Version', '', '', 1, 'footer', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, 'mod_version', 3, 1, '{"format":"short","product":"1","layout":"_:default","moduleclass_sfx":"","cache":"0"}', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES
(LAST_INSERT_ID(), 0);
\ No newline at end of file
# Dummy SQL file to set schema version
\ No newline at end of file
# Dummy SQL file to set schema version
\ No newline at end of file
INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(28, 'com_joomlaupdate', 'component', 'com_joomlaupdate', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_joomlaupdate","type":"component","creationDate":"February 2012","author":"Joomla! Project","copyright":"(C) 2005 - 2019 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"2.5.2","description":"COM_JOOMLAUPDATE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);
INSERT INTO `#__menu` (`menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `ordering`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`) VALUES
('menu', 'com_joomlaupdate', 'Joomla! Update', '', 'Joomla! Update', 'index.php?option=com_joomlaupdate', 'component', 0, 1, 1, 28, 0, 0, '0000-00-00 00:00:00', 0, 0, 'class:joomlaupdate', 0, '', 41, 42, 0, '*', 1);
ALTER TABLE `#__languages` ADD COLUMN `access` integer unsigned NOT NULL default 0 AFTER `published`;
ALTER TABLE `#__languages` ADD INDEX `idx_access` (`access`);
UPDATE `#__categories` SET `extension` = 'com_users.notes' WHERE `extension` = 'com_users';
UPDATE `#__extensions` SET `enabled` = '1' WHERE `protected` = '1' AND `type` <> 'plugin';
ALTER TABLE `#__redirect_links` ADD COLUMN `hits` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `comment`;
ALTER TABLE `#__users` ADD COLUMN `lastResetTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Date of last password reset';
ALTER TABLE `#__users` ADD COLUMN `resetCount` int(11) NOT NULL DEFAULT '0' COMMENT 'Count of password resets since lastResetTime';
\ No newline at end of file
# Placeholder file for database changes for version 2.5.6
\ No newline at end of file
INSERT INTO `#__update_sites` (`name`, `type`, `location`, `enabled`, `last_check_timestamp`) VALUES('Accredited Joomla! Translations','collection','https://update.joomla.org/language/translationlist.xml',1,0);INSERT INTO `#__update_sites_extensions` (`update_site_id`, `extension_id`) VALUES(LAST_INSERT_ID(),600);UPDATE `#__assets` SET name=REPLACE( name, 'com_user.notes.category','com_users.category' );UPDATE `#__categories` SET extension=REPLACE( extension, 'com_user.notes.category','com_users.category' );
\ No newline at end of file
ALTER TABLE `#__users` DROP INDEX `usertype`;
ALTER TABLE `#__session` DROP INDEX `whosonline`;
DROP TABLE IF EXISTS `#__update_categories`;
ALTER TABLE `#__contact_details` DROP `imagepos`;
ALTER TABLE `#__content` DROP COLUMN `title_alias`;
ALTER TABLE `#__content` DROP COLUMN `sectionid`;
ALTER TABLE `#__content` DROP COLUMN `mask`;
ALTER TABLE `#__content` DROP COLUMN `parentid`;
ALTER TABLE `#__newsfeeds` DROP COLUMN `filename`;
ALTER TABLE `#__menu` DROP COLUMN `ordering`;
ALTER TABLE `#__session` DROP COLUMN `usertype`;
ALTER TABLE `#__users` DROP COLUMN `usertype`;
ALTER TABLE `#__updates` DROP COLUMN `categoryid`;
UPDATE `#__extensions` SET protected = 0 WHERE
`name` = 'com_search' OR
`name` = 'mod_articles_archive' OR
`name` = 'mod_articles_latest' OR
`name` = 'mod_banners' OR
`name` = 'mod_feed' OR
`name` = 'mod_footer' OR
`name` = 'mod_users_latest' OR
`name` = 'mod_articles_category' OR
`name` = 'mod_articles_categories' OR
`name` = 'plg_content_pagebreak' OR
`name` = 'plg_content_pagenavigation' OR
`name` = 'plg_content_vote' OR
`name` = 'plg_editors_tinymce' OR
`name` = 'plg_system_p3p' OR
`name` = 'plg_user_contactcreator' OR
`name` = 'plg_user_profile';
DELETE FROM `#__extensions` WHERE `extension_id` = 800;
ALTER TABLE `#__assets` ENGINE=InnoDB;
ALTER TABLE `#__associations` ENGINE=InnoDB;
ALTER TABLE `#__banners` ENGINE=InnoDB;
ALTER TABLE `#__banner_clients` ENGINE=InnoDB;
ALTER TABLE `#__banner_tracks` ENGINE=InnoDB;
ALTER TABLE `#__categories` ENGINE=InnoDB;
ALTER TABLE `#__contact_details` ENGINE=InnoDB;
ALTER TABLE `#__content` ENGINE=InnoDB;
ALTER TABLE `#__content_frontpage` ENGINE=InnoDB;
ALTER TABLE `#__content_rating` ENGINE=InnoDB;
ALTER TABLE `#__core_log_searches` ENGINE=InnoDB;
ALTER TABLE `#__extensions` ENGINE=InnoDB;
ALTER TABLE `#__finder_filters` ENGINE=InnoDB;
ALTER TABLE `#__finder_links` ENGINE=InnoDB;
ALTER TABLE `#__finder_links_terms0` ENGINE=InnoDB;
ALTER TABLE `#__finder_links_terms1` ENGINE=InnoDB;
ALTER TABLE `#__finder_links_terms2` ENGINE=InnoDB;
ALTER TABLE `#__finder_links_terms3` ENGINE=InnoDB;
ALTER TABLE `#__finder_links_terms4` ENGINE=InnoDB;
ALTER TABLE `#__finder_links_terms5` ENGINE=InnoDB;
ALTER TABLE `#__finder_links_terms6` ENGINE=InnoDB;
ALTER TABLE `#__finder_links_terms7` ENGINE=InnoDB;
ALTER TABLE `#__finder_links_terms8` ENGINE=InnoDB;
ALTER TABLE `#__finder_links_terms9` ENGINE=InnoDB;
ALTER TABLE `#__finder_links_termsa` ENGINE=InnoDB;
ALTER TABLE `#__finder_links_termsb` ENGINE=InnoDB;
ALTER TABLE `#__finder_links_termsc` ENGINE=InnoDB;
ALTER TABLE `#__finder_links_termsd` ENGINE=InnoDB;
ALTER TABLE `#__finder_links_termse` ENGINE=InnoDB;
ALTER TABLE `#__finder_links_termsf` ENGINE=InnoDB;
ALTER TABLE `#__finder_taxonomy` ENGINE=InnoDB;
ALTER TABLE `#__finder_taxonomy_map` ENGINE=InnoDB;
ALTER TABLE `#__finder_terms` ENGINE=InnoDB;
ALTER TABLE `#__finder_terms_common` ENGINE=InnoDB;
ALTER TABLE `#__finder_types` ENGINE=InnoDB;
ALTER TABLE `#__languages` ENGINE=InnoDB;
ALTER TABLE `#__menu` ENGINE=InnoDB;
ALTER TABLE `#__menu_types` ENGINE=InnoDB;
ALTER TABLE `#__messages` ENGINE=InnoDB;
ALTER TABLE `#__messages_cfg` ENGINE=InnoDB;
ALTER TABLE `#__modules` ENGINE=InnoDB;
ALTER TABLE `#__modules_menu` ENGINE=InnoDB;
ALTER TABLE `#__newsfeeds` ENGINE=InnoDB;
ALTER TABLE `#__overrider` ENGINE=InnoDB;
ALTER TABLE `#__redirect_links` ENGINE=InnoDB;
ALTER TABLE `#__schemas` ENGINE=InnoDB;
ALTER TABLE `#__session` ENGINE=InnoDB;
ALTER TABLE `#__template_styles` ENGINE=InnoDB;
ALTER TABLE `#__updates` ENGINE=InnoDB;
ALTER TABLE `#__update_sites` ENGINE=InnoDB;
ALTER TABLE `#__update_sites_extensions` ENGINE=InnoDB;
ALTER TABLE `#__users` ENGINE=InnoDB;
ALTER TABLE `#__usergroups` ENGINE=InnoDB;
ALTER TABLE `#__user_notes` ENGINE=InnoDB;
ALTER TABLE `#__user_profiles` ENGINE=InnoDB;
ALTER TABLE `#__user_usergroup_map` ENGINE=InnoDB;
ALTER TABLE `#__viewlevels` ENGINE=InnoDB;
ALTER TABLE `#__newsfeeds` ADD COLUMN `description` text NOT NULL;
ALTER TABLE `#__newsfeeds` ADD COLUMN `version` int(10) unsigned NOT NULL DEFAULT '1';
ALTER TABLE `#__newsfeeds` ADD COLUMN `hits` int(10) unsigned NOT NULL DEFAULT '0';
ALTER TABLE `#__newsfeeds` ADD COLUMN `images` text NOT NULL;
ALTER TABLE `#__contact_details` ADD COLUMN `version` int(10) unsigned NOT NULL DEFAULT '1';
ALTER TABLE `#__contact_details` ADD COLUMN `hits` int(10) unsigned NOT NULL DEFAULT '0';
ALTER TABLE `#__banners` ADD COLUMN `created_by` int(10) unsigned NOT NULL DEFAULT '0';
ALTER TABLE `#__banners` ADD COLUMN `created_by_alias` varchar(255) NOT NULL DEFAULT '';
ALTER TABLE `#__banners` ADD COLUMN `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';
ALTER TABLE `#__banners` ADD COLUMN `modified_by` int(10) unsigned NOT NULL DEFAULT '0';
ALTER TABLE `#__banners` ADD COLUMN `version` int(10) unsigned NOT NULL DEFAULT '1';
ALTER TABLE `#__categories` ADD COLUMN `version` int(10) unsigned NOT NULL DEFAULT '1';
UPDATE `#__assets` SET name=REPLACE( name, 'com_user.notes.category','com_users.category' );
UPDATE `#__categories` SET extension=REPLACE( extension, 'com_user.notes.category','com_users.category' );
ALTER TABLE `#__finder_terms` ADD COLUMN `language` char(3) NOT NULL DEFAULT '';
ALTER TABLE `#__finder_tokens` ADD COLUMN `language` char(3) NOT NULL DEFAULT '';
ALTER TABLE `#__finder_tokens_aggregate` ADD COLUMN `language` char(3) NOT NULL DEFAULT '';
INSERT INTO `#__extensions`
(`name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`)
VALUES
('isis', 'template', 'isis', '', 1, 1, 1, 0, '{"name":"isis","type":"template","creationDate":"3\\/30\\/2012","author":"Kyle Ledbetter","copyright":"Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"","version":"1.0","description":"TPL_ISIS_XML_DESCRIPTION","group":""}', '{"templateColor":"","logoFile":""}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
('protostar', 'template', 'protostar', '', 0, 1, 1, 0, '{"name":"protostar","type":"template","creationDate":"4\\/30\\/2012","author":"Kyle Ledbetter","copyright":"Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"","version":"1.0","description":"TPL_PROTOSTAR_XML_DESCRIPTION","group":""}', '{"templateColor":"","logoFile":"","googleFont":"1","googleFontName":"Open+Sans","fluidContainer":"0"}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
('beez3', 'template', 'beez3', '', 0, 1, 1, 0, '{"legacy":false,"name":"beez3","type":"template","creationDate":"25 November 2009","author":"Angie Radtke","copyright":"Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.","authorEmail":"a.radtke@derauftritt.de","authorUrl":"http:\\/\\/www.der-auftritt.de","version":"1.6.0","description":"TPL_BEEZ3_XML_DESCRIPTION","group":""}', '{"wrapperSmall":"53","wrapperLarge":"72","sitetitle":"","sitedescription":"","navposition":"center","templatecolor":"nature"}', '', '', 0, '0000-00-00 00:00:00', 0, 0);
INSERT INTO `#__template_styles` (`template`, `client_id`, `home`, `title`, `params`) VALUES
('protostar', 0, '0', 'protostar - Default', '{"templateColor":"","logoFile":"","googleFont":"1","googleFontName":"Open+Sans","fluidContainer":"0"}'),
('isis', 1, '1', 'isis - Default', '{"templateColor":"","logoFile":""}'),
('beez3', 0, '0', 'beez3 - Default', '{"wrapperSmall":53,"wrapperLarge":72,"logo":"","sitetitle":"","sitedescription":"","navposition":"center","bootstrap":"","templatecolor":"nature","headerImage":"","backgroundcolor":"#eee"}');
UPDATE `#__template_styles`
SET home = (CASE WHEN (SELECT count FROM (SELECT count(`id`) AS count
FROM `#__template_styles`
WHERE home = '1'
AND client_id = 1) as c) = 0
THEN '1'
ELSE '0'
END)
WHERE template = 'isis'
AND home != '1';
UPDATE `#__template_styles`
SET home = 0
WHERE template = 'bluestork';
INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(315, 'mod_stats_admin', 'module', 'mod_stats_admin', '', 1, 1, 1, 0, '{"name":"mod_stats_admin","type":"module","creationDate":"September 2012","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"MOD_STATS_XML_DESCRIPTION","group":""}', '{"serverinfo":"0","siteinfo":"0","counter":"0","increase":"0","cache":"1","cache_time":"900","cachemode":"static"}', '', '', 0, '0000-00-00 00:00:00', 0, 0);
UPDATE `#__update_sites`
SET location = 'https://update.joomla.org/language/translationlist_3.xml'
WHERE location = 'https://update.joomla.org/language/translationlist.xml'
AND name = 'Accredited Joomla! Translations';
# Placeholder file for database changes for version 3.0.1
\ No newline at end of file
# Placeholder file for database changes for version 3.0.2
\ No newline at end of file
ALTER TABLE `#__associations` CHANGE `id` `id` INT(11) NOT NULL COMMENT 'A reference to the associated item.';
\ No newline at end of file
# Placeholder file for database changes for version 3.1.1
\ No newline at end of file
UPDATE `#__content_types` SET `table` = '{"special":{"dbtable":"#__content","key":"id","type":"Content","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}' WHERE `type_title` = 'Article';
UPDATE `#__content_types` SET `table` = '{"special":{"dbtable":"#__contact_details","key":"id","type":"Contact","prefix":"ContactTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}' WHERE `type_title` = 'Contact';
UPDATE `#__content_types` SET `table` = '{"special":{"dbtable":"#__newsfeeds","key":"id","type":"Newsfeed","prefix":"NewsfeedsTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}' WHERE `type_title` = 'Newsfeed';
UPDATE `#__content_types` SET `table` = '{"special":{"dbtable":"#__users","key":"id","type":"User","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}' WHERE `type_title` = 'User';
UPDATE `#__content_types` SET `table` = '{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}' WHERE `type_title` = 'Article Category';
UPDATE `#__content_types` SET `table` = '{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}' WHERE `type_title` = 'Contact Category';
UPDATE `#__content_types` SET `table` = '{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}' WHERE `type_title` = 'Newsfeeds Category';
UPDATE `#__content_types` SET `table` = '{"special":{"dbtable":"#__tags","key":"tag_id","type":"Tag","prefix":"TagsTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}' WHERE `type_title` = 'Tag';
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"}, "special": {"fulltext":"fulltext"}}' WHERE `type_title` = 'Article';
UPDATE `#__content_types` SET `field_mappings` = '{"common":{"core_content_item_id":"id","core_title":"name","core_state":"published","core_alias":"alias","core_created_time":"created","core_modified_time":"modified","core_body":"address", "core_hits":"hits","core_publish_up":"publish_up","core_publish_down":"publish_down","core_access":"access", "core_params":"params", "core_featured":"featured", "core_metadata":"metadata", "core_language":"language", "core_images":"image", "core_urls":"webpage", "core_version":"version", "core_ordering":"ordering", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"catid", "core_xreference":"xreference", "asset_id":"null"}, "special": {"con_position":"con_position","suburb":"suburb","state":"state","country":"country","postcode":"postcode","telephone":"telephone","fax":"fax","misc":"misc","email_to":"email_to","default_con":"default_con","user_id":"user_id","mobile":"mobile","sortname1":"sortname1","sortname2":"sortname2","sortname3":"sortname3"}}' WHERE `type_title` = 'Contact';
UPDATE `#__content_types` SET `field_mappings` = '{"common":{"core_content_item_id":"id","core_title":"name","core_state":"published","core_alias":"alias","core_created_time":"created","core_modified_time":"modified","core_body":"description", "core_hits":"hits","core_publish_up":"publish_up","core_publish_down":"publish_down","core_access":"access", "core_params":"params", "core_featured":"featured", "core_metadata":"metadata", "core_language":"language", "core_images":"images", "core_urls":"link", "core_version":"version", "core_ordering":"ordering", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"catid", "core_xreference":"xreference", "asset_id":"null"}, "special": {"numarticles":"numarticles","cache_time":"cache_time","rtl":"rtl"}}' WHERE `type_title` = 'Newsfeed';
UPDATE `#__content_types` SET `field_mappings` = '{"common":{"core_content_item_id":"id","core_title":"name","core_state":"null","core_alias":"username","core_created_time":"registerdate","core_modified_time":"lastvisitDate","core_body":"null", "core_hits":"null","core_publish_up":"null","core_publish_down":"null","access":"null", "core_params":"params", "core_featured":"null", "core_metadata":"null", "core_language":"null", "core_images":"null", "core_urls":"null", "core_version":"null", "core_ordering":"null", "core_metakey":"null", "core_metadesc":"null", "core_catid":"null", "core_xreference":"null", "asset_id":"null"}, "special": {}}' WHERE `type_title` = 'User';
UPDATE `#__content_types` SET `field_mappings` = '{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"}, "special": {"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}' WHERE `type_title` = 'Article Category';
UPDATE `#__content_types` SET `field_mappings` = '{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"}, "special": {"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}' WHERE `type_title` = 'Contact Category';
UPDATE `#__content_types` SET `field_mappings` = '{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"}, "special": {"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}' WHERE `type_title` = 'Newsfeeds Category';
UPDATE `#__content_types` SET `field_mappings` = '{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "core_params":"params", "core_featured":"featured", "core_metadata":"metadata", "core_language":"language", "core_images":"images", "core_urls":"urls", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"null", "core_xreference":"null", "asset_id":"null"}, "special": {"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path"}}' WHERE `type_title` = 'Tag';
# Placeholder file for database changes for version 3.1.3
INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(104, 'IDNA Convert', 'library', 'idna_convert', '', 0, 1, 1, 1, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
# Placeholder file for database changes for version 3.1.5
DELETE FROM `#__postinstall_messages` WHERE `title_key` = 'PLG_USER_JOOMLA_POSTINSTALL_STRONGPW_TITLE';
ALTER TABLE `#__update_sites` ADD COLUMN `extra_query` VARCHAR(1000) DEFAULT '';
ALTER TABLE `#__updates` ADD COLUMN `extra_query` VARCHAR(1000) DEFAULT '';
UPDATE `#__menu` SET `component_id` = (SELECT `extension_id` FROM `#__extensions` WHERE `element` = 'com_joomlaupdate') WHERE `link` = 'index.php?option=com_joomlaupdate';
INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(403, 'plg_content_contact', 'plugin', 'contact', 'content', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 1, 0);
\ No newline at end of file
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_PHPVERSION_TITLE', 'COM_CPANEL_MSG_PHPVERSION_BODY', '', 'com_cpanel', 1, 'message', '', '', 'admin://components/com_admin/postinstall/phpversion.php', 'admin_postinstall_phpversion_condition', '3.2.2', 1);
/* Update updates version length */
ALTER TABLE `#__updates` MODIFY `version` varchar(32) DEFAULT '';
INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(106, 'PHPass', 'library', 'phpass', '', 0, 1, 1, 1, '{"legacy":false,"name":"PHPass","type":"library","creationDate":"2004-2006","author":"Solar Designer","authorEmail":"solar@openwall.com","authorUrl":"http:\/\/www.openwall.com/phpass","version":"0.3","description":"LIB_PHPASS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);
UPDATE `#__extensions` ext1, `#__extensions` ext2 SET ext1.`params` = ext2.`params` WHERE ext1.`name` = 'plg_authentication_cookie' AND ext2.`name` = 'plg_system_remember';
ALTER TABLE `#__users` ADD COLUMN `requireReset` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'Require user to reset password on next login' AFTER `otep`;
INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(451, 'plg_search_tags', 'plugin', 'tags', 'search', 0, 0, 1, 0, '', '{"search_limit":"50","show_tagged_items":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0);
ALTER TABLE `#__user_profiles` CHANGE `profile_value` `profile_value` TEXT NOT NULL;
INSERT INTO `#__update_sites` (`name`, `type`, `location`, `enabled`) VALUES
('Joomla! Update Component Update Site', 'extension', 'https://update.joomla.org/core/extensions/com_joomlaupdate.xml', 1);
INSERT INTO `#__update_sites_extensions` (`update_site_id`, `extension_id`) VALUES
((SELECT `update_site_id` FROM `#__update_sites` WHERE `name` = 'Joomla! Update Component Update Site'), (SELECT `extension_id` FROM `#__extensions` WHERE `name` = 'com_joomlaupdate'));
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_HTACCESS_TITLE', 'COM_CPANEL_MSG_HTACCESS_BODY', '', 'com_cpanel', 1, 'message', '', '', 'admin://components/com_admin/postinstall/htaccess.php', 'admin_postinstall_htaccess_condition', '3.4.0', 1);
INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(801, 'weblinks', 'package', 'pkg_weblinks', '', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
INSERT INTO `#__update_sites` (`name`, `type`, `location`, `enabled`) VALUES
('Weblinks Update Site', 'extension', 'https://raw.githubusercontent.com/joomla-extensions/weblinks/master/manifest.xml', 1);
INSERT INTO `#__update_sites_extensions` (`update_site_id`, `extension_id`) VALUES
((SELECT `update_site_id` FROM `#__update_sites` WHERE `name` = 'Weblinks Update Site'), 801);
ALTER TABLE `#__redirect_links` ADD COLUMN `header` smallint(3) NOT NULL DEFAULT 301;
--
-- The following statement has to be disabled because it conflicts with
-- a later change added with Joomla! 3.5.0 for long URLs in this table
--
-- ALTER TABLE `#__redirect_links` MODIFY `new_url` varchar(255);
DELETE FROM `#__extensions` WHERE `extension_id` = 100;
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!