Spade

Mini Shell

Directory:~$ /proc/self/root/home/lmsyaran/public_html/css/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ //proc/self/root/home/lmsyaran/public_html/css/api.tar

index.php000064400000002047151165467340006403 0ustar00<?php

/**
 * @package    Joomla.API
 *
 * @copyright  (C) 2019 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

// NOTE: This file should remain compatible with PHP 5.2 to allow us to run
our PHP minimum check and show a friendly error message

// Define the application's minimum supported PHP version as a
constant so it can be referenced within the application.
\define('JOOMLA_MINIMUM_PHP', '8.1.0');

if (version_compare(PHP_VERSION, JOOMLA_MINIMUM_PHP, '<')) {
    header('HTTP/1.1 500 Internal Server Error');
    echo json_encode(
        ['error' => sprintf('Joomla requires PHP version
%s to run', JOOMLA_MINIMUM_PHP)]
    );

    return;
}

/**
 * Constant that is checked in included files to prevent direct access.
 * define() is used rather than "const" to not cause an error for
PHP 5.2 and lower
 */
\define('_JEXEC', 1);

// Run the application - All executable code should be triggered through
this file
require_once \dirname(__FILE__) . '/includes/app.php';
includes/framework.php000064400000006276151165467340011107 0ustar00<?php

/**
 * @package    Joomla.API
 *
 * @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\Version;
use Joomla\Utilities\IpHelper;

// System includes
require_once JPATH_LIBRARIES . '/bootstrap.php';

// Installation check, and check on removal of the install directory.
if (
    !file_exists(JPATH_CONFIGURATION . '/configuration.php')
    || (filesize(JPATH_CONFIGURATION . '/configuration.php') <
10)
    || (file_exists(JPATH_INSTALLATION . '/index.php') &&
(false === (new Version())->isInDevelopmentState()))
) {
    if (file_exists(JPATH_INSTALLATION . '/index.php')) {
        header('HTTP/1.1 500 Internal Server Error');
        echo json_encode(
            ['error' => 'You must install Joomla to use
the API']
        );

        exit();
    }

    header('HTTP/1.1 500 Internal Server Error');
    echo json_encode(
        ['error' => 'No configuration file found and no
installation code available. Exiting...']
    );

    exit;
}

// Pre-Load configuration. Don't remove the Output Buffering due to
BOM issues, see JCode 26026
ob_start();
require_once JPATH_CONFIGURATION . '/configuration.php';
ob_end_clean();

// System configuration.
$config = new JConfig();

// Set the error_reporting
switch ($config->error_reporting) {
    case 'default':
    case '-1':
        break;

    case 'none':
    case '0':
        error_reporting(0);

        break;

    case 'simple':
        error_reporting(E_ERROR | E_WARNING | E_PARSE);
        ini_set('display_errors', 1);

        break;

    case 'maximum':
        error_reporting(E_ALL);
        ini_set('display_errors', 1);

        break;

    default:
        error_reporting($config->error_reporting);
        ini_set('display_errors', 1);

        break;
}

\define('JDEBUG', $config->debug);

// Check deprecation logging
if (empty($config->log_deprecated)) {
    // Reset handler for E_USER_DEPRECATED
    set_error_handler(null, E_USER_DEPRECATED);
} else {
    // Make sure handler for E_USER_DEPRECATED is registered
    set_error_handler(['Joomla\CMS\Exception\ExceptionHandler',
'handleUserDeprecatedErrors'], E_USER_DEPRECATED);
}

if (JDEBUG || $config->error_reporting === 'maximum') {
    // Set new Exception handler with debug enabled
    $errorHandler->setExceptionHandler(
        [
            new \Symfony\Component\ErrorHandler\ErrorHandler(null, true),
            'renderException',
        ]
    );
}

/**
 * Correctly set the allowing of IP Overrides if behind a trusted
proxy/load balancer.
 *
 * We need to do this as high up the stack as we can, as the default in
\Joomla\Utilities\IpHelper is to
 * $allowIpOverride = true which is the wrong default for a generic site
NOT behind a trusted proxy/load balancer.
 */
if (property_exists($config, 'behind_loadbalancer') &&
$config->behind_loadbalancer == 1) {
    // If Joomla is configured to be behind a trusted proxy/load balancer,
allow HTTP Headers to override the REMOTE_ADDR
    IpHelper::setAllowIpOverrides(true);
} else {
    // We disable the allowing of IP overriding using headers by default.
    IpHelper::setAllowIpOverrides(false);
}

unset($config);
includes/defines.php000064400000003216151165467340010516 0ustar00<?php

/**
 * @package    Joomla.API
 *
 * @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;

// Define JPATH constants if not defined yet
\defined('JPATH_BASE') || \define('JPATH_BASE',
\dirname(__DIR__));

// Global definitions
$parts = explode(DIRECTORY_SEPARATOR, JPATH_BASE);
array_pop($parts);

// Defines
\defined('JPATH_ROOT') || \define('JPATH_ROOT',
implode(DIRECTORY_SEPARATOR, $parts));
\defined('JPATH_SITE') || \define('JPATH_SITE',
JPATH_ROOT);
\defined('JPATH_PUBLIC') || \define('JPATH_PUBLIC',
JPATH_ROOT);
\defined('JPATH_CONFIGURATION') ||
\define('JPATH_CONFIGURATION', JPATH_ROOT);
\defined('JPATH_ADMINISTRATOR') ||
\define('JPATH_ADMINISTRATOR', JPATH_ROOT . DIRECTORY_SEPARATOR .
'administrator');
\defined('JPATH_LIBRARIES') ||
\define('JPATH_LIBRARIES', JPATH_ROOT . DIRECTORY_SEPARATOR .
'libraries');
\defined('JPATH_PLUGINS') || \define('JPATH_PLUGINS',
JPATH_ROOT . DIRECTORY_SEPARATOR . 'plugins');
\defined('JPATH_INSTALLATION') ||
\define('JPATH_INSTALLATION', JPATH_ROOT . DIRECTORY_SEPARATOR .
'installation');
\defined('JPATH_THEMES') || \define('JPATH_THEMES',
JPATH_BASE . DIRECTORY_SEPARATOR . 'templates');
\defined('JPATH_CACHE') || \define('JPATH_CACHE',
JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'cache');
\defined('JPATH_MANIFESTS') ||
\define('JPATH_MANIFESTS', JPATH_ADMINISTRATOR .
DIRECTORY_SEPARATOR . 'manifests');
\defined('JPATH_API') || \define('JPATH_API',
JPATH_ROOT . DIRECTORY_SEPARATOR . 'api');
\defined('JPATH_CLI') || \define('JPATH_CLI',
JPATH_ROOT . DIRECTORY_SEPARATOR . 'cli');
includes/app.php000064400000003346151165467340007665 0ustar00<?php

/**
 * @package    Joomla.API
 *
 * @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;

// Saves the start time and memory usage.
$startTime = microtime(1);
$startMem  = memory_get_usage();

if (file_exists(\dirname(__DIR__) . '/defines.php')) {
    include_once \dirname(__DIR__) . '/defines.php';
}

require_once __DIR__ . '/defines.php';

require_once JPATH_BASE . '/includes/framework.php';

// Set profiler start time and memory usage and mark afterLoad in the
profiler.
JDEBUG &&
\Joomla\CMS\Profiler\Profiler::getInstance('Application')->setStart($startTime,
$startMem)->mark('afterLoad');

// Boot the DI container
$container = \Joomla\CMS\Factory::getContainer();

/*
 * Alias the session service keys to the web session service as that is the
primary session backend for this application
 *
 * In addition to aliasing "common" service keys, we also create
aliases for the PHP classes to ensure autowiring objects
 * is supported.  This includes aliases for aliased class names, and the
keys for aliased class names should be considered
 * deprecated to be removed when the class name alias is removed as well.
 */
$container->alias('session', 'session.cli')
    ->alias('JSession', 'session.cli')
    ->alias(\Joomla\CMS\Session\Session::class, 'session.cli')
    ->alias(\Joomla\Session\Session::class, 'session.cli')
    ->alias(\Joomla\Session\SessionInterface::class,
'session.cli');

// Instantiate the application.
$app = $container->get(\Joomla\CMS\Application\ApiApplication::class);

// Set the application as global app
\Joomla\CMS\Factory::$application = $app;

// Execute the application.
$app->execute();
language/en-GB/langmetadata.xml000064400000001577151165467340012411
0ustar00<?xml version="1.0" encoding="UTF-8"?>
<metafile client="api">
	<name>English (en-GB)</name>
	<version>5.1.2</version>
	<creationDate>2024-07</creationDate>
	<author>Joomla! Project</author>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<copyright>(C) 2020 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<description><![CDATA[en-GB api
language]]></description>
	<metadata>
		<name>English (United Kingdom)</name>
		<nativeName>English (United Kingdom)</nativeName>
		<tag>en-GB</tag>
		<rtl>0</rtl>
		<locale>en_GB.utf8, en_GB.UTF-8, en_GB, eng_GB, en, english,
english-uk, uk, gbr, britain, england, great britain, uk, united kingdom,
united-kingdom</locale>
		<firstDay>0</firstDay>
		<weekEnd>0,6</weekEnd>
		<calendar>gregorian</calendar>
	</metadata>
	<params />
</metafile>
language/en-GB/joomla.ini000064400000136154151165467340011227 0ustar00;
Joomla! Project
; (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

; Common boolean values
; Note: YES, NO, TRUE, FALSE are reserved words in INI format.

; Keep this string on top
JERROR_PARSING_LANGUAGE_FILE="&#160;: error(s) in line(s) %s"

J1="1"
J2="2"
J3="3"
J4="4"
J5="5"
J6="6"
J7="7"
J8="8"
J9="9"
J10="10"
J15="15"
J20="20"
J25="25"
J30="30"
J50="50"
J75="75"
J100="100"
J150="150"
J200="200"
J250="250"
J300="300"
J500="500"

JH1="h1"
JH2="h2"
JH3="h3"
JH4="h4"
JH5="h5"
JH6="h6"

ERROR="Error"
INFO="Info"
MESSAGE="Message"
NOTICE="Notice"
WARNING="Warning"

JACTIONS="Actions for: %s"
JADMINISTRATION="Administration"
JADMINISTRATOR="Administrator"
JALIAS="Alias"
JALL="All"
JALL_LANGUAGE="All"
JAPI="API"
JAPPLY="Save"
JARCHIVED="Archived"
JASSOCIATIONS_ASC="Associations ascending"
JASSOCIATIONS_DESC="Associations descending"
JAUTHOR="Author"
JAUTHOR_ASC="Author ascending"
JAUTHOR_DESC="Author descending"
JCANCEL="Cancel"
JCATEGORIES="Categories"
JCATEGORY="Category"
JCATEGORY_ASC="Category ascending"
JCATEGORY_DESC="Category descending"
JCATEGORY_SPRINTF="Category: %s"
JCLEAR="Clear"
JCLIENT="Location"
JCLOSE="Close"
JCONFIG_PERMISSIONS_DESC="Permissions for this component unless they
are changed for a specific item."
JCONFIG_PERMISSIONS_LABEL="Permissions"
JCURRENT="Current"
JDATE="Date"
JDATE_ASC="Date ascending"
JDATE_DESC="Date descending"
JDAY="Day"
JDEFAULT="Default"
JDEFAULTLANGUAGE="Language - Default"
JDETAILS="Details"
JDISABLED="Disabled"
JENABLED="Enabled"
JFALSE="False"
JFEATURE="Feature"
JFEATURED="Featured"
JFEATURED_ASC="Featured ascending"
JFEATURED_DESC="Featured descending"
JHELP="Help"
JHIDE="Hide"
JHIDEPASSWORD="Hide Password"
JINVALID_TOKEN="The most recent request was denied because it had an
invalid security token. Please refresh the page and try again."
JINVALID_TOKEN_NOTICE="The security token did not match. The request
was cancelled to prevent any security breach. Please try again."
JLOGIN="Log in"
JLOGOUT="Log out"
JMENU_MULTILANG_WARNING_MISSING_MODULES="An administrator menu module
for <strong>%s</strong> does not exist. <br>Create a
custom administrator menu and module for each administrator language or
publish a menu module set to All languages."
JMODIFY="Modify"
JMONTH="Month"
JMONTH_PUBLISHED="Month (published)"
JNEVER="Never"
JNEXT="Next"
JNEXT_TITLE="Next article: %s"
JNO="No"
JNONE="None"
JOFF="Off"
JOK="OK"
JON="On"
JONLY="Only"
JOPEN="Open"
JOPTIONS="Options"
JORDERINGDISABLED="Please sort by order to enable reordering"
JPREV="Prev"
JPREVIOUS="Previous"
JPREVIOUS_TITLE="Previous article: %s"
JPROTECTED="Protected"
JPUBLISHED="Published"
JRECORD_NUMBER="Record Number"
JREGISTER="Register"
JRESET="Reset"
JSAVE="Save &amp; Close"
JSELECT="Select"
JSHOW="Show"
JSHOWPASSWORD="Show Password"
JSITE="Site"
JSITEADMIN="Select Client"
JSTAGE="Stage"
JSTAGE_ASC="Stage ascending"
JSTAGE_DESC="Stage descending"
JSTATUS="Status"
JSTATUS_ASC="Status ascending"
JSTATUS_DESC="Status descending"
JSUBMIT="Submit"
JTAG="Tags"
JTAG_FIELD_SELECT_DESC="Select the tag to use."
JTOOLBAR="Toolbar"
JTRASH="Trash"
JTRASHED="Trashed"
JTRUE="True"
JUNARCHIVE="Remove from archive status"
JUNDEFINED="Undefined"
JUNFEATURE="Unfeature"
JUNFEATURED="Unfeatured"
JUNPROTECTED="Unprotected"
JUNPUBLISHED="Unpublished"
JVERSION="Version"
JVISIT_LINK="Visit Link"
JVISIT_WEBSITE="Visit Website"
JYEAR="Year"
JYES="Yes"

JACTION_ADMIN="Configure ACL & Options"
JACTION_ADMIN_GLOBAL="Super User"
JACTION_COMPONENT_SETTINGS="Component Settings"
JACTION_CREATE="Create"
JACTION_DELETE="Delete"
JACTION_EDIT="Edit"
JACTION_EDIT_MODULE="Edit the '%s' module"
JACTION_EDITOWN="Edit Own"
JACTION_EDITSTATE="Edit State"
JACTION_EDITVALUE="Edit Custom Field Value"
JACTION_EXECUTETRANSITION="Execute Transition"
JACTION_LOGIN_ADMIN="Administrator Login"
JACTION_LOGIN_API="Web Services Login"
JACTION_LOGIN_OFFLINE="Offline Access"
JACTION_LOGIN_SITE="Site Login"
JACTION_MANAGE="Access Administration Interface"
JACTION_MANAGEWORKFLOW="Manage Workflows"
JACTION_OPTIONS="Configure Options"
JACTION_UNPUBLISH="Unpublish"

JBROWSERTARGET_DOWNLOAD="Download %s in new window"
JBROWSERTARGET_MODAL="Modal"
JBROWSERTARGET_NEW="Open in new window"
JBROWSERTARGET_NEW_TITLE="Open %s in new window"
JBROWSERTARGET_PARENT="Open in parent window"
JBROWSERTARGET_POPUP="Open in popup"

JENFORCE_2FA_REDIRECT_MESSAGE="You were redirected because you are
required to set up Two Factor Authentication to continue."

JERROR_ALERTNOAUTHOR="You don't have permission to access this.
Please contact a website administrator if this is incorrect."
JERROR_ALERTNOTEMPLATE="The template for this display is not
available."
JERROR_AN_ERROR_HAS_OCCURRED="An error has occurred."
JERROR_CORE_CREATE_NOT_PERMITTED="Create not permitted."
JERROR_CORE_DELETE_NOT_PERMITTED="Delete not permitted."
JERROR_COULD_NOT_FIND_TEMPLATE="Could not find template
\"%s\"."
JERROR_INVALID_CONTROLLER="Invalid controller"
JERROR_INVALID_CONTROLLER_CLASS="Invalid controller class"
JERROR_LAYOUT_PREVIOUS_ERROR="Previous Error"
JERROR_LOADFILE_FAILED="Error loading form file"
JERROR_LOADING_MENUS="Error loading Menus: %s"
JERROR_LOGIN_DENIED="You do not have access to the Administrator
section of this site."
JERROR_NO_ITEMS_SELECTED="No item(s) selected."
JERROR_NOLOGIN_BLOCKED="Login denied! Your account has either been
blocked or you have not activated it yet."
JERROR_SAVE_FAILED="Could not save data. Error: %s"
JERROR_SENDING_EMAIL="Email could not be sent."
JERROR_SESSION_STARTUP="Error starting the session."

JFIELD_ACCESS_DESC="The access level group that is allowed to view
this item."
JFIELD_ACCESS_LABEL="Access"
JFIELD_ALIAS_DESC="The Alias will be used as part of the URL."
JFIELD_ALIAS_LABEL="Alias"
JFIELD_ALIAS_PLACEHOLDER="Auto-generate from title"
JFIELD_ALT_COMPONENT_LAYOUT_DESC="Use a layout from the supplied
component view or overrides in the templates."
JFIELD_ALT_LAYOUT_LABEL="Layout"
JFIELD_ALT_PAGE_TITLE_DESC="An optional alternative page title to set
that will change the TITLE tag in the HTML output."
JFIELD_ALT_PAGE_TITLE_LABEL="Alternative Page Title"
JFIELD_BASIC_LOGIN_DESCRIPTION_LABEL="Login Description Text"
JFIELD_BASIC_LOGIN_DESCRIPTION_SHOW_LABEL="Login Description"
JFIELD_BASIC_LOGOUT_DESCRIPTION_LABEL="Logout Description Text"
JFIELD_BASIC_LOGOUT_DESCRIPTION_SHOW_LABEL="Logout Description"
JFIELD_CATEGORY_DESC="The category that this item is assigned to. You
may select an existing category or enter a new category by typing the name
in the field and pressing enter."
JFIELD_COLOR_ERROR_CONVERT_HSL="Unable to convert HSL value"
JFIELD_COLOR_ERROR_CONVERT_HUE="Unable to convert hue value"
JFIELD_COLOR_ERROR_NO_COLOR="No colour value available"
JFIELD_COLOR_ERROR_WRONG_FORMAT="Wrong format"
JFIELD_COLOR_LABEL_SLIDER_ALPHA="Alpha Slider"
JFIELD_COLOR_LABEL_SLIDER_HUE="Hue Slider"
JFIELD_COLOR_LABEL_SLIDER_INPUT="Selected Colour Value"
JFIELD_COLOR_LABEL_SLIDER_LIGHT="Light Slider"
JFIELD_COLOR_LABEL_SLIDER_SATURATION="Saturation Slider"
JFIELD_COLOR_SELECT="Select a colour"
JFIELD_COLOR_TRANSPARENT="No colour, transparent"
JFIELD_COLOR_VALUE="Colour with hexadecimal value of"
JFIELD_DISPLAY_READONLY_LABEL="Display When Read-Only"
JFIELD_ENABLED_DESC="The enabled status of this item."
JFIELD_FIELDS_CATEGORY_DESC="Select the category that this field is
assigned to."
JFIELD_LANGUAGE_DESC="Assign a language to this article."
JFIELD_LANGUAGE_LABEL="Language"
JFIELD_LOGIN_IMAGE_DESC="Select or upload an image to display on login
page."
JFIELD_LOGIN_IMAGE_LABEL="Login Image"
JFIELD_LOGIN_REDIRECT_URL_DESC="If a URL is entered here, users will
be redirected to it after login.<br>The URL must be internal (eg:
index.php?Itemid=999)."
JFIELD_LOGIN_REDIRECT_URL_LABEL="Login Redirect"
JFIELD_LOGOUT_IMAGE_DESC="Select or upload an image to display on
logout page."
JFIELD_LOGOUT_IMAGE_LABEL="Logout Image"
JFIELD_LOGOUT_REDIRECT_PAGE_DESC="Select or create the page the user
will be redirected to after ending their current session by logging out.
The default is to stay on the same page."
JFIELD_LOGOUT_REDIRECT_PAGE_LABEL="Logout Redirection Page"
JFIELD_LOGOUT_REDIRECT_URL_DESC="If a URL is entered here, users will
be redirected to it after logout.<br>The URL must be internal (eg:
index.php?Itemid=999)."
JFIELD_LOGOUT_REDIRECT_URL_LABEL="Logout Redirect"
JFIELD_MEDIA_ALT_CHECK_DESC_LABEL="Decorative Image - no description
required"
JFIELD_MEDIA_ALT_CHECK_LABEL="No Description"
JFIELD_MEDIA_ALT_LABEL="Image Description (Alt Text)"
JFIELD_MEDIA_DOWNLOAD_CHECK_DESC_LABEL="Use a download link"
JFIELD_MEDIA_DOWNLOAD_CHECK_LABEL="Download"
JFIELD_MEDIA_DOWNLOAD_FILE="Download {file}" ; Do not translate
the text between the {}
JFIELD_MEDIA_EMBED_CHECK_DESC_LABEL="Use native elements audio, video
or object"
JFIELD_MEDIA_EMBED_CHECK_LABEL="Embed"
JFIELD_MEDIA_CLASS_LABEL="Image Class"
JFIELD_MEDIA_FIGURE_CAPTION_LABEL="Figure Caption"
JFIELD_MEDIA_FIGURE_CLASS_LABEL="Figure Class"
JFIELD_MEDIA_HEIGHT_LABEL="Height"
JFIELD_MEDIA_LAZY_LABEL="Image will be lazyloaded"
JFIELD_MEDIA_SUMMARY_LABEL="Additional Data"
JFIELD_MEDIA_WIDTH_LABEL="Width"
JFIELD_MEDIA_TITLE_LABEL="Title"
JFIELD_MEDIA_UNSUPPORTED="You don't have a {extension} plugin,
but you can {tag} download the {extension} file.</a>" ; Do not
translate the text between the {}
JFIELD_META_DESCRIPTION_COUNTER="{remaining} characters remaining of
{maxlength} characters." ; Do not translate the text between the {}
JFIELD_META_DESCRIPTION_DESC="An optional paragraph to be used as the
description of the page in the HTML output. This will generally display in
the results of search engines."
JFIELD_META_DESCRIPTION_LABEL="Meta Description"
JFIELD_META_KEYWORDS_DESC="An optional comma-separated list of
keywords and/or phrases to be used in the HTML output."
JFIELD_META_KEYWORDS_LABEL="Keywords"
JFIELD_META_RIGHTS_DESC="Describe what rights others have to use this
content."
JFIELD_META_RIGHTS_LABEL="Content Rights"
JFIELD_METADATA_AUTHOR_DESC="The author of this content."
JFIELD_METADATA_RIGHTS_DESC="Publication rights for the content."
JFIELD_METADATA_RIGHTS_LABEL="Rights"
JFIELD_METADATA_ROBOTS_DESC="Robots instructions."
JFIELD_METADATA_ROBOTS_LABEL="Robots"
JFIELD_MODULE_LANGUAGE_DESC="Assign a language to this module."
JFIELD_NAME_DESC="The name will be used to identify the field. Leave
this blank and Joomla will fill in a default value from the title."
JFIELD_NAME_LABEL="Name"
JFIELD_NAME_PLACEHOLDER="Auto-generate from title"
JFIELD_NOTE_DESC="Note"
JFIELD_NOTE_LABEL="Note"
JFIELD_OPTION_NONE="None"
JFIELD_ORDERING_DESC="Select the ordering."
JFIELD_ORDERING_LABEL="Ordering"
JFIELD_PARAMS_LABEL="Options"
JFIELD_PASSWORD_INDICATE_COMPLETE="Password accepted"
JFIELD_PASSWORD_INDICATE_INCOMPLETE="Password doesn't meet
site's requirements."
JFIELD_PASSWORD_NOT_ENOUGH_INTEGERS_N="Password does not have enough
numbers. At least %s numbers are required."
JFIELD_PASSWORD_NOT_ENOUGH_INTEGERS_N_1="Password does not have enough
numbers. At least 1 number is required."
JFIELD_PASSWORD_NOT_ENOUGH_LOWERCASE_LETTERS_N="Password does not have
enough lower case characters. At least %s lower case characters are
required."
JFIELD_PASSWORD_NOT_ENOUGH_LOWERCASE_LETTERS_N_1="Password does not
have enough lower case characters. At least 1 lower case character is
required."
JFIELD_PASSWORD_NOT_ENOUGH_SYMBOLS_N="Password does not have enough
symbols (such as !@#$). At least %s symbols are required."
JFIELD_PASSWORD_NOT_ENOUGH_SYMBOLS_N_1="Password does not have enough
symbols (such as !@#$). At least 1 symbol is required."
JFIELD_PASSWORD_NOT_ENOUGH_UPPERCASE_LETTERS_N="Password does not have
enough upper case characters. At least %s upper case characters are
required."
JFIELD_PASSWORD_NOT_ENOUGH_UPPERCASE_LETTERS_N_1="Password does not
have enough upper case characters. At least 1 upper case character is
required."
JFIELD_PASSWORD_RULES_CHARACTERS="Characters: %d"
JFIELD_PASSWORD_RULES_DIGITS="Numbers: %d"
JFIELD_PASSWORD_RULES_LOWERCASE="Lower Case: %d"
JFIELD_PASSWORD_RULES_MINIMUM_REQUIREMENTS="<strong>Minimum
Requirements</strong> — %s"
JFIELD_PASSWORD_RULES_SYMBOLS="Symbols: %d"
JFIELD_PASSWORD_RULES_UPPERCASE="Upper Case: %d"
JFIELD_PASSWORD_SPACES_IN_PASSWORD="Password must not have spaces at
the beginning or end."
JFIELD_PASSWORD_TOO_LONG="Password is too long. Passwords must be less
than 100 characters."
JFIELD_PASSWORD_TOO_SHORT_N="Password is too short. Passwords must
have at least %s characters."
JFIELD_PLG_SEARCH_ALL_DESC="Include published items in the
search."
JFIELD_PLG_SEARCH_ALL_LABEL="Search Published"
JFIELD_PLG_SEARCH_ARCHIVED_DESC="Include archived items in the
search."
JFIELD_PLG_SEARCH_ARCHIVED_LABEL="Search Archived"
JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC="Sets the maximum number of results
to return."
JFIELD_PLG_SEARCH_SEARCHLIMIT_LABEL="Search Limit"
JFIELD_PUBLISHED_DESC="Set publication status."
JFIELD_READMORE_DESC="Add a custom text instead of Read More."
JFIELD_READMORE_LABEL="Read More Text"
JFIELD_SPACER_LABEL="<span
style=\"width:auto\"><hr></span>"
JFIELD_TITLE_DESC="Title"
JFIELD_VERSION_HISTORY_DESC="This button allows you to open a window
to view older versions of this item."
JFIELD_VERSION_HISTORY_LABEL="Prior Versions"
JFIELD_VERSION_HISTORY_SELECT="View Prior Versions"
JGLOBAL_ACTION_PERMISSIONS_LABEL="Permissions"
JGLOBAL_ADD_CUSTOM_CATEGORY="Add new Category"
JGLOBAL_ALL_ARTICLE="Max Levels Articles"
JGLOBAL_ALL_LIST="Max Levels as List"
JGLOBAL_ALLOW_COMMENTS_DESC="If Yes, viewers will be able to add and
view comments for the article."
JGLOBAL_ALLOW_COMMENTS_LABEL="Allow Comments"
JGLOBAL_ALLOW_RATINGS_DESC="If Yes, viewers will be able to add and
view ratings for the article."
JGLOBAL_ALLOW_RATINGS_LABEL="Allow Ratings"
JGLOBAL_ARCHIVE_ARTICLES_FIELD_INTROTEXTLIMIT_LABEL="Intro text
Limit"
JGLOBAL_ARCHIVE_OPTIONS="Archive"
JGLOBAL_ARTICLE_COUNT_DESC="Show or hide a count of articles in each
category."
JGLOBAL_ARTICLE_COUNT_LABEL="Article Count"
JGLOBAL_ARTICLE_MANAGER_ORDER="Ordering"
JGLOBAL_ARTICLE_MANAGER_REVERSE_ORDER="Ordering Reverse"
JGLOBAL_ARTICLE_ORDER_DESC="The order that articles will show
in."
JGLOBAL_ARTICLE_ORDER_LABEL="Article Order"
JGLOBAL_ARTICLES="Articles"
JGLOBAL_ASSOC_NOT_POSSIBLE="To define associations, please make sure
the item language is not set to 'All'."
JGLOBAL_ASSOCIATIONS_CONTENTLANGUAGE_WARNING="Some associated items
are assigned to the <strong>%s</strong> Content Language but
that Content Language is trashed or deleted."
JGLOBAL_ASSOCIATIONS_NEW_ITEM_WARNING="To create associations, first
save the item."
JGLOBAL_ASSOCIATIONS_PROPAGATE_BUTTON="Propagate"
JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED="Failed propagating
associations. You may have to select or create them manually."
JGLOBAL_ASSOCIATIONS_PROPAGATE_MESSAGE_ALL="All existing associations
have been set."
JGLOBAL_ASSOCIATIONS_PROPAGATE_MESSAGE_NONE="No associations exist to
propagate."
JGLOBAL_ASSOCIATIONS_PROPAGATE_MESSAGE_SOME="Associations have been
set for: %s"
JGLOBAL_ASSOCIATIONS_PROPAGATE_TIP="Propagates this item's
existing associations."
JGLOBAL_ASSOCIATIONS_RESET_WARNING="The language has been changed. If
you save this item again it will reset the available associations. If this
was not intended, close the item."
JGLOBAL_AUTH_ACCESS_DENIED="Access Denied"
JGLOBAL_AUTH_ACCESS_GRANTED="Access Granted"
JGLOBAL_AUTH_BIND_FAILED="Failed binding to LDAP server"
JGLOBAL_AUTH_CANCEL="Authentication cancelled"
JGLOBAL_AUTH_CURL_NOT_INSTALLED="Curl isn't installed"
JGLOBAL_AUTH_EMPTY_PASS_NOT_ALLOWED="Empty password not allowed."
JGLOBAL_AUTH_FAIL="Authentication failed"
JGLOBAL_AUTH_FAILED="Failed to authenticate: %s"
JGLOBAL_AUTH_INCORRECT="Incorrect username/password"
JGLOBAL_AUTH_INVALID_PASS="Username and password do not match or you
do not have an account yet."
JGLOBAL_AUTH_INVALID_SECRETKEY="The Multi-factor Authentication Secret
Key is invalid."
JGLOBAL_AUTH_NO_REDIRECT="Could not redirect to server: %s"
JGLOBAL_AUTH_NO_USER="Username and password do not match or you do not
have an account yet."
JGLOBAL_AUTH_NOT_CONNECT="Unable to connect to authentication
service."
JGLOBAL_AUTH_NOT_CREATE_DIR="Could not create the FileStore folder %s.
Please check the effective permissions."
JGLOBAL_AUTH_PASS_BLANK="LDAP can't have blank password"
JGLOBAL_AUTH_UNKNOWN_ACCESS_DENIED="Result Unknown. Access
Denied"
JGLOBAL_AUTH_USER_NOT_FOUND="Unable to find user."
JGLOBAL_AUTHOR_ALPHABETICAL="Author Alphabetical"
JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL="Author Reverse Alphabetical"
JGLOBAL_AUTO="Auto"
JGLOBAL_BATCH_MOVE_PARENT_NOT_FOUND="Can't find the destination
parent for this move."
JGLOBAL_BATCH_MOVE_ROW_NOT_FOUND="Can't find the destination row
for this move."
JGLOBAL_BATCH_PROCESS="Process"
JGLOBAL_BATCH_WORKFLOW_STATE_ROW_NOT_FOUND="Can't find the
destination row for this state change."
JGLOBAL_BLOG="Blog"
JGLOBAL_BLOG_CLASS="Article Class"
JGLOBAL_BLOG_CLASS_LEADING="Leading Article Class"
JGLOBAL_BLOG_LAYOUT_OPTIONS="Blog Layout"
JGLOBAL_CATEGORIES_OPTIONS="Categories"
JGLOBAL_CATEGORY_LAYOUT_DESC="Layout"
JGLOBAL_CATEGORY_LAYOUT_LABEL="Choose a Layout"
JGLOBAL_CATEGORY_MANAGER_ORDER="Category Order"
JGLOBAL_CATEGORY_NOT_FOUND="Category not found"
JGLOBAL_CATEGORY_OPTIONS="Category"
JGLOBAL_CATEGORY_ORDER_DESC="The order that categories will show
in."
JGLOBAL_CATEGORY_ORDER_LABEL="Category Order"
JGLOBAL_CENTER="Center"
JGLOBAL_CHECK_ALL="Check All Items"
JGLOBAL_CHOOSE_CATEGORY_DESC="Select or create a category to be
displayed."
JGLOBAL_CHOOSE_CATEGORY_LABEL="Choose a Category"
JGLOBAL_CHOOSE_COMPONENT_DESC="Choose a component from the list."
JGLOBAL_CHOOSE_COMPONENT_LABEL="Choose a component"
JGLOBAL_CLICK_TO_SORT_THIS_COLUMN="Select to sort by this column"
JGLOBAL_CLICK_TO_TOGGLE_STATE="Select icon to toggle state."
JGLOBAL_CONFIRM_DELETE="Are you sure you want to delete? Confirming
will permanently delete the selected item(s)!"
JGLOBAL_COPY="(copy)"
JGLOBAL_CREATED="Created"
JGLOBAL_CREATED_DATE="Created Date"
JGLOBAL_CUSTOM_CATEGORY="New Categories"
JGLOBAL_CUSTOM_FIELDS_ENABLE_DESC="Enable the creation or editing of
custom fields."
JGLOBAL_CUSTOM_FIELDS_ENABLE_LABEL="Edit Custom Fields"
JGLOBAL_DATE_FORMAT_DESC="Optional format string for showing the date.
For example, D M Y for day month year or you can use d-m-y for a short
version eg. 28-12-16. See https://php.net/date. If left blank, it uses
DATE_FORMAT_LC1 from your language file."
JGLOBAL_DATE_FORMAT_LABEL="Date Format"
JGLOBAL_DESCRIPTION="Description"
JGLOBAL_DISPLAY_NUM="Display #"
JGLOBAL_DISPLAY_SELECT_DESC="Show or hide the Display Select dropdown
listbox."
JGLOBAL_DISPLAY_SELECT_LABEL="Display Select"
JGLOBAL_EDIT_ITEM="Edit item"
JGLOBAL_EDIT_PREFERENCES="Edit Preferences"
JGLOBAL_EMAIL="Email"
JGLOBAL_EMAIL_DOMAIN_NOT_ALLOWED="The email domain
<strong>%s</strong> is not allowed. Please enter another email
address."
JGLOBAL_EMPTY_CATEGORIES_DESC="Show or hide categories that have no
articles and no subcategories."
JGLOBAL_EMPTY_CATEGORIES_LABEL="Empty Categories"
JGLOBAL_ERROR_INSUFFICIENT_BATCH_INFORMATION="Insufficient information
to perform the batch operation"
JGLOBAL_FEED_SHOW_READMORE_DESC="Displays a &quot;Read
More&quot; link in the news feeds if Intro Text is set to Show."
JGLOBAL_FEED_SHOW_READMORE_LABEL="&quot;Read More&quot;
Link"
JGLOBAL_FEED_SUMMARY_DESC="If set to Intro Text, only the Intro Text
of each article will show in the news feed. If set to Full Text, the whole
article will show in the news feed."
JGLOBAL_FEED_SUMMARY_LABEL="Include in Feed"
JGLOBAL_FEED_TITLE="News Feeds"
JGLOBAL_FIELD_ADD="Add"
JGLOBAL_FIELD_CATEGORIES_CHOOSE_CATEGORY_DESC="Categories that are
within this category will be displayed."
JGLOBAL_FIELD_CATEGORIES_CHOOSE_CATEGORY_LABEL="Select the Top Level
Category"
JGLOBAL_FIELD_CATEGORIES_DESC_DESC="If you enter some text in this
field, it will replace the Top Level Category Description, if it has
one."
JGLOBAL_FIELD_CATEGORIES_DESC_LABEL="Alternative Description"
JGLOBAL_FIELD_CREATED_BY_ALIAS_DESC="Enter an alias to be displayed
instead of the name of the user who created the item."
JGLOBAL_FIELD_CREATED_BY_ALIAS_LABEL="Created by Alias"
JGLOBAL_FIELD_CREATED_BY_DESC="The user who created this."
JGLOBAL_FIELD_CREATED_BY_LABEL="Created By"
JGLOBAL_FIELD_CREATED_DESC="Created Date."
JGLOBAL_FIELD_CREATED_LABEL="Created Date"
JGLOBAL_FIELD_FIELD_CACHETIME_DESC="The number of minutes before the
cache is refreshed."
JGLOBAL_FIELD_FIELD_ORDERING_DESC="Order items will be displayed
in."
JGLOBAL_FIELD_FIELD_ORDERING_LABEL="Order"
JGLOBAL_FIELD_GROUPS="Field Groups"
JGLOBAL_FIELD_ID_DESC="Record number in the database."
JGLOBAL_FIELD_ID_LABEL="ID"
JGLOBAL_FIELD_LAYOUT_DESC="Default layout to use for items."
JGLOBAL_FIELD_LAYOUT_LABEL="Choose a Layout"
JGLOBAL_FIELD_MODIFIED_BY_DESC="The user who did the last
modification."
JGLOBAL_FIELD_MODIFIED_BY_LABEL="Modified By"
JGLOBAL_FIELD_MODIFIED_LABEL="Modified Date"
JGLOBAL_FIELD_MOVE="Move"
JGLOBAL_FIELD_MOVE_DOWN="Move down"
JGLOBAL_FIELD_MOVE_UP="Move up"
JGLOBAL_FIELD_NUM_CATEGORY_ITEMS_DESC="Number of categories to display
for each level."
JGLOBAL_FIELD_NUM_CATEGORY_ITEMS_LABEL="Number of Categories"
JGLOBAL_FIELD_PUBLISH_DOWN_DESC="An optional date to stop
publishing."
JGLOBAL_FIELD_PUBLISH_DOWN_LABEL="Finish Publishing"
JGLOBAL_FIELD_PUBLISH_UP_DESC="An optional date to start
publishing."
JGLOBAL_FIELD_PUBLISH_UP_LABEL="Start Publishing"
JGLOBAL_FIELD_REMOVE="Remove"
JGLOBAL_FIELD_SHOW_BASE_DESCRIPTION_DESC="Show description of the top
level category or alternatively replace with the text from the description
field found in the menu item. If using Root as the top level category, the
description field has to be filled."
JGLOBAL_FIELD_SHOW_BASE_DESCRIPTION_LABEL="Top Level Category
Description"
JGLOBAL_FIELD_VERSION_NOTE_DESC="Enter an optional note for this
version of the item."
JGLOBAL_FIELD_VERSION_NOTE_LABEL="Version Note"
JGLOBAL_FIELDS="Fields"
JGLOBAL_FIELDS_TITLE="Custom Fields"
JGLOBAL_FIELDSET_ADVANCED="Advanced"
JGLOBAL_FIELDSET_ASSOCIATIONS="Associations"
JGLOBAL_FIELDSET_BASIC="Options"
JGLOBAL_FIELDSET_CONTENT="Content"
JGLOBAL_FIELDSET_DESCRIPTION="Description"
JGLOBAL_FIELDSET_DISPLAY_OPTIONS="Display"
JGLOBAL_FIELDSET_GLOBAL="Main Options"
JGLOBAL_FIELDSET_IMAGE_OPTIONS="Images"
JGLOBAL_FIELDSET_INTEGRATION="Integration"
JGLOBAL_FIELDSET_METADATA_OPTIONS="Metadata"
JGLOBAL_FIELDSET_OPTIONS="Options"
JGLOBAL_FIELDSET_PUBLISHING="Publishing"
JGLOBAL_FILTER_ATTRIBUTES_DESC="3. List additional attributes,
separating each attribute name with a space or comma. For example:
<em>class,title,id</em>."
JGLOBAL_FILTER_ATTRIBUTES_LABEL="Filter
Attributes<sup>3</sup>"
JGLOBAL_FILTER_CLIENT="- Select Location -"
JGLOBAL_FILTER_FIELD_DESC="Show or hide a filter field for the
list."
JGLOBAL_FILTER_FIELD_LABEL="Filter Field"
JGLOBAL_FILTER_GROUPS_DESC="This sets the user groups that you want
filters applied to. Other groups will have no filtering performed."
JGLOBAL_FILTER_GROUPS_LABEL="Filter Groups"
JGLOBAL_FILTER_TAGS_DESC="2. List additional tags, separating each tag
name with a space or comma. For example:
<em>p,div,span</em>."
JGLOBAL_FILTER_TAGS_LABEL="Filter Tags<sup>2</sup>"
JGLOBAL_FILTER_TYPE_DESC="<p>1. Forbidden List allows all tags
and attributes except for those
listed.<br><strong>--</strong> Tags for the Default
Forbidden List include: 'applet', 'body',
'bgsound', 'base', 'basefont',
'canvas', 'embed', 'frame',
'frameset', 'head', 'html', 'id',
'iframe', 'ilayer', 'layer',
'link', 'meta', 'name', 'object',
'script', 'style', 'title',
'xml'<br><strong>--</strong> Attributes for the
Default Forbidden List include: 'action', 'background',
'codebase', 'dynsrc', 'lowsrc',
'formaction'<br><strong>--</strong> You can
forbid additional tags and attributes by adding to the Filter Tags and
Filter Attributes fields, separating each tag or attribute name with a
comma.<br><strong>--</strong> Custom Forbidden List
allows you to override the Default Forbidden List. Add the tags and
attributes to be forbidden in the Filter Tags and Filter Attributes
fields.</p><p>Allowed List allows only the tags listed in the
Filter Tags and Filter Attributes fields.</p><p>No HTML removes
all HTML tags from the content when it is saved.</p><p>Please
note that these settings work regardless of the editor that you are using.
<br>Even if you are using a WYSIWYG editor, the filtering settings
may strip additional tags and attributes prior to saving information in the
database.</p>"
JGLOBAL_FILTER_TYPE_LABEL="Filter Type<sup>1</sup>"
JGLOBAL_FILTERED_BY="Filtered by:"
JGLOBAL_FULL_TEXT="Full Text"
JGLOBAL_GT="&gt;"
JGLOBAL_HISTORY_LIMIT_OPTIONS_DESC="The maximum number of old versions
of an item to save. If zero, all old versions will be saved."
JGLOBAL_HISTORY_LIMIT_OPTIONS_LABEL="Maximum Versions"
JGLOBAL_HITS="Hits"
JGLOBAL_HITS_ASC="Hits ascending"
JGLOBAL_HITS_DESC="Hits descending"
JGLOBAL_INHERIT="Inherit"
JGLOBAL_INTEGRATION_LABEL="Integration"
JGLOBAL_INTRO_TEXT="Intro Text"
JGLOBAL_ISFREESOFTWARE="%s is free software released under the <a
href=\"https://www.gnu.org/licenses/gpl-2.0.html\"
target=\"_blank\" rel=\"noopener noreferrer\">GNU
General Public License</a>."
JGLOBAL_ITEM_FEATURE="Feature Item"
JGLOBAL_ITEM_UNFEATURE="Unfeature Item"
JGLOBAL_JOOA11Y="Accessibility Check"
JGLOBAL_KEEP_TYPING="Keep typing &hellip;"
JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM="Language pack does not match
this Joomla! version. Some strings may be missing and will be displayed in
English."
JGLOBAL_LEARN_MORE="Learn More"
JGLOBAL_LEAST_HITS="Least Hits"
JGLOBAL_LEFT="Left"
JGLOBAL_LINK_AUTHOR_LABEL="Link to Author's Contact Page"
JGLOBAL_LINK_CATEGORY_DESC="If set to Yes, and if Show Category is set
to 'Show', the Category Title will link to a layout showing
articles in that Category."
JGLOBAL_LINK_CATEGORY_LABEL="Link Category"
JGLOBAL_LINK_PARENT_CATEGORY_DESC="If set to Yes, and if Show Parent
is set to 'Show', the Parent Category Title will link to a layout
showing articles in that Category."
JGLOBAL_LINK_PARENT_CATEGORY_LABEL="Link Parent Category"
JGLOBAL_LINKED_INTRO_IMAGE_LABEL="Linked Intro Image"
JGLOBAL_LINKED_TITLES_DESC="If set to Yes, the article title will be a
link to the article."
JGLOBAL_LINKED_TITLES_LABEL="Linked Titles"
JGLOBAL_LIST="List"
JGLOBAL_LIST_ALIAS="Alias: %s"
JGLOBAL_LIST_ALIAS_NOTE="(<span>Alias</span>: %s,
<span>Note</span>: %s)"
JGLOBAL_LIST_AUTHOR_DESC="Show or hide the article author in the list
of articles."
JGLOBAL_LIST_AUTHOR_LABEL="Author"
JGLOBAL_LIST_HITS_DESC="Show or hide article hits in the list of
articles."
JGLOBAL_LIST_HITS_LABEL="Hits"
JGLOBAL_LIST_LAYOUT_OPTIONS="List Layouts"
JGLOBAL_LIST_LIMIT="Select number of items per page."
JGLOBAL_LIST_NAME="(<span>Name</span>: %s)"
JGLOBAL_LIST_NAME_NOTE="(<span>Name</span>: %s,
<span>Note</span>: %s)"
JGLOBAL_LIST_NOTE="(<span>Note</span>: %s)"
JGLOBAL_LIST_RATINGS_DESC="Whether to show article ratings in the list
of articles."
JGLOBAL_LIST_RATINGS_LABEL="Show Ratings in List"
JGLOBAL_LIST_TITLE_DESC="If Show, Category Title will show in the list
of categories."
JGLOBAL_LIST_TITLE_LABEL="Category Title"
JGLOBAL_LIST_VOTES_DESC="Whether to show article votes in the list of
articles."
JGLOBAL_LIST_VOTES_LABEL="Show Votes in List"
JGLOBAL_LOOKING_FOR="Looking for"
JGLOBAL_LT="&lt;"
JGLOBAL_MAXIMUM_CATEGORY_LEVELS_DESC="The number of subcategory levels
to display."
JGLOBAL_MAXIMUM_CATEGORY_LEVELS_LABEL="Subcategory Levels"
JGLOBAL_MAXIMUM_UPLOAD_SIZE_LIMIT="Maximum upload size:
<strong>%s</strong>"
JGLOBAL_MAXLEVEL_DESC="Maximum number of levels of subcategories to
show."
JGLOBAL_MAXLEVEL_LABEL="Subcategory Levels"
JGLOBAL_MENU_SELECTION="Menu Selection"
JGLOBAL_MODIFIED="Modified"
JGLOBAL_MODIFIED_DATE="Modified Date"
JGLOBAL_MOST_HITS="Most Hits"
JGLOBAL_MOST_RECENT_FIRST="Most Recent First"
JGLOBAL_MULTI_LEVEL="Multi Level"
JGLOBAL_NAME_ASC="Name ascending"
JGLOBAL_NAME_DESC="Name descending"
JGLOBAL_NEWITEMSFIRST_DESC="New items default to the first position.
The ordering can be changed after this item is saved."
JGLOBAL_NEWITEMSLAST_DESC="New items default to the last position. The
ordering can be changed after this item is saved."
JGLOBAL_NO_ITEM_SELECTED="No items selected"
JGLOBAL_NO_MATCHING_RESULTS="No Matching Results"
JGLOBAL_NO_ORDER="No Order"
JGLOBAL_NONAPPLICABLE="N/A"
JGLOBAL_NUM_INTRO_ARTICLES_DESC="Number of articles to show after the
leading article. Articles will be shown in columns."
JGLOBAL_NUM_INTRO_ARTICLES_LABEL="# Intro Articles"
JGLOBAL_NUM_LEADING_ARTICLES_DESC="Number of leading articles to
display as full-width at the beginning of the page."
JGLOBAL_NUM_LEADING_ARTICLES_LABEL="# Leading Articles"
JGLOBAL_NUM_LINKS_DESC="Number of articles to display as links,
normally below the Intro Articles."
JGLOBAL_NUM_LINKS_LABEL="# Links"
JGLOBAL_NUMBER_CATEGORY_ITEMS_DESC="If Show, the number of articles in
the category will show."
JGLOBAL_NUMBER_CATEGORY_ITEMS_LABEL="Show Article Count"
JGLOBAL_NUMBER_ITEMS_LIST_DESC="Default number of articles to list on
a page."
JGLOBAL_NUMBER_ITEMS_LIST_LABEL="# Articles to List"
JGLOBAL_OLDEST_FIRST="Oldest First"
JGLOBAL_OPENS_IN_A_NEW_WINDOW="Opens in a new window"
JGLOBAL_ORDER_ASCENDING="Ascending"
JGLOBAL_ORDER_DESCENDING="Descending"
JGLOBAL_ORDER_DIRECTION_DESC="Sort order. Descending is highest to
lowest. Ascending is lowest to highest."
JGLOBAL_ORDER_DIRECTION_LABEL="Direction"
JGLOBAL_ORDERING="Article Order"
JGLOBAL_ORDERING_DATE_DESC="If articles are ordered by date, which
date to use."
JGLOBAL_ORDERING_DATE_LABEL="Date for Ordering"
JGLOBAL_OTPMETHOD_NONE="Disable Multi-factor Authentication"
JGLOBAL_PAGINATION_DESC="Show or hide Pagination support. Pagination
provides page links at the bottom of the page that allow the User to
navigate to additional pages. These are needed if the Information will not
fit on one page."
JGLOBAL_PAGINATION_LABEL="Pagination"
JGLOBAL_PAGINATION_RESULTS_DESC="Show or hide pagination summary, for
example, &quot;Page 1 of 4&quot;."
JGLOBAL_PAGINATION_RESULTS_LABEL="Pagination Summary"
JGLOBAL_PASSWORD="Password"
JGLOBAL_PASSWORD_RESET_REQUIRED="You are required to reset your
password before proceeding."
JGLOBAL_PERMISSIONS_ANCHOR="Set Permissions"
JGLOBAL_PREVIEW="Preview"
JGLOBAL_PREVIEW_POSITION="<span>Position:</span> %s"
JGLOBAL_PREVIEW_STYLE="<span>Style:</span> %s"
JGLOBAL_PUBLISHED_DATE="Published Date"
JGLOBAL_RANDOM_ORDER="Random Order"
JGLOBAL_RATINGS="Ratings"
JGLOBAL_RATINGS_ASC="Ratings ascending"
JGLOBAL_RATINGS_DESC="Ratings descending"
JGLOBAL_RECORD_HITS_DISABLED="The recording of hits is disabled."
JGLOBAL_RECORD_HITS_LABEL="Record Hits"
JGLOBAL_RECORD_NUMBER="Record ID: %d"
JGLOBAL_REMEMBER_ME="Remember Me"
JGLOBAL_REPEATABLE_FIELDS_TABLE_CAPTION="Repeatable Fields"
JGLOBAL_REVERSE_ORDERING="Article Reverse Order"
JGLOBAL_RIGHT="Right"
JGLOBAL_ROOT="Root"
JGLOBAL_ROOT_PARENT="- No parent -"
JGLOBAL_SAVE_HISTORY_OPTIONS_DESC="Automatically save old versions of
an item. If set to Yes, old versions of items are saved automatically. When
editing, you may restore from a previous version of the item."
JGLOBAL_SAVE_HISTORY_OPTIONS_LABEL="Enable Versions"
JGLOBAL_SECRETKEY="Secret Key"
JGLOBAL_SECRETKEY_HELP="If you have enabled Multi-factor
Authentication in your user account please enter your secret key. If you do
not know what this means, you can leave this field blank."
JGLOBAL_SEF_NOIDS_DESC="Remove the IDs from the URLs of this
component."
JGLOBAL_SEF_NOIDS_LABEL="Remove IDs from URLs"
JGLOBAL_SEF_TITLE="Routing"
JGLOBAL_SELECT_ALLOW_DENY_GROUP="Change %s permission for %s
group."
JGLOBAL_SELECT_AN_OPTION="Select an option"
JGLOBAL_SELECT_NO_RESULTS_MATCH="No results match"
JGLOBAL_SELECT_PRESS_TO_SELECT="Press to select"
JGLOBAL_SELECT_SOME_OPTIONS="Select some options"
JGLOBAL_SELECTED_UPLOAD_FILE_SIZE="Selected file size:
<strong>%s</strong>"
JGLOBAL_SELECTION_ALL="Select All"
JGLOBAL_SELECTION_INVERT="Toggle Selection"
JGLOBAL_SELECTION_INVERT_ALL="Toggle All Selections"
JGLOBAL_SELECTION_NONE="Clear Selection"
JGLOBAL_SHOW_ASSOCIATIONS_DESC="Multilingual only. If set to Show, the
associated articles flags or URL Language Code will be displayed."
JGLOBAL_SHOW_ASSOCIATIONS_LABEL="Associations"
JGLOBAL_SHOW_AUTHOR_DESC="If set to Show, the Name of the
article's Author will be displayed."
JGLOBAL_SHOW_AUTHOR_LABEL="Author"
JGLOBAL_SHOW_CATEGORY_DESC="If set to Show, the title of the
article&rsquo;s category will show."
JGLOBAL_SHOW_CATEGORY_DESCRIPTION_DESC="Show or hide the description
of the selected Category."
JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL="Category Description"
JGLOBAL_SHOW_CATEGORY_HEADING_TITLE_TEXT_DESC="If Show, the
&quot;Subcategories&quot; will show as a subheading on the page.
The subheading is usually displayed inside the &quot;H3&quot;
tag."
JGLOBAL_SHOW_CATEGORY_HEADING_TITLE_TEXT_LABEL="Subcategories
Text"
JGLOBAL_SHOW_CATEGORY_IMAGE_DESC="Show or hide the image of the
selected Category."
JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL="Category Image"
JGLOBAL_SHOW_CATEGORY_LABEL="Category"
JGLOBAL_SHOW_CATEGORY_TITLE="Category Title"
JGLOBAL_SHOW_CATEGORY_TITLE_DESC="If Show, the Category Title will
show as a subheading on the page. The subheading is usually displayed
inside the &quot;H2&quot; tag."
JGLOBAL_SHOW_CREATE_DATE_DESC="If set to Show, the date and time an
Article was created will be displayed."
JGLOBAL_SHOW_CREATE_DATE_LABEL="Create Date"
JGLOBAL_SHOW_DATE_DESC="Show or hide a date column in the list of
articles, or select which date you wish to show."
JGLOBAL_SHOW_DATE_LABEL="Date"
JGLOBAL_SHOW_EMPTY_CATEGORIES_DESC="If Show, empty categories will
display. A category is only empty if it has no items or
subcategories."
JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL="Empty Categories"
JGLOBAL_SHOW_FEATURED_ARTICLES_DESC="Select to show, hide or only
display featured articles."
JGLOBAL_SHOW_FEATURED_ARTICLES_LABEL="Featured Articles"
JGLOBAL_SHOW_FEED_LINK_DESC="Show or hide an RSS Feed Link. (A Feed
Link will show up as a feed icon in the address bar of most modern
browsers)."
JGLOBAL_SHOW_FEED_LINK_LABEL="RSS Feed Link"
JGLOBAL_SHOW_FLAG_DESC="If set to 'Yes', will display
language choice as image flags. Otherwise will use the content language URL
Language Code."
JGLOBAL_SHOW_FLAG_LABEL="Use Image Flags"
JGLOBAL_SHOW_FULL_DESCRIPTION="Show full description
&hellip;"
JGLOBAL_SHOW_HEADINGS_DESC="Show or hide the headings in list
layouts."
JGLOBAL_SHOW_HEADINGS_LABEL="Table Headings"
JGLOBAL_SHOW_HITS_LABEL="Hits"
JGLOBAL_SHOW_INTRO_DESC="If set to Show, the Intro Text of the article
will show when you drill down to the article. If set to Hide, only the part
of the article after the &quot;Read More&quot; break will
show."
JGLOBAL_SHOW_INTRO_LABEL="Intro Text"
JGLOBAL_SHOW_MODIFY_DATE_DESC="If set to Show, the date and time an
Article was last modified will be displayed."
JGLOBAL_SHOW_MODIFY_DATE_LABEL="Modify Date"
JGLOBAL_SHOW_NAVIGATION_DESC="If set to Show, shows a navigation link
(Next, Previous) between articles."
JGLOBAL_SHOW_NAVIGATION_LABEL="Navigation"
JGLOBAL_SHOW_PARENT_CATEGORY_DESC="If set to Show, the title of the
article&rsquo;s parent category will show."
JGLOBAL_SHOW_PARENT_CATEGORY_LABEL="Parent Category"
JGLOBAL_SHOW_PUBLISH_DATE_DESC="If set to Show, the date and time an
Article was published will be displayed."
JGLOBAL_SHOW_PUBLISH_DATE_LABEL="Publish Date"
JGLOBAL_SHOW_READMORE_DESC="If set to Show, the Read more &hellip;
link will show if Main text has been provided for the Article."
JGLOBAL_SHOW_READMORE_LABEL="&quot;Read More&quot; Link"
JGLOBAL_SHOW_READMORE_LIMIT_DESC="Set a limit of number of characters
in Article Title to show in Read More button."
JGLOBAL_SHOW_READMORE_LIMIT_LABEL="Read More Limit (characters)"
JGLOBAL_SHOW_READMORE_TITLE_DESC="If set to show the title of the
Article will be shown on the Read More button."
JGLOBAL_SHOW_READMORE_TITLE_LABEL="Read More with Title"
JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC="Show or hide the
subcategories descriptions."
JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL="Subcategories
Descriptions"
JGLOBAL_SHOW_SUBCATEGORY_CONTENT_DESC="If None, only articles from
this category will show. If a number, all articles from the category and
the subcategories up to and including that level will show in the
blog."
JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL="Include Subcategories"
JGLOBAL_SHOW_SUBCATEGORY_HEADING="Subcategories Heading"
JGLOBAL_SHOW_TAGS_DESC="Show the tags for this link."
JGLOBAL_SHOW_TAGS_LABEL="Tags"
JGLOBAL_SHOW_TITLE_DESC="If set to Show, the article title is
shown."
JGLOBAL_SHOW_TITLE_LABEL="Title"
JGLOBAL_SHOW_UNAUTH_LINKS_DESC="If set to Yes, links to registered
content will be shown even if you are not logged-in. You will need to log
in to access the full item."
JGLOBAL_SHOW_UNAUTH_LINKS_LABEL="Unauthorised Links"
JGLOBAL_SHOW_VOTE_DESC="If set to show, a voting system will be
enabled for Articles."
JGLOBAL_SHOW_VOTE_LABEL="Voting"
JGLOBAL_SINGLE_LEVEL="Single Level"
JGLOBAL_SORT_BY="Sort Table By:"
JGLOBAL_SORTED_BY="Sorted by:"
JGLOBAL_STAGE_PROCESS="Process"
JGLOBAL_START_PUBLISH_AFTER_FINISH="Item start publishing date must be
before finish publishing date"
JGLOBAL_SUBSLIDER_BLOG_EXTENDED_LABEL="The option below gives the
ability to include articles from subcategories in the Blog layout."
JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL="If a field is left blank, global
settings will be used."
JGLOBAL_SUBSLIDER_DRILL_CATEGORIES_LABEL="These options are used when
you select one of the category links, on the first page and/or thereafter,
unless they are changed for a specific menu item."
JGLOBAL_TITLE="Title"
JGLOBAL_TITLE_ALPHABETICAL="Title Alphabetical"
JGLOBAL_TITLE_ASC="Title ascending"
JGLOBAL_TITLE_DESC="Title descending"
JGLOBAL_TITLE_REVERSE_ALPHABETICAL="Title Reverse Alphabetical"
JGLOBAL_TOGGLE_DROPDOWN="Toggle Dropdown"
JGLOBAL_TOGGLE_FEATURED="Toggle featured status"
JGLOBAL_TOP="Top"
JGLOBAL_TPL_CPANEL_LINK_TEXT="Return to Dashboard"
JGLOBAL_TYPE_OR_SELECT_CATEGORY="Type or select a Category"
JGLOBAL_TYPE_OR_SELECT_SOME_OPTIONS="Type or select some options"
JGLOBAL_TYPE_OR_SELECT_SOME_TAGS="Type or select some tags"
JGLOBAL_USE_GLOBAL="Use Global"
JGLOBAL_USE_GLOBAL_VALUE="Use Global (%s)"
JGLOBAL_USERNAME="Username"
JGLOBAL_VALIDATION_FORM_FAILED="Invalid form"
JGLOBAL_VIEW_SITE="View Site"
JGLOBAL_VOTES="Votes"
JGLOBAL_VOTES_ASC="Votes ascending"
JGLOBAL_VOTES_DESC="Votes descending"
JGLOBAL_WARNCOOKIES="Warning! Cookies must be enabled to access the
Administrator Backend."
; @deprecated 5.0 will be removed in 6.0
JGLOBAL_WARNIE="Warning! Internet Explorer should not be used for
proper operation of the Administrator Backend."
JGLOBAL_WARNJAVASCRIPT="Warning! JavaScript must be enabled for proper
operation of the Administrator Backend."
JGLOBAL_WIDTH="Width"

