primo commit
This commit is contained in:
13
.gitignore
vendored
Normal file
13
.gitignore
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/configuration.php
|
||||||
|
/.ddev
|
||||||
|
/.vscode
|
||||||
|
.DS_Store
|
||||||
|
._.DS_Store
|
||||||
|
**/.DS_Store
|
||||||
|
**/._.DS_Store
|
||||||
|
images/
|
||||||
|
phocadownload/
|
||||||
|
phocadownloadapp/
|
||||||
|
programmi/
|
||||||
|
pdf/
|
||||||
|
attachments/
|
||||||
191
.htaccess
Normal file
191
.htaccess
Normal file
@ -0,0 +1,191 @@
|
|||||||
|
##
|
||||||
|
# @package Joomla
|
||||||
|
# @copyright (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
# @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
##
|
||||||
|
|
||||||
|
##
|
||||||
|
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
|
||||||
|
#
|
||||||
|
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
|
||||||
|
# It is required for the use of Apache mod_rewrite, but it may have already been set by
|
||||||
|
# your server administrator in a way that disallows changing it in this .htaccess file.
|
||||||
|
# If using it causes your site to produce an error, comment it out (add # to the
|
||||||
|
# beginning of the line), reload your site in your browser and test your sef urls. If
|
||||||
|
# they work, then it has been set by your server administrator and you do not need to
|
||||||
|
# set it here.
|
||||||
|
##
|
||||||
|
|
||||||
|
## MISSING CSS OR JAVASCRIPT ERRORS
|
||||||
|
#
|
||||||
|
# If your site looks strange after enabling this file, then your server is probably already
|
||||||
|
# gzipping css and js files and you should comment out the GZIP section of this file.
|
||||||
|
##
|
||||||
|
|
||||||
|
## OPENLITESPEED
|
||||||
|
#
|
||||||
|
# If you are using an OpenLiteSpeed web server then any changes made to this file will
|
||||||
|
# not take effect until you have restarted the web server.
|
||||||
|
##
|
||||||
|
|
||||||
|
## Can be commented out if causes errors, see notes above.
|
||||||
|
Options +FollowSymlinks
|
||||||
|
Options -Indexes
|
||||||
|
|
||||||
|
## No directory listings
|
||||||
|
<IfModule mod_autoindex.c>
|
||||||
|
IndexIgnore *
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
## Suppress mime type detection in browsers for unknown types
|
||||||
|
<IfModule mod_headers.c>
|
||||||
|
Header always set X-Content-Type-Options "nosniff"
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
## Protect against certain cross-origin requests. More information can be found here:
|
||||||
|
## https://developer.mozilla.org/en-US/docs/Web/HTTP/Cross-Origin_Resource_Policy_(CORP)
|
||||||
|
## https://web.dev/why-coop-coep/
|
||||||
|
#<IfModule mod_headers.c>
|
||||||
|
# Header always set Cross-Origin-Resource-Policy "same-origin"
|
||||||
|
# Header always set Cross-Origin-Embedder-Policy "require-corp"
|
||||||
|
#</IfModule>
|
||||||
|
|
||||||
|
## Disable inline JavaScript when directly opening SVG files or embedding them with the object-tag
|
||||||
|
<FilesMatch "\.svg$">
|
||||||
|
<IfModule mod_headers.c>
|
||||||
|
Header always set Content-Security-Policy "script-src 'none'"
|
||||||
|
</IfModule>
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
## These directives are only enabled if the Apache mod_rewrite module is enabled
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
## Begin - Rewrite rules to block out some common exploits.
|
||||||
|
# If you experience problems on your site then comment out the operations listed
|
||||||
|
# below by adding a # to the beginning of the line.
|
||||||
|
# This attempts to block the most common type of exploit `attempts` on Joomla!
|
||||||
|
#
|
||||||
|
# Block any script trying to base64_encode data within the URL.
|
||||||
|
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
|
||||||
|
# Block any script that includes a <script> tag in URL.
|
||||||
|
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
|
||||||
|
# Block any script trying to set a PHP GLOBALS variable via URL.
|
||||||
|
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
|
||||||
|
# Block any script trying to modify a _REQUEST variable via URL.
|
||||||
|
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
|
||||||
|
# Return 403 Forbidden header and show the content of the root home page
|
||||||
|
RewriteRule .* index.php [F]
|
||||||
|
#
|
||||||
|
## End - Rewrite rules to block out some common exploits.
|
||||||
|
|
||||||
|
## Begin - Custom redirects
|
||||||
|
#
|
||||||
|
# If you need to redirect some pages, or set a canonical non-www to
|
||||||
|
# www redirect (or vice versa), place that code here. Ensure those
|
||||||
|
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
|
||||||
|
#
|
||||||
|
## End - Custom redirects
|
||||||
|
|
||||||
|
##
|
||||||
|
# Uncomment the following line if your webserver's URL
|
||||||
|
# is not directly related to physical file paths.
|
||||||
|
# Update Your Joomla! Directory (just / for root).
|
||||||
|
##
|
||||||
|
|
||||||
|
# RewriteBase /
|
||||||
|
|
||||||
|
## Begin - Joomla! core SEF Section.
|
||||||
|
#
|
||||||
|
# PHP FastCGI fix for HTTP Authorization, required for the API application
|
||||||
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
# -- SEF URLs for the API application
|
||||||
|
# If the requested path starts with /api, the file is not /api/index.php
|
||||||
|
# and the request has not already been internally rewritten to the
|
||||||
|
# api/index.php script
|
||||||
|
RewriteCond %{REQUEST_URI} ^/api/
|
||||||
|
RewriteCond %{REQUEST_URI} !^/api/index\.php
|
||||||
|
# and the requested path and file doesn't directly match a physical file
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
# and the requested path and file doesn't directly match a physical folder
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
# internally rewrite the request to the /api/index.php script
|
||||||
|
RewriteRule .* api/index.php [L]
|
||||||
|
# -- SEF URLs for the public frontend application
|
||||||
|
# If the requested path and file is not /index.php and the request
|
||||||
|
# has not already been internally rewritten to the index.php script
|
||||||
|
RewriteCond %{REQUEST_URI} !^/index\.php
|
||||||
|
# and the requested path and file doesn't directly match a physical file
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
# and the requested path and file doesn't directly match a physical folder
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
# internally rewrite the request to the index.php script
|
||||||
|
RewriteRule .* index.php [L]
|
||||||
|
#
|
||||||
|
## End - Joomla! core SEF Section.
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
## These directives are only enabled if the Apache mod_rewrite module is disabled
|
||||||
|
<IfModule !mod_rewrite.c>
|
||||||
|
<IfModule mod_alias.c>
|
||||||
|
# When Apache mod_rewrite is not available, we instruct a temporary redirect
|
||||||
|
# of the start page to the front controller explicitly so that the website
|
||||||
|
# and the generated links can still be used.
|
||||||
|
RedirectMatch 302 ^/$ /index.php/
|
||||||
|
# RedirectTemp cannot be used instead
|
||||||
|
</IfModule>
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
## GZIP & BROTLI
|
||||||
|
## These directives are only enabled if the Apache mod_headers module is enabled.
|
||||||
|
## This section will check if a .gz file exists and if so will stream it
|
||||||
|
## directly or fallback to gzip any asset on the fly
|
||||||
|
## If your site starts to look strange after enabling this file, and you see
|
||||||
|
## ERR_CONTENT_DECODING_FAILED in your browser console network tab,
|
||||||
|
## then your server is already gzipping css and js files and you don't need this
|
||||||
|
## block enabled in your .htaccess
|
||||||
|
<IfModule mod_headers.c>
|
||||||
|
# Serve gzip compressed CSS files if they exist
|
||||||
|
# and the client accepts gzip.
|
||||||
|
RewriteCond "%{HTTP:Accept-encoding}" "gzip"
|
||||||
|
RewriteCond "%{REQUEST_FILENAME}\.gz" -s
|
||||||
|
RewriteRule "^(.*)\.css" "$1\.css\.gz" [QSA]
|
||||||
|
|
||||||
|
# Serve gzip compressed JS files if they exist
|
||||||
|
# and the client accepts gzip.
|
||||||
|
RewriteCond "%{HTTP:Accept-encoding}" "gzip"
|
||||||
|
RewriteCond "%{REQUEST_FILENAME}\.gz" -s
|
||||||
|
RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA]
|
||||||
|
|
||||||
|
# Serve correct content types, and prevent mod_deflate double compression.
|
||||||
|
RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1,E=no-brotli:1]
|
||||||
|
RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1,E=no-brotli:1]
|
||||||
|
|
||||||
|
<FilesMatch "(\.js\.gz|\.css\.gz)$">
|
||||||
|
# Serve correct encoding type.
|
||||||
|
Header set Content-Encoding gzip
|
||||||
|
|
||||||
|
# Force proxies to cache gzipped &
|
||||||
|
# non-gzipped css/js files separately.
|
||||||
|
Header append Vary Accept-Encoding
|
||||||
|
</FilesMatch>
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
#----------------------------------------------------------------cp:ppd
|
||||||
|
# Section managed by cPanel: Password Protected Directories -cp:ppd
|
||||||
|
# - Do not edit this section of the htaccess file! -cp:ppd
|
||||||
|
#----------------------------------------------------------------cp:ppd
|
||||||
|
AuthType Basic
|
||||||
|
AuthName "Protected 'demo.conservatorio.udine.it'"
|
||||||
|
AuthUserFile "/home/btiajcug/.htpasswds/demo.conservatorio.udine.it/passwd"
|
||||||
|
Require valid-user
|
||||||
|
#----------------------------------------------------------------cp:ppd
|
||||||
|
# End section managed by cPanel: Password Protected Directories -cp:ppd
|
||||||
|
#----------------------------------------------------------------cp:ppd
|
||||||
|
|
||||||
|
# php -- BEGIN cPanel-generated handler, do not edit
|
||||||
|
# Set the “ea-php83” package as the default “PHP” programming language.
|
||||||
|
<IfModule mime_module>
|
||||||
|
AddHandler application/x-httpd-ea-php83___lsphp .php .php8 .phtml
|
||||||
|
</IfModule>
|
||||||
|
# php -- END cPanel-generated handler, do not edit
|
||||||
4
BingSiteAuth.xml
Normal file
4
BingSiteAuth.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<users>
|
||||||
|
<user>F82C03FF3E010578202C6A69479DE9FD</user>
|
||||||
|
</users>
|
||||||
339
LICENSE.txt
Normal file
339
LICENSE.txt
Normal file
@ -0,0 +1,339 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Lesser General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License.
|
||||||
75
README.txt
Normal file
75
README.txt
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
Joomla! CMS™
|
||||||
|
|
||||||
|
1- Overview
|
||||||
|
* This is a Joomla! 5.x installation/upgrade package.
|
||||||
|
* Joomla! Official site: https://www.joomla.org
|
||||||
|
* Joomla! 5.2 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_5.2_version_history
|
||||||
|
* Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/5.2-dev
|
||||||
|
|
||||||
|
2- What is Joomla?
|
||||||
|
* Joomla! is a Content Management System (CMS) which enables you to build websites and powerful online applications.
|
||||||
|
* It's a free and Open Source software, distributed under the GNU General Public License version 2 or later.
|
||||||
|
* This is a simple and powerful web server application and it requires a server with PHP and either MySQL, MariaDB or PostgreSQL to run.
|
||||||
|
You can find full technical requirements here: https://downloads.joomla.org/technical-requirements.
|
||||||
|
|
||||||
|
3- Is Joomla! for you?
|
||||||
|
* Joomla! is the right solution for most content web projects: https://docs.joomla.org/Special:MyLanguage/Portal:Learn_More
|
||||||
|
* See Joomla's core features - https://www.joomla.org/core-features.html
|
||||||
|
* Try out our free hosting service: https://launch.joomla.org
|
||||||
|
|
||||||
|
4- How to find a Joomla! translation?
|
||||||
|
* Repository of accredited language packs: https://downloads.joomla.org/language-packs
|
||||||
|
* You can also add languages directly to your website via your Joomla! administration panel: https://docs.joomla.org/Special:MyLanguage/J5.x:Setup_a_Multilingual_Site/Installing_New_Language
|
||||||
|
* Learn how to setup a Multilingual Joomla! Site: https://docs.joomla.org/Special:MyLanguage/J5.x:Setup_a_Multilingual_Site
|
||||||
|
|
||||||
|
5- Learn Joomla!
|
||||||
|
* Read Getting Started with Joomla to find out the basics: https://docs.joomla.org/Special:MyLanguage/J5.x:Getting_Started_with_Joomla!
|
||||||
|
* Before installing, read the beginners guide: https://docs.joomla.org/Special:MyLanguage/Portal:Beginners
|
||||||
|
|
||||||
|
6- What are the benefits of Joomla?
|
||||||
|
* The functionality of a Joomla! website can be extended by installing extensions that you can create (or download) to suit your needs.
|
||||||
|
* There are many ready-made extensions that you can download and install.
|
||||||
|
* Check out the Joomla! Extensions Directory (JED): https://extensions.joomla.org
|
||||||
|
|
||||||
|
7- Is it easy to change the layout display?
|
||||||
|
* The layout is controlled by templates that you can edit.
|
||||||
|
* There are a lot of ready-made professional templates that you can download.
|
||||||
|
* Check out the template management information: https://docs.joomla.org/Special:MyLanguage/Portal:Template_Management
|
||||||
|
|
||||||
|
8- Ready to install Joomla?
|
||||||
|
* Check the minimum requirements here: https://downloads.joomla.org/technical-requirements
|
||||||
|
* How do you install Joomla - https://docs.joomla.org/Special:MyLanguage/J5.x:Installing_Joomla
|
||||||
|
* You could start your Joomla! experience building your site on a local test server.
|
||||||
|
When ready it can be moved to an online hosting account of your choice.
|
||||||
|
See the tutorial: https://docs.joomla.org/Special:MyLanguage/Installing_Joomla_locally
|
||||||
|
|
||||||
|
9- Updates are free!
|
||||||
|
* Always use the latest version: https://downloads.joomla.org/latest
|
||||||
|
|
||||||
|
10- Where can you get support and help?
|
||||||
|
* The Joomla! Documentation: https://docs.joomla.org/Special:MyLanguage/Main_Page
|
||||||
|
* FAQ Frequently Asked Questions: https://docs.joomla.org/Special:MyLanguage/Category:FAQ
|
||||||
|
* Find the information you need: https://docs.joomla.org/Special:MyLanguage/Start_here
|
||||||
|
* Find help and other users: https://www.joomla.org/about-joomla/create-and-share.html
|
||||||
|
* Post questions at our forums: https://forum.joomla.org
|
||||||
|
* Joomla! Resources Directory (JRD): https://community.joomla.org/service-providers-directory/
|
||||||
|
|
||||||
|
11- Do you already have a Joomla! site that's not built with Joomla! 5.x ?
|
||||||
|
* What's new in Joomla! 5.x: https://www.joomla.org/5
|
||||||
|
* What are the main differences between 4.x and 5.x? https://docs.joomla.org/Special:MyLanguage/What_are_the_major_differences_between_Joomla!_4.x_and_5.x
|
||||||
|
* How to migrate from 4.x to 5.x? Tutorial: https://docs.joomla.org/Special:MyLanguage/Joomla_4.x_to_5.x_Step_by_Step_Migration
|
||||||
|
* How to migrate from 3.x to 4.x? Tutorial: https://docs.joomla.org/Special:MyLanguage/Joomla_3.x_to_4.x_Step_by_Step_Migration
|
||||||
|
* How to migrate from 2.5.x to 3.x? Tutorial: https://docs.joomla.org/Special:MyLanguage/Joomla_2.5_to_3.x_Step_by_Step_Migration
|
||||||
|
* How to migrate from 1.5.x to 3.x? Tutorial: https://docs.joomla.org/Special:MyLanguage/Joomla_1.5_to_3.x_Step_by_Step_Migration
|
||||||
|
|
||||||
|
12- Do you want to improve Joomla?
|
||||||
|
* Where to request a feature? https://issues.joomla.org
|
||||||
|
* How do you report a bug? https://docs.joomla.org/Special:MyLanguage/Filing_bugs_and_issues
|
||||||
|
* Get Involved: Joomla! is a community developed software. Join the community at https://volunteers.joomla.org
|
||||||
|
* Documentation for Developers: https://docs.joomla.org/Special:MyLanguage/Portal:Developers
|
||||||
|
* Documentation for Web designers: https://docs.joomla.org/Special:MyLanguage/Web_designers
|
||||||
|
|
||||||
|
Copyright:
|
||||||
|
* (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* Distributed under the GNU General Public License version 2 or later
|
||||||
|
* See License details at https://docs.joomla.org/Special:MyLanguage/Joomla_Licenses
|
||||||
@ -0,0 +1 @@
|
|||||||
|
<?php die("Access Denied"); ?>#x#a:2:{s:6:"result";s:6:"693cb2";s:6:"output";s:0:"";}
|
||||||
1
administrator/cache/_media_version/index.html
vendored
Normal file
1
administrator/cache/_media_version/index.html
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
<!DOCTYPE html><title></title>
|
||||||
284
administrator/cache/autoload_psr4.php
vendored
Normal file
284
administrator/cache/autoload_psr4.php
vendored
Normal file
@ -0,0 +1,284 @@
|
|||||||
|
<?php
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
return [
|
||||||
|
'Joomla\\Component\\Actionlogs\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_actionlogs/src'],
|
||||||
|
'Joomla\\Component\\Admin\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_admin/src'],
|
||||||
|
'Joomla\\Component\\Associations\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_associations/src'],
|
||||||
|
'Joomla\\Component\\Banners\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_banners/src'],
|
||||||
|
'Joomla\\Component\\Banners\\Api\\' => [JPATH_API . '/components/com_banners/src'],
|
||||||
|
'Joomla\\Component\\Banners\\Site\\' => [JPATH_SITE . '/components/com_banners/src'],
|
||||||
|
'Joomla\\Component\\Cache\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_cache/src'],
|
||||||
|
'Joomla\\Component\\Categories\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_categories/src'],
|
||||||
|
'Joomla\\Component\\Categories\\Api\\' => [JPATH_API . '/components/com_categories/src'],
|
||||||
|
'Joomla\\Component\\Checkin\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_checkin/src'],
|
||||||
|
'Joomla\\Component\\Config\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_config/src'],
|
||||||
|
'Joomla\\Component\\Config\\Api\\' => [JPATH_API . '/components/com_config/src'],
|
||||||
|
'Joomla\\Component\\Config\\Site\\' => [JPATH_SITE . '/components/com_config/src'],
|
||||||
|
'Joomla\\Component\\Contact\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_contact/src'],
|
||||||
|
'Joomla\\Component\\Contact\\Api\\' => [JPATH_API . '/components/com_contact/src'],
|
||||||
|
'Joomla\\Component\\Contact\\Site\\' => [JPATH_SITE . '/components/com_contact/src'],
|
||||||
|
'Joomla\\Component\\Content\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_content/src'],
|
||||||
|
'Joomla\\Component\\Content\\Api\\' => [JPATH_API . '/components/com_content/src'],
|
||||||
|
'Joomla\\Component\\Content\\Site\\' => [JPATH_SITE . '/components/com_content/src'],
|
||||||
|
'Joomla\\Component\\Contenthistory\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_contenthistory/src'],
|
||||||
|
'Joomla\\Component\\Contenthistory\\Api\\' => [JPATH_API . '/components/com_contenthistory/src'],
|
||||||
|
'Joomla\\Component\\Contenthistory\\Site\\' => [JPATH_SITE . '/components/com_contenthistory/src'],
|
||||||
|
'Joomla\\Component\\Cpanel\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_cpanel/src'],
|
||||||
|
'Joomla\\Component\\Fields\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_fields/src'],
|
||||||
|
'Joomla\\Component\\Fields\\Api\\' => [JPATH_API . '/components/com_fields/src'],
|
||||||
|
'Joomla\\Component\\Fields\\Site\\' => [JPATH_SITE . '/components/com_fields/src'],
|
||||||
|
'Joomla\\Component\\Finder\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_finder/src'],
|
||||||
|
'Joomla\\Component\\Finder\\Site\\' => [JPATH_SITE . '/components/com_finder/src'],
|
||||||
|
'Joomla\\Component\\Guidedtours\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_guidedtours/src'],
|
||||||
|
'Joomla\\Component\\Installer\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_installer/src'],
|
||||||
|
'Joomla\\Component\\Installer\\Api\\' => [JPATH_API . '/components/com_installer/src'],
|
||||||
|
'Joomla\\Component\\Joomlaupdate\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_joomlaupdate/src'],
|
||||||
|
'Joomla\\Component\\Languages\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_languages/src'],
|
||||||
|
'Joomla\\Component\\Languages\\Api\\' => [JPATH_API . '/components/com_languages/src'],
|
||||||
|
'Joomla\\Component\\Login\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_login/src'],
|
||||||
|
'Joomla\\Component\\Mails\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_mails/src'],
|
||||||
|
'Joomla\\Component\\Media\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_media/src'],
|
||||||
|
'Joomla\\Component\\Media\\Api\\' => [JPATH_API . '/components/com_media/src'],
|
||||||
|
'Joomla\\Component\\Media\\Site\\' => [JPATH_SITE . '/components/com_media/src'],
|
||||||
|
'Joomla\\Component\\Menus\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_menus/src'],
|
||||||
|
'Joomla\\Component\\Menus\\Api\\' => [JPATH_API . '/components/com_menus/src'],
|
||||||
|
'Joomla\\Component\\Menus\\Site\\' => [JPATH_SITE . '/components/com_menus/src'],
|
||||||
|
'Joomla\\Component\\Messages\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_messages/src'],
|
||||||
|
'Joomla\\Component\\Messages\\Api\\' => [JPATH_API . '/components/com_messages/src'],
|
||||||
|
'Joomla\\Component\\Modules\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_modules/src'],
|
||||||
|
'Joomla\\Component\\Modules\\Api\\' => [JPATH_API . '/components/com_modules/src'],
|
||||||
|
'Joomla\\Component\\Modules\\Site\\' => [JPATH_SITE . '/components/com_modules/src'],
|
||||||
|
'Joomla\\Component\\Newsfeeds\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_newsfeeds/src'],
|
||||||
|
'Joomla\\Component\\Newsfeeds\\Api\\' => [JPATH_API . '/components/com_newsfeeds/src'],
|
||||||
|
'Joomla\\Component\\Newsfeeds\\Site\\' => [JPATH_SITE . '/components/com_newsfeeds/src'],
|
||||||
|
'Joomla\\Component\\Plugins\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_plugins/src'],
|
||||||
|
'Joomla\\Component\\Plugins\\Api\\' => [JPATH_API . '/components/com_plugins/src'],
|
||||||
|
'Joomla\\Component\\Postinstall\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_postinstall/src'],
|
||||||
|
'Joomla\\Component\\Privacy\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_privacy/src'],
|
||||||
|
'Joomla\\Component\\Privacy\\Api\\' => [JPATH_API . '/components/com_privacy/src'],
|
||||||
|
'Joomla\\Component\\Privacy\\Site\\' => [JPATH_SITE . '/components/com_privacy/src'],
|
||||||
|
'Joomla\\Component\\Redirect\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_redirect/src'],
|
||||||
|
'Joomla\\Component\\Redirect\\Api\\' => [JPATH_API . '/components/com_redirect/src'],
|
||||||
|
'Joomla\\Component\\Scheduler\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_scheduler/src'],
|
||||||
|
'Joomla\\Component\\Tags\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_tags/src'],
|
||||||
|
'Joomla\\Component\\Tags\\Api\\' => [JPATH_API . '/components/com_tags/src'],
|
||||||
|
'Joomla\\Component\\Tags\\Site\\' => [JPATH_SITE . '/components/com_tags/src'],
|
||||||
|
'Joomla\\Component\\Templates\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_templates/src'],
|
||||||
|
'Joomla\\Component\\Templates\\Api\\' => [JPATH_API . '/components/com_templates/src'],
|
||||||
|
'Joomla\\Component\\Users\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_users/src'],
|
||||||
|
'Joomla\\Component\\Users\\Api\\' => [JPATH_API . '/components/com_users/src'],
|
||||||
|
'Joomla\\Component\\Users\\Site\\' => [JPATH_SITE . '/components/com_users/src'],
|
||||||
|
'Joomla\\Component\\Workflow\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_workflow/src'],
|
||||||
|
'Joomla\\Component\\Wrapper\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_wrapper/src'],
|
||||||
|
'Joomla\\Component\\Wrapper\\Site\\' => [JPATH_SITE . '/components/com_wrapper/src'],
|
||||||
|
'Joomla\\Module\\ArticlesArchive\\Site\\' => [JPATH_SITE . '/modules/mod_articles_archive/src'],
|
||||||
|
'Joomla\\Module\\ArticlesCategories\\Site\\' => [JPATH_SITE . '/modules/mod_articles_categories/src'],
|
||||||
|
'Joomla\\Module\\ArticlesCategory\\Site\\' => [JPATH_SITE . '/modules/mod_articles_category/src'],
|
||||||
|
'Joomla\\Module\\ArticlesLatest\\Site\\' => [JPATH_SITE . '/modules/mod_articles_latest/src'],
|
||||||
|
'Joomla\\Module\\ArticlesNews\\Site\\' => [JPATH_SITE . '/modules/mod_articles_news/src'],
|
||||||
|
'Joomla\\Module\\ArticlesPopular\\Site\\' => [JPATH_SITE . '/modules/mod_articles_popular/src'],
|
||||||
|
'Joomla\\Module\\Articles\\Site\\' => [JPATH_SITE . '/modules/mod_articles/src'],
|
||||||
|
'Joomla\\Module\\Banners\\Site\\' => [JPATH_SITE . '/modules/mod_banners/src'],
|
||||||
|
'Joomla\\Module\\Breadcrumbs\\Site\\' => [JPATH_SITE . '/modules/mod_breadcrumbs/src'],
|
||||||
|
'Joomla\\Module\\Custom\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_custom/src'],
|
||||||
|
'Joomla\\Module\\Custom\\Site\\' => [JPATH_SITE . '/modules/mod_custom/src'],
|
||||||
|
'Joomla\\Module\\Feed\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_feed/src'],
|
||||||
|
'Joomla\\Module\\Feed\\Site\\' => [JPATH_SITE . '/modules/mod_feed/src'],
|
||||||
|
'Joomla\\Module\\Finder\\Site\\' => [JPATH_SITE . '/modules/mod_finder/src'],
|
||||||
|
'Joomla\\Module\\Footer\\Site\\' => [JPATH_SITE . '/modules/mod_footer/src'],
|
||||||
|
'Joomla\\Module\\Frontend\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_frontend/src'],
|
||||||
|
'Joomla\\Module\\GuidedTours\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_guidedtours/src'],
|
||||||
|
'Joomla\\Module\\Jlcontentfieldsfilter\\Site\\' => [JPATH_SITE . '/modules/mod_jlcontentfieldsfilter/src'],
|
||||||
|
'Joomla\\Module\\Languages\\Site\\' => [JPATH_SITE . '/modules/mod_languages/src'],
|
||||||
|
'Joomla\\Module\\LatestActions\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_latestactions/src'],
|
||||||
|
'Joomla\\Module\\Latest\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_latest/src'],
|
||||||
|
'Joomla\\Module\\Logged\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_logged/src'],
|
||||||
|
'Joomla\\Module\\Login\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_login/src'],
|
||||||
|
'Joomla\\Module\\Login\\Site\\' => [JPATH_SITE . '/modules/mod_login/src'],
|
||||||
|
'Joomla\\Module\\Loginsupport\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_loginsupport/src'],
|
||||||
|
'Joomla\\Module\\Menu\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_menu/src'],
|
||||||
|
'Joomla\\Module\\Menu\\Site\\' => [JPATH_SITE . '/modules/mod_menu/src'],
|
||||||
|
'Joomla\\Module\\Messages\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_messages/src'],
|
||||||
|
'Joomla\\Module\\MultilangStatus\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_multilangstatus/src'],
|
||||||
|
'Joomla\\Module\\Popular\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_popular/src'],
|
||||||
|
'Joomla\\Module\\PostInstallationMessages\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_post_installation_messages/src'],
|
||||||
|
'Joomla\\Module\\PrivacyDashboard\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_privacy_dashboard/src'],
|
||||||
|
'Joomla\\Module\\PrivacyStatus\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_privacy_status/src'],
|
||||||
|
'Joomla\\Module\\Quickicon\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_quickicon/src'],
|
||||||
|
'Joomla\\Module\\RandomImage\\Site\\' => [JPATH_SITE . '/modules/mod_random_image/src'],
|
||||||
|
'Joomla\\Module\\RelatedItems\\Site\\' => [JPATH_SITE . '/modules/mod_related_items/src'],
|
||||||
|
'Joomla\\Module\\Sampledata\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_sampledata/src'],
|
||||||
|
'Joomla\\Module\\StatsAdmin\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_stats_admin/src'],
|
||||||
|
'Joomla\\Module\\Stats\\Site\\' => [JPATH_SITE . '/modules/mod_stats/src'],
|
||||||
|
'Joomla\\Module\\Submenu\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_submenu/src'],
|
||||||
|
'Joomla\\Module\\Syndicate\\Site\\' => [JPATH_SITE . '/modules/mod_syndicate/src'],
|
||||||
|
'Joomla\\Module\\TagsPopular\\Site\\' => [JPATH_SITE . '/modules/mod_tags_popular/src'],
|
||||||
|
'Joomla\\Module\\TagsSimilar\\Site\\' => [JPATH_SITE . '/modules/mod_tags_similar/src'],
|
||||||
|
'Joomla\\Module\\Title\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_title/src'],
|
||||||
|
'Joomla\\Module\\Toolbar\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_toolbar/src'],
|
||||||
|
'Joomla\\Module\\User\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_user/src'],
|
||||||
|
'Joomla\\Module\\UsersLatest\\Site\\' => [JPATH_SITE . '/modules/mod_users_latest/src'],
|
||||||
|
'Joomla\\Module\\Version\\Administrator\\' => [JPATH_ADMINISTRATOR . '/modules/mod_version/src'],
|
||||||
|
'Joomla\\Module\\Whosonline\\Site\\' => [JPATH_SITE . '/modules/mod_whosonline/src'],
|
||||||
|
'Joomla\\Module\\Wrapper\\Site\\' => [JPATH_SITE . '/modules/mod_wrapper/src'],
|
||||||
|
'Joomla\\Plugin\\Actionlog\\Joomla\\' => [JPATH_PLUGINS . '/actionlog/joomla/src'],
|
||||||
|
'Joomla\\Plugin\\ApiAuthentication\\Basic\\' => [JPATH_PLUGINS . '/api-authentication/basic/src'],
|
||||||
|
'Joomla\\Plugin\\ApiAuthentication\\Token\\' => [JPATH_PLUGINS . '/api-authentication/token/src'],
|
||||||
|
'Joomla\\Plugin\\Authentication\\Cookie\\' => [JPATH_PLUGINS . '/authentication/cookie/src'],
|
||||||
|
'Joomla\\Plugin\\Authentication\\Joomla\\' => [JPATH_PLUGINS . '/authentication/joomla/src'],
|
||||||
|
'Joomla\\Plugin\\Authentication\\Ldap\\' => [JPATH_PLUGINS . '/authentication/ldap/src'],
|
||||||
|
'Joomla\\Plugin\\Behaviour\\Compat\\' => [JPATH_PLUGINS . '/behaviour/compat/src'],
|
||||||
|
'Joomla\\Plugin\\Behaviour\\Taggable\\' => [JPATH_PLUGINS . '/behaviour/taggable/src'],
|
||||||
|
'Joomla\\Plugin\\Behaviour\\Versionable\\' => [JPATH_PLUGINS . '/behaviour/versionable/src'],
|
||||||
|
'Joomla\\Plugin\\Captcha\\InvisibleReCaptcha\\' => [JPATH_PLUGINS . '/captcha/recaptcha_invisible/src'],
|
||||||
|
'Joomla\\Plugin\\Content\\ConfirmConsent\\' => [JPATH_PLUGINS . '/content/confirmconsent/src'],
|
||||||
|
'Joomla\\Plugin\\Content\\Contact\\' => [JPATH_PLUGINS . '/content/contact/src'],
|
||||||
|
'Joomla\\Plugin\\Content\\EmailCloak\\' => [JPATH_PLUGINS . '/content/emailcloak/src'],
|
||||||
|
'Joomla\\Plugin\\Content\\Fields\\' => [JPATH_PLUGINS . '/content/fields/src'],
|
||||||
|
'Joomla\\Plugin\\Content\\Finder\\' => [JPATH_PLUGINS . '/content/finder/src'],
|
||||||
|
'Joomla\\Plugin\\Content\\Joomla\\' => [JPATH_PLUGINS . '/content/joomla/src'],
|
||||||
|
'Joomla\\Plugin\\Content\\LoadModule\\' => [JPATH_PLUGINS . '/content/loadmodule/src'],
|
||||||
|
'Joomla\\Plugin\\Content\\PageBreak\\' => [JPATH_PLUGINS . '/content/pagebreak/src'],
|
||||||
|
'Joomla\\Plugin\\Content\\PageNavigation\\' => [JPATH_PLUGINS . '/content/pagenavigation/src'],
|
||||||
|
'Joomla\\Plugin\\Content\\Vote\\' => [JPATH_PLUGINS . '/content/vote/src'],
|
||||||
|
'Joomla\\Plugin\\EditorsXtd\\Article\\' => [JPATH_PLUGINS . '/editors-xtd/article/src'],
|
||||||
|
'Joomla\\Plugin\\EditorsXtd\\Contact\\' => [JPATH_PLUGINS . '/editors-xtd/contact/src'],
|
||||||
|
'Joomla\\Plugin\\EditorsXtd\\Fields\\' => [JPATH_PLUGINS . '/editors-xtd/fields/src'],
|
||||||
|
'Joomla\\Plugin\\EditorsXtd\\Image\\' => [JPATH_PLUGINS . '/editors-xtd/image/src'],
|
||||||
|
'Joomla\\Plugin\\EditorsXtd\\Menu\\' => [JPATH_PLUGINS . '/editors-xtd/menu/src'],
|
||||||
|
'Joomla\\Plugin\\EditorsXtd\\Module\\' => [JPATH_PLUGINS . '/editors-xtd/module/src'],
|
||||||
|
'Joomla\\Plugin\\EditorsXtd\\PageBreak\\' => [JPATH_PLUGINS . '/editors-xtd/pagebreak/src'],
|
||||||
|
'Joomla\\Plugin\\EditorsXtd\\ReadMore\\' => [JPATH_PLUGINS . '/editors-xtd/readmore/src'],
|
||||||
|
'Joomla\\Plugin\\Editors\\CodeMirror\\' => [JPATH_PLUGINS . '/editors/codemirror/src'],
|
||||||
|
'Joomla\\Plugin\\Editors\\None\\' => [JPATH_PLUGINS . '/editors/none/src'],
|
||||||
|
'Joomla\\Plugin\\Editors\\TinyMCE\\' => [JPATH_PLUGINS . '/editors/tinymce/src'],
|
||||||
|
'Joomla\\Plugin\\Extension\\Finder\\' => [JPATH_PLUGINS . '/extension/finder/src'],
|
||||||
|
'Joomla\\Plugin\\Extension\\Joomla\\' => [JPATH_PLUGINS . '/extension/joomla/src'],
|
||||||
|
'Joomla\\Plugin\\Extension\\NamespaceMap\\' => [JPATH_PLUGINS . '/extension/namespacemap/src'],
|
||||||
|
'Joomla\\Plugin\\Fields\\Calendar\\' => [JPATH_PLUGINS . '/fields/calendar/src'],
|
||||||
|
'Joomla\\Plugin\\Fields\\Checkboxes\\' => [JPATH_PLUGINS . '/fields/checkboxes/src'],
|
||||||
|
'Joomla\\Plugin\\Fields\\Color\\' => [JPATH_PLUGINS . '/fields/color/src'],
|
||||||
|
'Joomla\\Plugin\\Fields\\Editor\\' => [JPATH_PLUGINS . '/fields/editor/src'],
|
||||||
|
'Joomla\\Plugin\\Fields\\Imagelist\\' => [JPATH_PLUGINS . '/fields/imagelist/src'],
|
||||||
|
'Joomla\\Plugin\\Fields\\Integer\\' => [JPATH_PLUGINS . '/fields/integer/src'],
|
||||||
|
'Joomla\\Plugin\\Fields\\ListField\\' => [JPATH_PLUGINS . '/fields/list/src'],
|
||||||
|
'Joomla\\Plugin\\Fields\\Media\\' => [JPATH_PLUGINS . '/fields/media/src'],
|
||||||
|
'Joomla\\Plugin\\Fields\\Radio\\' => [JPATH_PLUGINS . '/fields/radio/src'],
|
||||||
|
'Joomla\\Plugin\\Fields\\SQL\\' => [JPATH_PLUGINS . '/fields/sql/src'],
|
||||||
|
'Joomla\\Plugin\\Fields\\Subform\\' => [JPATH_PLUGINS . '/fields/subform/src'],
|
||||||
|
'Joomla\\Plugin\\Fields\\Text\\' => [JPATH_PLUGINS . '/fields/text/src'],
|
||||||
|
'Joomla\\Plugin\\Fields\\Textarea\\' => [JPATH_PLUGINS . '/fields/textarea/src'],
|
||||||
|
'Joomla\\Plugin\\Fields\\Url\\' => [JPATH_PLUGINS . '/fields/url/src'],
|
||||||
|
'Joomla\\Plugin\\Fields\\User\\' => [JPATH_PLUGINS . '/fields/user/src'],
|
||||||
|
'Joomla\\Plugin\\Fields\\UsergroupList\\' => [JPATH_PLUGINS . '/fields/usergrouplist/src'],
|
||||||
|
'Joomla\\Plugin\\Filesystem\\Local\\' => [JPATH_PLUGINS . '/filesystem/local/src'],
|
||||||
|
'Joomla\\Plugin\\Finder\\Categories\\' => [JPATH_PLUGINS . '/finder/categories/src'],
|
||||||
|
'Joomla\\Plugin\\Finder\\Contacts\\' => [JPATH_PLUGINS . '/finder/contacts/src'],
|
||||||
|
'Joomla\\Plugin\\Finder\\Content\\' => [JPATH_PLUGINS . '/finder/content/src'],
|
||||||
|
'Joomla\\Plugin\\Finder\\Newsfeeds\\' => [JPATH_PLUGINS . '/finder/newsfeeds/src'],
|
||||||
|
'Joomla\\Plugin\\Finder\\Tags\\' => [JPATH_PLUGINS . '/finder/tags/src'],
|
||||||
|
'Joomla\\Plugin\\Installer\\Folder\\' => [JPATH_PLUGINS . '/installer/folderinstaller/src'],
|
||||||
|
'Joomla\\Plugin\\Installer\\Override\\' => [JPATH_PLUGINS . '/installer/override/src'],
|
||||||
|
'Joomla\\Plugin\\Installer\\Package\\' => [JPATH_PLUGINS . '/installer/packageinstaller/src'],
|
||||||
|
'Joomla\\Plugin\\Installer\\Url\\' => [JPATH_PLUGINS . '/installer/urlinstaller/src'],
|
||||||
|
'Joomla\\Plugin\\Installer\\Web\\' => [JPATH_PLUGINS . '/installer/webinstaller/src'],
|
||||||
|
'Joomla\\Plugin\\MediaAction\\Crop\\' => [JPATH_PLUGINS . '/media-action/crop/src'],
|
||||||
|
'Joomla\\Plugin\\MediaAction\\Resize\\' => [JPATH_PLUGINS . '/media-action/resize/src'],
|
||||||
|
'Joomla\\Plugin\\MediaAction\\Rotate\\' => [JPATH_PLUGINS . '/media-action/rotate/src'],
|
||||||
|
'Joomla\\Plugin\\Multifactorauth\\Email\\' => [JPATH_PLUGINS . '/multifactorauth/email/src'],
|
||||||
|
'Joomla\\Plugin\\Multifactorauth\\Fixed\\' => [JPATH_PLUGINS . '/multifactorauth/fixed/src'],
|
||||||
|
'Joomla\\Plugin\\Multifactorauth\\Totp\\' => [JPATH_PLUGINS . '/multifactorauth/totp/src'],
|
||||||
|
'Joomla\\Plugin\\Multifactorauth\\Webauthn\\' => [JPATH_PLUGINS . '/multifactorauth/webauthn/src'],
|
||||||
|
'Joomla\\Plugin\\Multifactorauth\\Yubikey\\' => [JPATH_PLUGINS . '/multifactorauth/yubikey/src'],
|
||||||
|
'Joomla\\Plugin\\Privacy\\Actionlogs\\' => [JPATH_PLUGINS . '/privacy/actionlogs/src'],
|
||||||
|
'Joomla\\Plugin\\Privacy\\Consents\\' => [JPATH_PLUGINS . '/privacy/consents/src'],
|
||||||
|
'Joomla\\Plugin\\Privacy\\Contact\\' => [JPATH_PLUGINS . '/privacy/contact/src'],
|
||||||
|
'Joomla\\Plugin\\Privacy\\Content\\' => [JPATH_PLUGINS . '/privacy/content/src'],
|
||||||
|
'Joomla\\Plugin\\Privacy\\Message\\' => [JPATH_PLUGINS . '/privacy/message/src'],
|
||||||
|
'Joomla\\Plugin\\Privacy\\User\\' => [JPATH_PLUGINS . '/privacy/user/src'],
|
||||||
|
'Joomla\\Plugin\\Quickicon\\Downloadkey\\' => [JPATH_PLUGINS . '/quickicon/downloadkey/src'],
|
||||||
|
'Joomla\\Plugin\\Quickicon\\Eos\\' => [JPATH_PLUGINS . '/quickicon/eos/src'],
|
||||||
|
'Joomla\\Plugin\\Quickicon\\Extensionupdate\\' => [JPATH_PLUGINS . '/quickicon/extensionupdate/src'],
|
||||||
|
'Joomla\\Plugin\\Quickicon\\Jem\\' => [JPATH_PLUGINS . '/quickicon/jem/src'],
|
||||||
|
'Joomla\\Plugin\\Quickicon\\Joomlaupdate\\' => [JPATH_PLUGINS . '/quickicon/joomlaupdate/src'],
|
||||||
|
'Joomla\\Plugin\\Quickicon\\OverrideCheck\\' => [JPATH_PLUGINS . '/quickicon/overridecheck/src'],
|
||||||
|
'Joomla\\Plugin\\Quickicon\\PhpVersionCheck\\' => [JPATH_PLUGINS . '/quickicon/phpversioncheck/src'],
|
||||||
|
'Joomla\\Plugin\\Quickicon\\PrivacyCheck\\' => [JPATH_PLUGINS . '/quickicon/privacycheck/src'],
|
||||||
|
'Joomla\\Plugin\\SampleData\\Blog\\' => [JPATH_PLUGINS . '/sampledata/blog/src'],
|
||||||
|
'Joomla\\Plugin\\SampleData\\MultiLanguage\\' => [JPATH_PLUGINS . '/sampledata/multilang/src'],
|
||||||
|
'Joomla\\Plugin\\Schemaorg\\Article\\' => [JPATH_PLUGINS . '/schemaorg/article/src'],
|
||||||
|
'Joomla\\Plugin\\Schemaorg\\BlogPosting\\' => [JPATH_PLUGINS . '/schemaorg/blogposting/src'],
|
||||||
|
'Joomla\\Plugin\\Schemaorg\\Book\\' => [JPATH_PLUGINS . '/schemaorg/book/src'],
|
||||||
|
'Joomla\\Plugin\\Schemaorg\\Custom\\' => [JPATH_PLUGINS . '/schemaorg/custom/src'],
|
||||||
|
'Joomla\\Plugin\\Schemaorg\\Event\\' => [JPATH_PLUGINS . '/schemaorg/event/src'],
|
||||||
|
'Joomla\\Plugin\\Schemaorg\\JobPosting\\' => [JPATH_PLUGINS . '/schemaorg/jobposting/src'],
|
||||||
|
'Joomla\\Plugin\\Schemaorg\\Organization\\' => [JPATH_PLUGINS . '/schemaorg/organization/src'],
|
||||||
|
'Joomla\\Plugin\\Schemaorg\\Person\\' => [JPATH_PLUGINS . '/schemaorg/person/src'],
|
||||||
|
'Joomla\\Plugin\\Schemaorg\\Recipe\\' => [JPATH_PLUGINS . '/schemaorg/recipe/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Accessibility\\' => [JPATH_PLUGINS . '/system/accessibility/src'],
|
||||||
|
'Joomla\\Plugin\\System\\ActionLogs\\' => [JPATH_PLUGINS . '/system/actionlogs/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Cache\\' => [JPATH_PLUGINS . '/system/cache/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Debug\\' => [JPATH_PLUGINS . '/system/debug/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Fields\\' => [JPATH_PLUGINS . '/system/fields/src'],
|
||||||
|
'Joomla\\Plugin\\System\\GuidedTours\\' => [JPATH_PLUGINS . '/system/guidedtours/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Highlight\\' => [JPATH_PLUGINS . '/system/highlight/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Httpheaders\\' => [JPATH_PLUGINS . '/system/httpheaders/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Jlcontentfieldsfilter\\' => [JPATH_PLUGINS . '/system/jlcontentfieldsfilter/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Jooa11y\\' => [JPATH_PLUGINS . '/system/jooa11y/src'],
|
||||||
|
'Joomla\\Plugin\\System\\LanguageCode\\' => [JPATH_PLUGINS . '/system/languagecode/src'],
|
||||||
|
'Joomla\\Plugin\\System\\LanguageFilter\\' => [JPATH_PLUGINS . '/system/languagefilter/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Log\\' => [JPATH_PLUGINS . '/system/log/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Logout\\' => [JPATH_PLUGINS . '/system/logout/src'],
|
||||||
|
'Joomla\\Plugin\\System\\PrivacyConsent\\' => [JPATH_PLUGINS . '/system/privacyconsent/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Redirect\\' => [JPATH_PLUGINS . '/system/redirect/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Remember\\' => [JPATH_PLUGINS . '/system/remember/src'],
|
||||||
|
'Joomla\\Plugin\\System\\ScheduleRunner\\' => [JPATH_PLUGINS . '/system/schedulerunner/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Schemaorg\\' => [JPATH_PLUGINS . '/system/schemaorg/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Sef\\' => [JPATH_PLUGINS . '/system/sef/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Shortcut\\' => [JPATH_PLUGINS . '/system/shortcut/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Skipto\\' => [JPATH_PLUGINS . '/system/skipto/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Stats\\' => [JPATH_PLUGINS . '/system/stats/src'],
|
||||||
|
'Joomla\\Plugin\\System\\TaskNotification\\' => [JPATH_PLUGINS . '/system/tasknotification/src'],
|
||||||
|
'Joomla\\Plugin\\System\\Webauthn\\' => [JPATH_PLUGINS . '/system/webauthn/src'],
|
||||||
|
'Joomla\\Plugin\\Task\\Checkfiles\\' => [JPATH_PLUGINS . '/task/checkfiles/src'],
|
||||||
|
'Joomla\\Plugin\\Task\\DeleteActionLogs\\' => [JPATH_PLUGINS . '/task/deleteactionlogs/src'],
|
||||||
|
'Joomla\\Plugin\\Task\\Globalcheckin\\' => [JPATH_PLUGINS . '/task/globalcheckin/src'],
|
||||||
|
'Joomla\\Plugin\\Task\\PrivacyConsent\\' => [JPATH_PLUGINS . '/task/privacyconsent/src'],
|
||||||
|
'Joomla\\Plugin\\Task\\Requests\\' => [JPATH_PLUGINS . '/task/requests/src'],
|
||||||
|
'Joomla\\Plugin\\Task\\RotateLogs\\' => [JPATH_PLUGINS . '/task/rotatelogs/src'],
|
||||||
|
'Joomla\\Plugin\\Task\\SessionGC\\' => [JPATH_PLUGINS . '/task/sessiongc/src'],
|
||||||
|
'Joomla\\Plugin\\Task\\SiteStatus\\' => [JPATH_PLUGINS . '/task/sitestatus/src'],
|
||||||
|
'Joomla\\Plugin\\Task\\UpdateNotification\\' => [JPATH_PLUGINS . '/task/updatenotification/src'],
|
||||||
|
'Joomla\\Plugin\\User\\ContactCreator\\' => [JPATH_PLUGINS . '/user/contactcreator/src'],
|
||||||
|
'Joomla\\Plugin\\User\\Joomla\\' => [JPATH_PLUGINS . '/user/joomla/src'],
|
||||||
|
'Joomla\\Plugin\\User\\Profile\\' => [JPATH_PLUGINS . '/user/profile/src'],
|
||||||
|
'Joomla\\Plugin\\User\\Terms\\' => [JPATH_PLUGINS . '/user/terms/src'],
|
||||||
|
'Joomla\\Plugin\\User\\Token\\' => [JPATH_PLUGINS . '/user/token/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Banners\\' => [JPATH_PLUGINS . '/webservices/banners/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Config\\' => [JPATH_PLUGINS . '/webservices/config/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Contact\\' => [JPATH_PLUGINS . '/webservices/contact/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Content\\' => [JPATH_PLUGINS . '/webservices/content/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Installer\\' => [JPATH_PLUGINS . '/webservices/installer/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Languages\\' => [JPATH_PLUGINS . '/webservices/languages/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Media\\' => [JPATH_PLUGINS . '/webservices/media/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Menus\\' => [JPATH_PLUGINS . '/webservices/menus/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Messages\\' => [JPATH_PLUGINS . '/webservices/messages/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Modules\\' => [JPATH_PLUGINS . '/webservices/modules/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Newsfeeds\\' => [JPATH_PLUGINS . '/webservices/newsfeeds/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Plugins\\' => [JPATH_PLUGINS . '/webservices/plugins/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Privacy\\' => [JPATH_PLUGINS . '/webservices/privacy/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Redirect\\' => [JPATH_PLUGINS . '/webservices/redirect/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Tags\\' => [JPATH_PLUGINS . '/webservices/tags/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Templates\\' => [JPATH_PLUGINS . '/webservices/templates/src'],
|
||||||
|
'Joomla\\Plugin\\WebServices\\Users\\' => [JPATH_PLUGINS . '/webservices/users/src'],
|
||||||
|
'Joomla\\Plugin\\Workflow\\Featuring\\' => [JPATH_PLUGINS . '/workflow/featuring/src'],
|
||||||
|
'Joomla\\Plugin\\Workflow\\Notification\\' => [JPATH_PLUGINS . '/workflow/notification/src'],
|
||||||
|
'Joomla\\Plugin\\Workflow\\Publishing\\' => [JPATH_PLUGINS . '/workflow/publishing/src'],
|
||||||
|
'RegularLabs\\Component\\Conditions\\Administrator\\' => [JPATH_ADMINISTRATOR . '/components/com_conditions/src'],
|
||||||
|
'RegularLabs\\Library\\' => [JPATH_LIBRARIES . '/regularlabs/src'],
|
||||||
|
'RegularLabs\\Plugin\\EditorButton\\ConditionalContent\\' => [JPATH_PLUGINS . '/editors-xtd/conditionalcontent/src'],
|
||||||
|
'RegularLabs\\Plugin\\Fields\\ArticlesLinked\\' => [JPATH_PLUGINS . '/fields/articleslinked/src'],
|
||||||
|
'RegularLabs\\Plugin\\Fields\\Articles\\' => [JPATH_PLUGINS . '/fields/articles/src'],
|
||||||
|
'RegularLabs\\Plugin\\System\\ConditionalContent\\' => [JPATH_PLUGINS . '/system/conditionalcontent/src'],
|
||||||
|
'RegularLabs\\Plugin\\System\\RegularLabs\\' => [JPATH_PLUGINS . '/system/regularlabs/src'],
|
||||||
|
];
|
||||||
1
administrator/cache/index.html
vendored
Normal file
1
administrator/cache/index.html
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
<!DOCTYPE html><title></title>
|
||||||
@ -0,0 +1 @@
|
|||||||
|
<?php die("Access Denied"); ?>#x#a:2:{s:6:"result";a:1:{i:0;a:6:{s:5:"@type";s:7:"Article";s:3:"@id";s:69:"https://demo.conservatorio.udine.it/#/schema/com_content/article/4437";s:4:"name";s:13:"Di Lena Marco";s:8:"headline";s:13:"Di Lena Marco";s:10:"inLanguage";s:5:"it-IT";s:8:"isPartOf";a:1:{s:3:"@id";s:57:"https://demo.conservatorio.udine.it/#/schema/WebPage/base";}}}s:6:"output";s:0:"";}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
<?php die("Access Denied"); ?>#x#a:2:{s:6:"result";a:1:{i:0;a:6:{s:5:"@type";s:7:"Article";s:3:"@id";s:69:"https://demo.conservatorio.udine.it/#/schema/com_content/article/4588";s:4:"name";s:19:"Santarossa Giuliana";s:8:"headline";s:19:"Santarossa Giuliana";s:10:"inLanguage";s:5:"it-IT";s:8:"isPartOf";a:1:{s:3:"@id";s:57:"https://demo.conservatorio.udine.it/#/schema/WebPage/base";}}}s:6:"output";s:0:"";}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
<?php die("Access Denied"); ?>#x#a:2:{s:6:"result";a:1:{i:0;a:6:{s:5:"@type";s:7:"Article";s:3:"@id";s:69:"https://conservatorio2025.ddev.site/#/schema/com_content/article/4452";s:4:"name";s:16:"Princic Federico";s:8:"headline";s:16:"Princic Federico";s:10:"inLanguage";s:5:"it-IT";s:8:"isPartOf";a:1:{s:3:"@id";s:57:"https://conservatorio2025.ddev.site/#/schema/WebPage/base";}}}s:6:"output";s:0:"";}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
<?php die("Access Denied"); ?>#x#a:2:{s:6:"result";a:1:{i:0;a:6:{s:5:"@type";s:7:"Article";s:3:"@id";s:69:"https://conservatorio2025.ddev.site/#/schema/com_content/article/3058";s:4:"name";s:9:"Chi siamo";s:8:"headline";s:9:"Chi siamo";s:10:"inLanguage";s:5:"it-IT";s:8:"isPartOf";a:1:{s:3:"@id";s:57:"https://conservatorio2025.ddev.site/#/schema/WebPage/base";}}}s:6:"output";s:0:"";}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
<?php die("Access Denied"); ?>#x#a:2:{s:6:"result";a:1:{i:0;a:6:{s:5:"@type";s:7:"Article";s:3:"@id";s:69:"https://conservatorio2025.ddev.site/#/schema/com_content/article/3058";s:4:"name";s:9:"Chi siamo";s:8:"headline";s:9:"Chi siamo";s:10:"inLanguage";s:5:"it-IT";s:8:"isPartOf";a:1:{s:3:"@id";s:57:"https://conservatorio2025.ddev.site/#/schema/WebPage/base";}}}s:6:"output";s:0:"";}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
<?php die("Access Denied"); ?>#x#a:2:{s:6:"result";a:1:{i:0;a:6:{s:5:"@type";s:7:"Article";s:3:"@id";s:69:"https://conservatorio2025.ddev.site/#/schema/com_content/article/3058";s:4:"name";s:9:"Chi siamo";s:8:"headline";s:9:"Chi siamo";s:10:"inLanguage";s:5:"it-IT";s:8:"isPartOf";a:1:{s:3:"@id";s:57:"https://conservatorio2025.ddev.site/#/schema/WebPage/base";}}}s:6:"output";s:0:"";}
|
||||||
1
administrator/cache/schemaorg/index.html
vendored
Normal file
1
administrator/cache/schemaorg/index.html
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
<!DOCTYPE html><title></title>
|
||||||
29
administrator/components/com_actionlogs/actionlogs.xml
Normal file
29
administrator/components/com_actionlogs/actionlogs.xml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<extension type="component" method="upgrade">
|
||||||
|
<name>com_actionlogs</name>
|
||||||
|
<author>Joomla! Project</author>
|
||||||
|
<creationDate>2018-05</creationDate>
|
||||||
|
<copyright>(C) 2018 Open Source Matters, Inc.</copyright>
|
||||||
|
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||||
|
<authorEmail>admin@joomla.org</authorEmail>
|
||||||
|
<authorUrl>www.joomla.org</authorUrl>
|
||||||
|
<version>3.9.0</version>
|
||||||
|
<description>COM_ACTIONLOGS_XML_DESCRIPTION</description>
|
||||||
|
<namespace path="src">Joomla\Component\Actionlogs</namespace>
|
||||||
|
<administration>
|
||||||
|
<menu>COM_ACTIONLOGS</menu>
|
||||||
|
<files folder="admin">
|
||||||
|
<file>actionlogs.xml</file>
|
||||||
|
<file>config.xml</file>
|
||||||
|
<folder>forms</folder>
|
||||||
|
<folder>layouts</folder>
|
||||||
|
<folder>services</folder>
|
||||||
|
<folder>src</folder>
|
||||||
|
<folder>tmpl</folder>
|
||||||
|
</files>
|
||||||
|
<languages folder="admin">
|
||||||
|
<language tag="en-GB">language/en-GB/com_actionlogs.ini</language>
|
||||||
|
<language tag="en-GB">language/en-GB/com_actionlogs.sys.ini</language>
|
||||||
|
</languages>
|
||||||
|
</administration>
|
||||||
|
</extension>
|
||||||
74
administrator/components/com_actionlogs/config.xml
Normal file
74
administrator/components/com_actionlogs/config.xml
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<config addfieldprefix="Joomla\Component\Actionlogs\Administrator\Field">
|
||||||
|
<help key="User_Actions_Log:_Options"/>
|
||||||
|
<inlinehelp button="show"/>
|
||||||
|
<fieldset name="actionlogs" label="COM_ACTIONLOGS_OPTIONS">
|
||||||
|
<field
|
||||||
|
name="ip_logging"
|
||||||
|
type="radio"
|
||||||
|
label="COM_ACTIONLOGS_IP_LOGGING_LABEL"
|
||||||
|
layout="joomla.form.field.radio.switcher"
|
||||||
|
default="0"
|
||||||
|
filter="integer"
|
||||||
|
>
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
<field
|
||||||
|
name="csv_delimiter"
|
||||||
|
type="list"
|
||||||
|
label="COM_ACTIONLOGS_CSV_DELIMITER_LABEL"
|
||||||
|
default=","
|
||||||
|
validate="options"
|
||||||
|
>
|
||||||
|
<option value=",">COM_ACTIONLOGS_COMMA</option>
|
||||||
|
<option value=";">COM_ACTIONLOGS_SEMICOLON</option>
|
||||||
|
</field>
|
||||||
|
<field
|
||||||
|
name="loggable_extensions"
|
||||||
|
type="logtype"
|
||||||
|
label="COM_ACTIONLOGS_LOG_EXTENSIONS_LABEL"
|
||||||
|
multiple="true"
|
||||||
|
layout="joomla.form.field.list-fancy-select"
|
||||||
|
default="com_banners,com_cache,com_categories,com_checkin,com_config,com_contact,com_content,com_fields,com_guidedtours,com_installer,com_media,com_menus,com_messages,com_modules,com_newsfeeds,com_plugins,com_redirect,com_scheduler,com_tags,com_templates,com_users"
|
||||||
|
/>
|
||||||
|
<field
|
||||||
|
name="loggable_api"
|
||||||
|
type="radio"
|
||||||
|
label="COM_ACTIONLOGS_API_LOGGING_LABEL"
|
||||||
|
layout="joomla.form.field.radio.switcher"
|
||||||
|
default="0"
|
||||||
|
filter="integer"
|
||||||
|
>
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
</field>
|
||||||
|
<field
|
||||||
|
name="loggable_verbs"
|
||||||
|
type="list"
|
||||||
|
label="COM_ACTIONLOGS_LOG_VERBS_LABEL"
|
||||||
|
multiple="true"
|
||||||
|
showon="loggable_api:1"
|
||||||
|
default="GET"
|
||||||
|
validate="options"
|
||||||
|
layout="joomla.form.field.list-fancy-select"
|
||||||
|
>
|
||||||
|
<option value="GET">COM_ACTIONLOGS_FIELD_VALUE_GET</option>
|
||||||
|
<option value="POST">COM_ACTIONLOGS_FIELD_VALUE_POST</option>
|
||||||
|
<option value="DELETE">COM_ACTIONLOGS_FIELD_VALUE_DELETE</option>
|
||||||
|
<option value="PUT">COM_ACTIONLOGS_FIELD_VALUE_PUT</option>
|
||||||
|
<option value="PATCH">COM_ACTIONLOGS_FIELD_VALUE_PATCH</option>
|
||||||
|
</field>
|
||||||
|
<field
|
||||||
|
name="date_relative"
|
||||||
|
type="radio"
|
||||||
|
label="COM_ACTIONLOGS_DATE_RELATIVE_LABEL"
|
||||||
|
layout="joomla.form.field.radio.switcher"
|
||||||
|
default="1"
|
||||||
|
filter="integer"
|
||||||
|
>
|
||||||
|
<option value="0">JHIDE</option>
|
||||||
|
<option value="1">JSHOW</option>
|
||||||
|
</field>
|
||||||
|
</fieldset>
|
||||||
|
</config>
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<form addfieldprefix="Joomla\Component\Actionlogs\Administrator\Field">
|
||||||
|
<fields name="filter">
|
||||||
|
<field
|
||||||
|
name="search"
|
||||||
|
type="text"
|
||||||
|
inputmode="search"
|
||||||
|
label="COM_ACTIONLOGS_FILTER_SEARCH_LABEL"
|
||||||
|
description="COM_ACTIONLOGS_FILTER_SEARCH_DESC"
|
||||||
|
hint="JSEARCH_FILTER"
|
||||||
|
/>
|
||||||
|
<field
|
||||||
|
name="extension"
|
||||||
|
type="extension"
|
||||||
|
label="COM_ACTIONLOGS_EXTENSION"
|
||||||
|
class="js-select-submit-on-change"
|
||||||
|
>
|
||||||
|
<option value="">COM_ACTIONLOGS_SELECT_EXTENSION</option>
|
||||||
|
</field>
|
||||||
|
<field
|
||||||
|
name="dateRange"
|
||||||
|
type="logsdaterange"
|
||||||
|
label="COM_ACTIONLOGS_DATE"
|
||||||
|
class="js-select-submit-on-change"
|
||||||
|
>
|
||||||
|
<option value="">COM_ACTIONLOGS_OPTION_FILTER_DATE</option>
|
||||||
|
</field>
|
||||||
|
<field
|
||||||
|
name="user"
|
||||||
|
type="logcreator"
|
||||||
|
label="COM_ACTIONLOGS_NAME"
|
||||||
|
class="js-select-submit-on-change"
|
||||||
|
>
|
||||||
|
<option value="">COM_ACTIONLOGS_SELECT_USER</option>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<fields name="list">
|
||||||
|
<field
|
||||||
|
name="fullordering"
|
||||||
|
type="list"
|
||||||
|
label="JGLOBAL_SORT_BY"
|
||||||
|
class="js-select-submit-on-change"
|
||||||
|
default="a.id DESC"
|
||||||
|
validate="options"
|
||||||
|
>
|
||||||
|
<option value="">JGLOBAL_SORT_BY</option>
|
||||||
|
<option value="a.message ASC">COM_ACTIONLOGS_ACTION_ASC</option>
|
||||||
|
<option value="a.message DESC">COM_ACTIONLOGS_ACTION_DESC</option>
|
||||||
|
<option value="a.extension ASC">COM_ACTIONLOGS_EXTENSION_ASC</option>
|
||||||
|
<option value="a.extension DESC">COM_ACTIONLOGS_EXTENSION_DESC</option>
|
||||||
|
<option value="a.log_date ASC">JDATE_ASC</option>
|
||||||
|
<option value="a.log_date DESC">JDATE_DESC</option>
|
||||||
|
<option value="a.user_id ASC">JGLOBAL_NAME_ASC</option>
|
||||||
|
<option value="a.user_id DESC">JGLOBAL_NAME_DESC</option>
|
||||||
|
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
|
||||||
|
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<fields name="list">
|
||||||
|
<field
|
||||||
|
name="limit"
|
||||||
|
type="limitbox"
|
||||||
|
label="JGLOBAL_LIST_LIMIT"
|
||||||
|
class="input-mini js-select-submit-on-change"
|
||||||
|
default="25"
|
||||||
|
/>
|
||||||
|
</fields>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
|
||||||
|
use Joomla\CMS\Extension\ComponentInterface;
|
||||||
|
use Joomla\CMS\Extension\MVCComponent;
|
||||||
|
use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
|
||||||
|
use Joomla\CMS\Extension\Service\Provider\MVCFactory;
|
||||||
|
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
|
||||||
|
use Joomla\DI\Container;
|
||||||
|
use Joomla\DI\ServiceProviderInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The actionlogs service provider.
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
return new class () implements ServiceProviderInterface {
|
||||||
|
/**
|
||||||
|
* Registers the service provider with a DI container.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
public function register(Container $container)
|
||||||
|
{
|
||||||
|
$container->registerServiceProvider(new MVCFactory('\\Joomla\\Component\\Actionlogs'));
|
||||||
|
$container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Actionlogs'));
|
||||||
|
|
||||||
|
$container->set(
|
||||||
|
ComponentInterface::class,
|
||||||
|
function (Container $container) {
|
||||||
|
$component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
|
||||||
|
|
||||||
|
$component->setMVCFactory($container->get(MVCFactoryInterface::class));
|
||||||
|
|
||||||
|
return $component;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
@ -0,0 +1,164 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Joomla\Component\Actionlogs\Administrator\Controller;
|
||||||
|
|
||||||
|
use Joomla\CMS\Application\CMSApplication;
|
||||||
|
use Joomla\CMS\Component\ComponentHelper;
|
||||||
|
use Joomla\CMS\Date\Date;
|
||||||
|
use Joomla\CMS\Event\ActionLog\AfterLogExportEvent;
|
||||||
|
use Joomla\CMS\Input\Input;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
use Joomla\CMS\MVC\Controller\AdminController;
|
||||||
|
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
|
||||||
|
use Joomla\CMS\Router\Route;
|
||||||
|
use Joomla\Component\Actionlogs\Administrator\Helper\ActionlogsHelper;
|
||||||
|
use Joomla\Component\Actionlogs\Administrator\Model\ActionlogsModel;
|
||||||
|
use Joomla\Utilities\ArrayHelper;
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Actionlogs list controller class.
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
class ActionlogsController extends AdminController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param array $config An optional associative array of configuration settings.
|
||||||
|
* Recognized key values include 'name', 'default_task', 'model_path', and
|
||||||
|
* 'view_path' (this list is not meant to be comprehensive).
|
||||||
|
* @param ?MVCFactoryInterface $factory The factory.
|
||||||
|
* @param CMSApplication $app The Application for the dispatcher
|
||||||
|
* @param Input $input Input
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
public function __construct($config = [], ?MVCFactoryInterface $factory = null, $app = null, $input = null)
|
||||||
|
{
|
||||||
|
parent::__construct($config, $factory, $app, $input);
|
||||||
|
|
||||||
|
$this->registerTask('exportSelectedLogs', 'exportLogs');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to export logs
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
public function exportLogs()
|
||||||
|
{
|
||||||
|
// Check for request forgeries.
|
||||||
|
$this->checkToken();
|
||||||
|
|
||||||
|
$task = $this->getTask();
|
||||||
|
|
||||||
|
$pks = [];
|
||||||
|
|
||||||
|
if ($task == 'exportSelectedLogs') {
|
||||||
|
// Get selected logs
|
||||||
|
$pks = ArrayHelper::toInteger(explode(',', $this->input->post->getString('cids')));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @var ActionlogsModel $model */
|
||||||
|
$model = $this->getModel();
|
||||||
|
|
||||||
|
// Get the logs data
|
||||||
|
$data = $model->getLogDataAsIterator($pks);
|
||||||
|
|
||||||
|
if (\count($data)) {
|
||||||
|
try {
|
||||||
|
$rows = ActionlogsHelper::getCsvData($data);
|
||||||
|
} catch (\InvalidArgumentException $exception) {
|
||||||
|
$this->setMessage(Text::_('COM_ACTIONLOGS_ERROR_COULD_NOT_EXPORT_DATA'), 'error');
|
||||||
|
$this->setRedirect(Route::_('index.php?option=com_actionlogs&view=actionlogs', false));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Destroy the iterator now
|
||||||
|
unset($data);
|
||||||
|
|
||||||
|
$date = new Date('now', new \DateTimeZone('UTC'));
|
||||||
|
$filename = 'logs_' . $date->format('Y-m-d_His_T');
|
||||||
|
|
||||||
|
$csvDelimiter = ComponentHelper::getComponent('com_actionlogs')->getParams()->get('csv_delimiter', ',');
|
||||||
|
|
||||||
|
$this->app->setHeader('Content-Type', 'application/csv', true)
|
||||||
|
->setHeader('Content-Disposition', 'attachment; filename="' . $filename . '.csv"', true)
|
||||||
|
->setHeader('Cache-Control', 'must-revalidate', true)
|
||||||
|
->sendHeaders();
|
||||||
|
|
||||||
|
$output = fopen("php://output", "w");
|
||||||
|
|
||||||
|
foreach ($rows as $row) {
|
||||||
|
fputcsv($output, $row, $csvDelimiter);
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose($output);
|
||||||
|
$this->getDispatcher()->dispatch('onAfterLogExport', new AfterLogExportEvent('onAfterLogExport'));
|
||||||
|
$this->app->close();
|
||||||
|
} else {
|
||||||
|
$this->setMessage(Text::_('COM_ACTIONLOGS_NO_LOGS_TO_EXPORT'));
|
||||||
|
$this->setRedirect(Route::_('index.php?option=com_actionlogs&view=actionlogs', false));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to get a model object, loading it if required.
|
||||||
|
*
|
||||||
|
* @param string $name The model name. Optional.
|
||||||
|
* @param string $prefix The class prefix. Optional.
|
||||||
|
* @param array $config Configuration array for model. Optional.
|
||||||
|
*
|
||||||
|
* @return object The model.
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public function getModel($name = 'Actionlogs', $prefix = 'Administrator', $config = ['ignore_request' => true])
|
||||||
|
{
|
||||||
|
// Return the model
|
||||||
|
return parent::getModel($name, $prefix, $config);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clean out the logs
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public function purge()
|
||||||
|
{
|
||||||
|
// Check for request forgeries.
|
||||||
|
$this->checkToken();
|
||||||
|
|
||||||
|
$model = $this->getModel();
|
||||||
|
|
||||||
|
if ($model->purge()) {
|
||||||
|
$message = Text::_('COM_ACTIONLOGS_PURGE_SUCCESS');
|
||||||
|
} else {
|
||||||
|
$message = Text::_('COM_ACTIONLOGS_PURGE_FAIL');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->setRedirect(Route::_('index.php?option=com_actionlogs&view=actionlogs', false), $message);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Joomla\Component\Actionlogs\Administrator\Controller;
|
||||||
|
|
||||||
|
use Joomla\CMS\MVC\Controller\BaseController;
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Actionlogs display controller.
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
class DisplayController extends BaseController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The default view.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.6
|
||||||
|
*/
|
||||||
|
protected $default_view = 'actionlogs';
|
||||||
|
}
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Joomla\Component\Actionlogs\Administrator\Dispatcher;
|
||||||
|
|
||||||
|
use Joomla\CMS\Access\Exception\NotAllowed;
|
||||||
|
use Joomla\CMS\Dispatcher\ComponentDispatcher;
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ComponentDispatcher class for com_actionlogs
|
||||||
|
*
|
||||||
|
* @since 4.2.7
|
||||||
|
*/
|
||||||
|
class Dispatcher extends ComponentDispatcher
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Method to check component access permission
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 4.2.7
|
||||||
|
*/
|
||||||
|
protected function checkAccess()
|
||||||
|
{
|
||||||
|
$user = $this->app->getIdentity();
|
||||||
|
|
||||||
|
// Access check
|
||||||
|
if (!$user->authorise('core.admin')) {
|
||||||
|
throw new NotAllowed($this->app->getLanguage()->_('JERROR_ALERTNOAUTHOR'), 403);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Joomla\Component\Actionlogs\Administrator\Field;
|
||||||
|
|
||||||
|
use Joomla\CMS\Form\Field\ListField;
|
||||||
|
use Joomla\CMS\HTML\HTMLHelper;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
use Joomla\Component\Actionlogs\Administrator\Helper\ActionlogsHelper;
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Field to load a list of all extensions that have logged actions
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
class ExtensionField extends ListField
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The form field type.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
protected $type = 'extension';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to get the options to populate list
|
||||||
|
*
|
||||||
|
* @return array The field option objects.
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public function getOptions()
|
||||||
|
{
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select('DISTINCT ' . $db->quoteName('extension'))
|
||||||
|
->from($db->quoteName('#__action_logs'))
|
||||||
|
->order($db->quoteName('extension'));
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
$context = $db->loadColumn();
|
||||||
|
|
||||||
|
$options = [];
|
||||||
|
|
||||||
|
if (\count($context) > 0) {
|
||||||
|
foreach ($context as $item) {
|
||||||
|
$extensions[] = strtok($item, '.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$extensions = array_unique($extensions);
|
||||||
|
|
||||||
|
foreach ($extensions as $extension) {
|
||||||
|
ActionlogsHelper::loadTranslationFiles($extension);
|
||||||
|
$options[] = HTMLHelper::_('select.option', $extension, Text::_($extension));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return array_merge(parent::getOptions(), $options);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,80 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Joomla\Component\Actionlogs\Administrator\Field;
|
||||||
|
|
||||||
|
use Joomla\CMS\Form\Field\ListField;
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Field to load a list of all users that have logged actions
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
class LogcreatorField extends ListField
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Cached array of the category items.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
protected static $options = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The form field type.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
protected $type = 'LogCreator';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to get the options to populate list
|
||||||
|
*
|
||||||
|
* @return array The field option objects.
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
protected function getOptions()
|
||||||
|
{
|
||||||
|
// Accepted modifiers
|
||||||
|
$hash = md5($this->element);
|
||||||
|
|
||||||
|
if (!isset(static::$options[$hash])) {
|
||||||
|
static::$options[$hash] = parent::getOptions();
|
||||||
|
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
|
||||||
|
// Construct the query
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select($db->quoteName('u.id', 'value'))
|
||||||
|
->select($db->quoteName('u.username', 'text'))
|
||||||
|
->from($db->quoteName('#__users', 'u'))
|
||||||
|
->join('INNER', $db->quoteName('#__action_logs', 'c') . ' ON ' . $db->quoteName('c.user_id') . ' = ' . $db->quoteName('u.id'))
|
||||||
|
->group($db->quoteName('u.id'))
|
||||||
|
->group($db->quoteName('u.username'))
|
||||||
|
->order($db->quoteName('u.username'));
|
||||||
|
|
||||||
|
// Setup the query
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
// Return the result
|
||||||
|
if ($options = $db->loadObjectList()) {
|
||||||
|
static::$options[$hash] = array_merge(static::$options[$hash], $options);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return static::$options[$hash];
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Joomla\Component\Actionlogs\Administrator\Field;
|
||||||
|
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\Form\Field\PredefinedlistField;
|
||||||
|
use Joomla\CMS\Form\Form;
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Field to show a list of range dates to sort with
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
class LogsdaterangeField extends PredefinedlistField
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The form field type.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
protected $type = 'logsdaterange';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Available options
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
protected $predefinedOptions = [
|
||||||
|
'today' => 'COM_ACTIONLOGS_OPTION_RANGE_TODAY',
|
||||||
|
'past_week' => 'COM_ACTIONLOGS_OPTION_RANGE_PAST_WEEK',
|
||||||
|
'past_1month' => 'COM_ACTIONLOGS_OPTION_RANGE_PAST_1MONTH',
|
||||||
|
'past_3month' => 'COM_ACTIONLOGS_OPTION_RANGE_PAST_3MONTH',
|
||||||
|
'past_6month' => 'COM_ACTIONLOGS_OPTION_RANGE_PAST_6MONTH',
|
||||||
|
'past_year' => 'COM_ACTIONLOGS_OPTION_RANGE_PAST_YEAR',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to instantiate the form field object.
|
||||||
|
*
|
||||||
|
* @param Form $form The form to attach to the form field object.
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public function __construct($form = null)
|
||||||
|
{
|
||||||
|
parent::__construct($form);
|
||||||
|
|
||||||
|
// Load the required language
|
||||||
|
$lang = Factory::getLanguage();
|
||||||
|
$lang->load('com_actionlogs', JPATH_ADMINISTRATOR);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Joomla\Component\Actionlogs\Administrator\Field;
|
||||||
|
|
||||||
|
use Joomla\CMS\Application\ApplicationHelper;
|
||||||
|
use Joomla\CMS\Form\Field\ListField;
|
||||||
|
use Joomla\CMS\HTML\HTMLHelper;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
use Joomla\Component\Actionlogs\Administrator\Helper\ActionlogsHelper;
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Field to load a list of all extensions that have logged actions
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
class LogtypeField extends ListField
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The form field type.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
protected $type = 'LogType';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to get the field options.
|
||||||
|
*
|
||||||
|
* @return array The field option objects.
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public function getOptions()
|
||||||
|
{
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select($db->quoteName('extension'))
|
||||||
|
->from($db->quoteName('#__action_logs_extensions'));
|
||||||
|
|
||||||
|
$extensions = $db->setQuery($query)->loadColumn();
|
||||||
|
|
||||||
|
$options = [];
|
||||||
|
|
||||||
|
foreach ($extensions as $extension) {
|
||||||
|
ActionlogsHelper::loadTranslationFiles($extension);
|
||||||
|
$extensionName = Text::_($extension);
|
||||||
|
$options[ApplicationHelper::stringURLSafe($extensionName) . '_' . $extension] = HTMLHelper::_('select.option', $extension, $extensionName);
|
||||||
|
}
|
||||||
|
|
||||||
|
ksort($options);
|
||||||
|
|
||||||
|
return array_merge(parent::getOptions(), array_values($options));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Joomla\Component\Actionlogs\Administrator\Field;
|
||||||
|
|
||||||
|
use Joomla\CMS\Form\FormField;
|
||||||
|
use Joomla\CMS\HTML\HTMLHelper;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
use Joomla\CMS\Router\Route;
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Information field.
|
||||||
|
*
|
||||||
|
* @since 3.9.2
|
||||||
|
*/
|
||||||
|
class PlugininfoField extends FormField
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The form field type.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 3.9.2
|
||||||
|
*/
|
||||||
|
protected $type = 'PluginInfo';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to get the field input markup.
|
||||||
|
*
|
||||||
|
* @return string The field input markup.
|
||||||
|
*
|
||||||
|
* @since 3.9.2
|
||||||
|
*/
|
||||||
|
protected function getInput()
|
||||||
|
{
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select($db->quoteName('extension_id'))
|
||||||
|
->from($db->quoteName('#__extensions'))
|
||||||
|
->where($db->quoteName('folder') . ' = ' . $db->quote('actionlog'))
|
||||||
|
->where($db->quoteName('element') . ' = ' . $db->quote('joomla'));
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
$result = (int) $db->loadResult();
|
||||||
|
|
||||||
|
$link = HTMLHelper::_(
|
||||||
|
'link',
|
||||||
|
Route::_('index.php?option=com_plugins&task=plugin.edit&extension_id=' . $result),
|
||||||
|
Text::_('PLG_SYSTEM_ACTIONLOGS_JOOMLA_ACTIONLOG_DISABLED'),
|
||||||
|
['class' => 'alert-link']
|
||||||
|
);
|
||||||
|
|
||||||
|
return '<div class="alert alert-info">'
|
||||||
|
. '<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden">'
|
||||||
|
. Text::_('INFO')
|
||||||
|
. '</span>'
|
||||||
|
. Text::sprintf('PLG_SYSTEM_ACTIONLOGS_JOOMLA_ACTIONLOG_DISABLED_REDIRECT', $link)
|
||||||
|
. '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,78 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Joomla\Component\Actionlogs\Administrator\Field;
|
||||||
|
|
||||||
|
use Joomla\CMS\Application\ApplicationHelper;
|
||||||
|
use Joomla\CMS\Component\ComponentHelper;
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\Form\Field\ListField;
|
||||||
|
use Joomla\CMS\HTML\HTMLHelper;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
use Joomla\Component\Actionlogs\Administrator\Helper\ActionlogsHelper;
|
||||||
|
use Joomla\Database\ParameterType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Field to load a list of all users that have logged actions
|
||||||
|
*
|
||||||
|
* @since 5.1.0
|
||||||
|
*/
|
||||||
|
class UserlogtypeField extends ListField
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The form field type.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 5.1.0
|
||||||
|
*/
|
||||||
|
protected $type = 'UserLogType';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to get the field options.
|
||||||
|
*
|
||||||
|
* @return array The field option objects.
|
||||||
|
*
|
||||||
|
* @since 5.1.0
|
||||||
|
*/
|
||||||
|
public function getOptions()
|
||||||
|
{
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
$user = Factory::getApplication()->getIdentity();
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select($db->quoteName('extensions'))
|
||||||
|
->from($db->quoteName('#__action_logs_users'))
|
||||||
|
->where($db->quoteName('user_id') . ' = :userid')
|
||||||
|
->bind(':userid', $user->id, ParameterType::INTEGER);
|
||||||
|
|
||||||
|
$extensions = $db->setQuery($query)->loadColumn();
|
||||||
|
$userExt = [];
|
||||||
|
$params = ComponentHelper::getParams('com_actionlogs');
|
||||||
|
$globalExt = $params->get('loggable_extensions', []);
|
||||||
|
|
||||||
|
if (!empty($extensions)) {
|
||||||
|
$userExt = substr($extensions[0], 2);
|
||||||
|
$userExt = substr($userExt, 0, -2);
|
||||||
|
$userExt = explode('","', $userExt);
|
||||||
|
}
|
||||||
|
|
||||||
|
$common = array_merge($globalExt, array_intersect($globalExt, $userExt));
|
||||||
|
$options = [];
|
||||||
|
|
||||||
|
foreach ($common as $extension) {
|
||||||
|
ActionlogsHelper::loadTranslationFiles($extension);
|
||||||
|
$extensionName = Text::_($extension);
|
||||||
|
$options[ApplicationHelper::stringURLSafe($extensionName) . '_' . $extension] = HTMLHelper::_('select.option', $extension, $extensionName);
|
||||||
|
}
|
||||||
|
|
||||||
|
ksort($options);
|
||||||
|
|
||||||
|
return array_merge(parent::getOptions(), array_values($options));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,370 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Joomla\Component\Actionlogs\Administrator\Helper;
|
||||||
|
|
||||||
|
use Joomla\CMS\Date\Date;
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
use Joomla\CMS\Object\CMSObject;
|
||||||
|
use Joomla\CMS\Router\Route;
|
||||||
|
use Joomla\Filesystem\Path;
|
||||||
|
use Joomla\String\StringHelper;
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Actionlogs component helper.
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
class ActionlogsHelper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Array of characters starting a formula
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*
|
||||||
|
* @since 3.9.7
|
||||||
|
*/
|
||||||
|
private static $characters = ['=', '+', '-', '@'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to convert logs objects array to an iterable type for use with a CSV export
|
||||||
|
*
|
||||||
|
* @param array|\Traversable $data The logs data objects to be exported
|
||||||
|
*
|
||||||
|
* @return \Generator
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*
|
||||||
|
* @throws \InvalidArgumentException
|
||||||
|
*/
|
||||||
|
public static function getCsvData($data): \Generator
|
||||||
|
{
|
||||||
|
if (!is_iterable($data)) {
|
||||||
|
throw new \InvalidArgumentException(
|
||||||
|
\sprintf(
|
||||||
|
'%s() requires an array or object implementing the Traversable interface, a %s was given.',
|
||||||
|
__METHOD__,
|
||||||
|
\is_object($data) ? \get_class($data) : \gettype($data)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$disabledText = Text::_('COM_ACTIONLOGS_DISABLED');
|
||||||
|
|
||||||
|
// Header row
|
||||||
|
yield ['Id', 'Action', 'Extension', 'Date', 'Name', 'IP Address'];
|
||||||
|
|
||||||
|
foreach ($data as $log) {
|
||||||
|
$extension = strtok($log->extension, '.');
|
||||||
|
|
||||||
|
static::loadTranslationFiles($extension);
|
||||||
|
|
||||||
|
yield [
|
||||||
|
'id' => $log->id,
|
||||||
|
'message' => self::escapeCsvFormula(strip_tags(static::getHumanReadableLogMessage($log, false))),
|
||||||
|
'extension' => self::escapeCsvFormula(Text::_($extension)),
|
||||||
|
'date' => (new Date($log->log_date, new \DateTimeZone('UTC')))->format('Y-m-d H:i:s T'),
|
||||||
|
'name' => self::escapeCsvFormula($log->name),
|
||||||
|
'ip_address' => self::escapeCsvFormula($log->ip_address === 'COM_ACTIONLOGS_DISABLED' ? $disabledText : $log->ip_address),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load the translation files for an extension
|
||||||
|
*
|
||||||
|
* @param string $extension Extension name
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public static function loadTranslationFiles($extension)
|
||||||
|
{
|
||||||
|
static $cache = [];
|
||||||
|
$extension = strtolower($extension);
|
||||||
|
|
||||||
|
if (isset($cache[$extension])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$lang = Factory::getLanguage();
|
||||||
|
$source = '';
|
||||||
|
|
||||||
|
switch (substr($extension, 0, 3)) {
|
||||||
|
case 'com':
|
||||||
|
default:
|
||||||
|
$source = JPATH_ADMINISTRATOR . '/components/' . $extension;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'lib':
|
||||||
|
$source = JPATH_LIBRARIES . '/' . substr($extension, 4);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'mod':
|
||||||
|
$source = JPATH_SITE . '/modules/' . $extension;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'plg':
|
||||||
|
$parts = explode('_', $extension, 3);
|
||||||
|
|
||||||
|
if (\count($parts) > 2) {
|
||||||
|
$source = JPATH_PLUGINS . '/' . $parts[1] . '/' . $parts[2];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'pkg':
|
||||||
|
$source = JPATH_SITE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'tpl':
|
||||||
|
$source = JPATH_BASE . '/templates/' . substr($extension, 4);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$lang->load($extension, JPATH_ADMINISTRATOR)
|
||||||
|
|| $lang->load($extension, $source);
|
||||||
|
|
||||||
|
if (!$lang->hasKey(strtoupper($extension))) {
|
||||||
|
$lang->load($extension . '.sys', JPATH_ADMINISTRATOR)
|
||||||
|
|| $lang->load($extension . '.sys', $source);
|
||||||
|
}
|
||||||
|
|
||||||
|
$cache[$extension] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get parameters to be
|
||||||
|
*
|
||||||
|
* @param string $context The context of the content
|
||||||
|
*
|
||||||
|
* @return mixed An object contains content type parameters, or null if not found
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*
|
||||||
|
* @deprecated 4.3 will be removed in 6.0
|
||||||
|
* Use the action log config model instead
|
||||||
|
* Example: Factory::getApplication()->bootComponent('actionlogs')->getMVCFactory()
|
||||||
|
* ->createModel('ActionlogConfig', 'Administrator')->getLogContentTypeParams($context);
|
||||||
|
*/
|
||||||
|
public static function getLogContentTypeParams($context)
|
||||||
|
{
|
||||||
|
return Factory::getApplication()->bootComponent('actionlogs')->getMVCFactory()
|
||||||
|
->createModel('ActionlogConfig', 'Administrator')->getLogContentTypeParams($context);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get human readable log message for a User Action Log
|
||||||
|
*
|
||||||
|
* @param \stdClass $log A User Action log message record
|
||||||
|
* @param boolean $generateLinks Flag to disable link generation when creating a message
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public static function getHumanReadableLogMessage($log, $generateLinks = true)
|
||||||
|
{
|
||||||
|
static::loadActionLogPluginsLanguage();
|
||||||
|
static $links = [];
|
||||||
|
$message = Text::_($log->message_language_key);
|
||||||
|
$messageData = json_decode($log->message, true);
|
||||||
|
|
||||||
|
// Special handling for translation extension name
|
||||||
|
if (isset($messageData['extension_name'])) {
|
||||||
|
static::loadTranslationFiles($messageData['extension_name']);
|
||||||
|
$messageData['extension_name'] = Text::_($messageData['extension_name']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Translating application
|
||||||
|
if (isset($messageData['app'])) {
|
||||||
|
$messageData['app'] = Text::_($messageData['app']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Translating type
|
||||||
|
if (isset($messageData['type'])) {
|
||||||
|
$messageData['type'] = Text::_($messageData['type']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove links from the message template, if we should not generate links.
|
||||||
|
if (!$generateLinks) {
|
||||||
|
$message = preg_replace('/<a href=["\'].+?["\']>/', '', $message);
|
||||||
|
$message = str_replace('</a>', '', $message);
|
||||||
|
}
|
||||||
|
|
||||||
|
$linkMode = Factory::getApplication()->get('force_ssl', 0) >= 1 ? Route::TLS_FORCE : Route::TLS_IGNORE;
|
||||||
|
|
||||||
|
foreach ($messageData as $key => $value) {
|
||||||
|
// Escape any markup in the values to prevent XSS attacks
|
||||||
|
$value = $value !== null ? htmlspecialchars($value, ENT_QUOTES, 'UTF-8') : '';
|
||||||
|
|
||||||
|
// Convert relative url to absolute url so that it is clickable in action logs notification email
|
||||||
|
if ($generateLinks && StringHelper::strpos($value, 'index.php?') === 0) {
|
||||||
|
if (!isset($links[$value])) {
|
||||||
|
$links[$value] = Route::link('administrator', $value, false, $linkMode, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$value = $links[$value];
|
||||||
|
}
|
||||||
|
|
||||||
|
$message = str_replace('{' . $key . '}', $value, $message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $message;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get link to an item of given content type
|
||||||
|
*
|
||||||
|
* @param string $component
|
||||||
|
* @param string $contentType
|
||||||
|
* @param integer $id
|
||||||
|
* @param string $urlVar
|
||||||
|
* @param CMSObject $object
|
||||||
|
*
|
||||||
|
* @return string Link to the content item
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public static function getContentTypeLink($component, $contentType, $id, $urlVar = 'id', $object = null)
|
||||||
|
{
|
||||||
|
// Try to find the component helper.
|
||||||
|
$eName = str_replace('com_', '', $component);
|
||||||
|
$file = Path::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/helpers/' . $eName . '.php');
|
||||||
|
|
||||||
|
if (file_exists($file)) {
|
||||||
|
$prefix = ucfirst(str_replace('com_', '', $component));
|
||||||
|
$cName = $prefix . 'Helper';
|
||||||
|
|
||||||
|
\JLoader::register($cName, $file);
|
||||||
|
|
||||||
|
if (class_exists($cName) && \is_callable([$cName, 'getContentTypeLink'])) {
|
||||||
|
return $cName::getContentTypeLink($contentType, $id, $object);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($urlVar)) {
|
||||||
|
$urlVar = 'id';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return default link to avoid having to implement getContentTypeLink in most of our components
|
||||||
|
return 'index.php?option=' . $component . '&task=' . $contentType . '.edit&' . $urlVar . '=' . $id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load both enabled and disabled actionlog plugins language file.
|
||||||
|
*
|
||||||
|
* It is used to make sure actions log is displayed properly instead of only language items displayed when a plugin is disabled.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public static function loadActionLogPluginsLanguage()
|
||||||
|
{
|
||||||
|
static $loaded;
|
||||||
|
if ($loaded) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$loaded = true;
|
||||||
|
|
||||||
|
$lang = Factory::getLanguage();
|
||||||
|
$db = Factory::getDbo();
|
||||||
|
|
||||||
|
// Get all (both enabled and disabled) actionlog plugins
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select(
|
||||||
|
$db->quoteName(
|
||||||
|
[
|
||||||
|
'folder',
|
||||||
|
'element',
|
||||||
|
'params',
|
||||||
|
'extension_id',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type',
|
||||||
|
'name',
|
||||||
|
'params',
|
||||||
|
'id',
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
->from($db->quoteName('#__extensions'))
|
||||||
|
->where($db->quoteName('type') . ' = ' . $db->quote('plugin'))
|
||||||
|
->where($db->quoteName('folder') . ' = ' . $db->quote('actionlog'))
|
||||||
|
->whereIn($db->quoteName('state'), [0, 1])
|
||||||
|
->order($db->quoteName('ordering'));
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
try {
|
||||||
|
$rows = $db->loadObjectList();
|
||||||
|
} catch (\RuntimeException $e) {
|
||||||
|
$rows = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($rows)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($rows as $row) {
|
||||||
|
$name = $row->name;
|
||||||
|
$type = $row->type;
|
||||||
|
$extension = 'Plg_' . $type . '_' . $name;
|
||||||
|
$extension = strtolower($extension);
|
||||||
|
|
||||||
|
// If language already loaded, don't load it again.
|
||||||
|
if ($lang->getPaths($extension)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$lang->load($extension, JPATH_ADMINISTRATOR)
|
||||||
|
|| $lang->load($extension, JPATH_PLUGINS . '/' . $type . '/' . $name);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load plg_system_actionlogs too
|
||||||
|
$lang->load('plg_system_actionlogs', JPATH_ADMINISTRATOR);
|
||||||
|
|
||||||
|
// Load plg_system_privacyconsent too
|
||||||
|
$lang->load('plg_system_privacyconsent', JPATH_ADMINISTRATOR);
|
||||||
|
|
||||||
|
// Load plg_user_terms too
|
||||||
|
$lang->load('plg_user_terms', JPATH_ADMINISTRATOR);
|
||||||
|
|
||||||
|
// Load com_privacy too.
|
||||||
|
$lang->load('com_privacy', JPATH_ADMINISTRATOR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Escapes potential characters that start a formula in a CSV value to prevent injection attacks
|
||||||
|
*
|
||||||
|
* @param mixed $value csv field value
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*
|
||||||
|
* @since 3.9.7
|
||||||
|
*/
|
||||||
|
protected static function escapeCsvFormula($value)
|
||||||
|
{
|
||||||
|
if ($value == '') {
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (\in_array($value[0], self::$characters, true)) {
|
||||||
|
$value = ' ' . $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Joomla\Component\Actionlogs\Administrator\Model;
|
||||||
|
|
||||||
|
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model to interact with the action log configuration.
|
||||||
|
*
|
||||||
|
* @since 4.2.0
|
||||||
|
*/
|
||||||
|
class ActionlogConfigModel extends BaseDatabaseModel
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Returns the action logs config for the given context.
|
||||||
|
*
|
||||||
|
* @param string $context The context of the content
|
||||||
|
*
|
||||||
|
* @return \stdClass|null An object contains content type parameters, or null if not found
|
||||||
|
*
|
||||||
|
* @since 4.2.0
|
||||||
|
*/
|
||||||
|
public function getLogContentTypeParams(string $context): ?\stdClass
|
||||||
|
{
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select('a.*')
|
||||||
|
->from($db->quoteName('#__action_log_config', 'a'))
|
||||||
|
->where($db->quoteName('a.type_alias') . ' = :context')
|
||||||
|
->bind(':context', $context);
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
return $db->loadObject();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,187 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Joomla\Component\Actionlogs\Administrator\Model;
|
||||||
|
|
||||||
|
use Joomla\CMS\Component\ComponentHelper;
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\HTML\HTMLHelper;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
use Joomla\CMS\Mail\Exception\MailDisabledException;
|
||||||
|
use Joomla\CMS\Mail\MailTemplate;
|
||||||
|
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
|
||||||
|
use Joomla\CMS\User\UserFactoryAwareInterface;
|
||||||
|
use Joomla\CMS\User\UserFactoryAwareTrait;
|
||||||
|
use Joomla\Component\Actionlogs\Administrator\Helper\ActionlogsHelper;
|
||||||
|
use Joomla\Utilities\IpHelper;
|
||||||
|
use PHPMailer\PHPMailer\Exception as phpMailerException;
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Methods supporting a list of Actionlog records.
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
class ActionlogModel extends BaseDatabaseModel implements UserFactoryAwareInterface
|
||||||
|
{
|
||||||
|
use UserFactoryAwareTrait;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function to add logs to the database
|
||||||
|
* This method adds a record to #__action_logs contains (message_language_key, message, date, context, user)
|
||||||
|
*
|
||||||
|
* @param array $messages The contents of the messages to be logged
|
||||||
|
* @param string $messageLanguageKey The language key of the message
|
||||||
|
* @param string $context The context of the content passed to the plugin
|
||||||
|
* @param integer $userId ID of user perform the action, usually ID of current logged in user
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public function addLog($messages, $messageLanguageKey, $context, $userId = 0)
|
||||||
|
{
|
||||||
|
if (!is_numeric($userId)) {
|
||||||
|
@trigger_error(\sprintf('User ID must be an integer in %s.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
}
|
||||||
|
|
||||||
|
$user = $userId ? $this->getUserFactory()->loadUserById($userId) : $this->getCurrentUser();
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
$date = Factory::getDate();
|
||||||
|
$params = ComponentHelper::getComponent('com_actionlogs')->getParams();
|
||||||
|
|
||||||
|
if ($params->get('ip_logging', 0)) {
|
||||||
|
$ip = IpHelper::getIp();
|
||||||
|
|
||||||
|
if (!filter_var($ip, FILTER_VALIDATE_IP)) {
|
||||||
|
$ip = 'COM_ACTIONLOGS_IP_INVALID';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$ip = 'COM_ACTIONLOGS_DISABLED';
|
||||||
|
}
|
||||||
|
|
||||||
|
$loggedMessages = [];
|
||||||
|
|
||||||
|
foreach ($messages as $message) {
|
||||||
|
$logMessage = new \stdClass();
|
||||||
|
$logMessage->message_language_key = $messageLanguageKey;
|
||||||
|
$logMessage->message = json_encode($message);
|
||||||
|
$logMessage->log_date = (string) $date;
|
||||||
|
$logMessage->extension = $context;
|
||||||
|
$logMessage->user_id = $user->id;
|
||||||
|
$logMessage->ip_address = $ip;
|
||||||
|
$logMessage->item_id = isset($message['id']) ? (int) $message['id'] : 0;
|
||||||
|
|
||||||
|
try {
|
||||||
|
$db->insertObject('#__action_logs', $logMessage);
|
||||||
|
$loggedMessages[] = $logMessage;
|
||||||
|
} catch (\RuntimeException $e) {
|
||||||
|
// Ignore it
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Send notification email to users who choose to be notified about the action logs
|
||||||
|
$this->sendNotificationEmails($loggedMessages, $user->name, $context);
|
||||||
|
} catch (MailDisabledException | phpMailerException $e) {
|
||||||
|
// Ignore it
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send notification emails about the action log
|
||||||
|
*
|
||||||
|
* @param array $messages The logged messages
|
||||||
|
* @param string $username The username
|
||||||
|
* @param string $context The Context
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*
|
||||||
|
* @throws MailDisabledException if mail is disabled
|
||||||
|
* @throws phpmailerException if sending mail failed
|
||||||
|
*/
|
||||||
|
protected function sendNotificationEmails($messages, $username, $context)
|
||||||
|
{
|
||||||
|
$app = Factory::getApplication();
|
||||||
|
$lang = $app->getLanguage();
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
|
||||||
|
$query
|
||||||
|
->select($db->quoteName(['u.email', 'l.extensions']))
|
||||||
|
->from($db->quoteName('#__users', 'u'))
|
||||||
|
->where($db->quoteName('u.block') . ' = 0')
|
||||||
|
->join(
|
||||||
|
'INNER',
|
||||||
|
$db->quoteName('#__action_logs_users', 'l') . ' ON ( ' . $db->quoteName('l.notify') . ' = 1 AND '
|
||||||
|
. $db->quoteName('l.user_id') . ' = ' . $db->quoteName('u.id') . ')'
|
||||||
|
);
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
$users = $db->loadObjectList();
|
||||||
|
|
||||||
|
$recipients = [];
|
||||||
|
|
||||||
|
foreach ($users as $user) {
|
||||||
|
$extensions = json_decode($user->extensions, true);
|
||||||
|
|
||||||
|
if ($extensions && \in_array(strtok($context, '.'), $extensions)) {
|
||||||
|
$recipients[] = $user->email;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($recipients)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$extension = strtok($context, '.');
|
||||||
|
$lang->load('com_actionlogs', JPATH_ADMINISTRATOR);
|
||||||
|
ActionlogsHelper::loadTranslationFiles($extension);
|
||||||
|
$temp = [];
|
||||||
|
$tempPlain = [];
|
||||||
|
|
||||||
|
foreach ($messages as $message) {
|
||||||
|
$m = [];
|
||||||
|
$m['extension'] = Text::_($extension);
|
||||||
|
$m['message'] = ActionlogsHelper::getHumanReadableLogMessage($message);
|
||||||
|
$m['date'] = HTMLHelper::_('date', $message->log_date, 'Y-m-d H:i:s T', 'UTC');
|
||||||
|
$m['username'] = $username;
|
||||||
|
$temp[] = $m;
|
||||||
|
|
||||||
|
// copy replacement tags array and set non-HTML message.
|
||||||
|
$mPlain = array_merge([], $m);
|
||||||
|
$mPlain['message'] = ActionlogsHelper::getHumanReadableLogMessage($message, false);
|
||||||
|
$tempPlain[] = $mPlain;
|
||||||
|
}
|
||||||
|
|
||||||
|
$templateData = [
|
||||||
|
'messages' => $temp,
|
||||||
|
];
|
||||||
|
$templateDataPlain = [
|
||||||
|
'messages' => $tempPlain,
|
||||||
|
];
|
||||||
|
|
||||||
|
$mailer = new MailTemplate('com_actionlogs.notification', $app->getLanguage()->getTag());
|
||||||
|
$mailer->addTemplateData($templateData);
|
||||||
|
$mailer->addTemplateData($templateDataPlain, true);
|
||||||
|
|
||||||
|
foreach ($recipients as $recipient) {
|
||||||
|
$mailer->addRecipient($recipient);
|
||||||
|
}
|
||||||
|
|
||||||
|
$mailer->send();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,399 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Joomla\Component\Actionlogs\Administrator\Model;
|
||||||
|
|
||||||
|
use Joomla\CMS\Component\ComponentHelper;
|
||||||
|
use Joomla\CMS\Date\Date;
|
||||||
|
use Joomla\CMS\Event\ActionLog\AfterLogPurgeEvent;
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\Form\Form;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
use Joomla\CMS\MVC\Model\ListModel;
|
||||||
|
use Joomla\Database\DatabaseIterator;
|
||||||
|
use Joomla\Database\ParameterType;
|
||||||
|
use Joomla\Database\QueryInterface;
|
||||||
|
use Joomla\Utilities\ArrayHelper;
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Methods supporting a list of article records.
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
class ActionlogsModel extends ListModel
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param array $config An optional associative array of configuration settings.
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
public function __construct($config = [])
|
||||||
|
{
|
||||||
|
if (empty($config['filter_fields'])) {
|
||||||
|
$config['filter_fields'] = [
|
||||||
|
'a.id', 'id',
|
||||||
|
'a.extension', 'extension',
|
||||||
|
'a.user_id', 'user',
|
||||||
|
'a.message', 'message',
|
||||||
|
'a.log_date', 'log_date',
|
||||||
|
'a.ip_address', 'ip_address',
|
||||||
|
'dateRange',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
parent::__construct($config);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to auto-populate the model state.
|
||||||
|
*
|
||||||
|
* @param string $ordering An optional ordering field.
|
||||||
|
* @param string $direction An optional direction (asc|desc).
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
protected function populateState($ordering = 'a.id', $direction = 'desc')
|
||||||
|
{
|
||||||
|
parent::populateState($ordering, $direction);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build an SQL query to load the list data.
|
||||||
|
*
|
||||||
|
* @return QueryInterface
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
protected function getListQuery()
|
||||||
|
{
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select('a.*')
|
||||||
|
->select($db->quoteName('u.name'))
|
||||||
|
->from($db->quoteName('#__action_logs', 'a'))
|
||||||
|
->join('LEFT', $db->quoteName('#__users', 'u') . ' ON ' . $db->quoteName('a.user_id') . ' = ' . $db->quoteName('u.id'));
|
||||||
|
|
||||||
|
// Get ordering
|
||||||
|
$fullorderCol = $this->state->get('list.fullordering', 'a.id DESC');
|
||||||
|
|
||||||
|
// Apply ordering
|
||||||
|
if (!empty($fullorderCol)) {
|
||||||
|
$query->order($db->escape($fullorderCol));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get filter by user
|
||||||
|
$user = $this->getState('filter.user');
|
||||||
|
|
||||||
|
// Apply filter by user
|
||||||
|
if (!empty($user)) {
|
||||||
|
$user = (int) $user;
|
||||||
|
$query->where($db->quoteName('a.user_id') . ' = :userid')
|
||||||
|
->bind(':userid', $user, ParameterType::INTEGER);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get filter by extension
|
||||||
|
$extension = $this->getState('filter.extension');
|
||||||
|
|
||||||
|
// Apply filter by extension
|
||||||
|
if (!empty($extension)) {
|
||||||
|
$extension .= '%';
|
||||||
|
$query->where($db->quoteName('a.extension') . ' LIKE :extension')
|
||||||
|
->bind(':extension', $extension);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get filter by date range
|
||||||
|
$dateRange = $this->getState('filter.dateRange');
|
||||||
|
|
||||||
|
// Apply filter by date range
|
||||||
|
if (!empty($dateRange)) {
|
||||||
|
$date = $this->buildDateRange($dateRange);
|
||||||
|
|
||||||
|
// If the chosen range is not more than a year ago
|
||||||
|
if ($date['dNow'] !== false && $date['dStart'] !== false) {
|
||||||
|
$dStart = $date['dStart']->format('Y-m-d H:i:s');
|
||||||
|
$dNow = $date['dNow']->format('Y-m-d H:i:s');
|
||||||
|
$query->where(
|
||||||
|
$db->quoteName('a.log_date') . ' BETWEEN :dstart AND :dnow'
|
||||||
|
);
|
||||||
|
$query->bind(':dstart', $dStart);
|
||||||
|
$query->bind(':dnow', $dNow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Filter the items over the search string if set.
|
||||||
|
$search = $this->getState('filter.search');
|
||||||
|
|
||||||
|
if (!empty($search)) {
|
||||||
|
if (stripos($search, 'id:') === 0) {
|
||||||
|
$ids = (int) substr($search, 3);
|
||||||
|
$query->where($db->quoteName('a.id') . ' = :id')
|
||||||
|
->bind(':id', $ids, ParameterType::INTEGER);
|
||||||
|
} elseif (stripos($search, 'item_id:') === 0) {
|
||||||
|
$ids = (int) substr($search, 8);
|
||||||
|
$query->where($db->quoteName('a.item_id') . ' = :itemid')
|
||||||
|
->bind(':itemid', $ids, ParameterType::INTEGER);
|
||||||
|
} else {
|
||||||
|
$search = '%' . $search . '%';
|
||||||
|
$query->where($db->quoteName('a.message') . ' LIKE :message')
|
||||||
|
->bind(':message', $search);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct the date range to filter on.
|
||||||
|
*
|
||||||
|
* @param string $range The textual range to construct the filter for.
|
||||||
|
*
|
||||||
|
* @return array The date range to filter on.
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
private function buildDateRange($range)
|
||||||
|
{
|
||||||
|
// Get UTC for now.
|
||||||
|
$dNow = new Date();
|
||||||
|
$dStart = clone $dNow;
|
||||||
|
|
||||||
|
switch ($range) {
|
||||||
|
case 'past_week':
|
||||||
|
$dStart->modify('-7 day');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'past_1month':
|
||||||
|
$dStart->modify('-1 month');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'past_3month':
|
||||||
|
$dStart->modify('-3 month');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'past_6month':
|
||||||
|
$dStart->modify('-6 month');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'past_year':
|
||||||
|
$dStart->modify('-1 year');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'today':
|
||||||
|
// Ranges that need to align with local 'days' need special treatment.
|
||||||
|
$offset = Factory::getApplication()->get('offset');
|
||||||
|
|
||||||
|
// Reset the start time to be the beginning of today, local time.
|
||||||
|
$dStart = new Date('now', $offset);
|
||||||
|
$dStart->setTime(0, 0, 0);
|
||||||
|
|
||||||
|
// Now change the timezone back to UTC.
|
||||||
|
$tz = new \DateTimeZone('GMT');
|
||||||
|
$dStart->setTimezone($tz);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ['dNow' => $dNow, 'dStart' => $dStart];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all log entries for an item
|
||||||
|
*
|
||||||
|
* @param string $extension The extension the item belongs to
|
||||||
|
* @param integer $itemId The item ID
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public function getLogsForItem($extension, $itemId)
|
||||||
|
{
|
||||||
|
$itemId = (int) $itemId;
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select('a.*')
|
||||||
|
->select($db->quoteName('u.name'))
|
||||||
|
->from($db->quoteName('#__action_logs', 'a'))
|
||||||
|
->join('INNER', $db->quoteName('#__users', 'u') . ' ON ' . $db->quoteName('a.user_id') . ' = ' . $db->quoteName('u.id'))
|
||||||
|
->where($db->quoteName('a.extension') . ' = :extension')
|
||||||
|
->where($db->quoteName('a.item_id') . ' = :itemid')
|
||||||
|
->bind(':extension', $extension)
|
||||||
|
->bind(':itemid', $itemId, ParameterType::INTEGER);
|
||||||
|
|
||||||
|
// Get ordering
|
||||||
|
$fullorderCol = $this->getState('list.fullordering', 'a.id DESC');
|
||||||
|
|
||||||
|
// Apply ordering
|
||||||
|
if (!empty($fullorderCol)) {
|
||||||
|
$query->order($db->escape($fullorderCol));
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
return $db->loadObjectList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get logs data into Table object
|
||||||
|
*
|
||||||
|
* @param integer[]|null $pks An optional array of log record IDs to load
|
||||||
|
*
|
||||||
|
* @return array All logs in the table
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public function getLogsData($pks = null)
|
||||||
|
{
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
$query = $this->getLogDataQuery($pks);
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
return $db->loadObjectList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get logs data as a database iterator
|
||||||
|
*
|
||||||
|
* @param integer[]|null $pks An optional array of log record IDs to load
|
||||||
|
*
|
||||||
|
* @return DatabaseIterator
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public function getLogDataAsIterator($pks = null)
|
||||||
|
{
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
$query = $this->getLogDataQuery($pks);
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
return $db->getIterator();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the query for loading logs data
|
||||||
|
*
|
||||||
|
* @param integer[]|null $pks An optional array of log record IDs to load
|
||||||
|
*
|
||||||
|
* @return QueryInterface
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
private function getLogDataQuery($pks = null)
|
||||||
|
{
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select('a.*')
|
||||||
|
->select($db->quoteName('u.name'))
|
||||||
|
->from($db->quoteName('#__action_logs', 'a'))
|
||||||
|
->join('INNER', $db->quoteName('#__users', 'u') . ' ON ' . $db->quoteName('a.user_id') . ' = ' . $db->quoteName('u.id'));
|
||||||
|
|
||||||
|
if (\is_array($pks) && \count($pks) > 0) {
|
||||||
|
$pks = ArrayHelper::toInteger($pks);
|
||||||
|
$query->whereIn($db->quoteName('a.id'), $pks);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete logs
|
||||||
|
*
|
||||||
|
* @param array $pks Primary keys of logs
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public function delete(&$pks)
|
||||||
|
{
|
||||||
|
$keys = ArrayHelper::toInteger($pks);
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->delete($db->quoteName('#__action_logs'))
|
||||||
|
->whereIn($db->quoteName('id'), $keys);
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
try {
|
||||||
|
$db->execute();
|
||||||
|
} catch (\RuntimeException $e) {
|
||||||
|
$this->setError($e->getMessage());
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->getDispatcher()->dispatch('onAfterLogPurge', new AfterLogPurgeEvent('onAfterLogPurge'));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes all of logs from the table.
|
||||||
|
*
|
||||||
|
* @return boolean result of operation
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public function purge()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->getDatabase()->truncateTable('#__action_logs');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->getDispatcher()->dispatch('onAfterLogPurge', new AfterLogPurgeEvent('onAfterLogPurge'));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the filter form
|
||||||
|
*
|
||||||
|
* @param array $data data
|
||||||
|
* @param boolean $loadData load current data
|
||||||
|
*
|
||||||
|
* @return Form|boolean The Form object or false on error
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public function getFilterForm($data = [], $loadData = true)
|
||||||
|
{
|
||||||
|
$form = parent::getFilterForm($data, $loadData);
|
||||||
|
$params = ComponentHelper::getParams('com_actionlogs');
|
||||||
|
$ipLogging = (bool) $params->get('ip_logging', 0);
|
||||||
|
|
||||||
|
// Add ip sort options to sort dropdown
|
||||||
|
if ($form && $ipLogging) {
|
||||||
|
/* @var \Joomla\CMS\Form\Field\ListField $field */
|
||||||
|
$field = $form->getField('fullordering', 'list');
|
||||||
|
$field->addOption(Text::_('COM_ACTIONLOGS_IP_ADDRESS_ASC'), ['value' => 'a.ip_address ASC']);
|
||||||
|
$field->addOption(Text::_('COM_ACTIONLOGS_IP_ADDRESS_DESC'), ['value' => 'a.ip_address DESC']);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $form;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,103 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Joomla\Component\Actionlogs\Administrator\Plugin;
|
||||||
|
|
||||||
|
use Joomla\CMS\Plugin\CMSPlugin;
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract Action Log Plugin
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
abstract class ActionLogPlugin extends CMSPlugin
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Application object.
|
||||||
|
*
|
||||||
|
* @var \Joomla\CMS\Application\CMSApplication
|
||||||
|
* @since 3.9.0
|
||||||
|
*
|
||||||
|
* @deprecated 5.1.0 will be removed in 7.0 use $this->getApplication() instead
|
||||||
|
*/
|
||||||
|
protected $app;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Database object.
|
||||||
|
*
|
||||||
|
* @var \Joomla\Database\DatabaseDriver
|
||||||
|
* @since 3.9.0
|
||||||
|
*
|
||||||
|
* @deprecated 5.1.0 will be removed in 7.0 use $this->getDatabase() instead
|
||||||
|
*/
|
||||||
|
protected $db;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load plugin language file automatically so that it can be used inside component
|
||||||
|
*
|
||||||
|
* @var boolean
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
protected $autoloadLanguage = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Proxy for ActionlogsModelUserlog addLog method
|
||||||
|
*
|
||||||
|
* This method adds a record to #__action_logs contains (message_language_key, message, date, context, user)
|
||||||
|
*
|
||||||
|
* @param array $messages The contents of the messages to be logged
|
||||||
|
* @param string $messageLanguageKey The language key of the message
|
||||||
|
* @param string $context The context of the content passed to the plugin
|
||||||
|
* @param int $userId ID of user perform the action, usually ID of current logged in user
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
protected function addLog($messages, $messageLanguageKey, $context, $userId = null)
|
||||||
|
{
|
||||||
|
$app = $this->getApplication() ?: $this->app;
|
||||||
|
$user = $app->getIdentity();
|
||||||
|
|
||||||
|
foreach ($messages as $index => $message) {
|
||||||
|
if (!\array_key_exists('userid', $message)) {
|
||||||
|
$message['userid'] = $user->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!\array_key_exists('username', $message)) {
|
||||||
|
$message['username'] = $user->username;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!\array_key_exists('accountlink', $message)) {
|
||||||
|
$message['accountlink'] = 'index.php?option=com_users&task=user.edit&id=' . $user->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (\array_key_exists('type', $message)) {
|
||||||
|
$message['type'] = strtoupper($message['type']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (\array_key_exists('app', $message)) {
|
||||||
|
$message['app'] = strtoupper($message['app']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$messages[$index] = $message;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @var \Joomla\Component\Actionlogs\Administrator\Model\ActionlogModel $model */
|
||||||
|
$model = $app->bootComponent('com_actionlogs')
|
||||||
|
->getMVCFactory()->createModel('Actionlog', 'Administrator', ['ignore_request' => true]);
|
||||||
|
|
||||||
|
$model->addLog($messages, strtoupper($messageLanguageKey), $context, $userId);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,156 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Joomla\Component\Actionlogs\Administrator\View\Actionlogs;
|
||||||
|
|
||||||
|
use Joomla\CMS\Component\ComponentHelper;
|
||||||
|
use Joomla\CMS\Form\Form;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
use Joomla\CMS\MVC\View\GenericDataException;
|
||||||
|
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
|
||||||
|
use Joomla\CMS\Pagination\Pagination;
|
||||||
|
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||||
|
use Joomla\Component\Actionlogs\Administrator\Helper\ActionlogsHelper;
|
||||||
|
use Joomla\Component\Actionlogs\Administrator\Model\ActionlogsModel;
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View class for a list of logs.
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
class HtmlView extends BaseHtmlView
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* An array of items.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
protected $items;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The model state
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
protected $state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The pagination object
|
||||||
|
*
|
||||||
|
* @var Pagination
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
protected $pagination;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Form object for search filters
|
||||||
|
*
|
||||||
|
* @var Form
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public $filterForm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The active search filters
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
public $activeFilters;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setting if the IP column should be shown
|
||||||
|
*
|
||||||
|
* @var boolean
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
protected $showIpColumn = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setting if the date should be displayed relative to the current date.
|
||||||
|
*
|
||||||
|
* @var boolean
|
||||||
|
* @since 4.1.0
|
||||||
|
*/
|
||||||
|
protected $dateRelative = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to display the view.
|
||||||
|
*
|
||||||
|
* @param string $tpl A template file to load. [optional]
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
public function display($tpl = null)
|
||||||
|
{
|
||||||
|
/** @var ActionlogsModel $model */
|
||||||
|
$model = $this->getModel();
|
||||||
|
$this->items = $model->getItems();
|
||||||
|
$this->state = $model->getState();
|
||||||
|
$this->pagination = $model->getPagination();
|
||||||
|
$this->filterForm = $model->getFilterForm();
|
||||||
|
$this->activeFilters = $model->getActiveFilters();
|
||||||
|
$params = ComponentHelper::getParams('com_actionlogs');
|
||||||
|
$this->showIpColumn = (bool) $params->get('ip_logging', 0);
|
||||||
|
$this->dateRelative = (bool) $params->get('date_relative', 1);
|
||||||
|
|
||||||
|
if (\count($errors = $model->getErrors())) {
|
||||||
|
throw new GenericDataException(implode("\n", $errors), 500);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->addToolbar();
|
||||||
|
|
||||||
|
// Load all actionlog plugins language files
|
||||||
|
ActionlogsHelper::loadActionLogPluginsLanguage();
|
||||||
|
|
||||||
|
parent::display($tpl);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add the page title and toolbar.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 3.9.0
|
||||||
|
*/
|
||||||
|
protected function addToolbar()
|
||||||
|
{
|
||||||
|
ToolbarHelper::title(Text::_('COM_ACTIONLOGS_MANAGER_USERLOGS'), 'icon-list-2');
|
||||||
|
$toolbar = $this->getDocument()->getToolbar();
|
||||||
|
|
||||||
|
$toolbar->standardButton('download', 'COM_ACTIONLOGS_EXPORT_CSV', 'actionlogs.exportSelectedLogs')
|
||||||
|
->icon('icon-download')
|
||||||
|
->listCheck(true);
|
||||||
|
|
||||||
|
$toolbar->standardButton('download', 'COM_ACTIONLOGS_EXPORT_ALL_CSV', 'actionlogs.exportLogs')
|
||||||
|
->icon('icon-download')
|
||||||
|
->listCheck(false);
|
||||||
|
|
||||||
|
$toolbar->delete('actionlogs.delete')
|
||||||
|
->message('JGLOBAL_CONFIRM_DELETE');
|
||||||
|
|
||||||
|
$toolbar->confirmButton('delete', 'COM_ACTIONLOGS_TOOLBAR_PURGE', 'actionlogs.purge')
|
||||||
|
->message('COM_ACTIONLOGS_PURGE_CONFIRM')
|
||||||
|
->listCheck(false);
|
||||||
|
|
||||||
|
$toolbar->preferences('com_actionlogs');
|
||||||
|
$toolbar->help('User_Actions_Log');
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,130 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_actionlogs
|
||||||
|
*
|
||||||
|
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\HTML\HTMLHelper;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
use Joomla\CMS\Layout\LayoutHelper;
|
||||||
|
use Joomla\CMS\Router\Route;
|
||||||
|
use Joomla\Component\Actionlogs\Administrator\Helper\ActionlogsHelper;
|
||||||
|
use Joomla\Component\Actionlogs\Administrator\View\Actionlogs\HtmlView;
|
||||||
|
|
||||||
|
/** @var HtmlView $this */
|
||||||
|
|
||||||
|
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||||
|
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||||
|
|
||||||
|
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||||
|
$wa = $this->getDocument()->getWebAssetManager();
|
||||||
|
$wa->useScript('keepalive')
|
||||||
|
->useScript('table.columns')
|
||||||
|
->useScript('multiselect')
|
||||||
|
->useScript('com_actionlogs.admin-actionlogs');
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form action="<?php echo Route::_('index.php?option=com_actionlogs&view=actionlogs'); ?>" method="post" name="adminForm" id="adminForm">
|
||||||
|
<div id="j-main-container" class="j-main-container">
|
||||||
|
<?php // Search tools bar ?>
|
||||||
|
<?php echo LayoutHelper::render('joomla.searchtools.default', ['view' => $this]); ?>
|
||||||
|
<?php if (empty($this->items)) : ?>
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
|
||||||
|
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
|
||||||
|
</div>
|
||||||
|
<?php else : ?>
|
||||||
|
<table class="table" id="logsList">
|
||||||
|
<caption class="visually-hidden">
|
||||||
|
<?php echo Text::_('COM_ACTIONLOGS_TABLE_CAPTION'); ?>,
|
||||||
|
<span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
|
||||||
|
<span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>
|
||||||
|
</caption>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td class="w-1 text-center">
|
||||||
|
<?php echo HTMLHelper::_('grid.checkall'); ?>
|
||||||
|
</td>
|
||||||
|
<th scope="col" class="d-md-table-cell">
|
||||||
|
<?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_ACTION', 'a.message', $listDirn, $listOrder); ?>
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="w-15 d-none d-md-table-cell">
|
||||||
|
<?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_EXTENSION', 'a.extension', $listDirn, $listOrder); ?>
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="w-15 d-none d-md-table-cell">
|
||||||
|
<?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_DATE', 'a.log_date', $listDirn, $listOrder); ?>
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="w-10 d-md-table-cell">
|
||||||
|
<?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_NAME', 'a.user_id', $listDirn, $listOrder); ?>
|
||||||
|
</th>
|
||||||
|
<?php if ($this->showIpColumn) : ?>
|
||||||
|
<th scope="col" class="w-10 d-none d-md-table-cell">
|
||||||
|
<?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_IP_ADDRESS', 'a.ip_address', $listDirn, $listOrder); ?>
|
||||||
|
</th>
|
||||||
|
<?php endif; ?>
|
||||||
|
<th scope="col" class="w-1 d-none d-md-table-cell">
|
||||||
|
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach ($this->items as $i => $item) :
|
||||||
|
$extension = strtok($item->extension, '.');
|
||||||
|
ActionlogsHelper::loadTranslationFiles($extension); ?>
|
||||||
|
<tr class="row<?php echo $i % 2; ?>">
|
||||||
|
<td class="text-center">
|
||||||
|
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
|
||||||
|
</td>
|
||||||
|
<th scope="row" class="d-md-table-cell">
|
||||||
|
<?php echo ActionlogsHelper::getHumanReadableLogMessage($item); ?>
|
||||||
|
</th>
|
||||||
|
<td class="d-none d-md-table-cell">
|
||||||
|
<?php echo $this->escape(Text::_($extension)); ?>
|
||||||
|
</td>
|
||||||
|
<td class="d-none d-md-table-cell">
|
||||||
|
<?php if ($this->dateRelative) : ?>
|
||||||
|
<?php echo HTMLHelper::_('date.relative', $item->log_date); ?>
|
||||||
|
<div class="small">
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php echo HTMLHelper::_('date', $item->log_date, Text::_('DATE_FORMAT_LC6')); ?>
|
||||||
|
<?php if ($this->dateRelative) : ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</td>
|
||||||
|
<td class="d-md-table-cell">
|
||||||
|
<?php echo $this->escape($item->name); ?>
|
||||||
|
</td>
|
||||||
|
<?php if ($this->showIpColumn) : ?>
|
||||||
|
<td class="d-none d-md-table-cell">
|
||||||
|
<?php echo Text::_($this->escape($item->ip_address)); ?>
|
||||||
|
</td>
|
||||||
|
<?php endif;?>
|
||||||
|
<td class="d-none d-md-table-cell">
|
||||||
|
<?php echo (int) $item->id; ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<?php // Load the pagination. ?>
|
||||||
|
<?php echo $this->pagination->getListFooter(); ?>
|
||||||
|
|
||||||
|
<?php endif;?>
|
||||||
|
<input type="hidden" name="task" value="" />
|
||||||
|
<input type="hidden" name="boxchecked" value="0" />
|
||||||
|
<?php echo HTMLHelper::_('form.token'); ?>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<form action="<?php echo Route::_('index.php?option=com_actionlogs&view=actionlogs'); ?>" method="post" name="exportForm" id="exportForm">
|
||||||
|
<input type="hidden" name="task" value="" />
|
||||||
|
<input type="hidden" name="cids" value="" />
|
||||||
|
<?php echo HTMLHelper::_('form.token'); ?>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<metadata>
|
||||||
|
<layout title="COM_ACTIONLOGS_VIEW_DEFAULT_TITLE">
|
||||||
|
<message>
|
||||||
|
<![CDATA[COM_ACTIONLOGS_VIEW_DEFAULT_DESC]]>
|
||||||
|
</message>
|
||||||
|
</layout>
|
||||||
|
</metadata>
|
||||||
|
|
||||||
29
administrator/components/com_admin/admin.xml
Normal file
29
administrator/components/com_admin/admin.xml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<extension type="component" method="upgrade">
|
||||||
|
<name>com_admin</name>
|
||||||
|
<author>Joomla! Project</author>
|
||||||
|
<creationDate>2006-04</creationDate>
|
||||||
|
<copyright>(C) 2006 Open Source Matters, Inc.</copyright>
|
||||||
|
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||||
|
<authorEmail>admin@joomla.org</authorEmail>
|
||||||
|
<authorUrl>www.joomla.org</authorUrl>
|
||||||
|
<version>4.0.0</version>
|
||||||
|
<description>COM_ADMIN_XML_DESCRIPTION</description>
|
||||||
|
<namespace path="src">Joomla\Component\Admin</namespace>
|
||||||
|
<media />
|
||||||
|
<administration>
|
||||||
|
<files folder="admin">
|
||||||
|
<filename>admin.xml</filename>
|
||||||
|
<filename>script.php</filename>
|
||||||
|
<folder>forms</folder>
|
||||||
|
<folder>postinstall</folder>
|
||||||
|
<folder>services</folder>
|
||||||
|
<folder>src</folder>
|
||||||
|
<folder>tmpl</folder>
|
||||||
|
</files>
|
||||||
|
<languages folder="admin">
|
||||||
|
<language tag="en-GB">language/en-GB/com_admin.ini</language>
|
||||||
|
<language tag="en-GB">language/en-GB/com_admin.sys.ini</language>
|
||||||
|
</languages>
|
||||||
|
</administration>
|
||||||
|
</extension>
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_admin
|
||||||
|
*
|
||||||
|
* @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*
|
||||||
|
* This file contains post-installation message handling for notifying users of a change
|
||||||
|
* in the default .htaccess and web.config files.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notifies users of the add the nosniff headers by applying the changes from the default .htaccess or web.config file
|
||||||
|
*
|
||||||
|
* This check returns true regardless of condition.
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*
|
||||||
|
* @since 3.4
|
||||||
|
*/
|
||||||
|
function admin_postinstall_addnosniff_condition()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@ -0,0 +1,86 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_admin
|
||||||
|
*
|
||||||
|
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
use Joomla\Filesystem\File;
|
||||||
|
use Joomla\Filesystem\Path;
|
||||||
|
use Joomla\Registry\Registry;
|
||||||
|
use Joomla\Utilities\ArrayHelper;
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notifies users of the new Behind Load Balancer option in Global Config, if we detect they might be behind a proxy
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*
|
||||||
|
* @since 3.9.26
|
||||||
|
*/
|
||||||
|
function admin_postinstall_behindproxy_condition()
|
||||||
|
{
|
||||||
|
$app = Factory::getApplication();
|
||||||
|
|
||||||
|
if ($app->get('behind_loadbalancer', '0')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (\array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (\array_key_exists('HTTP_CLIENT_IP', $_SERVER) && !empty($_SERVER['HTTP_CLIENT_IP'])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enables the Behind Load Balancer setting in Global Configuration
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 3.9.26
|
||||||
|
*/
|
||||||
|
function behindproxy_postinstall_action()
|
||||||
|
{
|
||||||
|
$prev = ArrayHelper::fromObject(new JConfig());
|
||||||
|
$data = array_merge($prev, ['behind_loadbalancer' => '1']);
|
||||||
|
|
||||||
|
$config = new Registry($data);
|
||||||
|
|
||||||
|
// Set the configuration file path.
|
||||||
|
$file = JPATH_CONFIGURATION . '/configuration.php';
|
||||||
|
|
||||||
|
// Attempt to make the file writeable
|
||||||
|
if (Path::isOwner($file) && !Path::setPermissions($file, '0644')) {
|
||||||
|
Factory::getApplication()->enqueueMessage(Text::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTWRITABLE'), 'error');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Attempt to write the configuration file as a PHP class named JConfig.
|
||||||
|
$configuration = $config->toString('PHP', ['class' => 'JConfig', 'closingtag' => false]);
|
||||||
|
|
||||||
|
if (!File::write($file, $configuration)) {
|
||||||
|
Factory::getApplication()->enqueueMessage(Text::_('COM_CONFIG_ERROR_WRITE_FAILED'), 'error');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Attempt to make the file unwriteable
|
||||||
|
if (Path::isOwner($file) && !Path::setPermissions($file, '0444')) {
|
||||||
|
Factory::getApplication()->enqueueMessage(Text::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTUNWRITABLE'), 'error');
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_admin
|
||||||
|
*
|
||||||
|
* @copyright (C) 2024 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*
|
||||||
|
* This file contains post-installation message handling for notifying users of a change
|
||||||
|
* in the default .htaccess file regarding Brotli compression.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notifies users of a change in the default .htaccess file regarding setting for brotli to prevent double compression
|
||||||
|
*
|
||||||
|
* This check returns true regardless of condition.
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*
|
||||||
|
* @since 4.4.4
|
||||||
|
*/
|
||||||
|
function admin_postinstall_htaccessbrotli_condition()
|
||||||
|
{
|
||||||
|
$htaccessContent = '';
|
||||||
|
|
||||||
|
if (is_file(JPATH_ROOT . '/.htaccess') || is_file(JPATH_ROOT . '/htaccess.txt')) {
|
||||||
|
$htaccessContent = file_get_contents(is_file(JPATH_ROOT . '/.htaccess') ? JPATH_ROOT . '/.htaccess' : JPATH_ROOT . '/htaccess.txt');
|
||||||
|
}
|
||||||
|
|
||||||
|
return !str_contains($htaccessContent, 'E=no-brotli:1');
|
||||||
|
}
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_admin
|
||||||
|
*
|
||||||
|
* @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*
|
||||||
|
* This file contains post-installation message handling for notifying users of a change
|
||||||
|
* in the default .htaccess file regarding setting the Content-Encoding header.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notifies users of a change in the default .htaccess file regarding setting the Content-Encoding header
|
||||||
|
*
|
||||||
|
* This check returns true regardless of condition.
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*
|
||||||
|
* @since 4.2.9
|
||||||
|
*/
|
||||||
|
function admin_postinstall_htaccesssetce_condition()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_admin
|
||||||
|
*
|
||||||
|
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*
|
||||||
|
* This file contains post-installation message handling for notifying users of a change
|
||||||
|
* in the default .htaccess file regarding hardening against XSS in SVG's
|
||||||
|
*/
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notifies users of a change in the default .htaccess file regarding hardening against XSS in SVG's
|
||||||
|
*
|
||||||
|
* This check returns true regardless of condition.
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*
|
||||||
|
* @since 3.9.21
|
||||||
|
*/
|
||||||
|
function admin_postinstall_htaccesssvg_condition()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_admin
|
||||||
|
*
|
||||||
|
* @copyright (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*
|
||||||
|
* This file contains post-installation message handling for the checks if the installation is
|
||||||
|
* affected by the issue with content languages access in 3.4.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the installation is affected by the issue with content languages access in 3.4.0
|
||||||
|
*
|
||||||
|
* @link https://github.com/joomla/joomla-cms/pull/6172
|
||||||
|
* @link https://github.com/joomla/joomla-cms/pull/6194
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*
|
||||||
|
* @since 3.4.1
|
||||||
|
*/
|
||||||
|
function admin_postinstall_languageaccess340_condition()
|
||||||
|
{
|
||||||
|
$db = Factory::getDbo();
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select($db->quoteName('access'))
|
||||||
|
->from($db->quoteName('#__languages'))
|
||||||
|
->where($db->quoteName('access') . ' = ' . $db->quote('0'));
|
||||||
|
$db->setQuery($query);
|
||||||
|
$db->execute();
|
||||||
|
$numRows = $db->getNumRows();
|
||||||
|
|
||||||
|
if (isset($numRows) && $numRows != 0) {
|
||||||
|
// We have rows here so we have at minimum one row with access set to 0
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// All good the query return nothing.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_admin
|
||||||
|
*
|
||||||
|
* @copyright (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*
|
||||||
|
* This file contains post-installation message handling for the checking minimum PHP version support
|
||||||
|
*/
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alerts the user we are collecting anonymous data as of Joomla 3.5.0.
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*
|
||||||
|
* @since 3.5
|
||||||
|
*/
|
||||||
|
function admin_postinstall_statscollection_condition()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_admin
|
||||||
|
*
|
||||||
|
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*
|
||||||
|
* This file contains post-installation message handling for notifying users of a change
|
||||||
|
* in the default textfilter settings
|
||||||
|
*/
|
||||||
|
|
||||||
|
// phpcs:disable PSR1.Files.SideEffects
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
// phpcs:enable PSR1.Files.SideEffects
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notifies users the changes from the default textfilter.
|
||||||
|
*
|
||||||
|
* This check returns true regardless of condition.
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*
|
||||||
|
* @since 3.9.19
|
||||||
|
*/
|
||||||
|
function admin_postinstall_textfilter3919_condition()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
3577
administrator/components/com_admin/script.php
Normal file
3577
administrator/components/com_admin/script.php
Normal file
File diff suppressed because it is too large
Load Diff
55
administrator/components/com_admin/services/provider.php
Normal file
55
administrator/components/com_admin/services/provider.php
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_admin
|
||||||
|
*
|
||||||
|
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
|
||||||
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
|
||||||
|
use Joomla\CMS\Extension\ComponentInterface;
|
||||||
|
use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
|
||||||
|
use Joomla\CMS\Extension\Service\Provider\MVCFactory;
|
||||||
|
use Joomla\CMS\HTML\Registry;
|
||||||
|
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
|
||||||
|
use Joomla\Component\Admin\Administrator\Extension\AdminComponent;
|
||||||
|
use Joomla\DI\Container;
|
||||||
|
use Joomla\DI\ServiceProviderInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The admin service provider.
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
return new class () implements ServiceProviderInterface {
|
||||||
|
/**
|
||||||
|
* Registers the service provider with a DI container.
|
||||||
|
*
|
||||||
|
* @param Container $container The DI container.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
*/
|
||||||
|
public function register(Container $container)
|
||||||
|
{
|
||||||
|
$container->registerServiceProvider(new MVCFactory('\\Joomla\\Component\\Admin'));
|
||||||
|
$container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Admin'));
|
||||||
|
|
||||||
|
$container->set(
|
||||||
|
ComponentInterface::class,
|
||||||
|
function (Container $container) {
|
||||||
|
$component = new AdminComponent($container->get(ComponentDispatcherFactoryInterface::class));
|
||||||
|
|
||||||
|
$component->setMVCFactory($container->get(MVCFactoryInterface::class));
|
||||||
|
$component->setRegistry($container->get(Registry::class));
|
||||||
|
|
||||||
|
return $component;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
@ -0,0 +1 @@
|
|||||||
|
DROP TABLE IF EXISTS `#__utf8_conversion`;
|
||||||
@ -0,0 +1 @@
|
|||||||
|
DELETE FROM `#__scheduler_tasks` WHERE `type` = 'demoTask_r1.sleep';
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE `#__menu_types` ADD COLUMN `ordering` int NOT NULL DEFAULT 0 AFTER `client_id` /** CAN FAIL **/;
|
||||||
|
UPDATE `#__menu_types` SET `ordering` = `id` WHERE `client_id` = 0;
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
--
|
||||||
|
-- Table structure for table `#__schemaorg`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `#__schemaorg` (
|
||||||
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`itemId` int unsigned,
|
||||||
|
`context` varchar(100),
|
||||||
|
`schemaType` varchar(100),
|
||||||
|
`schema` text,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- Add plugins to `#__extensions`
|
||||||
|
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) VALUES
|
||||||
|
(0, 'plg_schemaorg_blogposting', 'plugin', 'blogposting', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 1, 0),
|
||||||
|
(0, 'plg_schemaorg_book', 'plugin', 'book', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 2, 0),
|
||||||
|
(0, 'plg_schemaorg_event', 'plugin', 'event', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 3, 0),
|
||||||
|
(0, 'plg_schemaorg_organization', 'plugin', 'organization', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 4, 0),
|
||||||
|
(0, 'plg_schemaorg_person', 'plugin', 'person', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 5, 0),
|
||||||
|
(0, 'plg_schemaorg_recipe', 'plugin', 'recipe', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 6, 0),
|
||||||
|
(0, 'plg_schemaorg_jobposting', 'plugin', 'jobposting', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 7, 0),
|
||||||
|
(0, 'plg_system_schemaorg', 'plugin', 'schemaorg', 'system', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`)
|
||||||
|
SELECT 0, 'plg_behaviour_compat', 'plugin', 'compat', 'behaviour', 0, 1, 1, 0, 1, '', '{"classes_aliases":"1","es5_assets":"1"}', '', -1, 0
|
||||||
|
WHERE NOT EXISTS (SELECT * FROM `#__extensions` e WHERE e.`type` = 'plugin' AND e.`element` = 'compat' AND e.`folder` = 'behaviour' AND e.`client_id` = 0);
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
--
|
||||||
|
-- Attention: In the below SQL statements, the value of the filter is unescaped, i.e. uses "\\", while
|
||||||
|
-- in base.sql the same value is using "\\\\". This is expected because of how JSON_REPLACE works.
|
||||||
|
--
|
||||||
|
UPDATE `#__extensions`
|
||||||
|
SET `params` = JSON_REPLACE(`params`, '$.filter' , '\\Joomla\\CMS\\Component\\ComponentHelper::filterText')
|
||||||
|
WHERE `type` = 'plugin'
|
||||||
|
AND `folder` = 'fields'
|
||||||
|
AND `element` IN ('editor', 'text', 'textarea')
|
||||||
|
AND `params` <> ''
|
||||||
|
AND JSON_EXTRACT(`params`, '$.filter') = 'JComponentHelper::filterText';
|
||||||
|
|
||||||
|
UPDATE `#__fields`
|
||||||
|
SET `fieldparams` = JSON_REPLACE(`fieldparams`, '$.filter' , '\\Joomla\\CMS\\Component\\ComponentHelper::filterText')
|
||||||
|
WHERE `type` IN ('editor', 'text', 'textarea')
|
||||||
|
AND `fieldparams` <> ''
|
||||||
|
AND JSON_EXTRACT(`fieldparams`, '$.filter') = 'JComponentHelper::filterText';
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) VALUES
|
||||||
|
(0, 'plg_task_globalcheckin', 'plugin', 'globalcheckin', 'task', 0, 1, 1, 0, 0, '', '{}', '', 5, 0);
|
||||||
|
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
UPDATE `#__guidedtours` SET `extensions` = '["com_content","com_categories"]' WHERE `url` LIKE '%option=com_content%';
|
||||||
|
UPDATE `#__guidedtours` SET `extensions` = '["com_content","com_categories"]' WHERE `url` LIKE '%option=com_categories%';
|
||||||
|
UPDATE `#__guidedtours` SET `extensions` = '["com_menus"]' WHERE `url` LIKE '%com_menus%';
|
||||||
|
UPDATE `#__guidedtours` SET `extensions` = '["com_tags"]' WHERE `url` LIKE '%com_tags%';
|
||||||
|
UPDATE `#__guidedtours` SET `extensions` = '["com_banners"]' WHERE `url` LIKE '%com_banners%';
|
||||||
|
UPDATE `#__guidedtours` SET `extensions` = '["com_contact"]' WHERE `url` LIKE '%com_contact%';
|
||||||
|
UPDATE `#__guidedtours` SET `extensions` = '["com_newsfeeds"]' WHERE `url` LIKE '%com_newsfeeds%';
|
||||||
|
UPDATE `#__guidedtours` SET `extensions` = '["com_finder"]' WHERE `url` LIKE '%com_finder%';
|
||||||
|
UPDATE `#__guidedtours` SET `extensions` = '["com_users"]' WHERE `url` LIKE '%com_users%';
|
||||||
|
|
||||||
|
UPDATE `#__update_sites`
|
||||||
|
SET `location` = 'https://update.joomla.org/language/translationlist_5.xml'
|
||||||
|
WHERE `location` = 'https://update.joomla.org/language/translationlist_4.xml';
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
ALTER TABLE `#__guidedtours` ADD COLUMN `uid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL AFTER `title`/** CAN FAIL **/;
|
||||||
|
ALTER TABLE `#__guidedtours` ADD INDEX `idx_uid` (`uid`(191)) /** CAN FAIL **/;
|
||||||
|
|
||||||
|
UPDATE `#__guidedtours` SET `uid` = 'joomla-guidedtours' WHERE `title` = 'COM_GUIDEDTOURS_TOUR_GUIDEDTOURS_TITLE';
|
||||||
|
UPDATE `#__guidedtours` SET `uid` = 'joomla-guidedtoursteps' WHERE `title` = 'COM_GUIDEDTOURS_TOUR_GUIDEDTOURSTEPS_TITLE';
|
||||||
|
UPDATE `#__guidedtours` SET `uid` = 'joomla-articles' WHERE `title` = 'COM_GUIDEDTOURS_TOUR_ARTICLES_TITLE';
|
||||||
|
UPDATE `#__guidedtours` SET `uid` = 'joomla-categories' WHERE `title` = 'COM_GUIDEDTOURS_TOUR_CATEGORIES_TITLE';
|
||||||
|
UPDATE `#__guidedtours` SET `uid` = 'joomla-menus' WHERE `title` = 'COM_GUIDEDTOURS_TOUR_MENUS_TITLE';
|
||||||
|
UPDATE `#__guidedtours` SET `uid` = 'joomla-tags' WHERE `title` = 'COM_GUIDEDTOURS_TOUR_TAGS_TITLE';
|
||||||
|
UPDATE `#__guidedtours` SET `uid` = 'joomla-banners' WHERE `title` = 'COM_GUIDEDTOURS_TOUR_BANNERS_TITLE';
|
||||||
|
UPDATE `#__guidedtours` SET `uid` = 'joomla-contacts' WHERE `title` = 'COM_GUIDEDTOURS_TOUR_CONTACTS_TITLE';
|
||||||
|
UPDATE `#__guidedtours` SET `uid` = 'joomla-newsfeeds' WHERE `title` = 'COM_GUIDEDTOURS_TOUR_NEWSFEEDS_TITLE';
|
||||||
|
UPDATE `#__guidedtours` SET `uid` = 'joomla-smartsearch' WHERE `title` = 'COM_GUIDEDTOURS_TOUR_SMARTSEARCH_TITLE';
|
||||||
|
UPDATE `#__guidedtours` SET `uid` = 'joomla-users' WHERE `title` = 'COM_GUIDEDTOURS_TOUR_USERS_TITLE';
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
UPDATE `#__extensions`
|
||||||
|
SET `locked` = 0
|
||||||
|
WHERE `type` = 'plugin' AND `element` = 'recaptcha_invisible' AND `folder` = 'captcha';
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
INSERT INTO `#__extensions` (`name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
|
||||||
|
('plg_task_deleteactionlogs', 'plugin', 'deleteactionlogs', 'task', 0, 1, 1, 0, 1, '', '{}', '', NULL, NULL, 0, 0),
|
||||||
|
('plg_task_privacyconsent', 'plugin', 'privacyconsent', 'task', 0, 1, 1, 0, 1, '', '{}', '', NULL, NULL, 0, 0),
|
||||||
|
('plg_task_rotatelogs', 'plugin', 'rotatelogs', 'task', 0, 1, 1, 0, 1, '', '{}', '', NULL, NULL, 0, 0),
|
||||||
|
('plg_task_sessiongc', 'plugin', 'sessiongc', 'task', 0, 1, 1, 0, 1, '', '{}', '', NULL, NULL, 0, 0),
|
||||||
|
('plg_task_updatenotification', 'plugin', 'updatenotification', 'task', 0, 1, 1, 0, 1, '', '{}', '', NULL, NULL, 0, 0);
|
||||||
|
|
||||||
|
INSERT INTO `#__mail_templates` (`template_id`, `extension`, `language`, `subject`, `body`, `htmlbody`, `attachments`, `params`) VALUES
|
||||||
|
('plg_task_privacyconsent.request.reminder', 'plg_task_privacyconsent', '', 'PLG_TASK_PRIVACYCONSENT_EMAIL_REMIND_SUBJECT', 'PLG_TASK_PRIVACYCONSENT_EMAIL_REMIND_BODY', '', '', '{"tags":["sitename","url","tokenurl","formurl","token"]}'),
|
||||||
|
('plg_task_updatenotification.mail', 'plg_task_updatenotification', '', 'PLG_TASK_UPDATENOTIFICATION_EMAIL_SUBJECT', 'PLG_TASK_UPDATENOTIFICATION_EMAIL_BODY', '', '', '{"tags":["newversion","curversion","sitename","url","link","releasenews"]}');
|
||||||
|
|
||||||
|
DELETE FROM `#__mail_templates` WHERE `template_id` IN ('plg_system_privacyconsent.request.reminder', 'plg_system_updatenotification.mail');
|
||||||
|
|
||||||
|
DELETE FROM `#__postinstall_messages` WHERE `condition_file` = 'site://plugins/system/updatenotification/postinstall/updatecachetime.php';
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
UPDATE `#__scheduler_tasks` SET `title` = 'Delete Action Logs' WHERE `type` = 'delete.actionlogs' AND `title` = 'DeleteActionLogs';
|
||||||
|
UPDATE `#__scheduler_tasks` SET `title` = 'Privacy Consent' WHERE `type` = 'privacy.consent' AND `title` = 'PrivacyConsent';
|
||||||
|
UPDATE `#__scheduler_tasks` SET `title` = 'Rotate Logs' WHERE `type` = 'rotation.logs' AND `title` = 'RotateLogs';
|
||||||
|
UPDATE `#__scheduler_tasks` SET `title` = 'Session GC' WHERE `type` = 'session.gc' AND `title` = 'SessionGC';
|
||||||
|
UPDATE `#__scheduler_tasks` SET `title` = 'Update Notification' WHERE `type` = 'update.notification' AND `title` = 'UpdateNotification';
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
-- Add com_fields to action logs
|
||||||
|
INSERT INTO `#__action_logs_extensions` (`extension`) VALUES ('com_fields');
|
||||||
|
|
||||||
|
INSERT INTO `#__action_log_config` (`type_title`, `type_alias`, `id_holder`, `title_holder`, `table_name`, `text_prefix`) VALUES
|
||||||
|
('field', 'com_fields.field', 'id', 'title', '#__fields', 'PLG_ACTIONLOG_JOOMLA');
|
||||||
@ -0,0 +1 @@
|
|||||||
|
UPDATE `#__extensions` SET `enabled` = 1 WHERE `type` = 'plugin' AND `element` = 'schedulerunner' AND `folder` = 'system';
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) VALUES
|
||||||
|
(0, 'plg_schemaorg_article', 'plugin', 'article', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `#__fields_values` MODIFY `value` MEDIUMTEXT;
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `#__guidedtour_steps` ADD COLUMN `params` text NULL /** CAN FAIL **/;
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
--
|
||||||
|
-- Table structure for table `#__tuf_metadata`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `#__tuf_metadata` (
|
||||||
|
`id` int NOT NULL AUTO_INCREMENT,
|
||||||
|
`update_site_id` int DEFAULT 0,
|
||||||
|
`root` text DEFAULT NULL,
|
||||||
|
`targets` text DEFAULT NULL,
|
||||||
|
`snapshot` text DEFAULT NULL,
|
||||||
|
`timestamp` text DEFAULT NULL,
|
||||||
|
`mirrors` text DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci COMMENT='Secure TUF Updates';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
-- The following INSERT statement has been modified to avoid an SQL error
|
||||||
|
-- when there is more than 1 update site for the Joomla core.
|
||||||
|
-- See https://github.com/joomla/joomla-cms/pull/43169 for details.
|
||||||
|
--
|
||||||
|
INSERT INTO `#__tuf_metadata` (`update_site_id`, `root`)
|
||||||
|
SELECT ue.`update_site_id`,
|
||||||
|
'{"signed":{"_type":"root","spec_version":"1.0","version":2,"expires":"2025-03-02T11:22:17Z","keys":{"07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"9b2af2d9b9727227735253d795bd27ea8f0e294a5f3603e822dc5052b44802b9"}},"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"a18e5ebabc19d5d5984b601a292ece61ba3662ab2d071dc520da5bd4f8948799"}},"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"cb0a7a131961a20edea051d6dc2b091fb650bd399bd8514adb67b3c60db9f8f9"}},"31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"589d029a68b470deff1ca16dbf3eea6b5b3fcba0ae7bb52c468abc7fb058b2a2"}},"9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"6043c8bacc76ac5c9750f45454dd865c6ca1fc57d69e14cc192cfd420f6a66a9"}}},"roles":{"root":{"keyids":["1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"snapshot":{"keyids":["07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"targets":{"keyids":["31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3"],"threshold":1},"timestamp":{"keyids":["9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc"],"threshold":1}},"consistent_snapshot":true},"signatures":[{"keyid":"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e","sig":"2a225a560ec0837b721d4c5e379fedbd3c7c9079a94e6b31e47e0184c8b95421b6036b4286c5d90f29ab4c468d79a712fdb65e96511394ceb3aa8e2b3983a501"},{"keyid":"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","sig":"8ce0b2a7bdc1e6dcba12081f440510df0a593c072dcf591631c2dd0f456844a7da63be8e8ac31ffbddf42641fde84dc733a336031d182c2163b4c1eaf2117005"}]}'
|
||||||
|
FROM `#__update_sites_extensions` AS ue JOIN `#__extensions` AS e ON (e.`extension_id` = ue.`extension_id`)
|
||||||
|
WHERE e.`type`='file' AND e.`element`='joomla';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
-- The following UPDATE statement has been modified to avoid an SQL error
|
||||||
|
-- when there is more than 1 update site for the Joomla core.
|
||||||
|
-- See https://github.com/joomla/joomla-cms/pull/42988 for details.
|
||||||
|
--
|
||||||
|
UPDATE `#__update_sites`
|
||||||
|
SET `type` = 'tuf', `location` = 'https://update.joomla.org/cms/'
|
||||||
|
WHERE `update_site_id` IN (SELECT ue.`update_site_id` FROM `#__update_sites_extensions` AS ue JOIN `#__extensions` AS e ON (e.`extension_id` = ue.`extension_id`) WHERE e.`type`='file' AND e.`element`='joomla');
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) VALUES
|
||||||
|
(0, 'plg_schemaorg_custom', 'plugin', 'custom', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
INSERT IGNORE INTO `#__guidedtour_steps` (`tour_id`, `title`, `published`, `description`, `ordering`, `position`, `target`, `type`, `interactive_type`, `url`, `created`, `created_by`, `modified`, `modified_by`, `language`) VALUES
|
||||||
|
(0, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_MENUS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_MENUS_DESCRIPTION', 1, 'right', '#sidebarmenu', 0, 1, '', CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, '*'),
|
||||||
|
(0, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_QUICKACCESS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_QUICKACCESS_DESCRIPTION', 2, 'center', '', 0, 1, '', CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, '*'),
|
||||||
|
(0, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_NOTIFICATIONS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_NOTIFICATIONS_DESCRIPTION', 3, 'left', '.quickicons-for-update_quickicon .card', 0, 1, '', CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, '*'),
|
||||||
|
(0, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_TOPBAR_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_TOPBAR_DESCRIPTION', 4, 'bottom', '#header', 0, 1, '', CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, '*'),
|
||||||
|
(0, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_FINALWORDS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_FINALWORDS_DESCRIPTION', 5, 'right', '#sidebarmenu nav > ul:first-of-type > li:last-child', 0, 1, '', CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, '*');
|
||||||
|
|
||||||
|
ALTER TABLE `#__guidedtours` ADD COLUMN `autostart` int NOT NULL DEFAULT 0 /** CAN FAIL **/;
|
||||||
|
|
||||||
|
INSERT IGNORE INTO `#__guidedtours` (`title`, `uid`, `description`, `ordering`, `extensions`, `url`, `created`, `created_by`, `modified`, `modified_by`, `published`, `language`, `access`, `autostart`) VALUES
|
||||||
|
('COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_TITLE', 'joomla-welcome', 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_DESCRIPTION', 1, '["com_cpanel"]', 'administrator/index.php', CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, 1, '*', 1, 0);
|
||||||
|
|
||||||
|
UPDATE `#__guidedtour_steps` SET `tour_id` = LAST_INSERT_ID() WHERE `tour_id`=0;
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
--
|
||||||
|
-- Add post-installation message about Brotli compression in .htaccess
|
||||||
|
--
|
||||||
|
-- This statement had to be modified to prevent duplicate postinstall messages
|
||||||
|
-- when updating from 4.4.
|
||||||
|
-- See https://github.com/joomla/joomla-cms/pull/43182 for details.
|
||||||
|
--
|
||||||
|
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`)
|
||||||
|
SELECT `extension_id`, 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_TITLE', 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_DESCRIPTION', '', 'com_admin', 1, 'message', '', '', 'admin://components/com_admin/postinstall/htaccessbrotli.php', 'admin_postinstall_htaccessbrotli_condition', '5.1.0', 1
|
||||||
|
FROM `#__extensions`
|
||||||
|
WHERE `name` = 'files_joomla'
|
||||||
|
AND (SELECT COUNT(a.`postinstall_message_id`) FROM `#__postinstall_messages` a WHERE a.`title_key` = 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_TITLE') = 0;
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
--
|
||||||
|
-- Add a default value for the colorScheme in the Atum template on Joomla update
|
||||||
|
-- only when a value is not already set.
|
||||||
|
-- New installs will have the default value set in the installation sql.
|
||||||
|
--
|
||||||
|
|
||||||
|
UPDATE `#__template_styles`
|
||||||
|
SET `params` = JSON_SET(`params`, '$.colorScheme', 'os')
|
||||||
|
WHERE `template` = 'atum'
|
||||||
|
AND JSON_EXTRACT(`params`, '$.colorScheme') IS NULL;
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
-- Add mod_articles module
|
||||||
|
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`) VALUES
|
||||||
|
(0, 'mod_articles', 'module', 'mod_articles', '', 0, 1, 0, 0, 1, '', '', '');
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
--
|
||||||
|
-- Add the Guided Tours selectable option to the User Action Logs
|
||||||
|
--
|
||||||
|
INSERT INTO `#__action_logs_extensions` (`extension`) VALUES ('com_guidedtours');
|
||||||
|
|
||||||
|
INSERT INTO `#__action_log_config` (`type_title`, `type_alias`, `id_holder`, `title_holder`, `table_name`, `text_prefix`) VALUES
|
||||||
|
('guidedtour', 'com_guidedtours.state', 'id', 'title', '#__guidedtours', 'PLG_ACTIONLOG_JOOMLA');
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
INSERT INTO `#__guidedtours` (`title`, `description`, `extensions`, `url`, `published`, `language`, `note`, `access`, `uid`, `autostart`, `created`, `created_by`, `modified`, `modified_by`) VALUES
|
||||||
|
('COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_DESCRIPTION', '["com_cpanel"]', 'administrator/index.php', 1, '*', '', 1, 'joomla-whatsnew-5-2', 1, CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0);
|
||||||
|
INSERT INTO `#__guidedtour_steps` (`title`, `description`, `position`, `target`, `type`, `interactive_type`, `url`, `published`, `language`, `note`, `params`, `tour_id`, `created`, `created_by`, `modified`, `modified_by`)
|
||||||
|
SELECT 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_STEP_0_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_STEP_0_DESCRIPTION', 'right', '#sidebarmenu nav > ul:first-of-type > li:last-child', 0, 1, '', 1, '*', '', '{"required":1,"requiredvalue":""}', MAX(`id`), CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0
|
||||||
|
FROM `#__guidedtours`
|
||||||
|
WHERE `uid` = 'joomla-whatsnew-5-2';
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
UPDATE `#__guidedtour_steps`
|
||||||
|
SET `ordering` = `ordering` + 1
|
||||||
|
WHERE `title` IN ('COM_GUIDEDTOURS_TOUR_GUIDEDTOURS_STEP_SAVECLOSE_TITLE', 'COM_GUIDEDTOURS_TOUR_GUIDEDTOURS_STEP_CONGRATULATIONS_TITLE');
|
||||||
|
|
||||||
|
INSERT INTO `#__guidedtour_steps` (`title`, `description`, `position`, `target`, `type`, `interactive_type`, `url`, `published`, `language`, `note`, `tour_id`, `created`, `created_by`, `modified`, `modified_by`, `ordering`)
|
||||||
|
SELECT 'COM_GUIDEDTOURS_TOUR_GUIDEDTOURS_STEP_AUTOSTART_TITLE', 'COM_GUIDEDTOURS_TOUR_GUIDEDTOURS_STEP_AUTOSTART_DESCRIPTION', 'bottom', '#jform_autostart0', 2, 3, '', 1, '*', '', `tour_id`, CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, `ordering` + 1
|
||||||
|
FROM `#__guidedtour_steps`
|
||||||
|
WHERE `title` = 'COM_GUIDEDTOURS_TOUR_GUIDEDTOURS_STEP_COMPONENT_TITLE';
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
UPDATE `#__assets` SET `title` = 'PUBLISH' WHERE `name` LIKE 'com_content.transition.%' AND `title` = 'Publish';
|
||||||
|
UPDATE `#__assets` SET `title` = 'UNPUBLISH' WHERE `name` LIKE 'com_content.transition.%' AND `title` = 'Unpublish';
|
||||||
|
UPDATE `#__assets` SET `title` = 'TRASH' WHERE `name` LIKE 'com_content.transition.%' AND `title` = 'Trash';
|
||||||
|
UPDATE `#__assets` SET `title` = 'ARCHIVE' WHERE `name` LIKE 'com_content.transition.%' AND `title` = 'Archive';
|
||||||
|
UPDATE `#__assets` SET `title` = 'FEATURE' WHERE `name` LIKE 'com_content.transition.%' AND `title` = 'Feature';
|
||||||
|
UPDATE `#__assets` SET `title` = 'UNFEATURE' WHERE `name` LIKE 'com_content.transition.%' AND `title` = 'Unfeature';
|
||||||
|
UPDATE `#__assets` SET `title` = 'PUBLISH_AND_FEATURE' WHERE `name` LIKE 'com_content.transition.%' AND `title` = 'Publish & Feature';
|
||||||
@ -0,0 +1 @@
|
|||||||
|
DROP TABLE IF EXISTS "#__utf8_conversion";
|
||||||
@ -0,0 +1 @@
|
|||||||
|
DELETE FROM "#__scheduler_tasks" WHERE "type" = 'demoTask_r1.sleep';
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE "#__menu_types" ADD COLUMN "ordering" int NOT NULL DEFAULT 0 /** CAN FAIL **/;
|
||||||
|
UPDATE "#__menu_types" SET "ordering" = "id" WHERE "client_id" = 0;
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
--
|
||||||
|
-- Table structure for table "#__schemaorg"
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS "#__schemaorg" (
|
||||||
|
"id" serial NOT NULL,
|
||||||
|
"itemId" bigint,
|
||||||
|
"context" varchar(100),
|
||||||
|
"schemaType" varchar(100),
|
||||||
|
"schema" text,
|
||||||
|
PRIMARY KEY ("id")
|
||||||
|
);
|
||||||
|
|
||||||
|
-- Add plugins to "#__extensions"
|
||||||
|
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES
|
||||||
|
(0, 'plg_schemaorg_blogposting', 'plugin', 'blogposting', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 1, 0),
|
||||||
|
(0, 'plg_schemaorg_book', 'plugin', 'book', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 2, 0),
|
||||||
|
(0, 'plg_schemaorg_event', 'plugin', 'event', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 3, 0),
|
||||||
|
(0, 'plg_schemaorg_organization', 'plugin', 'organization', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 4, 0),
|
||||||
|
(0, 'plg_schemaorg_person', 'plugin', 'person', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 5, 0),
|
||||||
|
(0, 'plg_schemaorg_recipe', 'plugin', 'recipe', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 6, 0),
|
||||||
|
(0, 'plg_schemaorg_jobposting', 'plugin', 'jobposting', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 7, 0),
|
||||||
|
(0, 'plg_system_schemaorg', 'plugin', 'schemaorg', 'system', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state")
|
||||||
|
SELECT 0, 'plg_behaviour_compat', 'plugin', 'compat', 'behaviour', 0, 1, 1, 0, 1, '', '{"classes_aliases":"1","es5_assets":"1"}', '', -1, 0
|
||||||
|
WHERE NOT EXISTS (SELECT * FROM "#__extensions" e WHERE e."type" = 'plugin' AND e."element" = 'compat' AND e."folder" = 'behaviour' AND e."client_id" = 0);
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
UPDATE "#__extensions"
|
||||||
|
SET "params" = jsonb_set("params"::jsonb, '{filter}' , '"\\\\Joomla\\\\CMS\\\\Component\\\\ComponentHelper::filterText"')
|
||||||
|
WHERE "type" = 'plugin'
|
||||||
|
AND "folder" = 'fields'
|
||||||
|
AND "element" IN ('editor', 'text', 'textarea')
|
||||||
|
AND "params" <> ''
|
||||||
|
AND "params"::jsonb->>'filter' = 'JComponentHelper::filterText';
|
||||||
|
|
||||||
|
UPDATE "#__fields"
|
||||||
|
SET "fieldparams" = jsonb_set("fieldparams"::jsonb, '{filter}' , '"\\\\Joomla\\\\CMS\\\\Component\\\\ComponentHelper::filterText"')
|
||||||
|
WHERE "type" IN ('editor', 'text', 'textarea')
|
||||||
|
AND "fieldparams" <> ''
|
||||||
|
AND "fieldparams"::jsonb->>'filter' = 'JComponentHelper::filterText';
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES
|
||||||
|
(0, 'plg_task_globalcheckin', 'plugin', 'globalcheckin', 'task', 0, 1, 1, 0, 0, '', '{}', '', 5, 0);
|
||||||
|
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
UPDATE "#__guidedtours" SET "extensions" = '["com_content","com_categories"]' WHERE "url" LIKE '%option=com_content%';
|
||||||
|
UPDATE "#__guidedtours" SET "extensions" = '["com_content","com_categories"]' WHERE "url" LIKE '%option=com_categories%';
|
||||||
|
UPDATE "#__guidedtours" SET "extensions" = '["com_menus"]' WHERE "url" LIKE '%com_menus%';
|
||||||
|
UPDATE "#__guidedtours" SET "extensions" = '["com_tags"]' WHERE "url" LIKE '%com_tags%';
|
||||||
|
UPDATE "#__guidedtours" SET "extensions" = '["com_banners"]' WHERE "url" LIKE '%com_banners%';
|
||||||
|
UPDATE "#__guidedtours" SET "extensions" = '["com_contact"]' WHERE "url" LIKE '%com_contact%';
|
||||||
|
UPDATE "#__guidedtours" SET "extensions" = '["com_newsfeeds"]' WHERE "url" LIKE '%com_newsfeeds%';
|
||||||
|
UPDATE "#__guidedtours" SET "extensions" = '["com_finder"]' WHERE "url" LIKE '%com_finder%';
|
||||||
|
UPDATE "#__guidedtours" SET "extensions" = '["com_users"]' WHERE "url" LIKE '%com_users%';
|
||||||
|
|
||||||
|
UPDATE "#__update_sites"
|
||||||
|
SET "location" = 'https://update.joomla.org/language/translationlist_5.xml'
|
||||||
|
WHERE "location" = 'https://update.joomla.org/language/translationlist_4.xml';
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
ALTER TABLE "#__guidedtours" ADD COLUMN "uid" varchar(255) DEFAULT '' NOT NULL /** CAN FAIL **/;
|
||||||
|
CREATE INDEX "#__guidedtours_idx_uid" ON "#__guidedtours" ("uid") /** CAN FAIL **/;
|
||||||
|
|
||||||
|
UPDATE "#__guidedtours" SET "uid" = 'joomla-guidedtours' WHERE "title" = 'COM_GUIDEDTOURS_TOUR_GUIDEDTOURS_TITLE';
|
||||||
|
UPDATE "#__guidedtours" SET "uid" = 'joomla-guidedtoursteps' WHERE "title" = 'COM_GUIDEDTOURS_TOUR_GUIDEDTOURSTEPS_TITLE';
|
||||||
|
UPDATE "#__guidedtours" SET "uid" = 'joomla-articles' WHERE "title" = 'COM_GUIDEDTOURS_TOUR_ARTICLES_TITLE';
|
||||||
|
UPDATE "#__guidedtours" SET "uid" = 'joomla-categories' WHERE "title" = 'COM_GUIDEDTOURS_TOUR_CATEGORIES_TITLE';
|
||||||
|
UPDATE "#__guidedtours" SET "uid" = 'joomla-menus' WHERE "title" = 'COM_GUIDEDTOURS_TOUR_MENUS_TITLE';
|
||||||
|
UPDATE "#__guidedtours" SET "uid" = 'joomla-tags' WHERE "title" = 'COM_GUIDEDTOURS_TOUR_TAGS_TITLE';
|
||||||
|
UPDATE "#__guidedtours" SET "uid" = 'joomla-banners' WHERE "title" = 'COM_GUIDEDTOURS_TOUR_BANNERS_TITLE';
|
||||||
|
UPDATE "#__guidedtours" SET "uid" = 'joomla-contacts' WHERE "title" = 'COM_GUIDEDTOURS_TOUR_CONTACTS_TITLE';
|
||||||
|
UPDATE "#__guidedtours" SET "uid" = 'joomla-newsfeeds' WHERE "title" = 'COM_GUIDEDTOURS_TOUR_NEWSFEEDS_TITLE';
|
||||||
|
UPDATE "#__guidedtours" SET "uid" = 'joomla-smartsearch' WHERE "title" = 'COM_GUIDEDTOURS_TOUR_SMARTSEARCH_TITLE';
|
||||||
|
UPDATE "#__guidedtours" SET "uid" = 'joomla-users' WHERE "title" = 'COM_GUIDEDTOURS_TOUR_USERS_TITLE';
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
UPDATE "#__extensions"
|
||||||
|
SET "locked" = 0
|
||||||
|
WHERE "type" = 'plugin' AND "element" = 'recaptcha_invisible' AND "folder" = 'captcha';
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
INSERT INTO "#__extensions" ("name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "checked_out", "checked_out_time", "ordering", "state") VALUES
|
||||||
|
('plg_task_deleteactionlogs', 'plugin', 'deleteactionlogs', 'task', 0, 1, 1, 0, 1, '', '{}', '', NULL, NULL, 0, 0),
|
||||||
|
('plg_task_privacyconsent', 'plugin', 'privacyconsent', 'task', 0, 1, 1, 0, 1, '', '{}', '', NULL, NULL, 0, 0),
|
||||||
|
('plg_task_rotatelogs', 'plugin', 'rotatelogs', 'task', 0, 1, 1, 0, 1, '', '{}', '', NULL, NULL, 0, 0),
|
||||||
|
('plg_task_sessiongc', 'plugin', 'sessiongc', 'task', 0, 1, 1, 0, 1, '', '{}', '', NULL, NULL, 0, 0),
|
||||||
|
('plg_task_updatenotification', 'plugin', 'updatenotification', 'task', 0, 1, 1, 0, 1, '', '{}', '', NULL, NULL, 0, 0);
|
||||||
|
|
||||||
|
INSERT INTO "#__mail_templates" ("template_id", "extension", "language", "subject", "body", "htmlbody", "attachments", "params") VALUES
|
||||||
|
('plg_task_privacyconsent.request.reminder', 'plg_task_privacyconsent', '', 'PLG_TASK_PRIVACYCONSENT_EMAIL_REMIND_SUBJECT', 'PLG_TASK_PRIVACYCONSENT_EMAIL_REMIND_BODY', '', '', '{"tags":["sitename","url","tokenurl","formurl","token"]}'),
|
||||||
|
('plg_task_updatenotification.mail', 'plg_task_updatenotification', '', 'PLG_TASK_UPDATENOTIFICATION_EMAIL_SUBJECT', 'PLG_TASK_UPDATENOTIFICATION_EMAIL_BODY', '', '', '{"tags":["newversion","curversion","sitename","url","link","releasenews"]}');
|
||||||
|
|
||||||
|
DELETE FROM "#__mail_templates" WHERE "template_id" IN ('plg_system_privacyconsent.request.reminder', 'plg_system_updatenotification.mail');
|
||||||
|
|
||||||
|
DELETE FROM "#__postinstall_messages" WHERE "condition_file" = 'site://plugins/system/updatenotification/postinstall/updatecachetime.php';
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
UPDATE "#__scheduler_tasks" SET "title" = 'Delete Action Logs' WHERE "type" = 'delete.actionlogs' AND "title" = 'DeleteActionLogs';
|
||||||
|
UPDATE "#__scheduler_tasks" SET "title" = 'Privacy Consent' WHERE "type" = 'privacy.consent' AND "title" = 'PrivacyConsent';
|
||||||
|
UPDATE "#__scheduler_tasks" SET "title" = 'Rotate Logs' WHERE "type" = 'rotation.logs' AND "title" = 'RotateLogs';
|
||||||
|
UPDATE "#__scheduler_tasks" SET "title" = 'Session GC' WHERE "type" = 'session.gc' AND "title" = 'SessionGC';
|
||||||
|
UPDATE "#__scheduler_tasks" SET "title" = 'Update Notification' WHERE "type" = 'update.notification' AND "title" = 'UpdateNotification';
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
-- Add com_fields to action logs extensions
|
||||||
|
INSERT INTO "#__action_logs_extensions" ("extension") VALUES ('com_fields');
|
||||||
|
|
||||||
|
INSERT INTO "#__action_log_config" ("type_title", "type_alias", "id_holder", "title_holder", "table_name", "text_prefix") VALUES
|
||||||
|
('field', 'com_fields.field', 'id', 'title', '#__fields', 'PLG_ACTIONLOG_JOOMLA');
|
||||||
@ -0,0 +1 @@
|
|||||||
|
UPDATE "#__extensions" SET "enabled" = 1 WHERE "type" = 'plugin' AND "element" = 'schedulerunner' AND "folder" = 'system';
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES
|
||||||
|
(0, 'plg_schemaorg_article', 'plugin', 'article', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);
|
||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE "#__guidedtour_steps" ADD COLUMN "params" text NULL /** CAN FAIL **/;
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
--
|
||||||
|
-- Table structure for table "#__tuf_metadata"
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS "#__tuf_metadata" (
|
||||||
|
"id" serial NOT NULL,
|
||||||
|
"update_site_id" bigint DEFAULT 0 NOT NULL,
|
||||||
|
"root" text DEFAULT NULL,
|
||||||
|
"targets" text DEFAULT NULL,
|
||||||
|
"snapshot" text DEFAULT NULL,
|
||||||
|
"timestamp" text DEFAULT NULL,
|
||||||
|
"mirrors" text DEFAULT NULL,
|
||||||
|
PRIMARY KEY ("id")
|
||||||
|
);
|
||||||
|
|
||||||
|
COMMENT ON TABLE "#__tuf_metadata" IS 'Secure TUF Updates';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
-- The following INSERT statement has been modified to avoid an SQL error
|
||||||
|
-- when there is more than 1 update site for the Joomla core.
|
||||||
|
-- See https://github.com/joomla/joomla-cms/pull/43169 for details.
|
||||||
|
--
|
||||||
|
INSERT INTO "#__tuf_metadata" ("update_site_id", "root")
|
||||||
|
SELECT ue."update_site_id",
|
||||||
|
'{"signed":{"_type":"root","spec_version":"1.0","version":2,"expires":"2025-03-02T11:22:17Z","keys":{"07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"9b2af2d9b9727227735253d795bd27ea8f0e294a5f3603e822dc5052b44802b9"}},"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"a18e5ebabc19d5d5984b601a292ece61ba3662ab2d071dc520da5bd4f8948799"}},"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"cb0a7a131961a20edea051d6dc2b091fb650bd399bd8514adb67b3c60db9f8f9"}},"31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"589d029a68b470deff1ca16dbf3eea6b5b3fcba0ae7bb52c468abc7fb058b2a2"}},"9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"6043c8bacc76ac5c9750f45454dd865c6ca1fc57d69e14cc192cfd420f6a66a9"}}},"roles":{"root":{"keyids":["1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"snapshot":{"keyids":["07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"targets":{"keyids":["31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3"],"threshold":1},"timestamp":{"keyids":["9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc"],"threshold":1}},"consistent_snapshot":true},"signatures":[{"keyid":"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e","sig":"2a225a560ec0837b721d4c5e379fedbd3c7c9079a94e6b31e47e0184c8b95421b6036b4286c5d90f29ab4c468d79a712fdb65e96511394ceb3aa8e2b3983a501"},{"keyid":"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","sig":"8ce0b2a7bdc1e6dcba12081f440510df0a593c072dcf591631c2dd0f456844a7da63be8e8ac31ffbddf42641fde84dc733a336031d182c2163b4c1eaf2117005"}]}'
|
||||||
|
FROM "#__update_sites_extensions" AS ue JOIN "#__extensions" AS e ON (e."extension_id" = ue."extension_id")
|
||||||
|
WHERE e."type"='file' AND e."element"='joomla';
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
-- The following UPDATE statement has been modified to avoid an SQL error
|
||||||
|
-- when there is more than 1 update site for the Joomla core.
|
||||||
|
-- See https://github.com/joomla/joomla-cms/pull/42988 for details.
|
||||||
|
--
|
||||||
|
UPDATE "#__update_sites"
|
||||||
|
SET "type" = 'tuf', "location" = 'https://update.joomla.org/cms/'
|
||||||
|
WHERE "update_site_id" IN (SELECT ue."update_site_id" FROM "#__update_sites_extensions" AS ue JOIN "#__extensions" AS e ON (e."extension_id" = ue."extension_id") WHERE e."type"='file' AND e."element"='joomla');
|
||||||
|
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES
|
||||||
|
(0, 'plg_schemaorg_custom', 'plugin', 'custom', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
INSERT INTO "#__guidedtour_steps" ("tour_id", "title", "published", "description", "ordering", "position", "target", "type", "interactive_type", "url", "created", "created_by", "modified", "modified_by", "language") VALUES
|
||||||
|
(0, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_MENUS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_MENUS_DESCRIPTION', 1, 'right', '#sidebarmenu', 0, 1, '', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, '*'),
|
||||||
|
(0, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_QUICKACCESS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_QUICKACCESS_DESCRIPTION', 2, 'center', '', 0, 1, '', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, '*'),
|
||||||
|
(0, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_NOTIFICATIONS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_NOTIFICATIONS_DESCRIPTION', 3, 'left', '.quickicons-for-update_quickicon .card', 0, 1, '', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, '*'),
|
||||||
|
(0, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_TOPBAR_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_TOPBAR_DESCRIPTION', 4, 'bottom', '#header', 0, 1, '', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, '*'),
|
||||||
|
(0, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_FINALWORDS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_FINALWORDS_DESCRIPTION', 5, 'right', '#sidebarmenu nav > ul:first-of-type > li:last-child', 0, 1, '', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, '*')
|
||||||
|
ON CONFLICT DO NOTHING;
|
||||||
|
|
||||||
|
ALTER TABLE "#__guidedtours" ADD COLUMN "autostart" int NOT NULL DEFAULT 0 /** CAN FAIL **/;
|
||||||
|
|
||||||
|
INSERT INTO "#__guidedtours" ("title", "uid", "description", "ordering", "extensions", "url", "created", "created_by", "modified", "modified_by", "published", "language", "access", "autostart") VALUES
|
||||||
|
('COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_TITLE', 'joomla-welcome', 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_DESCRIPTION', 1, '["com_cpanel"]', 'administrator/index.php', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, 1, '*', 1, 0)
|
||||||
|
ON CONFLICT DO NOTHING;
|
||||||
|
|
||||||
|
UPDATE "#__guidedtour_steps" SET "tour_id" = currval(pg_get_serial_sequence('#__guidedtours','id')) WHERE "tour_id"=0;
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
--
|
||||||
|
-- Add post-installation message about Brotli compression in .htaccess
|
||||||
|
--
|
||||||
|
-- This statement had to be modified to prevent duplicate postinstall messages
|
||||||
|
-- when updating from 4.4.
|
||||||
|
-- See https://github.com/joomla/joomla-cms/pull/43182 for details.
|
||||||
|
--
|
||||||
|
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")
|
||||||
|
SELECT "extension_id", 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_TITLE', 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_DESCRIPTION', '', 'com_admin', 1, 'message', '', '', 'admin://components/com_admin/postinstall/htaccessbrotli.php', 'admin_postinstall_htaccessbrotli_condition', '5.1.0', 1
|
||||||
|
FROM "#__extensions"
|
||||||
|
WHERE "name" = 'files_joomla'
|
||||||
|
AND (SELECT COUNT(a."postinstall_message_id") FROM "#__postinstall_messages" a WHERE a."title_key" = 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_TITLE') = 0;
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
--
|
||||||
|
-- Add a default value for the colorScheme in the Atum template on Joomla update
|
||||||
|
-- only when a value is not already set.
|
||||||
|
-- New installs will have the default value set in the installation sql.
|
||||||
|
--
|
||||||
|
|
||||||
|
UPDATE "#__template_styles"
|
||||||
|
SET "params" = jsonb_set("params"::jsonb, '{colorScheme}', '"os"', true)
|
||||||
|
WHERE "template" = 'atum'
|
||||||
|
AND "params"::jsonb->>'colorScheme' IS NULL;
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
-- Add mod_articles module
|
||||||
|
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES
|
||||||
|
(0, 'mod_articles', 'module', 'mod_articles', '', 0, 1, 0, 0, 1, '', '', '', 0, 0);
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
--
|
||||||
|
-- Add the Guided Tours selectable option to the User Action Logs
|
||||||
|
--
|
||||||
|
INSERT INTO "#__action_logs_extensions" ("extension") VALUES ('com_guidedtours');
|
||||||
|
|
||||||
|
INSERT INTO "#__action_log_config" ("type_title", "type_alias", "id_holder", "title_holder", "table_name", "text_prefix") VALUES
|
||||||
|
('guidedtour', 'com_guidedtours.state', 'id', 'title', '#__guidedtours', 'PLG_ACTIONLOG_JOOMLA');
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
INSERT INTO "#__guidedtours" ("title", "description", "extensions", "url", "published", "language", "note", "access", "uid", "autostart", "created", "created_by", "modified", "modified_by") VALUES
|
||||||
|
('COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_DESCRIPTION', '["com_cpanel"]', 'administrator/index.php', 1, '*', '', 1, 'joomla-whatsnew-5-2', 1, CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0);
|
||||||
|
INSERT INTO "#__guidedtour_steps" ("title", "description", "position", "target", "type", "interactive_type", "url", "published", "language", "note", "params", "tour_id", "created", "created_by", "modified", "modified_by")
|
||||||
|
SELECT 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_STEP_0_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_STEP_0_DESCRIPTION', 'right', '#sidebarmenu nav > ul:first-of-type > li:last-child', 0, 1, '', 1, '*', '', '{"required":1,"requiredvalue":""}', MAX("id"), CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0
|
||||||
|
FROM "#__guidedtours"
|
||||||
|
WHERE "uid" = 'joomla-whatsnew-5-2';
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user