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.

1 app/administrator/cache/*
2 administrator/logs/*
3 cache
4 files
5 images
6 php5.6-back
7
8 .git.back/
...\ No newline at end of file ...\ No newline at end of file
1 # AddHandler x-httpd-php5619 .php
2
3
4 Options +SymLinksIfOwnerMatch
5
6 Options -Indexes
7
8 RewriteEngine on
9
10
11 ## Begin - Rewrite rules to block out some common exploits.
12 # If you experience problems on your site then comment out the operations listed
13 # below by adding a # to the beginning of the line.
14 # This attempts to block the most common type of exploit `attempts` on Joomla!
15 #
16 # Block any script trying to base64_encode data within the URL.
17 RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
18 # Block any script that includes a <script> tag in URL.
19 RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
20 # Block any script trying to set a PHP GLOBALS variable via URL.
21 RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
22 # Block any script trying to modify a _REQUEST variable via URL.
23 RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
24 # Return 403 Forbidden header and show the content of the root home page
25 RewriteRule .* index.php [F]
26 #
27 ## End - Rewrite rules to block out some common exploits.
28
29 ## Begin - Custom redirects
30 #
31 # If you need to redirect some pages, or set a canonical non-www to
32 # www redirect (or vice versa), place that code here. Ensure those
33 # redirects use the correct RewriteRule syntax and the [R=301,L] flags.
34 #
35 ## End - Custom redirects
36
37 ##
38 # Uncomment the following line if your webserver's URL
39 # is not directly related to physical file paths.
40 # Update Your Joomla! Directory (just / for root).
41 ##
42
43 # RewriteBase /
44
45 ## Begin - Joomla! core SEF Section.
46 #
47 RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
48 #
49 # If the requested path and file is not /index.php and the request
50 # has not already been internally rewritten to the index.php script
51 RewriteCond %{REQUEST_URI} !^/index\.php
52 # and the requested path and file doesn't directly match a physical file
53 RewriteCond %{REQUEST_FILENAME} !-f
54 # and the requested path and file doesn't directly match a physical folder
55 RewriteCond %{REQUEST_FILENAME} !-d
56 # internally rewrite the request to the index.php script
57 RewriteRule .* index.php [L]
58 #
59 ## End - Joomla! core SEF Section.
60
61
62 RewriteEngine On
63 # RewriteCond %{HTTPS} off
64 # RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
65
66 #20200122 - IPアクセスリダイレクトnozaki
67 RewriteBase /
68 RewriteCond %{HTTP_HOST} ^18\.178\.92\.128$ [NC]
69 RewriteRule .* https://www.nifs-k.ac.jp%{REQUEST_URI} [R=302,L]
70
71 <IfModule mod_siteguard.c>
72 SiteGuard_User_ExcludeSig ip(202.95.45.168)
73 SiteGuard_User_ExcludeSig ip(202.24.160.0/21)
74 SiteGuard_User_ExcludeSig ip(210.137.6.192/26)
75 SiteGuard_User_ExcludeSig ip(210.237.39.72)
76 SiteGuard_User_ExcludeSig ip(210.237.36.185)
77 SiteGuard_User_ExcludeSig ip(18.178.92.128)
78 </IfModule>
File mode changed
This diff is collapsed. Click to expand it.
1 <?php
2 /**
3 * PHPMailer SPL autoloader.
4 * PHP Version 5
5 * @package PHPMailer
6 * @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
7 * @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
8 * @author Jim Jagielski (jimjag) <jimjag@gmail.com>
9 * @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
10 * @author Brent R. Matzelle (original founder)
11 * @copyright 2012 - 2014 Marcus Bointon
12 * @copyright 2010 - 2012 Jim Jagielski
13 * @copyright 2004 - 2009 Andy Prevost
14 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
15 * @note This program is distributed in the hope that it will be useful - WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE.
18 */
19
20 /**
21 * PHPMailer SPL autoloader.
22 * @param string $classname The name of the class to load
23 */
24 function PHPMailerAutoload($classname)
25 {
26 //Can't use __DIR__ as it's only in PHP 5.3+
27 $filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php';
28 if (is_readable($filename)) {
29 require $filename;
30 }
31 }
32
33 if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
34 //SPL autoloading was introduced in PHP 5.1.2
35 if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
36 spl_autoload_register('PHPMailerAutoload', true, true);
37 } else {
38 spl_autoload_register('PHPMailerAutoload');
39 }
40 } else {
41 /**
42 * Fall back to traditional autoload for old PHP versions
43 * @param string $classname The name of the class to load
44 */
45 function __autoload($classname)
46 {
47 PHPMailerAutoload($classname);
48 }
49 }
1 1- What is this?
2 * This is a Joomla! installation/upgrade package to version 3.x
3 * Joomla! Official site: https://www.joomla.org
4 * Joomla! 3.9 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_3.9_version_history
5 * Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/staging
6
7 2- What is Joomla?
8 * Joomla! is a Content Management System (CMS) which enables you to build Web sites and powerful online applications.
9 * It's a free and Open Source software, distributed under the GNU General Public License version 2 or later.
10 * 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.
11 You can find full technical requirements here: https://downloads.joomla.org/technical-requirements.
12
13 3- Is Joomla! for you?
14 * Joomla! is the right solution for most content web projects: https://docs.joomla.org/Special:MyLanguage/Portal:Learn_More
15 * See Joomla's core features - https://www.joomla.org/core-features.html
16 * Try out our free hosting service: https://launch.joomla.org
17
18 4- How to find a Joomla! translation?
19 * Repository of accredited language packs: https://community.joomla.org/translations.html
20 * 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
21 * Learn how to setup a Multilingual Joomla! Site: https://docs.joomla.org/Special:MyLanguage/J3.x:Setup_a_Multilingual_Site
22
23 5- Learn Joomla!
24 * Read Getting Started with Joomla to find out the basics: https://docs.joomla.org/Special:MyLanguage/J3.x:Getting_Started_with_Joomla!
25 * Before installing, read the beginners guide: https://docs.joomla.org/Special:MyLanguage/Portal:Beginners
26
27 6- What are the benefits of Joomla?
28 * The functionality of a Joomla! website can be extended by installing extensions that you can create (or download) to suit your needs.
29 * There are many ready-made extensions that you can download and install.
30 * Check out the Joomla! Extensions Directory (JED): https://extensions.joomla.org
31
32 7- Is it easy to change the layout display?
33 * The layout is controlled by templates that you can edit.
34 * There are a lot of ready-made professional templates that you can download.
35 * Check out the template management information: https://docs.joomla.org/Special:MyLanguage/Portal:Template_Management
36
37 8- Ready to install Joomla?
38 * Check the minimum requirements here: https://downloads.joomla.org/technical-requirements
39 * How do you install Joomla - https://docs.joomla.org/Special:MyLanguage/J3.x:Installing_Joomla
40 * You could start your Joomla! experience building your site on a local test server.
41 When ready it can be moved to an online hosting account of your choice.
42 See the tutorial: https://docs.joomla.org/Special:MyLanguage/Installing_Joomla_locally
43
44 9- Updates are free!
45 * Always use the latest version: https://downloads.joomla.org/latest
46
47 10- Where can you get support and help?
48 * The Joomla! Documentation: https://docs.joomla.org/Special:MyLanguage/Main_Page
49 * FAQ Frequently Asked Questions: https://docs.joomla.org/Special:MyLanguage/Category:FAQ
50 * Find the information you need: https://docs.joomla.org/Special:MyLanguage/Start_here
51 * Find help and other users: https://www.joomla.org/about-joomla/create-and-share.html
52 * Post questions at our forums: https://forum.joomla.org
53 * Joomla! Resources Directory (JRD): https://resources.joomla.org/
54
55 11- Do you already have a Joomla! site that's not built with Joomla! 3.x ?
56 * What's new in Joomla! 3.x: https://www.joomla.org/3
57 * 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
58 * 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
59 * 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
60
61 12- Do you want to improve Joomla?
62 * Where to request a feature? https://issues.joomla.org
63 * How do you report a bug? https://docs.joomla.org/Special:MyLanguage/Filing_bugs_and_issues
64 * Get Involved: Joomla! is a community developed software. Join the community at https://volunteers.joomla.org
65 * Documentation for Developers: https://docs.joomla.org/Special:MyLanguage/Portal:Developers
66 * Documentation for Web designers: https://docs.joomla.org/Special:MyLanguage/Web_designers
67
68 Copyright:
69 * Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.
70 * Distributed under the GNU General Public License version 2 or later
71 * See License details at https://docs.joomla.org/Special:MyLanguage/Joomla_Licenses
File mode changed
1 # wIP̂݋
2 order deny,allow
3 deny from all
4 allow from 202.24.160.0/21
5 allow from 210.137.6.192/26
6 allow from 119.47.143.238
7 allow from 124.146.74.107
8 allow from 210.237.39.72
9 allow from 119.104.47.100
...\ No newline at end of file ...\ No newline at end of file
1 # 指定IPのみ許可
2 order deny,allow
3 deny from all
4
5 #鹿屋体育大学
6 allow from 202.24.160.0/21
7 allow from 210.137.6.192/26
8
9 #Em
10 allow from 114.142.103.192
11
12 #Ek
13 allow from 203.111.201.163
14 allow from 120.51.222.209
15 allow from 203.145.109.98
16
17 #MBC
18 allow from 210.237.39.72
19
1 # wIP̂݋
2 order deny,allow
3 deny from all
4 allow from 202.24.160.0/21
5 allow from 210.137.6.192/26
6 allow from 119.47.143.238
7 allow from 124.146.74.107
8 allow from 210.237.39.72
9 allow from 124.150.217.38
...\ No newline at end of file ...\ No newline at end of file
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_actionlogs
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 use Joomla\CMS\Access\Exception\NotAllowed;
13 use Joomla\CMS\Factory;
14 use Joomla\CMS\Language\Text;
15 use Joomla\CMS\MVC\Controller\BaseController;
16
17 if (!Factory::getUser()->authorise('core.admin'))
18 {
19 throw new NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
20 }
21
22 $controller = BaseController::getInstance('Actionlogs');
23 $controller->execute(Factory::getApplication()->input->get('task'));
24 $controller->redirect();
1 <?xml version="1.0" encoding="UTF-8"?>
2 <extension version="3.9" type="component" method="upgrade">
3 <name>com_actionlogs</name>
4 <author>Joomla! Project</author>
5 <creationDate>May 2018</creationDate>
6 <copyright>Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.</copyright>
7 <license>GNU General Public License version 2 or later; see LICENSE.txt</license>
8 <authorEmail>admin@joomla.org</authorEmail>
9 <authorUrl>www.joomla.org</authorUrl>
10 <version>3.9.0</version>
11 <description>COM_ACTIONLOGS_XML_DESCRIPTION</description>
12 <administration>
13 <menu>COM_ACTIONLOGS</menu>
14 <files folder="admin">
15 <file>actionlogs.php</file>
16 <file>config.xml</file>
17 <file>access.xml</file>
18 <file>controller.php</file>
19 <folder>controllers</folder>
20 <folder>helpers</folder>
21 <folder>models</folder>
22 <folder>views</folder>
23 </files>
24 <languages folder="admin">
25 <language tag="en-GB">language/en-GB.com_actionlogs.ini</language>
26 <language tag="en-GB">language/en-GB.com_actionlogs.sys.ini</language>
27 </languages>
28 </administration>
29 </extension>
1 <?xml version="1.0" encoding="utf-8"?>
2 <config>
3 <fieldset name="actionlogs" label="COM_ACTIONLOGS_OPTIONS" addfieldpath="/administrator/components/com_actionlogs/models/fields">
4 <field
5 name="ip_logging"
6 type="radio"
7 label="COM_ACTIONLOGS_IP_LOGGING_LABEL"
8 description="COM_ACTIONLOGS_IP_LOGGING_DESC"
9 class="btn-group btn-group-yesno"
10 default="0"
11 filter="integer"
12 >
13 <option value="1">JYES</option>
14 <option value="0">JNO</option>
15 </field>
16 <field
17 name="csv_delimiter"
18 type="list"
19 label="COM_ACTIONLOGS_CSV_DELIMITER_LABEL"
20 description="COM_ACTIONLOGS_CSV_DELIMITER_DESC"
21 default=","
22 >
23 <option value=",">COM_ACTIONLOGS_COMMA</option>
24 <option value=";">COM_ACTIONLOGS_SEMICOLON</option>
25 </field>
26 <field
27 name="loggable_extensions"
28 type="logtype"
29 label="COM_ACTIONLOGS_LOG_EXTENSIONS_LABEL"
30 description="COM_ACTIONLOGS_LOG_EXTENSIONS_DESC"
31 multiple="true"
32 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"
33 />
34 </fieldset>
35 </config>
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_actionlogs
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 /**
13 * Actionlogs Controller
14 *
15 * @since 3.9.0
16 */
17 class ActionlogsController extends JControllerLegacy
18 {
19 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_actionlogs
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 use Joomla\CMS\Component\ComponentHelper;
13 use Joomla\CMS\Date\Date;
14 use Joomla\CMS\Factory;
15 use Joomla\CMS\Language\Text;
16 use Joomla\CMS\Router\Route;
17 use Joomla\Utilities\ArrayHelper;
18
19 JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');
20
21 /**
22 * Actionlogs list controller class.
23 *
24 * @since 3.9.0
25 */
26 class ActionlogsControllerActionlogs extends JControllerAdmin
27 {
28 /**
29 * Constructor.
30 *
31 * @param array $config An optional associative array of configuration settings.
32 *
33 * @since 3.9.0
34 */
35 public function __construct(array $config = array())
36 {
37 parent::__construct($config);
38
39 $this->registerTask('exportSelectedLogs', 'exportLogs');
40 }
41
42 /**
43 * Method to get a model object, loading it if required.
44 *
45 * @param string $name The model name. Optional.
46 * @param string $prefix The class prefix. Optional.
47 * @param array $config Configuration array for model. Optional.
48 *
49 * @return object The model.
50 *
51 * @since 3.9.0
52 */
53 public function getModel($name = 'Actionlogs', $prefix = 'ActionlogsModel', $config = array('ignore_request' => true))
54 {
55 // Return the model
56 return parent::getModel($name, $prefix, $config);
57 }
58
59 /**
60 * Method to export logs
61 *
62 * @return void
63 *
64 * @since 3.9.0
65 */
66 public function exportLogs()
67 {
68 // Check for request forgeries.
69 $this->checkToken();
70
71 $task = $this->getTask();
72
73 $pks = array();
74
75 if ($task == 'exportSelectedLogs')
76 {
77 // Get selected logs
78 $pks = ArrayHelper::toInteger(explode(',', $this->input->post->getString('cids')));
79 }
80
81 /** @var ActionlogsModelActionlogs $model */
82 $model = $this->getModel();
83
84 // Get the logs data
85 $data = $model->getLogDataAsIterator($pks);
86
87 if (count($data))
88 {
89
90 try
91 {
92 $rows = ActionlogsHelper::getCsvData($data);
93 }
94 catch (InvalidArgumentException $exception)
95 {
96 $this->setMessage(Text::_('COM_ACTIONLOGS_ERROR_COULD_NOT_EXPORT_DATA'), 'error');
97 $this->setRedirect(Route::_('index.php?option=com_actionlogs&view=actionlogs', false));
98
99 return;
100 }
101
102 // Destroy the iterator now
103 unset($data);
104
105 $date = new Date('now', new DateTimeZone('UTC'));
106 $filename = 'logs_' . $date->format('Y-m-d_His_T');
107
108 $csvDelimiter = ComponentHelper::getComponent('com_actionlogs')->getParams()->get('csv_delimiter', ',');
109
110 $app = Factory::getApplication();
111 $app->setHeader('Content-Type', 'application/csv', true)
112 ->setHeader('Content-Disposition', 'attachment; filename="' . $filename . '.csv"', true)
113 ->setHeader('Cache-Control', 'must-revalidate', true)
114 ->sendHeaders();
115
116 $output = fopen("php://output", "w");
117
118 foreach ($rows as $row)
119 {
120 fputcsv($output, $row, $csvDelimiter);
121 }
122
123 fclose($output);
124 $app->triggerEvent('onAfterLogExport', array());
125 $app->close();
126 }
127 else
128 {
129 $this->setMessage(Text::_('COM_ACTIONLOGS_NO_LOGS_TO_EXPORT'));
130 $this->setRedirect(Route::_('index.php?option=com_actionlogs&view=actionlogs', false));
131 }
132 }
133
134 /**
135 * Clean out the logs
136 *
137 * @return void
138 *
139 * @since 3.9.0
140 */
141 public function purge()
142 {
143 // Check for request forgeries.
144 $this->checkToken();
145
146 $model = $this->getModel();
147
148 if ($model->purge())
149 {
150 $message = Text::_('COM_ACTIONLOGS_PURGE_SUCCESS');
151 }
152 else
153 {
154 $message = Text::_('COM_ACTIONLOGS_PURGE_FAIL');
155 }
156
157 $this->setRedirect(Route::_('index.php?option=com_actionlogs&view=actionlogs', false), $message);
158 }
159 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_actionlogs
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 use Joomla\CMS\Date\Date;
13 use Joomla\CMS\Factory;
14 use Joomla\CMS\Filesystem\Path;
15 use Joomla\CMS\Language\Text;
16 use Joomla\CMS\Router\Route;
17 use Joomla\String\StringHelper;
18
19 /**
20 * Actionlogs component helper.
21 *
22 * @since 3.9.0
23 */
24 class ActionlogsHelper
25 {
26 /**
27 * Array of characters starting a formula
28 *
29 * @var array
30 * @since 3.9.7
31 */
32 private static $characters = array('=', '+', '-', '@');
33
34 /**
35 * Method to convert logs objects array to an iterable type for use with a CSV export
36 *
37 * @param array|Traversable $data The logs data objects to be exported
38 *
39 * @return array|Generator For PHP 5.5 and newer, a Generator is returned; PHP 5.4 and earlier use an array
40 *
41 * @since 3.9.0
42 * @throws InvalidArgumentException
43 */
44 public static function getCsvData($data)
45 {
46 if (!is_iterable($data))
47 {
48 throw new InvalidArgumentException(
49 sprintf(
50 '%s() requires an array or object implementing the Traversable interface, a %s was given.',
51 __METHOD__,
52 gettype($data) === 'object' ? get_class($data) : gettype($data)
53 )
54 );
55 }
56
57 if (version_compare(PHP_VERSION, '5.5', '>='))
58 {
59 // Only include the PHP 5.5 helper in this conditional to prevent the potential of parse errors for PHP 5.4 or earlier
60 JLoader::register('ActionlogsHelperPhp55', __DIR__ . '/actionlogsphp55.php');
61
62 return ActionlogsHelperPhp55::getCsvAsGenerator($data);
63 }
64
65 $disabledText = Text::_('COM_ACTIONLOGS_DISABLED');
66
67 $rows = array();
68
69 // Header row
70 $rows[] = array('Id', 'Message', 'Date', 'Extension', 'User', 'Ip');
71
72 foreach ($data as $log)
73 {
74 $date = new Date($log->log_date, new DateTimeZone('UTC'));
75 $extension = strtok($log->extension, '.');
76
77 static::loadTranslationFiles($extension);
78
79 $rows[] = array(
80 'id' => $log->id,
81 'message' => self::escapeCsvFormula(strip_tags(static::getHumanReadableLogMessage($log, false))),
82 'date' => $date->format('Y-m-d H:i:s T'),
83 'extension' => self::escapeCsvFormula(Text::_($extension)),
84 'name' => self::escapeCsvFormula($log->name),
85 'ip_address' => self::escapeCsvFormula($log->ip_address === 'COM_ACTIONLOGS_DISABLED' ? $disabledText : $log->ip_address)
86 );
87 }
88
89 return $rows;
90 }
91
92 /**
93 * Load the translation files for an extension
94 *
95 * @param string $extension Extension name
96 *
97 * @return void
98 *
99 * @since 3.9.0
100 */
101 public static function loadTranslationFiles($extension)
102 {
103 static $cache = array();
104 $extension = strtolower($extension);
105
106 if (isset($cache[$extension]))
107 {
108 return;
109 }
110
111 $lang = Factory::getLanguage();
112 $source = '';
113
114 switch (substr($extension, 0, 3))
115 {
116 case 'com':
117 default:
118 $source = JPATH_ADMINISTRATOR . '/components/' . $extension;
119 break;
120
121 case 'lib':
122 $source = JPATH_LIBRARIES . '/' . substr($extension, 4);
123 break;
124
125 case 'mod':
126 $source = JPATH_SITE . '/modules/' . $extension;
127 break;
128
129 case 'plg':
130 $parts = explode('_', $extension, 3);
131
132 if (count($parts) > 2)
133 {
134 $source = JPATH_PLUGINS . '/' . $parts[1] . '/' . $parts[2];
135 }
136 break;
137
138 case 'pkg':
139 $source = JPATH_SITE;
140 break;
141
142 case 'tpl':
143 $source = JPATH_BASE . '/templates/' . substr($extension, 4);
144 break;
145
146 }
147
148 $lang->load($extension, JPATH_ADMINISTRATOR, null, false, true)
149 || $lang->load($extension, $source, null, false, true);
150
151 if (!$lang->hasKey(strtoupper($extension)))
152 {
153 $lang->load($extension . '.sys', JPATH_ADMINISTRATOR, null, false, true)
154 || $lang->load($extension . '.sys', $source, null, false, true);
155 }
156
157 $cache[$extension] = true;
158 }
159
160 /**
161 * Get parameters to be
162 *
163 * @param string $context The context of the content
164 *
165 * @return mixed An object contains content type parameters, or null if not found
166 *
167 * @since 3.9.0
168 */
169 public static function getLogContentTypeParams($context)
170 {
171 $db = Factory::getDbo();
172 $query = $db->getQuery(true)
173 ->select('a.*')
174 ->from($db->quoteName('#__action_log_config', 'a'))
175 ->where($db->quoteName('a.type_alias') . ' = ' . $db->quote($context));
176
177 $db->setQuery($query);
178
179 return $db->loadObject();
180 }
181
182 /**
183 * Get human readable log message for a User Action Log
184 *
185 * @param stdClass $log A User Action log message record
186 * @param boolean $generateLinks Flag to disable link generation when creating a message
187 *
188 * @return string
189 *
190 * @since 3.9.0
191 */
192 public static function getHumanReadableLogMessage($log, $generateLinks = true)
193 {
194 static $links = array();
195
196 $message = Text::_($log->message_language_key);
197 $messageData = json_decode($log->message, true);
198
199 // Special handling for translation extension name
200 if (isset($messageData['extension_name']))
201 {
202 static::loadTranslationFiles($messageData['extension_name']);
203 $messageData['extension_name'] = Text::_($messageData['extension_name']);
204 }
205
206 // Translating application
207 if (isset($messageData['app']))
208 {
209 $messageData['app'] = Text::_($messageData['app']);
210 }
211
212 // Translating type
213 if (isset($messageData['type']))
214 {
215 $messageData['type'] = Text::_($messageData['type']);
216 }
217
218 $linkMode = Factory::getApplication()->get('force_ssl', 0) >= 1 ? Route::TLS_FORCE : Route::TLS_IGNORE;
219
220 foreach ($messageData as $key => $value)
221 {
222 // Convert relative url to absolute url so that it is clickable in action logs notification email
223 if ($generateLinks && StringHelper::strpos($value, 'index.php?') === 0)
224 {
225 if (!isset($links[$value]))
226 {
227 $links[$value] = Route::link('administrator', $value, false, $linkMode);
228 }
229
230 $value = $links[$value];
231 }
232
233 $message = str_replace('{' . $key . '}', $value, $message);
234 }
235
236 return $message;
237 }
238
239 /**
240 * Get link to an item of given content type
241 *
242 * @param string $component
243 * @param string $contentType
244 * @param integer $id
245 * @param string $urlVar
246 *
247 * @return string Link to the content item
248 *
249 * @since 3.9.0
250 */
251 public static function getContentTypeLink($component, $contentType, $id, $urlVar = 'id')
252 {
253 // Try to find the component helper.
254 $eName = str_replace('com_', '', $component);
255 $file = Path::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/helpers/' . $eName . '.php');
256
257 if (file_exists($file))
258 {
259 $prefix = ucfirst(str_replace('com_', '', $component));
260 $cName = $prefix . 'Helper';
261
262 JLoader::register($cName, $file);
263
264 if (class_exists($cName) && is_callable(array($cName, 'getContentTypeLink')))
265 {
266 return $cName::getContentTypeLink($contentType, $id);
267 }
268 }
269
270 if (empty($urlVar))
271 {
272 $urlVar = 'id';
273 }
274
275 // Return default link to avoid having to implement getContentTypeLink in most of our components
276 return 'index.php?option=' . $component . '&task=' . $contentType . '.edit&' . $urlVar . '=' . $id;
277 }
278
279 /**
280 * Load both enabled and disabled actionlog plugins language file.
281 *
282 * It is used to make sure actions log is displayed properly instead of only language items displayed when a plugin is disabled.
283 *
284 * @return void
285 *
286 * @since 3.9.0
287 */
288 public static function loadActionLogPluginsLanguage()
289 {
290 $lang = Factory::getLanguage();
291 $db = Factory::getDbo();
292
293 // Get all (both enabled and disabled) actionlog plugins
294 $query = $db->getQuery(true)
295 ->select(
296 $db->quoteName(
297 array(
298 'folder',
299 'element',
300 'params',
301 'extension_id'
302 ),
303 array(
304 'type',
305 'name',
306 'params',
307 'id'
308 )
309 )
310 )
311 ->from('#__extensions')
312 ->where('type = ' . $db->quote('plugin'))
313 ->where('folder = ' . $db->quote('actionlog'))
314 ->where('state IN (0,1)')
315 ->order('ordering');
316 $db->setQuery($query);
317
318 try
319 {
320 $rows = $db->loadObjectList();
321 }
322 catch (RuntimeException $e)
323 {
324 $rows = array();
325 }
326
327 if (empty($rows))
328 {
329 return;
330 }
331
332 foreach ($rows as $row)
333 {
334 $name = $row->name;
335 $type = $row->type;
336 $extension = 'Plg_' . $type . '_' . $name;
337 $extension = strtolower($extension);
338
339 // If language already loaded, don't load it again.
340 if ($lang->getPaths($extension))
341 {
342 continue;
343 }
344
345 $lang->load($extension, JPATH_ADMINISTRATOR, null, false, true)
346 || $lang->load($extension, JPATH_PLUGINS . '/' . $type . '/' . $name, null, false, true);
347 }
348
349 // Load com_privacy too.
350 $lang->load('com_privacy', JPATH_ADMINISTRATOR, null, false, true);
351 }
352
353 /**
354 * Escapes potential characters that start a formula in a CSV value to prevent injection attacks
355 *
356 * @param mixed $value csv field value
357 *
358 * @return mixed
359 *
360 * @since 3.9.7
361 */
362 protected static function escapeCsvFormula($value)
363 {
364 if ($value == '')
365 {
366 return $value;
367 }
368
369 if (in_array($value[0], self::$characters, true))
370 {
371 $value = ' ' . $value;
372 }
373
374 return $value;
375 }
376 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_actionlogs
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 use Joomla\CMS\Date\Date;
13 use Joomla\CMS\Language\Text;
14
15 /**
16 * Actionlogs component helper for newer PHP versions.
17 *
18 * This file should only be included in environments running PHP 5.5 or newer and may potentially cause a parse error on older versions.
19 *
20 * @since 3.9.0
21 * @deprecated Will be inlined back into ActionlogsHelper when PHP 5.5 or newer is the minimum supported PHP version
22 * @internal
23 */
24 class ActionlogsHelperPhp55
25 {
26 /**
27 * Array of characters starting a formula
28 *
29 * @var array
30 * @since 3.9.7
31 */
32 private static $characters = array('=', '+', '-', '@');
33
34 /**
35 * Method to convert logs objects array to a Generator for use with a CSV export
36 *
37 * @param array|Traversable $data The logs data objects to be exported
38 *
39 * @return Generator
40 *
41 * @since 3.9.0
42 * @throws InvalidArgumentException
43 */
44 public static function getCsvAsGenerator($data)
45 {
46 if (!is_iterable($data))
47 {
48 throw new InvalidArgumentException(
49 sprintf(
50 '%s() requires an array or object implementing the Traversable interface, a %s was given.',
51 __METHOD__,
52 gettype($data) === 'object' ? get_class($data) : gettype($data)
53 )
54 );
55 }
56
57 $disabledText = Text::_('COM_ACTIONLOGS_DISABLED');
58
59 // Header row
60 yield array('Id', 'Message', 'Date', 'Extension', 'User', 'Ip');
61
62 foreach ($data as $log)
63 {
64 $extension = strtok($log->extension, '.');
65
66 ActionlogsHelper::loadTranslationFiles($extension);
67
68 yield array(
69 'id' => $log->id,
70 'message' => self::escapeCsvFormula(strip_tags(ActionlogsHelper::getHumanReadableLogMessage($log, false))),
71 'date' => (new Date($log->log_date, new DateTimeZone('UTC')))->format('Y-m-d H:i:s T'),
72 'extension' => self::escapeCsvFormula(Text::_($extension)),
73 'name' => self::escapeCsvFormula($log->name),
74 'ip_address' => self::escapeCsvFormula($log->ip_address === 'COM_ACTIONLOGS_DISABLED' ? $disabledText : $log->ip_address)
75 );
76 }
77 }
78
79 /**
80 * Escapes potential characters that start a formula in a CSV value to prevent injection attacks
81 *
82 * @param mixed $value csv field value
83 *
84 * @return mixed
85 *
86 * @since 3.9.7
87 */
88 protected static function escapeCsvFormula($value)
89 {
90 if ($value == '')
91 {
92 return $value;
93 }
94
95 if (in_array($value[0], self::$characters, true))
96 {
97 $value = ' ' . $value;
98 }
99
100 return $value;
101 }
102 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_actionlogs
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 use Joomla\CMS\Factory;
13 use Joomla\CMS\HTML\HTMLHelper;
14 use Joomla\CMS\Language\Text;
15
16 Factory::getLanguage()->load("com_actionlogs", JPATH_ADMINISTRATOR, null, false, true);
17
18 $messages = $displayData['messages'];
19 $showIpColumn = $displayData['showIpColumn'];
20 ?>
21 <h1>
22 <?php echo Text::_('COM_ACTIONLOGS_EMAIL_SUBJECT'); ?>
23 </h1>
24 <h2>
25 <?php echo Text::_('COM_ACTIONLOGS_EMAIL_DESC'); ?>
26 </h2>
27 <table>
28 <thead>
29 <th><?php echo Text::_('COM_ACTIONLOGS_ACTION'); ?></th>
30 <th><?php echo Text::_('COM_ACTIONLOGS_DATE'); ?></th>
31 <th><?php echo Text::_('COM_ACTIONLOGS_EXTENSION'); ?></th>
32 <th><?php echo Text::_('COM_ACTIONLOGS_NAME'); ?></th>
33 <?php if ($showIpColumn) : ?>
34 <th><?php echo Text::_('COM_ACTIONLOGS_IP_ADDRESS'); ?></th>
35 <?php endif; ?>
36 </thead>
37 <tbody>
38 <?php foreach ($messages as $message) : ?>
39 <tr>
40 <td><?php echo $message->message; ?></td>
41 <td><?php echo HTMLHelper::_('date', $message->log_date, 'Y-m-d H:i:s T', 'UTC'); ?></td>
42 <td><?php echo $message->extension; ?></td>
43 <td><?php echo $displayData['username']; ?></td>
44 <?php if ($showIpColumn) : ?>
45 <td><?php echo Text::_($message->ip_address); ?></td>
46 <?php endif; ?>
47 </tr>
48 <?php endforeach; ?>
49 </tbody>
50 </table>
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_actionlogs
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9 defined('_JEXEC') or die;
10
11 use Joomla\CMS\Factory;
12 use Joomla\CMS\MVC\Model\BaseDatabaseModel;
13
14 BaseDatabaseModel::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_actionlogs/models', 'ActionlogsModel');
15
16 /**
17 * Abstract Action Log Plugin
18 *
19 * @since 3.9.0
20 */
21 abstract class ActionLogPlugin extends JPlugin
22 {
23 /**
24 * Application object.
25 *
26 * @var JApplicationCms
27 * @since 3.9.0
28 */
29 protected $app;
30
31 /**
32 * Database object.
33 *
34 * @var JDatabaseDriver
35 * @since 3.9.0
36 */
37 protected $db;
38
39 /**
40 * Load plugin language file automatically so that it can be used inside component
41 *
42 * @var boolean
43 * @since 3.9.0
44 */
45 protected $autoloadLanguage = true;
46
47 /**
48 * Proxy for ActionlogsModelUserlog addLog method
49 *
50 * This method adds a record to #__action_logs contains (message_language_key, message, date, context, user)
51 *
52 * @param array $messages The contents of the messages to be logged
53 * @param string $messageLanguageKey The language key of the message
54 * @param string $context The context of the content passed to the plugin
55 * @param int $userId ID of user perform the action, usually ID of current logged in user
56 *
57 * @return void
58 *
59 * @since 3.9.0
60 */
61 protected function addLog($messages, $messageLanguageKey, $context, $userId = null)
62 {
63 $user = Factory::getUser();
64
65 foreach ($messages as $index => $message)
66 {
67 if (!array_key_exists('userid', $message))
68 {
69 $message['userid'] = $user->id;
70 }
71
72 if (!array_key_exists('username', $message))
73 {
74 $message['username'] = $user->username;
75 }
76
77 if (!array_key_exists('accountlink', $message))
78 {
79 $message['accountlink'] = 'index.php?option=com_users&task=user.edit&id=' . $user->id;
80 }
81
82 if (array_key_exists('type', $message))
83 {
84 $message['type'] = strtoupper($message['type']);
85 }
86
87 if (array_key_exists('app', $message))
88 {
89 $message['app'] = strtoupper($message['app']);
90 }
91
92 $messages[$index] = $message;
93 }
94
95 /** @var ActionlogsModelActionlog $model **/
96 $model = BaseDatabaseModel::getInstance('Actionlog', 'ActionlogsModel');
97 $model->addLog($messages, strtoupper($messageLanguageKey), $context, $userId);
98 }
99 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_actionlogs
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 use Joomla\CMS\Component\ComponentHelper;
13 use Joomla\CMS\Factory;
14 use Joomla\CMS\Language\Text;
15 use Joomla\CMS\Layout\FileLayout;
16 use Joomla\Utilities\IpHelper;
17
18 JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');
19
20 /**
21 * Methods supporting a list of Actionlog records.
22 *
23 * @since 3.9.0
24 */
25 class ActionlogsModelActionlog extends JModelLegacy
26 {
27 /**
28 * Function to add logs to the database
29 * This method adds a record to #__action_logs contains (message_language_key, message, date, context, user)
30 *
31 * @param array $messages The contents of the messages to be logged
32 * @param string $messageLanguageKey The language key of the message
33 * @param string $context The context of the content passed to the plugin
34 * @param integer $userId ID of user perform the action, usually ID of current logged in user
35 *
36 * @return void
37 *
38 * @since 3.9.0
39 */
40 public function addLog($messages, $messageLanguageKey, $context, $userId = null)
41 {
42 $user = Factory::getUser($userId);
43 $db = $this->getDbo();
44 $date = Factory::getDate();
45 $params = ComponentHelper::getComponent('com_actionlogs')->getParams();
46
47 if ($params->get('ip_logging', 0))
48 {
49 $ip = IpHelper::getIp();
50
51 if (!filter_var($ip, FILTER_VALIDATE_IP))
52 {
53 $ip = 'COM_ACTIONLOGS_IP_INVALID';
54 }
55 }
56 else
57 {
58 $ip = 'COM_ACTIONLOGS_DISABLED';
59 }
60
61 $loggedMessages = array();
62
63 foreach ($messages as $message)
64 {
65 $logMessage = new stdClass;
66 $logMessage->message_language_key = $messageLanguageKey;
67 $logMessage->message = json_encode($message);
68 $logMessage->log_date = (string) $date;
69 $logMessage->extension = $context;
70 $logMessage->user_id = $user->id;
71 $logMessage->ip_address = $ip;
72 $logMessage->item_id = isset($message['id']) ? (int) $message['id'] : 0;
73
74 try
75 {
76 $db->insertObject('#__action_logs', $logMessage);
77 $loggedMessages[] = $logMessage;
78 }
79 catch (RuntimeException $e)
80 {
81 // Ignore it
82 }
83 }
84
85 // Send notification email to users who choose to be notified about the action logs
86 $this->sendNotificationEmails($loggedMessages, $user->name, $context);
87 }
88
89 /**
90 * Send notification emails about the action log
91 *
92 * @param array $messages The logged messages
93 * @param string $username The username
94 * @param string $context The Context
95 *
96 * @return void
97 *
98 * @since 3.9.0
99 */
100 protected function sendNotificationEmails($messages, $username, $context)
101 {
102 $db = $this->getDbo();
103 $query = $db->getQuery(true);
104 $params = ComponentHelper::getParams('com_actionlogs');
105 $showIpColumn = (bool) $params->get('ip_logging', 0);
106
107 $query
108 ->select($db->quoteName(array('u.email', 'l.extensions')))
109 ->from($db->quoteName('#__users', 'u'))
110 ->join(
111 'INNER',
112 $db->quoteName('#__action_logs_users', 'l') . ' ON ( ' . $db->quoteName('l.notify') . ' = 1 AND '
113 . $db->quoteName('l.user_id') . ' = ' . $db->quoteName('u.id') . ')'
114 );
115
116 $db->setQuery($query);
117
118 try
119 {
120 $users = $db->loadObjectList();
121 }
122 catch (RuntimeException $e)
123 {
124 JError::raiseWarning(500, $e->getMessage());
125
126 return;
127 }
128
129 $recipients = array();
130
131 foreach ($users as $user)
132 {
133 $extensions = json_decode($user->extensions, true);
134
135 if ($extensions && in_array(strtok($context, '.'), $extensions))
136 {
137 $recipients[] = $user->email;
138 }
139 }
140
141 if (empty($recipients))
142 {
143 return;
144 }
145
146 $layout = new FileLayout('components.com_actionlogs.layouts.logstable', JPATH_ADMINISTRATOR);
147 $extension = strtok($context, '.');
148 ActionlogsHelper::loadTranslationFiles($extension);
149
150 foreach ($messages as $message)
151 {
152 $message->extension = Text::_($extension);
153 $message->message = ActionlogsHelper::getHumanReadableLogMessage($message);
154 }
155
156 $displayData = array(
157 'messages' => $messages,
158 'username' => $username,
159 'showIpColumn' => $showIpColumn,
160 );
161
162 $body = $layout->render($displayData);
163 $mailer = Factory::getMailer();
164 $mailer->addRecipient($recipients);
165 $mailer->setSubject(Text::_('COM_ACTIONLOGS_EMAIL_SUBJECT'));
166 $mailer->isHTML(true);
167 $mailer->Encoding = 'base64';
168 $mailer->setBody($body);
169
170 if (!$mailer->Send())
171 {
172 JError::raiseWarning(500, Text::_('JERROR_SENDING_EMAIL'));
173 }
174 }
175 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_actionlogs
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 use Joomla\CMS\Component\ComponentHelper;
13 use Joomla\CMS\Date\Date;
14 use Joomla\CMS\Factory;
15 use Joomla\CMS\Language\Text;
16 use Joomla\Utilities\ArrayHelper;
17
18 /**
19 * Methods supporting a list of article records.
20 *
21 * @since 3.9.0
22 */
23 class ActionlogsModelActionlogs extends JModelList
24 {
25 /**
26 * Constructor.
27 *
28 * @param array $config An optional associative array of configuration settings.
29 *
30 * @since 3.9.0
31 */
32 public function __construct($config = array())
33 {
34 if (empty($config['filter_fields']))
35 {
36 $config['filter_fields'] = array(
37 'a.id', 'id',
38 'a.extension', 'extension',
39 'a.user_id', 'user',
40 'a.message', 'message',
41 'a.log_date', 'log_date',
42 'a.ip_address', 'ip_address',
43 'dateRange',
44 );
45 }
46
47 parent::__construct($config);
48 }
49
50 /**
51 * Method to auto-populate the model state.
52 *
53 * @return void
54 *
55 * @since 3.9.0
56 */
57 protected function populateState($ordering = 'a.id', $direction = 'desc')
58 {
59 $app = Factory::getApplication();
60
61 $search = $app->getUserStateFromRequest($this->context . 'filter.search', 'filter_search', '', 'string');
62 $this->setState('filter.search', $search);
63
64 $user = $app->getUserStateFromRequest($this->context . 'filter.user', 'filter_user', '', 'string');
65 $this->setState('filter.user', $user);
66
67 $extension = $app->getUserStateFromRequest($this->context . 'filter.extension', 'filter_extension', '', 'string');
68 $this->setState('filter.extension', $extension);
69
70 $ip_address = $app->getUserStateFromRequest($this->context . 'filter.ip_address', 'filter_ip_address', '', 'string');
71 $this->setState('filter.ip_address', $ip_address);
72
73 $dateRange = $app->getUserStateFromRequest($this->context . 'filter.dateRange', 'filter_dateRange', '', 'string');
74 $this->setState('filter.dateRange', $dateRange);
75
76 parent::populateState($ordering, $direction);
77 }
78
79 /**
80 * Build an SQL query to load the list data.
81 *
82 * @return JDatabaseQuery
83 *
84 * @since 3.9.0
85 */
86 protected function getListQuery()
87 {
88 $db = $this->getDbo();
89 $query = $db->getQuery(true)
90 ->select('a.*, u.name')
91 ->from('#__action_logs AS a')
92 ->leftJoin('#__users AS u ON a.user_id = u.id');
93
94 // Get ordering
95 $fullorderCol = $this->state->get('list.fullordering', 'a.id DESC');
96
97 // Apply ordering
98 if (!empty($fullorderCol))
99 {
100 $query->order($db->escape($fullorderCol));
101 }
102
103 // Get filter by user
104 $user = $this->getState('filter.user');
105
106 // Apply filter by user
107 if (!empty($user))
108 {
109 $query->where($db->quoteName('a.user_id') . ' = ' . (int) $user);
110 }
111
112 // Get filter by extension
113 $extension = $this->getState('filter.extension');
114
115 // Apply filter by extension
116 if (!empty($extension))
117 {
118 $query->where($db->quoteName('a.extension') . ' LIKE ' . $db->quote($extension . '%'));
119 }
120
121 // Get filter by date range
122 $dateRange = $this->getState('filter.dateRange');
123
124 // Apply filter by date range
125 if (!empty($dateRange))
126 {
127 $date = $this->buildDateRange($dateRange);
128
129 // If the chosen range is not more than a year ago
130 if ($date['dNow'] != false)
131 {
132 $query->where(
133 $db->qn('a.log_date') . ' >= ' . $db->quote($date['dStart']->format('Y-m-d H:i:s')) .
134 ' AND ' . $db->qn('a.log_date') . ' <= ' . $db->quote($date['dNow']->format('Y-m-d H:i:s'))
135 );
136 }
137 }
138
139 // Filter the items over the search string if set.
140 $search = $this->getState('filter.search');
141
142 if (!empty($search))
143 {
144 if (stripos($search, 'id:') === 0)
145 {
146 $query->where($db->quoteName('a.id') . ' = ' . (int) substr($search, 3));
147 }
148 elseif (stripos($search, 'item_id:') === 0)
149 {
150 $query->where($db->quoteName('a.item_id') . ' = ' . (int) substr($search, 8));
151 }
152 else
153 {
154 $search = $db->quote('%' . $db->escape($search, true) . '%');
155 $query->where('(' . $db->quoteName('u.username') . ' LIKE ' . $search . ')');
156 }
157 }
158
159 return $query;
160 }
161
162 /**
163 * Construct the date range to filter on.
164 *
165 * @param string $range The textual range to construct the filter for.
166 *
167 * @return array The date range to filter on.
168 *
169 * @since 3.9.0
170 */
171 private function buildDateRange($range)
172 {
173 // Get UTC for now.
174 $dNow = new Date;
175 $dStart = clone $dNow;
176
177 switch ($range)
178 {
179 case 'past_week':
180 $dStart->modify('-7 day');
181 break;
182
183 case 'past_1month':
184 $dStart->modify('-1 month');
185 break;
186
187 case 'past_3month':
188 $dStart->modify('-3 month');
189 break;
190
191 case 'past_6month':
192 $dStart->modify('-6 month');
193 break;
194
195 case 'past_year':
196 $dStart->modify('-1 year');
197 break;
198
199 case 'today':
200 // Ranges that need to align with local 'days' need special treatment.
201 $offset = Factory::getApplication()->get('offset');
202
203 // Reset the start time to be the beginning of today, local time.
204 $dStart = new Date('now', $offset);
205 $dStart->setTime(0, 0, 0);
206
207 // Now change the timezone back to UTC.
208 $tz = new DateTimeZone('GMT');
209 $dStart->setTimezone($tz);
210 break;
211 }
212
213 return array('dNow' => $dNow, 'dStart' => $dStart);
214 }
215
216 /**
217 * Get all log entries for an item
218 *
219 * @param string $extension The extension the item belongs to
220 * @param integer $itemId The item ID
221 *
222 * @return array
223 *
224 * @since 3.9.0
225 */
226 public function getLogsForItem($extension, $itemId)
227 {
228 $db = $this->getDbo();
229 $query = $db->getQuery(true)
230 ->select('a.*, u.name')
231 ->from('#__action_logs AS a')
232 ->innerJoin('#__users AS u ON a.user_id = u.id')
233 ->where($db->quoteName('a.extension') . ' = ' . $db->quote($extension))
234 ->where($db->quoteName('a.item_id') . ' = ' . (int) $itemId);
235
236 // Get ordering
237 $fullorderCol = $this->getState('list.fullordering', 'a.id DESC');
238
239 // Apply ordering
240 if (!empty($fullorderCol))
241 {
242 $query->order($db->escape($fullorderCol));
243 }
244
245 $db->setQuery($query);
246
247 return $db->loadObjectList();
248 }
249
250 /**
251 * Get logs data into JTable object
252 *
253 * @param integer[]|null $pks An optional array of log record IDs to load
254 *
255 * @return array All logs in the table
256 *
257 * @since 3.9.0
258 */
259 public function getLogsData($pks = null)
260 {
261 $db = $this->getDbo();
262 $query = $this->getLogDataQuery($pks);
263
264 $db->setQuery($query);
265
266 return $db->loadObjectList();
267 }
268
269 /**
270 * Get logs data as a database iterator
271 *
272 * @param integer[]|null $pks An optional array of log record IDs to load
273 *
274 * @return JDatabaseIterator
275 *
276 * @since 3.9.0
277 */
278 public function getLogDataAsIterator($pks = null)
279 {
280 $db = $this->getDbo();
281 $query = $this->getLogDataQuery($pks);
282
283 $db->setQuery($query);
284
285 return $db->getIterator();
286 }
287
288 /**
289 * Get the query for loading logs data
290 *
291 * @param integer[]|null $pks An optional array of log record IDs to load
292 *
293 * @return JDatabaseQuery
294 *
295 * @since 3.9.0
296 */
297 private function getLogDataQuery($pks = null)
298 {
299 $db = $this->getDbo();
300 $query = $db->getQuery(true)
301 ->select('a.*, u.name')
302 ->from('#__action_logs AS a')
303 ->innerJoin('#__users AS u ON a.user_id = u.id');
304
305 if (is_array($pks) && count($pks) > 0)
306 {
307 $query->where($db->quoteName('a.id') . ' IN (' . implode(',', ArrayHelper::toInteger($pks)) . ')');
308 }
309
310 return $query;
311 }
312
313 /**
314 * Delete logs
315 *
316 * @param array $pks Primary keys of logs
317 *
318 * @return boolean
319 *
320 * @since 3.9.0
321 */
322 public function delete(&$pks)
323 {
324 $db = $this->getDbo();
325 $query = $db->getQuery(true)
326 ->delete($db->quoteName('#__action_logs'))
327 ->where($db->quoteName('id') . ' IN (' . implode(',', ArrayHelper::toInteger($pks)) . ')');
328 $db->setQuery($query);
329
330 try
331 {
332 $db->execute();
333 }
334 catch (RuntimeException $e)
335 {
336 $this->setError($e->getMessage());
337
338 return false;
339 }
340
341 Factory::getApplication()->triggerEvent('onAfterLogPurge', array());
342
343 return true;
344 }
345
346 /**
347 * Removes all of logs from the table.
348 *
349 * @return boolean result of operation
350 *
351 * @since 3.9.0
352 */
353 public function purge()
354 {
355 try
356 {
357 $this->getDbo()->truncateTable('#__action_logs');
358 }
359 catch (Exception $e)
360 {
361 return false;
362 }
363
364 Factory::getApplication()->triggerEvent('onAfterLogPurge', array());
365
366 return true;
367 }
368
369 /**
370 * Get the filter form
371 *
372 * @param array $data data
373 * @param boolean $loadData load current data
374 *
375 * @return \JForm|boolean The \JForm object or false on error
376 *
377 * @since 3.9.0
378 */
379 public function getFilterForm($data = array(), $loadData = true)
380 {
381 $form = parent::getFilterForm($data, $loadData);
382 $params = ComponentHelper::getParams('com_actionlogs');
383 $ipLogging = (bool) $params->get('ip_logging', 0);
384
385 // Add ip sort options to sort dropdown
386 if ($form && $ipLogging)
387 {
388 /* @var JFormFieldList $field */
389 $field = $form->getField('fullordering', 'list');
390 $field->addOption(Text::_('COM_ACTIONLOGS_IP_ADDRESS_ASC'), array('value' => 'a.ip_address ASC'));
391 $field->addOption(Text::_('COM_ACTIONLOGS_IP_ADDRESS_DESC'), array('value' => 'a.ip_address DESC'));
392 }
393
394 return $form;
395 }
396 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_actionlogs
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 use Joomla\CMS\Factory;
13 use Joomla\CMS\Form\FormHelper;
14 use Joomla\CMS\HTML\HTMLHelper;
15 use Joomla\CMS\Language\Text;
16
17 FormHelper::loadFieldClass('list');
18 JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');
19
20 /**
21 * Field to load a list of all extensions that have logged actions
22 *
23 * @since 3.9.0
24 */
25 class JFormFieldExtension extends JFormFieldList
26 {
27 /**
28 * The form field type.
29 *
30 * @var string
31 * @since 3.9.0
32 */
33 protected $type = 'extension';
34
35 /**
36 * Method to get the options to populate list
37 *
38 * @return array The field option objects.
39 *
40 * @since 3.9.0
41 */
42 public function getOptions()
43 {
44 $db = Factory::getDbo();
45 $query = $db->getQuery(true)
46 ->select('DISTINCT ' . $db->quoteName('extension'))
47 ->from($db->quoteName('#__action_logs'))
48 ->order($db->quoteName('extension'));
49
50 $db->setQuery($query);
51 $context = $db->loadColumn();
52
53 $options = array();
54
55 if (count($context) > 0)
56 {
57 foreach ($context as $item)
58 {
59 $extensions[] = strtok($item, '.');
60 }
61
62 $extensions = array_unique($extensions);
63
64 foreach ($extensions as $extension)
65 {
66 ActionlogsHelper::loadTranslationFiles($extension);
67 $options[] = HTMLHelper::_('select.option', $extension, Text::_($extension));
68 }
69 }
70
71 return array_merge(parent::getOptions(), $options);
72 }
73 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_actionlogs
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 use Joomla\CMS\Factory;
13 use Joomla\CMS\Form\FormHelper;
14
15 FormHelper::loadFieldClass('list');
16
17 /**
18 * Field to load a list of all users that have logged actions
19 *
20 * @since 3.9.0
21 */
22 class JFormFieldLogCreator extends JFormFieldList
23 {
24 /**
25 * The form field type.
26 *
27 * @var string
28 * @since 3.9.0
29 */
30 protected $type = 'LogCreator';
31
32 /**
33 * Cached array of the category items.
34 *
35 * @var array
36 * @since 3.9.0
37 */
38 protected static $options = array();
39
40 /**
41 * Method to get the options to populate list
42 *
43 * @return array The field option objects.
44 *
45 * @since 3.9.0
46 */
47 protected function getOptions()
48 {
49 // Accepted modifiers
50 $hash = md5($this->element);
51
52 if (!isset(static::$options[$hash]))
53 {
54 static::$options[$hash] = parent::getOptions();
55
56 $options = array();
57
58 $db = Factory::getDbo();
59
60 // Construct the query
61 $query = $db->getQuery(true)
62 ->select($db->quoteName('u.id', 'value'))
63 ->select($db->quoteName('u.username', 'text'))
64 ->from($db->quoteName('#__users', 'u'))
65 ->join('INNER', $db->quoteName('#__action_logs', 'c') . ' ON ' . $db->quoteName('c.user_id') . ' = ' . $db->quoteName('u.id'))
66 ->group($db->quoteName('u.id'))
67 ->group($db->quoteName('u.username'))
68 ->order($db->quoteName('u.username'));
69
70 // Setup the query
71 $db->setQuery($query);
72
73 // Return the result
74 if ($options = $db->loadObjectList())
75 {
76 static::$options[$hash] = array_merge(static::$options[$hash], $options);
77 }
78 }
79
80 return static::$options[$hash];
81 }
82 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_actionlogs
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 use Joomla\CMS\Factory;
13 use Joomla\CMS\Form\FormHelper;
14
15 FormHelper::loadFieldClass('predefinedlist');
16
17 /**
18 * Field to show a list of range dates to sort with
19 *
20 * @since 3.9.0
21 */
22 class JFormFieldLogsDateRange extends JFormFieldPredefinedList
23 {
24 /**
25 * The form field type.
26 *
27 * @var string
28 * @since 3.9.0
29 */
30 protected $type = 'logsdaterange';
31
32 /**
33 * Available options
34 *
35 * @var array
36 * @since 3.9.0
37 */
38 protected $predefinedOptions = array(
39 'today' => 'COM_ACTIONLOGS_OPTION_RANGE_TODAY',
40 'past_week' => 'COM_ACTIONLOGS_OPTION_RANGE_PAST_WEEK',
41 'past_1month' => 'COM_ACTIONLOGS_OPTION_RANGE_PAST_1MONTH',
42 'past_3month' => 'COM_ACTIONLOGS_OPTION_RANGE_PAST_3MONTH',
43 'past_6month' => 'COM_ACTIONLOGS_OPTION_RANGE_PAST_6MONTH',
44 'past_year' => 'COM_ACTIONLOGS_OPTION_RANGE_PAST_YEAR',
45 );
46
47 /**
48 * Method to instantiate the form field object.
49 *
50 * @param JForm $form The form to attach to the form field object.
51 *
52 * @since 3.9.0
53 */
54 public function __construct($form = null)
55 {
56 parent::__construct($form);
57
58 // Load the required language
59 $lang = Factory::getLanguage();
60 $lang->load('com_actionlogs', JPATH_ADMINISTRATOR);
61 }
62 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage System.actionlogs
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 use Joomla\CMS\Application\ApplicationHelper;
13 use Joomla\CMS\Factory;
14 use Joomla\CMS\Form\FormHelper;
15 use Joomla\CMS\HTML\HTMLHelper;
16 use Joomla\CMS\Language\Text;
17
18 FormHelper::loadFieldClass('checkboxes');
19 JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');
20
21 /**
22 * Field to load a list of all users that have logged actions
23 *
24 * @since 3.9.0
25 */
26 class JFormFieldLogType extends JFormFieldCheckboxes
27 {
28 /**
29 * The form field type.
30 *
31 * @var string
32 * @since 3.9.0
33 */
34 protected $type = 'LogType';
35
36 /**
37 * Method to get the field options.
38 *
39 * @return array The field option objects.
40 *
41 * @since 3.9.0
42 */
43 public function getOptions()
44 {
45 $db = Factory::getDbo();
46 $query = $db->getQuery(true)
47 ->select($db->quoteName('extension'))
48 ->from($db->quoteName('#__action_logs_extensions'));
49
50 $extensions = $db->setQuery($query)->loadColumn();
51
52 $options = array();
53 $tmp = array('checked' => true);
54
55 foreach ($extensions as $extension)
56 {
57 ActionlogsHelper::loadTranslationFiles($extension);
58 $option = HTMLHelper::_('select.option', $extension, Text::_($extension));
59 $options[ApplicationHelper::stringURLSafe(Text::_($extension)) . '_' . $extension] = (object) array_merge($tmp, (array) $option);
60 }
61
62 ksort($options);
63
64 return array_merge(parent::getOptions(), array_values($options));
65 }
66 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_actionlogs
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('JPATH_BASE') or die;
11
12 /**
13 * Information field.
14 *
15 * @since 3.9.2
16 */
17 class JFormFieldPluginInfo extends JFormField
18 {
19 /**
20 * The form field type.
21 *
22 * @var string
23 * @since 3.9.2
24 */
25 protected $type = 'PluginInfo';
26
27 /**
28 * Method to get the field input markup.
29 *
30 * @return string The field input markup.
31 *
32 * @since 3.9.2
33 */
34 protected function getInput()
35 {
36 $db = JFactory::getDbo();
37 $result = null;
38 $query = $db->getQuery(true)
39 ->select($db->quoteName('extension_id'))
40 ->from($db->quoteName('#__extensions'))
41 ->where($db->quoteName('folder') . ' = ' . $db->quote('actionlog'))
42 ->where($db->quoteName('element') . ' = ' . $db->quote('joomla'));
43 $db->setQuery($query);
44
45 try
46 {
47 $result = (int) $db->loadResult();
48 }
49 catch (RuntimeException $e)
50 {
51 JError::raiseWarning(500, $e->getMessage());
52 }
53
54 $link = JHtml::_(
55 'link',
56 JRoute::_('index.php?option=com_plugins&task=plugin.edit&extension_id=' . $result),
57 JText::_('PLG_SYSTEM_ACTIONLOGS_JOOMLA_ACTIONLOG_DISABLED'),
58 array('class' => 'alert-link')
59 );
60
61 return '<div class="alert alert-info">'
62 . JText::sprintf('PLG_SYSTEM_ACTIONLOGS_JOOMLA_ACTIONLOG_DISABLED_REDIRECT', $link)
63 . '</div>';
64 }
65 }
1 <?xml version="1.0" encoding="UTF-8"?>
2 <form>
3 <fields name="filter">
4 <field
5 name="search"
6 type="text"
7 description="COM_ACTIONLOGS_FILTER_SEARCH_DESC"
8 hint="JSEARCH_FILTER"
9 />
10 <field
11 name="extension"
12 type="extension"
13 label="COM_ACTIONLOGS_EXTENSION"
14 description="COM_ACTIONLOGS_EXTENSION_FILTER_DESC"
15 onchange="this.form.submit()"
16 >
17 <option value="">COM_ACTIONLOGS_SELECT_EXTENSION</option>
18 </field>
19 <field
20 name="dateRange"
21 type="logsdaterange"
22 label="COM_ACTIONLOGS_OPTION_FILTER_DATE"
23 description="COM_ACTIONLOGS_OPTION_FILTER_DATE"
24 onchange="this.form.submit();"
25 >
26 <option value="">COM_ACTIONLOGS_OPTION_FILTER_DATE</option>
27 </field>
28 <field
29 name="user"
30 type="logcreator"
31 onchange="this.form.submit();"
32 >
33 <option value="">COM_ACTIONLOGS_SELECT_USER</option>
34 </field>
35 </fields>
36 <fields name="list">
37 <field
38 name="fullordering"
39 type="list"
40 label="COM_ACTIONLOGS_LIST_FULL_ORDERING"
41 description="COM_ACTIONLOGS_LIST_FULL_ORDERING_DESC"
42 onchange="this.form.submit();"
43 default="a.id DESC"
44 validate="options"
45 >
46 <option value="">JGLOBAL_SORT_BY</option>
47 <option value="a.message ASC">COM_ACTIONLOGS_ACTION_ASC</option>
48 <option value="a.message DESC">COM_ACTIONLOGS_ACTION_DESC</option>
49 <option value="a.extension ASC">COM_ACTIONLOGS_EXTENSION_ASC</option>
50 <option value="a.extension DESC">COM_ACTIONLOGS_EXTENSION_DESC</option>
51 <option value="a.log_date ASC">JDATE_ASC</option>
52 <option value="a.log_date DESC">JDATE_DESC</option>
53 <option value="a.user_id ASC">COM_ACTIONLOGS_NAME_ASC</option>
54 <option value="a.user_id DESC">COM_ACTIONLOGS_NAME_DESC</option>
55 <option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
56 <option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
57 </field>
58 </fields>
59 <fields name="list">
60 <field
61 name="limit"
62 type="limitbox"
63 label="COM_ACTIONLOGS_LIST_LIMIT"
64 description="COM_ACTIONLOGS_LIST_LIMIT_DESC"
65 class="input-mini"
66 onchange="this.form.submit();"
67 default="25"
68 />
69 </fields>
70 </form>
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_actionlogs
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 use Joomla\CMS\Factory;
13 use Joomla\CMS\HTML\HTMLHelper;
14 use Joomla\CMS\Language\Text;
15 use Joomla\CMS\Layout\LayoutHelper;
16 use Joomla\CMS\Router\Route;
17
18 /** @var ActionlogsViewActionlogs $this */
19
20 JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');
21
22 HTMLHelper::_('bootstrap.tooltip');
23 HTMLHelper::_('behavior.multiselect');
24 HTMLHelper::_('formbehavior.chosen', 'select');
25
26 $listOrder = $this->escape($this->state->get('list.ordering'));
27 $listDirn = $this->escape($this->state->get('list.direction'));
28
29 Factory::getDocument()->addScriptDeclaration('
30 Joomla.submitbutton = function(task)
31 {
32 if (task == "actionlogs.exportLogs")
33 {
34 Joomla.submitform(task, document.getElementById("exportForm"));
35
36 return;
37 }
38
39 if (task == "actionlogs.exportSelectedLogs")
40 {
41 // Get id of selected action logs item and pass it to export form hidden input
42 var cids = [];
43
44 jQuery("input[name=\'cid[]\']:checked").each(function() {
45 cids.push(jQuery(this).val());
46 });
47
48 document.exportForm.cids.value = cids.join(",");
49 Joomla.submitform(task, document.getElementById("exportForm"));
50
51 return;
52 }
53
54 Joomla.submitform(task);
55 };
56 ');
57 ?>
58 <form action="<?php echo Route::_('index.php?option=com_actionlogs&view=actionlogs'); ?>" method="post" name="adminForm" id="adminForm">
59 <div id="j-main-container">
60 <?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
61 <?php if (empty($this->items)) : ?>
62 <div class="alert alert-no-items">
63 <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
64 </div>
65 <?php else : ?>
66 <table class="table table-striped table-hover" id="logsList">
67 <thead>
68 <th width="1%" class="center">
69 <?php echo HTMLHelper::_('grid.checkall'); ?>
70 </th>
71 <th>
72 <?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_ACTION', 'a.message', $listDirn, $listOrder); ?>
73 </th>
74 <th width="15%" class="nowrap">
75 <?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_EXTENSION', 'a.extension', $listDirn, $listOrder); ?>
76 </th>
77 <th width="15%" class="nowrap">
78 <?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_DATE', 'a.log_date', $listDirn, $listOrder); ?>
79 </th>
80 <th width="10%" class="nowrap">
81 <?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_NAME', 'a.user_id', $listDirn, $listOrder); ?>
82 </th>
83 <?php if ($this->showIpColumn) : ?>
84 <th width="10%" class="nowrap">
85 <?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_IP_ADDRESS', 'a.ip_address', $listDirn, $listOrder); ?>
86 </th>
87 <?php endif; ?>
88 <th width="1%" class="nowrap hidden-phone">
89 <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
90 </th>
91 </thead>
92 <tfoot>
93 <tr>
94 <td colspan="7">
95 <?php echo $this->pagination->getListFooter(); ?>
96 </td>
97 </tr>
98 </tfoot>
99 <tbody>
100 <?php foreach ($this->items as $i => $item) :
101 $extension = strtok($item->extension, '.');
102 ActionlogsHelper::loadTranslationFiles($extension); ?>
103 <tr class="row<?php echo $i % 2; ?>">
104 <td class="center">
105 <?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
106 </td>
107 <td>
108 <?php echo ActionlogsHelper::getHumanReadableLogMessage($item); ?>
109 </td>
110 <td>
111 <?php echo $this->escape(Text::_($extension)); ?>
112 </td>
113 <td>
114 <span class="hasTooltip" title="<?php echo HTMLHelper::_('date', $item->log_date, Text::_('DATE_FORMAT_LC6')); ?>">
115 <?php echo HTMLHelper::_('date.relative', $item->log_date); ?>
116 </span>
117 </td>
118 <td>
119 <?php echo $item->name; ?>
120 </td>
121 <?php if ($this->showIpColumn) : ?>
122 <td>
123 <?php echo Text::_($this->escape($item->ip_address)); ?>
124 </td>
125 <?php endif;?>
126 <td class="hidden-phone">
127 <?php echo (int) $item->id; ?>
128 </td>
129 </tr>
130 <?php endforeach; ?>
131 </tbody>
132 </table>
133 <?php endif;?>
134 <input type="hidden" name="task" value="" />
135 <input type="hidden" name="boxchecked" value="0" />
136 <?php echo HTMLHelper::_('form.token'); ?>
137 </div>
138 </form>
139 <form action="<?php echo Route::_('index.php?option=com_actionlogs&view=actionlogs'); ?>" method="post" name="exportForm" id="exportForm">
140 <input type="hidden" name="task" value="" />
141 <input type="hidden" name="cids" value="" />
142 <?php echo HTMLHelper::_('form.token'); ?>
143 </form>
1 <?xml version="1.0" encoding="utf-8"?>
2 <metadata>
3 <layout title="COM_ACTIONLOGS_VIEW_DEFAULT_TITLE">
4 <message>
5 <![CDATA[COM_ACTIONLOGS_VIEW_DEFAULT_DESC]]>
6 </message>
7 </layout>
8 </metadata>
9
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_actionlogs
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 use Joomla\CMS\Component\ComponentHelper;
13 use Joomla\CMS\Language\Text;
14 use Joomla\CMS\Toolbar\Toolbar;
15 use Joomla\CMS\Toolbar\ToolbarHelper;
16
17 JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');
18
19 /**
20 * View class for a list of logs.
21 *
22 * @since 3.9.0
23 */
24 class ActionlogsViewActionlogs extends JViewLegacy
25 {
26 /**
27 * An array of items.
28 *
29 * @var array
30 * @since 3.9.0
31 */
32 protected $items;
33
34 /**
35 * The model state
36 *
37 * @var array
38 * @since 3.9.0
39 */
40 protected $state;
41
42 /**
43 * The pagination object
44 *
45 * @var JPagination
46 * @since 3.9.0
47 */
48 protected $pagination;
49
50 /**
51 * The active search filters
52 *
53 * @var array
54 * @since 3.9.0
55 */
56 public $activeFilters;
57
58 /**
59 * Method to display the view.
60 *
61 * @param string $tpl A template file to load. [optional]
62 *
63 * @return mixed A string if successful, otherwise an Error object.
64 *
65 * @since 3.9.0
66 */
67 public function display($tpl = null)
68 {
69 $params = ComponentHelper::getParams('com_actionlogs');
70
71 $this->items = $this->get('Items');
72 $this->state = $this->get('State');
73 $this->filterForm = $this->get('FilterForm');
74 $this->activeFilters = $this->get('ActiveFilters');
75 $this->pagination = $this->get('Pagination');
76 $this->showIpColumn = (bool) $params->get('ip_logging', 0);
77
78 if (count($errors = $this->get('Errors')))
79 {
80 JError::raiseError(500, implode("\n", $errors));
81
82 return false;
83 }
84
85 $this->addToolBar();
86
87 // Load all actionlog plugins language files
88 ActionlogsHelper::loadActionLogPluginsLanguage();
89
90 return parent::display($tpl);
91 }
92
93 /**
94 * Add the page title and toolbar.
95 *
96 * @return void
97 *
98 * @since 3.9.0
99 */
100 protected function addToolbar()
101 {
102 ToolbarHelper::title(Text::_('COM_ACTIONLOGS_MANAGER_USERLOGS'), 'list-2');
103
104 ToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'actionlogs.delete');
105 $bar = Toolbar::getInstance('toolbar');
106 $bar->appendButton('Confirm', 'COM_ACTIONLOGS_PURGE_CONFIRM', 'delete', 'COM_ACTIONLOGS_TOOLBAR_PURGE', 'actionlogs.purge', false);
107 ToolbarHelper::preferences('com_actionlogs');
108 ToolbarHelper::help('JHELP_COMPONENTS_ACTIONLOGS');
109 ToolBarHelper::custom('actionlogs.exportSelectedLogs', 'download', '', 'COM_ACTIONLOGS_EXPORT_CSV', true);
110 ToolBarHelper::custom('actionlogs.exportLogs', 'download', '', 'COM_ACTIONLOGS_EXPORT_ALL_CSV', false);
111 }
112 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_admin
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11 JHtml::_('behavior.tabstate');
12
13 // No access check.
14
15 $controller = JControllerLegacy::getInstance('Admin');
16 $controller->execute(JFactory::getApplication()->input->get('task'));
17 $controller->redirect();
1 <?xml version="1.0" encoding="utf-8"?>
2 <extension type="component" version="3.1" method="upgrade">
3 <name>com_admin</name>
4 <author>Joomla! Project</author>
5 <creationDate>April 2006</creationDate>
6 <copyright>(C) 2005 - 2019 Open Source Matters. All rights reserved.</copyright>
7 <license>GNU General Public License version 2 or later; see LICENSE.txt</license>
8 <authorEmail>admin@joomla.org</authorEmail>
9 <authorUrl>www.joomla.org</authorUrl>
10 <version>3.0.0</version>
11 <description>COM_ADMIN_XML_DESCRIPTION</description>
12 <media />
13 <administration>
14 <files folder="admin">
15 <filename>admin.php</filename>
16 <filename>controller.php</filename>
17 <folder>helpers</folder>
18 <folder>models</folder>
19 <folder>views</folder>
20 </files>
21 <languages folder="admin">
22 <language tag="en-GB">language/en-GB.com_admin.ini</language>
23 <language tag="en-GB">language/en-GB.com_admin.sys.ini</language>
24 </languages>
25 </administration>
26 </extension>
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_admin
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 /**
13 * Admin Controller
14 *
15 * @since 1.6
16 */
17 class AdminController extends JControllerLegacy
18 {
19 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_admin
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 /**
13 * User profile controller class.
14 *
15 * @since 1.6
16 */
17 class AdminControllerProfile extends JControllerForm
18 {
19 /**
20 * Method to check if you can edit a record.
21 *
22 * Extended classes can override this if necessary.
23 *
24 * @param array $data An array of input data.
25 * @param string $key The name of the key for the primary key.
26 *
27 * @return boolean
28 *
29 * @since 1.6
30 */
31 protected function allowEdit($data = array(), $key = 'id')
32 {
33 return isset($data['id']) && $data['id'] == JFactory::getUser()->id;
34 }
35
36 /**
37 * Overrides parent save method to check the submitted passwords match.
38 *
39 * @param string $key The name of the primary key of the URL variable.
40 * @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
41 *
42 * @return boolean True if successful, false otherwise.
43 *
44 * @since 3.2
45 */
46 public function save($key = null, $urlVar = null)
47 {
48 $this->setRedirect(JRoute::_('index.php?option=com_admin&view=profile&layout=edit&id=' . JFactory::getUser()->id, false));
49
50 $return = parent::save();
51
52 if ($this->getTask() != 'apply')
53 {
54 // Redirect to the main page.
55 $this->setRedirect(JRoute::_('index.php', false));
56 }
57
58 return $return;
59 }
60
61 /**
62 * Method to cancel an edit.
63 *
64 * @param string $key The name of the primary key of the URL variable.
65 *
66 * @return boolean True if access level checks pass, false otherwise.
67 *
68 * @since 1.6
69 */
70 public function cancel($key = null)
71 {
72 $return = parent::cancel($key);
73
74 // Redirect to the main page.
75 $this->setRedirect(JRoute::_('index.php', false));
76
77 return $return;
78 }
79 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_admin
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 /**
13 * Utility class working with directory
14 *
15 * @since 1.6
16 */
17 abstract class JHtmlDirectory
18 {
19 /**
20 * Method to generate a (un)writable message for directory
21 *
22 * @param boolean $writable is the directory writable?
23 *
24 * @return string html code
25 */
26 public static function writable($writable)
27 {
28 if ($writable)
29 {
30 return '<span class="badge badge-success">' . JText::_('COM_ADMIN_WRITABLE') . '</span>';
31 }
32
33 return '<span class="badge badge-important">' . JText::_('COM_ADMIN_UNWRITABLE') . '</span>';
34 }
35
36 /**
37 * Method to generate a message for a directory
38 *
39 * @param string $dir the directory
40 * @param boolean $message the message
41 * @param boolean $visible is the $dir visible?
42 *
43 * @return string html code
44 */
45 public static function message($dir, $message, $visible = true)
46 {
47 $output = $visible ? $dir : '';
48
49 if (empty($message))
50 {
51 return $output;
52 }
53
54 return $output . ' <strong>' . JText::_($message) . '</strong>';
55 }
56 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_admin
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 /**
13 * Utility class working with phpsetting
14 *
15 * @since 1.6
16 */
17 abstract class JHtmlPhpSetting
18 {
19 /**
20 * Method to generate a boolean message for a value
21 *
22 * @param boolean $val is the value set?
23 *
24 * @return string html code
25 */
26 public static function boolean($val)
27 {
28 return JText::_($val ? 'JON' : 'JOFF');
29 }
30
31 /**
32 * Method to generate a boolean message for a value
33 *
34 * @param boolean $val is the value set?
35 *
36 * @return string html code
37 */
38 public static function set($val)
39 {
40 return JText::_($val ? 'JYES' : 'JNO');
41 }
42
43 /**
44 * Method to generate a string message for a value
45 *
46 * @param string $val a php ini value
47 *
48 * @return string html code
49 */
50 public static function string($val)
51 {
52 return !empty($val) ? $val : JText::_('JNONE');
53 }
54
55 /**
56 * Method to generate an integer from a value
57 *
58 * @param string $val a php ini value
59 *
60 * @return string html code
61 *
62 * @deprecated 4.0 Use intval() or casting instead.
63 */
64 public static function integer($val)
65 {
66 try
67 {
68 JLog::add(sprintf('%s() is deprecated. Use intval() or casting instead.', __METHOD__), JLog::WARNING, 'deprecated');
69 }
70 catch (RuntimeException $exception)
71 {
72 // Informational log only
73 }
74
75 return (int) $val;
76 }
77 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_admin
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 /**
13 * Utility class working with system
14 *
15 * @since 1.6
16 */
17 abstract class JHtmlSystem
18 {
19 /**
20 * Method to generate a string message for a value
21 *
22 * @param string $val a php ini value
23 *
24 * @return string html code
25 */
26 public static function server($val)
27 {
28 return !empty($val) ? $val : JText::_('COM_ADMIN_NA');
29 }
30 }
1 <?xml version="1.0" encoding="utf-8"?>
2 <form>
3 <fieldset name="user_details">
4 <field
5 name="name"
6 type="text"
7 label="COM_ADMIN_USER_HEADING_NAME"
8 description="COM_ADMIN_USER_FIELD_NAME_DESC"
9 required="true"
10 size="30"
11 />
12
13 <field
14 name="username"
15 type="text"
16 label="COM_ADMIN_USER_FIELD_USERNAME_LABEL"
17 description="COM_ADMIN_USER_FIELD_USERNAME_DESC"
18 required="true"
19 size="30"
20 />
21
22 <field
23 name="password2"
24 type="password"
25 label="JGLOBAL_PASSWORD"
26 description="COM_ADMIN_USER_FIELD_PASSWORD_DESC"
27 autocomplete="off"
28 class="validate-password"
29 field="password"
30 filter="raw"
31 message="COM_ADMIN_USER_FIELD_PASSWORD1_MESSAGE"
32 size="30"
33 validate="equals"
34 />
35
36 <field
37 name="password"
38 type="password"
39 label="COM_ADMIN_USER_FIELD_PASSWORD2_LABEL"
40 description="COM_ADMIN_USER_FIELD_PASSWORD2_DESC"
41 autocomplete="off"
42 class="validate-password"
43 filter="raw"
44 size="30"
45 validate="password"
46 />
47
48 <field
49 name="email"
50 type="email"
51 label="JGLOBAL_EMAIL"
52 description="COM_ADMIN_USER_FIELD_EMAIL_DESC"
53 class="validate-email"
54 required="true"
55 size="30"
56 validate="email"
57 validDomains="com_users.domains"
58 />
59
60 <field
61 name="registerDate"
62 type="calendar"
63 label="COM_ADMIN_USER_FIELD_REGISTERDATE_LABEL"
64 description="COM_ADMIN_USER_FIELD_REGISTERDATE_DESC"
65 class="readonly"
66 readonly="true"
67 translateformat="true"
68 showtime="true"
69 size="22"
70 filter="user_utc"
71 />
72
73 <field
74 name="lastvisitDate"
75 type="calendar"
76 label="COM_ADMIN_USER_FIELD_LASTVISIT_LABEL"
77 description="COM_ADMIN_USER_FIELD_LASTVISIT_DESC"
78 class="readonly"
79 readonly="true"
80 translateformat="true"
81 showtime="true"
82 size="22"
83 filter="user_utc"
84 />
85
86 <field
87 name="id"
88 type="number"
89 label="JGLOBAL_FIELD_ID_LABEL"
90 description="JGLOBAL_FIELD_ID_DESC"
91 class="readonly"
92 default="0"
93 readonly="true"
94 filter="unset"
95 />
96
97 </fieldset>
98
99 <fields name="params">
100
101 <!-- Basic user account settings. -->
102 <fieldset name="settings" label="COM_ADMIN_USER_SETTINGS_FIELDSET_LABEL">
103
104 <field
105 name="admin_style"
106 type="templatestyle"
107 label="COM_ADMIN_USER_FIELD_BACKEND_TEMPLATE_LABEL"
108 description="COM_ADMIN_USER_FIELD_BACKEND_TEMPLATE_DESC"
109 client="administrator"
110 filter="uint"
111 >
112 <option value="">JOPTION_USE_DEFAULT</option>
113 </field>
114
115 <field
116 name="admin_language"
117 type="language"
118 label="COM_ADMIN_USER_FIELD_BACKEND_LANGUAGE_LABEL"
119 description="COM_ADMIN_USER_FIELD_BACKEND_LANGUAGE_DESC"
120 client="administrator"
121 >
122 <option value="">JOPTION_USE_DEFAULT</option>
123 </field>
124
125 <field
126 name="language"
127 type="language"
128 label="COM_ADMIN_USER_FIELD_FRONTEND_LANGUAGE_LABEL"
129 description="COM_ADMIN_USER_FIELD_FRONTEND_LANGUAGE_DESC"
130 client="site"
131 >
132 <option value="">JOPTION_USE_DEFAULT</option>
133 </field>
134
135 <field
136 name="editor"
137 type="plugins"
138 label="COM_ADMIN_USER_FIELD_EDITOR_LABEL"
139 description="COM_ADMIN_USER_FIELD_EDITOR_DESC"
140 folder="editors"
141 useaccess="true"
142 >
143 <option value="">JOPTION_USE_DEFAULT</option>
144 </field>
145
146 <field
147 name="timezone"
148 type="timezone"
149 label="COM_ADMIN_USER_FIELD_TIMEZONE_LABEL"
150 description="COM_ADMIN_USER_FIELD_TIMEZONE_DESC"
151 >
152 <option value="">JOPTION_USE_DEFAULT</option>
153 </field>
154 </fieldset>
155 </fields>
156 </form>
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_admin
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 use Joomla\String\StringHelper;
13
14 /**
15 * Admin Component Help Model
16 *
17 * @since 1.6
18 */
19 class AdminModelHelp extends JModelLegacy
20 {
21 /**
22 * The search string
23 *
24 * @var string
25 * @since 1.6
26 */
27 protected $help_search = null;
28
29 /**
30 * The page to be viewed
31 *
32 * @var string
33 * @since 1.6
34 */
35 protected $page = null;
36
37 /**
38 * The ISO language tag
39 *
40 * @var string
41 * @since 1.6
42 */
43 protected $lang_tag = null;
44
45 /**
46 * Table of contents
47 *
48 * @var array
49 * @since 1.6
50 */
51 protected $toc = null;
52
53 /**
54 * URL for the latest version check
55 *
56 * @var string
57 * @since 1.6
58 */
59 protected $latest_version_check = null;
60
61 /**
62 * Method to get the help search string
63 *
64 * @return string Help search string
65 *
66 * @since 1.6
67 */
68 public function &getHelpSearch()
69 {
70 if (is_null($this->help_search))
71 {
72 $this->help_search = JFactory::getApplication()->input->getString('helpsearch');
73 }
74
75 return $this->help_search;
76 }
77
78 /**
79 * Method to get the page
80 *
81 * @return string The page
82 *
83 * @since 1.6
84 */
85 public function &getPage()
86 {
87 if (is_null($this->page))
88 {
89 $this->page = JHelp::createUrl(JFactory::getApplication()->input->get('page', 'JHELP_START_HERE'));
90 }
91
92 return $this->page;
93 }
94
95 /**
96 * Method to get the lang tag
97 *
98 * @return string lang iso tag
99 *
100 * @since 1.6
101 */
102 public function getLangTag()
103 {
104 if (is_null($this->lang_tag))
105 {
106 $this->lang_tag = JFactory::getLanguage()->getTag();
107
108 if (!is_dir(JPATH_BASE . '/help/' . $this->lang_tag))
109 {
110 // Use English as fallback
111 $this->lang_tag = 'en-GB';
112 }
113 }
114
115 return $this->lang_tag;
116 }
117
118 /**
119 * Method to get the table of contents
120 *
121 * @return array Table of contents
122 */
123 public function &getToc()
124 {
125 if (!is_null($this->toc))
126 {
127 return $this->toc;
128 }
129
130 // Get vars
131 $lang_tag = $this->getLangTag();
132 $help_search = $this->getHelpSearch();
133
134 // New style - Check for a TOC JSON file
135 if (file_exists(JPATH_BASE . '/help/' . $lang_tag . '/toc.json'))
136 {
137 $data = json_decode(file_get_contents(JPATH_BASE . '/help/' . $lang_tag . '/toc.json'));
138
139 // Loop through the data array
140 foreach ($data as $key => $value)
141 {
142 $this->toc[$key] = JText::_('COM_ADMIN_HELP_' . $value);
143 }
144
145 // Sort the Table of Contents
146 asort($this->toc);
147
148 return $this->toc;
149 }
150
151 // Get Help files
152 jimport('joomla.filesystem.folder');
153 $files = JFolder::files(JPATH_BASE . '/help/' . $lang_tag, '\.xml$|\.html$');
154 $this->toc = array();
155
156 foreach ($files as $file)
157 {
158 $buffer = file_get_contents(JPATH_BASE . '/help/' . $lang_tag . '/' . $file);
159
160 if (!preg_match('#<title>(.*?)</title>#', $buffer, $m))
161 {
162 continue;
163 }
164
165 $title = trim($m[1]);
166
167 if (!$title)
168 {
169 continue;
170 }
171
172 // Translate the page title
173 $title = JText::_($title);
174
175 // Strip the extension
176 $file = preg_replace('#\.xml$|\.html$#', '', $file);
177
178 if ($help_search && StringHelper::strpos(StringHelper::strtolower(strip_tags($buffer)), StringHelper::strtolower($help_search)) === false)
179 {
180 continue;
181 }
182
183 // Add an item in the Table of Contents
184 $this->toc[$file] = $title;
185 }
186
187 // Sort the Table of Contents
188 asort($this->toc);
189
190 return $this->toc;
191 }
192
193 /**
194 * Method to get the latest version check
195 *
196 * @return string Latest Version Check URL
197 */
198 public function &getLatestVersionCheck()
199 {
200 if (!$this->latest_version_check)
201 {
202 $override = 'https://help.joomla.org/proxy/index.php?keyref=Help{major}{minor}:'
203 . 'Joomla_Version_{major}_{minor}_{maintenance}/{langcode}&amp;lang={langcode}';
204 $this->latest_version_check = JHelp::createUrl('JVERSION', false, $override);
205 }
206
207 return $this->latest_version_check;
208 }
209 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_admin
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('_JEXEC') or die;
11
12 JLoader::register('UsersModelUser', JPATH_ADMINISTRATOR . '/components/com_users/models/user.php');
13
14 /**
15 * User model.
16 *
17 * @since 1.6
18 */
19 class AdminModelProfile extends UsersModelUser
20 {
21 /**
22 * Method to get the record form.
23 *
24 * @param array $data An optional array of data for the form to interogate.
25 * @param boolean $loadData True if the form is to load its own data (default case), false if not.
26 *
27 * @return JForm A JForm object on success, false on failure
28 *
29 * @since 1.6
30 */
31 public function getForm($data = array(), $loadData = true)
32 {
33 // Get the form.
34 $form = $this->loadForm('com_admin.profile', 'profile', array('control' => 'jform', 'load_data' => $loadData));
35
36 if (empty($form))
37 {
38 return false;
39 }
40
41 // Check for username compliance and parameter set
42 $isUsernameCompliant = true;
43
44 if ($this->loadFormData()->username)
45 {
46 $username = $this->loadFormData()->username;
47 $isUsernameCompliant = !(preg_match('#[<>"\'%;()&\\\\]|\\.\\./#', $username) || strlen(utf8_decode($username)) < 2
48 || trim($username) != $username);
49 }
50
51 $this->setState('user.username.compliant', $isUsernameCompliant);
52
53 if (!JComponentHelper::getParams('com_users')->get('change_login_name') && $isUsernameCompliant)
54 {
55 $form->setFieldAttribute('username', 'required', 'false');
56 $form->setFieldAttribute('username', 'readonly', 'true');
57 $form->setFieldAttribute('username', 'description', 'COM_ADMIN_USER_FIELD_NOCHANGE_USERNAME_DESC');
58 }
59
60 // When multilanguage is set, a user's default site language should also be a Content Language
61 if (JLanguageMultilang::isEnabled())
62 {
63 $form->setFieldAttribute('language', 'type', 'frontend_language', 'params');
64 }
65
66 // If the user needs to change their password, mark the password fields as required
67 if (JFactory::getUser()->requireReset)
68 {
69 $form->setFieldAttribute('password', 'required', 'true');
70 $form->setFieldAttribute('password2', 'required', 'true');
71 }
72
73 return $form;
74 }
75
76 /**
77 * Method to get the data that should be injected in the form.
78 *
79 * @return mixed The data for the form.
80 *
81 * @since 1.6
82 */
83 protected function loadFormData()
84 {
85 // Check the session for previously entered form data.
86 $data = JFactory::getApplication()->getUserState('com_users.edit.user.data', array());
87
88 if (empty($data))
89 {
90 $data = $this->getItem();
91 }
92
93 // Load the users plugins.
94 JPluginHelper::importPlugin('user');
95
96 $this->preprocessData('com_admin.profile', $data);
97
98 return $data;
99 }
100
101 /**
102 * Method to get a single record.
103 *
104 * @param integer $pk The id of the primary key.
105 *
106 * @return mixed Object on success, false on failure.
107 *
108 * @since 1.6
109 */
110 public function getItem($pk = null)
111 {
112 return parent::getItem(JFactory::getUser()->id);
113 }
114
115 /**
116 * Method to save the form data.
117 *
118 * @param array $data The form data.
119 *
120 * @return boolean True on success.
121 *
122 * @since 1.6
123 */
124 public function save($data)
125 {
126 $user = JFactory::getUser();
127
128 unset($data['id']);
129 unset($data['groups']);
130 unset($data['sendEmail']);
131 unset($data['block']);
132
133 $isUsernameCompliant = $this->getState('user.username.compliant');
134
135 if (!JComponentHelper::getParams('com_users')->get('change_login_name') && $isUsernameCompliant)
136 {
137 unset($data['username']);
138 }
139
140 // Bind the data.
141 if (!$user->bind($data))
142 {
143 $this->setError($user->getError());
144
145 return false;
146 }
147
148 $user->groups = null;
149
150 // Store the data.
151 if (!$user->save())
152 {
153 $this->setError($user->getError());
154
155 return false;
156 }
157
158 $this->setState('user.id', $user->id);
159
160 return true;
161 }
162 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_admin
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 *
9 * This file contains post-installation message handling for notifying users of a change
10 * in the default .htaccess and web.config files.
11 */
12
13 defined('_JEXEC') or die;
14
15 /**
16 * Notifies users of the add the nosniff headers by applying the changes from the default .htaccess or web.config file
17 *
18 * This check returns true regardless of condition.
19 *
20 * @return boolean
21 *
22 * @since 3.4
23 */
24 function admin_postinstall_addnosniff_condition()
25 {
26 return true;
27 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_admin
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 *
9 * This file contains post-installation message handling for eAccelerator compatibility.
10 */
11
12 defined('_JEXEC') or die;
13
14 use Joomla\Registry\Registry;
15 use Joomla\Utilities\ArrayHelper;
16
17 /**
18 * Checks if the eAccelerator caching method is enabled.
19 *
20 * This check should be done through the 3.x series as the issue impacts migrated sites which will
21 * most often come from the previous LTS release (2.5). Remove for version 4 or when eAccelerator support is added.
22 *
23 * This check returns true when the eAccelerator caching method is user, meaning that the message concerning it should be displayed.
24 *
25 * @return integer
26 *
27 * @since 3.2
28 */
29 function admin_postinstall_eaccelerator_condition()
30 {
31 $app = JFactory::getApplication();
32 $cacheHandler = $app->get('cacheHandler', '');
33
34 return (ucfirst($cacheHandler) == 'Eaccelerator');
35 }
36
37 /**
38 * Disables the unsupported eAccelerator caching method, replacing it with the "file" caching method.
39 *
40 * @return void
41 *
42 * @since 3.2
43 */
44 function admin_postinstall_eaccelerator_action()
45 {
46 $prev = ArrayHelper::fromObject(new JConfig);
47 $data = array_merge($prev, array('cacheHandler' => 'file'));
48
49 $config = new Registry($data);
50
51 jimport('joomla.filesystem.path');
52 jimport('joomla.filesystem.file');
53
54 // Set the configuration file path.
55 $file = JPATH_CONFIGURATION . '/configuration.php';
56
57 // Get the new FTP credentials.
58 $ftp = JClientHelper::getCredentials('ftp', true);
59
60 // Attempt to make the file writeable if using FTP.
61 if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0644'))
62 {
63 JError::raiseNotice(500, JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTWRITABLE'));
64 }
65
66 // Attempt to write the configuration file as a PHP class named JConfig.
67 $configuration = $config->toString('PHP', array('class' => 'JConfig', 'closingtag' => false));
68
69 if (!JFile::write($file, $configuration))
70 {
71 JFactory::getApplication()->enqueueMessage(JText::_('COM_CONFIG_ERROR_WRITE_FAILED'), 'error');
72
73 return;
74 }
75
76 // Attempt to make the file unwriteable if using FTP.
77 if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0444'))
78 {
79 JError::raiseNotice(500, JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTUNWRITABLE'));
80 }
81 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_admin
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 *
9 * This file contains post-installation message handling for notifying users of a change
10 * in the default .htaccess and web.config files.
11 */
12
13 defined('_JEXEC') or die;
14
15 /**
16 * Notifies users of a change in the default .htaccess or web.config file
17 *
18 * This check returns true regardless of condition.
19 *
20 * @return boolean
21 *
22 * @since 3.4
23 */
24 function admin_postinstall_htaccess_condition()
25 {
26 return true;
27 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_admin
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 *
9 * This file contains post-installation message handling for Joomla 4.0 pre checks
10 */
11
12 defined('_JEXEC') or die;
13
14 /**
15 * Checks if the installation meets the current requirements for Joomla 4
16 *
17 * @return boolean True if any check fails.
18 *
19 * @since 3.7
20 *
21 * @link https://developer.joomla.org/news/658-joomla4-manifesto.html
22 * @link https://developer.joomla.org/news/704-looking-forward-with-joomla-4.html
23 * @link https://developer.joomla.org/news/788-joomla-4-on-the-move.html
24 */
25 function admin_postinstall_joomla40checks_condition()
26 {
27 $db = JFactory::getDbo();
28 $serverType = $db->getServerType();
29 $serverVersion = $db->getVersion();
30
31 if ($serverType == 'mssql')
32 {
33 // MS SQL support will be dropped
34 return true;
35 }
36
37 if ($serverType == 'postgresql' && version_compare($serverVersion, '11.0', 'lt'))
38 {
39 // PostgreSQL minimum version is 11.0
40 return true;
41 }
42
43 // Check whether we have a MariaDB version string and extract the proper version from it
44 if ($serverType == 'mysql' && stripos($serverVersion, 'mariadb') !== false)
45 {
46 $serverVersion = preg_replace('/^5\.5\.5-/', '', $serverVersion);
47
48 // MariaDB minimum version is 10.1
49 if (version_compare($serverVersion, '10.1', 'lt'))
50 {
51 return true;
52 }
53 }
54
55 if ($serverType == 'mysql' && version_compare($serverVersion, '5.6', 'lt'))
56 {
57 // MySQL minimum version is 5.6.0
58 return true;
59 }
60
61 if ($db->name === 'mysql')
62 {
63 // Using deprecated MySQL driver
64 return true;
65 }
66
67 if ($db->name === 'postgresql')
68 {
69 // Using deprecated PostgreSQL driver
70 return true;
71 }
72
73 // PHP minimum version is 7.2.5
74 return version_compare(PHP_VERSION, '7.2.5', 'lt');
75 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_admin
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 *
9 * This file contains post-installation message handling for the checks if the installation is
10 * affected by the issue with content languages access in 3.4.0
11 */
12
13 defined('_JEXEC') or die;
14
15 /**
16 * Checks if the installation is affected by the issue with content languages access in 3.4.0
17 *
18 * @link https://github.com/joomla/joomla-cms/pull/6172
19 * @link https://github.com/joomla/joomla-cms/pull/6194
20 *
21 * @return boolean
22 *
23 * @since 3.4.1
24 */
25 function admin_postinstall_languageaccess340_condition()
26 {
27 $db = JFactory::getDbo();
28 $query = $db->getQuery(true)
29 ->select($db->quoteName('access'))
30 ->from($db->quoteName('#__languages'))
31 ->where($db->quoteName('access') . ' = ' . $db->quote('0'));
32 $db->setQuery($query);
33 $db->execute();
34 $numRows = $db->getNumRows();
35
36 if (isset($numRows) && $numRows != 0)
37 {
38 // We have rows here so we have at minumum one row with access set to 0
39 return true;
40 }
41
42 // All good the query return nothing.
43 return false;
44 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_admin
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 *
9 * This file contains post-installation message handling for the checking minimum PHP version support
10 */
11
12 defined('_JEXEC') or die;
13
14 /**
15 * Alerts the user we are collecting anonymous data as of Joomla 3.5.0.
16 *
17 * @return boolean
18 *
19 * @since 3.5
20 */
21 function admin_postinstall_statscollection_condition()
22 {
23 return true;
24 }
1 <?php
2 /**
3 * @package Joomla.Administrator
4 * @subpackage com_admin
5 *
6 * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 *
9 * This file contains post-installation message handling for notifying users of a change
10 * in various default settings.
11 */
12
13 defined('_JEXEC') or die;
14
15 /**
16 * Notifies users of a change in various default settings
17 *
18 * This check returns true regardless of condition.
19 *
20 * @return boolean
21 *
22 * @since 3.8.8
23 */
24 function admin_postinstall_updatedefaultsettings_condition()
25 {
26 return true;
27 }
This diff could not be displayed because it is too large.
1 --
2 -- Step 1 of the UTF-8 Multibyte (utf8mb4) conversion for MySQL
3 --
4 -- Drop indexes which will be added again in step 2, utf8mb4-conversion-02.sql.
5 --
6 -- Do not rename this file or any other of the utf8mb4-conversion-*.sql
7 -- files unless you want to change PHP code, too.
8 --
9 -- This file here will be processed ignoring any exceptions caused by indexes
10 -- to be dropped do not exist.
11 --
12 -- The file for step 2 will the be processed with reporting exceptions.
13 --
14
15 ALTER TABLE `#__banners` DROP KEY `idx_metakey_prefix`;
16 ALTER TABLE `#__banner_clients` DROP KEY `idx_metakey_prefix`;
17 ALTER TABLE `#__categories` DROP KEY `idx_path`;
18 ALTER TABLE `#__categories` DROP KEY `idx_alias`;
19 ALTER TABLE `#__content` DROP KEY `idx_alias`;
20 ALTER TABLE `#__content_types` DROP KEY `idx_alias`;
21 ALTER TABLE `#__fields` DROP KEY `idx_context`;
22 ALTER TABLE `#__fields_groups` DROP KEY `idx_context`;
23 ALTER TABLE `#__fields_values` DROP KEY `idx_item_id`;
24 ALTER TABLE `#__finder_links` DROP KEY `idx_title`;
25 ALTER TABLE `#__menu` DROP KEY `idx_alias`;
26 ALTER TABLE `#__menu` DROP KEY `idx_client_id_parent_id_alias_language`;
27 ALTER TABLE `#__menu` DROP KEY `idx_path`;
28 ALTER TABLE `#__redirect_links` DROP KEY `idx_old_url`;
29 ALTER TABLE `#__tags` DROP KEY `idx_path`;
30 ALTER TABLE `#__tags` DROP KEY `idx_alias`;
31 ALTER TABLE `#__ucm_content` DROP KEY `idx_alias`;
32 ALTER TABLE `#__ucm_content` DROP KEY `idx_title`;
33 ALTER TABLE `#__ucm_content` DROP KEY `idx_content_type`;
34 ALTER TABLE `#__users` DROP KEY `idx_name`;
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
2 (437, 'plg_quickicon_joomlaupdate', 'plugin', 'joomlaupdate', 'quickicon', 0, 1, 1, 1, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0),
3 (438, 'plg_quickicon_extensionupdate', 'plugin', 'extensionupdate', 'quickicon', 0, 1, 1, 1, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);
4
5 ALTER TABLE `#__update_sites` ADD COLUMN `last_check_timestamp` bigint(20) DEFAULT '0' AFTER `enabled`;
6
7 REPLACE INTO `#__update_sites` VALUES
8 (1, 'Joomla Core', 'collection', 'https://update.joomla.org/core/list.xml', 1, 0),
9 (2, 'Joomla Extension Directory', 'collection', 'https://update.joomla.org/jed/list.xml', 1, 0);
1 CREATE TABLE IF NOT EXISTS `#__overrider` (
2 `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
3 `constant` varchar(255) NOT NULL,
4 `string` text NOT NULL,
5 `file` varchar(255) NOT NULL,
6 PRIMARY KEY (`id`)
7 ) DEFAULT CHARSET=utf8;
...\ No newline at end of file ...\ No newline at end of file
1 CREATE TABLE IF NOT EXISTS `#__user_notes` (
2 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
3 `user_id` int(10) unsigned NOT NULL DEFAULT '0',
4 `catid` int(10) unsigned NOT NULL DEFAULT '0',
5 `subject` varchar(100) NOT NULL DEFAULT '',
6 `body` text NOT NULL,
7 `state` tinyint(3) NOT NULL DEFAULT '0',
8 `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
9 `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
10 `created_user_id` int(10) unsigned NOT NULL DEFAULT '0',
11 `created_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
12 `modified_user_id` int(10) unsigned NOT NULL,
13 `modified_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
14 `review_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
15 `publish_up` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
16 `publish_down` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
17 PRIMARY KEY (`id`),
18 KEY `idx_user_id` (`user_id`),
19 KEY `idx_category_id` (`catid`)
20 ) DEFAULT CHARSET=utf8;
1 SELECT @old_params:= CONCAT(SUBSTRING_INDEX(SUBSTRING(params, LOCATE('"filters":', params)), '}}', 1), '}}') as filters
2 FROM `#__extensions`
3 WHERE name="com_content";
4
5 UPDATE `#__extensions`
6 SET params=CONCAT('{',SUBSTRING(params, 2, CHAR_LENGTH(params)-2),IF(params='','',','),@old_params,'}')
7 WHERE name="com_config";
...\ No newline at end of file ...\ No newline at end of file
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
2 (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),
3 (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),
4 (440, 'plg_system_highlight', 'plugin', 'highlight', 'system', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 7, 0),
5 (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),
6 (442, 'plg_finder_categories', 'plugin', 'categories', 'finder', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 1, 0),
7 (443, 'plg_finder_contacts', 'plugin', 'contacts', 'finder', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 2, 0),
8 (444, 'plg_finder_content', 'plugin', 'content', 'finder', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 3, 0),
9 (445, 'plg_finder_newsfeeds', 'plugin', 'newsfeeds', 'finder', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 4, 0),
10 (446, 'plg_finder_weblinks', 'plugin', 'weblinks', 'finder', 0, 1, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 5, 0),
11 (223, 'mod_finder', 'module', 'mod_finder', '', 0, 1, 0, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
1 CREATE TABLE IF NOT EXISTS `#__finder_links_terms0` (
2 `link_id` int(10) unsigned NOT NULL,
3 `term_id` int(10) unsigned NOT NULL,
4 `weight` float unsigned NOT NULL,
5 PRIMARY KEY (`link_id`,`term_id`),
6 KEY `idx_term_weight` (`term_id`,`weight`),
7 KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
8 ) DEFAULT CHARSET=utf8;
9
10 CREATE TABLE IF NOT EXISTS `#__finder_links_terms1` (
11 `link_id` int(10) unsigned NOT NULL,
12 `term_id` int(10) unsigned NOT NULL,
13 `weight` float unsigned NOT NULL,
14 PRIMARY KEY (`link_id`,`term_id`),
15 KEY `idx_term_weight` (`term_id`,`weight`),
16 KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
17 ) DEFAULT CHARSET=utf8;
18
19 CREATE TABLE IF NOT EXISTS `#__finder_links_terms2` (
20 `link_id` int(10) unsigned NOT NULL,
21 `term_id` int(10) unsigned NOT NULL,
22 `weight` float unsigned NOT NULL,
23 PRIMARY KEY (`link_id`,`term_id`),
24 KEY `idx_term_weight` (`term_id`,`weight`),
25 KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
26 ) DEFAULT CHARSET=utf8;
27
28 CREATE TABLE IF NOT EXISTS `#__finder_links_terms3` (
29 `link_id` int(10) unsigned NOT NULL,
30 `term_id` int(10) unsigned NOT NULL,
31 `weight` float unsigned NOT NULL,
32 PRIMARY KEY (`link_id`,`term_id`),
33 KEY `idx_term_weight` (`term_id`,`weight`),
34 KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
35 ) DEFAULT CHARSET=utf8;
36
37
38 CREATE TABLE IF NOT EXISTS `#__finder_links_terms4` (
39 `link_id` int(10) unsigned NOT NULL,
40 `term_id` int(10) unsigned NOT NULL,
41 `weight` float unsigned NOT NULL,
42 PRIMARY KEY (`link_id`,`term_id`),
43 KEY `idx_term_weight` (`term_id`,`weight`),
44 KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
45 ) DEFAULT CHARSET=utf8;
46
47
48 CREATE TABLE IF NOT EXISTS `#__finder_links_terms5` (
49 `link_id` int(10) unsigned NOT NULL,
50 `term_id` int(10) unsigned NOT NULL,
51 `weight` float unsigned NOT NULL,
52 PRIMARY KEY (`link_id`,`term_id`),
53 KEY `idx_term_weight` (`term_id`,`weight`),
54 KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
55 ) DEFAULT CHARSET=utf8;
56
57
58 CREATE TABLE IF NOT EXISTS `#__finder_links_terms6` (
59 `link_id` int(10) unsigned NOT NULL,
60 `term_id` int(10) unsigned NOT NULL,
61 `weight` float unsigned NOT NULL,
62 PRIMARY KEY (`link_id`,`term_id`),
63 KEY `idx_term_weight` (`term_id`,`weight`),
64 KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
65 ) DEFAULT CHARSET=utf8;
66
67
68 CREATE TABLE IF NOT EXISTS `#__finder_links_terms7` (
69 `link_id` int(10) unsigned NOT NULL,
70 `term_id` int(10) unsigned NOT NULL,
71 `weight` float unsigned NOT NULL,
72 PRIMARY KEY (`link_id`,`term_id`),
73 KEY `idx_term_weight` (`term_id`,`weight`),
74 KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
75 ) DEFAULT CHARSET=utf8;
76
77
78 CREATE TABLE IF NOT EXISTS `#__finder_links_terms8` (
79 `link_id` int(10) unsigned NOT NULL,
80 `term_id` int(10) unsigned NOT NULL,
81 `weight` float unsigned NOT NULL,
82 PRIMARY KEY (`link_id`,`term_id`),
83 KEY `idx_term_weight` (`term_id`,`weight`),
84 KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
85 ) DEFAULT CHARSET=utf8;
86
87
88 CREATE TABLE IF NOT EXISTS `#__finder_links_terms9` (
89 `link_id` int(10) unsigned NOT NULL,
90 `term_id` int(10) unsigned NOT NULL,
91 `weight` float unsigned NOT NULL,
92 PRIMARY KEY (`link_id`,`term_id`),
93 KEY `idx_term_weight` (`term_id`,`weight`),
94 KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
95 ) DEFAULT CHARSET=utf8;
96
97
98 CREATE TABLE IF NOT EXISTS `#__finder_links_termsa` (
99 `link_id` int(10) unsigned NOT NULL,
100 `term_id` int(10) unsigned NOT NULL,
101 `weight` float unsigned NOT NULL,
102 PRIMARY KEY (`link_id`,`term_id`),
103 KEY `idx_term_weight` (`term_id`,`weight`),
104 KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
105 ) DEFAULT CHARSET=utf8;
106
107
108 CREATE TABLE IF NOT EXISTS `#__finder_links_termsb` (
109 `link_id` int(10) unsigned NOT NULL,
110 `term_id` int(10) unsigned NOT NULL,
111 `weight` float unsigned NOT NULL,
112 PRIMARY KEY (`link_id`,`term_id`),
113 KEY `idx_term_weight` (`term_id`,`weight`),
114 KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
115 ) DEFAULT CHARSET=utf8;
116
117
118 CREATE TABLE IF NOT EXISTS `#__finder_links_termsc` (
119 `link_id` int(10) unsigned NOT NULL,
120 `term_id` int(10) unsigned NOT NULL,
121 `weight` float unsigned NOT NULL,
122 PRIMARY KEY (`link_id`,`term_id`),
123 KEY `idx_term_weight` (`term_id`,`weight`),
124 KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
125 ) DEFAULT CHARSET=utf8;
126
127
128 CREATE TABLE IF NOT EXISTS `#__finder_links_termsd` (
129 `link_id` int(10) unsigned NOT NULL,
130 `term_id` int(10) unsigned NOT NULL,
131 `weight` float unsigned NOT NULL,
132 PRIMARY KEY (`link_id`,`term_id`),
133 KEY `idx_term_weight` (`term_id`,`weight`),
134 KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
135 ) DEFAULT CHARSET=utf8;
136
137
138 CREATE TABLE IF NOT EXISTS `#__finder_links_termse` (
139 `link_id` int(10) unsigned NOT NULL,
140 `term_id` int(10) unsigned NOT NULL,
141 `weight` float unsigned NOT NULL,
142 PRIMARY KEY (`link_id`,`term_id`),
143 KEY `idx_term_weight` (`term_id`,`weight`),
144 KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
145 ) DEFAULT CHARSET=utf8;
146
147
148 CREATE TABLE IF NOT EXISTS `#__finder_links_termsf` (
149 `link_id` int(10) unsigned NOT NULL,
150 `term_id` int(10) unsigned NOT NULL,
151 `weight` float unsigned NOT NULL,
152 PRIMARY KEY (`link_id`,`term_id`),
153 KEY `idx_term_weight` (`term_id`,`weight`),
154 KEY `idx_link_term_weight` (`link_id`,`term_id`,`weight`)
155 ) DEFAULT CHARSET=utf8;
156
157
158 CREATE TABLE IF NOT EXISTS `#__finder_taxonomy` (
159 `id` int(10) unsigned NOT NULL auto_increment,
160 `parent_id` int(10) unsigned NOT NULL default '0',
161 `title` varchar(255) NOT NULL,
162 `state` tinyint(1) unsigned NOT NULL default '1',
163 `access` tinyint(1) unsigned NOT NULL default '0',
164 `ordering` tinyint(1) unsigned NOT NULL default '0',
165 PRIMARY KEY (`id`),
166 KEY `parent_id` (`parent_id`),
167 KEY `state` (`state`),
168 KEY `ordering` (`ordering`),
169 KEY `access` (`access`),
170 KEY `idx_parent_published` (`parent_id`,`state`,`access`)
171 ) DEFAULT CHARSET=utf8;
172
173
174 CREATE TABLE IF NOT EXISTS `#__finder_taxonomy_map` (
175 `link_id` int(10) unsigned NOT NULL,
176 `node_id` int(10) unsigned NOT NULL,
177 PRIMARY KEY (`link_id`,`node_id`),
178 KEY `link_id` (`link_id`),
179 KEY `node_id` (`node_id`)
180 ) DEFAULT CHARSET=utf8;
181
182
183 CREATE TABLE IF NOT EXISTS `#__finder_terms` (
184 `term_id` int(10) unsigned NOT NULL auto_increment,
185 `term` varchar(75) NOT NULL,
186 `stem` varchar(75) NOT NULL,
187 `common` tinyint(1) unsigned NOT NULL default '0',
188 `phrase` tinyint(1) unsigned NOT NULL default '0',
189 `weight` float unsigned NOT NULL default '0',
190 `soundex` varchar(75) NOT NULL,
191 `links` int(10) NOT NULL default '0',
192 PRIMARY KEY (`term_id`),
193 UNIQUE KEY `idx_term` (`term`),
194 KEY `idx_term_phrase` (`term`,`phrase`),
195 KEY `idx_stem_phrase` (`stem`,`phrase`),
196 KEY `idx_soundex_phrase` (`soundex`,`phrase`)
197 ) DEFAULT CHARSET=utf8;
198
199
200 CREATE TABLE IF NOT EXISTS `#__finder_terms_common` (
201 `term` varchar(75) NOT NULL,
202 `language` varchar(3) NOT NULL,
203 KEY `idx_word_lang` (`term`,`language`),
204 KEY `idx_lang` (`language`)
205 ) DEFAULT CHARSET=utf8;
206
207
208 CREATE TABLE IF NOT EXISTS `#__finder_tokens` (
209 `term` varchar(75) NOT NULL,
210 `stem` varchar(75) NOT NULL,
211 `common` tinyint(1) unsigned NOT NULL default '0',
212 `phrase` tinyint(1) unsigned NOT NULL default '0',
213 `weight` float unsigned NOT NULL default '1',
214 `context` tinyint(1) unsigned NOT NULL default '2',
215 KEY `idx_word` (`term`),
216 KEY `idx_context` (`context`)
217 ) ENGINE=MEMORY DEFAULT CHARSET=utf8;
218
219
220 CREATE TABLE IF NOT EXISTS `#__finder_tokens_aggregate` (
221 `term_id` int(10) unsigned NOT NULL,
222 `map_suffix` char(1) NOT NULL,
223 `term` varchar(75) NOT NULL,
224 `stem` varchar(75) NOT NULL,
225 `common` tinyint(1) unsigned NOT NULL default '0',
226 `phrase` tinyint(1) unsigned NOT NULL default '0',
227 `term_weight` float unsigned NOT NULL,
228 `context` tinyint(1) unsigned NOT NULL default '2',
229 `context_weight` float unsigned NOT NULL,
230 `total_weight` float unsigned NOT NULL,
231 KEY `token` (`term`),
232 KEY `keyword_id` (`term_id`)
233 ) ENGINE=MEMORY DEFAULT CHARSET=utf8;
234
235
236 CREATE TABLE IF NOT EXISTS `#__finder_types` (
237 `id` int(10) unsigned NOT NULL auto_increment,
238 `title` varchar(100) NOT NULL,
239 `mime` varchar(100) NOT NULL,
240 PRIMARY KEY (`id`),
241 UNIQUE KEY `title` (`title`)
242 ) DEFAULT CHARSET=utf8;
243
244
1 REPLACE INTO `#__finder_taxonomy` (`id`, `parent_id`, `title`, `state`, `access`, `ordering`) VALUES
2 (1, 0, 'ROOT', 0, 0, 0);
3
4 REPLACE INTO `#__finder_terms_common` (`term`, `language`) VALUES
5 ('a', 'en'),
6 ('about', 'en'),
7 ('after', 'en'),
8 ('ago', 'en'),
9 ('all', 'en'),
10 ('am', 'en'),
11 ('an', 'en'),
12 ('and', 'en'),
13 ('ani', 'en'),
14 ('any', 'en'),
15 ('are', 'en'),
16 ('aren''t', 'en'),
17 ('as', 'en'),
18 ('at', 'en'),
19 ('be', 'en'),
20 ('but', 'en'),
21 ('by', 'en'),
22 ('for', 'en'),
23 ('from', 'en'),
24 ('get', 'en'),
25 ('go', 'en'),
26 ('how', 'en'),
27 ('if', 'en'),
28 ('in', 'en'),
29 ('into', 'en'),
30 ('is', 'en'),
31 ('isn''t', 'en'),
32 ('it', 'en'),
33 ('its', 'en'),
34 ('me', 'en'),
35 ('more', 'en'),
36 ('most', 'en'),
37 ('must', 'en'),
38 ('my', 'en'),
39 ('new', 'en'),
40 ('no', 'en'),
41 ('none', 'en'),
42 ('not', 'en'),
43 ('noth', 'en'),
44 ('nothing', 'en'),
45 ('of', 'en'),
46 ('off', 'en'),
47 ('often', 'en'),
48 ('old', 'en'),
49 ('on', 'en'),
50 ('onc', 'en'),
51 ('once', 'en'),
52 ('onli', 'en'),
53 ('only', 'en'),
54 ('or', 'en'),
55 ('other', 'en'),
56 ('our', 'en'),
57 ('ours', 'en'),
58 ('out', 'en'),
59 ('over', 'en'),
60 ('page', 'en'),
61 ('she', 'en'),
62 ('should', 'en'),
63 ('small', 'en'),
64 ('so', 'en'),
65 ('some', 'en'),
66 ('than', 'en'),
67 ('thank', 'en'),
68 ('that', 'en'),
69 ('the', 'en'),
70 ('their', 'en'),
71 ('theirs', 'en'),
72 ('them', 'en'),
73 ('then', 'en'),
74 ('there', 'en'),
75 ('these', 'en'),
76 ('they', 'en'),
77 ('this', 'en'),
78 ('those', 'en'),
79 ('thus', 'en'),
80 ('time', 'en'),
81 ('times', 'en'),
82 ('to', 'en'),
83 ('too', 'en'),
84 ('true', 'en'),
85 ('under', 'en'),
86 ('until', 'en'),
87 ('up', 'en'),
88 ('upon', 'en'),
89 ('use', 'en'),
90 ('user', 'en'),
91 ('users', 'en'),
92 ('veri', 'en'),
93 ('version', 'en'),
94 ('very', 'en'),
95 ('via', 'en'),
96 ('want', 'en'),
97 ('was', 'en'),
98 ('way', 'en'),
99 ('were', 'en'),
100 ('what', 'en'),
101 ('when', 'en'),
102 ('where', 'en'),
103 ('whi', 'en'),
104 ('which', 'en'),
105 ('who', 'en'),
106 ('whom', 'en'),
107 ('whose', 'en'),
108 ('why', 'en'),
109 ('wide', 'en'),
110 ('will', 'en'),
111 ('with', 'en'),
112 ('within', 'en'),
113 ('without', 'en'),
114 ('would', 'en'),
115 ('yes', 'en'),
116 ('yet', 'en'),
117 ('you', 'en'),
118 ('your', 'en'),
119 ('yours', 'en');
120
121
122 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
123 ('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);
1 CREATE TABLE IF NOT EXISTS `#__finder_filters` (
2 `filter_id` int(10) unsigned NOT NULL auto_increment,
3 `title` varchar(255) NOT NULL,
4 `alias` varchar(255) NOT NULL,
5 `state` tinyint(1) NOT NULL default '1',
6 `created` datetime NOT NULL default '0000-00-00 00:00:00',
7 `created_by` int(10) unsigned NOT NULL,
8 `created_by_alias` varchar(255) NOT NULL,
9 `modified` datetime NOT NULL default '0000-00-00 00:00:00',
10 `modified_by` int(10) unsigned NOT NULL default '0',
11 `checked_out` int(10) unsigned NOT NULL default '0',
12 `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00',
13 `map_count` int(10) unsigned NOT NULL default '0',
14 `data` text NOT NULL,
15 `params` mediumtext,
16 PRIMARY KEY (`filter_id`)
17 ) DEFAULT CHARSET=utf8;
18
19 CREATE TABLE IF NOT EXISTS `#__finder_links` (
20 `link_id` int(10) unsigned NOT NULL auto_increment,
21 `url` varchar(255) NOT NULL,
22 `route` varchar(255) NOT NULL,
23 `title` varchar(255) default NULL,
24 `description` varchar(255) default NULL,
25 `indexdate` datetime NOT NULL default '0000-00-00 00:00:00',
26 `md5sum` varchar(32) default NULL,
27 `published` tinyint(1) NOT NULL default '1',
28 `state` int(5) default '1',
29 `access` int(5) default '0',
30 `language` varchar(8) NOT NULL,
31 `publish_start_date` datetime NOT NULL default '0000-00-00 00:00:00',
32 `publish_end_date` datetime NOT NULL default '0000-00-00 00:00:00',
33 `start_date` datetime NOT NULL default '0000-00-00 00:00:00',
34 `end_date` datetime NOT NULL default '0000-00-00 00:00:00',
35 `list_price` double unsigned NOT NULL default '0',
36 `sale_price` double unsigned NOT NULL default '0',
37 `type_id` int(11) NOT NULL,
38 `object` mediumblob NOT NULL,
39 PRIMARY KEY (`link_id`),
40 KEY `idx_type` (`type_id`),
41 KEY `idx_title` (`title`),
42 KEY `idx_md5` (`md5sum`),
43 KEY `idx_url` (`url`(75)),
44 KEY `idx_published_list` (`published`,`state`,`access`,`publish_start_date`,`publish_end_date`,`list_price`),
45 KEY `idx_published_sale` (`published`,`state`,`access`,`publish_start_date`,`publish_end_date`,`sale_price`)
46 ) DEFAULT CHARSET=utf8;
47
1 ALTER TABLE `#__menu` DROP INDEX `idx_client_id_parent_id_alias`;
2
3 --
4 -- The following statment had to be modified for utf8mb4 in Joomla! 3.5.1, changing
5 -- `alias` to `alias`(100)
6 --
7
8 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 ...\ No newline at end of file
1 ALTER TABLE `#__updates` ADD COLUMN `infourl` text NOT NULL AFTER `detailsurl`;
1 ALTER TABLE `#__languages` CHANGE `sitename` `sitename` VARCHAR( 1024 ) NOT NULL DEFAULT '';
2
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
2 (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);
3
4 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
5 ('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, '*');
6
7 INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES
8 (LAST_INSERT_ID(), 0);
...\ No newline at end of file ...\ No newline at end of file
1 # Dummy SQL file to set schema version
...\ No newline at end of file ...\ No newline at end of file
1 # Dummy SQL file to set schema version
...\ No newline at end of file ...\ No newline at end of file
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
2 (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);
3
4 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
5 ('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);
1 ALTER TABLE `#__languages` ADD COLUMN `access` integer unsigned NOT NULL default 0 AFTER `published`;
2
3 ALTER TABLE `#__languages` ADD INDEX `idx_access` (`access`);
4
5 UPDATE `#__categories` SET `extension` = 'com_users.notes' WHERE `extension` = 'com_users';
6
7 UPDATE `#__extensions` SET `enabled` = '1' WHERE `protected` = '1' AND `type` <> 'plugin';
1 ALTER TABLE `#__redirect_links` ADD COLUMN `hits` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `comment`;
2 ALTER TABLE `#__users` ADD COLUMN `lastResetTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Date of last password reset';
3 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 ...\ No newline at end of file
1 # Placeholder file for database changes for version 2.5.6
...\ No newline at end of file ...\ No newline at end of file
1 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 ...\ No newline at end of file
1 ALTER TABLE `#__users` DROP INDEX `usertype`;
2 ALTER TABLE `#__session` DROP INDEX `whosonline`;
3
4 DROP TABLE IF EXISTS `#__update_categories`;
5
6 ALTER TABLE `#__contact_details` DROP `imagepos`;
7 ALTER TABLE `#__content` DROP COLUMN `title_alias`;
8 ALTER TABLE `#__content` DROP COLUMN `sectionid`;
9 ALTER TABLE `#__content` DROP COLUMN `mask`;
10 ALTER TABLE `#__content` DROP COLUMN `parentid`;
11 ALTER TABLE `#__newsfeeds` DROP COLUMN `filename`;
12 ALTER TABLE `#__menu` DROP COLUMN `ordering`;
13 ALTER TABLE `#__session` DROP COLUMN `usertype`;
14 ALTER TABLE `#__users` DROP COLUMN `usertype`;
15 ALTER TABLE `#__updates` DROP COLUMN `categoryid`;
16
17 UPDATE `#__extensions` SET protected = 0 WHERE
18 `name` = 'com_search' OR
19 `name` = 'mod_articles_archive' OR
20 `name` = 'mod_articles_latest' OR
21 `name` = 'mod_banners' OR
22 `name` = 'mod_feed' OR
23 `name` = 'mod_footer' OR
24 `name` = 'mod_users_latest' OR
25 `name` = 'mod_articles_category' OR
26 `name` = 'mod_articles_categories' OR
27 `name` = 'plg_content_pagebreak' OR
28 `name` = 'plg_content_pagenavigation' OR
29 `name` = 'plg_content_vote' OR
30 `name` = 'plg_editors_tinymce' OR
31 `name` = 'plg_system_p3p' OR
32 `name` = 'plg_user_contactcreator' OR
33 `name` = 'plg_user_profile';
34
35 DELETE FROM `#__extensions` WHERE `extension_id` = 800;
36
37 ALTER TABLE `#__assets` ENGINE=InnoDB;
38 ALTER TABLE `#__associations` ENGINE=InnoDB;
39 ALTER TABLE `#__banners` ENGINE=InnoDB;
40 ALTER TABLE `#__banner_clients` ENGINE=InnoDB;
41 ALTER TABLE `#__banner_tracks` ENGINE=InnoDB;
42 ALTER TABLE `#__categories` ENGINE=InnoDB;
43 ALTER TABLE `#__contact_details` ENGINE=InnoDB;
44 ALTER TABLE `#__content` ENGINE=InnoDB;
45 ALTER TABLE `#__content_frontpage` ENGINE=InnoDB;
46 ALTER TABLE `#__content_rating` ENGINE=InnoDB;
47 ALTER TABLE `#__core_log_searches` ENGINE=InnoDB;
48 ALTER TABLE `#__extensions` ENGINE=InnoDB;
49 ALTER TABLE `#__finder_filters` ENGINE=InnoDB;
50 ALTER TABLE `#__finder_links` ENGINE=InnoDB;
51 ALTER TABLE `#__finder_links_terms0` ENGINE=InnoDB;
52 ALTER TABLE `#__finder_links_terms1` ENGINE=InnoDB;
53 ALTER TABLE `#__finder_links_terms2` ENGINE=InnoDB;
54 ALTER TABLE `#__finder_links_terms3` ENGINE=InnoDB;
55 ALTER TABLE `#__finder_links_terms4` ENGINE=InnoDB;
56 ALTER TABLE `#__finder_links_terms5` ENGINE=InnoDB;
57 ALTER TABLE `#__finder_links_terms6` ENGINE=InnoDB;
58 ALTER TABLE `#__finder_links_terms7` ENGINE=InnoDB;
59 ALTER TABLE `#__finder_links_terms8` ENGINE=InnoDB;
60 ALTER TABLE `#__finder_links_terms9` ENGINE=InnoDB;
61 ALTER TABLE `#__finder_links_termsa` ENGINE=InnoDB;
62 ALTER TABLE `#__finder_links_termsb` ENGINE=InnoDB;
63 ALTER TABLE `#__finder_links_termsc` ENGINE=InnoDB;
64 ALTER TABLE `#__finder_links_termsd` ENGINE=InnoDB;
65 ALTER TABLE `#__finder_links_termse` ENGINE=InnoDB;
66 ALTER TABLE `#__finder_links_termsf` ENGINE=InnoDB;
67 ALTER TABLE `#__finder_taxonomy` ENGINE=InnoDB;
68 ALTER TABLE `#__finder_taxonomy_map` ENGINE=InnoDB;
69 ALTER TABLE `#__finder_terms` ENGINE=InnoDB;
70 ALTER TABLE `#__finder_terms_common` ENGINE=InnoDB;
71 ALTER TABLE `#__finder_types` ENGINE=InnoDB;
72 ALTER TABLE `#__languages` ENGINE=InnoDB;
73 ALTER TABLE `#__menu` ENGINE=InnoDB;
74 ALTER TABLE `#__menu_types` ENGINE=InnoDB;
75 ALTER TABLE `#__messages` ENGINE=InnoDB;
76 ALTER TABLE `#__messages_cfg` ENGINE=InnoDB;
77 ALTER TABLE `#__modules` ENGINE=InnoDB;
78 ALTER TABLE `#__modules_menu` ENGINE=InnoDB;
79 ALTER TABLE `#__newsfeeds` ENGINE=InnoDB;
80 ALTER TABLE `#__overrider` ENGINE=InnoDB;
81 ALTER TABLE `#__redirect_links` ENGINE=InnoDB;
82 ALTER TABLE `#__schemas` ENGINE=InnoDB;
83 ALTER TABLE `#__session` ENGINE=InnoDB;
84 ALTER TABLE `#__template_styles` ENGINE=InnoDB;
85 ALTER TABLE `#__updates` ENGINE=InnoDB;
86 ALTER TABLE `#__update_sites` ENGINE=InnoDB;
87 ALTER TABLE `#__update_sites_extensions` ENGINE=InnoDB;
88 ALTER TABLE `#__users` ENGINE=InnoDB;
89 ALTER TABLE `#__usergroups` ENGINE=InnoDB;
90 ALTER TABLE `#__user_notes` ENGINE=InnoDB;
91 ALTER TABLE `#__user_profiles` ENGINE=InnoDB;
92 ALTER TABLE `#__user_usergroup_map` ENGINE=InnoDB;
93 ALTER TABLE `#__viewlevels` ENGINE=InnoDB;
94
95 ALTER TABLE `#__newsfeeds` ADD COLUMN `description` text NOT NULL;
96 ALTER TABLE `#__newsfeeds` ADD COLUMN `version` int(10) unsigned NOT NULL DEFAULT '1';
97 ALTER TABLE `#__newsfeeds` ADD COLUMN `hits` int(10) unsigned NOT NULL DEFAULT '0';
98 ALTER TABLE `#__newsfeeds` ADD COLUMN `images` text NOT NULL;
99 ALTER TABLE `#__contact_details` ADD COLUMN `version` int(10) unsigned NOT NULL DEFAULT '1';
100 ALTER TABLE `#__contact_details` ADD COLUMN `hits` int(10) unsigned NOT NULL DEFAULT '0';
101 ALTER TABLE `#__banners` ADD COLUMN `created_by` int(10) unsigned NOT NULL DEFAULT '0';
102 ALTER TABLE `#__banners` ADD COLUMN `created_by_alias` varchar(255) NOT NULL DEFAULT '';
103 ALTER TABLE `#__banners` ADD COLUMN `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';
104 ALTER TABLE `#__banners` ADD COLUMN `modified_by` int(10) unsigned NOT NULL DEFAULT '0';
105 ALTER TABLE `#__banners` ADD COLUMN `version` int(10) unsigned NOT NULL DEFAULT '1';
106 ALTER TABLE `#__categories` ADD COLUMN `version` int(10) unsigned NOT NULL DEFAULT '1';
107 UPDATE `#__assets` SET name=REPLACE( name, 'com_user.notes.category','com_users.category' );
108 UPDATE `#__categories` SET extension=REPLACE( extension, 'com_user.notes.category','com_users.category' );
109
110 ALTER TABLE `#__finder_terms` ADD COLUMN `language` char(3) NOT NULL DEFAULT '';
111 ALTER TABLE `#__finder_tokens` ADD COLUMN `language` char(3) NOT NULL DEFAULT '';
112 ALTER TABLE `#__finder_tokens_aggregate` ADD COLUMN `language` char(3) NOT NULL DEFAULT '';
113
114 INSERT INTO `#__extensions`
115 (`name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`)
116 VALUES
117 ('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),
118 ('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),
119 ('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);
120
121 INSERT INTO `#__template_styles` (`template`, `client_id`, `home`, `title`, `params`) VALUES
122 ('protostar', 0, '0', 'protostar - Default', '{"templateColor":"","logoFile":"","googleFont":"1","googleFontName":"Open+Sans","fluidContainer":"0"}'),
123 ('isis', 1, '1', 'isis - Default', '{"templateColor":"","logoFile":""}'),
124 ('beez3', 0, '0', 'beez3 - Default', '{"wrapperSmall":53,"wrapperLarge":72,"logo":"","sitetitle":"","sitedescription":"","navposition":"center","bootstrap":"","templatecolor":"nature","headerImage":"","backgroundcolor":"#eee"}');
125
126 UPDATE `#__template_styles`
127 SET home = (CASE WHEN (SELECT count FROM (SELECT count(`id`) AS count
128 FROM `#__template_styles`
129 WHERE home = '1'
130 AND client_id = 1) as c) = 0
131 THEN '1'
132 ELSE '0'
133 END)
134 WHERE template = 'isis'
135 AND home != '1';
136
137 UPDATE `#__template_styles`
138 SET home = 0
139 WHERE template = 'bluestork';
140
141 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
142 (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);
143
144 UPDATE `#__update_sites`
145 SET location = 'https://update.joomla.org/language/translationlist_3.xml'
146 WHERE location = 'https://update.joomla.org/language/translationlist.xml'
147 AND name = 'Accredited Joomla! Translations';
1 # Placeholder file for database changes for version 3.0.1
...\ No newline at end of file ...\ No newline at end of file
1 # Placeholder file for database changes for version 3.0.2
...\ No newline at end of file ...\ No newline at end of file
1 ALTER TABLE `#__associations` CHANGE `id` `id` INT(11) NOT NULL COMMENT 'A reference to the associated item.';
...\ No newline at end of file ...\ No newline at end of file
1 # Placeholder file for database changes for version 3.1.1
...\ No newline at end of file ...\ No newline at end of file
1 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';
2 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';
3 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';
4 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';
5 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';
6 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';
7 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';
8 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';
9 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';
10 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';
11 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';
12 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';
13 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';
14 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';
15 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';
16 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';
1 # Placeholder file for database changes for version 3.1.3
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
2 (104, 'IDNA Convert', 'library', 'idna_convert', '', 0, 1, 1, 1, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
1 # Placeholder file for database changes for version 3.1.5
1 DELETE FROM `#__postinstall_messages` WHERE `title_key` = 'PLG_USER_JOOMLA_POSTINSTALL_STRONGPW_TITLE';
1 ALTER TABLE `#__update_sites` ADD COLUMN `extra_query` VARCHAR(1000) DEFAULT '';
2 ALTER TABLE `#__updates` ADD COLUMN `extra_query` VARCHAR(1000) DEFAULT '';
1 UPDATE `#__menu` SET `component_id` = (SELECT `extension_id` FROM `#__extensions` WHERE `element` = 'com_joomlaupdate') WHERE `link` = 'index.php?option=com_joomlaupdate';
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
2 (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 ...\ No newline at end of file
1 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
2 (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);
1 /* Update updates version length */
2 ALTER TABLE `#__updates` MODIFY `version` varchar(32) DEFAULT '';
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
2 (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);
1 UPDATE `#__extensions` ext1, `#__extensions` ext2 SET ext1.`params` = ext2.`params` WHERE ext1.`name` = 'plg_authentication_cookie' AND ext2.`name` = 'plg_system_remember';
1 ALTER TABLE `#__users` ADD COLUMN `requireReset` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'Require user to reset password on next login' AFTER `otep`;
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
2 (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);
3
1 ALTER TABLE `#__user_profiles` CHANGE `profile_value` `profile_value` TEXT NOT NULL;
1 INSERT INTO `#__update_sites` (`name`, `type`, `location`, `enabled`) VALUES
2 ('Joomla! Update Component Update Site', 'extension', 'https://update.joomla.org/core/extensions/com_joomlaupdate.xml', 1);
3
4 INSERT INTO `#__update_sites_extensions` (`update_site_id`, `extension_id`) VALUES
5 ((SELECT `update_site_id` FROM `#__update_sites` WHERE `name` = 'Joomla! Update Component Update Site'), (SELECT `extension_id` FROM `#__extensions` WHERE `name` = 'com_joomlaupdate'));
1 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`)
2 VALUES
3 (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);
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
2 (801, 'weblinks', 'package', 'pkg_weblinks', '', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
3
4 INSERT INTO `#__update_sites` (`name`, `type`, `location`, `enabled`) VALUES
5 ('Weblinks Update Site', 'extension', 'https://raw.githubusercontent.com/joomla-extensions/weblinks/master/manifest.xml', 1);
6
7 INSERT INTO `#__update_sites_extensions` (`update_site_id`, `extension_id`) VALUES
8 ((SELECT `update_site_id` FROM `#__update_sites` WHERE `name` = 'Weblinks Update Site'), 801);
1 ALTER TABLE `#__redirect_links` ADD COLUMN `header` smallint(3) NOT NULL DEFAULT 301;
2 --
3 -- The following statement has to be disabled because it conflicts with
4 -- a later change added with Joomla! 3.5.0 for long URLs in this table
5 --
6 -- ALTER TABLE `#__redirect_links` MODIFY `new_url` varchar(255);
1 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!