JGRID_HEADING_ACCESS="Access"
JGRID_HEADING_ACCESS_ASC="Access ascending"
JGRID_HEADING_ACCESS_DESC="Access descending"
JGRID_HEADING_CAPTION_ASC="%s - ascending"
JGRID_HEADING_CAPTION_DESC="%s - descending"
JGRID_HEADING_CREATED_BY="Created by"
JGRID_HEADING_ID="ID"
JGRID_HEADING_ID_ASC="ID ascending"
JGRID_HEADING_ID_DESC="ID descending"
JGRID_HEADING_LANGUAGE="Language"
JGRID_HEADING_LANGUAGE_ASC="Language ascending"
JGRID_HEADING_LANGUAGE_DESC="Language descending"
JGRID_HEADING_MENU_ITEM_TYPE="Menu Item Type"
JGRID_HEADING_ORDERING="Ordering"
JGRID_HEADING_ORDERING_ASC="Ordering ascending"
JGRID_HEADING_ORDERING_DESC="Ordering descending"

; If there is an error connecting database before initialisation,
en-GB.lib_joomla.ini can't be loaded
; we therefore have to load the strings from en-GB.ini

JLIB_DATABASE_ERROR_ADAPTER_MYSQL="The MySQL adapter 'mysql'
is not available."
JLIB_DATABASE_ERROR_ADAPTER_MYSQLI="The MySQL adapter
'mysqli' is not available."
JLIB_DATABASE_ERROR_CONNECT_DATABASE="Unable to connect to the
Database: %s."
JLIB_DATABASE_ERROR_CONNECT_MYSQL="Could not connect to MySQL."
JLIB_DATABASE_ERROR_DATABASE_CONNECT="Could not connect to
database."
JLIB_DATABASE_ERROR_LOAD_DATABASE_DRIVER="Unable to load Database
Driver: %s."

JOPTION_ACCESS_SHOW_ALL_ACCESS="Show All Access"
JOPTION_ACCESS_SHOW_ALL_GROUPS="Show All Groups"
JOPTION_ACCESS_SHOW_ALL_LEVELS="Show All Access Levels"
JOPTION_ALL_CATEGORIES="- All Categories -"
JOPTION_ANY="Any"
JOPTION_ANY_CATEGORY="Any Category"
JOPTION_DO_NOT_USE="- None Selected -"
JOPTION_FROM_COMPONENT="---From Component---"
JOPTION_FROM_MODULE="---From Module---"
JOPTION_FROM_STANDARD="---From Global Options---"
JOPTION_FROM_TEMPLATE="---From %s Template---"
JOPTION_MENUS="Menus"
JOPTION_NO_USER="- No User -"
JOPTION_OPTIONAL="Optional"
JOPTION_REQUIRED="Required"
JOPTION_SELECT_ACCESS="- Select Access -"
JOPTION_SELECT_AUTHOR="- Select Author -"
JOPTION_SELECT_AUTHOR_ALIAS="- Select Author Alias -"
JOPTION_SELECT_AUTHOR_ALIASES="- Select Author Aliases -"
JOPTION_SELECT_AUTHORS="- Select Authors -"
JOPTION_SELECT_CATEGORY="- Select Category -"
JOPTION_SELECT_EDITOR="- Select Editor -"
JOPTION_SELECT_FEATURED="- Select Featured -"
JOPTION_SELECT_IMAGE="- Select Image -"
JOPTION_SELECT_LANGUAGE="- Select Language -"
JOPTION_SELECT_MAX_LEVELS="- Select Max Levels -"
JOPTION_SELECT_MENU="- Select Menu -"
JOPTION_SELECT_MENU_ITEM="- Select Menu Item -"
JOPTION_SELECT_PUBLISHED="- Select Status -"
JOPTION_SELECT_STAGE="- Select Stage -"
JOPTION_SELECT_TAG="- Select Tag -"
JOPTION_SELECT_TEMPLATE="- Select Template -"
JOPTION_SELECT_TRANSITION="- Select Transition -"
JOPTION_UNASSIGNED="Unassigned"
JOPTION_USE_DEFAULT="- Use Default -"
JOPTION_USE_DEFAULT_MODULE_SETTING="- Use Default Module Setting
-"
JOPTION_USE_MENU_REQUEST_SETTING="- Use Menu or Request Setting
-"

JSEARCH_FILTER="Search"
JSEARCH_FILTER_CLEAR="Clear"
JSEARCH_FILTER_LABEL="Filter:"
JSEARCH_FILTER_SUBMIT="Search"
JSEARCH_RESET="Reset"
JSEARCH_TITLE="Search %s"

JTOGGLE_HIDE_SIDEBAR="Hide the sidebar"
JTOGGLE_SHOW_SIDEBAR="Show the sidebar"
JTOGGLE_SIDEBAR_LABEL="Sidebar"
JTOGGLE_SIDEBAR_MENU="Toggle Menu"

JTOOLBAR_APPLY="Save"
JTOOLBAR_ARCHIVE="Archive"
JTOOLBAR_ASSIGN="Assign"
JTOOLBAR_ASSOCIATIONS="Associations"
JTOOLBAR_BACK="Back"
JTOOLBAR_BATCH="Batch"
JTOOLBAR_BULK_IMPORT="Bulk Import"
JTOOLBAR_CANCEL="Cancel"
JTOOLBAR_CHANGE_STATUS="Actions"
JTOOLBAR_CHECKIN="Check-in"
JTOOLBAR_CLOSE="Close"
JTOOLBAR_DEFAULT="Default"
JTOOLBAR_DELETE="Delete"
JTOOLBAR_DELETE_ALL="Delete All"
JTOOLBAR_DISABLE="Disable"
JTOOLBAR_DUPLICATE="Duplicate"
JTOOLBAR_EDIT="Edit"
JTOOLBAR_EDIT_CSS="Edit CSS"
JTOOLBAR_EDIT_HTML="Edit HTML"
JTOOLBAR_EMPTY_TRASH="Empty Trash"
JTOOLBAR_ENABLE="Enable"
JTOOLBAR_EXPORT="Export"
JTOOLBAR_HELP="Help"
JTOOLBAR_INSTALL="Install"
JTOOLBAR_NEW="New"
JTOOLBAR_OPTIONS="Options"
JTOOLBAR_PUBLISH="Publish"
JTOOLBAR_PURGE_CACHE="Clear Cache"
JTOOLBAR_REBUILD="Rebuild"
JTOOLBAR_REFRESH_CACHE="Refresh Cache"
JTOOLBAR_REMOVE="Remove"
JTOOLBAR_SAVE="Save &amp; Close"
JTOOLBAR_SAVE_AND_NEW="Save &amp; New"
JTOOLBAR_SAVE_AS_COPY="Save as Copy"
JTOOLBAR_SAVE_TO_MENU="Save to Menu"
JTOOLBAR_TRASH="Trash"
JTOOLBAR_UNARCHIVE="Unarchive"
JTOOLBAR_UNINSTALL="Uninstall"
JTOOLBAR_UNPUBLISH="Unpublish"
JTOOLBAR_UNTRASH="Untrash"
JTOOLBAR_UPLOAD="Upload"
JTOOLBAR_VERSIONS="Versions"

JWARNING_ARCHIVE_MUST_SELECT="You must select at least one item to
archive."
JWARNING_DELETE_MUST_SELECT="You must select at least one item to
permanently delete."
JWARNING_PUBLISH_MUST_SELECT="You must select at least one item to
publish."
JWARNING_REMOVE_ROOT_USER="You are logged-in using the emergency Root
User setting in configuration.php.<br>You should remove $root_user
from the configuration.php as soon as you have restored control to your
site to avoid future security breaches.<br><a
href='%s'>Select here to try to do it
automatically.</a>"
JWARNING_REMOVE_ROOT_USER_ADMIN="The emergency Root User setting is
enabled for the user(id): %s.<br>You should remove $root_user from
the configuration.php as soon as you have restored control to your site to
avoid future security breaches.<br><a
href='%s'>Select here to try to do it
automatically.</a>"
JWARNING_TRASH_MUST_SELECT="You must select at least one item to
remove."
JWARNING_UNPUBLISH_MUST_SELECT="You must select at least one item to
unpublish."

; Schemaorg
JSCHEMAORG_EXTENSION_ALLOWED_DESCRIPTION="Activate this plugin only
for listed extensions. If used all other extensions are disabled."
JSCHEMAORG_EXTENSION_ALLOWED_LABEL="Allowed Extensions"
JSCHEMAORG_EXTENSION_FORBIDDEN_DESCRIPTION="Disable this plugin for
listed extensions."
JSCHEMAORG_EXTENSION_FORBIDDEN_LABEL="Forbidden Extensions"
JSCHEMAORG_FIELD_COMPONENT_SECTIONS_TEXT="%2$s"

; Workflow
JWORKFLOW="Workflow: %s"
JWORKFLOW_ENABLED_LABEL="Enable Workflow"
JWORKFLOW_EXECUTE_TRANSITION="Select the transition to execute on this
item."
JWORKFLOW_EXTENSION_FORBIDDEN_DESCRIPTION="Disable this plugin for
listed extensions."
JWORKFLOW_EXTENSION_FORBIDDEN_LABEL="Forbidden Extensions"
JWORKFLOW_EXTENSION_ALLOWED_DESCRIPTION="Activate this plugin only for
listed extensions. If used all other extensions are disabled."
JWORKFLOW_EXTENSION_ALLOWED_LABEL="Allowed Extensions"
JWORKFLOW_FIELD_COMPONENT_SECTIONS_TEXT="%1$s: %2$s"
JWORKFLOW_SHOW_TRANSITIONS_FOR_THIS_ITEM="Show the transition
selection to execute a transition on this item."
JWORKFLOW_TITLE="Workflow"

; Date format
DATE_FORMAT_CALENDAR_DATE="%Y-%m-%d"
DATE_FORMAT_CALENDAR_DATETIME="%Y-%m-%d %H:%M:%S"
DATE_FORMAT_FILTER_DATE="Y-m-d"
DATE_FORMAT_FILTER_DATETIME="Y-m-d H:i:s"
DATE_FORMAT_JS1="y-m-d"
DATE_FORMAT_LC="l, d F Y"
DATE_FORMAT_LC1="l, d F Y"
DATE_FORMAT_LC2="l, d F Y H:i"
DATE_FORMAT_LC3="d F Y"
DATE_FORMAT_LC4="Y-m-d"
DATE_FORMAT_LC5="Y-m-d H:i"
DATE_FORMAT_LC6="Y-m-d H:i:s"

; Months
JANUARY_SHORT="Jan"
JANUARY="January"
FEBRUARY_SHORT="Feb"
FEBRUARY="February"
MARCH_SHORT="Mar"
MARCH="March"
APRIL_SHORT="Apr"
APRIL="April"
MAY_SHORT="May"
MAY="May"
JUNE_SHORT="Jun"
JUNE="June"
JULY_SHORT="Jul"
JULY="July"
AUGUST_SHORT="Aug"
AUGUST="August"
SEPTEMBER_SHORT="Sep"
SEPTEMBER="September"
OCTOBER_SHORT="Oct"
OCTOBER="October"
NOVEMBER_SHORT="Nov"
NOVEMBER="November"
DECEMBER_SHORT="Dec"
DECEMBER="December"

; Days of the Week
SAT="Sat"
SATURDAY="Saturday"
SUN="Sun"
SUNDAY="Sunday"
MON="Mon"
MONDAY="Monday"
TUE="Tue"
TUESDAY="Tuesday"
WED="Wed"
WEDNESDAY="Wednesday"
THU="Thu"
THURSDAY="Thursday"
FRI="Fri"
FRIDAY="Friday"

; Localised number format
DECIMALS_SEPARATOR="."
THOUSANDS_SEPARATOR=","

; Mailer Codes
PHPMAILER_AUTHENTICATE="SMTP Error! Could not authenticate."
PHPMAILER_CONNECT_HOST="SMTP Error! Could not connect to SMTP
host."
PHPMAILER_DATA_NOT_ACCEPTED="SMTP Error! Data not accepted."
PHPMAILER_EMPTY_MESSAGE="Empty message body"
PHPMAILER_ENCODING="Unknown encoding: "
PHPMAILER_EXECUTE="Could not execute: "
PHPMAILER_EXTENSION_MISSING="Extension missing: "
PHPMAILER_FILE_ACCESS="Could not access file: "
PHPMAILER_FILE_OPEN="File Error: Could not open file: "
PHPMAILER_FROM_FAILED="The following from address failed: "
PHPMAILER_INSTANTIATE="Could not start mail function."
PHPMAILER_INVALID_ADDRESS="Invalid address"
PHPMAILER_MAILER_IS_NOT_SUPPORTED="Mailer is not supported."
PHPMAILER_PROVIDE_ADDRESS="You must provide at least one recipient
email address."
PHPMAILER_RECIPIENTS_FAILED="SMTP Error! The following recipients
failed: "
PHPMAILER_SIGNING_ERROR="Signing error: "
PHPMAILER_SMTP_CONNECT_FAILED="SMTP connect failed"
PHPMAILER_SMTP_ERROR="SMTP server error: "
PHPMAILER_TLS="Could not start TLS"
PHPMAILER_VARIABLE_SET="Can't set or reset variable: "

; Database types (allows for a more descriptive label than the internal
name)
MYSQL="MySQL (PDO)"
MYSQLI="MySQLi"
ORACLE="Oracle"
PGSQL="PostgreSQL (PDO)"
POSTGRESQL="PostgreSQL"
SQLITE="SQLite"

; Search tools
JFILTER_OPTIONS="Filter Options"
JTABLE_OPTIONS="Table Options"
JTABLE_OPTIONS_ORDERING="Order by:"

; States assets translations
ARCHIVE="Archive"
ARCHIVED="Archived"
PUBLISH="Publish"
PUBLISHED="Published"
TRASH="Trash"
TRASHED="Trashed"
UNPUBLISH="Unpublish"
UNPUBLISHED="Unpublished"
language/en-GB/com_media.ini000064400000001221151165467340011645 0ustar00;
Joomla! Project
; (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

WEBSERVICE_COM_MEDIA="Media web service"
WEBSERVICE_COM_MEDIA_MISSING_REQUIRED_PARAMETERS="Missing required
parameter(s): %s"
WEBSERVICE_COM_MEDIA_FILE_NOT_FOUND="File not found: %s"
WEBSERVICE_COM_MEDIA_FILE_EXISTS="File exists and overwriting not
requested: %s"
WEBSERVICE_COM_MEDIA_BAD_FILE_TYPE="Invalid path or file type not
allowed: %s"
WEBSERVICE_COM_MEDIA_UNSUPPORTED_PARAMETER_COMBINATION="Unexpected or
unsupported query parameter combination"
language/en-GB/install.xml000064400000001164151165467340011425
0ustar00<?xml version="1.0" encoding="UTF-8"?>
<extension client="api" type="language"
method="upgrade">
	<name>English (en-GB)</name>
	<tag>en-GB</tag>
	<version>5.1.2</version>
	<creationDate>2024-07</creationDate>
	<author>Joomla! Project</author>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<copyright>(C) 2020 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<description>en-GB api language</description>
	<files>
		<folder>/</folder>
		<filename file="meta">install.xml</filename>
	</files>
	<params />
</extension>
language/fa-IR/com_media.ini000064400000001612151165467340011657 0ustar00;
Joomla! Project
; (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
; Copyright (C) Translation 2005 - 2024 Joomla Farsi www.JoomlaFarsi.com.
All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

WEBSERVICE_COM_MEDIA="وب سرویس رسانه"
WEBSERVICE_COM_MEDIA_MISSING_REQUIRED_PARAMETERS="عدم وجود
پارامتر(های) مورد نیاز: %s"
WEBSERVICE_COM_MEDIA_FILE_NOT_FOUND="فایل پیدا نشد:
%s"
WEBSERVICE_COM_MEDIA_FILE_EXISTS="فایل وجود دارد و
بازنویسی درخواست نشده است: %s"
WEBSERVICE_COM_MEDIA_BAD_FILE_TYPE="مسیر یا نوع فایل
نامعتبر مجاز نیست: %s"
WEBSERVICE_COM_MEDIA_UNSUPPORTED_PARAMETER_COMBINATION="ترکیب
پارامتر پرس و جو غیرمنتظره یا پشتیبانی
نشده"language/fa-IR/install.xml000064400000001276151165467340011437
0ustar00<?xml version="1.0" encoding="UTF-8"?>
<extension client="api" type="language"
method="upgrade">
	<name>Persian (fa-IR)</name>
	<tag>fa-IR</tag>
	<version>5.1.2.1</version>
	<creationDate>2024-07</creationDate>
	<author>Persian Translation Team</author>
	<authorEmail>info@joomlafarsi.com</authorEmail>
	<authorUrl>www.joomlafarsi.com</authorUrl>
	<copyright>Copyright (C) 2005 - 2024 Joomlafarsi.com and Open Source
Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<description>fa-IR api language</description>
	<files>
		<folder>/</folder>
		<filename file="meta">install.xml</filename>
	</files>
	<params/>
</extension>
language/fa-IR/joomla.ini000064400000177544151165467340011245 0ustar00;
Joomla! Project
; (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
; Copyright (C) Translation 2005 - 2024 Joomla Farsi www.JoomlaFarsi.com.
All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt
; Note : All ini files need to be saved as UTF-8

; Common boolean values
; Note: YES, NO, TRUE, FALSE are reserved words in INI format.

; Keep this string on top
JERROR_PARSING_LANGUAGE_FILE="&#160;: ایراد در خط
%s"

J1="1"
J2="2"
J3="3"
J4="4"
J5="5"
J6="6"
J7="7"
J8="8"
J9="9"
J10="10"
J15="15"
J20="20"
J25="25"
J30="30"
J50="50"
J75="75"
J100="100"
J150="150"
J200="200"
J250="250"
J300="300"
J500="500"

JH1="h1"
JH2="h2"
JH3="h3"
JH4="h4"
JH5="h5"
JH6="h6"

ERROR="خطا"
INFO="اطلاعات"
MESSAGE="پیام"
NOTICE="توجه"
WARNING="هشدار"

JACTIONS="اقدامات برای: %s"
JADMINISTRATION="مدیریت"
JADMINISTRATOR="مدیر"
JALIAS="نام مستعار"
JALL="همه"
JALL_LANGUAGE="همه"
JAPI="API"
JAPPLY="ذخیره"
JARCHIVED="بایگانی شده"
JASSOCIATIONS_ASC="انجمن صعودی"
JASSOCIATIONS_DESC="انجمن نزولی"
JAUTHOR="نویسنده"
JAUTHOR_ASC="نویسنده صعودی"
JAUTHOR_DESC="نویسنده نزولی"
JCANCEL="انصراف"
JCATEGORIES="مجموعه ها"
JCATEGORY="مجموعه"
JCATEGORY_ASC="مجموعه صعودی"
JCATEGORY_DESC="مجموعه نزولی"
JCATEGORY_SPRINTF="مجموعه: %s"
JCLEAR="پاک"
JCLIENT="محل"
JCLOSE="بستن"
JCONFIG_PERMISSIONS_DESC="مجوز ها برای این
کامپوننت مگر برای مورد خاصی تغییر
کند."
JCONFIG_PERMISSIONS_LABEL="دسترسی ها"
JCURRENT="صحیح"
JDATE="تاریخ"
JDATE_ASC="تاریخ صعودی"
JDATE_DESC="تاریخ نزولی"
JDAY="روز"
JDEFAULT="پیش فرض"
JDEFAULTLANGUAGE="زبان - پیش فرض"
JDETAILS="جزئیات"
JDISABLED="غیر فعال"
JENABLED="فعال"
JFALSE="اشتباه"
JFEATURE="ویژگی"
JFEATURED="ویژه"
JFEATURED_ASC="ویژه صعودی"
JFEATURED_DESC="ویژه نزولی"
JHELP="راهنما"
JHIDE="مخفی"
JHIDEPASSWORD="رمز عبور مخفی شد"
JINVALID_TOKEN="درخواست اخیر رد شد زیرا دارای
رمز امنیتی نامعتبر بود. لطفا صفحه را
مجددا بارگذاری کرده و دوباره تلاش
کنید."
JINVALID_TOKEN_NOTICE="نشان امنیتی مطابقت نداشت.
این درخواست برای جلوگیری از هرگونه نقض
امنیتی لغو شد. لطفا دوباره تلاش کنید."
JLOGIN="ورود"
JLOGOUT="خروج"
JMENU_MULTILANG_WARNING_MISSING_MODULES="یک ماژول منوی
مدیریت برای <strong>%s</strong> وجود ندارد.
<br>یک منو و ماژول مدیریت برای مدیریت هر
زبان ایجاد کنید یا اینکه ماژول منوی
مدیریت را برای همه زبان ها منتشر کنید."
JMODIFY="ویرایش"
JMONTH="ماه"
JMONTH_PUBLISHED="ماه (منتشر شده)"
JNEVER="هرگز"
JNEXT="بعدی"
JNEXT_TITLE="مطلب بعدی: %s"
JNO="خیر"
JNONE="هیچ"
JOFF="خاموش"
JOK="تایید"
JON="روشن"
JONLY="فقط"
JOPEN="باز"
JOPTIONS="گزینه ها"
JORDERINGDISABLED="لطفاً برای فعال سازی ترتیب
مجدد، ترتیب را مرتب کنید"
JPREV="قبلی"
JPREVIOUS="قبلی"
JPREVIOUS_TITLE="مطلب قبلی: %s"
JPROTECTED="محافظت شده"
JPUBLISHED="منتشر شده"
JRECORD_NUMBER="شماره رکورد"
JREGISTER="ثبت"
JRESET="بازنشانی"
JSAVE="ذخیره و بستن"
JSELECT="انتخاب"
JSHOW="نمایش"
JSHOWPASSWORD="رمز عبور نشان داده شدش"
JSITE="سایت"
JSITEADMIN="مشتری را انتخاب کنید"
JSTAGE="صحنه"
JSTAGE_ASC="صحنه صعودی"
JSTAGE_DESC="صحنه نزولی"
JSTATUS="وضعیت"
JSTATUS_ASC="وضعیت صعودی"
JSTATUS_DESC="وضعیت نزولی"
JSUBMIT="ارسال"
JTAG="برچسب ها"
JTAG_FIELD_SELECT_DESC="برچسب مورد استفاده را
انتخاب کنید."
JTOOLBAR="نوار ابزار"
JTRASH="زباله"
JTRASHED="زباله"
JTRUE="صحیح"
JUNARCHIVE="حذف از وضعیت بایگانی"
JUNDEFINED="تعریف نشده"
JUNFEATURE="ویژه نشد"
JUNFEATURED="ویژه نشد"
JUNPROTECTED="محافظت نشد"
JUNPUBLISHED="لغو انتشار"
JVERSION="نسخه"
JVISIT_LINK="لینک را ببینید"
JVISIT_WEBSITE="سایت را ببینید"
JYEAR="سال"
JYES="بلی"

JACTION_ADMIN="پیکربندی سطوح دسترسی و گزینه
ها"
JACTION_ADMIN_GLOBAL="مدیر ارشد"
JACTION_COMPONENT_SETTINGS="تنظیمات کامپوننت"
JACTION_CREATE="ایجاد"
JACTION_DELETE="حذف"
JACTION_EDIT="ویرایش"
JACTION_EDIT_MODULE="ویرایش ماژول '%s'"
JACTION_EDITOWN="خود ویرایش"
JACTION_EDITSTATE="ویرایش حالت"
JACTION_EDITVALUE="ویرایش مقدار فیلد
سفارشی"
JACTION_EXECUTETRANSITION="انتقال را اجرا کنید"
JACTION_LOGIN_ADMIN="ورود مدیر"
JACTION_LOGIN_API="ورود به خدمات وب"
JACTION_LOGIN_OFFLINE="دسترسی آفلاین"
JACTION_LOGIN_SITE="ورود به سایت"
JACTION_MANAGE="دسترسی به رابط مدیریت"
JACTION_MANAGEWORKFLOW="گردش کارها را مدیریت
کنید"
JACTION_OPTIONS="پیکربندی گزینه ها"
JACTION_UNPUBLISH="لغو انتشار"

JBROWSERTARGET_DOWNLOAD="دریافت %s در صفحه جدید"
JBROWSERTARGET_MODAL="متوسط"
JBROWSERTARGET_NEW="در پنجره جدید باز کن"
JBROWSERTARGET_NEW_TITLE="بازکردن %s در صفحه
جدید"
JBROWSERTARGET_PARENT="در صفحه فعلی باز کنید"
JBROWSERTARGET_POPUP="در پنجره بازشو باز
کنید"

JENFORCE_2FA_REDIRECT_MESSAGE="شما مجدد هدایت شدید
زیرا برای ادامه کار باید احراز هویت دو
عاملی را تنظیم کنید."

JERROR_ALERTNOAUTHOR="شما اجازه دسترسی به این
قسمت را ندارید. در صورت نادرست بودن،
لطفاً با مدیر وب سایت تماس بگیرید."
JERROR_ALERTNOTEMPLATE="الگوی این صفحه نمایش در
دسترس نیست."
JERROR_AN_ERROR_HAS_OCCURRED="خطایی رخ داده است."
JERROR_CORE_CREATE_NOT_PERMITTED="ایجاد کردن مجاز
نیست"
JERROR_CORE_DELETE_NOT_PERMITTED="حذف کردن مجاز
نیست"
JERROR_COULD_NOT_FIND_TEMPLATE="نمی تواند الگوی
\"%s\" را پیدا کند."
JERROR_INVALID_CONTROLLER="کنترل کننده نامعتبر"
JERROR_INVALID_CONTROLLER_CLASS="کلاس کنترل کننده
نامعتبر است"
JERROR_LAYOUT_PREVIOUS_ERROR="خطای قبلی"
JERROR_LOADFILE_FAILED="خطا در بارگذاری از
فایل"
JERROR_LOADING_MENUS="ایراد در بارگذاری منو:
%s"
JERROR_LOGIN_DENIED="شما اجازه دسترسی به بخش
مدیریت این سایت را ندارید"
JERROR_NO_ITEMS_SELECTED="هیچ موردی انتخاب نشده
است."
JERROR_NOLOGIN_BLOCKED="ورود پذیرفته نشد! حساب
شما یا مسدود شده است یا هنوز آن را فعال
نکرده اید."
JERROR_SAVE_FAILED="داده ذخیره نشد. خطا: %s"
JERROR_SENDING_EMAIL="ایمیل نمی تواند ارسال
شود."
JERROR_SESSION_STARTUP="خطا در شروع نشست اتفاق
داده است."

JFIELD_ACCESS_DESC="گروه سطح دسترسی که مجاز به
مشاهده این مورد است."
JFIELD_ACCESS_LABEL="دسترسی"
JFIELD_ALIAS_DESC="نام مستعار بعنوان بخشی از
نشانی وب استافاده می شود."
JFIELD_ALIAS_LABEL="مستعار"
JFIELD_ALIAS_PLACEHOLDER="تولید خودکار از
عنوان"
JFIELD_ALT_COMPONENT_LAYOUT_DESC="استفاده از طرح نمای
کامپوننت منبع یا باز نویسی در قالب"
JFIELD_ALT_LAYOUT_LABEL="طرح"
JFIELD_ALT_PAGE_TITLE_DESC="عنوان صفحه جایگزین
اختیاری برای تنظیم که برچسب عنوان را در
خروجی HTML تغییر می دهد."
JFIELD_ALT_PAGE_TITLE_LABEL="عنوان صفحه اضافی"
JFIELD_BASIC_LOGIN_DESCRIPTION_LABEL="متن توضیحات
ورود"
JFIELD_BASIC_LOGIN_DESCRIPTION_SHOW_LABEL="توضیحات
ورود"
JFIELD_BASIC_LOGOUT_DESCRIPTION_LABEL="متن توضیحات
خروج"
JFIELD_BASIC_LOGOUT_DESCRIPTION_SHOW_LABEL="توضیحات
خروج"
JFIELD_CATEGORY_DESC="مجموعه ای که این گزینه به
آن انتساب یافته است. شما باید یک مجموعه
موجود را انتخاب کنید یا یک مجموعه جدید را
در فیلد مربوطه تایپ کرده و برای پردازش
وارد کنید."
JFIELD_COLOR_ERROR_CONVERT_HSL="امکان تبدیل مقدار HSL
وجود ندارد"
JFIELD_COLOR_ERROR_CONVERT_HUE="امکان تغییر مقدار
رنگ وجود ندارد"
JFIELD_COLOR_ERROR_NO_COLOR="مقدار رنگ موجود
نیست"
JFIELD_COLOR_ERROR_WRONG_FORMAT="فرمت اشتباه"
JFIELD_COLOR_LABEL_SLIDER_ALPHA="اسلایدر آلفا"
JFIELD_COLOR_LABEL_SLIDER_HUE="اسلایدر رنگ"
JFIELD_COLOR_LABEL_SLIDER_INPUT="مقدار رنگ انتخاب
شده"
JFIELD_COLOR_LABEL_SLIDER_LIGHT="اسلایدر روشن"
JFIELD_COLOR_LABEL_SLIDER_SATURATION="اسلایدر اشباع"
JFIELD_COLOR_SELECT="یک رنگ انتخاب کنید"
JFIELD_COLOR_TRANSPARENT="بدون رنگ، شفاف"
JFIELD_COLOR_VALUE="رنگ با مقدار هگزا دسیمال
از"
JFIELD_DISPLAY_READONLY_LABEL="نمایش برای فقط
خواندنی"
JFIELD_ENABLED_DESC="وضعیت این آیتم فعال شده
است."
JFIELD_FIELDS_CATEGORY_DESC="مجموعه ای را انتخاب
کنید که این فیلد به آن اختصاص داده شده
است."
JFIELD_LANGUAGE_DESC="به این مطلب یک زبان اختصاص
دهید."
JFIELD_LANGUAGE_LABEL="زبان"
JFIELD_LOGIN_IMAGE_DESC="انتخاب یا ارسال یک تصویر
که در صفحه ورود نمایش داده شود."
JFIELD_LOGIN_IMAGE_LABEL="نام کاربری"
JFIELD_LOGIN_REDIRECT_URL_DESC="اگر آدرس وب اینجا
وارد شود، کاربران پس از ورود به آن هدایت
می شوند.<br />آدرس باید بصورت داخلی باشد
(برای مثال: index.php?Itemid=999)."
JFIELD_LOGIN_REDIRECT_URL_LABEL="ارجاع ورود"
JFIELD_LOGOUT_IMAGE_DESC="انتخاب یا ارسال یک تصویر
که در صفحه خروج نمایش داده شود."
JFIELD_LOGOUT_IMAGE_LABEL="تصویر خروج"
JFIELD_LOGOUT_REDIRECT_PAGE_DESC="انتخاب یا ایجاد
صفحه ای که کاربر پس از خروج به آن هدایت
خواهد شد. بصورت پیش فرض به همان صفحه هدایت
می شود."
JFIELD_LOGOUT_REDIRECT_PAGE_LABEL="خروج به صفحه ارجاع
شده"
JFIELD_LOGOUT_REDIRECT_URL_DESC="اگر آدرس وب اینجا
وارد شود، کاربران پس از خروج به آن هدایت
می شوند.<br>آدرس باید بصورت داخلی باشد
(برای مثال: index.php?Itemid=999)."
JFIELD_LOGOUT_REDIRECT_URL_LABEL="ارجاع خروج"
JFIELD_MEDIA_ALT_CHECK_DESC_LABEL="تصویر تزئینی -
نیازی به توضیح نیست"
JFIELD_MEDIA_ALT_CHECK_LABEL="بدون توضیح"
JFIELD_MEDIA_ALT_LABEL="توضیحات تصویر (متن
جایگزین)"
JFIELD_MEDIA_DOWNLOAD_CHECK_DESC_LABEL="از لینک دریافت
استفاده کنید"
JFIELD_MEDIA_DOWNLOAD_CHECK_LABEL="دریافت"
JFIELD_MEDIA_DOWNLOAD_FILE="دریافت {file}" ; Do not
translate the text between the {}
JFIELD_MEDIA_EMBED_CHECK_DESC_LABEL="از عناصر اصلی
صوتی، تصویری یا شیء استفاده کنید"
JFIELD_MEDIA_EMBED_CHECK_LABEL="قراردادن"
JFIELD_MEDIA_CLASS_LABEL="کلاس تصویر"
JFIELD_MEDIA_FIGURE_CAPTION_LABEL="شرح تصویر"
JFIELD_MEDIA_FIGURE_CLASS_LABEL="کلاس شکل"
JFIELD_MEDIA_HEIGHT_LABEL="ارتفاع"
JFIELD_MEDIA_LAZY_LABEL="تصویر تنبل خواهد شد"
JFIELD_MEDIA_SUMMARY_LABEL="داده اضافی"
JFIELD_MEDIA_WIDTH_LABEL="عرض"
JFIELD_MEDIA_TITLE_LABEL="عنوان"
JFIELD_MEDIA_UNSUPPORTED="شما پلاگین {extension} را
ندارید، اما می توانید فایل {extension} را با
برچسب {tag} دریافت کنید.</a>" ; Do not translate
the text between the {}
JFIELD_META_DESCRIPTION_COUNTER="{remaining} حروف
باقیمانده از {maxlength} حروف." ; Do not translate the
text between the {}
JFIELD_META_DESCRIPTION_DESC="یک پاراگراف اختیاری
برای توصیف صفحه در خروجی HTML استفاده می
شود. این مورد به طور کلی در نتایج موتورهای
جستجو نشان داده می شود."
JFIELD_META_DESCRIPTION_LABEL="توضیحات متا"
JFIELD_META_KEYWORDS_DESC="کلید واژه های مربوط به
مطلب را وارد نمایید."
JFIELD_META_KEYWORDS_LABEL="کلید واژه های متا"
JFIELD_META_RIGHTS_DESC="مجوزهای مربوط به
محتوا."
JFIELD_META_RIGHTS_LABEL="مجوزهای محتوا"
JFIELD_METADATA_AUTHOR_DESC="نویسنده این محتوا"
JFIELD_METADATA_RIGHTS_DESC="مجوزهای انتشار برای
مطلب"
JFIELD_METADATA_RIGHTS_LABEL="مجوزها"
JFIELD_METADATA_ROBOTS_DESC="ساختار ربات ها"
JFIELD_METADATA_ROBOTS_LABEL="ربات ها"
JFIELD_MODULE_LANGUAGE_DESC="یک زبان به این ماژول
اختصاص دهید."
JFIELD_NAME_DESC="از نام برای شناسایی فیلد
استفاده می شود. این مورد را خالی بگذارید و
جوملا یک مقدار پیش فرض از عنوان را وارد می
کند."
JFIELD_NAME_LABEL="نام"
JFIELD_NAME_PLACEHOLDER="بصورت خودکار از عنوان پر
کند"
JFIELD_NOTE_DESC="یاداشت"
JFIELD_NOTE_LABEL="یادداشت"
JFIELD_OPTION_NONE="هیچ"
JFIELD_ORDERING_DESC="انتخاب ترتیب"
JFIELD_ORDERING_LABEL="ترتیب"
JFIELD_PARAMS_LABEL="گزینه ها"
JFIELD_PASSWORD_INDICATE_COMPLETE="رمز عبور پذیرفته
شد"
JFIELD_PASSWORD_INDICATE_INCOMPLETE="رمز عبور الزامات
سایت را برآورده نمی کند."
JFIELD_PASSWORD_NOT_ENOUGH_INTEGERS_N="تعداد اعداد در
رمز عبور کافی نیست. حداقل %s عدد مورد نیاز
است."
JFIELD_PASSWORD_NOT_ENOUGH_INTEGERS_N_1="تعداد اعداد در
رمز عبور کافی نیست. حداقل یک عدد مورد نیاز
است."
JFIELD_PASSWORD_NOT_ENOUGH_LOWERCASE_LETTERS_N="رمز عبور به
اندازه کافی حروف کوچک ندارد. حداقل %s حرف
موچک مورد نیاز است."
JFIELD_PASSWORD_NOT_ENOUGH_LOWERCASE_LETTERS_N_1="رمز عبور به
اندازه کافی حروف کوچک ندارد. حداقل یک حرف
کوچک مورد نیاز است."
JFIELD_PASSWORD_NOT_ENOUGH_SYMBOLS_N="رمز عبور نمادهای
کافی ندارد (مانند !@#$). حداقل %s نماد مورد
نیاز است."
JFIELD_PASSWORD_NOT_ENOUGH_SYMBOLS_N_1="رمز عبور نماد
کافی ندارد (مانند !@#$). حداقل یک نماد مورد
نیاز است."
JFIELD_PASSWORD_NOT_ENOUGH_UPPERCASE_LETTERS_N="رمز عبور به
اندازه کافی حروف بزرگ ندارد. حداقل %s حرف
بزرگ مورد نیاز است."
JFIELD_PASSWORD_NOT_ENOUGH_UPPERCASE_LETTERS_N_1="رمز عبور به
اندازه کافی حروف بزرگ ندارد. حداقل یک حرف
بزرگ مورد نیاز است."
JFIELD_PASSWORD_RULES_CHARACTERS="حروف: %d"
JFIELD_PASSWORD_RULES_DIGITS="اعداد: %d"
JFIELD_PASSWORD_RULES_LOWERCASE="حرف کوچک: %d"
JFIELD_PASSWORD_RULES_MINIMUM_REQUIREMENTS="<strong>حداقل
الزامات</strong> — %s"
JFIELD_PASSWORD_RULES_SYMBOLS="نماد: %d"
JFIELD_PASSWORD_RULES_UPPERCASE="حرف بزرگ: %d"
JFIELD_PASSWORD_SPACES_IN_PASSWORD="رمز عبور نباید در
ابتدا یا انتهای آن خالی باشد."
JFIELD_PASSWORD_TOO_LONG="رمز عبور خیلی طولانی
است. رمزهای عبور باید کمتر از 100 حرف
باشند."
JFIELD_PASSWORD_TOO_SHORT_N="رمز عبور خیلی کوتاه
است. رمز عبور باید حداقل %s حرف داشته
باشند."
JFIELD_PLG_SEARCH_ALL_DESC="موارد منتشر شده را در
جستجو بگنجانید."
JFIELD_PLG_SEARCH_ALL_LABEL="جستجو منتشر شد"
JFIELD_PLG_SEARCH_ARCHIVED_DESC="موارد بایگانی شده را
در جستجو قرار دهید."
JFIELD_PLG_SEARCH_ARCHIVED_LABEL="جستجو بایگانی
شد"
JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC="حداکثر تعداد نتایج
برای بازگشت را تنظیم می کند."
JFIELD_PLG_SEARCH_SEARCHLIMIT_LABEL="محدودیت جستجو"
JFIELD_PUBLISHED_DESC="حالت انتشار را مشخص
کنید"
JFIELD_READMORE_DESC="افزودن یک متن سفارشی به
جای ادامه مطلب"
JFIELD_READMORE_LABEL="متن ادامه مطلب"
JFIELD_SPACER_LABEL="<span
style=\"width:auto\"><hr></span>"
JFIELD_TITLE_DESC="عنوان"
JFIELD_VERSION_HISTORY_DESC="این دکمه به شما اجازه
می دهد تا نسخه های قدیمی این آیتم را در یک
پنجره باز کنید."
JFIELD_VERSION_HISTORY_LABEL="نسخه های قبل"
JFIELD_VERSION_HISTORY_SELECT="نمایش نسخه های
قبل"
JGLOBAL_ACTION_PERMISSIONS_LABEL="مجوز ها"
JGLOBAL_ADD_CUSTOM_CATEGORY="افزودن مجموعه جدید"
JGLOBAL_ALL_ARTICLE="حداکثر سطوح مطالب"
JGLOBAL_ALL_LIST="سطح حداکثر به عنوان لیست"
JGLOBAL_ALLOW_COMMENTS_DESC="اگر بله، بینندگان می
توانند نظرات مطلب را اضافه کرده و مشاهده
کنند."
JGLOBAL_ALLOW_COMMENTS_LABEL="اجازه نظر ها"
JGLOBAL_ALLOW_RATINGS_DESC="اگر بلی را انتخاب
نمایید کاربران می توانند به مطلب امتیاز
بدهند."
JGLOBAL_ALLOW_RATINGS_LABEL="اجازه امتیاز دهی"
JGLOBAL_ARCHIVE_ARTICLES_FIELD_INTROTEXTLIMIT_LABEL="محدودیت
خلاطه مطلب"
JGLOBAL_ARCHIVE_OPTIONS="گزینه های بایگانی"
JGLOBAL_ARTICLE_COUNT_DESC="نمایش یا عدم نمایش
تعداد مطالب مجموعه ها."
JGLOBAL_ARTICLE_COUNT_LABEL="تعداد مطالب"
JGLOBAL_ARTICLE_MANAGER_ORDER="ترتیب"
JGLOBAL_ARTICLE_MANAGER_REVERSE_ORDER="ترتیب معکوس"
JGLOBAL_ARTICLE_ORDER_DESC="نحوه چینش مطالب."
JGLOBAL_ARTICLE_ORDER_LABEL="ترتیب مطلب"
JGLOBAL_ARTICLES="مطالب"
JGLOBAL_ASSOC_NOT_POSSIBLE="برای تعریف انجمن، لطفا
مطمئن شوید که زبان روی 'همه' تنظیم
نشده باشد."
JGLOBAL_ASSOCIATIONS_CONTENTLANGUAGE_WARNING="برخی از موارد
مرتبط به <strong>%s</strong> زبان محتوا
اختصاص داده شده است اما این زبان محتوا
حذف شده یا حذف شده است."
JGLOBAL_ASSOCIATIONS_NEW_ITEM_WARNING="برای ایجاد انجمن
ها، ابتدا مورد را ذخیره کنید."
JGLOBAL_ASSOCIATIONS_PROPAGATE_BUTTON="تبلیغات"
JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED="انجمن های
تبلیغاتی شکست خورد. ممکن است مجبور شوید
آنها را به صورت دستی انتخاب کنید یا آنها
را ایجاد کنید."
JGLOBAL_ASSOCIATIONS_PROPAGATE_MESSAGE_ALL="همه انجمن های
موجود تنظیم شده اند."
JGLOBAL_ASSOCIATIONS_PROPAGATE_MESSAGE_NONE="هیچ گونه
تبلیغی برای انتشار وجود ندارد."
JGLOBAL_ASSOCIATIONS_PROPAGATE_MESSAGE_SOME="انجمن ها
تنظیم شده اند برای: %s"
JGLOBAL_ASSOCIATIONS_PROPAGATE_TIP="انجمن های موجود
این تبلیغ را منتشر می کند."
JGLOBAL_ASSOCIATIONS_RESET_WARNING="زبان تغییر کرده
است. اگر شما این آیتم را ذخیره کرده اید
انجمن دوباره بازسازی خواهد شد. اگر این
مورد در نظر گرفته نشد، آیتم را ببندید."
JGLOBAL_AUTH_ACCESS_DENIED="دسترسی ناممکن"
JGLOBAL_AUTH_ACCESS_GRANTED="دسترسی ممکن"
JGLOBAL_AUTH_BIND_FAILED="اتصال به سرور LDAP انجام
نشد"
JGLOBAL_AUTH_CANCEL="احراز هویت لغو شد"
JGLOBAL_AUTH_CURL_NOT_INSTALLED="Curl نصب نشده است"
JGLOBAL_AUTH_EMPTY_PASS_NOT_ALLOWED="رمز خالی مجاز
نیست"
JGLOBAL_AUTH_FAIL="احراز هویت ناموفق بود"
JGLOBAL_AUTH_FAILED="احراز هویت نشد: %s"
JGLOBAL_AUTH_INCORRECT="نام کاربری/رمز عبور
اشتباه است"
JGLOBAL_AUTH_INVALID_PASS="نام کاربری و رمز عبور
مطابقت ندارد یا هنوز حساب کاربری
ندارید."
JGLOBAL_AUTH_INVALID_SECRETKEY="کلید مخفی احراز هویت
چند عاملی نامعتبر است."
JGLOBAL_AUTH_NO_REDIRECT="هدایت به سرور انجام نشد:
%s"
JGLOBAL_AUTH_NO_USER="نام کاربری و رمز عبور
مطابقت ندارد یا هنوز حساب کاربری
ندارید."
JGLOBAL_AUTH_NOT_CONNECT="اتصال به سرویس احراز
هویت امکان پذیر نیست."
JGLOBAL_AUTH_NOT_CREATE_DIR="نمی تواند پوشه FileStore %s
را ایجاد کند. لطفا مجوزهای موثر را بررسی
کنید."
JGLOBAL_AUTH_PASS_BLANK="LDAP نمی تواند رمز خالی
داشته باشد"
JGLOBAL_AUTH_UNKNOWN_ACCESS_DENIED="نتیجه ناشناخته
است. دسترسی رد شد"
JGLOBAL_AUTH_USER_NOT_FOUND="کاربر پیدا نشد."
JGLOBAL_AUTHOR_ALPHABETICAL="نویسنده بر اساس حروف
الفبا"
JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL="نویسنده بر اساس
معکوس حروف الفبا"
JGLOBAL_AUTO="خودکار"
JGLOBAL_BATCH_MOVE_PARENT_NOT_FOUND="مقصد برای انتقال
یافت نشد."
JGLOBAL_BATCH_MOVE_ROW_NOT_FOUND="نمی تواند سطر مقصد
را برای این انتقال پیدا کند."
JGLOBAL_BATCH_PROCESS="پردازش"
JGLOBAL_BATCH_WORKFLOW_STATE_ROW_NOT_FOUND="ردیف مقصد برای
این تغییر حالت پیدا نشد."
JGLOBAL_BLOG="بلاگ"
JGLOBAL_BLOG_CLASS="کلاس مطلب"
JGLOBAL_BLOG_CLASS_LEADING="کلاس مطلب پیشرو"
JGLOBAL_BLOG_LAYOUT_OPTIONS="طرح بلاگ"
JGLOBAL_CATEGORIES_OPTIONS="مجموعه ها"
JGLOBAL_CATEGORY_LAYOUT_DESC="طرح بندی"
JGLOBAL_CATEGORY_LAYOUT_LABEL="انتخاب یک طرح"
JGLOBAL_CATEGORY_MANAGER_ORDER="ترتیب مجموعه"
JGLOBAL_CATEGORY_NOT_FOUND="مجموعه پیدا نشد"
JGLOBAL_CATEGORY_OPTIONS="مجموعه"
JGLOBAL_CATEGORY_ORDER_DESC="چینشی که مجموعه براساس
آن نمایش داده می شود."
JGLOBAL_CATEGORY_ORDER_LABEL="ترتیب مجموعه"
JGLOBAL_CENTER="وسط"
JGLOBAL_CHECK_ALL="بررسی همه موارد"
JGLOBAL_CHOOSE_CATEGORY_DESC="انتخاب یا ایجاد یک
مجموعه که نمایش داده شده است"
JGLOBAL_CHOOSE_CATEGORY_LABEL="انتخاب یک مجموعه"
JGLOBAL_CHOOSE_COMPONENT_DESC="یک کامپوننت از لیست
انتخاب کنید."
JGLOBAL_CHOOSE_COMPONENT_LABEL="انتخاب یک
کامپوننت"
JGLOBAL_CLICK_TO_SORT_THIS_COLUMN="مرتب سازی بر اساس
این ستون، عنوان ستون را انتخاب کنید"
JGLOBAL_CLICK_TO_TOGGLE_STATE="آیکون را انتخاب کنید
تا حالت عوض شود"
JGLOBAL_CONFIRM_DELETE="آیا مطمئن هستید که می
خواهید حذف کنید؟ در صورت تایید بلافاصه
آیتم انتخاب شده حذف خواهد شد."
JGLOBAL_COPY="(رونوشت)"
JGLOBAL_CREATED="ایجاد شده"
JGLOBAL_CREATED_DATE="تاریخ ایجاد"
JGLOBAL_CUSTOM_CATEGORY="مجموعه های جدید"
JGLOBAL_CUSTOM_FIELDS_ENABLE_DESC="فعال کردن ایجاد
فیلدهای سفارشی"
JGLOBAL_CUSTOM_FIELDS_ENABLE_LABEL="فیلدهای سفارشی
فعال شد"
JGLOBAL_DATE_FORMAT_DESC="فرمت دلخواه برای نمایش
تاریخ. برای مثال، D M Y برای روز ماه سال یا
شما می توانید بصورت d-m-y برای نسخه کوتاه
استفاده کنید برای مثال. 28-12-16. ببینید
https://php.net/date. اگر فیلد خالی باشد، متغیر
DATE_FORMAT_LC1 از فایل زبان شما استفاه خواهد
شد."
JGLOBAL_DATE_FORMAT_LABEL="فرمت تاریخ"
JGLOBAL_DESCRIPTION="توضیحات"
JGLOBAL_DISPLAY_NUM="نمایش #"
JGLOBAL_DISPLAY_SELECT_DESC="نمایش یا عدم نمایش
انتخاب لیست کشویی ."
JGLOBAL_DISPLAY_SELECT_LABEL="انتخاب نمایش"
JGLOBAL_EDIT_ITEM="ویرایش گزینه"
JGLOBAL_EDIT_PREFERENCES="ویرایش تنظیمات"
JGLOBAL_EMAIL="ایمیل"
JGLOBAL_EMAIL_DOMAIN_NOT_ALLOWED="دامنه ایمیل
<strong>%s</strong> مجاز نیست. لطفا آدرس
ایمیل دیگری وارد کنید."
JGLOBAL_EMPTY_CATEGORIES_DESC="نمایش یا عدم نمایش
مجموعه هایی که مطلب یا زیر مجموعه
ندارند."
JGLOBAL_EMPTY_CATEGORIES_LABEL="مجموعه های خالی"
JGLOBAL_ERROR_INSUFFICIENT_BATCH_INFORMATION="اطلاعات برای
انجام عملیات دسته جمعی کافی نیست"
JGLOBAL_FEED_SHOW_READMORE_DESC="نمایش &quot;ادامه
مطلب&quot; در لینک خبرخوان در صورتیکه
برای نمایش تنظیم شده باشد."
JGLOBAL_FEED_SHOW_READMORE_LABEL="&quot;ادامه
مطلب&quot; لینک"
JGLOBAL_FEED_SUMMARY_DESC="اگر روی متن معرفی تنظیم
شده باشد، فقط متن معرفی هر مطلب در فید
خبری نشان داده می شود. اگر روی تمام متن
تنظیم شود، کل مطلب در فید خبری نشان داده
می شود."
JGLOBAL_FEED_SUMMARY_LABEL="شامل خبرخوان"
JGLOBAL_FEED_TITLE="خبر خوان ها"
JGLOBAL_FIELD_ADD="افزودن"
JGLOBAL_FIELD_CATEGORIES_CHOOSE_CATEGORY_DESC="مجموعه هایی
که در این مجموعه قرار دارند نمایش داده می
شوند."
JGLOBAL_FIELD_CATEGORIES_CHOOSE_CATEGORY_LABEL="مجموعه سطح
بالا را انتخاب کنید"
JGLOBAL_FIELD_CATEGORIES_DESC_DESC="اگر متنی را در این
فیلد وارد کنید، درصورت داشتن متن،
جایگزین توضیحات مجموعه سطح بالا می
شود."
JGLOBAL_FIELD_CATEGORIES_DESC_LABEL="توضیحات دیگر"
JGLOBAL_FIELD_CREATED_BY_ALIAS_DESC="به جای نام کاربری
که مورد را ایجاد کرده است، یک نام مستعار
وارد کنید تا نمایش داده شود."
JGLOBAL_FIELD_CREATED_BY_ALIAS_LABEL="ایجاد شده توسط
نام مستعار"
JGLOBAL_FIELD_CREATED_BY_DESC="چه کاربری این را
ایجاد کرده است"
JGLOBAL_FIELD_CREATED_BY_LABEL="ایجاد توسط"
JGLOBAL_FIELD_CREATED_DESC="تاریخ ایجاد"
JGLOBAL_FIELD_CREATED_LABEL="تاریخ ایجاد"
JGLOBAL_FIELD_FIELD_CACHETIME_DESC="مدت زمان باز سازی
مجدد ذخیره ساز را بر حسب دقیقه وارد
نمایید."
JGLOBAL_FIELD_FIELD_ORDERING_DESC="موارد مرتب شده
نمایش داده می شود."
JGLOBAL_FIELD_FIELD_ORDERING_LABEL="ترتیب"
JGLOBAL_FIELD_GROUPS="گروه های فیلد"
JGLOBAL_FIELD_ID_DESC="شماره رکورد در پایگاه
داده"
JGLOBAL_FIELD_ID_LABEL="شناسه"
JGLOBAL_FIELD_LAYOUT_DESC="طرح پیش فرض برای
استفاده در آیتم ها"
JGLOBAL_FIELD_LAYOUT_LABEL="انتخاب یک طرح"
JGLOBAL_FIELD_MODIFIED_BY_DESC="کاربری که آخرین
اصلاح را انجام داده است."
JGLOBAL_FIELD_MODIFIED_BY_LABEL="ویرایش شده توسط"
JGLOBAL_FIELD_MODIFIED_LABEL="تاریخ ویرایش"
JGLOBAL_FIELD_MOVE="انتقال"
JGLOBAL_FIELD_MOVE_DOWN="حرکت به پایین"
JGLOBAL_FIELD_MOVE_UP="حرکت به بالا"
JGLOBAL_FIELD_NUM_CATEGORY_ITEMS_DESC="تعداد مجموعه
برای نمایش در هر سطح"
JGLOBAL_FIELD_NUM_CATEGORY_ITEMS_LABEL="تعداد مجموعه
ها"
JGLOBAL_FIELD_PUBLISH_DOWN_DESC="یک تاریخ اختیاری
برای خاتمه انتشار"
JGLOBAL_FIELD_PUBLISH_DOWN_LABEL="پایان انتشار"
JGLOBAL_FIELD_PUBLISH_UP_DESC="یک تاریخ اختیاری برای
شروع انتشار"
JGLOBAL_FIELD_PUBLISH_UP_LABEL="شروع انتشار"
JGLOBAL_FIELD_REMOVE="حذف"
JGLOBAL_FIELD_SHOW_BASE_DESCRIPTION_DESC="توصیف مجموعه
سطح بالا را نمایش دهید یا به جای آن، متن
قسمت توضیحات موجود در آیتم منو را جایگزین
کنید. اگر از ریشه به عنوان مجموعه سطح بالا
استفاده می کنید، قسمت توضیحات باید پر
شود."
JGLOBAL_FIELD_SHOW_BASE_DESCRIPTION_LABEL="توضیحات مجموعه
سطح بالا"
JGLOBAL_FIELD_VERSION_NOTE_DESC="یک یادداشت اختیاری
برای این نسخه از آیتم وارد کنید."
JGLOBAL_FIELD_VERSION_NOTE_LABEL="یادداشت نسخه"
JGLOBAL_FIELDS="فیلدها"
JGLOBAL_FIELDS_TITLE="فیلدهای سفارش"
JGLOBAL_FIELDSET_ADVANCED="پیشرفته"
JGLOBAL_FIELDSET_ASSOCIATIONS="پیوستگی ها"
JGLOBAL_FIELDSET_BASIC="گزینه ها"
JGLOBAL_FIELDSET_CONTENT="محتوا"
JGLOBAL_FIELDSET_DESCRIPTION="توضیحات"
JGLOBAL_FIELDSET_DISPLAY_OPTIONS="نمایش"
JGLOBAL_FIELDSET_GLOBAL="گزینه های اصلی"
JGLOBAL_FIELDSET_IMAGE_OPTIONS="تصاویر"
JGLOBAL_FIELDSET_INTEGRATION="ادغام"
JGLOBAL_FIELDSET_METADATA_OPTIONS="داده های متا"
JGLOBAL_FIELDSET_OPTIONS="گزینه ها"
JGLOBAL_FIELDSET_PUBLISHING="انتشار"
JGLOBAL_FILTER_ATTRIBUTES_DESC="3. لیست ویژگی های
اضافی، جدا کردن هر نام ویژگی با فاصله یا
کاما. برای مثال: <em>class,title,id</em>."
JGLOBAL_FILTER_ATTRIBUTES_LABEL="خصوصیت فیلتر
<sup>3</sup>"
JGLOBAL_FILTER_CLIENT="- انتخاب موقعیت -"
JGLOBAL_FILTER_FIELD_DESC="نمایش یا عدم نمایش فیلد
فیلتر برای لیست."
JGLOBAL_FILTER_FIELD_LABEL="فیلد فیلتر"
JGLOBAL_FILTER_GROUPS_DESC="این گروه های کاربری را
که می خواهید فیلترها روی آنها اعمال شود
تنظیم می کند. سایر گروه ها فیلترینگ انجام
نمی دهند."
JGLOBAL_FILTER_GROUPS_LABEL="گروه های فیلتر"
JGLOBAL_FILTER_TAGS_DESC="2. لیست برچسب های اضافی
که می توانید آنها را با کاما انگلیسی یا
فاصله از یکدیگر جدا نمایید. برای مثال:
<i>p,div,span</i>"
JGLOBAL_FILTER_TAGS_LABEL="فیلتر برچسب
ها<sup>2</sup>"
JGLOBAL_FILTER_TYPE_DESC="<p>1. لیست ممنوعه به
همه موارد و برچسب ها به جز موارد ذکر شده
اجازه می دهد.<br><strong>--</strong> برچسب
های فهرست پیش فرض ممنوع شامل: 'applet',
'body', 'bgsound', 'base',
'basefont', 'canvas', 'embed',
'frame', 'frameset', 'head',
'html', 'id', 'iframe', 'ilayer',
'layer', 'link', 'meta', 'name',
'object', 'script', 'style',
'title', 'xml'<br><strong>--</strong>
ویژگی های لیست پیش فرض ممنوع شامل:
'action', 'background', 'codebase',
'dynsrc', 'lowsrc',
'formaction'<br><strong>--</strong> می
توانید با افزودن به فیلدهای برچسب های
فیلتر و ویژگی های فیلتر، جدا کردن هر
برچسب یا برچسب ها و ویژگی های اضافی را
ممنوع کنید. نام ویژگی با
کاما.<br><strong>--</strong> لیست ممنوعه
سفارشی به شما امکان می دهد فهرست پیش فرض
ممنوعه را لغو کنید. برچسب ها و ویژگی هایی
را که باید ممنوع شوند در فیلدهای برچسب ها
و ویژگی های فیلتر اضافه
کنید.</p><p>فهرست مجاز فقط برچسب های
فهرست شده در فیلدهای برچسب های فیلتر و
ویژگی های فیلتر را مجاز می
کند.</p><p>بدون حذف HTML همه برچسب های
HTML از محتوا هنگام ذخیره
شدن.</p><p>طفاً توجه داشته باشید که
این تنظیمات صرف نظر از ویرایشگری که از آن
استفاده می کنید، کار می کند.<br>حتی اگر
از ویرایشگر WYSIWYG استفاده می کنید، تنظیمات
فیلتر ممکن است برچسب ها و ویژگی های اضافی
را قبل از ذخیره اطلاعات در پایگاه داده
حذف کند.</p>"
JGLOBAL_FILTER_TYPE_LABEL="نوع
فیلتر<sup>1</sup>"
JGLOBAL_FILTERED_BY="فیلتر شده بوسیله:"
JGLOBAL_FULL_TEXT="متن کامل"
JGLOBAL_GT="&gt;"
JGLOBAL_HISTORY_LIMIT_OPTIONS_DESC="حداکثر تعداد نسخه
های قدیمی موارد برای ذخیره. اگر صفر باشد،
تمام نسخه های قدیمی ذخیره می شوند."
JGLOBAL_HISTORY_LIMIT_OPTIONS_LABEL="حداکثر نسخه ها"
JGLOBAL_HITS="کلیک ها"
JGLOBAL_HITS_ASC="کلیک ها صعودی"
JGLOBAL_HITS_DESC="کلیک ها نزولی"
JGLOBAL_INHERIT="ارث بری"
JGLOBAL_INTEGRATION_LABEL="مجتمع سازی"
JGLOBAL_INTRO_TEXT="متن مقدمه"
JGLOBAL_ISFREESOFTWARE="%s یک نرم افزار رایگان تحت
نظر <a href=\"https://www.gnu.org/licenses/gpl-2.0.html\"
target=\"_blank\" rel=\"noopener noreferrer\">GNU
General Public License</a> منتشر می شود. جوملا
فارسی توسط <a href=\"https://www.joomlafarsi.com\"
target=\"_blank\" rel=\"noopener
noreferrer\">جومـلا فارسی</a> ترجمه شده
است."
JGLOBAL_ITEM_FEATURE="مورد ویژه"
JGLOBAL_ITEM_UNFEATURE="مورد ویژه نشده"
JGLOBAL_JOOA11Y="بررسی دسترسی"
JGLOBAL_KEEP_TYPING="به تایپ کردن ادامه دهید
&hellip;"
JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM="بسته زبان با این
نسخه جوملا سازگار نیست. بعضی رشته ها ممکن
است اشتباه باشند و به زبان انگلیسی نمایش
داده شوند."
JGLOBAL_LEARN_MORE="بیشتر بدانید"
JGLOBAL_LEAST_HITS="حداقل بازدیدها"
JGLOBAL_LEFT="چپ"
JGLOBAL_LINK_AUTHOR_LABEL="پیوند به صفحه تماس
نویسنده"
JGLOBAL_LINK_CATEGORY_DESC="اگر بلی تنظیم شده باشد،
و نمایش مجموعه روی 'نمایش' تنظیم شده
باشد، عنوان مجموعه به حالت مطالب نمایش
داده شده در مجموعه پیوند خواهد خورد."
JGLOBAL_LINK_CATEGORY_LABEL="لینک مجموعه"
JGLOBAL_LINK_PARENT_CATEGORY_DESC="اگر بلی انتخاب شود
نام مجموعه اصلی به همان مجموعه لینک می
شود ."
JGLOBAL_LINK_PARENT_CATEGORY_LABEL="لینک مجموعه
اصلی"
JGLOBAL_LINKED_INTRO_IMAGE_LABEL="پیوند تصویر
معرفی"
JGLOBAL_LINKED_TITLES_DESC="اگر روی بله تنظیم شود،
عنوان مقاله به مقاله پیوند خواهد بود."
JGLOBAL_LINKED_TITLES_LABEL="عناوین پیوند شده"
JGLOBAL_LIST="لیست"
JGLOBAL_LIST_ALIAS="(مستعار: %s)"
JGLOBAL_LIST_ALIAS_NOTE="(<span>مستعار</span>: %s,
<span>یادداشت</span>: %s)"
JGLOBAL_LIST_AUTHOR_DESC="نمایش یا عدم نمایش نام
نویسنده در لیست مطالب."
JGLOBAL_LIST_AUTHOR_LABEL="نمایش نویسنده در
لیست"
JGLOBAL_LIST_HITS_DESC="نمایش یا عدم نمایش تعداد
بازدیدهای مطالب در لیست مطالب."
JGLOBAL_LIST_HITS_LABEL="نمایش بازدید در لیست"
JGLOBAL_LIST_LAYOUT_OPTIONS="طرح های لیست"
JGLOBAL_LIST_LIMIT="تعداد موارد را در هر صفحه
انتخاب کنید."
JGLOBAL_LIST_NAME="(<span>نام</span>: %s)"
JGLOBAL_LIST_NAME_NOTE="(<span>نام</span>: %s,
<span>یادداشت</span>: %s)"
JGLOBAL_LIST_NOTE="(<span>یادداشت</span>:
%s)"
JGLOBAL_LIST_RATINGS_DESC="نمایش رتبه های مطلب در
لیست مطالب."
JGLOBAL_LIST_RATINGS_LABEL="نمایش رتبه ها در
لیست"
JGLOBAL_LIST_TITLE_DESC="نمایش یا عدم نمایش عنوان
مجموعه در لیست مجموعه ها."
JGLOBAL_LIST_TITLE_LABEL="عنوان مجموعه"
JGLOBAL_LIST_VOTES_DESC="نمایش رای به مطلب در لیست
مطالب."
JGLOBAL_LIST_VOTES_LABEL="نمایش رای در لیست"
JGLOBAL_LOOKING_FOR="به دنبال"
JGLOBAL_LT="&lt;"
JGLOBAL_MAXIMUM_CATEGORY_LEVELS_DESC="تعداد سطح زیر
مجموعه ها برای نمایش."
JGLOBAL_MAXIMUM_CATEGORY_LEVELS_LABEL="سطوح زیر مجموعه
ها"
JGLOBAL_MAXIMUM_UPLOAD_SIZE_LIMIT="حداکثر اندازه
بارگذاری: <strong>%s</strong>"
JGLOBAL_MAXLEVEL_DESC="حداکثر سطح زیرمجموعه برای
نمایش."
JGLOBAL_MAXLEVEL_LABEL="سطوح زیر مجموعه ها"
JGLOBAL_MENU_SELECTION="انتخاب منو:"
JGLOBAL_MODIFIED="ویرایش شده"
JGLOBAL_MODIFIED_DATE="تاریخ ویرایش شده"
JGLOBAL_MOST_HITS="بیشترین بازدید"
JGLOBAL_MOST_RECENT_FIRST="جدید ترین اول"
JGLOBAL_MULTI_LEVEL="چند سطحی"
JGLOBAL_NAME_ASC="نام صعودی"
JGLOBAL_NAME_DESC="نام نزولی"
JGLOBAL_NEWITEMSFIRST_DESC="موارد جدید به طور پیش
فرض در موقعیت اول قرار دارند. پس از ذخیره
این مورد، مرتب سازی قابل تغییر است."
JGLOBAL_NEWITEMSLAST_DESC="موارد جدید به طور پیش
فرض در آخرین موقعیت قرار دارند. پس از
ذخیره این مورد، مرتب سازی قابل تغییر
است."
JGLOBAL_NO_ITEM_SELECTED="هیچ موردی انتخاب نشده
است"
JGLOBAL_NO_MATCHING_RESULTS="هیچ نتیجه ای مطابقت
ندارد"
JGLOBAL_NO_ORDER="بدون ترتیب"
JGLOBAL_NONAPPLICABLE="N/A"
JGLOBAL_NUM_INTRO_ARTICLES_DESC="تعداد مطالب کوتاه
جهت نمایش در ستون ها."
JGLOBAL_NUM_INTRO_ARTICLES_LABEL="# مطالب مقدمه"
JGLOBAL_NUM_LEADING_ARTICLES_DESC="تعداد مطالب به صورت
کامل."
JGLOBAL_NUM_LEADING_ARTICLES_LABEL="# مطالب برجسته"
JGLOBAL_NUM_LINKS_DESC="تعداد مطالب به صورت
لینک."
JGLOBAL_NUM_LINKS_LABEL="# لینک ها"
JGLOBAL_NUMBER_CATEGORY_ITEMS_DESC="اگر نمایش انتخاب
شود تعداد مطالب داخل مجموعه نمایش داده می
شود."
JGLOBAL_NUMBER_CATEGORY_ITEMS_LABEL="نمایش تعداد
مطالب"
JGLOBAL_NUMBER_ITEMS_LIST_DESC="نمایش پیش فرض تعداد
مطالب."
JGLOBAL_NUMBER_ITEMS_LIST_LABEL="# مطالب در  لیست"
JGLOBAL_OLDEST_FIRST="قدیمی ترها در اولویت"
JGLOBAL_OPENS_IN_A_NEW_WINDOW="در یک پنجره جدید باز
می شود"
JGLOBAL_ORDER_ASCENDING="صعودی"
JGLOBAL_ORDER_DESCENDING="نزولی"
JGLOBAL_ORDER_DIRECTION_DESC="مرتب کردن ترتیب نزولی
از بالاترین به کمترین است. صعودی پایین
ترین تا بالاترین است."
JGLOBAL_ORDER_DIRECTION_LABEL="جهت"
JGLOBAL_ORDERING="ترتیب مطلب"
JGLOBAL_ORDERING_DATE_DESC="اگر مطالب بر اساس تاریخ
مرتب شده اند، از کدام تاریخ استفاده
کنید."
JGLOBAL_ORDERING_DATE_LABEL="تاریخ مرتب سازی"
JGLOBAL_OTPMETHOD_NONE="غیرفعال کردن احراز هویت
چند عاملی"
JGLOBAL_PAGINATION_DESC="نمایش یا پنهان کردن
پشتیبانی صفحه بندی. صفحه بندی پیوندهای
صفحه را در انتهای صفحه ارائه می دهد و به
کاربر اجازه می دهد تا به صفحات اضافی
دسترسی داشته باشد. در صورتی که اطلاعات در
یک صفحه قرار نگیرند، این موارد مورد نیاز
است."
JGLOBAL_PAGINATION_LABEL="صفحه بندی"
JGLOBAL_PAGINATION_RESULTS_DESC="نمایش یا عدم نمایش
نتایج صفحه بندی، برای مثال، &quot;صفحه 1
از 4&quot;."
JGLOBAL_PAGINATION_RESULTS_LABEL="نتایج صفحه
گذاری"
JGLOBAL_PASSWORD="رمز عبور"
JGLOBAL_PASSWORD_RESET_REQUIRED="قبل از ادامه کار،
باید رمز عبور خود را تغییر دهید."
JGLOBAL_PERMISSIONS_ANCHOR="تعیین اجازه"
JGLOBAL_PREVIEW="نمایش"
JGLOBAL_PREVIEW_POSITION="<span>موقعیت:</span>
%s"
JGLOBAL_PREVIEW_STYLE="<span>حالت:</span> %s"
JGLOBAL_PUBLISHED_DATE="تاریخ انتشار"
JGLOBAL_RANDOM_ORDER="ترتیب تصادفی"
JGLOBAL_RATINGS="رتبه ها"
JGLOBAL_RATINGS_ASC="رتبه ها صعودی"
JGLOBAL_RATINGS_DESC="رتبه ها نزولی"
JGLOBAL_RECORD_HITS_DISABLED="ضبط بازدیدها غیرفعال
است."
JGLOBAL_RECORD_HITS_LABEL="ذخیره بازدیدها"
JGLOBAL_RECORD_NUMBER="ثبت  شناسه: %d"
JGLOBAL_REMEMBER_ME="مرا به خاطر بسپار"
JGLOBAL_REPEATABLE_FIELDS_TABLE_CAPTION="فیلد های قابل
تکرار"
JGLOBAL_REVERSE_ORDERING="ترتیب معکوس مطالب"
JGLOBAL_RIGHT="راست"
JGLOBAL_ROOT="ریشه"
JGLOBAL_ROOT_PARENT="- بدون منشاء -"
JGLOBAL_SAVE_HISTORY_OPTIONS_DESC="نسخه های قدیمی را
بصورت خودکار ذخیره کند. اگر بلی تنظیم
شود، نسخه های قدیمی بصورت خودکار ذخیره
خواهند شد. هنگام ویرایش ممکن است بخواهید
نسخه های قدیمی را بازیابی کنید."
JGLOBAL_SAVE_HISTORY_OPTIONS_LABEL="فعال کردن نسخه
ها"
JGLOBAL_SECRETKEY="کلید امنیتی"
JGLOBAL_SECRETKEY_HELP="اگر احراز هویت چند عاملی
را در حساب کاربری خود فعال کرده اید، لطفا
کلید مخفی خود را وارد کنید. اگر نمی دانید
این به چه معناست، می توانید این قسمت را
خالی بگذارید."
JGLOBAL_SEF_NOIDS_DESC="شناسه ها را از آدرس های
اینترنتی این کامپوننت حذف کنید."
JGLOBAL_SEF_NOIDS_LABEL="شناسه ها را از آدرس های
اینترنتی حذف کنید"
JGLOBAL_SEF_TITLE="مسیریابی"
JGLOBAL_SELECT_ALLOW_DENY_GROUP="تغییر %s اجازه برای %s
گروه."
JGLOBAL_SELECT_AN_OPTION="یک گزینه را انتخاب
کنید"
JGLOBAL_SELECT_NO_RESULTS_MATCH="نتایج مطابق نبود"
JGLOBAL_SELECT_PRESS_TO_SELECT="برای انتخاب فشار
دهید"
JGLOBAL_SELECT_SOME_OPTIONS="برخی از گزینه ها را
انتخاب کنید"
JGLOBAL_SELECTED_UPLOAD_FILE_SIZE="اندازه فایل را
انتخاب کنید: <strong>%s</strong>"
JGLOBAL_SELECTION_ALL="انتخاب همه"
JGLOBAL_SELECTION_INVERT="برگرداندن انتخاب"
JGLOBAL_SELECTION_INVERT_ALL="برگرداندن همه انتخاب
ها"
JGLOBAL_SELECTION_NONE="حذف انتخاب شده ها"
JGLOBAL_SHOW_ASSOCIATIONS_DESC="فقط چند زبانه. اگر
روی نمایش تنظیم شده باشد، پرچم نشان داده
می شود یا اینکه کد زبان نشان داده خواهد
شد."
JGLOBAL_SHOW_ASSOCIATIONS_LABEL="انجمن ها"
JGLOBAL_SHOW_AUTHOR_DESC="اگر روی نمایش تنظیم شود،
نام نویسنده مقاله نمایش داده می شود."
JGLOBAL_SHOW_AUTHOR_LABEL="نمایش نویسنده"
JGLOBAL_SHOW_CATEGORY_DESC="اگر نمایش باشد، عنوان
مجموعه ی مقاله نمایش داده خواهد شد."
JGLOBAL_SHOW_CATEGORY_DESCRIPTION_DESC="نمایش یا عدم
نمایش توضیحات مجموعه."
JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL="توضیحات
مجموعه"
JGLOBAL_SHOW_CATEGORY_HEADING_TITLE_TEXT_DESC="اگر نمایش
&quot;زیرمجموعه ها&quot; انتخاب شده باشد
در عنوان صفحه نمایش داده خواهد شد. عنوان
معمولا در داخل برچسب &quot;H3&quot; نمایش
داده خواهد شد."
JGLOBAL_SHOW_CATEGORY_HEADING_TITLE_TEXT_LABEL="متن
زیرمجموعه ها"
JGLOBAL_SHOW_CATEGORY_IMAGE_DESC="نمایش یا مخفی کردن
تصویر مجموعه انتخاب شده."
JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL="تصویر مجموعه"
JGLOBAL_SHOW_CATEGORY_LABEL="نمایش مجموعه"
JGLOBAL_SHOW_CATEGORY_TITLE="عنوان مجموعه"
JGLOBAL_SHOW_CATEGORY_TITLE_DESC="اگر نمایش انتخاب
شود عنوان مجموعه نمایش داده می شود"
JGLOBAL_SHOW_CREATE_DATE_DESC="اگر نمایش باشد، تاریخ
و زمان ایجاد یک مطلب نمایش داده خواهد
شد."
JGLOBAL_SHOW_CREATE_DATE_LABEL="نمایش تاریخ
ایجاد"
JGLOBAL_SHOW_DATE_DESC="نمایش یا پنهان کردن ستون
تاریخ در لیست مقالات، یا انتخاب تاریخ
مورد نظر برای نمایش."
JGLOBAL_SHOW_DATE_LABEL="نمایش تاریخ"
JGLOBAL_SHOW_EMPTY_CATEGORIES_DESC="در صورت نمایش،
مجموعه های خالی نمایش داده می شوند. یک
مجموعه تنها در صورتی خالی است که هیچ مورد
یا زیر مجموعه ای نداشته باشد."
JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL="مجموعه های
خالی"
JGLOBAL_SHOW_FEATURED_ARTICLES_DESC="نمایش، عدم نمایش
یا فقط نمایش مطالب برجسته انتخاب
کنید."
JGLOBAL_SHOW_FEATURED_ARTICLES_LABEL="مطالب برجسته"
JGLOBAL_SHOW_FEED_LINK_DESC="نمایش یا عدم نمایش
لینک خروجی RSS."
JGLOBAL_SHOW_FEED_LINK_LABEL="نمایش لینک خوراک"
JGLOBAL_SHOW_FLAG_DESC="اگر روی 'بلی' تنظیم
شده باشد، تصویر پرچم زبانی که برای زبان
انتخاب شده نمایش داده خواهد شد. در غیر
اینصورت آدرس محتوای زبان استفاده خواهد 
شد."
JGLOBAL_SHOW_FLAG_LABEL="استفاده از تصویر پرچم
ها"
JGLOBAL_SHOW_FULL_DESCRIPTION="نمایش همه توضیحات
&hellip;"
JGLOBAL_SHOW_HEADINGS_DESC="نمایش یا عدم نمایش طرح
بندی لیست عنوان ها."
JGLOBAL_SHOW_HEADINGS_LABEL="جدول عنوان ها"
JGLOBAL_SHOW_HITS_LABEL="نمایش بازدید"
JGLOBAL_SHOW_INTRO_DESC="اگر روی نمایش تنظیم شده
باشد، متن معرفی مطالب نمایش داده خواهد
شد. اگر مخفی تنظیم شده باشد، فقط قسمتی از
مطلب که بعد از &quot;ادامه مطلب&quot; قرار
گرفته نمایش داده خواهد شد."
JGLOBAL_SHOW_INTRO_LABEL="متن معرفی"
JGLOBAL_SHOW_MODIFY_DATE_DESC="اگر روی نمایش تنظیم
شده باشد، تاریخ و زمانی که آخرین مطلب
تغییر کرده است نمایش داده می شود."
JGLOBAL_SHOW_MODIFY_DATE_LABEL="تاریخ ویرایش"
JGLOBAL_SHOW_NAVIGATION_DESC="اگر روی نمایش تنظیم
شود، یک پیوند پیمایش (بعدی، قبلی) بین
مطالب را نشان می دهد."
JGLOBAL_SHOW_NAVIGATION_LABEL="نمایش هدایت کننده"
JGLOBAL_SHOW_PARENT_CATEGORY_DESC="اگر روی نمایش تنظیم
شود، عنوان مجموعه اصلی مطلب نشان داده می
شود."
JGLOBAL_SHOW_PARENT_CATEGORY_LABEL="مجموعه اصلی"
JGLOBAL_SHOW_PUBLISH_DATE_DESC="اگر روی نمایش تنظیم
شود، تاریخ و زمان انتشار مطلب نمایش داده
می شود."
JGLOBAL_SHOW_PUBLISH_DATE_LABEL="نمایش تاریخ
انتشار"
JGLOBAL_SHOW_READMORE_DESC="اگر نمایش انتخاب شود
&hellip; لینک ادامه مطلب نمایش داده می
شود."
JGLOBAL_SHOW_READMORE_LABEL="&quot;ادامه مطلب&quot;
پیوند"
JGLOBAL_SHOW_READMORE_LIMIT_DESC="محدودیت تعداد حروف
را در عنوان مطلب برای نمایش در دکمه ادامه
مطلب تنظیم کنید."
JGLOBAL_SHOW_READMORE_LIMIT_LABEL="ادامه مطلب حداقل
(حروف)"
JGLOBAL_SHOW_READMORE_TITLE_DESC="اگر نمایش انتخاب
شود عنوان مطلب به همراه ادامه مطلب نمایش
داده می شود."
JGLOBAL_SHOW_READMORE_TITLE_LABEL="با عنوان بیشتر
بخوانید"
JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC="نمایش یا عدم
نمایش توضیحات زیرمجموعه ها."
JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL="توضیحات
زیرمجموعه ها"
JGLOBAL_SHOW_SUBCATEGORY_CONTENT_DESC="اگر هیچ انتخاب
شود فقط مطالب این مجموعه نمایش داده می
شود. اگر یک عدد انتخاب شود همه مطالب این
مجموعه و زیر مجموعه شامل این مجموعه در
وبلاگ نمایش داده می شود."
JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL="شامل زیرمجموعه
ها"
JGLOBAL_SHOW_SUBCATEGORY_HEADING="عنوان زیر
مجموعه"
JGLOBAL_SHOW_TAGS_DESC="نمایش برچسب ها برای این
لینک"
JGLOBAL_SHOW_TAGS_LABEL="نمایش برچسب ها"
JGLOBAL_SHOW_TITLE_DESC="اگر روی نمایش تنظیم شده
باشد. عنوان مطلب نمایش داده می شود"
JGLOBAL_SHOW_TITLE_LABEL="نمایش عنوان"
JGLOBAL_SHOW_UNAUTH_LINKS_DESC="اگر بلی باشد، لینک ها
به مطلب ثبت شده نمایش داده می شوند حتی 
اگر شما وارد نشده باشید. شما باید وارد
شوید تا به گزینه دسترسی کامل داشته
باشید."
JGLOBAL_SHOW_UNAUTH_LINKS_LABEL="نمایش لینک های غیر
مجاز"
JGLOBAL_SHOW_VOTE_DESC="اگر نمایش باشد، یک سیستم
امتیاز دهی برای مطالب فعال می شود"
JGLOBAL_SHOW_VOTE_LABEL="نمایش امتیاز"
JGLOBAL_SINGLE_LEVEL="یک سطح"
JGLOBAL_SORT_BY="مرتب سازی جدول با:"
JGLOBAL_SORTED_BY="مرتب شده بر اساس:"
JGLOBAL_STAGE_PROCESS="پردازش"
JGLOBAL_START_PUBLISH_AFTER_FINISH="تاریخ شروع انتشار
مطلب باید قبل از اتمام تاریخ انتشار
باشد"
JGLOBAL_SUBSLIDER_BLOG_EXTENDED_LABEL="گزینه زیر به شما
این امکان را می دهد که مطالبی را از زیر
مجموعه ها در طرح وبلاگ قرار دهید."
JGLOBAL_SUBSLIDER_BLOG_LAYOUT_LABEL="اگر فیلدی خالی
بماند، از تنظیمات کلی استفاده می شود."
JGLOBAL_SUBSLIDER_DRILL_CATEGORIES_LABEL="این گزینه ها
زمانی استفاده می شوند که یکی از پیوندهای
دسته بندی را در صفحه اول و/یا پس از آن
انتخاب می کنید، مگر اینکه برای یک آیتم
منوی خاص تغییر کرده باشند."
JGLOBAL_TITLE="عنوان"
JGLOBAL_TITLE_ALPHABETICAL="عنوان حروف الفبا"
JGLOBAL_TITLE_ASC="عنوان صعودی"
JGLOBAL_TITLE_DESC="عنوان نزولی"
JGLOBAL_TITLE_REVERSE_ALPHABETICAL="عنوان الفبایی
معکوس"
JGLOBAL_TOGGLE_DROPDOWN="تغییر حالت کشویی"
JGLOBAL_TOGGLE_FEATURED="تغییر وضعیت ویژه"
JGLOBAL_TOP="بالا"
JGLOBAL_TPL_CPANEL_LINK_TEXT="برگشت به کنترل پنل"
JGLOBAL_TYPE_OR_SELECT_CATEGORY="یک گروه را تایپ یا
انتخاب کنید"
JGLOBAL_TYPE_OR_SELECT_SOME_OPTIONS="نوع یا برخی گزینه
ها را انتخاب کنید"
JGLOBAL_TYPE_OR_SELECT_SOME_TAGS="برخی از برچسب ها را
تایپ یا انتخاب کنید"
JGLOBAL_USE_GLOBAL="استفاده از تنظیمات
عمومی"
JGLOBAL_USE_GLOBAL_VALUE="استفاده از تنظیمات
عمومی (%s)"
JGLOBAL_USERNAME="نام کاربری"
JGLOBAL_VALIDATION_FORM_FAILED="فرم نا صحیح"
JGLOBAL_VIEW_SITE="نمایش سایت"
JGLOBAL_VOTES="رای ها"
JGLOBAL_VOTES_ASC="رای ها صعودی"
JGLOBAL_VOTES_DESC="رای ها نزولی"
JGLOBAL_WARNCOOKIES="هشدار! کوکی ها باید بمنظور
دسترسی به بخش مدیریت فعال باشند."
; @deprecated 5.0 will be removed in 6.0
JGLOBAL_WARNIE="هشدار! Internet Explorer نباید برای
عملکرد صحیح بخش مدیریت استفاده شود."
JGLOBAL_WARNJAVASCRIPT="هشدار! جاوااسکریپت باید
برای مدیریت صحیح بخش مدیریت فعال
باشند."
JGLOBAL_WIDTH="عرض"

JGRID_HEADING_ACCESS="دسترسی"
JGRID_HEADING_ACCESS_ASC="دسترسی صعودی"
JGRID_HEADING_ACCESS_DESC="دسترسی نزولی"
JGRID_HEADING_CAPTION_ASC="%s - صعودی"
JGRID_HEADING_CAPTION_DESC="%s - نزولی"
JGRID_HEADING_CREATED_BY="ایجاد شده توسط"
JGRID_HEADING_ID="شناسه"
JGRID_HEADING_ID_ASC="شناسه صعودی"
JGRID_HEADING_ID_DESC="شناسه نزولی"
JGRID_HEADING_LANGUAGE="زبان"
JGRID_HEADING_LANGUAGE_ASC="زبان صعودی"
JGRID_HEADING_LANGUAGE_DESC="زبان نزولی"
JGRID_HEADING_MENU_ITEM_TYPE="نوع گزینه منو"
JGRID_HEADING_ORDERING="ترتیب"
JGRID_HEADING_ORDERING_ASC="ترتیب صعودی"
JGRID_HEADING_ORDERING_DESC="ترتیب نزولی"

; If there is an error connecting database before initialisation,
fa-IR.lib_joomla.ini can't be loaded
; we therefore have to load the strings from fa-IR.ini

JLIB_DATABASE_ERROR_ADAPTER_MYSQL="آداپتر MySQL یعنی
'mysql'در دسترس نیست"
JLIB_DATABASE_ERROR_ADAPTER_MYSQLI="اداپتر MySQL یعنی
'mysqli' در دسترس نیست"
JLIB_DATABASE_ERROR_CONNECT_DATABASE="ناتوان در برقراری
ارتباط با پایگاه داده: %s"
JLIB_DATABASE_ERROR_CONNECT_MYSQL="نمی توان با MySQL
ارتباط برقرار نمود."
JLIB_DATABASE_ERROR_DATABASE_CONNECT="نمیتوان با پایگاه
داده ارتباط برقرار نمود"
JLIB_DATABASE_ERROR_LOAD_DATABASE_DRIVER="قادر به
فراخوانی درایور پایگاه داده نیست: %s."

JOPTION_ACCESS_SHOW_ALL_ACCESS="نمایش همه دسترسی
ها"
JOPTION_ACCESS_SHOW_ALL_GROUPS="نمایش تمام گروه
ها"
JOPTION_ACCESS_SHOW_ALL_LEVELS="نمایش تمام سطوح
دسترسی"
JOPTION_ALL_CATEGORIES="- همه مجموعه ها -"
JOPTION_ANY="همه"
JOPTION_ANY_CATEGORY="هر مجموعه ای"
JOPTION_DO_NOT_USE="- بدون انتخاب -"
JOPTION_FROM_COMPONENT="---از کامپوننت---"
JOPTION_FROM_MODULE="---از ماژول---"
JOPTION_FROM_STANDARD="---از گزینه های کلی---"
JOPTION_FROM_TEMPLATE="---از %s قالب---"
JOPTION_MENUS="منوها"
JOPTION_NO_USER="- بدون کاربر -"
JOPTION_OPTIONAL="اختیاری"
JOPTION_REQUIRED="مورد نیاز"
JOPTION_SELECT_ACCESS="- انتخاب دسترسی -"
JOPTION_SELECT_AUTHOR="- انتخاب نویسنده -"
JOPTION_SELECT_AUTHOR_ALIAS="- انتخاب نام مستعار
نویسنده -"
JOPTION_SELECT_AUTHOR_ALIASES="- انتخاب نام های
مستعار نویسنده -"
JOPTION_SELECT_AUTHORS="- انتخاب نویسنده ها -"
JOPTION_SELECT_CATEGORY="- انتخاب مجموعه -"
JOPTION_SELECT_EDITOR="- انتخاب ویرایشگر -"
JOPTION_SELECT_FEATURED="- انتخاب ویژه شده -"
JOPTION_SELECT_IMAGE="- انتخاب تصویر -"
JOPTION_SELECT_LANGUAGE="- انتخاب زبان -"
JOPTION_SELECT_MAX_LEVELS="- انتخاب سطوح بالاتر
-"
JOPTION_SELECT_MENU="- انتخاب منو -"
JOPTION_SELECT_MENU_ITEM="- انتخاب گزینه منو -"
JOPTION_SELECT_PUBLISHED="- انتخاب حالت -"
JOPTION_SELECT_STAGE="- انتخاب صحنه -"
JOPTION_SELECT_TAG="- انتخاب برچسب -"
JOPTION_SELECT_TEMPLATE="- انتخاب قالب -"
JOPTION_SELECT_TRANSITION="- انتخاب انتقال -"
JOPTION_UNASSIGNED="واگذار نشده"
JOPTION_USE_DEFAULT="- استفاده از پیش فرض -"
JOPTION_USE_DEFAULT_MODULE_SETTING="- از تنظیمات پیش
فرض ماژول استفاده کنید -"
JOPTION_USE_MENU_REQUEST_SETTING="- از منو یا درخواست
تنظیمات استفاده کنید -"

JSEARCH_FILTER="جستجو"
JSEARCH_FILTER_CLEAR="پاک کردن"
JSEARCH_FILTER_LABEL="فیلتر:"
JSEARCH_FILTER_SUBMIT="جستجو"
JSEARCH_RESET="بازنشانی"
JSEARCH_TITLE="جستجو %s"

JTOGGLE_HIDE_SIDEBAR="نوار کناری را مخفی
کنید"
JTOGGLE_SHOW_SIDEBAR="نوار کناری را نشان
دهید"
JTOGGLE_SIDEBAR_LABEL="نوار کناری"
JTOGGLE_SIDEBAR_MENU="تغییر وضعیت منو"

JTOOLBAR_APPLY="ذخیره"
JTOOLBAR_ARCHIVE="بایگانی"
JTOOLBAR_ASSIGN="اختصاص"
JTOOLBAR_ASSOCIATIONS="انجمن ها"
JTOOLBAR_BACK="برگشت"
JTOOLBAR_BATCH="دسته"
JTOOLBAR_BULK_IMPORT="وارد کردن توده ای"
JTOOLBAR_CANCEL="انصراف"
JTOOLBAR_CHANGE_STATUS="عملیات"
JTOOLBAR_CHECKIN="بررسی"
JTOOLBAR_CLOSE="بستن"
JTOOLBAR_DEFAULT="پیش فرض"
JTOOLBAR_DELETE="حذف"
JTOOLBAR_DELETE_ALL="حذف همه"
JTOOLBAR_DISABLE="غیرفعال"
JTOOLBAR_DUPLICATE="کپی کردن"
JTOOLBAR_EDIT="ویرایش"
JTOOLBAR_EDIT_CSS="ویرایش CSS"
JTOOLBAR_EDIT_HTML="ویرایش HTML"
JTOOLBAR_EMPTY_TRASH="زباله دان خالی"
JTOOLBAR_ENABLE="فعال"
JTOOLBAR_EXPORT="خروجی"
JTOOLBAR_HELP="راهنما"
JTOOLBAR_INSTALL="نصب"
JTOOLBAR_NEW="جدید"
JTOOLBAR_OPTIONS="گزینه ها"
JTOOLBAR_PUBLISH="انتشار"
JTOOLBAR_PURGE_CACHE="پاک کردن کش"
JTOOLBAR_REBUILD="بازسازی"
JTOOLBAR_REFRESH_CACHE="بازآوری کش"
JTOOLBAR_REMOVE="حذف"
JTOOLBAR_SAVE="ذخیره و بستن"
JTOOLBAR_SAVE_AND_NEW="ذخیره و جدید"
JTOOLBAR_SAVE_AS_COPY="ذخیره بصورت رونوشت"
JTOOLBAR_SAVE_TO_MENU="ذخیره در منو"
JTOOLBAR_TRASH="حذف"
JTOOLBAR_UNARCHIVE="بایگانی نشده"
JTOOLBAR_UNINSTALL="حذف"
JTOOLBAR_UNPUBLISH="منتشر نشده"
JTOOLBAR_UNTRASH="لغو حذف"
JTOOLBAR_UPLOAD="بارگذاری"
JTOOLBAR_VERSIONS="نسخه ها"

JWARNING_ARCHIVE_MUST_SELECT="شما حداقل باید یک
گزینه برای بایگانی انتخاب کنید."
JWARNING_DELETE_MUST_SELECT="شما حداقل باید یک
گزینه برای پاکسازی همیشگی انتخاب
کنید."
JWARNING_PUBLISH_MUST_SELECT="شما حداقل باید یک
گزینه برای انتشار انتخاب کنید."
JWARNING_REMOVE_ROOT_USER="شما با استفاده از
تنظیمات کاربر ریشه اضطراری در فایل
configuration.php وارد شوید.<br>شما باید $root_user
را از configuration.php به محض بدست گرفتن کنترل
وبسایت حذف کنید تا از مشکلات امنیتی آتی
جلوگیری شود.<br><a href='%s'>برای
سعی مجدد ساخت فایل اینجا را انتخاب
کنید.</a>"
JWARNING_REMOVE_ROOT_USER_ADMIN="تنظیمات کاربر ریشه
اضطراری برای کاربر (id): %s فعال
است.<br>شما باید $root_user را از configuration.php
به محض بدست گرفتن کنترل وبسایت حذف کنید
تا از مشکلات امنیتی آتی جلوگیری
شود.<br><a href='%s'>برای سعی مجدد
ساخت فایل اینجا را انتخاب کنید.</a>"
JWARNING_TRASH_MUST_SELECT="شما باید حداقل یک گزینه
را برای حذف انتخاب کنید."
JWARNING_UNPUBLISH_MUST_SELECT="شما باید حداقل یک
گزینه را برای عدم انتشار انتخاب کنید."

; Schemaorg
JSCHEMAORG_EXTENSION_ALLOWED_DESCRIPTION="این پلاگین را
فقط برای افزونه های فهرست شده فعال کنید.
در صورت استفاده، همه افزونه های دیگر
غیرفعال می شوند."
JSCHEMAORG_EXTENSION_ALLOWED_LABEL="افزونه های
مجاز"
JSCHEMAORG_EXTENSION_FORBIDDEN_DESCRIPTION="این پلاگین را
برای افزونه های فهرست شده غیرفعال
کنید."
JSCHEMAORG_EXTENSION_FORBIDDEN_LABEL="افزونه های
ممنوعه"
JSCHEMAORG_FIELD_COMPONENT_SECTIONS_TEXT="%2$s"

; Workflow
JWORKFLOW="گردش کار: %s"
JWORKFLOW_ENABLED_LABEL="گردش کار فعال"
JWORKFLOW_EXECUTE_TRANSITION="انتقال برای اجرا در
این مورد را انتخاب کنید."
JWORKFLOW_EXTENSION_FORBIDDEN_DESCRIPTION="این پلاگین را
برای افزونه های فهرست شده غیرفعال
کنید."
JWORKFLOW_EXTENSION_FORBIDDEN_LABEL="افزون های غیر
مجاز"
JWORKFLOW_EXTENSION_ALLOWED_DESCRIPTION="این پلاگین را
فقط برای افزونه های فهرست شده فعال کنید.
در صورتی که همه افزونه های استفاده شده
دیگر غیر فعال هستند."
JWORKFLOW_EXTENSION_ALLOWED_LABEL="افزونه های مجاز"
JWORKFLOW_FIELD_COMPONENT_SECTIONS_TEXT="%1$s: %2$s"
JWORKFLOW_SHOW_TRANSITIONS_FOR_THIS_ITEM="انتخاب انتقال
را برای اجرای انتقال روی این مورد نشان می
دهد."
JWORKFLOW_TITLE="گردش کار"

; Date format
DATE_FORMAT_CALENDAR_DATE="%Y-%m-%d"
DATE_FORMAT_CALENDAR_DATETIME="%Y-%m-%d %H:%M:%S"
DATE_FORMAT_FILTER_DATE="Y-m-d"
DATE_FORMAT_FILTER_DATETIME="Y-m-d H:i:s"
DATE_FORMAT_JS1="y-m-d"
DATE_FORMAT_LC="l, d F Y"
DATE_FORMAT_LC1="l, d F Y"
DATE_FORMAT_LC2="l, d F Y H:i"
DATE_FORMAT_LC3="d F Y"
DATE_FORMAT_LC4="Y-m-d"
DATE_FORMAT_LC5="Y-m-d H:i"
DATE_FORMAT_LC6="Y-m-d H:i:s"

; Months
JANUARY_SHORT="بهمن"
JANUARY="بهمن"
FEBRUARY_SHORT="اسفند"
FEBRUARY="اسفند"
MARCH_SHORT="فروردین"
MARCH="فروردین"
APRIL_SHORT="اردیبهشت"
APRIL="اردیبهشت"
MAY_SHORT="خرداد"
MAY="خرداد"
JUNE_SHORT="تیر"
JUNE="تیر"
JULY_SHORT="مرداد"
JULY="مرداد"
AUGUST_SHORT="شهریور"
AUGUST="شهریور"
SEPTEMBER_SHORT="مهر"
SEPTEMBER="مهر"
OCTOBER_SHORT="آبان"
OCTOBER="آبان"
NOVEMBER_SHORT="آذر"
NOVEMBER="آذر"
DECEMBER_SHORT="دی"
DECEMBER="دی"

; Days of the Week
SAT="ی"
SATURDAY="یکشنبه"
SUN="ش"
SUNDAY="شنبه"
MON="ج"
MONDAY="جمعه"
TUE="پ"
TUESDAY="پنجشنبه"
WED="چ"
WEDNESDAY="چهارشنبه"
THU="س"
THURSDAY="سه شنبه"
FRI="د"
FRIDAY="دوشنبه"

; Localised number format
DECIMALS_SEPARATOR="."
THOUSANDS_SEPARATOR=","

; Mailer Codes
PHPMAILER_AUTHENTICATE="خطای SMTP! احراز هویت
نشد."
PHPMAILER_CONNECT_HOST="خطای SMTP! به میزبان SMTP وصل
نشد."
PHPMAILER_DATA_NOT_ACCEPTED="خطای SMTP! داده ها
پذیرفته نشد."
PHPMAILER_EMPTY_MESSAGE="بدنه پیام خالی است"
PHPMAILER_ENCODING="رمزگذاری ناشناخته: "
PHPMAILER_EXECUTE="اجرا نشد: "
PHPMAILER_EXTENSION_MISSING="افزونه اشتباه: "
PHPMAILER_FILE_ACCESS="دسترسی به فایل امکان پذیر
نیست: "
PHPMAILER_FILE_OPEN="خطای فایل: فایل باز نمی شود:
"
PHPMAILER_FROM_FAILED="رهگیری از این آدرس با شکست
مواجه شد "
PHPMAILER_INSTANTIATE="عملکرد ایمیل شروع نشد."
PHPMAILER_INVALID_ADDRESS="آدرس نامعتبر"
PHPMAILER_MAILER_IS_NOT_SUPPORTED="Mailer پشتیبانی نمی
شود."
PHPMAILER_PROVIDE_ADDRESS="شما باید حداقل یک آدرس
ایمیل گیرنده ارائه دهید."
PHPMAILER_RECIPIENTS_FAILED="خطای SMTP! گیرندگان زیر
ناموفق بودند: "
PHPMAILER_SIGNING_ERROR="خطای ورود: "
PHPMAILER_SMTP_CONNECT_FAILED="اتصال SMTP مقدور
نیست"
PHPMAILER_SMTP_ERROR="خطای سرور SMTP: "
PHPMAILER_TLS="TLS راه اندازی نشد"
PHPMAILER_VARIABLE_SET="متغیر تنظیم یا بازنشانی
نمی شود: "

; Database types (allows for a more descriptive label than the internal
name)
MYSQL="MySQL (PDO)"
MYSQLI="MySQLi"
ORACLE="Oracle"
PGSQL="PostgreSQL (PDO)"
POSTGRESQL="PostgreSQL"
SQLITE="SQLite"

; Search tools
JFILTER_OPTIONS="گزینه های فیلتر"
JTABLE_OPTIONS="گزینه های جدول"
JTABLE_OPTIONS_ORDERING="متب سازی بر اساس:"

; States assets translations
ARCHIVE="بایگانی"
ARCHIVED="بایگانی شد"
PUBLISH="انتشار"
PUBLISHED="منتشر شد"
TRASH="حذف"
TRASHED="حذف شد"
UNPUBLISH="عدم انتشار"
UNPUBLISHED="منتشر
نشد"language/fa-IR/langmetadata.xml000064400000001613151165467340012406
0ustar00<?xml version="1.0" encoding="UTF-8"?>
<metafile client="api">
	<name>Persian (fa-IR)</name>
	<version>5.1.2.1</version>
	<creationDate>2024-07</creationDate>
	<author>Persian Translation Team</author>
	<authorEmail>info@joomlafarsi.com</authorEmail>
	<authorUrl>www.joomlafarsi.com</authorUrl>
	<copyright>Copyright (C) 2005 - 2024 Joomlafarsi.com and Open Source
Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<description><![CDATA[fa-IR api
language]]></description>
	<metadata>
		<name>Persian (fa-IR)</name>
		<nativeName>Persian (Iran)</nativeName>
		<tag>fa-IR</tag>
		<rtl>1</rtl>
		<locale>fa_IR.utf8, fa_IR.UTF-8, fa_IR, Persian_IR, Persian, fa_IR,
far_fa, fa, iran, ir, farsi_ir, iran</locale>
		<firstDay>6</firstDay>
		<weekEnd>0,6</weekEnd>
		<calendar>jalali</calendar>
	</metadata>
	<params/>
</metafile>
components/com_fields/src/Controller/GroupsController.php000064400000003564151165467340020027
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_fields
 *
 * @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\Fields\Api\Controller;

use Joomla\CMS\MVC\Controller\ApiController;

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

/**
 * The groups controller
 *
 * @since  4.0.0
 */
class GroupsController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'groups';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'groups';

    /**
     * Basic display of an item view
     *
     * @param   integer  $id  The primary key to display. Leave empty if
you want to retrieve data from the request
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayItem($id = null)
    {
        $this->modelState->set('filter.context',
$this->getContextFromInput());

        return parent::displayItem($id);
    }

    /**
     * Basic display of a list view
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayList()
    {
        $this->modelState->set('filter.context',
$this->getContextFromInput());

        return parent::displayList();
    }

    /**
     * Get extension from input
     *
     * @return string
     *
     * @since 4.0.0
     */
    private function getContextFromInput()
    {
        return $this->input->exists('context') ?
            $this->input->get('context') :
$this->input->post->get('context');
    }
}
components/com_fields/src/Controller/FieldsController.php000064400000003564151165467360017760
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_fields
 *
 * @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\Fields\Api\Controller;

use Joomla\CMS\MVC\Controller\ApiController;

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

/**
 * The fields controller
 *
 * @since  4.0.0
 */
class FieldsController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'fields';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'fields';

    /**
     * Basic display of an item view
     *
     * @param   integer  $id  The primary key to display. Leave empty if
you want to retrieve data from the request
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayItem($id = null)
    {
        $this->modelState->set('filter.context',
$this->getContextFromInput());

        return parent::displayItem($id);
    }

    /**
     * Basic display of a list view
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayList()
    {
        $this->modelState->set('filter.context',
$this->getContextFromInput());

        return parent::displayList();
    }

    /**
     * Get extension from input
     *
     * @return string
     *
     * @since 4.0.0
     */
    private function getContextFromInput()
    {
        return $this->input->exists('context') ?
            $this->input->get('context') :
$this->input->post->get('context');
    }
}
components/com_fields/src/View/Groups/JsonapiView.php000064400000005133151165467360017004
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_fields
 *
 * @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\Fields\Api\View\Groups;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\CMS\Router\Exception\RouteNotFoundException;

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

/**
 * The groups view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'typeAlias',
        'id',
        'asset_id',
        'context',
        'title',
        'note',
        'description',
        'state',
        'checked_out',
        'checked_out_time',
        'ordering',
        'params',
        'language',
        'created',
        'created_by',
        'modified',
        'modified_by',
        'access',
        'type',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'title',
        'name',
        'checked_out',
        'checked_out_time',
        'note',
        'state',
        'access',
        'created_time',
        'created_user_id',
        'ordering',
        'language',
        'fieldparams',
        'params',
        'type',
        'default_value',
        'context',
        'group_id',
        'label',
        'description',
        'required',
        'language_title',
        'language_image',
        'editor',
        'access_level',
        'author_name',
        'group_title',
        'group_access',
        'group_state',
        'group_note',
    ];

    /**
     * Execute and display a template script.
     *
     * @param   object  $item  Item
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayItem($item = null)
    {
        if ($item === null) {
            /** @var \Joomla\CMS\MVC\Model\AdminModel $model */
            $model = $this->getModel();
            $item  = $this->prepareItem($model->getItem());
        }

        if ($item->id === null) {
            throw new RouteNotFoundException('Item does not
exist');
        }

        if ($item->context !=
$this->getModel()->getState('filter.context')) {
            throw new RouteNotFoundException('Item does not
exist');
        }

        return parent::displayItem($item);
    }
}
components/com_fields/src/View/Fields/JsonapiView.php000064400000005377151165467360016745
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_fields
 *
 * @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\Fields\Api\View\Fields;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\CMS\Router\Exception\RouteNotFoundException;

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

/**
 * The fields view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'typeAlias',
        'id',
        'asset_id',
        'context',
        'group_id',
        'title',
        'name',
        'label',
        'default_value',
        'type',
        'note',
        'description',
        'state',
        'required',
        'checked_out',
        'checked_out_time',
        'ordering',
        'params',
        'fieldparams',
        'language',
        'created_time',
        'created_user_id',
        'modified_time',
        'modified_by',
        'access',
        'assigned_cat_ids',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'title',
        'name',
        'checked_out',
        'checked_out_time',
        'note',
        'state',
        'access',
        'created_time',
        'created_user_id',
        'ordering',
        'language',
        'fieldparams',
        'params',
        'type',
        'default_value',
        'context',
        'group_id',
        'label',
        'description',
        'required',
        'language_title',
        'language_image',
        'editor',
        'access_level',
        'author_name',
        'group_title',
        'group_access',
        'group_state',
        'group_note',
    ];

    /**
     * Execute and display a template script.
     *
     * @param   object  $item  Item
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayItem($item = null)
    {
        if ($item === null) {
            /** @var \Joomla\CMS\MVC\Model\AdminModel $model */
            $model = $this->getModel();
            $item  = $this->prepareItem($model->getItem());
        }

        if ($item->id === null) {
            throw new RouteNotFoundException('Item does not
exist');
        }

        if ($item->context !=
$this->getModel()->getState('filter.context')) {
            throw new RouteNotFoundException('Item does not
exist');
        }

        return parent::displayItem($item);
    }
}
components/com_contenthistory/src/Controller/HistoryController.php000064400000006330151165467360022033
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_contenthistory
 *
 * @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\Contenthistory\Api\Controller;

use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\CMS\MVC\Controller\Exception;
use Joomla\Component\Contenthistory\Administrator\Model\HistoryModel;

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

/**
 * The history controller
 *
 * @since  4.0.0
 */
class HistoryController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'history';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'history';

    /**
     * Basic display of a list view
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayList()
    {
        $this->modelState->set('type_alias',
$this->getTypeAliasFromInput());
        $this->modelState->set('type_id',
$this->getTypeIdFromInput());
        $this->modelState->set('item_id',
$this->getTypeAliasFromInput() . '.' .
$this->getItemIdFromInput());
        $this->modelState->set('list.ordering',
'h.save_date');
        $this->modelState->set('list.direction',
'DESC');

        return parent::displayList();
    }

    /**
     * Method to edit an existing record.
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function keep()
    {
        /** @var HistoryModel $model */
        $model = $this->getModel($this->contentType);

        if (!$model) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_MODEL_CREATE'));
        }

        $recordId = $this->input->getInt('id');

        if (!$recordId) {
            throw new
Exception\ResourceNotFound(Text::_('JLIB_APPLICATION_ERROR_RECORD'),
404);
        }

        $cid = [$recordId];

        if (!$model->keep($cid)) {
            throw new
Exception\Save(Text::plural('COM_CONTENTHISTORY_N_ITEMS_KEEP_TOGGLE',
\count($cid)));
        }

        return $this;
    }

    /**
     * Get item id from input
     *
     * @return string
     *
     * @since 4.0.0
     */
    private function getItemIdFromInput()
    {
        return $this->input->exists('id') ?
            $this->input->get('id') :
$this->input->post->get('id');
    }

    /**
     * Get type id from input
     *
     * @return string
     *
     * @since 4.0.0
     */
    private function getTypeIdFromInput()
    {
        return $this->input->exists('type_id') ?
            $this->input->get('type_id') :
$this->input->post->get('type_id');
    }

    /**
     * Get type alias from input
     *
     * @return string
     *
     * @since 4.0.0
     */
    private function getTypeAliasFromInput()
    {
        return $this->input->exists('type_alias') ?
            $this->input->get('type_alias') :
$this->input->post->get('type_alias');
    }
}
components/com_contenthistory/src/View/History/JsonapiView.php000064400000002525151165467360021016
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_contenthistory
 *
 * @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\Contenthistory\Api\View\History;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;

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

/**
 * The history view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'ucm_item_id',
        'ucm_type_id',
        'version_note',
        'save_date',
        'editor_user_id',
        'character_count',
        'sha1_hash',
        'version_data',
        'keep_forever',
        'editor',
    ];

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.0.0
     */
    protected function prepareItem($item)
    {
        $item->id = $item->version_id;
        unset($item->version_id);

        $item->version_data = (array)
json_decode($item->version_data, true);

        return parent::prepareItem($item);
    }
}
components/com_content/src/Helper/ContentHelper.php000064400000001533151165467360016552
0ustar00<?php

/**
 * @package     Joomla.Api
 * @subpackage  com_content
 *
 * @copyright   (C) 2020 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Content\Api\Helper;

use Joomla\CMS\Uri\Uri;

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

/**
 * Content api helper.
 *
 * @since  4.0.0
 */
class ContentHelper
{
    /**
     * Fully Qualified Domain name for the image url
     *
     * @param   string  $uri      The uri to resolve
     *
     * @return  string
     */
    public static function resolve(string $uri): string
    {
        // Check if external URL.
        if (stripos($uri, 'http') !== 0) {
            return Uri::root() . $uri;
        }

        return $uri;
    }
}
components/com_content/src/Controller/ArticlesController.php000064400000007526151165467420020523
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_content
 *
 * @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\Content\Api\Controller;

use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Helper\TagsHelper;
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;

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

/**
 * The article controller
 *
 * @since  4.0.0
 */
class ArticlesController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'articles';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'articles';

    /**
     * Article list view amended to add filtering of data
     *
     * @return  static  A BaseController object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayList()
    {
        $apiFilterInfo = $this->input->get('filter', [],
'array');
        $filter        = InputFilter::getInstance();

        if (\array_key_exists('author', $apiFilterInfo)) {
            $this->modelState->set('filter.author_id',
$filter->clean($apiFilterInfo['author'], 'INT'));
        }

        if (\array_key_exists('category', $apiFilterInfo)) {
            $this->modelState->set('filter.category_id',
$filter->clean($apiFilterInfo['category'], 'INT'));
        }

        if (\array_key_exists('search', $apiFilterInfo)) {
            $this->modelState->set('filter.search',
$filter->clean($apiFilterInfo['search'], 'STRING'));
        }

        if (\array_key_exists('state', $apiFilterInfo)) {
            $this->modelState->set('filter.published',
$filter->clean($apiFilterInfo['state'], 'INT'));
        }

        if (\array_key_exists('featured', $apiFilterInfo)) {
            $this->modelState->set('filter.featured',
$filter->clean($apiFilterInfo['featured'], 'INT'));
        }

        if (\array_key_exists('tag', $apiFilterInfo)) {
            $this->modelState->set('filter.tag',
$filter->clean($apiFilterInfo['tag'], 'INT'));
        }

        if (\array_key_exists('language', $apiFilterInfo)) {
            $this->modelState->set('filter.language',
$filter->clean($apiFilterInfo['language'],
'STRING'));
        }

        $apiListInfo = $this->input->get('list', [],
'array');

        if (\array_key_exists('ordering', $apiListInfo)) {
            $this->modelState->set('list.ordering',
$filter->clean($apiListInfo['ordering'], 'STRING'));
        }

        if (\array_key_exists('direction', $apiListInfo)) {
            $this->modelState->set('list.direction',
$filter->clean($apiListInfo['direction'],
'STRING'));
        }

        return parent::displayList();
    }

    /**
     * Method to allow extended classes to manipulate the data to be saved
for an extension.
     *
     * @param   array  $data  An array of input data.
     *
     * @return  array
     *
     * @since   4.0.0
     */
    protected function preprocessSaveData(array $data): array
    {
        foreach (FieldsHelper::getFields('com_content.article')
as $field) {
            if (isset($data[$field->name])) {
                !isset($data['com_fields']) &&
$data['com_fields'] = [];

                $data['com_fields'][$field->name] =
$data[$field->name];
                unset($data[$field->name]);
            }
        }

        if (($this->input->getMethod() === 'PATCH')
&& !(\array_key_exists('tags', $data))) {
            $tags = new TagsHelper();
            $tags->getTagIds($data['id'],
'com_content.article');
            $data['tags'] = explode(',',
$tags->tags);
        }

        return $data;
    }
}
components/com_content/src/View/Articles/JsonapiView.php000064400000014270151165467420017476
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_content
 *
 * @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\Content\Api\View\Articles;

use Joomla\CMS\Factory;
use Joomla\CMS\Helper\TagsHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Component\Content\Api\Helper\ContentHelper;
use Joomla\Component\Content\Api\Serializer\ContentSerializer;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
use Joomla\Registry\Registry;

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

/**
 * The article view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'typeAlias',
        'asset_id',
        'title',
        'text',
        'tags',
        'language',
        'state',
        'category',
        'images',
        'metakey',
        'metadesc',
        'metadata',
        'access',
        'featured',
        'alias',
        'note',
        'publish_up',
        'publish_down',
        'urls',
        'created',
        'created_by',
        'created_by_alias',
        'modified',
        'modified_by',
        'hits',
        'version',
        'featured_up',
        'featured_down',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'typeAlias',
        'asset_id',
        'title',
        'text',
        'tags',
        'language',
        'state',
        'category',
        'images',
        'metakey',
        'metadesc',
        'metadata',
        'access',
        'featured',
        'alias',
        'note',
        'publish_up',
        'publish_down',
        'urls',
        'created',
        'created_by',
        'created_by_alias',
        'modified',
        'hits',
        'version',
        'featured_up',
        'featured_down',
    ];

    /**
     * The relationships the item has
     *
     * @var    array
     * @since  4.0.0
     */
    protected $relationship = [
        'category',
        'created_by',
        'tags',
    ];

    /**
     * Constructor.
     *
     * @param   array  $config  A named configuration array for object
construction.
     *                          contentType: the name (optional) of the
content type to use for the serialization
     *
     * @since   4.0.0
     */
    public function __construct($config = [])
    {
        if (\array_key_exists('contentType', $config)) {
            $this->serializer = new
ContentSerializer($config['contentType']);
        }

        parent::__construct($config);
    }

    /**
     * Execute and display a template script.
     *
     * @param   array|null  $items  Array of items
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayList(array $items = null)
    {
        foreach (FieldsHelper::getFields('com_content.article')
as $field) {
            $this->fieldsToRenderList[] = $field->name;
        }

        return parent::displayList();
    }

    /**
     * Execute and display a template script.
     *
     * @param   object  $item  Item
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayItem($item = null)
    {
        $this->relationship[] = 'modified_by';

        foreach (FieldsHelper::getFields('com_content.article')
as $field) {
            $this->fieldsToRenderItem[] = $field->name;
        }

        if (Multilanguage::isEnabled()) {
            $this->fieldsToRenderItem[] =
'languageAssociations';
            $this->relationship[]       =
'languageAssociations';
        }

        return parent::displayItem();
    }

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.0.0
     */
    protected function prepareItem($item)
    {
        if (!$item) {
            return $item;
        }

        $item->text = $item->introtext . ' ' .
$item->fulltext;

        // Process the content plugins.
        PluginHelper::importPlugin('content');
       
Factory::getApplication()->triggerEvent('onContentPrepare',
['com_content.article', &$item, &$item->params]);

        foreach (FieldsHelper::getFields('com_content.article',
$item, true) as $field) {
            $item->{$field->name} = $field->apivalue ??
$field->rawvalue;
        }

        if (Multilanguage::isEnabled() &&
!empty($item->associations)) {
            $associations = [];

            foreach ($item->associations as $language =>
$association) {
                $itemId = explode(':', $association)[0];

                $associations[] = (object) [
                    'id'       => $itemId,
                    'language' => $language,
                ];
            }

            $item->associations = $associations;
        }

        if (!empty($item->tags->tags)) {
            $tagsIds    = explode(',', $item->tags->tags);
            $item->tags = $item->tagsHelper->getTags($tagsIds);
        } else {
            $item->tags = [];
            $tags       = new TagsHelper();
            $tagsIds    = $tags->getTagIds($item->id,
'com_content.article');

            if (!empty($tagsIds)) {
                $tagsIds    = explode(',', $tagsIds);
                $item->tags = $tags->getTags($tagsIds);
            }
        }

        if (isset($item->images)) {
            $registry     = new Registry($item->images);
            $item->images = $registry->toArray();

            if (!empty($item->images['image_intro'])) {
                $item->images['image_intro'] =
ContentHelper::resolve($item->images['image_intro']);
            }

            if (!empty($item->images['image_fulltext'])) {
                $item->images['image_fulltext'] =
ContentHelper::resolve($item->images['image_fulltext']);
            }
        }

        return parent::prepareItem($item);
    }
}
components/com_content/src/Serializer/ContentSerializer.php000064400000006050151165467420020332
0ustar00<?php

/**
 * Joomla! Content Management System
 *
 * @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\Content\Api\Serializer;

use Joomla\CMS\Router\Route;
use Joomla\CMS\Serializer\JoomlaSerializer;
use Joomla\CMS\Tag\TagApiSerializerTrait;
use Joomla\CMS\Uri\Uri;
use Tobscure\JsonApi\Collection;
use Tobscure\JsonApi\Relationship;
use Tobscure\JsonApi\Resource;

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

/**
 * Temporary serializer
 *
 * @since  4.0.0
 */
class ContentSerializer extends JoomlaSerializer
{
    use TagApiSerializerTrait;

    /**
     * Build content relationships by associations
     *
     * @param   \stdClass  $model  Item model
     *
     * @return  Relationship
     *
     * @since 4.0.0
     */
    public function languageAssociations($model)
    {
        $resources = [];

        // @todo: This can't be hardcoded in the future?
        $serializer = new JoomlaSerializer($this->type);

        foreach ($model->associations as $association) {
            $resources[] = (new Resource($association, $serializer))
                ->addLink(
                    'self',
                    Route::link('site', Uri::root() .
'api/index.php/v1/content/articles/' . $association->id)
                );
        }

        $collection = new Collection($resources, $serializer);

        return new Relationship($collection);
    }

    /**
     * Build category relationship
     *
     * @param   \stdClass  $model  Item model
     *
     * @return  Relationship
     *
     * @since 4.0.0
     */
    public function category($model)
    {
        $serializer = new JoomlaSerializer('categories');

        $resource = (new Resource($model->catid, $serializer))
            ->addLink(
                'self',
                Route::link('site', Uri::root() .
'api/index.php/v1/content/categories/' . $model->catid)
            );

        return new Relationship($resource);
    }

    /**
     * Build category relationship
     *
     * @param   \stdClass  $model  Item model
     *
     * @return  Relationship
     *
     * @since 4.0.0
     */
    public function createdBy($model)
    {
        $serializer = new JoomlaSerializer('users');

        $resource = (new Resource($model->created_by, $serializer))
            ->addLink('self', Route::link('site',
Uri::root() . 'api/index.php/v1/users/' .
$model->created_by));

        return new Relationship($resource);
    }

    /**
     * Build editor relationship
     *
     * @param   \stdClass  $model  Item model
     *
     * @return  Relationship
     *
     * @since 4.0.0
     */
    public function modifiedBy($model)
    {
        $serializer = new JoomlaSerializer('users');

        $resource = (new Resource($model->modified_by, $serializer))
            ->addLink('self', Route::link('site',
Uri::root() . 'api/index.php/v1/users/' .
$model->modified_by));

        return new Relationship($resource);
    }
}
components/com_modules/src/Controller/ModulesController.php000064400000006377151165467420020366
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_modules
 *
 * @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\Modules\Api\Controller;

use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\Component\Modules\Administrator\Model\SelectModel;
use Joomla\Component\Modules\Api\View\Modules\JsonapiView;

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

/**
 * The modules controller
 *
 * @since  4.0.0
 */
class ModulesController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'modules';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'modules';

    /**
     * Basic display of an item view
     *
     * @param   integer  $id  The primary key to display. Leave empty if
you want to retrieve data from the request
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayItem($id = null)
    {
        $this->modelState->set('client_id',
$this->getClientIdFromInput());

        return parent::displayItem($id);
    }

    /**
     * Basic display of a list view
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayList()
    {
        $this->modelState->set('client_id',
$this->getClientIdFromInput());

        return parent::displayList();
    }

    /**
     * Return module items types
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function getTypes()
    {
        $viewType   = $this->app->getDocument()->getType();
        $viewName   = $this->input->get('view',
$this->default_view);
        $viewLayout = $this->input->get('layout',
'default', 'string');

        try {
            /** @var JsonapiView $view */
            $view = $this->getView(
                $viewName,
                $viewType,
                '',
                ['base_path' => $this->basePath,
'layout' => $viewLayout, 'contentType' =>
$this->contentType]
            );
        } catch (\Exception $e) {
            throw new \RuntimeException($e->getMessage());
        }

        /** @var SelectModel $model */
        $model = $this->getModel('select', '',
['ignore_request' => true]);

        if (!$model) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_MODEL_CREATE'));
        }

        $model->setState('client_id',
$this->getClientIdFromInput());

        $view->setModel($model, true);

        $view->document = $this->app->getDocument();

        $view->displayListTypes();

        return $this;
    }

    /**
     * Get client id from input
     *
     * @return string
     *
     * @since 4.0.0
     */
    private function getClientIdFromInput()
    {
        return $this->input->exists('client_id') ?
            $this->input->get('client_id') :
$this->input->post->get('client_id');
    }
}
components/com_modules/src/View/Modules/JsonapiView.php000064400000006052151165467420017335
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_modules
 *
 * @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\Modules\Api\View\Modules;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\CMS\Router\Exception\RouteNotFoundException;
use Joomla\Component\Modules\Administrator\Model\SelectModel;

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

/**
 * The modules view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'typeAlias',
        'asset_id',
        'title',
        'note',
        'content',
        'ordering',
        'position',
        'checked_out',
        'checked_out_time',
        'publish_up',
        'publish_down',
        'published',
        'module',
        'access',
        'showtitle',
        'params',
        'client_id',
        'language',
        'assigned',
        'assignment',
        'xml',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'title',
        'note',
        'position',
        'module',
        'language',
        'checked_out',
        'checked_out_time',
        'published',
        'enabled',
        'access',
        'ordering',
        'publish_up',
        'publish_down',
        'language_title',
        'language_image',
        'editor',
        'access_level',
        'pages',
        'name',
    ];

    /**
     * Execute and display a template script.
     *
     * @param   object  $item  Item
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayItem($item = null)
    {
        /** @var \Joomla\CMS\MVC\Model\AdminModel $model */
        $model = $this->getModel();

        if ($item === null) {
            $item  = $this->prepareItem($model->getItem());
        }

        if ($item->id === null) {
            throw new RouteNotFoundException('Item does not
exist');
        }

        if ((int) $model->getState('client_id') !==
$item->client_id) {
            throw new RouteNotFoundException('Item does not
exist');
        }

        return parent::displayItem($item);
    }

    /**
     * Execute and display a list modules types.
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayListTypes()
    {
        /** @var SelectModel $model */
        $model = $this->getModel();
        $items = [];

        foreach ($model->getItems() as $item) {
            $item->id = $item->extension_id;
            unset($item->extension_id);

            $items[] = $item;
        }

        $this->fieldsToRenderList = ['id', 'name',
'module', 'xml', 'desc'];

        return parent::displayList($items);
    }
}
components/com_menus/src/Controller/ItemsController.php000064400000012201151165467420017475
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_menus
 *
 * @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\Menus\Api\Controller;

use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Component\Menus\Api\View\Items\JsonapiView;

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

/**
 * The items controller
 *
 * @since  4.0.0
 */
class ItemsController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'items';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'items';

    /**
     * Basic display of an item view
     *
     * @param   integer  $id  The primary key to display. Leave empty if
you want to retrieve data from the request
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayItem($id = null)
    {
        $this->modelState->set('filter.client_id',
$this->getClientIdFromInput());

        return parent::displayItem($id);
    }

    /**
     * Basic display of a list view
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayList()
    {
        $apiFilterInfo = $this->input->get('filter', [],
'array');
        $filter        = InputFilter::getInstance();

        if (\array_key_exists('menutype', $apiFilterInfo)) {
            $this->modelState->set('filter.menutype',
$filter->clean($apiFilterInfo['menutype'],
'STRING'));
        }

        $this->modelState->set('filter.client_id',
$this->getClientIdFromInput());

        return parent::displayList();
    }

    /**
     * Method to add a new record.
     *
     * @return  void
     *
     * @since   4.0.0
     * @throws  NotAllowed
     * @throws  \RuntimeException
     */
    public function add()
    {
        $data = $this->input->get('data',
json_decode($this->input->json->getRaw(), true),
'array');

        if (isset($data['menutype'])) {
            $this->input->set('menutype',
$data['menutype']);
            $this->input->set('com_menus.items.menutype',
$data['menutype']);
        }

        isset($data['type']) &&
$this->input->set('type', $data['type']);
        isset($data['parent_id']) &&
$this->input->set('parent_id',
$data['parent_id']);
        isset($data['link']) &&
$this->input->set('link', $data['link']);

        $this->input->set('id', '0');

        parent::add();
    }

    /**
     * Method to edit an existing record.
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function edit()
    {
        $data = $this->input->get('data',
json_decode($this->input->json->getRaw(), true),
'array');

        if (isset($data['menutype'])) {
            $this->input->set('menutype',
$data['menutype']);
            $this->input->set('com_menus.items.menutype',
$data['menutype']);
        }

        isset($data['type']) &&
$this->input->set('type', $data['type']);
        isset($data['parent_id']) &&
$this->input->set('parent_id',
$data['parent_id']);
        isset($data['link']) &&
$this->input->set('link', $data['link']);

        return parent::edit();
    }

    /**
     * Return menu items types
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function getTypes()
    {
        $viewType   = $this->app->getDocument()->getType();
        $viewName   = $this->input->get('view',
$this->default_view);
        $viewLayout = $this->input->get('layout',
'default', 'string');

        try {
            /** @var JsonapiView $view */
            $view = $this->getView(
                $viewName,
                $viewType,
                '',
                ['base_path' => $this->basePath,
'layout' => $viewLayout, 'contentType' =>
$this->contentType]
            );
        } catch (\Exception $e) {
            throw new \RuntimeException($e->getMessage());
        }

        /** @var ListModel $model */
        $model = $this->getModel('menutypes', '',
['ignore_request' => true]);

        if (!$model) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_MODEL_CREATE'));
        }

        $model->setState('client_id',
$this->getClientIdFromInput());

        $view->setModel($model, true);

        $view->document = $this->app->getDocument();

        $view->displayListTypes();

        return $this;
    }

    /**
     * Get client id from input
     *
     * @return string
     *
     * @since 4.0.0
     */
    private function getClientIdFromInput()
    {
        return $this->input->exists('client_id') ?
            $this->input->get('client_id') :
$this->input->post->get('client_id');
    }
}
components/com_menus/src/Controller/MenusController.php000064400000003573151165467420017517
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_menus
 *
 * @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\Menus\Api\Controller;

use Joomla\CMS\MVC\Controller\ApiController;

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

/**
 * The menus controller
 *
 * @since  4.0.0
 */
class MenusController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'menus';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'menus';

    /**
     * Basic display of an item view
     *
     * @param   integer  $id  The primary key to display. Leave empty if
you want to retrieve data from the request
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayItem($id = null)
    {
        $this->modelState->set('filter.client_id',
$this->getClientIdFromInput());

        return parent::displayItem($id);
    }

    /**
     * Basic display of a list view
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayList()
    {
        $this->modelState->set('filter.client_id',
$this->getClientIdFromInput());

        return parent::displayList();
    }

    /**
     * Get client id from input
     *
     * @return string
     *
     * @since 4.0.0
     */
    private function getClientIdFromInput()
    {
        return $this->input->exists('client_id') ?
            $this->input->get('client_id') :
$this->input->post->get('client_id');
    }
}
components/com_menus/src/View/Items/JsonapiView.php000064400000013177151165467420016473
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_menus
 *
 * @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\Menus\Api\View\Items;

use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\CMS\Serializer\JoomlaSerializer;
use Joomla\CMS\Uri\Uri;
use Tobscure\JsonApi\Collection;

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

/**
 * The items view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'parent_id',
        'level',
        'lft',
        'rgt',
        'alias',
        'typeAlias',
        'menutype',
        'title',
        'note',
        'path',
        'link',
        'type',
        'published',
        'component_id',
        'checked_out',
        'checked_out_time',
        'browserNav',
        'access',
        'img',
        'template_style_id',
        'params',
        'home',
        'language',
        'client_id',
        'publish_up',
        'publish_down',
        'request',
        'associations',
        'menuordering',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList  = [
        'id',
        'menutype',
        'title',
        'alias',
        'note',
        'path',
        'link',
        'type',
        'parent_id',
        'level',
        'a.published',
        'component_id',
        'checked_out',
        'checked_out_time',
        'browserNav',
        'access',
        'img',
        'template_style_id',
        'params',
        'lft',
        'rgt',
        'home',
        'language',
        'client_id',
        'enabled',
        'publish_up',
        'publish_down',
        'published',
        'language_title',
        'language_image',
        'language_sef',
        'editor',
        'componentname',
        'access_level',
        'menutype_id',
        'menutype_title',
        'association',
        'name',
    ];

    /**
     * Execute and display a list items types.
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayListTypes()
    {
        /** @var \Joomla\Component\Menus\Administrator\Model\MenutypesModel
$model */
        $model = $this->getModel();
        $items = [];

        foreach ($model->getTypeOptions() as $type => $data) {
            $groupItems = [];

            foreach ($data as $item) {
                $item->id          = implode('/',
$item->request);
                $item->title       = Text::_($item->title);
                $item->description = Text::_($item->description);
                $item->group       = Text::_($type);

                $groupItems[] = $item;
            }

            $items = array_merge($items, $groupItems);
        }

        // Set up links for pagination
        $currentUrl                    = Uri::getInstance();
        $currentPageDefaultInformation = ['offset' => 0,
'limit' => 20];
        $currentPageQuery              =
$currentUrl->getVar('page', $currentPageDefaultInformation);

        $offset              = $currentPageQuery['offset'];
        $limit               = $currentPageQuery['limit'];
        $totalItemsCount     = \count($items);
        $totalPagesAvailable = ceil($totalItemsCount / $limit);

        $items = array_splice($items, $offset, $limit);

        $firstPage                = clone $currentUrl;
        $firstPageQuery           = $currentPageQuery;
        $firstPageQuery['offset'] = 0;
        $firstPage->setVar('page', $firstPageQuery);

        $nextPage                = clone $currentUrl;
        $nextPageQuery           = $currentPageQuery;
        $nextOffset              = $currentPageQuery['offset'] +
$limit;
        $nextPageQuery['offset'] = ($nextOffset >
($totalPagesAvailable * $limit)) ? $totalPagesAvailable - $limit :
$nextOffset;
        $nextPage->setVar('page', $nextPageQuery);

        $previousPage                = clone $currentUrl;
        $previousPageQuery           = $currentPageQuery;
        $previousOffset              =
$currentPageQuery['offset'] - $limit;
        $previousPageQuery['offset'] = max($previousOffset, 0);
        $previousPage->setVar('page', $previousPageQuery);

        $lastPage                = clone $currentUrl;
        $lastPageQuery           = $currentPageQuery;
        $lastPageQuery['offset'] = $totalPagesAvailable - $limit;
        $lastPage->setVar('page', $lastPageQuery);

        $collection = (new Collection($items, new
JoomlaSerializer('menutypes')));

        // Set the data into the document and render it
        $this->getDocument()->addMeta('total-pages',
$totalPagesAvailable)
            ->setData($collection)
            ->addLink('self', (string) $currentUrl)
            ->addLink('first', (string) $firstPage)
            ->addLink('next', (string) $nextPage)
            ->addLink('previous', (string) $previousPage)
            ->addLink('last', (string) $lastPage);

        return $this->getDocument()->render();
    }

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.0.0
     */
    protected function prepareItem($item)
    {
        if (\is_string($item->params)) {
            $item->params = json_decode($item->params);
        }

        return parent::prepareItem($item);
    }
}
components/com_menus/src/View/Menus/JsonapiView.php000064400000002157151165467420016475
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_menus
 *
 * @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\Menus\Api\View\Menus;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;

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

/**
 * The menus view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'menutype',
        'title',
        'description',
        'client_id',
        'count_published',
        'count_unpublished',
        'count_trashed',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList  = [
        'id',
        'asset_id',
        'menutype',
        'title',
        'description',
        'client_id',
    ];
}
components/com_messages/src/Controller/MessagesController.php000064400000001511151165467420020645
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_messages
 *
 * @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\Messages\Api\Controller;

use Joomla\CMS\MVC\Controller\ApiController;

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

/**
 * The messages controller
 *
 * @since  4.0.0
 */
class MessagesController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'messages';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'messages';
}
components/com_messages/src/View/Messages/JsonapiView.php000064400000003010151165467420017622
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_messages
 *
 * @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\Messages\Api\View\Messages;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;

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

/**
 * The messages view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'user_id_from',
        'user_id_to',
        'date_time',
        'priority',
        'subject',
        'message',
        'state',
        'user_from',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'user_id_from',
        'user_id_to',
        'date_time',
        'priority',
        'subject',
        'message',
        'state',
        'user_from',
    ];

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.0.0
     */
    protected function prepareItem($item)
    {
        $item->id = $item->message_id;
        unset($item->message_id);

        return parent::prepareItem($item);
    }
}
components/com_plugins/src/Controller/PluginsController.php000064400000006644151165467420020405
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_plugins
 *
 * @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\Plugins\Api\Controller;

use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\CMS\MVC\Controller\Exception;
use Joomla\CMS\Router\Exception\RouteNotFoundException;
use Joomla\String\Inflector;
use Tobscure\JsonApi\Exception\InvalidParameterException;

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

/**
 * The plugins controller
 *
 * @since  4.0.0
 */
class PluginsController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'plugins';

    /**
     * The default view for the display method.
     *
     * @var    string
     *
     * @since  3.0
     */
    protected $default_view = 'plugins';

    /**
     * Method to edit an existing record.
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function edit()
    {
        $recordId = $this->input->getInt('id');

        if (!$recordId) {
            throw new
Exception\ResourceNotFound(Text::_('JLIB_APPLICATION_ERROR_RECORD'),
404);
        }

        $data = json_decode($this->input->json->getRaw(), true);

        foreach ($data as $key => $value) {
            if (!\in_array($key, ['enabled', 'access',
'ordering'])) {
                throw new InvalidParameterException("Invalid parameter
{$key}.", 400);
            }
        }

        /** @var \Joomla\Component\Plugins\Administrator\Model\PluginModel
$model */
        $model =
$this->getModel(Inflector::singularize($this->contentType),
'', ['ignore_request' => true]);

        if (!$model) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_MODEL_CREATE'));
        }

        $item = $model->getItem($recordId);

        if (!isset($item->extension_id)) {
            throw new RouteNotFoundException('Item does not
exist');
        }

        $data['folder']  = $item->folder;
        $data['element'] = $item->element;

        $this->input->set('data', $data);

        return parent::edit();
    }

    /**
     * Plugin list view with filtering of data
     *
     * @return  static  A BaseController object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayList()
    {
        $apiFilterInfo = $this->input->get('filter', [],
'array');
        $filter        = InputFilter::getInstance();

        if (\array_key_exists('element', $apiFilterInfo)) {
            $this->modelState->set('filter.element',
$filter->clean($apiFilterInfo['element'],
'STRING'));
        }

        if (\array_key_exists('status', $apiFilterInfo)) {
            $this->modelState->set('filter.enabled',
$filter->clean($apiFilterInfo['status'], 'INT'));
        }

        if (\array_key_exists('search', $apiFilterInfo)) {
            $this->modelState->set('filter.search',
$filter->clean($apiFilterInfo['search'], 'STRING'));
        }

        if (\array_key_exists('type', $apiFilterInfo)) {
            $this->modelState->set('filter.folder',
$filter->clean($apiFilterInfo['type'], 'STRING'));
        }

        return parent::displayList();
    }
}
components/com_plugins/src/View/Plugins/JsonapiView.php000064400000003174151165467430017362
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_plugins
 *
 * @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\Plugins\Api\View\Plugins;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;

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

/**
 * The plugins view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'name',
        'type',
        'element',
        'changelogurl',
        'folder',
        'client_id',
        'enabled',
        'access',
        'protected',
        'checked_out',
        'checked_out_time',
        'ordering',
        'state',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'name',
        'element',
        'folder',
        'checked_out',
        'checked_out_time',
        'enabled',
        'access',
        'ordering',
        'editor',
        'access_level',
    ];

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.0.0
     */
    protected function prepareItem($item)
    {
        $item->id = $item->extension_id;
        unset($item->extension_id);

        return $item;
    }
}
components/com_contact/src/Controller/ContactController.php000064400000021744151165467430020330
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_contact
 *
 * @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\Contact\Api\Controller;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Event\Contact\SubmitContactEvent;
use Joomla\CMS\Event\Contact\ValidateContactEvent;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Mail\Exception\MailDisabledException;
use Joomla\CMS\Mail\MailTemplate;
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\CMS\MVC\Controller\Exception\SendEmail;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Exception\RouteNotFoundException;
use Joomla\CMS\String\PunycodeHelper;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\UserFactoryAwareInterface;
use Joomla\CMS\User\UserFactoryAwareTrait;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
use Joomla\Registry\Registry;
use Joomla\String\Inflector;
use PHPMailer\PHPMailer\Exception as phpMailerException;
use Tobscure\JsonApi\Exception\InvalidParameterException;

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

/**
 * The contact controller
 *
 * @since  4.0.0
 */
class ContactController extends ApiController implements
UserFactoryAwareInterface
{
    use UserFactoryAwareTrait;

    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'contacts';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'contacts';

    /**
     * Method to allow extended classes to manipulate the data to be saved
for an extension.
     *
     * @param   array  $data  An array of input data.
     *
     * @return  array
     *
     * @since   4.0.0
     */
    protected function preprocessSaveData(array $data): array
    {
        foreach (FieldsHelper::getFields('com_contact.contact')
as $field) {
            if (isset($data[$field->name])) {
                !isset($data['com_fields']) &&
$data['com_fields'] = [];

                $data['com_fields'][$field->name] =
$data[$field->name];
                unset($data[$field->name]);
            }
        }

        return $data;
    }

    /**
     * Submit contact form
     *
     * @param   integer  $id Leave empty if you want to retrieve data from
the request
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function submitForm($id = null)
    {
        if ($id === null) {
            $id = $this->input->post->get('id', 0,
'int');
        }

        $modelName = Inflector::singularize($this->contentType);

        /** @var  \Joomla\Component\Contact\Site\Model\ContactModel $model
*/
        $model = $this->getModel($modelName, 'Site');

        if (!$model) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_MODEL_CREATE'));
        }

        $model->setState('filter.published', 1);

        $data    = $this->input->get('data',
json_decode($this->input->json->getRaw(), true),
'array');
        $contact = $model->getItem($id);

        if ($contact->id === null) {
            throw new RouteNotFoundException('Item does not
exist');
        }

        $contactParams = new Registry($contact->params);

        if (!$contactParams->get('show_email_form')) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_DISPLAY_EMAIL_FORM'));
        }

        // Contact plugins
        PluginHelper::importPlugin('contact');

        Form::addFormPath(JPATH_COMPONENT_SITE . '/forms');

        // Validate the posted data.
        $form = $model->getForm();

        if (!$form) {
            throw new \RuntimeException($model->getError(), 500);
        }

        if (!$model->validate($form, $data)) {
            $errors   = $model->getErrors();
            $messages = [];

            for ($i = 0, $n = \count($errors); $i < $n && $i
< 3; $i++) {
                if ($errors[$i] instanceof \Exception) {
                    $messages[] =
"{$errors[$i]->getMessage()}";
                } else {
                    $messages[] = "{$errors[$i]}";
                }
            }

            throw new InvalidParameterException(implode("\n",
$messages));
        }

        // Validation succeeded, continue with custom handlers
        $results =
$this->getDispatcher()->dispatch('onValidateContact', new
ValidateContactEvent('onValidateContact', [
            'subject' => $contact,
            'data'    => &$data, // @todo: Remove
reference in Joomla 6, @deprecated: Data modification onValidateContact is
not allowed, use onSubmitContact instead
        ]))->getArgument('result', []);

        foreach ($results as $result) {
            if ($result instanceof \Exception) {
                throw new
InvalidParameterException($result->getMessage());
            }
        }

        // Passed Validation: Process the contact plugins to integrate with
other applications
        $event =
$this->getDispatcher()->dispatch('onSubmitContact', new
SubmitContactEvent('onSubmitContact', [
            'subject' => $contact,
            'data'    => &$data, // @todo: Remove
reference in Joomla 6, see SubmitContactEvent::__constructor()
        ]));
        // Get the final data
        $data = $event->getArgument('data', $data);

        // Send the email
        $sent = false;

        $params = ComponentHelper::getParams('com_contact');

        if (!$params->get('custom_reply')) {
            $sent = $this->_sendEmail($data, $contact,
$params->get('show_email_copy', 0));
        }

        if (!$sent) {
            throw new SendEmail('Error sending message');
        }

        return $this;
    }

    /**
     * Method to get a model object, loading it if required.
     *
     * @param   array      $data               The data to send in the
email.
     * @param   \stdClass  $contact            The user information to send
the email to
     * @param   boolean    $emailCopyToSender  True to send a copy of the
email to the user.
     *
     * @return  boolean  True on success sending the email, false on
failure.
     *
     * @since   1.6.4
     */
    private function _sendEmail($data, $contact, $emailCopyToSender)
    {
        $app = $this->app;

        $app->getLanguage()->load('com_contact',
JPATH_SITE, $app->getLanguage()->getTag(), true);

        if ($contact->email_to == '' &&
$contact->user_id != 0) {
            $contact_user      =
$this->getUserFactory()->loadUserById($contact->user_id);
            $contact->email_to =
$contact_user->get('email');
        }

        $templateData = [
            'sitename'     =>
$app->get('sitename'),
            'name'         => $data['contact_name'],
            'contactname'  => $contact->name,
            'email'        =>
PunycodeHelper::emailToPunycode($data['contact_email']),
            'subject'      =>
$data['contact_subject'],
            'body'         =>
stripslashes($data['contact_message']),
            'url'          => Uri::base(),
            'customfields' => '',
        ];

        // Load the custom fields
        if (!empty($data['com_fields']) && $fields =
FieldsHelper::getFields('com_contact.mail', $contact, true,
$data['com_fields'])) {
            $output = FieldsHelper::render(
                'com_contact.mail',
                'fields.render',
                [
                    'context' => 'com_contact.mail',
                    'item'    => $contact,
                    'fields'  => $fields,
                ]
            );

            if ($output) {
                $templateData['customfields'] = $output;
            }
        }

        try {
            $mailer = new MailTemplate('com_contact.mail',
$app->getLanguage()->getTag());
            $mailer->addRecipient($contact->email_to);
            $mailer->setReplyTo($templateData['email'],
$templateData['name']);
            $mailer->addTemplateData($templateData);
            $sent = $mailer->send();

            // If we are supposed to copy the sender, do so.
            if ($emailCopyToSender == true &&
!empty($data['contact_email_copy'])) {
                $mailer = new
MailTemplate('com_contact.mail.copy',
$app->getLanguage()->getTag());
                $mailer->addRecipient($templateData['email']);
                $mailer->setReplyTo($templateData['email'],
$templateData['name']);
                $mailer->addTemplateData($templateData);
                $sent = $mailer->send();
            }
        } catch (MailDisabledException | phpMailerException $exception) {
            try {
                Log::add(Text::_($exception->getMessage()),
Log::WARNING, 'jerror');

                $sent = false;
            } catch (\RuntimeException $exception) {
               
Factory::getApplication()->enqueueMessage(Text::_($exception->errorMessage()),
'warning');

                $sent = false;
            }
        }

        return $sent;
    }
}
components/com_contact/src/View/Contacts/JsonapiView.php000064400000011753151165467430017473
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_contact
 *
 * @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\Contact\Api\View\Contacts;

use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\Component\Contact\Api\Serializer\ContactSerializer;
use Joomla\Component\Content\Api\Helper\ContentHelper;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;

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

/**
 * The contacts view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'alias',
        'name',
        'category',
        'created',
        'created_by',
        'created_by_alias',
        'modified',
        'modified_by',
        'image',
        'tags',
        'featured',
        'publish_up',
        'publish_down',
        'version',
        'hits',
        'metakey',
        'metadesc',
        'metadata',
        'con_position',
        'address',
        'suburb',
        'state',
        'country',
        'postcode',
        'telephone',
        'fax',
        'misc',
        'email_to',
        'default_con',
        'user_id',
        'access',
        'mobile',
        'webpage',
        'sortname1',
        'sortname2',
        'sortname3',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'alias',
        'name',
        'category',
        'created',
        'created_by',
        'created_by_alias',
        'modified',
        'modified_by',
        'image',
        'tags',
        'user_id',
    ];

    /**
     * The relationships the item has
     *
     * @var    array
     * @since  4.0.0
     */
    protected $relationship = [
        'category',
        'created_by',
        'modified_by',
        'user_id',
        'tags',
    ];

    /**
     * Constructor.
     *
     * @param   array  $config  A named configuration array for object
construction.
     *                          contentType: the name (optional) of the
content type to use for the serialization
     *
     * @since   4.0.0
     */
    public function __construct($config = [])
    {
        if (\array_key_exists('contentType', $config)) {
            $this->serializer = new
ContactSerializer($config['contentType']);
        }

        parent::__construct($config);
    }

    /**
     * Execute and display a template script.
     *
     * @param   array|null  $items  Array of items
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayList(array $items = null)
    {
        foreach (FieldsHelper::getFields('com_contact.contact')
as $field) {
            $this->fieldsToRenderList[] = $field->name;
        }

        return parent::displayList();
    }

    /**
     * Execute and display a template script.
     *
     * @param   object  $item  Item
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayItem($item = null)
    {
        foreach (FieldsHelper::getFields('com_contact.contact')
as $field) {
            $this->fieldsToRenderItem[] = $field->name;
        }

        if (Multilanguage::isEnabled()) {
            $this->fieldsToRenderItem[] =
'languageAssociations';
            $this->relationship[]       =
'languageAssociations';
        }

        return parent::displayItem();
    }

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.0.0
     */
    protected function prepareItem($item)
    {
        foreach (FieldsHelper::getFields('com_contact.contact',
$item, true) as $field) {
            $item->{$field->name} = $field->apivalue ??
$field->rawvalue;
        }

        if (Multilanguage::isEnabled() &&
!empty($item->associations)) {
            $associations = [];

            foreach ($item->associations as $language =>
$association) {
                $itemId = explode(':', $association)[0];

                $associations[] = (object) [
                    'id'       => $itemId,
                    'language' => $language,
                ];
            }

            $item->associations = $associations;
        }

        if (!empty($item->tags->tags)) {
            $tagsIds   = explode(',', $item->tags->tags);
            $tagsNames = $item->tagsHelper->getTagNames($tagsIds);

            $item->tags = array_combine($tagsIds, $tagsNames);
        } else {
            $item->tags = [];
        }

        if (isset($item->image)) {
            $item->image = ContentHelper::resolve($item->image);
        }

        return parent::prepareItem($item);
    }
}
components/com_contact/src/Serializer/ContactSerializer.php000064400000006645151165467430020307
0ustar00<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Contact\Api\Serializer;

use Joomla\CMS\Router\Route;
use Joomla\CMS\Serializer\JoomlaSerializer;
use Joomla\CMS\Tag\TagApiSerializerTrait;
use Joomla\CMS\Uri\Uri;
use Tobscure\JsonApi\Collection;
use Tobscure\JsonApi\Relationship;
use Tobscure\JsonApi\Resource;

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

/**
 * Temporary serializer
 *
 * @since  4.0.0
 */
class ContactSerializer extends JoomlaSerializer
{
    use TagApiSerializerTrait;

    /**
     * Build content relationships by associations
     *
     * @param   \stdClass  $model  Item model
     *
     * @return  Relationship
     *
     * @since 4.0.0
     */
    public function languageAssociations($model)
    {
        $resources = [];

        // @todo: This can't be hardcoded in the future?
        $serializer = new JoomlaSerializer($this->type);

        foreach ($model->associations as $association) {
            $resources[] = (new Resource($association, $serializer))
                ->addLink('self',
Route::link('site', Uri::root() .
'api/index.php/v1/contact/' . $association->id));
        }

        $collection = new Collection($resources, $serializer);

        return new Relationship($collection);
    }

    /**
     * Build category relationship
     *
     * @param   \stdClass  $model  Item model
     *
     * @return  Relationship
     *
     * @since 4.0.0
     */
    public function category($model)
    {
        $serializer = new JoomlaSerializer('categories');

        $resource = (new Resource($model->catid, $serializer))
            ->addLink('self', Route::link('site',
Uri::root() . 'api/index.php/v1/content/categories/' .
$model->catid));

        return new Relationship($resource);
    }

    /**
     * Build category relationship
     *
     * @param   \stdClass  $model  Item model
     *
     * @return  Relationship
     *
     * @since 4.0.0
     */
    public function createdBy($model)
    {
        $serializer = new JoomlaSerializer('users');

        $resource = (new Resource($model->created_by, $serializer))
            ->addLink('self', Route::link('site',
Uri::root() . 'api/index.php/v1/users/' .
$model->created_by));

        return new Relationship($resource);
    }

    /**
     * Build editor relationship
     *
     * @param   \stdClass  $model  Item model
     *
     * @return  Relationship
     *
     * @since 4.0.0
     */
    public function modifiedBy($model)
    {
        $serializer = new JoomlaSerializer('users');

        $resource = (new Resource($model->modified_by, $serializer))
            ->addLink('self', Route::link('site',
Uri::root() . 'api/index.php/v1/users/' .
$model->modified_by));

        return new Relationship($resource);
    }

    /**
     * Build contact user relationship
     *
     * @param   \stdClass  $model  Item model
     *
     * @return  Relationship
     *
     * @since 4.0.0
     */
    public function userId($model)
    {
        $serializer = new JoomlaSerializer('users');

        $resource = (new Resource($model->user_id, $serializer))
            ->addLink('self', Route::link('site',
Uri::root() . 'api/index.php/v1/users/' . $model->user_id));

        return new Relationship($resource);
    }
}
components/com_users/src/Controller/GroupsController.php000064400000001510151165467440017710
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Users\Api\Controller;

use Joomla\CMS\MVC\Controller\ApiController;

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

/**
 * The groups controller
 *
 * @since  4.0.0
 */
class GroupsController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'groups';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'groups';
}
components/com_users/src/Controller/LevelsController.php000064400000001512151165467440017665
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Users\Api\Controller;

use Joomla\CMS\MVC\Controller\ApiController;

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

/**
 * The levels controller
 *
 * @since  4.0.0
 */
class LevelsController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'levels';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $default_view = 'levels';
}
components/com_users/src/Controller/UsersController.php000064400000014641151165467440017543
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_users
 *
 * @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\Users\Api\Controller;

use Joomla\CMS\Date\Date;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
use Tobscure\JsonApi\Exception\InvalidParameterException;

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

/**
 * The users controller
 *
 * @since  4.0.0
 */
class UsersController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'users';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $default_view = 'users';

    /**
     * Method to allow extended classes to manipulate the data to be saved
for an extension.
     *
     * @param   array  $data  An array of input data.
     *
     * @return  array
     *
     * @since   4.0.0
     */
    protected function preprocessSaveData(array $data): array
    {
        foreach (FieldsHelper::getFields('com_users.user') as
$field) {
            if (isset($data[$field->name])) {
                !isset($data['com_fields']) &&
$data['com_fields'] = [];

                $data['com_fields'][$field->name] =
$data[$field->name];
                unset($data[$field->name]);
            }
        }

        if ($this->input->getMethod() === 'PATCH') {
            $body = $this->input->get('data',
json_decode($this->input->json->getRaw(), true),
'array');

            if (!\array_key_exists('password', $body)) {
                unset($data['password']);
            }
        }

        if ($this->input->getMethod() === 'POST') {
            if (isset($data['password'])) {
                $data['password2'] = $data['password'];
            }
        }

        return $data;
    }

    /**
     * User list view with filtering of data
     *
     * @return  static  A BaseController object to support chaining.
     *
     * @since   4.0.0
     * @throws  InvalidParameterException
     */
    public function displayList()
    {
        $apiFilterInfo = $this->input->get('filter', [],
'array');
        $filter        = InputFilter::getInstance();

        if (\array_key_exists('state', $apiFilterInfo)) {
            $this->modelState->set('filter.state',
$filter->clean($apiFilterInfo['state'], 'INT'));
        }

        if (\array_key_exists('active', $apiFilterInfo)) {
            $this->modelState->set('filter.active',
$filter->clean($apiFilterInfo['active'], 'INT'));
        }

        if (\array_key_exists('groupid', $apiFilterInfo)) {
            $this->modelState->set('filter.group_id',
$filter->clean($apiFilterInfo['groupid'], 'INT'));
        }

        if (\array_key_exists('search', $apiFilterInfo)) {
            $this->modelState->set('filter.search',
$filter->clean($apiFilterInfo['search'], 'STRING'));
        }

        if (\array_key_exists('registrationDateStart',
$apiFilterInfo)) {
            $registrationStartInput =
$filter->clean($apiFilterInfo['registrationDateStart'],
'STRING');
            $registrationStartDate  =
Date::createFromFormat(\DateTimeInterface::RFC3339,
$registrationStartInput);

            if (!$registrationStartDate) {
                // Send the error response
                $error =
Text::sprintf('JLIB_FORM_VALIDATE_FIELD_INVALID',
'registrationDateStart');

                throw new InvalidParameterException($error, 400, null,
'registrationDateStart');
            }

           
$this->modelState->set('filter.registrationDateStart',
$registrationStartDate);
        }

        if (\array_key_exists('registrationDateEnd',
$apiFilterInfo)) {
            $registrationEndInput =
$filter->clean($apiFilterInfo['registrationDateEnd'],
'STRING');
            $registrationEndDate  =
Date::createFromFormat(\DateTimeInterface::RFC3339, $registrationEndInput);

            if (!$registrationEndDate) {
                // Send the error response
                $error =
Text::sprintf('JLIB_FORM_VALIDATE_FIELD_INVALID',
'registrationDateEnd');
                throw new InvalidParameterException($error, 400, null,
'registrationDateEnd');
            }

           
$this->modelState->set('filter.registrationDateEnd',
$registrationEndDate);
        } elseif (
            \array_key_exists('registrationDateStart',
$apiFilterInfo)
            && !\array_key_exists('registrationDateEnd',
$apiFilterInfo)
        ) {
            // If no end date specified the end date is now
           
$this->modelState->set('filter.registrationDateEnd', new
Date());
        }

        if (\array_key_exists('lastVisitDateStart',
$apiFilterInfo)) {
            $lastVisitStartInput =
$filter->clean($apiFilterInfo['lastVisitDateStart'],
'STRING');
            $lastVisitStartDate  =
Date::createFromFormat(\DateTimeInterface::RFC3339, $lastVisitStartInput);

            if (!$lastVisitStartDate) {
                // Send the error response
                $error =
Text::sprintf('JLIB_FORM_VALIDATE_FIELD_INVALID',
'lastVisitDateStart');
                throw new InvalidParameterException($error, 400, null,
'lastVisitDateStart');
            }

            $this->modelState->set('filter.lastVisitStart',
$lastVisitStartDate);
        }

        if (\array_key_exists('lastVisitDateEnd',
$apiFilterInfo)) {
            $lastVisitEndInput =
$filter->clean($apiFilterInfo['lastVisitDateEnd'],
'STRING');
            $lastVisitEndDate  =
Date::createFromFormat(\DateTimeInterface::RFC3339, $lastVisitEndInput);

            if (!$lastVisitEndDate) {
                // Send the error response
                $error =
Text::sprintf('JLIB_FORM_VALIDATE_FIELD_INVALID',
'lastVisitDateEnd');

                throw new InvalidParameterException($error, 400, null,
'lastVisitDateEnd');
            }

            $this->modelState->set('filter.lastVisitEnd',
$lastVisitEndDate);
        } elseif (
            \array_key_exists('lastVisitDateStart',
$apiFilterInfo)
            && !\array_key_exists('lastVisitDateEnd',
$apiFilterInfo)
        ) {
            // If no end date specified the end date is now
            $this->modelState->set('filter.lastVisitEnd',
new Date());
        }

        return parent::displayList();
    }
}
components/com_users/src/View/Levels/JsonapiView.php000064400000001672151165467440016655
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Users\Api\View\Levels;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;

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

/**
 * The levels view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'title',
        'rules',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'title',
        'rules',
    ];
}
components/com_users/src/View/Users/JsonapiView.php000064400000005357151165467440016530
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_users
 *
 * @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\Users\Api\View\Users;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\CMS\Router\Exception\RouteNotFoundException;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;

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

/**
 * The users view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'groups',
        'name',
        'username',
        'email',
        'registerDate',
        'lastvisitDate',
        'lastResetTime',
        'resetCount',
        'sendEmail',
        'block',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'name',
        'username',
        'email',
        'group_count',
        'group_names',
        'registerDate',
        'lastvisitDate',
        'lastResetTime',
        'resetCount',
        'sendEmail',
        'block',
    ];

    /**
     * Execute and display a template script.
     *
     * @param   array|null  $items  Array of items
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayList(array $items = null)
    {
        foreach (FieldsHelper::getFields('com_users.user') as
$field) {
            $this->fieldsToRenderList[] = $field->name;
        }

        return parent::displayList();
    }

    /**
     * Execute and display a template script.
     *
     * @param   object  $item  Item
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayItem($item = null)
    {
        foreach (FieldsHelper::getFields('com_users.user') as
$field) {
            $this->fieldsToRenderItem[] = $field->name;
        }

        return parent::displayItem();
    }

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.0.0
     */
    protected function prepareItem($item)
    {
        if (empty($item->username)) {
            throw new RouteNotFoundException('Item does not
exist');
        }

        foreach (FieldsHelper::getFields('com_users.user', $item,
true) as $field) {
            $item->{$field->name} = $field->apivalue ??
$field->rawvalue;
        }

        return parent::prepareItem($item);
    }
}
components/com_users/src/View/Groups/JsonapiView.php000064400000001776151165467450016710
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_users
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Users\Api\View\Groups;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;

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

/**
 * The groups view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'parent_id',
        'lft',
        'rgt',
        'title',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'parent_id',
        'lft',
        'rgt',
        'title',
    ];
}
components/com_categories/src/Controller/CategoriesController.php000064400000007641151165467450021516
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_categories
 *
 * @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\Categories\Api\Controller;

use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\CMS\Table\Category;

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

/**
 * The categories controller
 *
 * @since  4.0.0
 */
class CategoriesController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'categories';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'categories';

    /**
     * Method to allow extended classes to manipulate the data to be saved
for an extension.
     *
     * @param   array  $data  An array of input data.
     *
     * @return  array
     *
     * @since   4.0.0
     */
    protected function preprocessSaveData(array $data): array
    {
        $extension         = $this->getExtensionFromInput();
        $data['extension'] = $extension;

        // @todo: This is a hack to drop the extension into the global
input object - to satisfy how state is built
        //       we should be able to improve this in the future
        $this->input->set('extension', $extension);

        return $data;
    }

    /**
     * Method to save a record.
     *
     * @param   integer  $recordKey  The primary key of the item (if
exists)
     *
     * @return  integer  The record ID on success, false on failure
     *
     * @since   4.0.6
     */
    protected function save($recordKey = null)
    {
        $recordId = parent::save($recordKey);

        if (!$recordId) {
            return $recordId;
        }

        $data = $this->input->get('data',
json_decode($this->input->json->getRaw(), true),
'array');

        if (empty($data['location'])) {
            return $recordId;
        }

        /** @var Category $category */
        $category =
$this->getModel('Category')->getTable('Category');
        $category->load((int) $recordId);

        $reference = $category->parent_id;

        if (!empty($data['location_reference'])) {
            $reference = (int) $data['location_reference'];
        }

        $category->setLocation($reference, $data['location']);
        $category->store();

        return $recordId;
    }

    /**
     * Basic display of an item view
     *
     * @param   integer  $id  The primary key to display. Leave empty if
you want to retrieve data from the request
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayItem($id = null)
    {
        $this->modelState->set('filter.extension',
$this->getExtensionFromInput());

        return parent::displayItem($id);
    }
    /**
     * Basic display of a list view
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayList()
    {
        $apiFilterInfo = $this->input->get('filter', [],
'array');
        $filter        = InputFilter::getInstance();

        if (\array_key_exists('search', $apiFilterInfo)) {
            $this->modelState->set('filter.search',
$filter->clean($apiFilterInfo['search'], 'STRING'));
        }

        $this->modelState->set('filter.extension',
$this->getExtensionFromInput());

        return parent::displayList();
    }

    /**
     * Get extension from input
     *
     * @return string
     *
     * @since 4.0.0
     */
    private function getExtensionFromInput()
    {
        return $this->input->exists('extension') ?
            $this->input->get('extension') :
$this->input->post->get('extension');
    }
}
components/com_categories/src/View/Categories/JsonapiView.php000064400000007373151165467450020501
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_categories
 *
 * @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\Categories\Api\View\Categories;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\CMS\Router\Exception\RouteNotFoundException;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;

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

/**
 * The categories view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'title',
        'alias',
        'note',
        'published',
        'access',
        'checked_out',
        'checked_out_time',
        'created_user_id',
        'parent_id',
        'level',
        'extension',
        'lft',
        'rgt',
        'language',
        'language_title',
        'language_image',
        'editor',
        'access_level',
        'author_name',
        'count_trashed',
        'count_unpublished',
        'count_published',
        'count_archived',
        'params',
        'description',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'title',
        'alias',
        'note',
        'published',
        'access',
        'checked_out',
        'checked_out_time',
        'created_user_id',
        'parent_id',
        'level',
        'lft',
        'rgt',
        'language',
        'language_title',
        'language_image',
        'editor',
        'access_level',
        'author_name',
        'count_trashed',
        'count_unpublished',
        'count_published',
        'count_archived',
        'params',
        'description',
    ];

    /**
     * Execute and display a template script.
     *
     * @param   array|null  $items  Array of items
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayList(array $items = null)
    {
        foreach
(FieldsHelper::getFields('com_content.categories') as $field) {
            $this->fieldsToRenderList[] = $field->name;
        }

        return parent::displayList();
    }

    /**
     * Execute and display a template script.
     *
     * @param   object  $item  Item
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayItem($item = null)
    {
        foreach
(FieldsHelper::getFields('com_content.categories') as $field) {
            $this->fieldsToRenderItem[] = $field->name;
        }

        if ($item === null) {
            /** @var \Joomla\CMS\MVC\Model\AdminModel $model */
            $model = $this->getModel();
            $item  = $this->prepareItem($model->getItem());
        }

        if ($item->id === null) {
            throw new RouteNotFoundException('Item does not
exist');
        }

        if ($item->extension !=
$this->getModel()->getState('filter.extension')) {
            throw new RouteNotFoundException('Item does not
exist');
        }

        return parent::displayItem($item);
    }

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.0.0
     */
    protected function prepareItem($item)
    {
        foreach
(FieldsHelper::getFields('com_content.categories', $item, true)
as $field) {
            $item->{$field->name} = $field->apivalue ??
$field->rawvalue;
        }

        return parent::prepareItem($item);
    }
}
components/com_privacy/src/Controller/RequestsController.php000064400000004425151165467460020572
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_privacy
 *
 * @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\Privacy\Api\Controller;

use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\Component\Privacy\Api\View\Requests\JsonapiView;

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

/**
 * The requests controller
 *
 * @since  4.0.0
 */
class RequestsController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'requests';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'requests';

    /**
     * Export request data
     *
     * @param   integer  $id  The primary key to display. Leave empty if
you want to retrieve data from the request
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function export($id = null)
    {
        if ($id === null) {
            $id = $this->input->get('id', 0,
'int');
        }

        $viewType   = $this->app->getDocument()->getType();
        $viewName   = $this->input->get('view',
$this->default_view);
        $viewLayout = $this->input->get('layout',
'default', 'string');

        try {
            /** @var JsonapiView $view */
            $view = $this->getView(
                $viewName,
                $viewType,
                '',
                ['base_path' => $this->basePath,
'layout' => $viewLayout, 'contentType' =>
$this->contentType]
            );
        } catch (\Exception $e) {
            throw new \RuntimeException($e->getMessage());
        }

        $model = $this->getModel('export');

        try {
            $modelName = $model->getName();
        } catch (\Exception $e) {
            throw new \RuntimeException($e->getMessage());
        }

        $model->setState($modelName . '.request_id', $id);

        $view->setModel($model, true);

        $view->document = $this->app->getDocument();
        $view->export();

        return $this;
    }
}
components/com_privacy/src/Controller/ConsentsController.php000064400000002533151165467460020551
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_privacy
 *
 * @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\Privacy\Api\Controller;

use Joomla\CMS\MVC\Controller\ApiController;

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

/**
 * The consents controller
 *
 * @since  4.0.0
 */
class ConsentsController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'consents';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'consents';

    /**
     * Basic display of an item view
     *
     * @param   integer  $id  The primary key to display. Leave empty if
you want to retrieve data from the request
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayItem($id = null)
    {
        if ($id === null) {
            $id = $this->input->get('id', 0,
'int');
        }

        $this->input->set('model', $this->contentType);

        return parent::displayItem($id);
    }
}
components/com_privacy/src/View/Consents/JsonapiView.php000064400000005604151165467460017534
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_privacy
 *
 * @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\Privacy\Api\View\Consents;

use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\CMS\Router\Exception\RouteNotFoundException;
use Joomla\CMS\Serializer\JoomlaSerializer;
use Joomla\CMS\Uri\Uri;
use Tobscure\JsonApi\Resource;

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

/**
 * The consents view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'user_id',
        'state',
        'created',
        'subject',
        'body',
        'remind',
        'token',
        'username',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'user_id',
        'state',
        'created',
        'subject',
        'body',
        'remind',
        'token',
        'username',
    ];

    /**
     * Execute and display a template script.
     *
     * @param   object  $item  Item
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayItem($item = null)
    {
        $id = $this->get('state')->get($this->getName()
. '.id');

        if ($id === null) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_ITEMID_MISSING'));
        }

        /** @var \Joomla\CMS\MVC\Model\ListModel $model */
        $model       = $this->getModel();
        $displayItem = null;

        foreach ($model->getItems() as $item) {
            $item = $this->prepareItem($item);

            if ($item->id === $id) {
                $displayItem = $item;
                break;
            }
        }

        if ($displayItem === null) {
            throw new RouteNotFoundException('Item does not
exist');
        }

        // Check for errors.
        if (\count($errors = $this->get('Errors'))) {
            throw new GenericDataException(implode("\n",
$errors), 500);
        }

        if ($this->type === null) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_CONTENT_TYPE_MISSING'));
        }

        $serializer = new JoomlaSerializer($this->type);
        $element    = (new Resource($displayItem, $serializer))
            ->fields([$this->type =>
$this->fieldsToRenderItem]);

        $this->getDocument()->setData($element);
        $this->getDocument()->addLink('self',
Uri::current());

        return $this->getDocument()->render();
    }
}
components/com_privacy/src/View/Requests/JsonapiView.php000064400000003527151165467460017555
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_privacy
 *
 * @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\Privacy\Api\View\Requests;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\CMS\Router\Exception\RouteNotFoundException;
use Joomla\CMS\Serializer\JoomlaSerializer;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Privacy\Administrator\Model\ExportModel;
use Tobscure\JsonApi\Resource;

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

/**
 * The requests view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = ['id', 'typeAlias',
'email', 'requested_at', 'status',
'request_type'];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = ['id', 'email',
'requested_at', 'status', 'request_type'];

    /**
     * Execute and display a template script.
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function export()
    {
        /** @var ExportModel $model */
        $model = $this->getModel();

        $exportData = $model->collectDataForExportRequest();

        if ($exportData == false) {
            throw new RouteNotFoundException('Item does not
exist');
        }

        $serializer = new JoomlaSerializer('export');
        $element    = (new Resource($exportData, $serializer));

        $this->getDocument()->setData($element);
        $this->getDocument()->addLink('self',
Uri::current());

        return $this->getDocument()->render();
    }
}
components/com_newsfeeds/src/Controller/FeedsController.php000064400000001503151165467460020305
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_newsfeeds
 *
 * @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\Newsfeeds\Api\Controller;

use Joomla\CMS\MVC\Controller\ApiController;

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

/**
 * The feeds controller
 *
 * @since  4.0.0
 */
class FeedsController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'newsfeeds';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'feeds';
}
components/com_newsfeeds/src/View/Feeds/JsonapiView.php000064400000010131151165467460017263
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_newsfeeds
 *
 * @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\Newsfeeds\Api\View\Feeds;

use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\Component\Newsfeeds\Api\Serializer\NewsfeedSerializer;

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

/**
 * The feeds view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'category',
        'name',
        'alias',
        'link',
        'published',
        'numarticles',
        'cache_time',
        'checked_out',
        'checked_out_time',
        'ordering',
        'rtl',
        'access',
        'language',
        'params',
        'created',
        'created_by',
        'created_by_alias',
        'modified',
        'modified_by',
        'metakey',
        'metadesc',
        'metadata',
        'publish_up',
        'publish_down',
        'description',
        'version',
        'hits',
        'images',
        'tags',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'name',
        'alias',
        'checked_out',
        'checked_out_time',
        'category',
        'numarticles',
        'cache_time',
        'created_by',
        'published',
        'access',
        'ordering',
        'language',
        'publish_up',
        'publish_down',
        'language_title',
        'language_image',
        'editor',
        'access_level',
        'category_title',
    ];

    /**
     * The relationships the item has
     *
     * @var    array
     * @since  4.0.0
     */
    protected $relationship = [
        'category',
        'created_by',
        'modified_by',
        'tags',
    ];

    /**
     * Constructor.
     *
     * @param   array  $config  A named configuration array for object
construction.
     *                          contentType: the name (optional) of the
content type to use for the serialization
     *
     * @since   4.0.0
     */
    public function __construct($config = [])
    {
        if (\array_key_exists('contentType', $config)) {
            $this->serializer = new
NewsfeedSerializer($config['contentType']);
        }

        parent::__construct($config);
    }

    /**
     * Execute and display a template script.
     *
     * @param   object  $item  Item
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayItem($item = null)
    {
        if (Multilanguage::isEnabled()) {
            $this->fieldsToRenderItem[] =
'languageAssociations';
            $this->relationship[]       =
'languageAssociations';
        }

        return parent::displayItem();
    }

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.0.0
     */
    protected function prepareItem($item)
    {
        if (Multilanguage::isEnabled() &&
!empty($item->associations)) {
            $associations = [];

            foreach ($item->associations as $language =>
$association) {
                $itemId = explode(':', $association)[0];

                $associations[] = (object) [
                    'id'       => $itemId,
                    'language' => $language,
                ];
            }

            $item->associations = $associations;
        }

        if (!empty($item->tags->tags)) {
            $tagsIds   = explode(',', $item->tags->tags);
            $tagsNames = $item->tagsHelper->getTagNames($tagsIds);

            $item->tags = array_combine($tagsIds, $tagsNames);
        } else {
            $item->tags = [];
        }

        return parent::prepareItem($item);
    }
}
components/com_newsfeeds/src/Serializer/NewsfeedSerializer.php000064400000005703151165467460021001
0ustar00<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Newsfeeds\Api\Serializer;

use Joomla\CMS\Router\Route;
use Joomla\CMS\Serializer\JoomlaSerializer;
use Joomla\CMS\Tag\TagApiSerializerTrait;
use Joomla\CMS\Uri\Uri;
use Tobscure\JsonApi\Collection;
use Tobscure\JsonApi\Relationship;
use Tobscure\JsonApi\Resource;

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

/**
 * Temporary serializer
 *
 * @since  4.0.0
 */
class NewsfeedSerializer extends JoomlaSerializer
{
    use TagApiSerializerTrait;

    /**
     * Build content relationships by associations
     *
     * @param   \stdClass  $model  Item model
     *
     * @return  Relationship
     *
     * @since 4.0.0
     */
    public function languageAssociations($model)
    {
        $resources = [];

        // @todo: This can't be hardcoded in the future?
        $serializer = new JoomlaSerializer($this->type);

        foreach ($model->associations as $association) {
            $resources[] = (new Resource($association, $serializer))
                ->addLink('self',
Route::link('site', Uri::root() .
'api/index.php/v1/newsfeeds/feeds/' . $association->id));
        }

        $collection = new Collection($resources, $serializer);

        return new Relationship($collection);
    }

    /**
     * Build category relationship
     *
     * @param   \stdClass  $model  Item model
     *
     * @return  Relationship
     *
     * @since 4.0.0
     */
    public function category($model)
    {
        $serializer = new JoomlaSerializer('categories');

        $resource = (new Resource($model->catid, $serializer))
            ->addLink('self', Route::link('site',
Uri::root() . 'api/index.php/v1/newfeeds/categories/' .
$model->catid));

        return new Relationship($resource);
    }

    /**
     * Build category relationship
     *
     * @param   \stdClass  $model  Item model
     *
     * @return  Relationship
     *
     * @since 4.0.0
     */
    public function createdBy($model)
    {
        $serializer = new JoomlaSerializer('users');

        $resource = (new Resource($model->created_by, $serializer))
            ->addLink('self', Route::link('site',
Uri::root() . 'api/index.php/v1/users/' .
$model->created_by));

        return new Relationship($resource);
    }

    /**
     * Build editor relationship
     *
     * @param   \stdClass  $model  Item model
     *
     * @return  Relationship
     *
     * @since 4.0.0
     */
    public function modifiedBy($model)
    {
        $serializer = new JoomlaSerializer('users');

        $resource = (new Resource($model->modified_by, $serializer))
            ->addLink('self', Route::link('site',
Uri::root() . 'api/index.php/v1/users/' .
$model->modified_by));

        return new Relationship($resource);
    }
}
components/com_banners/src/Controller/BannersController.php000064400000001503151165467460020314
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_banners
 *
 * @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\Banners\Api\Controller;

use Joomla\CMS\MVC\Controller\ApiController;

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

/**
 * The banners controller
 *
 * @since  4.0.0
 */
class BannersController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'banners';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'banners';
}
components/com_banners/src/Controller/ClientsController.php000064400000001503151165467500020320
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_banners
 *
 * @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\Banners\Api\Controller;

use Joomla\CMS\MVC\Controller\ApiController;

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

/**
 * The clients controller
 *
 * @since  4.0.0
 */
class ClientsController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'clients';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'clients';
}
components/com_banners/src/View/Clients/JsonapiView.php000064400000002742151165467500017307
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_banners
 *
 * @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\Banners\Api\View\Clients;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;

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

/**
 * The clients view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'typeAlias',
        'id',
        'checked_out_time',
        'name',
        'contact',
        'email',
        'checked_out',
        'checked_out_time',
        'extrainfo',
        'state',
        'metakey',
        'own_prefix',
        'metakey_prefix',
        'purchase_type',
        'track_clicks',
        'track_impressions',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'name',
        'contact',
        'checked_out',
        'checked_out_time',
        'state',
        'metakey',
        'purchase_type',
        'nbanners',
        'editor',
        'count_published',
        'count_unpublished',
        'count_trashed',
        'count_archived',
    ];
}
components/com_banners/src/View/Banners/JsonapiView.php000064400000004030151165467500017266
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_banners
 *
 * @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\Banners\Api\View\Banners;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;

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

/**
 * The banners view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'typeAlias',
        'id',
        'cid',
        'type',
        'name',
        'alias',
        'imptotal',
        'impmade',
        'clicks',
        'clickurl',
        'state',
        'catid',
        'description',
        'custombannercode',
        'sticky',
        'ordering',
        'metakey',
        'params',
        'own_prefix',
        'metakey_prefix',
        'purchase_type',
        'track_clicks',
        'track_impressions',
        'checked_out',
        'checked_out_time',
        'publish_up',
        'publish_down',
        'reset',
        'created',
        'language',
        'created_by',
        'created_by_alias',
        'modified',
        'modified_by',
        'version',
        'contenthistoryHelper',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'name',
        'alias',
        'checked_out',
        'checked_out_time',
        'catid',
        'clicks',
        'metakey',
        'sticky',
        'impmade',
        'imptotal',
        'state',
        'ordering',
        'purchase_type',
        'language',
        'publish_up',
        'publish_down',
        'language_image',
        'editor',
        'category_title',
        'client_name',
        'client_purchase_type',
    ];
}
components/com_config/src/Controller/ApplicationController.php000064400000010025151165467500020776
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_config
 *
 * @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\Config\Api\Controller;

use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\Component\Config\Administrator\Model\ApplicationModel;
use Joomla\Component\Config\Api\View\Application\JsonapiView;
use Tobscure\JsonApi\Exception\InvalidParameterException;

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

/**
 * The application controller
 *
 * @since  4.0.0
 */
class ApplicationController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'application';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'application';

    /**
     * Basic display of a list view
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayList()
    {
        $viewType   = $this->app->getDocument()->getType();
        $viewLayout = $this->input->get('layout',
'default', 'string');

        try {
            /** @var JsonapiView $view */
            $view = $this->getView(
                $this->default_view,
                $viewType,
                '',
                ['base_path' => $this->basePath,
'layout' => $viewLayout, 'contentType' =>
$this->contentType]
            );
        } catch (\Exception $e) {
            throw new \RuntimeException($e->getMessage());
        }

        /** @var ApplicationModel $model */
        $model = $this->getModel($this->contentType);

        if (!$model) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_MODEL_CREATE'),
500);
        }

        // Push the model into the view (as default)
        $view->setModel($model, true);

        $view->document = $this->app->getDocument();
        $view->displayList();

        return $this;
    }

    /**
     * Method to edit an existing record.
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function edit()
    {
        /** @var ApplicationModel $model */
        $model = $this->getModel($this->contentType);

        if (!$model) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_MODEL_CREATE'),
500);
        }

        // Access check.
        if (!$this->allowEdit()) {
            throw new
NotAllowed('JLIB_APPLICATION_ERROR_CREATE_RECORD_NOT_PERMITTED',
403);
        }

        $data = json_decode($this->input->json->getRaw(), true);

        // Complete data array if needed
        $oldData = $model->getData();
        $data    = array_replace($oldData, $data);

        // @todo: Not the cleanest thing ever but it works...
        Form::addFormPath(JPATH_COMPONENT_ADMINISTRATOR .
'/forms');

        // Must load after serving service-requests
        $form = $model->getForm();

        // Validate the posted data.
        $validData = $model->validate($form, $data);

        // Check for validation errors.
        if ($validData === false) {
            $errors   = $model->getErrors();
            $messages = [];

            for ($i = 0, $n = \count($errors); $i < $n && $i
< 3; $i++) {
                if ($errors[$i] instanceof \Exception) {
                    $messages[] =
"{$errors[$i]->getMessage()}";
                } else {
                    $messages[] = "{$errors[$i]}";
                }
            }

            throw new InvalidParameterException(implode("\n",
$messages));
        }

        if (!$model->save($validData)) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_SERVER'), 500);
        }

        return $this;
    }
}
components/com_config/src/Controller/ComponentController.php000064400000010720151165467500020477
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_config
 *
 * @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\Config\Api\Controller;

use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Extension\ExtensionHelper;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\Component\Config\Administrator\Model\ComponentModel;
use Joomla\Component\Config\Api\View\Component\JsonapiView;
use Tobscure\JsonApi\Exception\InvalidParameterException;

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

/**
 * The component controller
 *
 * @since  4.0.0
 */
class ComponentController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'component';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'component';

    /**
     * Basic display of a list view
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayList()
    {
        $viewType   = $this->app->getDocument()->getType();
        $viewLayout = $this->input->get('layout',
'default', 'string');

        try {
            /** @var JsonapiView $view */
            $view = $this->getView(
                $this->default_view,
                $viewType,
                '',
                ['base_path' => $this->basePath,
'layout' => $viewLayout, 'contentType' =>
$this->contentType]
            );
        } catch (\Exception $e) {
            throw new \RuntimeException($e->getMessage());
        }

        /** @var ComponentModel $model */
        $model = $this->getModel($this->contentType);

        if (!$model) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_MODEL_CREATE'),
500);
        }

        // Push the model into the view (as default)
        $view->setModel($model, true);
        $view->set('component_name',
$this->input->get('component_name'));

        $view->document = $this->app->getDocument();
        $view->displayList();

        return $this;
    }

    /**
     * Method to edit an existing record.
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function edit()
    {
        /** @var ComponentModel $model */
        $model = $this->getModel($this->contentType);

        if (!$model) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_MODEL_CREATE'),
500);
        }

        // Access check.
        if (!$this->allowEdit()) {
            throw new
NotAllowed('JLIB_APPLICATION_ERROR_CREATE_RECORD_NOT_PERMITTED',
403);
        }

        $option = $this->input->get('component_name');

        // @todo: Not the cleanest thing ever but it works...
        Form::addFormPath(JPATH_ADMINISTRATOR . '/components/' .
$option);

        // Must load after serving service-requests
        $form = $model->getForm();

        $data = json_decode($this->input->json->getRaw(), true);

        $component = ComponentHelper::getComponent($option);
        $oldData   = $component->getParams()->toArray();
        $data      = array_replace($oldData, $data);

        // Validate the posted data.
        $validData = $model->validate($form, $data);

        if ($validData === false) {
            $errors   = $model->getErrors();
            $messages = [];

            for ($i = 0, $n = \count($errors); $i < $n && $i
< 3; $i++) {
                if ($errors[$i] instanceof \Exception) {
                    $messages[] =
"{$errors[$i]->getMessage()}";
                } else {
                    $messages[] = "{$errors[$i]}";
                }
            }

            throw new InvalidParameterException(implode("\n",
$messages));
        }

        // Attempt to save the configuration.
        $data = [
            'params' => $validData,
            'id'     =>
ExtensionHelper::getExtensionRecord($option,
'component')->extension_id,
            'option' => $option,
        ];

        if (!$model->save($data)) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_SERVER'), 500);
        }

        return $this;
    }
}
components/com_config/src/View/Application/JsonapiView.php000064400000010216151165467500017761
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_config
 *
 * @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\Config\Api\View\Application;

use Joomla\CMS\Extension\ExtensionHelper;
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\CMS\Serializer\JoomlaSerializer;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Config\Administrator\Model\ApplicationModel;
use Tobscure\JsonApi\Collection;

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

/**
 * The application view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * Execute and display a template script.
     *
     * @param   array|null  $items  Array of items
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayList(array $items = null)
    {
        /** @var ApplicationModel $model */
        $model = $this->getModel();
        $items = [];

        foreach ($model->getData() as $key => $value) {
            $item    = (object) [$key => $value];
            $items[] = $this->prepareItem($item);
        }

        // Set up links for pagination
        $currentUrl                    = Uri::getInstance();
        $currentPageDefaultInformation = ['offset' => 0,
'limit' => 20];
        $currentPageQuery              =
$currentUrl->getVar('page', $currentPageDefaultInformation);

        $offset              = $currentPageQuery['offset'];
        $limit               = $currentPageQuery['limit'];
        $totalItemsCount     = \count($items);
        $totalPagesAvailable = ceil($totalItemsCount / $limit);

        $items = array_splice($items, $offset, $limit);

        $this->getDocument()->addMeta('total-pages',
$totalPagesAvailable)
            ->addLink('self', (string) $currentUrl);

        // Check for first and previous pages
        if ($offset > 0) {
            $firstPage                = clone $currentUrl;
            $firstPageQuery           = $currentPageQuery;
            $firstPageQuery['offset'] = 0;
            $firstPage->setVar('page', $firstPageQuery);

            $previousPage                = clone $currentUrl;
            $previousPageQuery           = $currentPageQuery;
            $previousOffset              =
$currentPageQuery['offset'] - $limit;
            $previousPageQuery['offset'] = max($previousOffset,
0);
            $previousPage->setVar('page', $previousPageQuery);

            $this->getDocument()->addLink('first',
$this->queryEncode((string) $firstPage))
                ->addLink('previous',
$this->queryEncode((string) $previousPage));
        }

        // Check for next and last pages
        if ($offset + $limit < $totalItemsCount) {
            $nextPage                = clone $currentUrl;
            $nextPageQuery           = $currentPageQuery;
            $nextOffset              =
$currentPageQuery['offset'] + $limit;
            $nextPageQuery['offset'] = ($nextOffset >
($totalPagesAvailable * $limit)) ? $totalPagesAvailable - $limit :
$nextOffset;
            $nextPage->setVar('page', $nextPageQuery);

            $lastPage                = clone $currentUrl;
            $lastPageQuery           = $currentPageQuery;
            $lastPageQuery['offset'] = ($totalPagesAvailable - 1)
* $limit;
            $lastPage->setVar('page', $lastPageQuery);

            $this->getDocument()->addLink('next',
$this->queryEncode((string) $nextPage))
                ->addLink('last',
$this->queryEncode((string) $lastPage));
        }

        $collection = (new Collection($items, new
JoomlaSerializer($this->type)));

        // Set the data into the document and render it
        $this->getDocument()->setData($collection);

        return $this->getDocument()->render();
    }

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.0.0
     */
    protected function prepareItem($item)
    {
        $item->id =
ExtensionHelper::getExtensionRecord('joomla',
'file')->extension_id;

        return $item;
    }
}
components/com_config/src/View/Component/JsonapiView.php000064400000011150151165467500017456
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_config
 *
 * @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\Config\Api\View\Component;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Extension\ExtensionHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\CMS\Serializer\JoomlaSerializer;
use Joomla\CMS\Uri\Uri;
use Tobscure\JsonApi\Collection;

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

/**
 * The component view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * Execute and display a template script.
     *
     * @param   array|null  $items  Array of items
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayList(array $items = null)
    {
        try {
            $component =
ComponentHelper::getComponent($this->get('component_name'));

            if ($component === null || !$component->enabled) {
                // @todo: exception component unavailable
                throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_INVALID_COMPONENT_NAME'),
400);
            }

            $data = $component->getParams()->toObject();
        } catch (\Exception $e) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_SERVER'), 500,
$e);
        }

        $items = [];

        foreach ($data as $key => $value) {
            $item    = (object) [$key => $value];
            $items[] = $this->prepareItem($item);
        }

        // Set up links for pagination
        $currentUrl                    = Uri::getInstance();
        $currentPageDefaultInformation = ['offset' => 0,
'limit' => 20];
        $currentPageQuery              =
$currentUrl->getVar('page', $currentPageDefaultInformation);

        $offset              = $currentPageQuery['offset'];
        $limit               = $currentPageQuery['limit'];
        $totalItemsCount     = \count($items);
        $totalPagesAvailable = ceil($totalItemsCount / $limit);

        $items = array_splice($items, $offset, $limit);

        $this->getDocument()->addMeta('total-pages',
$totalPagesAvailable)
            ->addLink('self', (string) $currentUrl);

        // Check for first and previous pages
        if ($offset > 0) {
            $firstPage                = clone $currentUrl;
            $firstPageQuery           = $currentPageQuery;
            $firstPageQuery['offset'] = 0;
            $firstPage->setVar('page', $firstPageQuery);

            $previousPage                = clone $currentUrl;
            $previousPageQuery           = $currentPageQuery;
            $previousOffset              =
$currentPageQuery['offset'] - $limit;
            $previousPageQuery['offset'] = max($previousOffset,
0);
            $previousPage->setVar('page', $previousPageQuery);

            $this->getDocument()->addLink('first',
$this->queryEncode((string) $firstPage))
                ->addLink('previous',
$this->queryEncode((string) $previousPage));
        }

        // Check for next and last pages
        if ($offset + $limit < $totalItemsCount) {
            $nextPage                = clone $currentUrl;
            $nextPageQuery           = $currentPageQuery;
            $nextOffset              =
$currentPageQuery['offset'] + $limit;
            $nextPageQuery['offset'] = ($nextOffset >
($totalPagesAvailable * $limit)) ? $totalPagesAvailable - $limit :
$nextOffset;
            $nextPage->setVar('page', $nextPageQuery);

            $lastPage                = clone $currentUrl;
            $lastPageQuery           = $currentPageQuery;
            $lastPageQuery['offset'] = ($totalPagesAvailable - 1)
* $limit;
            $lastPage->setVar('page', $lastPageQuery);

            $this->getDocument()->addLink('next',
$this->queryEncode((string) $nextPage))
                ->addLink('last',
$this->queryEncode((string) $lastPage));
        }

        $collection = (new Collection($items, new
JoomlaSerializer($this->type)));

        // Set the data into the document and render it
        $this->getDocument()->setData($collection);

        return $this->getDocument()->render();
    }

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.0.0
     */
    protected function prepareItem($item)
    {
        $item->id =
ExtensionHelper::getExtensionRecord($this->get('component_name'),
'component')->extension_id;

        return $item;
    }
}
components/com_redirect/src/Controller/RedirectController.php000064400000001506151165467500020634
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_redirect
 *
 * @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\Redirect\Api\Controller;

use Joomla\CMS\MVC\Controller\ApiController;

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

/**
 * The redirect controller
 *
 * @since  4.0.0
 */
class RedirectController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'links';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'redirect';
}
components/com_redirect/src/View/Redirect/JsonapiView.php000064400000002333151165467500017614
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_redirect
 *
 * @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\Redirect\Api\View\Redirect;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;

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

/**
 * The redirect view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'old_url',
        'new_url',
        'referer',
        'comment',
        'hits',
        'published',
        'created_date',
        'modified_date',
        'header',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'old_url',
        'new_url',
        'referer',
        'comment',
        'hits',
        'published',
        'created_date',
        'modified_date',
        'header',
    ];
}
components/com_tags/src/Controller/TagsController.php000064400000002562151165467510017132
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_tags
 *
 * @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\Tags\Api\Controller;

use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\MVC\Controller\ApiController;

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

/**
 * The tags controller
 *
 * @since  4.0.0
 */
class TagsController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'tags';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'tags';

    /**
     * Basic display of a list view
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   5.1.0
     */
    public function displayList()
    {
        $apiFilterInfo = $this->input->get('filter', [],
'array');
        $filter        = InputFilter::getInstance();

        if (\array_key_exists('search', $apiFilterInfo)) {
            $this->modelState->set('filter.search',
$filter->clean($apiFilterInfo['search'], 'STRING'));
        }

        return parent::displayList();
    }
}
components/com_tags/src/View/Tags/JsonapiView.php000064400000003542151165467510016112
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_tags
 *
 * @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\Tags\Api\View\Tags;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;

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

/**
 * The tags view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'parent_id',
        'level',
        'lft',
        'rgt',
        'alias',
        'typeAlias',
        'path',
        'title',
        'note',
        'description',
        'published',
        'checked_out',
        'checked_out_time',
        'access',
        'params',
        'metadesc',
        'metakey',
        'metadata',
        'created_user_id',
        'created_time',
        'created_by_alias',
        'modified_user_id',
        'modified_time',
        'images',
        'urls',
        'hits',
        'language',
        'version',
        'publish_up',
        'publish_down',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'title',
        'alias',
        'note',
        'published',
        'access',
        'description',
        'checked_out',
        'checked_out_time',
        'created_user_id',
        'path',
        'parent_id',
        'level',
        'lft',
        'rgt',
        'language',
        'language_title',
        'language_image',
        'editor',
        'author_name',
        'access_title',
    ];
}
components/com_templates/src/Controller/StylesController.php000064400000005517151165467510020562
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_templates
 *
 * @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\Templates\Api\Controller;

use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\String\Inflector;
use Tobscure\JsonApi\Exception\InvalidParameterException;

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

/**
 * The styles controller
 *
 * @since  4.0.0
 */
class StylesController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'styles';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'styles';

    /**
     * Basic display of an item view
     *
     * @param   integer  $id  The primary key to display. Leave empty if
you want to retrieve data from the request
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayItem($id = null)
    {
        $this->modelState->set('client_id',
$this->getClientIdFromInput());

        return parent::displayItem($id);
    }

    /**
     * Basic display of a list view
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayList()
    {
        $this->modelState->set('client_id',
$this->getClientIdFromInput());

        return parent::displayList();
    }

    /**
     * Method to allow extended classes to manipulate the data to be saved
for an extension.
     *
     * @param   array  $data  An array of input data.
     *
     * @return  array
     *
     * @since   4.0.0
     * @throws  InvalidParameterException
     */
    protected function preprocessSaveData(array $data): array
    {
        $data['client_id'] = $this->getClientIdFromInput();

        // If we are updating an item the template is a readonly property
based on the ID
        if ($this->input->getMethod() === 'PATCH') {
            if (\array_key_exists('template', $data)) {
                unset($data['template']);
            }

            $model            =
$this->getModel(Inflector::singularize($this->contentType),
'', ['ignore_request' => true]);
            $data['template'] =
$model->getItem($this->input->getInt('id'))->template;
        }

        return $data;
    }

    /**
     * Get client id from input
     *
     * @return string
     *
     * @since 4.0.0
     */
    private function getClientIdFromInput()
    {
        return $this->input->exists('client_id') ?
$this->input->get('client_id') :
$this->input->post->get('client_id');
    }
}
components/com_templates/src/View/Styles/JsonapiView.php000064400000003146151165467510017537
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_templates
 *
 * @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\Templates\Api\View\Styles;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\CMS\Router\Exception\RouteNotFoundException;

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

/**
 * The styles view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'template',
        'client_id',
        'home',
        'title',
        'params',
        'xml',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'template',
        'title',
        'home',
        'client_id',
        'language_title',
        'image',
        'language_sef',
        'assigned',
        'e_id',
    ];

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.0.0
     */
    protected function prepareItem($item)
    {
        if ($item->client_id !=
$this->getModel()->getState('client_id')) {
            throw new RouteNotFoundException('Item does not
exist');
        }

        return parent::prepareItem($item);
    }
}
components/com_media/src/Model/AdapterModel.php000064400000002735151165467510015571
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_media
 *
 * @copyright   (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Media\Api\Model;

use Joomla\CMS\MVC\Model\BaseModel;
use
Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;

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

/**
 * Media web service model supporting a single adapter item.
 *
 * @since  4.1.0
 */
class AdapterModel extends BaseModel
{
    use ProviderManagerHelperTrait;

    /**
     * Method to get a single adapter.
     *
     * @return  \stdClass  The adapter.
     *
     * @since   4.1.0
     */
    public function getItem(): \stdClass
    {
        list($provider, $account) = array_pad(explode('-',
$this->getState('id'), 2), 2, null);

        if ($account === null) {
            throw new \Exception('Account was not set');
        }

        $provider = $this->getProvider($provider);
        $adapter  =
$this->getAdapter($this->getState('id'));

        $obj              = new \stdClass();
        $obj->id          = $provider->getID() . '-' .
$adapter->getAdapterName();
        $obj->provider_id = $provider->getID();
        $obj->name        = $adapter->getAdapterName();
        $obj->path        = $provider->getID() . '-' .
$adapter->getAdapterName() . ':/';

        return $obj;
    }
}
components/com_media/src/Model/AdaptersModel.php000064400000005740151165467510015753
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_media
 *
 * @copyright   (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Media\Api\Model;

use Joomla\CMS\MVC\Model\BaseModel;
use Joomla\CMS\MVC\Model\ListModelInterface;
use Joomla\CMS\Pagination\Pagination;
use
Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;

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

/**
 * Media web service model supporting lists of media adapters.
 *
 * @since  4.1.0
 */
class AdaptersModel extends BaseModel implements ListModelInterface
{
    use ProviderManagerHelperTrait;

    /**
     * A hacky way to enable the standard jsonapiView::displayList() to
create a Pagination object,
     * since com_media's ApiModel does not support pagination as we
know from regular ListModel derived models.
     *
     * @var    int
     * @since  4.1.0
     */
    private $total = 0;

    /**
     * Method to get a list of files and/or folders.
     *
     * @return  array  An array of data items.
     *
     * @since   4.1.0
     */
    public function getItems(): array
    {
        $adapters = [];
        foreach ($this->getProviderManager()->getProviders() as
$provider) {
            foreach ($provider->getAdapters() as $adapter) {
                $obj              = new \stdClass();
                $obj->id          = $provider->getID() .
'-' . $adapter->getAdapterName();
                $obj->provider_id = $provider->getID();
                $obj->name        = $adapter->getAdapterName();
                $obj->path        = $provider->getID() .
'-' . $adapter->getAdapterName() . ':/';

                $adapters[] = $obj;
            }
        }

        // A hacky way to enable the standard jsonapiView::displayList() to
create a Pagination object.
        $this->total = \count($adapters);

        return $adapters;
    }

    /**
     * Method to get a \JPagination object for the data set.
     *
     * @return  Pagination  A Pagination object for the data set.
     *
     * @since   4.1.0
     */
    public function getPagination(): Pagination
    {
        return new Pagination($this->getTotal(), $this->getStart(),
0);
    }

    /**
     * Method to get the starting number of items for the data set. Because
com_media's ApiModel
     * does not support pagination as we know from regular ListModel
derived models,
     * we always start at the top.
     *
     * @return  integer  The starting number of items available in the data
set.
     *
     * @since   4.1.0
     */
    public function getStart(): int
    {
        return 0;
    }

    /**
     * Method to get the total number of items for the data set.
     *
     * @return  integer  The total number of items available in the data
set.
     *
     * @since   4.1.0
     */
    public function getTotal(): int
    {
        return $this->total;
    }
}
components/com_media/src/Model/MediaModel.php000064400000007546151165467510015235
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_media
 *
 * @copyright   (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Media\Api\Model;

use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\Exception\ResourceNotFound;
use Joomla\CMS\MVC\Model\BaseModel;
use Joomla\CMS\MVC\Model\ListModelInterface;
use Joomla\CMS\Pagination\Pagination;
use Joomla\Component\Media\Administrator\Exception\FileNotFoundException;
use Joomla\Component\Media\Administrator\Model\ApiModel;
use
Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;

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

/**
 * Media web service model supporting lists of media items.
 *
 * @since  4.1.0
 */
class MediaModel extends BaseModel implements ListModelInterface
{
    use ProviderManagerHelperTrait;

    /**
     * Instance of com_media's ApiModel
     *
     * @var ApiModel
     * @since  4.1.0
     */
    private $mediaApiModel;

    /**
     * A hacky way to enable the standard jsonapiView::displayList() to
create a Pagination object,
     * since com_media's ApiModel does not support pagination as we
know from regular ListModel derived models.
     *
     * @var int
     * @since  4.1.0
     */
    private $total = 0;

    public function __construct($config = [])
    {
        parent::__construct($config);

        $this->mediaApiModel = new ApiModel();
    }

    /**
     * Method to get a list of files and/or folders.
     *
     * @return  array  An array of data items.
     *
     * @since   4.1.0
     */
    public function getItems(): array
    {
        // Map web service model state to com_media options.
        $options = [
            'url'       => $this->getState('url',
false),
            'temp'      =>
$this->getState('temp', false),
            'search'    =>
$this->getState('search', ''),
            'recursive' =>
$this->getState('search_recursive', false),
            'content'   =>
$this->getState('content', false),
        ];

        ['adapter' => $adapterName, 'path' =>
$path] =
$this->resolveAdapterAndPath($this->getState('path',
''));
        try {
            $files = $this->mediaApiModel->getFiles($adapterName,
$path, $options);
        } catch (FileNotFoundException $e) {
            throw new ResourceNotFound(
               
Text::sprintf('WEBSERVICE_COM_MEDIA_FILE_NOT_FOUND', $path),
                404
            );
        }

        /**
         * A hacky way to enable the standard jsonapiView::displayList() to
create a Pagination object.
         * Because com_media's ApiModel does not support pagination as
we know from regular ListModel
         * derived models, we always return all retrieved items.
         */
        $this->total = \count($files);

        return $files;
    }

    /**
     * Method to get a \JPagination object for the data set.
     *
     * @return  Pagination  A Pagination object for the data set.
     *
     * @since   4.1.0
     */
    public function getPagination(): Pagination
    {
        return new Pagination($this->getTotal(), $this->getStart(),
0);
    }

    /**
     * Method to get the starting number of items for the data set. Because
com_media's ApiModel
     * does not support pagination as we know from regular ListModel
derived models,
     * we always start at the top.
     *
     * @return  int  The starting number of items available in the data
set.
     *
     * @since   4.1.0
     */
    public function getStart(): int
    {
        return 0;
    }

    /**
     * Method to get the total number of items for the data set.
     *
     * @return  int  The total number of items available in the data set.
     *
     * @since   4.1.0
     */
    public function getTotal(): int
    {
        return $this->total;
    }
}
components/com_media/src/Model/MediumModel.php000064400000020111151165467510015415
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_media
 *
 * @copyright   (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Media\Api\Model;

use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\Exception\ResourceNotFound;
use Joomla\CMS\MVC\Controller\Exception\Save;
use Joomla\CMS\MVC\Model\BaseModel;
use Joomla\Component\Media\Administrator\Exception\FileExistsException;
use Joomla\Component\Media\Administrator\Exception\FileNotFoundException;
use Joomla\Component\Media\Administrator\Exception\InvalidPathException;
use Joomla\Component\Media\Administrator\Model\ApiModel;
use
Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;

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

/**
 * Media web service model supporting a single media item.
 *
 * @since  4.1.0
 */
class MediumModel extends BaseModel
{
    use ProviderManagerHelperTrait;

    /**
     * Instance of com_media's ApiModel
     *
     * @var ApiModel
     * @since  4.1.0
     */
    private $mediaApiModel;

    public function __construct($config = [])
    {
        parent::__construct($config);

        $this->mediaApiModel = new ApiModel();
    }

    /**
     * Method to get a single files or folder.
     *
     * @return  \stdClass  A file or folder object.
     *
     * @since   4.1.0
     * @throws  ResourceNotFound
     */
    public function getItem()
    {
        $options = [
            'path'    => $this->getState('path',
''),
            'url'     => $this->getState('url',
false),
            'temp'    => $this->getState('temp',
false),
            'content' =>
$this->getState('content', false),
        ];

        ['adapter' => $adapterName, 'path' =>
$path] =
$this->resolveAdapterAndPath($this->getState('path',
''));

        try {
            return $this->mediaApiModel->getFile($adapterName, $path,
$options);
        } catch (FileNotFoundException $e) {
            throw new ResourceNotFound(
               
Text::sprintf('WEBSERVICE_COM_MEDIA_FILE_NOT_FOUND', $path),
                404
            );
        }
    }

    /**
     * Method to save a file or folder.
     *
     * @param   string  $path  The primary key of the item (if exists)
     *
     * @return  string   The path
     *
     * @since   4.1.0
     *
     * @throws  Save
     */
    public function save($path = null): string
    {
        $path     = $this->getState('path', '');
        $oldPath  = $this->getState('old_path', '');
        $content  = $this->getState('content', null);
        $override = $this->getState('override', false);

        ['adapter' => $adapterName, 'path' =>
$path] = $this->resolveAdapterAndPath($path);

        // Trim adapter information from path
        if ($pos = strpos($path, ':/')) {
            $path = substr($path, $pos + 1);
        }

        // Trim adapter information from old path
        if ($pos = strpos($oldPath, ':/')) {
            $oldPath = substr($oldPath, $pos + 1);
        }

        $resultPath = '';

        /**
         * If we have a (new) path and an old path, we want to move an
existing
         * file or folder. This must be done before updating the content of
a file,
         * if also requested (see below).
         */
        if ($path && $oldPath) {
            try {
                // ApiModel::move() (or actually LocalAdapter::move())
returns a path with leading slash.
                $resultPath = trim(
                    $this->mediaApiModel->move($adapterName,
$oldPath, $path, $override),
                    '/'
                );
            } catch (FileNotFoundException $e) {
                throw new Save(
                    Text::sprintf(
                        'WEBSERVICE_COM_MEDIA_FILE_NOT_FOUND',
                        $oldPath
                    ),
                    404
                );
            }
        }

        // If we have a (new) path but no old path, we want to create a
        // new file or folder.
        if ($path && !$oldPath) {
            // com_media expects separate directory and file name.
            // If we moved the file before, we must use the new path.
            $basename = basename($resultPath ?: $path);
            $dirname  = \dirname($resultPath ?: $path);

            try {
                // If there is content, com_media's assumes the new
item is a file.
                // Otherwise a folder is assumed.
                $name = $content
                    ? $this->mediaApiModel->createFile(
                        $adapterName,
                        $basename,
                        $dirname,
                        $content,
                        $override
                    )
                    : $this->mediaApiModel->createFolder(
                        $adapterName,
                        $basename,
                        $dirname,
                        $override
                    );

                $resultPath = $dirname . '/' . $name;
            } catch (FileNotFoundException $e) {
                throw new Save(
                    Text::sprintf(
                        'WEBSERVICE_COM_MEDIA_FILE_NOT_FOUND',
                        $dirname . '/' . $basename
                    ),
                    404
                );
            } catch (FileExistsException $e) {
                throw new Save(
                    Text::sprintf(
                        'WEBSERVICE_COM_MEDIA_FILE_EXISTS',
                        $dirname . '/' . $basename
                    ),
                    400
                );
            } catch (InvalidPathException $e) {
                throw new Save(
                    Text::sprintf(
                        'WEBSERVICE_COM_MEDIA_BAD_FILE_TYPE',
                        $dirname . '/' . $basename
                    ),
                    400
                );
            }
        }

        // If we have no (new) path but we do have an old path and we have
content,
        // we want to update the contents of an existing file.
        if ($oldPath && $content) {
            // com_media expects separate directory and file name.
            // If we moved the file before, we must use the new path.
            $basename = basename($resultPath ?: $oldPath);
            $dirname  = \dirname($resultPath ?: $oldPath);

            try {
                $this->mediaApiModel->updateFile(
                    $adapterName,
                    $basename,
                    $dirname,
                    $content
                );
            } catch (FileNotFoundException $e) {
                throw new Save(
                    Text::sprintf(
                        'WEBSERVICE_COM_MEDIA_FILE_NOT_FOUND',
                        $dirname . '/' . $basename
                    ),
                    404
                );
            } catch (InvalidPathException $e) {
                throw new Save(
                    Text::sprintf(
                        'WEBSERVICE_COM_MEDIA_BAD_FILE_TYPE',
                        $dirname . '/' . $basename
                    ),
                    400
                );
            }

            $resultPath = $resultPath ?: $oldPath;
        }

        // If we still have no result path, something fishy is going on.
        if (!$resultPath) {
            throw new Save(
                Text::_(
                   
'WEBSERVICE_COM_MEDIA_UNSUPPORTED_PARAMETER_COMBINATION'
                ),
                400
            );
        }

        return $resultPath;
    }

    /**
     * Method to delete an existing file or folder.
     *
     * @return  void
     *
     * @since   4.1.0
     * @throws  Save
     */
    public function delete(): void
    {
        ['adapter' => $adapterName, 'path' =>
$path] =
$this->resolveAdapterAndPath($this->getState('path',
''));

        try {
            $this->mediaApiModel->delete($adapterName, $path);
        } catch (FileNotFoundException $e) {
            throw new Save(
               
Text::sprintf('WEBSERVICE_COM_MEDIA_FILE_NOT_FOUND', $path),
                404
            );
        }
    }
}
components/com_media/src/Controller/MediaController.php000064400000027145151165467510017400
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_media
 *
 * @copyright   (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Media\Api\Controller;

use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\Component\Media\Administrator\Exception\FileExistsException;
use Joomla\Component\Media\Administrator\Exception\InvalidPathException;
use
Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;
use Joomla\Component\Media\Api\Model\MediumModel;
use Joomla\String\Inflector;
use Tobscure\JsonApi\Exception\InvalidParameterException;

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

/**
 * Media web service controller.
 *
 * @since  4.1.0
 */
class MediaController extends ApiController
{
    use ProviderManagerHelperTrait;

    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.1.0
     */
    protected $contentType = 'media';

    /**
     * Query parameters => model state mappings
     *
     * @var    array
     * @since  4.1.0
     */
    private static $listQueryModelStateMap = [
        'path' => [
            'name' => 'path',
            'type' => 'STRING',
        ],
        'url' => [
            'name' => 'url',
            'type' => 'BOOLEAN',
        ],
        'temp' => [
            'name' => 'temp',
            'type' => 'BOOLEAN',
        ],
        'content' => [
            'name' => 'content',
            'type' => 'BOOLEAN',
        ],
    ];

    /**
     * Item query parameters => model state mappings
     *
     * @var    array
     * @since  4.1.0
     */
    private static $itemQueryModelStateMap = [
        'path' => [
            'name' => 'path',
            'type' => 'STRING',
        ],
        'url' => [
            'name' => 'url',
            'type' => 'BOOLEAN',
        ],
        'temp' => [
            'name' => 'temp',
            'type' => 'BOOLEAN',
        ],
        'content' => [
            'name' => 'content',
            'type' => 'BOOLEAN',
        ],
    ];

    /**
     * The default view for the display method.
     *
     * @var    string
     *
     * @since  4.1.0
     */
    protected $default_view = 'media';

    /**
     * Display a list of files and/or folders.
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.1.0
     *
     * @throws  \Exception
     */
    public function displayList()
    {
        // Set list specific request parameters in model state.
        $this->setModelState(self::$listQueryModelStateMap);

        // Display files in specific path.
        if ($this->input->exists('path')) {
            $this->modelState->set('path',
$this->input->get('path', '',
'STRING'));
        }

        // Return files (not folders) as urls.
        if ($this->input->exists('url')) {
            $this->modelState->set('url',
$this->input->get('url', true, 'BOOLEAN'));
        }

        // Map JSON:API compliant filter[search] to com_media model state.
        $apiFilterInfo = $this->input->get('filter', [],
'array');
        $filter        = InputFilter::getInstance();

        // Search for files matching (part of) a name or glob pattern.
        if (\array_key_exists('search', $apiFilterInfo)) {
            $this->modelState->set('search',
$filter->clean($apiFilterInfo['search'], 'STRING'));

            // Tell model to search recursively
            $this->modelState->set('search_recursive',
$this->input->get('search_recursive', false,
'BOOLEAN'));
        }

        return parent::displayList();
    }

    /**
     * Display one specific file or folder.
     *
     * @param   string  $path  The path of the file to display. Leave empty
if you want to retrieve data from the request.
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.1.0
     *
     * @throws  InvalidPathException
     * @throws  \Exception
     */
    public function displayItem($path = '')
    {
        // Set list specific request parameters in model state.
        $this->setModelState(self::$itemQueryModelStateMap);

        // Display files in specific path.
        $this->modelState->set('path', $path ?:
$this->input->get('path', '',
'STRING'));

        // Return files (not folders) as urls.
        if ($this->input->exists('url')) {
            $this->modelState->set('url',
$this->input->get('url', true, 'BOOLEAN'));
        }

        return parent::displayItem();
    }

    /**
     * Set model state using a list of mappings between query parameters
and model state names.
     *
     * @param   array  $mappings  A list of mappings between query
parameters and model state names.
     *
     * @return  void
     *
     * @since   4.1.0
     */
    private function setModelState(array $mappings): void
    {
        foreach ($mappings as $queryName => $modelState) {
            if ($this->input->exists($queryName)) {
                $this->modelState->set($modelState['name'],
$this->input->get($queryName, '',
$modelState['type']));
            }
        }
    }

    /**
     * Method to add a new file or folder.
     *
     * @return  void
     *
     * @since   4.1.0
     *
     * @throws  FileExistsException
     * @throws  InvalidPathException
     * @throws  InvalidParameterException
     * @throws  \RuntimeException
     * @throws  \Exception
     */
    public function add(): void
    {
        $path    = $this->input->json->get('path',
'', 'STRING');
        $content = $this->input->json->get('content',
'', 'RAW');

        $missingParameters = [];

        if (empty($path)) {
            $missingParameters[] = 'path';
        }

        // Content is only required when it is a file
        if (empty($content) && strpos($path, '.') !==
false) {
            $missingParameters[] = 'content';
        }

        if (\count($missingParameters)) {
            throw new InvalidParameterException(
               
Text::sprintf('WEBSERVICE_COM_MEDIA_MISSING_REQUIRED_PARAMETERS',
implode(' & ', $missingParameters))
            );
        }

        $this->modelState->set('path',
$this->input->json->get('path', '',
'STRING'));

        // Check if an existing file may be overwritten. Defaults to false.
        $this->modelState->set('override',
$this->input->json->get('override', false));

        parent::add();
    }

    /**
     * Method to check if it's allowed to add a new file or folder
     *
     * @param   array  $data  An array of input data.
     *
     * @return  boolean
     *
     * @since   4.1.0
     */
    protected function allowAdd($data = []): bool
    {
        $user = $this->app->getIdentity();

        return $user->authorise('core.create',
'com_media');
    }

    /**
     * Method to modify an existing file or folder.
     *
     * @return  void
     *
     * @since   4.1.0
     *
     * @throws  FileExistsException
     * @throws  InvalidPathException
     * @throws  \RuntimeException
     * @throws  \Exception
     */
    public function edit(): void
    {
        // Access check.
        if (!$this->allowEdit()) {
            throw new
NotAllowed('JLIB_APPLICATION_ERROR_CREATE_RECORD_NOT_PERMITTED',
403);
        }

        $path    = $this->input->json->get('path',
'', 'STRING');
        $content = $this->input->json->get('content',
'', 'RAW');

        if (empty($path) && empty($content)) {
            throw new InvalidParameterException(
               
Text::sprintf('WEBSERVICE_COM_MEDIA_MISSING_REQUIRED_PARAMETERS',
'path | content')
            );
        }

        $this->modelState->set('path',
$this->input->json->get('path', '',
'STRING'));
        // For renaming/moving files, we need the path to the existing file
or folder.
        $this->modelState->set('old_path',
$this->input->get('path', '',
'STRING'));
        // Check if an existing file may be overwritten. Defaults to true.
        $this->modelState->set('override',
$this->input->json->get('override', true));

        $recordId = $this->save();

        $this->displayItem($recordId);
    }

    /**
     * Method to check if it's allowed to modify an existing file or
folder.
     *
     * @param   array  $data  An array of input data.
     *
     * @return  boolean
     *
     * @since   4.1.0
     */
    protected function allowEdit($data = [], $key = 'id'): bool
    {
        $user = $this->app->getIdentity();

        // com_media's access rules contains no specific update rule.
        return $user->authorise('core.edit',
'com_media');
    }

    /**
     * Method to create or modify a file or folder.
     *
     * @param   integer  $recordKey  The primary key of the item (if
exists)
     *
     * @return  string   The path
     *
     * @since   4.1.0
     */
    protected function save($recordKey = null)
    {
        // Explicitly get the single item model name.
        $modelName = $this->input->get('model',
Inflector::singularize($this->contentType));

        /** @var MediumModel $model */
        $model = $this->getModel($modelName, '',
['ignore_request' => true, 'state' =>
$this->modelState]);

        $json = $this->input->json;

        // Decode content, if any
        if ($content = base64_decode($json->get('content',
'', 'raw'))) {
            $this->checkContent();
        }

        // If there is no content, com_media assumes the path refers to a
folder.
        $this->modelState->set('content', $content);

        return $model->save();
    }

    /**
     * Performs various checks to see if it is allowed to save the content.
     *
     * @return  void
     *
     * @since   4.1.0
     *
     * @throws  \RuntimeException
     */
    private function checkContent(): void
    {
        $params       = ComponentHelper::getParams('com_media');
        $helper       = new \Joomla\CMS\Helper\MediaHelper();
        $serverlength =
$this->input->server->getInt('CONTENT_LENGTH');

        // Check if the size of the request body does not exceed various
server imposed limits.
        if (
            ($params->get('upload_maxsize', 0) > 0
&& $serverlength > ($params->get('upload_maxsize',
0) * 1024 * 1024))
            || $serverlength >
$helper->toBytes(\ini_get('upload_max_filesize'))
            || $serverlength >
$helper->toBytes(\ini_get('post_max_size'))
            || $serverlength >
$helper->toBytes(\ini_get('memory_limit'))
        ) {
            throw new
\RuntimeException(Text::_('COM_MEDIA_ERROR_WARNFILETOOLARGE'),
400);
        }
    }

    /**
     * Method to delete an existing file or folder.
     *
     * @return  void
     *
     * @since   4.1.0
     *
     * @throws  InvalidPathException
     * @throws  \RuntimeException
     * @throws  \Exception
     */
    public function delete($id = null): void
    {
        if (!$this->allowDelete()) {
            throw new
NotAllowed('JLIB_APPLICATION_ERROR_DELETE_NOT_PERMITTED', 403);
        }

        $this->modelState->set('path',
$this->input->get('path', '',
'STRING'));

        $modelName = $this->input->get('model',
Inflector::singularize($this->contentType));
        $model     = $this->getModel($modelName, '',
['ignore_request' => true, 'state' =>
$this->modelState]);

        $model->delete();

        $this->app->setHeader('status', 204);
    }

    /**
     * Method to check if it's allowed to delete an existing file or
folder.
     *
     * @return  boolean
     *
     * @since   4.1.0
     */
    protected function allowDelete(): bool
    {
        $user = $this->app->getIdentity();

        return $user->authorise('core.delete',
'com_media');
    }
}
components/com_media/src/Controller/AdaptersController.php000064400000003131151165467510020111
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_media
 *
 * @copyright   (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Media\Api\Controller;

use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\Component\Media\Administrator\Exception\InvalidPathException;
use
Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;

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

/**
 * Media web service controller.
 *
 * @since  4.1.0
 */
class AdaptersController extends ApiController
{
    use ProviderManagerHelperTrait;

    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.1.0
     */
    protected $contentType = 'adapters';

    /**
     * The default view for the display method.
     *
     * @var    string
     *
     * @since  4.1.0
     */
    protected $default_view = 'adapters';

    /**
     * Display one specific adapter.
     *
     * @param   string  $path  The path of the file to display. Leave empty
if you want to retrieve data from the request.
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @throws  InvalidPathException
     * @throws  \Exception
     *
     * @since   4.1.0
     */
    public function displayItem($path = '')
    {
        // Set the id as the parent sets it as int
        $this->modelState->set('id',
$this->input->get('id', '', 'string'));

        return parent::displayItem();
    }
}
components/com_media/src/View/Adapters/JsonapiView.php000064400000002073151165467510017076
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_media
 *
 * @copyright   (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Media\Api\View\Adapters;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use
Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;

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

/**
 * Media web service view
 *
 * @since  4.1.0
 */
class JsonapiView extends BaseApiView
{
    use ProviderManagerHelperTrait;

    /**
     * The fields to render item in the documents
     *
     * @var    array
     * @since  4.1.0
     */
    protected $fieldsToRenderItem = [
        'provider_id',
        'name',
        'path',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var    array
     * @since  4.1.0
     */
    protected $fieldsToRenderList = [
        'provider_id',
        'name',
        'path',
    ];
}
components/com_media/src/View/Media/JsonapiView.php000064400000003671151165467510016357
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_media
 *
 * @copyright   (C) 2021 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Media\Api\View\Media;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use
Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;

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

/**
 * Media web service view
 *
 * @since  4.1.0
 */
class JsonapiView extends BaseApiView
{
    use ProviderManagerHelperTrait;

    /**
     * The fields to render item in the documents
     *
     * @var    array
     * @since  4.1.0
     */
    protected $fieldsToRenderItem = [
        'type',
        'name',
        'path',
        'extension',
        'size',
        'mime_type',
        'width',
        'height',
        'create_date',
        'create_date_formatted',
        'modified_date',
        'modified_date_formatted',
        'thumb_path',
        'adapter',
        'content',
        'url',
        'tempUrl',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var    array
     * @since  4.1.0
     */
    protected $fieldsToRenderList = [
        'type',
        'name',
        'path',
        'extension',
        'size',
        'mime_type',
        'width',
        'height',
        'create_date',
        'create_date_formatted',
        'modified_date',
        'modified_date_formatted',
        'thumb_path',
        'adapter',
        'content',
        'url',
        'tempUrl',
    ];

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.1.0
     */
    protected function prepareItem($item)
    {
        // Media resources have no id.
        $item->id = '0';

        return $item;
    }
}
components/com_installer/src/Controller/ManageController.php000064400000003674151165467510020470
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_installer
 *
 * @copyright   (C) 2020 Open Source Matters, Inc.
<https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

namespace Joomla\Component\Installer\Api\Controller;

use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
use Tobscure\JsonApi\Exception\InvalidParameterException;

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

/**
 * The manage controller
 *
 * @since  4.0.0
 */
class ManageController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'manage';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $default_view = 'manage';

    /**
     * Extension list view amended to add filtering of data
     *
     * @return  static  A BaseController object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayList()
    {
        $requestBool = $this->input->get('core',
$this->input->get->get('core'));

        if (!\is_null($requestBool) && $requestBool !==
'true' && $requestBool !== 'false') {
            // Send the error response
            $error =
Text::sprintf('JLIB_FORM_VALIDATE_FIELD_INVALID',
'core');

            throw new InvalidParameterException($error, 400, null,
'core');
        }

        if (!\is_null($requestBool)) {
            $this->modelState->set('filter.core',
($requestBool === 'true') ? '1' : '0');
        }

        $this->modelState->set('filter.status',
$this->input->get('status',
$this->input->get->get('status', null, 'INT'),
'INT'));
        $this->modelState->set('filter.type',
$this->input->get('type',
$this->input->get->get('type', null,
'STRING'), 'STRING'));

        return parent::displayList();
    }
}
components/com_installer/src/View/Manage/JsonapiView.php000064400000002155151165467510017442
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_installer
 *
 * @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\Installer\Api\View\Manage;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;

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

/**
 * The manage view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'name',
        'type',
        'version',
        'folder',
        'status',
        'client_id',
    ];

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.0.0
     */
    protected function prepareItem($item)
    {
        $item->id = $item->extension_id;
        unset($item->extension_id);

        return $item;
    }
}
components/com_languages/src/Controller/StringsController.php000064400000007025151165467510020674
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_languages
 *
 * @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\Languages\Api\Controller;

use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
use Tobscure\JsonApi\Exception\InvalidParameterException;

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

/**
 * The strings controller
 *
 * @since  4.0.0
 */
class StringsController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'strings';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'strings';

    /**
     * Search by languages constants
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @throws  InvalidParameterException
     * @since   4.0.0
     */
    public function search()
    {
        $data = $this->input->get('data',
json_decode($this->input->json->getRaw(), true),
'array');

        if (!isset($data['searchstring']) ||
!\is_string($data['searchstring'])) {
            throw new InvalidParameterException("Invalid param
'searchstring'");
        }

        if (!isset($data['searchtype']) ||
!\in_array($data['searchtype'], ['constant',
'value'])) {
            throw new InvalidParameterException("Invalid param
'searchtype'");
        }

        $this->input->set('searchstring',
$data['searchstring']);
        $this->input->set('searchtype',
$data['searchtype']);
        $this->input->set('more', 0);

        $viewType   = $this->app->getDocument()->getType();
        $viewName   = $this->input->get('view',
$this->default_view);
        $viewLayout = $this->input->get('layout',
'default', 'string');

        try {
            /** @var
\Joomla\Component\Languages\Api\View\Strings\JsonapiView $view */
            $view = $this->getView(
                $viewName,
                $viewType,
                '',
                ['base_path' => $this->basePath,
'layout' => $viewLayout, 'contentType' =>
$this->contentType]
            );
        } catch (\Exception $e) {
            throw new \RuntimeException($e->getMessage());
        }

        /** @var
\Joomla\Component\Languages\Administrator\Model\StringsModel $model */
        $model = $this->getModel($this->contentType, '',
['ignore_request' => true]);

        if (!$model) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_MODEL_CREATE'));
        }

        // Push the model into the view (as default)
        $view->setModel($model, true);

        $view->document = $this->app->getDocument();
        $view->displayList();

        return $this;
    }

    /**
     * Refresh cache
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @throws \Exception
     * @since   4.0.0
     */
    public function refresh()
    {
        /** @var
\Joomla\Component\Languages\Administrator\Model\StringsModel $model */
        $model = $this->getModel($this->contentType, '',
['ignore_request' => true]);

        if (!$model) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_MODEL_CREATE'));
        }

        $result = $model->refresh();

        if ($result instanceof \Exception) {
            throw $result;
        }

        return $this;
    }
}
components/com_languages/src/Controller/LanguagesController.php000064400000001517151165467510021151
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_languages
 *
 * @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\Languages\Api\Controller;

use Joomla\CMS\MVC\Controller\ApiController;

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

/**
 * The languages controller
 *
 * @since  4.0.0
 */
class LanguagesController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'languages';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'languages';
}
components/com_languages/src/Controller/OverridesController.php000064400000012033151165467510021200
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_languages
 *
 * @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\Languages\Api\Controller;

use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\CMS\MVC\Controller\Exception;
use Joomla\String\Inflector;
use Tobscure\JsonApi\Exception\InvalidParameterException;

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

/**
 * The overrides controller
 *
 * @since  4.0.0
 */
class OverridesController extends ApiController
{
    /**
     * The content type of the item.
     *
     * @var    string
     * @since  4.0.0
     */
    protected $contentType = 'overrides';

    /**
     * The default view for the display method.
     *
     * @var    string
     * @since  3.0
     */
    protected $default_view = 'overrides';

    /**
     * Basic display of an item view
     *
     * @param   integer  $id  The primary key to display. Leave empty if
you want to retrieve data from the request
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayItem($id = null)
    {
        $this->modelState->set('filter.language',
$this->getLanguageFromInput());
        $this->modelState->set('filter.client',
$this->getClientFromInput());

        return parent::displayItem($id);
    }

    /**
     * Basic display of a list view
     *
     * @return  static  A \JControllerLegacy object to support chaining.
     *
     * @since   4.0.0
     */
    public function displayList()
    {
        $this->modelState->set('filter.language',
$this->getLanguageFromInput());
        $this->modelState->set('filter.client',
$this->getClientFromInput());

        return parent::displayList();
    }

    /**
     * Method to save a record.
     *
     * @param   integer  $recordKey  The primary key of the item (if
exists)
     *
     * @return  integer  The record ID on success, false on failure
     *
     * @since   4.0.0
     */
    protected function save($recordKey = null)
    {
        /** @var \Joomla\CMS\MVC\Model\AdminModel $model */
        $model =
$this->getModel(Inflector::singularize($this->contentType));

        if (!$model) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_MODEL_CREATE'));
        }

        $model->setState('filter.language',
$this->input->post->get('lang_code'));
        $model->setState('filter.client',
$this->input->post->get('app'));

        $data = $this->input->get('data',
json_decode($this->input->json->getRaw(), true),
'array');

        // @todo: Not the cleanest thing ever but it works...
        Form::addFormPath(JPATH_COMPONENT_ADMINISTRATOR .
'/forms');

        // Validate the posted data.
        $form = $model->getForm($data, false);

        if (!$form) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_FORM_CREATE'));
        }

        // Test whether the data is valid.
        $validData = $model->validate($form, $data);

        // Check for validation errors.
        if ($validData === false) {
            $errors   = $model->getErrors();
            $messages = [];

            for ($i = 0, $n = \count($errors); $i < $n && $i
< 3; $i++) {
                if ($errors[$i] instanceof \Exception) {
                    $messages[] =
"{$errors[$i]->getMessage()}";
                } else {
                    $messages[] = "{$errors[$i]}";
                }
            }

            throw new InvalidParameterException(implode("\n",
$messages));
        }

        if (!isset($validData['tags'])) {
            $validData['tags'] = [];
        }

        if (!$model->save($validData)) {
            throw new
Exception\Save(Text::sprintf('JLIB_APPLICATION_ERROR_SAVE_FAILED',
$model->getError()));
        }

        return $validData['key'];
    }

    /**
     * Removes an item.
     *
     * @param   integer  $id  The primary key to delete item.
     *
     * @return  void
     *
     * @since   4.0.0
     */
    public function delete($id = null)
    {
        $id = $this->input->get('id', '',
'string');

        $this->input->set('model', $this->contentType);

        $this->modelState->set('filter.language',
$this->getLanguageFromInput());
        $this->modelState->set('filter.client',
$this->getClientFromInput());

        parent::delete($id);
    }

    /**
     * Get client code from input
     *
     * @return string
     *
     * @since 4.0.0
     */
    private function getClientFromInput()
    {
        return $this->input->exists('app') ?
$this->input->get('app') :
$this->input->post->get('app');
    }

    /**
     * Get language code from input
     *
     * @return string
     *
     * @since 4.0.0
     */
    private function getLanguageFromInput()
    {
        return $this->input->exists('lang_code') ?
            $this->input->get('lang_code') :
$this->input->post->get('lang_code');
    }
}
components/com_languages/src/View/Languages/JsonapiView.php000064400000003417151165467510020133
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_languages
 *
 * @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\Languages\Api\View\Languages;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;

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

/**
 * The languages view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = [
        'id',
        'asset_id',
        'lang_code',
        'title',
        'title_native',
        'sef',
        'image',
        'description',
        'metakey',
        'metadesc',
        'sitename',
        'published',
        'access',
        'ordering',
        'access_level',
        'home',
    ];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'asset_id',
        'lang_code',
        'title',
        'title_native',
        'sef',
        'image',
        'description',
        'metakey',
        'metadesc',
        'sitename',
        'published',
        'access',
        'ordering',
        'access_level',
        'home',
    ];

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.0.0
     */
    protected function prepareItem($item)
    {
        $item->id = $item->lang_id;
        unset($item->lang->id);

        return parent::prepareItem($item);
    }
}
components/com_languages/src/View/Overrides/JsonapiView.php000064400000004631151165467510020166
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_languages
 *
 * @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\Languages\Api\View\Overrides;

use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;

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

/**
 * The overrides view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render item in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderItem = ['value'];

    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = ['value'];

    /**
     * Execute and display a template script.
     *
     * @param   object  $item  Item
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayItem($item = null)
    {
        /** @var
\Joomla\Component\Languages\Administrator\Model\OverrideModel $model */
        $model = $this->getModel();
        $id    = $model->getState($model->getName() .
'.id');
        $item  = $this->prepareItem($model->getItem($id));

        return parent::displayItem($item);
    }
    /**
     * Execute and display a template script.
     *
     * @param   array|null  $items  Array of items
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayList(array $items = null)
    {
        /** @var
\Joomla\Component\Languages\Administrator\Model\OverridesModel $model */
        $model = $this->getModel();
        $items = [];

        foreach ($model->getOverrides() as $key => $override) {
            $item = (object) [
                'key'      => $key,
                'override' => $override,
            ];

            $items[] = $this->prepareItem($item);
        }

        return parent::displayList($items);
    }

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.0.0
     */
    protected function prepareItem($item)
    {
        $item->id    = $item->key;
        $item->value = $item->override;
        unset($item->key);
        unset($item->override);

        return parent::prepareItem($item);
    }
}
components/com_languages/src/View/Strings/JsonapiView.php000064400000004646151165467520017664
0ustar00<?php

/**
 * @package     Joomla.API
 * @subpackage  com_languages
 *
 * @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\Languages\Api\View\Strings;

use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\CMS\Serializer\JoomlaSerializer;
use Tobscure\JsonApi\Collection;

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

/**
 * The strings view
 *
 * @since  4.0.0
 */
class JsonapiView extends BaseApiView
{
    /**
     * The fields to render items in the documents
     *
     * @var  array
     * @since  4.0.0
     */
    protected $fieldsToRenderList = [
        'id',
        'string',
        'file',
    ];

    /**
     * Execute and display a template script.
     *
     * @param   array|null  $items  Array of items
     *
     * @return  string
     *
     * @since   4.0.0
     */
    public function displayList(array $items = null)
    {
        /** @var
\Joomla\Component\Languages\Administrator\Model\StringsModel $model */
        $model  = $this->getModel();
        $result = $model->search();

        if ($result instanceof \Exception) {
            throw $result;
        }

        $items = [];

        foreach ($result['results'] as $item) {
            $items[] = $this->prepareItem($item);
        }

        // Check for errors.
        if (\count($errors = $this->get('Errors'))) {
            throw new GenericDataException(implode("\n",
$errors), 500);
        }

        if ($this->type === null) {
            throw new
\RuntimeException(Text::_('JLIB_APPLICATION_ERROR_CONTENT_TYPE_MISSING'),
400);
        }

        $collection = (new Collection($items, new
JoomlaSerializer($this->type)))
            ->fields([$this->type =>
$this->fieldsToRenderList]);

        // Set the data into the document and render it
        $this->getDocument()->setData($collection);

        return $this->getDocument()->render();
    }

    /**
     * Prepare item before render.
     *
     * @param   object  $item  The model item
     *
     * @return  object
     *
     * @since   4.0.0
     */
    protected function prepareItem($item)
    {
        $item->id = $item->constant;
        unset($item->constant);

        return parent::prepareItem($item);
    }
}