From 1dc53d05acf9003ab9601dda85d7861ef8462f0b Mon Sep 17 00:00:00 2001 From: Ioannis Tsimpidis Date: Thu, 2 Aug 2018 10:39:18 +0300 Subject: [PATCH] update fork (#1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [com_ajax] Change modules check (#19818) * Add com_ajax check in getModuleList query * Restore getModuleList query * Change module check inside com_ajax * Categories: Allow sorting by Associations (#19821) * Categories: Allow sorting by Associations * moving assoc sorting after access * Article and contact modal should not use addslashes (#19826) * Menu tems select field: no need to escape string value (#19828) * Allow limiting calendar field to current year (#19846) * Allow locking to min and / or max year to current year * Update calendar.php * Cleared non-set variable notices * Update JHtml::calendar to support relative years limits (#19847) * Simplify switch statement (#19849) * [CS] Code style Fix some inline doc blocks for IDE hinting - round 1 (#19862) * Fix Operator Spacing * Fix inline doc blocks for IDE hinting * Fix some docblocks and comments (#19863) * Custom admin menus: Translating menu items titles (#19900) * adapt default values (#19924) * Use getter method (#19925) * Custom Admin menu item edit: Display Title, Parent Item and Ordering translations (#19916) * Admin menu item edit: Display Title, Parent Item and Ordering translations * Modifs suggested by izharaazmi * cs * display translated title only when item exists * Correcting label alignment * Cosmetic changes * In theory, you may not always be working with the default database. So use the correct one. (#19474) * [plugin][content] - loadmodule by id (#19362) * [plugin][content] - loadmodule by id * [plugin][content] - loadmodule by id * getModuleById * getModuleById * id not found * id not found * simple syntax * js side * modal * minify js * regex only digits * remove title * use static load() * regex * cs * return * cs tabs removed * simplify code * clean code * no style * replace loadmodule with loadmoduleid * cs * replace loadmodule with loadmoduleid * replace * missed echo * moved back * Update loadmodule.php fixed cs * Revert "[plugin][content] - loadmodule by id (#19362)" (#19931) This reverts commit 4172f792979f85acb6aa29562ba8ece5297fe847. * Category Modal - add notes (#19131) * Category Modal - add notes If you add a note to a category then it is displayed in the category list but not displayed in the category modal (eg when you select a category for a blog menu item) This PR adds the note, alias, and full path (on hover) to the modal to make it consistent with the list view * space * Please consider a blank line preceding your comment (#19936) * Fix typo in editor field (#19938) * [CS] long form function return types; round 1 (#19934) * PHPCS2 - fixes * 2 spaces after * Expected 2 spaces after the longest param type * [libraries][legacy][request] - fix php 7.1 warning not numeric (#19710) * [libraries][legacy][request] - fix php 7.1 warning not numeric * dry * [com_fields] Normalise the request com_fields data (#19884) * Normalise the request com_fields data * CS * PHP 5.3 compat * Fields in com_fields array (#9) Fields should be set in com_fields array and not direcly in $data * Spelling * Also normalise request data on front-end user profile save (#10) * Also normalise request data on front-end user profile save * correct context and option * Handle 0 properly in empty check * Simplify * allowing value 0 to be saved (#11) when setting a value of 0 in a text field the function empty will return true > setting the value to null * correct needsUpdate when strlen (or count) = 1 which incorrectly equa… (#12) * correct needsUpdate when strlen (or count) = 1 which incorrectly equaled to 'true' * Update field.php * Update field.php * [event dispatcher] - use strict comparison (#19907) * [com_users] Fix display of custom field of value 0 (#19933) * [CS] long form function return types; round 2 (#19935) * PHPCS2 Auto Fixes - Expected "boolean" but found "bool" for function return type - Expected "integer" but found "int" for function return type * Manual correction of docBlock spacing * Manual correction of docBlock spacing * Manual correction of docBlock spacing * Manual correction of docBlock spacing * Add some Member var comments * Manual correction of docBlock spacing * Add some Member Var comments * return tag after access tag * 3 spaces after var tag before the type * add tag since 3.1 to Class Properties and align var tags * add tag since 3.1 and align var tag * adjust some tag alignments * Two spaces after type * integer not int * Redirects Plugin - Make Relative or Absolute. (#19942) * Redirects Plugin - Make Relative or Absolute. * Orderiing and capital I. * Update en-GB.plg_system_redirect.ini * Update en-GB.plg_system_redirect.ini updated as per @quys comment. * Update en-GB.plg_system_redirect.ini * Make calendar output usable in other css-frameworks (#19944) * Revert changes expect css * Make calendar output usable in other css-frameworks * A min-width makes look better * Fix for duplicate url check bug introduced by #19734 and support utf8… (#19950) * Fix for duplicate url check bug introduced by #19734 and support utf8 on old_urls. Couldn't find a solution to handle this within mysql. So a simple foreach handles it perfectly. * Update link.php * solved issue number #19930 (#19969) corrected typo to ensure proper checkbox functionality * Removed text-output and enabled a disabled tick box for consistency (#19974) * Change to allow str_pos to match when the exclude term is at the root… (#19979) * Change to allow str_pos to match when the exclude term is at the root of the path * updated redirect.php - clearly I was tired with the first pr. * Fix for #11070 (tag-category) - Improve also views newsfeed-category … (#16627) * Fix for #11070 (tag-category) - Improve also views newsfeed-category and category-list * Correctly modifying .LESS and regenerate .CSS (#16627) * Simple enhancement to allow the user to make all Post Install Messages read (#19958) * Simple enhancement to allow the user to make all Post Install Messages as read. * Update message.php * Update messages.php * Update messages.php * Added onDisplay function for handling the display of the button. * removed blank lines. * updated quotes around ints. As per @alikon comments * Added (int) just to be safe. * Update messages.php * Update messages.php * Update messages.php * [com_mailto] Add missing placeholder (#19999) * Make sure items is an array. (#20000) * Make sure items is an array. Resolved #19998 * Update default_items.php * Update tag.php * Update tag.php * Update tag.php * Update tag.php * [com_fields] Fix fields display HTML prepared 4 or 5 times per article, make it be prepared only twice (#17895) * Pass field displayType (aka event type) to getFields * Update getFields to respect the 'display' parameter of every field * Update onContentPrepare to respect 'display' parameter of every field * Prepare for manual display * Do not create $item->jcfields multiple times * Revert the code for manual display to always prepare the field value * Wrong function name * Fix docblock * Better comment for parameter of getFields method * fix media field in ISIS Template (#17205) * fix media field in ISIS Template * fix media field in ISIS Template * [3.x] New sessiongc plugin is not declared as core plugin for manifest cache refresh (#20038) * add sessiongc plugin to the core plugins * alphasorting thanks @brianteeman * [module] [articles category] filter by multiple tags (#19983) * [module] [articles category] filter by multiple tags * multiple tags * spelling * [com_finder] Remove unused params (#20009) * [com_finder] Unused params * Update en-GB.com_finder.ini * Update sample_learn.sql * Update sample_testing.sql * Update sample_learn.sql * Update sample_testing.sql * Update sample_learn.sql * Update sample_testing.sql * Update jos_menu.csv * Restore and deprecate strings * Two new fonts for CodeMirror: IBM Plex Mono, Nanum Gothic Coding (#20017) * CategoryEdit field published filter (#20018) * Smart Search: Highlighting terms also in fulltext when using readmore (#20019) * Smart Search: Highlighting terms also in fulltext when using readmore * parsing summary + body to get text only * Escape full query in NestedTable debug mode (#20024) * Changed viewname filter in RouteHelper (#20031) * Fix GMail plugin so it doesn't crash and burn on 4.0 upgrades (#20043) * Tweak build script for added flexibility (#19848) * Refresh Manifest Cache failed: Extension is not currently installed (#19560) * Refresh Manifest Cache failed: Extension is not currently installed PR for #17604 Change the message to include the name of the extension. I have no idea how to test this - sorry - only code review - unless someone knows how? * partial revert * revert comment * Remove rtrim() since it allows invalid emails (#20080) * Custom Fields toggle display on read only rights (#20068) * [com_fields] Normalise the request com_fields data (#19884) * Normalise the request com_fields data * CS * PHP 5.3 compat * Fields in com_fields array (#9) Fields should be set in com_fields array and not direcly in $data * Spelling * Also normalise request data on front-end user profile save (#10) * Also normalise request data on front-end user profile save * correct context and option * Handle 0 properly in empty check * Simplify * allowing value 0 to be saved (#11) when setting a value of 0 in a text field the function empty will return true > setting the value to null * correct needsUpdate when strlen (or count) = 1 which incorrectly equa… (#12) * correct needsUpdate when strlen (or count) = 1 which incorrectly equaled to 'true' * Update field.php * Update field.php * Custom fields view on form via toggle on read-only rights * fix back-end new article * first / seperate check on read-only access * refactor code so show_on parameter is part of helper function * implement inherit value in fields + language things * loadmodel only when needed * changed function comment * change values order so default value (inherit) is displayed first * Must use self:: for local static member reference * Fixed page with multiple codemirror editors fields with different syntax highlighting (#20063) * Fix for: Can't choose module using editor plugin if you search first (#20005) * fixit * cs * Update modal.php * Basic check to make sure the bulk import seperator is being used. (#19982) * Basic check to make sure the bulk import seperator is being used. Added Import State function as to how the urls should be imported, enabled or disabled. * force int. * Update config.xml * Update links.php * Update en-GB.com_redirect.ini * Update config.xml * Update links.php * Update en-GB.com_redirect.ini * Update config.xml As per standards i.e: https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_config/model/form/application.xml i.e. endtag inline with options and closing tag inline with opening tag. * Update links.php * Changed none selected to none, to be used when there are none availab… (#19977) * Changed none selected to none, to be used when there are none available to select and when none are selected. Set select to be readonly is they cannot select any options * Update plugins.php * Update plugins.php * Update en-GB.ini * Update en-GB.ini * Update plugins.php * Update plugins.php * Update plugins.php * Update plugins.php * Update plugins.php Space/tabbing for drone. * Update plugins.php * Corrected bug on empty subject of com_mailto (#19956) * Corrected bug on empty subject If the subject is empty, the posted value is an empty string (exists) so the default value is never added. * Updated code to include null value * text corrections (#20111) * Typo and copy paste error (#20123) Someone couldn't spell and then someone else must have copy pasted the error No idea how to test but this has been wrong since 3.5 * correct the use of the use command and move it below the defined command (#20130) * Prepare 3.8.7 RC * Reset for dev * Add a security policy (#20163) * Add a security policy Many projects now add a SECURITY.md document to their repository. Often this is related to using HackerOne but not always. This PR adds a policy to our github repo. It is based on the existing policy on the d.j.o web site The file doesn't need to be distributed so it has been added to the exclude list in the github repo. * tweek * copy paste * Update SECURITY.md * Update SECURITY.md * Prepare 3.8.7 release * Reset for dev * Introduce CODEOWNERS (#20137) * Tidy writeDynaList() (#12184) * Cleaned writeDynaList() in core.js * Removed explanation comments * removed all API changes * updated compressed core.js * [fix] publish/unpublish does not work with tables using null as default checked_out value (#20204) * Fix overwrite by .table-striped (#20180) Fix overwrite by administrator/templates/isis/css/template.css line 1787 table.table-striped tbody > tr:nth-child(odd) > td, table.table-striped tbody > tr:nth-child(odd) > th { background-color: #f9f9f9; } * Fix overwrite by .table-striped (#20179) Fix overwrite by administrator/templates/isis/css/template.css line 1787 table.table-striped tbody > tr:nth-child(odd) > td, table.table-striped tbody > tr:nth-child(odd) > th { background-color: #f9f9f9; } * Tooltips not loading com_users (#20177) The edit profile form is not loading the bootstrap tooltip code. So any tooltip (not popovers) are displayed as html as seen in the screenshot below when TFA is enabled. This was spotted by @o2tsen and @sandewt while testing #20051 but as it is a bug effecting more than that PR I have created a new PR. (a pr should only fix one problem) * [a11y] Headings consecutive order Debug Console (#20167) > Headings communicate the organization of the content on the page. Web browsers, plug-ins, and assistive technologies can use them to provide in-page navigation. > Skipping heading ranks can be confusing and should be avoided where possible: Make sure that a < h2> is not followed directly by an < h4>, for example. Source (https://www.w3.org/WAI/tutorials/page-structure/headings/) The headings were probably chosen for cosmetic reasons and not structural reasons which they should have been This PR changes the heading in the debug console from h1 to h2 There is a very small visual change as a result but imho the benefits outweigh the small cost * [a11y] Headings consecutive order (#20166) * [WIP] [a11y] Headings consecutive order > Headings communicate the organization of the content on the page. Web browsers, plug-ins, and assistive technologies can use them to provide in-page navigation. > Skipping heading ranks can be confusing and should be avoided where possible: Make sure that a

is not followed directly by an

, for example. Source (https://www.w3.org/WAI/tutorials/page-structure/headings/) This PR changes the heading in the plugin and modules from h3 to h2 and in the template styles to h4 ### todo joomla.edit.item_title layout uses h4 but before I change it I need to check everywhere that it is being used * layout * Fix typos in InstallerControllerUpdate (#20154) * Fix typos in InstallerControllerUpdate * Fix same error on other places. Thanks @Quy * Remove similar unnecessary code * Revert "Remove similar unnecessary code" This reverts commit 56410c0f59929d6a5afe220763fed6cfbcda6cdc. * One more * Revert "One more" This reverts commit aa1b101f26be135b7161b4d71aa466f7556e5cab. * [com_contact] Don't hide contact filter form (#20126) * Update default_items.php * Correct implode order. * Codestyle * More codestyle * Fix for JUserHelper::addUserToGroup() when user group title is a number. (#20091) * Update UserHelper.php * Update UserHelper.php * Fix count() in PHP 7.2 (#20044) * [com_content][Multilanguage] - remove duplicated queries (#19683) * [com_content][Multilanguage] - remove duplicated queries * cs * add $db->qn() * removed () * Make CodeMirror work in repeatable subforms (#12542) * One function to initialize any and all CodeMirror instances rather than individual functions to initialize one-by-one. Call on page load and also on subform-row-add * Minor js changes * Codemirror fullscreen modifier message (do we still need this?) * Call the popover init function when creating new subform rows. (#20222) * Call the popover init function when creating new subform rows. * Update teh popover test * [a11y] post-installation message in control panel (#20220) > Headings communicate the organization of the content on the page. Web browsers, plug-ins, and assistive technologies can use them to provide in-page navigation. > Skipping heading ranks can be confusing and should be avoided where possible: Make sure that a < h2> is not followed directly by an < h4>, for example. Source (https://www.w3.org/WAI/tutorials/page-structure/headings/) The heading was probably chosen for cosmetic reasons and not structural reasons which they should have been This PR changes the heading for the post-installtion message i the control panel from h4 to h3 There is a very small visual change as a result but imho the benefits outweigh the small cost * Solves issue #20195 (#20214) * [plugin][search][content] give priority on result when title is matched (#20197) * [plugin][search][content] give priority on result when title is matched * Missed comma * Add relevance weighting according to number of words * Relevance by number of words in title only, removed introtext relevance * Fix order string concatenation * You've Got Mail (#20162) * You've Got Mail Since 2003 the internet has changed. We no longer get a message to say that we have a message. Instead we just give you the message. You probably never use the messages component (especially for private message to a specific user) as they are the equivalent of https://www.youtube.com/watch?v=gFBLiHpkcOk The Joomla com_messages component is used in two instances 1. Notification of a new article 2. Sending a message to another user ### Current email for Notification of a new article Subject: A new private message has arrived from [sitename] Body: > Please log in to [link] to read your message. ### New email for Notification of a new article Subject: New message from [user] at [sitename] Body: > New Article A new Article has been submitted by 'user' entitled 'blog post'. > Please log in to [link] to read your message. ### Current email when sending a message to another user Subject: A new private message has arrived from [sitename] Body: > Please log in to [link] to read your message. ### New email when sending a message to another user Subject: New message from [user] at [sitename] Body: > [subject] [message] [login link] ## Backwards Compatibility No issues. The message contains the old login message PLUS the content of the message. So if you were using this message in a custom workflow there is no change required to that workflow * subj * cs * add new string and mark existing string for deprecation * Support Codemirror's included key mappings (#19833) * Support Codemirror's included key mappings * Use a list instead of radio buttons * Don't expose LDAP authentication usage. (#18531) * Don't expose LDAP authentication usage. * Use new language strings for LDAP authentication. * remove bind string * remove bind string * use connect string * alpha order * alpha order * Handle the case that JFolder::files returns 'false' (#11715) * Initialize tooltips when a new a row is added in a subform (#12996) * Initialize tooltips when a new a row is added in a subform * Fix a test since the init function has changed * Replace htaccess which was removed inexplicably * Missing space (#20260) * Tiny JLanguage::loadLanguage() code improvement (#20257) * [com_content] Remove redundant check (#20254) * Update articles.php (#20245) * [com_config] Capitalize label (#20299) * Implement Issue Templates as discussen in #20298 https://github.com/joomla/joomla-cms/issues/20298 * [fix] openbase_dir processing (#20280) * CodeMirror updated to version 5.37.0 (#20269) * Use title from menu item (#20267) * Change the defaults for new installs to disable com_mailto in articles (#20266) * change the defaults for new installs to disable com_mailto in articles * change more defaults to 0 thanks @quy * Don't enable sending the PW on new installs (#20247) * disable plaun pw sending per default on new installs * make sure we have to set a PW when we dont send the plain pw via mail * chagne the default in the xml to thanks @quy * update the sample data thanks @quy * make sure the mail to user does not include the PW too * Revert "make sure the mail to user does not include the PW too" This reverts commit 9095819a9d4e6f8828b0556e5d0284e754f3b9c6. * address comments by @bakual thanks * Optimization and fix of multilingual associations and add layouts to com_content links (#20229) * Revert #19681 * Revert #19683 * Remove addition query and check after #19314 * Add layout to com_content links * Add layout to com_content article associations * Add layout to category associations * add advanced where clause param * add advanced where clause for com_content article associations * drone code formatting fix * drone code formatting fix * drone code formatting fix * Line exceeds 150 characters * PHPCS rules * Remove parenthesis * Change queryKey * Fix typo * Improve description * Add checksum generation to the build script * Hide Enabled/Disabled users column headers and be a11y compliant (#20279) * Code mirror autofocus issue (#20270) * Pass the autofocus param to the plugin. While we're at it, pretty up this function a little. * Get autofocus from $params, not $this->params. Also, make sure we only autofocus one CodeMirror per page. * We won't be needing these things anymore. * Keep the unused strings. * Add a deprecated flag in database query for a few union/unionAll/unionDistinct (#20219) * Add showon attribute (#20156) * [com_contact] Display 0 value with custom field (#20124) * Display 0 value * Display 0 value * fix custom fields with tab format (#20023) * Show a sample editor on the CodeMirror plugin config page. (#17042) * Show a sample editor on the CodeMirror plugin config page. * Call it a 'Preview' * Reordered attributes as per the Joomla coding standards for xml * hiddenFieldsets & configFieldsets needs to be defined (#16856) * hiddenFieldsets & configFieldsets needs to be defined * use getter * Fix subform repeat counter. (#19693) * Fix subform repeat counter. As normal rows should be zero indexed. When length === count === 0, first row should be 0. Note: PHP creates existing rows with zero index - so if min=1, you currently get row 0 on form load then row 2, 3 etc. as you add them. * Update unit tests * Additional test fixes. * Fix typo in comment. * Reminify subform-repeatable.js * Fixing so that editors-xtd plugins works with com_ajax (#17939) * Fixing so that editors-xtd plugins works with com_ajax * Code formatting fix * [Plugins] Add filters to manifest files. (#20410) * URL Menu Item Type link should be required. (#20392) * Fix up the protostar template.js (#20224) Don't use unnecessary closure, just use jQuery ready function. Use javsacript strict mode use event delegation where possible Make tooltips and button groups work properly with repeatable subforms * Bootstrap alert compatible (#18909) * Bootstrap alert compatible Alert compatibility with new Bootstrap versions. * Strict comparison * Bootstrap alert compatible minified file Alert compatibility with new Bootstrap versions. * Add PHP 7.3 polyfill (#20441) * [com_finder] Fix regression #19969 (#20411) * [com_finder] - fix update inner join syntax for postgres (#19964) * [com_finder] - fix update inner join syntax for postgres * drone fix cs * quoteName vs qn * cs * Update tag.php (#19951) There is a bug in getItem, the function parameter is called $pk, but in code it is using $id, so whenever the parameter is passed it is not used in the function. * Change the Administrator group's filtering to use the default blacklist * Add postinstall message explaining revised default settings * Prepare 3.8.8 Release Candidate * Reset for dev * Typo in nl-NL installation language file (#20460) * Update joomla/filter package * Update joomla/application package * Store plaintext passwords in a separate options key, do not display passwords on summary page * Prepare 3.8.8 release * When JFeed was moved, old files were never deleted * Reset for dev * Correctly escape the random image module output (#20533) * Finally com_mailto allow the usage of a captcha by using JForm (#20265) * finaly com_mailto allow the usage of a captach by using JForm * remove unused $session variable * Line ending to LF * fix typo thanks @brianteeman * no need to use set and get thanks @mbabker * expend the popup & fix the auto population thanks @quy * captcha handling * fix the captcha check * commit header check thanks for reporting @brianteeman @mbabaker and for the improved code @quy * style changes affected hight thanks @brianteeman * line ending again * close
thanks @quy * make the iframe a bit bigger thnks @quy * commit proposed changes by @quy * implement suggested improvments * use renderField(); ?> thanks @laoneo * Remove check for a valid form from two places in plugins (#20277) * If that is not a valid form our system is broken at all * Typehint the form argument * Fallback to integer (#20338) * [plg_user_profile] Misc fixes (#20412) * Update profile.xml * Update profile.xml * Update profile.php * Update tos.php * [plg_fields] Manifest cleanup, filters, Editor plugin fix (#20422) * Update calendar.xml * Update checkboxes.xml * Update checkboxes.xml * Update editor.xml * Update editor.xml * Update editor.php * Update imagelist.xml * Update imagelist.xml * Update integer.xml * Update integer.xml * Update list.xml * Update list.xml * Update media.xml * Update radio.xml * Update radio.xml * Update checkboxes.xml * Update list.xml * Update sql.xml * Update sql.xml * Update textarea.xml * Update textarea.xml * Update url.xml * Update url.xml * Update usergrouplist.xml * Update usergrouplist.xml * Restore empty value * [plg_system] Manifest file filters (#20456) * [CS] fix some doc comment types (#20522) * PHPCS2 manual fixes - Variables passed by reference should not have the `&` prefixed in the doc comment - Joomla.Commenting.FunctionComment.MissingParamTag - Joomla.Commenting.FunctionComment.ParamNameNoMatch - correct return statement * exclude administrator/components/ folder "Having a "&" in the docblock (whether it's in front of the type or name) is not valid. References are to be expressed solely by the function/method declaration." so we need to exclude this sniff while we trasition to the PHPCS 2.x version * [styles] Fix checkboxes/buttons not clickable under Menu Assignment in Chrome (#20542) * Remove css * Remove css * Remove css rtl * cs * [Regression] Menu item type url with rel attribute nofollow (#19949) * Menu item url attribute rel nofollow with target blank * logic * cs * cs fix - thx Quy * concat * To many elements to index (#13868) * To many elements to index I don't know why in the query `#__tags` is twice. Once as a `a` and second time as a `b`. For me it works perfectly when we remove `b`. I had a problem with this - for 1100 tags on my websites, Smart Search Indexer found more than 1233000 items to index. * Mistake with query I corrected a bug with calling the `#__tags` table in the query. * Update joomla/filter package (#20579 and #20580) * Fix folder browsing and file upload that broke in 3.8.8 due to escaping (#20586) * Fix de-escaping of slash in folder name * code style * Update popup-imagemanager.js * standardise contact strings (#20577) as spotted by @MartijnMaandag * Enable to change FormData in com_menu (#20313) * Set as object to allow for alterations * Cast to object directly * fix typo in installation string (#20607) It is IN each catefgory not ON each category INSTL_DEFAULTLANGUAGE_INSTALL_LOCALISED_CONTENT_DESC="If active, Joomla will automatically create one content category per each installed language. Also, one featured article with dummy content will be created in each category." * Resync deleted files list back to 1.7.3 tag (#20564) * Add additional check that view exists before proceeding (#18757) * Add additional check that view exists before proceeding We assume the array key exists with view but not ID. I have come across some installations where view does not exist and it causes php warnings. So just check it does exist before actually proceeding further as we do with ID. * Update legacyrouter.php * Update legacyrouter.php * Default installation value in configuration.php-dist (#20655) * Default installation value in configuration.php-dist The config file to use in manual installs has incorrect advice and paths for tmp and logs as they are referring to server paths and not paths within a joomla installation * oops * CodeMirror updated to 5.38.0 (#20636) * Bump Composer dependencies (#20583) * Bump Composer dependencies * Bad user data * Try changing test to fix PHP 5.3 behavior * Another attempt at fixing this * Try upstream changes without tag yet * Back to empty array * Now with release tag * Update app package with UA fix * [fix] Error decoding JSON data: Syntax error (#20663) * [fix] Error decoding JSON data: Syntax error * [test] ensure that empty params do not cause user loading issues * Don't try to json_decode() a null value (#20675) * Don't try to json_decode() a null value * Add Registry package fix to make sure broken code can continue to work * Joomla\CMS\Categories\Categories fix (#20680) A constructor can't return a value. * [CS] fix some doc comment types (round 2) (#20647) * PHPCS2 manual changes - Doc comment for parameter does not match actual variable name - Comment closer must be on a new line (just convert to single line comment) - be more specific with the rules we want to exclude * fix spaces Expected only 2 spaces after the longest variable name * one more fix for doc comment - Doc comment for parameter does not match actual variable name * [Newsfeeds] Use item link instead of guid. (#20717) * Feed links * Restore http check for now * CS * Some cleanups * Verb wrong tense (#20708) * Verb wrong tense Clearly using the present tense is incorrect for an error message and it should be the past tense * no error * Replace UCMType::getType() by UCMType::getTypeByAlias($this->alias) (#20672) * JTableAsset::loadByName(): replace two sql queries by one (#20671) * Display 404 page if banner not found (#20664) * Update strings (#20591) * Fix stale session data wrongly overriding configuration file when editing global configuration (#20590) * Fix stale session data wrongly overriding configuration file when editing global configuration * Use $this variable * [com_menus] - fix php warning (#18471) * Singular not plural (#20751) * Singular not plural Obvious correction. sorry I dont know what I did to display the error. * Update en-GB.mod_sampledata.ini * [com_tags] Image caption in Tags view (#20648) * Put all build packages in one directory (#20745) * [com_tags] Tagged item link in feed (#20723) * [com_tags] Tagged item feed links * Nesting error * [mod_tags_similar] Link cleanup (#20730) * [mod_tags_similar] Link cleanup * CS * Com_finder meta data (#20772) * Com_finder meta data com_finder aka smart search was not following any meta data set in the menu item #### to test - setup and configure smart search - create a menu item for smart search and set the meta description and meta keywords - open the menu item on the front end - check source and the meta data set in the menu is not present - do a search - check source and the meta data has been generated from the search Apply this PR - open the menu item on the front end - check source and the meta data set in the menu is present - do a search - check source and the meta data has been generated from the search * remove copy paste error * Add UTF-8 encoding to phpcs in .drone.yml (#20769) * Login to view the article redirect fix (#20732) Without the view=login parameter JRoute can not resolve the Itemid. So the menu item assigned to 'login' is not active. Seems there is a related hack here: /com_content/views/article/tmpl/default.php ~line 143 This can also cause problems with third party extensions like sh404sef. * Mouse over edit - rename (#20743) At the time this feature was introduced we weren't happy with the name "Mouse over edit" but couldn't really think of anything else. I believe that today the term "inline editing" is far more understood and is a more appropriate name * Better mode autoloading. (#20746) * Respect access of editor plugin inside profile form (#20713) * Respect access of editor plugin inside profile form * Use value string 'true', '*' instead of integer for useaccess parameter * Additional Escaping Of Paths In com_media (#20616) * Additional Escaping Of Paths In com_media * Additional Override Escaping * carefully revert some escaping (security) * more specific and special reverse encoding of slash * C&P Error * [com_tags] Images in Tagged Items view (#20601) * [com_contenthistory] - fix for not delete keep forever items (#20430) * [com_contenthistory] - fix for not delete kepp forever items * don't stop delete * cs * cs removed spaces at end of line * Fixing com_fields integration in com_contact (#20413) * Fixing com_fields integration Custom fields in com_contact currently doesnt work propertly. Chosing a category on which they should appear doesn't work cause fields plugin has no informations about contact catid as not data is passed to form when contact form is displayed. This fixes it. * Fixing code style * Removing whitespace, fixing spelling * enable mod_sampledata extension * [ModuleHelper] owncache param as integer (#20626) * Changed return 0 to continue To prevent the entire function to quit, it just needs to go to the next file. Fix https://github.com/joomla/joomla-cms/issues/17954 * [mod_articles_category] Fatal error (#20834) * Prepare 3.8.9 Release Candidate * Reset for dev * Very small language file cs (#20844) * Whitelist allowed global access * Bump joomla/input package * Use new method for dynamically resolving Input based on request method * Prepare 3.8.9 release * Reset for development * Fix the autoloader for Windows platforms (#20877) * Prepare 3.8.10 release * Reset for dev, again * Don't delete file that is still in use (Fix #20881) * [plg_user_profile] Add RTL check to ToS field * FIX: Install Languages Manager language badges wrongly set to not match since upgrade to 3.8.10 (#20906) * FIX: Install Languages Manager language badges wrongly set to not match since upgrade to 3.8.10 * Correcting Installed languages too * Replace the URL parameter "limitstart=0" with "start=0" if the SEF mode is on (#19452) * Replace &limitstart=0 to &start=0 if SEF is ON * Replace URL param start=x to limitstart=x even if start is 0 * Remove non callable array items from field categories (#20093) * Update default.php * Update fields.php * Update default.php * Update fields.php * Update fields.php * Update fields.php * [Site Modules] Manifest file filters, part 1 (#20845) * [Modules] Manifest file filters * Chosen placeholders * [cs] leading spaces (#20858) * [cs]leading spaces While checking #20844 I saw that these strings all have a leading space which should not be there * oops * [Site Modules] Manifest file filters, part 2 (#20856) * [Site Modules] Manifest file filters, part 2 * Update default.php * Update default.php * Update default.php * [Site Modules] Manifest file filters, part 3 (#20857) * [Admin Modules] Manifest file filters (#20868) * [Admin Modules] Manifest file filters * Default values * Fix OpenSearch implementation * [mod_articles_category] Showon * Add showon to levels * Update string * Remove CSS * Add security issue template * Formatting * Let the table check the data before storing. * [Templates] Escape sitename (#21008) * Checking return value and catching whole stuff * Updating Bosnian installation language files * Updated 3.9-dev and added 3.10-dev (#21097) * Exceptions in Joomla\CMS\Table\Usergroup refer to categories (#21098) * Exceptions in Joomla\CMS\Table\Usergroup refer to categories Pull Request for Issue #21092 . ### Summary of Changes remove todo that is clearly a copy paste error from somewhere else change exception message to usergroups from catergory NOTE the first exception` if ($this->id == 0)` I am not sure if that should even be present - doesn't look like it to me - please advise * Update Usergroup.php * Deprecate sef_advanced strings (#21116) * [com_content] Featured articles tag filtering (#21138) * Update ModuleHelper.php (#20273) * The JPATH_ constants are not magic strings (#21151) * Remove if/else in user debug models that can never hit else conditions (#21188) * [com_content] Featured articles access filter (#21168) * Media manager doesn't obey relative pathes for video files (#21156) * correct video url fixes https://github.com/joomla/joomla-cms/issues/21145#issuecomment-405484769 * fix * Speed up regex in emailcloak plugin (#20956) * Speed up regex in emailcloak plugin * Fix comment * Fix subform.repeatable-table multi field styling (#20209) * Fix subform.repeatable-table multi field styling * Fix staging less/css * revert previous * Update FormField.php (#20168) * Update HTMLHelper.php (#19770) * Fix a problem with older Joomla versions language packs registration and update sites rebuild (#16355) * Fix a problem with older language packs Language packs installed under older Joomla versions are registered in the database under their package name, not under their name and since rebuild function fails on them. e.g. package with Afrikaans (South Africa) af-ZA has name column in #_extensions table set as af-ZA and since existing query fails. * Update updatesites.php * missing single quote (#21213) * Add a note field from the #__fields_groups table to the field list query * [3.x FIX] Getting the correct associations in sidebyside view for contact and newsfeeds (#21180) * [3.x FIX] Getting the correct associations in sidebyside view for contact and newsfeeds * undefined property * correction in js * [com_menus] Remove useglobal (#21095) * [fix] fixed PluginHelper import of xtd-editors plugins (#17907) * [fix] fixed PluginHelper import of xtd-editors plugins * [imp] small adjustment and comment * Fix errors exposed by strict (#12544) * Don't need a closure, jQuery ready function is enough. Use strict. * Fix errors exposed by strict. Undeclared variables. wrong regex backreference * Fix some undeclared/wrongly declared variables * Avoid some redundant calls of $(this) * Remove some redundant (also wrong) code. * [3.8] Make the text clearer (#20940) * make the text clealer Make the PLG_TWOFACTORAUTH_TOTP_STEP3_TEXT text clealer. * thans @brianteeman * Adding lithuan language files. * Updating lithuanian language strings for TinyMCE * Appended input fields (#21257) PR for #12448 ## Steps to reproduce the issue Effects all appended input fields. Eg. Navigate to a single article menu item (Menus -> MainMenu -> Home) and resize the screen below 767px. Input fields extend outside the viewport. * CSS for flags (#21254) Fix for #13678 reported by @gwsdesk * Add "Reviewed by Hound" badge (#21263) * Adjust doc block to ensure file is included in patch packages due to accidental deletion with last release's post-update script * Prepare 3.8.11 release candidate * Reset to dev * Prepare 3.8.11 release * Bump to 3.8.12-dev * Added security scan tool to CI setup (#20796) * Added security scan tool to CI setup * Updated ordering * fixed command name --- .appveyor.yml | 25 +- .drone.yml | 11 +- .github/CODEOWNERS | 60 + .github/CONTRIBUTING.md | 4 +- .github/ISSUE_TEMPLATE/Bug_report.md | 23 + .github/ISSUE_TEMPLATE/Custom.md | 16 + .github/ISSUE_TEMPLATE/Feature_request.md | 15 + .github/ISSUE_TEMPLATE/Security.md | 11 + .github/SUPPORT.md | 8 + .gitignore | 59 + .hound.yml | 13 + .travis.yml | 36 +- Jenkinsfile | 75 + README.md | 62 +- README.txt | 50 +- RoboFile.dist.ini | 6 + RoboFile.php | 558 ++ SECURITY.md | 39 + administrator/components/com_admin/admin.php | 2 +- administrator/components/com_admin/admin.xml | 2 +- .../components/com_admin/controller.php | 2 +- .../com_admin/controllers/profile.php | 2 +- .../com_admin/helpers/html/directory.php | 2 +- .../com_admin/helpers/html/phpsetting.php | 2 +- .../com_admin/helpers/html/system.php | 2 +- .../com_admin/models/forms/profile.xml | 101 +- .../components/com_admin/models/help.php | 2 +- .../components/com_admin/models/profile.php | 2 +- .../components/com_admin/models/sysinfo.php | 29 +- .../com_admin/postinstall/eaccelerator.php | 6 +- .../com_admin/postinstall/htaccess.php | 2 +- .../com_admin/postinstall/joomla40checks.php | 11 +- .../postinstall/languageaccess340.php | 6 +- .../com_admin/postinstall/phpversion.php | 24 - .../com_admin/postinstall/statscollection.php | 2 +- .../postinstall/updatedefaultsettings.php | 27 + administrator/components/com_admin/script.php | 1968 +++--- .../others/mysql/utf8mb4-conversion-01.sql | 4 + .../others/mysql/utf8mb4-conversion-02.sql | 12 + .../sql/updates/mysql/2.5.0-2011-12-06.sql | 4 +- .../sql/updates/mysql/2.5.0-2011-12-21-1.sql | 2 +- .../sql/updates/mysql/2.5.1-2012-01-26.sql | 2 +- .../sql/updates/mysql/2.5.4-2012-03-18.sql | 2 +- .../com_admin/sql/updates/mysql/2.5.7.sql | 2 +- .../com_admin/sql/updates/mysql/3.0.0.sql | 12 +- .../com_admin/sql/updates/mysql/3.1.0.sql | 8 +- .../com_admin/sql/updates/mysql/3.2.0.sql | 10 +- .../sql/updates/mysql/3.3.6-2014-09-30.sql | 2 +- .../sql/updates/mysql/3.7.0-2017-01-17.sql | 58 +- .../sql/updates/mysql/3.7.0-2017-03-09.sql | 2 + .../sql/updates/mysql/3.7.3-2017-06-03.sql | 1 + .../sql/updates/mysql/3.7.4-2017-07-05.sql | 1 + .../sql/updates/mysql/3.8.0-2017-07-28.sql | 1 + .../sql/updates/mysql/3.8.0-2017-07-31.sql | 5 + .../sql/updates/mysql/3.8.2-2017-10-14.sql | 5 + .../sql/updates/mysql/3.8.4-2018-01-16.sql | 2 + .../sql/updates/mysql/3.8.6-2018-02-14.sql | 6 + .../sql/updates/mysql/3.8.8-2018-05-18.sql | 3 + .../sql/updates/mysql/3.8.9-2018-06-19.sql | 2 + .../sql/updates/postgresql/3.1.0.sql | 10 +- .../sql/updates/postgresql/3.2.0.sql | 10 +- .../updates/postgresql/3.3.6-2014-09-30.sql | 2 +- .../updates/postgresql/3.7.0-2016-11-19.sql | 2 +- .../updates/postgresql/3.7.0-2016-11-21.sql | 2 +- .../updates/postgresql/3.7.0-2017-01-17.sql | 59 +- .../updates/postgresql/3.7.0-2017-03-09.sql | 2 + .../updates/postgresql/3.7.0-2017-04-19.sql | 2 +- .../updates/postgresql/3.7.4-2017-07-05.sql | 1 + .../updates/postgresql/3.8.0-2017-07-28.sql | 1 + .../updates/postgresql/3.8.0-2017-07-31.sql | 5 + .../updates/postgresql/3.8.2-2017-10-14.sql | 5 + .../updates/postgresql/3.8.4-2018-01-16.sql | 2 + .../updates/postgresql/3.8.6-2018-02-14.sql | 6 + .../updates/postgresql/3.8.8-2018-05-18.sql | 3 + .../updates/postgresql/3.8.9-2018-06-19.sql | 2 + .../sql/updates/sqlazure/2.5.4-2012-03-18.sql | 2 +- .../com_admin/sql/updates/sqlazure/2.5.7.sql | 2 +- .../com_admin/sql/updates/sqlazure/3.1.0.sql | 2 +- .../sql/updates/sqlazure/3.3.6-2014-09-30.sql | 2 +- .../sql/updates/sqlazure/3.7.0-2017-01-17.sql | 60 +- .../sql/updates/sqlazure/3.7.0-2017-03-09.sql | 2 + .../sql/updates/sqlazure/3.7.4-2017-07-05.sql | 1 + .../sql/updates/sqlazure/3.8.0-2017-07-28.sql | 1 + .../sql/updates/sqlazure/3.8.0-2017-07-31.sql | 4 + .../sql/updates/sqlazure/3.8.2-2017-10-14.sql | 8 + .../sql/updates/sqlazure/3.8.4-2018-01-16.sql | 2 + .../sql/updates/sqlazure/3.8.6-2018-02-14.sql | 6 + .../sql/updates/sqlazure/3.8.8-2018-05-18.sql | 2 + .../sql/updates/sqlazure/3.8.9-2018-06-19.sql | 3 + .../com_admin/views/help/tmpl/default.php | 6 +- .../com_admin/views/help/tmpl/langforum.php | 23 + .../com_admin/views/help/view.html.php | 2 +- .../com_admin/views/profile/tmpl/edit.php | 2 +- .../com_admin/views/profile/view.html.php | 6 +- .../com_admin/views/sysinfo/tmpl/default.php | 2 +- .../views/sysinfo/tmpl/default_config.php | 2 +- .../views/sysinfo/tmpl/default_directory.php | 2 +- .../views/sysinfo/tmpl/default_phpinfo.php | 2 +- .../sysinfo/tmpl/default_phpsettings.php | 10 +- .../views/sysinfo/tmpl/default_system.php | 10 +- .../com_admin/views/sysinfo/view.html.php | 5 +- .../com_admin/views/sysinfo/view.json.php | 4 +- .../com_admin/views/sysinfo/view.text.php | 4 +- administrator/components/com_ajax/ajax.php | 2 +- administrator/components/com_ajax/ajax.xml | 2 +- .../com_associations/associations.php | 2 +- .../com_associations/associations.xml | 2 +- .../com_associations/controller.php | 2 +- .../controllers/association.php | 4 +- .../controllers/associations.php | 63 +- .../com_associations/helpers/associations.php | 58 +- .../joomla/searchtools/default/bar.php | 2 +- .../com_associations/models/association.php | 2 +- .../com_associations/models/associations.php | 20 +- .../models/fields/itemlanguage.php | 7 +- .../models/fields/itemtype.php | 4 +- .../models/fields/modalassociation.php | 16 +- .../models/forms/association.xml | 2 +- .../models/forms/filter_associations.xml | 18 +- .../views/association/tmpl/edit.php | 10 +- .../views/association/view.html.php | 13 +- .../views/associations/tmpl/default.php | 10 +- .../views/associations/tmpl/default.xml | 8 + .../views/associations/tmpl/modal.php | 33 +- .../views/associations/view.html.php | 10 +- .../components/com_banners/banners.php | 2 +- .../components/com_banners/banners.xml | 2 +- .../components/com_banners/config.xml | 2 +- .../components/com_banners/controller.php | 2 +- .../com_banners/controllers/banner.php | 2 +- .../com_banners/controllers/banners.php | 2 +- .../com_banners/controllers/client.php | 2 +- .../com_banners/controllers/clients.php | 2 +- .../com_banners/controllers/tracks.php | 2 +- .../com_banners/controllers/tracks.raw.php | 31 +- .../com_banners/helpers/banners.php | 6 +- .../com_banners/helpers/html/banner.php | 2 +- .../components/com_banners/models/banner.php | 8 +- .../components/com_banners/models/banners.php | 2 +- .../components/com_banners/models/client.php | 2 +- .../components/com_banners/models/clients.php | 2 +- .../com_banners/models/download.php | 4 +- .../models/fields/bannerclient.php | 2 +- .../com_banners/models/fields/clicks.php | 2 +- .../com_banners/models/fields/impmade.php | 2 +- .../com_banners/models/fields/imptotal.php | 2 +- .../com_banners/models/forms/banner.xml | 6 +- .../com_banners/models/forms/client.xml | 3 +- .../com_banners/models/forms/download.xml | 2 +- .../components/com_banners/models/tracks.php | 8 +- .../components/com_banners/tables/banner.php | 16 +- .../components/com_banners/tables/client.php | 4 +- .../com_banners/views/banner/tmpl/edit.php | 2 +- .../com_banners/views/banner/view.html.php | 6 +- .../views/banners/tmpl/default.php | 16 +- .../views/banners/tmpl/default_batch_body.php | 2 +- .../banners/tmpl/default_batch_footer.php | 2 +- .../com_banners/views/banners/view.html.php | 24 +- .../com_banners/views/client/tmpl/edit.php | 2 +- .../com_banners/views/client/view.html.php | 6 +- .../views/clients/tmpl/default.php | 4 +- .../com_banners/views/clients/view.html.php | 6 +- .../views/download/tmpl/default.php | 2 +- .../com_banners/views/download/view.html.php | 6 +- .../com_banners/views/tracks/tmpl/default.php | 4 +- .../com_banners/views/tracks/view.html.php | 6 +- .../com_banners/views/tracks/view.raw.php | 6 +- administrator/components/com_cache/access.xml | 7 + administrator/components/com_cache/cache.php | 2 +- administrator/components/com_cache/cache.xml | 2 +- administrator/components/com_cache/config.xml | 11 +- .../components/com_cache/controller.php | 2 +- .../components/com_cache/helpers/cache.php | 2 +- .../components/com_cache/models/cache.php | 4 +- .../com_cache/views/cache/tmpl/default.php | 8 +- .../com_cache/views/cache/view.html.php | 8 +- .../com_cache/views/purge/tmpl/default.php | 2 +- .../com_cache/views/purge/view.html.php | 2 +- .../components/com_categories/categories.php | 2 +- .../components/com_categories/categories.xml | 2 +- .../components/com_categories/controller.php | 2 +- .../com_categories/controllers/categories.php | 6 +- .../com_categories/controllers/category.php | 2 +- .../com_categories/helpers/association.php | 11 +- .../com_categories/helpers/categories.php | 29 +- .../helpers/html/categoriesadministrator.php | 3 +- .../com_categories/models/categories.php | 9 +- .../com_categories/models/category.php | 61 +- .../models/fields/categoryedit.php | 86 +- .../models/fields/categoryparent.php | 5 +- .../models/fields/modal/category.php | 2 +- .../com_categories/models/forms/category.xml | 6 +- .../models/forms/filter_categories.xml | 2 + .../com_categories/tables/category.php | 2 +- .../views/categories/tmpl/default.php | 29 +- .../categories/tmpl/default_batch_body.php | 15 +- .../categories/tmpl/default_batch_footer.php | 2 +- .../views/categories/tmpl/modal.php | 21 +- .../views/categories/view.html.php | 20 +- .../views/category/tmpl/edit.php | 2 +- .../views/category/tmpl/edit.xml | 2 +- .../views/category/tmpl/edit_associations.php | 2 +- .../views/category/tmpl/edit_metadata.php | 2 +- .../views/category/tmpl/modal.php | 2 +- .../category/tmpl/modal_associations.php | 2 +- .../views/category/tmpl/modal_extrafields.php | 2 +- .../views/category/tmpl/modal_metadata.php | 2 +- .../views/category/tmpl/modal_options.php | 2 +- .../views/category/view.html.php | 6 +- .../components/com_checkin/checkin.php | 2 +- .../components/com_checkin/checkin.xml | 2 +- .../components/com_checkin/controller.php | 2 +- .../components/com_checkin/models/checkin.php | 2 +- .../views/checkin/tmpl/default.php | 2 +- .../com_checkin/views/checkin/view.html.php | 6 +- .../components/com_config/config.php | 2 +- .../components/com_config/config.xml | 2 +- .../components/com_config/controller.php | 2 +- .../controller/application/cancel.php | 2 +- .../controller/application/display.php | 2 +- .../controller/application/removeroot.php | 2 +- .../controller/application/save.php | 17 +- .../controller/application/sendtestmail.php | 2 +- .../controller/application/store.php | 2 +- .../controller/component/cancel.php | 2 +- .../controller/component/display.php | 2 +- .../com_config/controller/component/save.php | 2 +- .../com_config/controllers/application.php | 6 +- .../com_config/controllers/component.php | 2 +- .../components/com_config/helper/config.php | 2 +- .../com_config/model/application.php | 174 +- .../components/com_config/model/component.php | 2 +- .../model/field/configcomponents.php | 2 +- .../com_config/model/field/filters.php | 13 +- .../com_config/model/form/application.xml | 231 +- .../com_config/models/application.php | 2 +- .../com_config/models/component.php | 2 +- .../com_config/view/application/html.php | 2 +- .../com_config/view/application/json.php | 2 +- .../view/application/tmpl/default.php | 2 +- .../view/application/tmpl/default_cache.php | 2 +- .../view/application/tmpl/default_cookie.php | 2 +- .../application/tmpl/default_database.php | 2 +- .../view/application/tmpl/default_debug.php | 2 +- .../view/application/tmpl/default_filters.php | 4 +- .../view/application/tmpl/default_ftp.php | 2 +- .../application/tmpl/default_ftplogin.php | 2 +- .../view/application/tmpl/default_locale.php | 2 +- .../view/application/tmpl/default_mail.php | 5 +- .../application/tmpl/default_metadata.php | 2 +- .../application/tmpl/default_navigation.php | 2 +- .../application/tmpl/default_permissions.php | 2 +- .../view/application/tmpl/default_proxy.php | 2 +- .../view/application/tmpl/default_seo.php | 2 +- .../view/application/tmpl/default_server.php | 2 +- .../view/application/tmpl/default_session.php | 2 +- .../view/application/tmpl/default_site.php | 2 +- .../view/application/tmpl/default_system.php | 2 +- .../com_config/view/component/html.php | 2 +- .../view/component/tmpl/default.php | 9 +- .../component/tmpl/default_navigation.php | 2 +- .../components/com_contact/config.xml | 82 +- .../components/com_contact/contact.php | 2 +- .../components/com_contact/contact.xml | 2 +- .../components/com_contact/controller.php | 2 +- .../com_contact/controllers/contact.php | 2 +- .../com_contact/controllers/contacts.php | 13 +- .../com_contact/helpers/associations.php | 6 +- .../com_contact/helpers/contact.php | 16 +- .../com_contact/helpers/html/contact.php | 10 +- .../components/com_contact/models/contact.php | 10 +- .../com_contact/models/contacts.php | 4 +- .../models/fields/modal/contact.php | 2 +- .../com_contact/models/forms/contact.xml | 36 +- .../com_contact/models/forms/fields/mail.xml | 12 + .../components/com_contact/tables/contact.php | 8 +- .../com_contact/views/contact/tmpl/edit.php | 4 +- .../views/contact/tmpl/edit_associations.php | 2 +- .../views/contact/tmpl/edit_metadata.php | 2 +- .../views/contact/tmpl/edit_params.php | 2 +- .../com_contact/views/contact/tmpl/modal.php | 2 +- .../views/contact/tmpl/modal_associations.php | 2 +- .../views/contact/tmpl/modal_metadata.php | 2 +- .../views/contact/tmpl/modal_params.php | 2 +- .../com_contact/views/contact/view.html.php | 6 +- .../views/contacts/tmpl/default.php | 8 +- .../views/contacts/tmpl/default_batch.php | 2 +- .../contacts/tmpl/default_batch_body.php | 2 +- .../contacts/tmpl/default_batch_footer.php | 2 +- .../com_contact/views/contacts/tmpl/modal.php | 13 +- .../com_contact/views/contacts/view.html.php | 28 +- .../components/com_content/config.xml | 696 +- .../components/com_content/content.php | 2 +- .../components/com_content/content.xml | 2 +- .../components/com_content/controller.php | 2 +- .../com_content/controllers/article.php | 2 +- .../com_content/controllers/articles.php | 2 +- .../com_content/controllers/featured.php | 2 +- .../com_content/helpers/associations.php | 7 +- .../com_content/helpers/content.php | 18 +- .../helpers/html/contentadministrator.php | 8 +- .../components/com_content/models/article.php | 143 +- .../com_content/models/articles.php | 157 +- .../components/com_content/models/feature.php | 2 +- .../com_content/models/featured.php | 70 +- .../models/fields/modal/article.php | 2 +- .../com_content/models/fields/voteradio.php | 58 + .../com_content/models/forms/article.xml | 605 +- .../models/forms/filter_articles.xml | 80 +- .../models/forms/filter_featured.xml | 73 +- .../com_content/tables/featured.php | 4 +- .../com_content/views/article/tmpl/edit.php | 4 +- .../views/article/tmpl/edit_associations.php | 2 +- .../views/article/tmpl/edit_metadata.php | 2 +- .../com_content/views/article/tmpl/modal.php | 2 +- .../views/article/tmpl/modal_associations.php | 2 +- .../views/article/tmpl/modal_metadata.php | 2 +- .../views/article/tmpl/pagebreak.php | 2 +- .../com_content/views/article/view.html.php | 7 +- .../views/articles/tmpl/default.php | 44 +- .../articles/tmpl/default_batch_body.php | 2 +- .../articles/tmpl/default_batch_footer.php | 2 +- .../com_content/views/articles/tmpl/modal.php | 18 +- .../com_content/views/articles/view.html.php | 13 +- .../views/featured/tmpl/default.php | 37 +- .../com_content/views/featured/view.html.php | 23 +- .../com_contenthistory/contenthistory.php | 2 +- .../com_contenthistory/contenthistory.xml | 2 +- .../com_contenthistory/controller.php | 2 +- .../controllers/history.php | 2 +- .../controllers/preview.php | 2 +- .../helpers/contenthistory.php | 12 +- .../helpers/html/textdiff.php | 4 +- .../com_contenthistory/models/compare.php | 6 +- .../com_contenthistory/models/history.php | 12 +- .../com_contenthistory/models/preview.php | 6 +- .../views/compare/tmpl/compare.php | 2 +- .../views/compare/view.html.php | 6 +- .../views/history/tmpl/modal.php | 14 +- .../views/history/view.html.php | 6 +- .../views/preview/tmpl/preview.php | 2 +- .../views/preview/view.html.php | 6 +- .../components/com_cpanel/controller.php | 2 +- .../components/com_cpanel/cpanel.php | 2 +- .../components/com_cpanel/cpanel.xml | 2 +- .../com_cpanel/views/cpanel/tmpl/default.php | 8 +- .../com_cpanel/views/cpanel/view.html.php | 2 +- .../components/com_fields/controller.php | 2 +- .../com_fields/controllers/field.php | 48 +- .../com_fields/controllers/fields.php | 2 +- .../com_fields/controllers/group.php | 8 +- .../com_fields/controllers/groups.php | 2 +- .../components/com_fields/fields.php | 4 +- .../components/com_fields/fields.xml | 2 +- .../components/com_fields/helpers/fields.php | 192 +- .../com_fields/libraries/fieldslistplugin.php | 6 +- .../com_fields/libraries/fieldsplugin.php | 31 +- .../components/com_fields/models/field.php | 77 +- .../components/com_fields/models/fields.php | 22 +- .../models/fields/fieldcontexts.php | 2 +- .../com_fields/models/fields/fieldgroups.php | 6 +- .../com_fields/models/fields/section.php | 11 +- .../com_fields/models/fields/type.php | 29 +- .../com_fields/models/forms/field.xml | 66 +- .../com_fields/models/forms/filter_fields.xml | 13 +- .../com_fields/models/forms/group.xml | 30 +- .../components/com_fields/models/group.php | 40 +- .../components/com_fields/models/groups.php | 38 +- .../components/com_fields/tables/field.php | 6 +- .../components/com_fields/tables/group.php | 6 +- .../com_fields/views/field/tmpl/edit.php | 2 +- .../com_fields/views/field/view.html.php | 6 +- .../com_fields/views/fields/tmpl/default.php | 4 +- .../views/fields/tmpl/default_batch_body.php | 4 +- .../fields/tmpl/default_batch_footer.php | 4 +- .../com_fields/views/fields/tmpl/modal.php | 5 +- .../com_fields/views/fields/view.html.php | 6 +- .../com_fields/views/group/tmpl/edit.php | 3 +- .../com_fields/views/group/view.html.php | 6 +- .../com_fields/views/groups/tmpl/default.php | 2 +- .../views/groups/tmpl/default_batch_body.php | 2 +- .../groups/tmpl/default_batch_footer.php | 4 +- .../com_fields/views/groups/view.html.php | 6 +- .../components/com_finder/config.xml | 211 +- .../components/com_finder/controller.php | 6 +- .../com_finder/controllers/filter.php | 12 +- .../com_finder/controllers/filters.php | 4 +- .../com_finder/controllers/index.php | 4 +- .../com_finder/controllers/indexer.json.php | 29 +- .../com_finder/controllers/maps.php | 4 +- .../components/com_finder/finder.php | 4 +- .../components/com_finder/finder.xml | 2 +- .../components/com_finder/helpers/finder.php | 12 +- .../com_finder/helpers/html/finder.php | 4 +- .../com_finder/helpers/indexer/adapter.php | 8 +- .../helpers/indexer/driver/mysql.php | 209 +- .../helpers/indexer/driver/postgresql.php | 185 +- .../helpers/indexer/driver/sqlsrv.php | 147 +- .../com_finder/helpers/indexer/helper.php | 40 +- .../com_finder/helpers/indexer/indexer.php | 143 +- .../com_finder/helpers/indexer/parser.php | 4 +- .../helpers/indexer/parser/html.php | 4 +- .../com_finder/helpers/indexer/parser/rtf.php | 4 +- .../com_finder/helpers/indexer/parser/txt.php | 4 +- .../com_finder/helpers/indexer/query.php | 24 +- .../com_finder/helpers/indexer/result.php | 24 +- .../com_finder/helpers/indexer/stemmer.php | 4 +- .../com_finder/helpers/indexer/stemmer/fr.php | 8 +- .../helpers/indexer/stemmer/porter_en.php | 78 +- .../helpers/indexer/stemmer/snowball.php | 4 +- .../com_finder/helpers/indexer/taxonomy.php | 4 +- .../com_finder/helpers/indexer/token.php | 4 +- .../com_finder/helpers/language.php | 9 +- .../com_finder/models/fields/branches.php | 4 +- .../com_finder/models/fields/contentmap.php | 6 +- .../com_finder/models/fields/contenttypes.php | 4 +- .../com_finder/models/fields/directories.php | 4 +- .../com_finder/models/fields/searchfilter.php | 4 +- .../components/com_finder/models/filter.php | 10 +- .../components/com_finder/models/filters.php | 4 +- .../com_finder/models/forms/filter.xml | 121 +- .../models/forms/filter_filters.xml | 5 +- .../com_finder/models/forms/filter_index.xml | 5 + .../com_finder/models/forms/filter_maps.xml | 7 +- .../components/com_finder/models/index.php | 25 +- .../components/com_finder/models/indexer.php | 4 +- .../components/com_finder/models/maps.php | 25 +- .../com_finder/models/statistics.php | 4 +- .../components/com_finder/tables/filter.php | 16 +- .../components/com_finder/tables/link.php | 6 +- .../components/com_finder/tables/map.php | 6 +- .../com_finder/views/filter/tmpl/edit.php | 7 +- .../com_finder/views/filter/view.html.php | 48 +- .../com_finder/views/filters/tmpl/default.php | 80 +- .../com_finder/views/filters/view.html.php | 22 +- .../com_finder/views/index/tmpl/default.php | 6 +- .../com_finder/views/index/view.html.php | 20 +- .../com_finder/views/indexer/tmpl/default.php | 4 +- .../com_finder/views/indexer/view.html.php | 4 +- .../com_finder/views/maps/tmpl/default.php | 8 +- .../com_finder/views/maps/view.html.php | 18 +- .../views/statistics/tmpl/default.php | 6 +- .../com_finder/views/statistics/view.html.php | 10 +- .../components/com_installer/controller.php | 2 +- .../com_installer/controllers/database.php | 2 +- .../com_installer/controllers/discover.php | 2 +- .../com_installer/controllers/install.php | 12 +- .../com_installer/controllers/manage.php | 7 +- .../com_installer/controllers/update.php | 17 +- .../com_installer/controllers/updatesites.php | 2 +- .../com_installer/helpers/html/manage.php | 2 +- .../helpers/html/updatesites.php | 2 +- .../com_installer/helpers/installer.php | 4 +- .../components/com_installer/installer.php | 2 +- .../components/com_installer/installer.xml | 2 +- .../com_installer/models/database.php | 15 +- .../com_installer/models/discover.php | 4 +- .../com_installer/models/extension.php | 7 +- .../models/fields/extensionstatus.php | 2 +- .../com_installer/models/fields/folder.php | 2 +- .../com_installer/models/fields/location.php | 2 +- .../com_installer/models/fields/type.php | 4 +- .../models/forms/filter_discover.xml | 5 + .../models/forms/filter_languages.xml | 1 + .../models/forms/filter_manage.xml | 6 + .../models/forms/filter_updatesites.xml | 4 +- .../com_installer/models/install.php | 12 +- .../com_installer/models/languages.php | 4 +- .../com_installer/models/manage.php | 22 +- .../com_installer/models/update.php | 52 +- .../com_installer/models/updatesites.php | 14 +- .../com_installer/models/warnings.php | 4 +- .../views/database/tmpl/default.php | 8 +- .../views/database/view.html.php | 8 +- .../views/default/tmpl/default_ftp.php | 2 +- .../views/default/tmpl/default_message.php | 2 +- .../com_installer/views/default/view.php | 2 +- .../views/discover/tmpl/default.php | 2 +- .../views/discover/tmpl/default_item.php | 2 +- .../views/discover/view.html.php | 2 +- .../views/install/tmpl/default.php | 4 +- .../com_installer/views/install/view.html.php | 2 +- .../views/languages/tmpl/default.php | 9 +- .../views/languages/view.html.php | 8 +- .../views/manage/tmpl/default.php | 2 +- .../com_installer/views/manage/view.html.php | 6 +- .../views/update/tmpl/default.php | 4 +- .../com_installer/views/update/view.html.php | 2 +- .../views/updatesites/tmpl/default.php | 2 +- .../views/updatesites/view.html.php | 2 +- .../views/warnings/tmpl/default.php | 2 +- .../views/warnings/view.html.php | 4 +- .../com_joomlaupdate/controller.php | 2 +- .../com_joomlaupdate/controllers/update.php | 4 +- .../com_joomlaupdate/helpers/joomlaupdate.php | 2 +- .../com_joomlaupdate/helpers/select.php | 2 +- .../com_joomlaupdate/joomlaupdate.php | 2 +- .../com_joomlaupdate/joomlaupdate.xml | 2 +- .../com_joomlaupdate/models/default.php | 48 +- .../components/com_joomlaupdate/restore.php | 627 +- .../com_joomlaupdate/restore_finalisation.php | 10 +- .../views/default/tmpl/complete.php | 2 +- .../views/default/tmpl/default.php | 2 +- .../views/default/tmpl/default_nodownload.php | 2 +- .../views/default/tmpl/default_reinstall.php | 2 +- .../views/default/tmpl/default_update.php | 2 +- .../default/tmpl/default_updatemefirst.php | 2 +- .../views/default/tmpl/default_upload.php | 4 +- .../views/default/view.html.php | 2 +- .../views/update/tmpl/default.php | 2 +- .../views/update/tmpl/finaliseconfirm.php | 14 +- .../views/update/view.html.php | 18 +- .../views/upload/tmpl/captive.php | 14 +- .../views/upload/view.html.php | 2 +- .../components/com_languages/config.xml | 10 +- .../components/com_languages/controller.php | 2 +- .../com_languages/controllers/installed.php | 2 +- .../com_languages/controllers/language.php | 2 +- .../com_languages/controllers/languages.php | 2 +- .../com_languages/controllers/override.php | 2 +- .../com_languages/controllers/overrides.php | 2 +- .../controllers/strings.json.php | 2 +- .../com_languages/helpers/html/languages.php | 2 +- .../com_languages/helpers/jsonresponse.php | 2 +- .../com_languages/helpers/languages.php | 2 +- .../com_languages/helpers/multilangstatus.php | 10 +- .../components/com_languages/languages.php | 2 +- .../components/com_languages/languages.xml | 2 +- .../com_languages/models/forms/language.xml | 79 +- .../com_languages/models/forms/override.xml | 30 +- .../com_languages/models/installed.php | 5 +- .../com_languages/models/language.php | 2 +- .../com_languages/models/languages.php | 2 +- .../com_languages/models/override.php | 6 +- .../com_languages/models/overrides.php | 16 +- .../com_languages/models/strings.php | 10 +- .../views/installed/tmpl/default.php | 5 +- .../views/installed/view.html.php | 6 +- .../views/language/tmpl/edit.php | 2 +- .../views/language/view.html.php | 6 +- .../views/languages/tmpl/default.php | 2 +- .../views/languages/view.html.php | 24 +- .../views/multilangstatus/tmpl/default.php | 2 +- .../views/multilangstatus/view.html.php | 2 +- .../views/override/tmpl/edit.php | 2 +- .../views/override/view.html.php | 4 +- .../views/overrides/tmpl/default.php | 6 +- .../views/overrides/view.html.php | 2 +- .../components/com_login/controller.php | 2 +- administrator/components/com_login/login.php | 2 +- administrator/components/com_login/login.xml | 2 +- .../components/com_login/models/login.php | 16 +- .../com_login/views/login/tmpl/default.php | 2 +- .../com_login/views/login/view.html.php | 10 +- administrator/components/com_media/config.xml | 70 +- .../components/com_media/controller.php | 2 +- .../com_media/controllers/file.json.php | 14 +- .../components/com_media/controllers/file.php | 11 +- .../com_media/controllers/folder.php | 2 +- .../components/com_media/helpers/media.php | 2 +- .../com_media/layouts/toolbar/deletemedia.php | 2 +- .../com_media/layouts/toolbar/newfolder.php | 2 +- .../com_media/layouts/toolbar/uploadmedia.php | 2 +- administrator/components/com_media/media.php | 4 +- administrator/components/com_media/media.xml | 2 +- .../components/com_media/models/list.php | 10 +- .../components/com_media/models/manager.php | 3 +- .../com_media/views/images/tmpl/default.php | 23 +- .../com_media/views/images/view.html.php | 2 +- .../views/imageslist/tmpl/default.php | 2 +- .../views/imageslist/tmpl/default_folder.php | 6 +- .../views/imageslist/tmpl/default_image.php | 8 +- .../com_media/views/imageslist/view.html.php | 2 +- .../com_media/views/media/tmpl/default.php | 22 +- .../views/media/tmpl/default_folders.php | 6 +- .../views/media/tmpl/default_navigation.php | 2 +- .../com_media/views/media/view.html.php | 2 +- .../views/medialist/tmpl/default.php | 2 +- .../views/medialist/tmpl/details.php | 6 +- .../views/medialist/tmpl/details_doc.php | 14 +- .../views/medialist/tmpl/details_docs.php | 14 +- .../views/medialist/tmpl/details_folder.php | 8 +- .../views/medialist/tmpl/details_folders.php | 10 +- .../views/medialist/tmpl/details_img.php | 10 +- .../views/medialist/tmpl/details_imgs.php | 12 +- .../views/medialist/tmpl/details_up.php | 6 +- .../views/medialist/tmpl/details_video.php | 12 +- .../views/medialist/tmpl/details_videos.php | 14 +- .../com_media/views/medialist/tmpl/thumbs.php | 10 +- .../views/medialist/tmpl/thumbs_docs.php | 14 +- .../views/medialist/tmpl/thumbs_folders.php | 12 +- .../views/medialist/tmpl/thumbs_imgs.php | 16 +- .../views/medialist/tmpl/thumbs_up.php | 6 +- .../views/medialist/tmpl/thumbs_videos.php | 12 +- .../com_media/views/medialist/view.html.php | 2 +- .../components/com_menus/controller.php | 44 +- .../components/com_menus/controllers/item.php | 52 +- .../com_menus/controllers/items.php | 15 +- .../components/com_menus/controllers/menu.php | 70 +- .../com_menus/controllers/menus.php | 6 +- .../com_menus/helpers/associations.php | 7 +- .../com_menus/helpers/html/menus.php | 49 +- .../components/com_menus/helpers/menus.php | 254 +- .../layouts/joomla/menu/edit_modules.php | 4 +- .../layouts/joomla/searchtools/default.php | 2 +- .../joomla/searchtools/default/bar.php | 2 +- administrator/components/com_menus/menus.php | 2 +- administrator/components/com_menus/menus.xml | 3 +- .../models/fields/componentscategory.php | 2 +- .../models/fields/menuitembytype.php | 85 +- .../com_menus/models/fields/menuordering.php | 2 +- .../com_menus/models/fields/menuparent.php | 3 +- .../com_menus/models/fields/menupreset.php | 51 + .../com_menus/models/fields/menutype.php | 5 +- .../com_menus/models/fields/modal/menu.php | 47 +- .../com_menus/models/forms/filter_items.xml | 11 +- .../models/forms/filter_itemsadmin.xml | 3 +- .../com_menus/models/forms/filter_menus.xml | 2 +- .../com_menus/models/forms/item.xml | 85 +- .../com_menus/models/forms/item_alias.xml | 48 +- .../com_menus/models/forms/item_component.xml | 115 +- .../com_menus/models/forms/item_heading.xml | 42 +- .../com_menus/models/forms/item_separator.xml | 35 +- .../com_menus/models/forms/item_url.xml | 52 +- .../com_menus/models/forms/itemadmin.xml | 21 +- .../models/forms/itemadmin_alias.xml | 21 +- .../models/forms/itemadmin_component.xml | 42 +- .../models/forms/itemadmin_container.xml | 15 +- .../models/forms/itemadmin_heading.xml | 15 +- .../models/forms/itemadmin_separator.xml | 15 + .../com_menus/models/forms/itemadmin_url.xml | 49 +- .../com_menus/models/forms/menu.xml | 26 +- .../components/com_menus/models/item.php | 71 +- .../components/com_menus/models/items.php | 44 +- .../components/com_menus/models/menu.php | 13 +- .../components/com_menus/models/menus.php | 2 +- .../components/com_menus/models/menutypes.php | 10 +- .../components/com_menus/presets/joomla.xml | 582 ++ .../components/com_menus/presets/menu.xsd | 68 + .../components/com_menus/presets/modern.xml | 612 ++ .../components/com_menus/tables/menu.php | 2 +- .../com_menus/views/item/tmpl/edit.php | 53 +- .../com_menus/views/item/tmpl/edit.xml | 2 +- .../views/item/tmpl/edit_associations.php | 2 +- .../views/item/tmpl/edit_container.php | 2 +- .../views/item/tmpl/edit_modules.php | 102 +- .../views/item/tmpl/edit_options.php | 2 +- .../com_menus/views/item/tmpl/modal.php | 2 +- .../views/item/tmpl/modal_associations.php | 2 +- .../views/item/tmpl/modal_options.php | 2 +- .../com_menus/views/item/view.html.php | 2 +- .../com_menus/views/items/tmpl/default.php | 2 +- .../com_menus/views/items/tmpl/default.xml | 2 +- .../views/items/tmpl/default_batch_body.php | 22 +- .../views/items/tmpl/default_batch_footer.php | 7 +- .../com_menus/views/items/tmpl/modal.php | 141 +- .../com_menus/views/items/view.html.php | 12 +- .../com_menus/views/menu/tmpl/edit.php | 38 +- .../com_menus/views/menu/view.html.php | 6 +- .../com_menus/views/menu/view.xml.php | 170 + .../com_menus/views/menus/tmpl/default.php | 19 +- .../com_menus/views/menus/view.html.php | 11 +- .../views/menutypes/tmpl/default.php | 4 +- .../com_menus/views/menutypes/view.html.php | 4 +- .../components/com_messages/config.xml | 3 +- .../components/com_messages/controller.php | 2 +- .../com_messages/controllers/config.php | 2 +- .../com_messages/controllers/message.php | 2 +- .../com_messages/controllers/messages.php | 2 +- .../com_messages/helpers/html/messages.php | 9 +- .../com_messages/helpers/messages.php | 2 +- .../components/com_messages/messages.php | 2 +- .../components/com_messages/messages.xml | 2 +- .../components/com_messages/models/config.php | 2 +- .../models/fields/messagestates.php | 2 +- .../models/fields/usermessages.php | 2 +- .../com_messages/models/forms/config.xml | 29 +- .../com_messages/models/forms/message.xml | 9 +- .../com_messages/models/message.php | 48 +- .../com_messages/models/messages.php | 2 +- .../com_messages/tables/message.php | 2 +- .../views/config/tmpl/default.php | 2 +- .../com_messages/views/config/view.html.php | 6 +- .../views/message/tmpl/default.php | 4 +- .../com_messages/views/message/tmpl/edit.php | 2 +- .../com_messages/views/message/view.html.php | 6 +- .../views/messages/tmpl/default.php | 2 +- .../com_messages/views/messages/view.html.php | 3 +- .../components/com_modules/config.xml | 19 + .../components/com_modules/controller.php | 46 +- .../com_modules/controllers/module.php | 14 +- .../com_modules/controllers/modules.php | 2 +- .../com_modules/helpers/html/modules.php | 6 +- .../com_modules/helpers/modules.php | 2 +- .../components/com_modules/helpers/xml.php | 2 +- .../layouts/toolbar/cancelselect.php | 2 +- .../com_modules/layouts/toolbar/newmodule.php | 2 +- .../models/fields/modulesmodule.php | 2 +- .../models/fields/modulesposition.php | 2 +- .../com_modules/models/forms/advanced.xml | 6 +- .../models/forms/filter_modules.xml | 5 +- .../models/forms/filter_modulesadmin.xml | 109 + .../com_modules/models/forms/module.xml | 104 +- .../com_modules/models/forms/moduleadmin.xml | 166 + .../components/com_modules/models/module.php | 28 +- .../components/com_modules/models/modules.php | 35 +- .../com_modules/models/positions.php | 6 +- .../components/com_modules/models/select.php | 2 +- .../components/com_modules/modules.php | 2 +- .../components/com_modules/modules.xml | 2 +- .../com_modules/views/module/tmpl/edit.php | 10 +- .../views/module/tmpl/edit_assignment.php | 4 +- .../views/module/tmpl/edit_options.php | 2 +- .../views/module/tmpl/edit_positions.php | 2 +- .../com_modules/views/module/tmpl/modal.php | 2 +- .../com_modules/views/module/view.html.php | 6 +- .../com_modules/views/module/view.json.php | 2 +- .../views/modules/tmpl/default.php | 28 +- .../views/modules/tmpl/default_batch_body.php | 18 +- .../modules/tmpl/default_batch_footer.php | 2 +- .../com_modules/views/modules/tmpl/modal.php | 14 +- .../com_modules/views/modules/view.html.php | 66 +- .../views/positions/tmpl/modal.php | 4 +- .../com_modules/views/positions/view.html.php | 10 +- .../views/preview/tmpl/default.php | 4 +- .../com_modules/views/preview/view.html.php | 4 +- .../com_modules/views/select/tmpl/default.php | 6 +- .../com_modules/views/select/view.html.php | 6 +- .../components/com_newsfeeds/config.xml | 37 +- .../components/com_newsfeeds/controller.php | 2 +- .../com_newsfeeds/controllers/newsfeed.php | 2 +- .../com_newsfeeds/controllers/newsfeeds.php | 2 +- .../com_newsfeeds/helpers/associations.php | 7 +- .../com_newsfeeds/helpers/html/newsfeed.php | 3 +- .../com_newsfeeds/helpers/newsfeeds.php | 7 +- .../models/fields/modal/newsfeed.php | 5 +- .../com_newsfeeds/models/fields/newsfeeds.php | 2 +- .../com_newsfeeds/models/forms/newsfeed.xml | 42 +- .../com_newsfeeds/models/newsfeed.php | 10 +- .../com_newsfeeds/models/newsfeeds.php | 48 +- .../components/com_newsfeeds/newsfeeds.php | 2 +- .../components/com_newsfeeds/newsfeeds.xml | 2 +- .../com_newsfeeds/tables/newsfeed.php | 6 +- .../views/newsfeed/tmpl/edit.php | 2 +- .../views/newsfeed/tmpl/edit_associations.php | 2 +- .../views/newsfeed/tmpl/edit_display.php | 2 +- .../views/newsfeed/tmpl/edit_metadata.php | 2 +- .../views/newsfeed/tmpl/edit_params.php | 2 +- .../views/newsfeed/tmpl/modal.php | 2 +- .../newsfeed/tmpl/modal_associations.php | 2 +- .../views/newsfeed/tmpl/modal_display.php | 2 +- .../views/newsfeed/tmpl/modal_metadata.php | 2 +- .../views/newsfeed/tmpl/modal_params.php | 2 +- .../views/newsfeed/view.html.php | 8 +- .../views/newsfeeds/tmpl/default.php | 6 +- .../newsfeeds/tmpl/default_batch_body.php | 2 +- .../newsfeeds/tmpl/default_batch_footer.php | 2 +- .../views/newsfeeds/tmpl/modal.php | 11 +- .../views/newsfeeds/view.html.php | 5 +- .../components/com_plugins/config.xml | 3 +- .../components/com_plugins/controller.php | 2 +- .../com_plugins/controllers/plugin.php | 2 +- .../com_plugins/controllers/plugins.php | 2 +- .../com_plugins/helpers/plugins.php | 2 +- .../models/fields/pluginordering.php | 2 +- .../com_plugins/models/fields/plugintype.php | 2 +- .../com_plugins/models/forms/plugin.xml | 44 +- .../components/com_plugins/models/plugin.php | 6 +- .../components/com_plugins/models/plugins.php | 4 +- .../components/com_plugins/plugins.php | 2 +- .../components/com_plugins/plugins.xml | 2 +- .../com_plugins/views/plugin/tmpl/edit.php | 28 +- .../views/plugin/tmpl/edit_options.php | 2 +- .../com_plugins/views/plugin/tmpl/modal.php | 29 + .../com_plugins/views/plugin/view.html.php | 6 +- .../views/plugins/tmpl/default.php | 2 +- .../com_plugins/views/plugins/view.html.php | 20 +- .../components/com_postinstall/config.xml | 3 +- .../com_postinstall/controllers/message.php | 26 +- .../com_postinstall/models/messages.php | 36 +- .../com_postinstall/postinstall.php | 2 +- .../com_postinstall/postinstall.xml | 2 +- .../components/com_postinstall/toolbar.php | 2 +- .../views/messages/tmpl/default.php | 9 +- .../views/messages/view.html.php | 23 +- .../components/com_redirect/config.xml | 35 +- .../components/com_redirect/controller.php | 2 +- .../com_redirect/controllers/link.php | 2 +- .../com_redirect/controllers/links.php | 20 +- .../com_redirect/helpers/html/redirect.php | 5 +- .../com_redirect/helpers/redirect.php | 35 +- .../com_redirect/layouts/toolbar/batch.php | 4 +- .../com_redirect/models/fields/redirect.php | 4 +- .../models/forms/filter_links.xml | 2 +- .../com_redirect/models/forms/link.xml | 64 +- .../components/com_redirect/models/link.php | 3 +- .../components/com_redirect/models/links.php | 19 +- .../components/com_redirect/redirect.php | 2 +- .../components/com_redirect/redirect.xml | 2 +- .../components/com_redirect/tables/link.php | 16 +- .../com_redirect/views/link/tmpl/edit.php | 2 +- .../com_redirect/views/link/view.html.php | 8 +- .../com_redirect/views/links/tmpl/default.php | 32 +- .../com_redirect/views/links/tmpl/default.xml | 8 + .../views/links/tmpl/default_addform.php | 2 +- .../views/links/tmpl/default_batch_body.php | 6 +- .../views/links/tmpl/default_batch_footer.php | 2 +- .../com_redirect/views/links/view.html.php | 62 +- .../components/com_search/controller.php | 2 +- .../com_search/controllers/searches.php | 2 +- .../components/com_search/helpers/search.php | 8 +- .../components/com_search/helpers/site.php | 2 +- .../components/com_search/models/searches.php | 2 +- .../components/com_search/search.php | 2 +- .../components/com_search/search.xml | 2 +- .../views/searches/tmpl/default.php | 4 +- .../views/searches/tmpl/default.xml | 8 + .../com_search/views/searches/view.html.php | 6 +- administrator/components/com_tags/config.xml | 214 +- .../components/com_tags/controller.php | 2 +- .../components/com_tags/controllers/tag.php | 4 +- .../components/com_tags/controllers/tags.php | 2 +- .../components/com_tags/helpers/tags.php | 2 +- .../components/com_tags/models/forms/tag.xml | 61 +- .../components/com_tags/models/tag.php | 2 +- .../components/com_tags/models/tags.php | 2 +- .../components/com_tags/tables/tag.php | 3 +- administrator/components/com_tags/tags.php | 2 +- administrator/components/com_tags/tags.xml | 2 +- .../com_tags/views/tag/tmpl/edit.php | 2 +- .../com_tags/views/tag/tmpl/edit_metadata.php | 2 +- .../com_tags/views/tag/tmpl/edit_options.php | 2 +- .../com_tags/views/tag/view.html.php | 8 +- .../com_tags/views/tags/tmpl/default.php | 6 +- .../com_tags/views/tags/tmpl/default.xml | 8 + .../views/tags/tmpl/default_batch_body.php | 2 +- .../views/tags/tmpl/default_batch_footer.php | 2 +- .../com_tags/views/tags/view.html.php | 7 +- .../components/com_templates/config.xml | 26 +- .../components/com_templates/controller.php | 2 +- .../com_templates/controllers/style.php | 9 +- .../com_templates/controllers/styles.php | 2 +- .../com_templates/controllers/template.php | 32 +- .../com_templates/helpers/html/templates.php | 8 +- .../com_templates/helpers/template.php | 2 +- .../com_templates/helpers/templates.php | 2 +- .../models/fields/templatelocation.php | 4 +- .../models/fields/templatename.php | 2 +- .../models/forms/filter_styles.xml | 4 +- .../com_templates/models/forms/source.xml | 13 +- .../com_templates/models/forms/style.xml | 27 +- .../models/forms/style_administrator.xml | 3 +- .../com_templates/models/forms/style_site.xml | 3 +- .../components/com_templates/models/style.php | 56 +- .../com_templates/models/styles.php | 5 +- .../com_templates/models/template.php | 20 +- .../com_templates/models/templates.php | 2 +- .../components/com_templates/tables/style.php | 4 +- .../components/com_templates/templates.php | 2 +- .../components/com_templates/templates.xml | 2 +- .../com_templates/views/style/tmpl/edit.php | 6 +- .../views/style/tmpl/edit_assignment.php | 12 +- .../views/style/tmpl/edit_options.php | 2 +- .../com_templates/views/style/view.html.php | 6 +- .../com_templates/views/style/view.json.php | 2 +- .../views/styles/tmpl/default.php | 12 +- .../com_templates/views/styles/view.html.php | 6 +- .../views/template/tmpl/default.php | 74 +- .../template/tmpl/default_description.php | 2 +- .../views/template/tmpl/default_folders.php | 2 +- .../template/tmpl/default_modal_copy_body.php | 2 +- .../tmpl/default_modal_copy_footer.php | 2 +- .../tmpl/default_modal_delete_body.php | 4 +- .../tmpl/default_modal_delete_footer.php | 2 +- .../template/tmpl/default_modal_file_body.php | 2 +- .../tmpl/default_modal_file_footer.php | 2 +- .../tmpl/default_modal_folder_body.php | 2 +- .../tmpl/default_modal_folder_footer.php | 2 +- .../tmpl/default_modal_rename_body.php | 2 +- .../tmpl/default_modal_rename_footer.php | 2 +- .../tmpl/default_modal_resize_body.php | 2 +- .../tmpl/default_modal_resize_footer.php | 2 +- .../views/template/tmpl/default_tree.php | 10 +- .../views/template/tmpl/readonly.php | 2 +- .../views/template/view.html.php | 20 +- .../views/templates/tmpl/default.php | 2 +- .../views/templates/view.html.php | 6 +- administrator/components/com_users/config.xml | 142 +- .../components/com_users/controller.php | 6 +- .../com_users/controllers/group.php | 2 +- .../com_users/controllers/groups.php | 2 +- .../com_users/controllers/level.php | 43 +- .../com_users/controllers/levels.php | 2 +- .../components/com_users/controllers/mail.php | 2 +- .../components/com_users/controllers/note.php | 2 +- .../com_users/controllers/notes.php | 2 +- .../com_users/controllers/profile.json.php | 2 +- .../components/com_users/controllers/user.php | 2 +- .../com_users/controllers/users.php | 2 +- .../components/com_users/helpers/debug.php | 2 +- .../com_users/helpers/html/users.php | 20 +- .../components/com_users/helpers/users.php | 24 +- .../com_users/models/debuggroup.php | 17 +- .../components/com_users/models/debuguser.php | 17 +- .../com_users/models/fields/groupparent.php | 2 +- .../com_users/models/fields/levels.php | 2 +- .../com_users/models/forms/fields/user.xml | 12 + .../models/forms/filter_debuggroup.xml | 5 + .../com_users/models/forms/filter_users.xml | 16 +- .../com_users/models/forms/group.xml | 32 +- .../com_users/models/forms/level.xml | 24 +- .../com_users/models/forms/mail.xml | 53 +- .../com_users/models/forms/note.xml | 59 +- .../com_users/models/forms/user.xml | 147 +- .../components/com_users/models/group.php | 7 +- .../components/com_users/models/groups.php | 2 +- .../components/com_users/models/level.php | 75 +- .../components/com_users/models/levels.php | 2 +- .../components/com_users/models/mail.php | 2 +- .../components/com_users/models/note.php | 2 +- .../components/com_users/models/notes.php | 8 +- .../components/com_users/models/user.php | 17 +- .../components/com_users/models/users.php | 2 +- .../components/com_users/tables/note.php | 4 +- administrator/components/com_users/users.php | 2 +- administrator/components/com_users/users.xml | 2 +- .../views/debuggroup/tmpl/default.php | 2 +- .../com_users/views/debuggroup/view.html.php | 9 +- .../views/debuguser/tmpl/default.php | 2 +- .../com_users/views/debuguser/view.html.php | 9 +- .../com_users/views/group/tmpl/edit.php | 2 +- .../com_users/views/group/view.html.php | 6 +- .../com_users/views/groups/tmpl/default.php | 14 +- .../com_users/views/groups/view.html.php | 10 +- .../com_users/views/level/tmpl/edit.php | 4 +- .../com_users/views/level/view.html.php | 6 +- .../com_users/views/levels/tmpl/default.php | 18 +- .../com_users/views/levels/view.html.php | 12 +- .../com_users/views/mail/tmpl/default.php | 2 +- .../com_users/views/mail/view.html.php | 2 +- .../com_users/views/note/tmpl/edit.php | 2 +- .../com_users/views/note/view.html.php | 6 +- .../com_users/views/notes/tmpl/default.php | 6 +- .../com_users/views/notes/tmpl/modal.php | 4 +- .../com_users/views/notes/view.html.php | 4 +- .../com_users/views/user/tmpl/edit.php | 2 +- .../com_users/views/user/tmpl/edit_groups.php | 2 +- .../com_users/views/user/view.html.php | 6 +- .../com_users/views/users/tmpl/default.php | 24 +- .../views/users/tmpl/default_batch_body.php | 26 +- .../views/users/tmpl/default_batch_footer.php | 2 +- .../com_users/views/users/tmpl/modal.php | 5 +- .../com_users/views/users/view.html.php | 34 +- administrator/includes/defines.php | 2 +- administrator/includes/framework.php | 8 +- administrator/includes/helper.php | 2 +- administrator/includes/subtoolbar.php | 2 +- administrator/includes/toolbar.php | 2 +- administrator/index.php | 2 +- .../language/en-GB/en-GB.com_admin.ini | 17 +- .../language/en-GB/en-GB.com_admin.sys.ini | 4 +- .../language/en-GB/en-GB.com_ajax.ini | 3 +- .../language/en-GB/en-GB.com_ajax.sys.ini | 2 +- .../language/en-GB/en-GB.com_associations.ini | 5 +- .../en-GB/en-GB.com_associations.sys.ini | 2 +- .../language/en-GB/en-GB.com_banners.ini | 78 +- .../language/en-GB/en-GB.com_banners.sys.ini | 2 +- .../language/en-GB/en-GB.com_cache.ini | 4 +- .../language/en-GB/en-GB.com_cache.sys.ini | 2 +- .../language/en-GB/en-GB.com_categories.ini | 37 +- .../en-GB/en-GB.com_categories.sys.ini | 2 +- .../language/en-GB/en-GB.com_checkin.ini | 4 +- .../language/en-GB/en-GB.com_checkin.sys.ini | 2 +- .../language/en-GB/en-GB.com_config.ini | 27 +- .../language/en-GB/en-GB.com_config.sys.ini | 2 +- .../language/en-GB/en-GB.com_contact.ini | 55 +- .../language/en-GB/en-GB.com_contact.sys.ini | 2 +- .../language/en-GB/en-GB.com_content.ini | 30 +- .../language/en-GB/en-GB.com_content.sys.ini | 2 +- .../en-GB/en-GB.com_contenthistory.ini | 6 +- .../en-GB/en-GB.com_contenthistory.sys.ini | 2 +- .../language/en-GB/en-GB.com_cpanel.ini | 15 +- .../language/en-GB/en-GB.com_cpanel.sys.ini | 2 +- .../language/en-GB/en-GB.com_fields.ini | 61 +- .../language/en-GB/en-GB.com_fields.sys.ini | 2 +- .../language/en-GB/en-GB.com_finder.ini | 39 +- .../language/en-GB/en-GB.com_finder.sys.ini | 2 +- .../language/en-GB/en-GB.com_installer.ini | 36 +- .../en-GB/en-GB.com_installer.sys.ini | 2 +- .../language/en-GB/en-GB.com_joomlaupdate.ini | 8 +- .../en-GB/en-GB.com_joomlaupdate.sys.ini | 2 +- .../language/en-GB/en-GB.com_languages.ini | 36 +- .../en-GB/en-GB.com_languages.sys.ini | 2 +- .../language/en-GB/en-GB.com_login.ini | 2 +- .../language/en-GB/en-GB.com_login.sys.ini | 2 +- .../language/en-GB/en-GB.com_mailto.sys.ini | 2 +- .../language/en-GB/en-GB.com_media.ini | 35 +- .../language/en-GB/en-GB.com_media.sys.ini | 2 +- .../language/en-GB/en-GB.com_menus.ini | 86 +- .../language/en-GB/en-GB.com_menus.sys.ini | 2 +- .../language/en-GB/en-GB.com_messages.ini | 32 +- .../language/en-GB/en-GB.com_messages.sys.ini | 2 +- .../language/en-GB/en-GB.com_modules.ini | 43 +- .../language/en-GB/en-GB.com_modules.sys.ini | 2 +- .../language/en-GB/en-GB.com_newsfeeds.ini | 36 +- .../en-GB/en-GB.com_newsfeeds.sys.ini | 2 +- .../language/en-GB/en-GB.com_plugins.ini | 20 +- .../language/en-GB/en-GB.com_plugins.sys.ini | 2 +- .../language/en-GB/en-GB.com_postinstall.ini | 3 +- .../en-GB/en-GB.com_postinstall.sys.ini | 2 +- .../language/en-GB/en-GB.com_redirect.ini | 47 +- .../language/en-GB/en-GB.com_redirect.sys.ini | 2 +- .../language/en-GB/en-GB.com_search.ini | 2 +- .../language/en-GB/en-GB.com_search.sys.ini | 2 +- .../language/en-GB/en-GB.com_tags.ini | 32 +- .../language/en-GB/en-GB.com_tags.sys.ini | 2 +- .../language/en-GB/en-GB.com_templates.ini | 48 +- .../en-GB/en-GB.com_templates.sys.ini | 2 +- .../language/en-GB/en-GB.com_users.ini | 84 +- .../language/en-GB/en-GB.com_users.sys.ini | 2 +- .../language/en-GB/en-GB.com_weblinks.ini | 36 +- .../language/en-GB/en-GB.com_weblinks.sys.ini | 2 +- .../language/en-GB/en-GB.com_wrapper.ini | 2 +- .../language/en-GB/en-GB.com_wrapper.sys.ini | 2 +- administrator/language/en-GB/en-GB.ini | 48 +- .../language/en-GB/en-GB.lib_joomla.ini | 45 +- .../language/en-GB/en-GB.localise.php | 2 +- .../language/en-GB/en-GB.mod_custom.ini | 2 +- .../language/en-GB/en-GB.mod_custom.sys.ini | 2 +- .../language/en-GB/en-GB.mod_feed.ini | 2 +- .../language/en-GB/en-GB.mod_feed.sys.ini | 2 +- .../language/en-GB/en-GB.mod_latest.ini | 4 +- .../language/en-GB/en-GB.mod_latest.sys.ini | 4 +- .../language/en-GB/en-GB.mod_logged.ini | 4 +- .../language/en-GB/en-GB.mod_logged.sys.ini | 4 +- .../language/en-GB/en-GB.mod_login.ini | 2 +- .../language/en-GB/en-GB.mod_login.sys.ini | 2 +- .../language/en-GB/en-GB.mod_menu.ini | 16 +- .../language/en-GB/en-GB.mod_menu.sys.ini | 2 +- .../en-GB/en-GB.mod_multilangstatus.ini | 2 +- .../en-GB/en-GB.mod_multilangstatus.sys.ini | 2 +- .../language/en-GB/en-GB.mod_popular.ini | 2 +- .../language/en-GB/en-GB.mod_popular.sys.ini | 2 +- .../language/en-GB/en-GB.mod_quickicon.ini | 2 +- .../en-GB/en-GB.mod_quickicon.sys.ini | 2 +- .../language/en-GB/en-GB.mod_sampledata.ini | 10 + .../en-GB/en-GB.mod_sampledata.sys.ini | 7 + .../language/en-GB/en-GB.mod_stats_admin.ini | 4 +- .../en-GB/en-GB.mod_stats_admin.sys.ini | 4 +- .../language/en-GB/en-GB.mod_status.ini | 2 +- .../language/en-GB/en-GB.mod_status.sys.ini | 2 +- .../language/en-GB/en-GB.mod_submenu.ini | 2 +- .../language/en-GB/en-GB.mod_submenu.sys.ini | 2 +- .../language/en-GB/en-GB.mod_title.ini | 2 +- .../language/en-GB/en-GB.mod_title.sys.ini | 2 +- .../language/en-GB/en-GB.mod_toolbar.ini | 2 +- .../language/en-GB/en-GB.mod_toolbar.sys.ini | 2 +- .../language/en-GB/en-GB.mod_version.ini | 2 +- .../language/en-GB/en-GB.mod_version.sys.ini | 2 +- .../en-GB/en-GB.plg_authentication_cookie.ini | 2 +- .../en-GB.plg_authentication_cookie.sys.ini | 2 +- .../en-GB/en-GB.plg_authentication_gmail.ini | 2 +- .../en-GB.plg_authentication_gmail.sys.ini | 2 +- .../en-GB/en-GB.plg_authentication_joomla.ini | 2 +- .../en-GB.plg_authentication_joomla.sys.ini | 2 +- .../en-GB/en-GB.plg_authentication_ldap.ini | 8 +- .../en-GB.plg_authentication_ldap.sys.ini | 2 +- .../en-GB/en-GB.plg_captcha_recaptcha.ini | 14 +- .../en-GB/en-GB.plg_captcha_recaptcha.sys.ini | 2 +- .../en-GB/en-GB.plg_content_contact.ini | 2 +- .../en-GB/en-GB.plg_content_contact.sys.ini | 2 +- .../en-GB/en-GB.plg_content_emailcloak.ini | 2 +- .../en-GB.plg_content_emailcloak.sys.ini | 2 +- .../en-GB/en-GB.plg_content_fields.ini | 2 +- .../en-GB/en-GB.plg_content_fields.sys.ini | 2 +- .../en-GB/en-GB.plg_content_finder.ini | 2 +- .../en-GB/en-GB.plg_content_finder.sys.ini | 2 +- .../en-GB/en-GB.plg_content_joomla.ini | 2 +- .../en-GB/en-GB.plg_content_joomla.sys.ini | 2 +- .../en-GB/en-GB.plg_content_loadmodule.ini | 4 +- .../en-GB.plg_content_loadmodule.sys.ini | 4 +- .../en-GB/en-GB.plg_content_pagebreak.ini | 6 +- .../en-GB/en-GB.plg_content_pagebreak.sys.ini | 4 +- .../en-GB.plg_content_pagenavigation.ini | 2 +- .../en-GB.plg_content_pagenavigation.sys.ini | 2 +- .../language/en-GB/en-GB.plg_content_vote.ini | 2 +- .../en-GB/en-GB.plg_content_vote.sys.ini | 2 +- .../en-GB/en-GB.plg_editors-xtd_article.ini | 4 +- .../en-GB.plg_editors-xtd_article.sys.ini | 4 +- .../en-GB/en-GB.plg_editors-xtd_contact.ini | 4 +- .../en-GB.plg_editors-xtd_contact.sys.ini | 4 +- .../en-GB/en-GB.plg_editors-xtd_fields.ini | 4 +- .../en-GB.plg_editors-xtd_fields.sys.ini | 4 +- .../en-GB/en-GB.plg_editors-xtd_image.ini | 4 +- .../en-GB/en-GB.plg_editors-xtd_image.sys.ini | 4 +- .../en-GB/en-GB.plg_editors-xtd_menu.ini | 4 +- .../en-GB/en-GB.plg_editors-xtd_menu.sys.ini | 4 +- .../en-GB/en-GB.plg_editors-xtd_module.ini | 4 +- .../en-GB.plg_editors-xtd_module.sys.ini | 4 +- .../en-GB/en-GB.plg_editors-xtd_pagebreak.ini | 2 +- .../en-GB.plg_editors-xtd_pagebreak.sys.ini | 2 +- .../en-GB/en-GB.plg_editors-xtd_readmore.ini | 4 +- .../en-GB.plg_editors-xtd_readmore.sys.ini | 4 +- .../en-GB/en-GB.plg_editors_codemirror.ini | 14 +- .../en-GB.plg_editors_codemirror.sys.ini | 2 +- .../language/en-GB/en-GB.plg_editors_none.ini | 2 +- .../en-GB/en-GB.plg_editors_none.sys.ini | 2 +- .../en-GB/en-GB.plg_editors_tinymce.ini | 17 +- .../en-GB/en-GB.plg_editors_tinymce.sys.ini | 2 +- .../en-GB/en-GB.plg_extension_joomla.ini | 2 +- .../en-GB/en-GB.plg_extension_joomla.sys.ini | 2 +- .../en-GB/en-GB.plg_fields_calendar.ini | 2 +- .../en-GB/en-GB.plg_fields_calendar.sys.ini | 2 +- .../en-GB/en-GB.plg_fields_checkboxes.ini | 2 +- .../en-GB/en-GB.plg_fields_checkboxes.sys.ini | 2 +- .../language/en-GB/en-GB.plg_fields_color.ini | 2 +- .../en-GB/en-GB.plg_fields_color.sys.ini | 2 +- .../en-GB/en-GB.plg_fields_editor.ini | 2 +- .../en-GB/en-GB.plg_fields_editor.sys.ini | 2 +- .../language/en-GB/en-GB.plg_fields_image.ini | 2 +- .../en-GB/en-GB.plg_fields_image.sys.ini | 2 +- .../en-GB/en-GB.plg_fields_imagelist.ini | 4 +- .../en-GB/en-GB.plg_fields_imagelist.sys.ini | 2 +- .../en-GB/en-GB.plg_fields_integer.ini | 2 +- .../en-GB/en-GB.plg_fields_integer.sys.ini | 2 +- .../language/en-GB/en-GB.plg_fields_list.ini | 2 +- .../en-GB/en-GB.plg_fields_list.sys.ini | 2 +- .../language/en-GB/en-GB.plg_fields_media.ini | 4 +- .../en-GB/en-GB.plg_fields_media.sys.ini | 2 +- .../language/en-GB/en-GB.plg_fields_radio.ini | 2 +- .../en-GB/en-GB.plg_fields_radio.sys.ini | 2 +- .../language/en-GB/en-GB.plg_fields_sql.ini | 7 +- .../en-GB/en-GB.plg_fields_sql.sys.ini | 2 +- .../language/en-GB/en-GB.plg_fields_text.ini | 2 +- .../en-GB/en-GB.plg_fields_text.sys.ini | 2 +- .../en-GB/en-GB.plg_fields_textarea.ini | 2 +- .../en-GB/en-GB.plg_fields_textarea.sys.ini | 2 +- .../language/en-GB/en-GB.plg_fields_url.ini | 2 +- .../en-GB/en-GB.plg_fields_url.sys.ini | 2 +- .../language/en-GB/en-GB.plg_fields_user.ini | 6 +- .../en-GB/en-GB.plg_fields_user.sys.ini | 2 +- .../en-GB/en-GB.plg_fields_usergrouplist.ini | 2 +- .../en-GB.plg_fields_usergrouplist.sys.ini | 2 +- .../en-GB/en-GB.plg_finder_categories.ini | 2 +- .../en-GB/en-GB.plg_finder_categories.sys.ini | 2 +- .../en-GB/en-GB.plg_finder_contacts.ini | 2 +- .../en-GB/en-GB.plg_finder_contacts.sys.ini | 2 +- .../en-GB/en-GB.plg_finder_content.ini | 2 +- .../en-GB/en-GB.plg_finder_content.sys.ini | 2 +- .../en-GB/en-GB.plg_finder_newsfeeds.ini | 2 +- .../en-GB/en-GB.plg_finder_newsfeeds.sys.ini | 2 +- .../language/en-GB/en-GB.plg_finder_tags.ini | 2 +- .../en-GB/en-GB.plg_finder_tags.sys.ini | 2 +- .../en-GB/en-GB.plg_finder_weblinks.ini | 2 +- .../en-GB/en-GB.plg_finder_weblinks.sys.ini | 2 +- .../en-GB.plg_installer_folderinstaller.ini | 2 +- ...n-GB.plg_installer_folderinstaller.sys.ini | 2 +- .../en-GB.plg_installer_packageinstaller.ini | 2 +- ...-GB.plg_installer_packageinstaller.sys.ini | 2 +- .../en-GB.plg_installer_urlinstaller.ini | 2 +- .../en-GB.plg_installer_urlinstaller.sys.ini | 2 +- .../en-GB.plg_installer_webinstaller.ini | 2 +- .../en-GB.plg_installer_webinstaller.sys.ini | 2 +- .../en-GB.plg_quickicon_extensionupdate.ini | 2 +- ...n-GB.plg_quickicon_extensionupdate.sys.ini | 2 +- .../en-GB.plg_quickicon_joomlaupdate.ini | 2 +- .../en-GB.plg_quickicon_joomlaupdate.sys.ini | 2 +- .../en-GB.plg_quickicon_phpversioncheck.ini | 2 +- ...n-GB.plg_quickicon_phpversioncheck.sys.ini | 2 +- .../en-GB/en-GB.plg_sampledata_blog.ini | 64 + .../en-GB/en-GB.plg_sampledata_blog.sys.ini | 7 + .../en-GB/en-GB.plg_search_categories.ini | 2 +- .../en-GB/en-GB.plg_search_categories.sys.ini | 2 +- .../en-GB/en-GB.plg_search_contacts.ini | 2 +- .../en-GB/en-GB.plg_search_contacts.sys.ini | 2 +- .../en-GB/en-GB.plg_search_content.ini | 2 +- .../en-GB/en-GB.plg_search_content.sys.ini | 2 +- .../en-GB/en-GB.plg_search_newsfeeds.ini | 2 +- .../en-GB/en-GB.plg_search_newsfeeds.sys.ini | 2 +- .../language/en-GB/en-GB.plg_search_tags.ini | 2 +- .../en-GB/en-GB.plg_search_tags.sys.ini | 2 +- .../en-GB/en-GB.plg_search_weblinks.ini | 2 +- .../en-GB/en-GB.plg_search_weblinks.sys.ini | 2 +- .../language/en-GB/en-GB.plg_system_cache.ini | 4 +- .../en-GB/en-GB.plg_system_cache.sys.ini | 2 +- .../language/en-GB/en-GB.plg_system_debug.ini | 6 +- .../en-GB/en-GB.plg_system_debug.sys.ini | 4 +- .../en-GB/en-GB.plg_system_fields.ini | 2 +- .../en-GB/en-GB.plg_system_fields.sys.ini | 2 +- .../en-GB/en-GB.plg_system_highlight.ini | 2 +- .../en-GB/en-GB.plg_system_highlight.sys.ini | 2 +- .../en-GB/en-GB.plg_system_languagecode.ini | 2 +- .../en-GB.plg_system_languagecode.sys.ini | 2 +- .../en-GB/en-GB.plg_system_languagefilter.ini | 4 +- .../en-GB.plg_system_languagefilter.sys.ini | 2 +- .../language/en-GB/en-GB.plg_system_log.ini | 2 +- .../en-GB/en-GB.plg_system_log.sys.ini | 2 +- .../en-GB/en-GB.plg_system_logout.ini | 2 +- .../en-GB/en-GB.plg_system_logout.sys.ini | 2 +- .../language/en-GB/en-GB.plg_system_p3p.ini | 2 +- .../en-GB/en-GB.plg_system_p3p.sys.ini | 2 +- .../en-GB/en-GB.plg_system_redirect.ini | 10 +- .../en-GB/en-GB.plg_system_redirect.sys.ini | 2 +- .../en-GB/en-GB.plg_system_remember.ini | 2 +- .../en-GB/en-GB.plg_system_remember.sys.ini | 2 +- .../language/en-GB/en-GB.plg_system_sef.ini | 2 +- .../en-GB/en-GB.plg_system_sef.sys.ini | 2 +- .../en-GB/en-GB.plg_system_sessiongc.ini | 15 + .../en-GB/en-GB.plg_system_sessiongc.sys.ini | 7 + .../language/en-GB/en-GB.plg_system_stats.ini | 9 +- .../en-GB/en-GB.plg_system_stats.sys.ini | 2 +- .../en-GB.plg_system_updatenotification.ini | 5 +- ...n-GB.plg_system_updatenotification.sys.ini | 2 +- .../en-GB/en-GB.plg_twofactorauth_totp.ini | 6 +- .../en-GB.plg_twofactorauth_totp.sys.ini | 2 +- .../en-GB/en-GB.plg_twofactorauth_yubikey.ini | 2 +- .../en-GB.plg_twofactorauth_yubikey.sys.ini | 2 +- .../en-GB/en-GB.plg_user_contactcreator.ini | 2 +- .../en-GB.plg_user_contactcreator.sys.ini | 2 +- .../language/en-GB/en-GB.plg_user_joomla.ini | 6 +- .../en-GB/en-GB.plg_user_joomla.sys.ini | 2 +- .../language/en-GB/en-GB.plg_user_profile.ini | 3 +- .../en-GB/en-GB.plg_user_profile.sys.ini | 2 +- .../language/en-GB/en-GB.tpl_hathor.ini | 6 +- .../language/en-GB/en-GB.tpl_hathor.sys.ini | 2 +- .../language/en-GB/en-GB.tpl_isis.ini | 2 +- .../language/en-GB/en-GB.tpl_isis.sys.ini | 2 +- administrator/language/en-GB/en-GB.xml | 8 +- administrator/language/en-GB/install.xml | 272 +- administrator/manifests/files/joomla.xml | 6 +- administrator/manifests/libraries/joomla.xml | 2 +- .../manifests/packages/pkg_en-GB.xml | 8 +- .../manifests/packages/pkg_weblinks.xml | 2 +- .../modules/mod_custom/mod_custom.php | 2 +- .../modules/mod_custom/mod_custom.xml | 37 +- .../modules/mod_custom/tmpl/default.php | 2 +- administrator/modules/mod_feed/helper.php | 2 +- administrator/modules/mod_feed/mod_feed.php | 2 +- administrator/modules/mod_feed/mod_feed.xml | 122 +- .../modules/mod_feed/tmpl/default.php | 24 +- administrator/modules/mod_latest/helper.php | 24 +- .../modules/mod_latest/mod_latest.php | 2 +- .../modules/mod_latest/mod_latest.xml | 70 +- .../modules/mod_latest/tmpl/default.php | 6 +- administrator/modules/mod_logged/helper.php | 4 +- .../modules/mod_logged/mod_logged.php | 2 +- .../modules/mod_logged/mod_logged.xml | 43 +- .../modules/mod_logged/tmpl/default.php | 4 +- administrator/modules/mod_login/helper.php | 4 +- administrator/modules/mod_login/mod_login.php | 2 +- administrator/modules/mod_login/mod_login.xml | 21 +- .../modules/mod_login/tmpl/default.php | 6 +- administrator/modules/mod_menu/helper.php | 346 +- administrator/modules/mod_menu/menu.php | 833 +-- administrator/modules/mod_menu/mod_menu.php | 3 +- administrator/modules/mod_menu/mod_menu.xml | 67 +- .../modules/mod_menu/preset/disabled.php | 78 - .../modules/mod_menu/preset/enabled.php | 448 -- .../modules/mod_menu/tmpl/default.php | 27 +- .../modules/mod_menu/tmpl/default_submenu.php | 138 + .../en-GB/en-GB.mod_multilangstatus.ini | 2 +- .../en-GB/en-GB.mod_multilangstatus.sys.ini | 2 +- .../mod_multilangstatus.php | 2 +- .../mod_multilangstatus.xml | 5 +- .../mod_multilangstatus/tmpl/default.php | 4 +- administrator/modules/mod_popular/helper.php | 18 +- .../modules/mod_popular/mod_popular.php | 2 +- .../modules/mod_popular/mod_popular.xml | 59 +- .../modules/mod_popular/tmpl/default.php | 6 +- .../modules/mod_quickicon/helper.php | 2 +- .../modules/mod_quickicon/mod_quickicon.php | 2 +- .../modules/mod_quickicon/mod_quickicon.xml | 38 +- .../modules/mod_quickicon/tmpl/default.php | 2 +- .../modules/mod_sampledata/helper.php | 34 + .../modules/mod_sampledata/mod_sampledata.php | 16 + .../modules/mod_sampledata/mod_sampledata.xml | 37 + .../modules/mod_sampledata/tmpl/default.php | 57 + .../modules/mod_stats_admin/helper.php | 12 +- .../language/en-GB.mod_stats_admin.ini | 4 +- .../language/en-GB.mod_stats_admin.sys.ini | 4 +- .../mod_stats_admin/mod_stats_admin.php | 2 +- .../mod_stats_admin/mod_stats_admin.xml | 91 +- .../modules/mod_stats_admin/tmpl/default.php | 4 +- .../modules/mod_status/mod_status.php | 2 +- .../modules/mod_status/mod_status.xml | 51 +- .../modules/mod_status/tmpl/default.php | 8 +- .../modules/mod_submenu/mod_submenu.php | 2 +- .../modules/mod_submenu/mod_submenu.xml | 12 +- .../modules/mod_submenu/tmpl/default.php | 2 +- administrator/modules/mod_title/mod_title.php | 2 +- administrator/modules/mod_title/mod_title.xml | 12 +- .../modules/mod_title/tmpl/default.php | 2 +- .../modules/mod_toolbar/mod_toolbar.php | 2 +- .../modules/mod_toolbar/mod_toolbar.xml | 12 +- .../modules/mod_toolbar/tmpl/default.php | 2 +- administrator/modules/mod_version/helper.php | 4 +- .../language/en-GB/en-GB.mod_version.ini | 2 +- .../language/en-GB/en-GB.mod_version.sys.ini | 2 +- .../modules/mod_version/mod_version.php | 2 +- .../modules/mod_version/mod_version.xml | 36 +- .../modules/mod_version/tmpl/default.php | 2 +- administrator/templates/hathor/component.php | 4 +- administrator/templates/hathor/cpanel.php | 8 +- .../templates/hathor/css/boldtext.css | 2 +- .../templates/hathor/css/colour_blue_rtl.css | 2 +- .../templates/hathor/css/colour_brown_rtl.css | 2 +- .../hathor/css/colour_highcontrast.css | 2 +- .../hathor/css/colour_highcontrast_rtl.css | 2 +- .../hathor/css/colour_standard_rtl.css | 2 +- administrator/templates/hathor/css/error.css | 2 +- administrator/templates/hathor/css/ie7.css | 2 +- administrator/templates/hathor/css/ie8.css | 2 +- .../templates/hathor/css/template_rtl.css | 2 +- administrator/templates/hathor/css/theme.css | 2 +- administrator/templates/hathor/error.php | 14 +- .../hathor/html/com_admin/help/default.php | 4 +- .../hathor/html/com_admin/profile/edit.php | 2 +- .../hathor/html/com_admin/sysinfo/default.php | 2 +- .../html/com_admin/sysinfo/default_config.php | 2 +- .../com_admin/sysinfo/default_directory.php | 2 +- .../com_admin/sysinfo/default_navigation.php | 2 +- .../com_admin/sysinfo/default_phpsettings.php | 2 +- .../html/com_admin/sysinfo/default_system.php | 2 +- .../com_associations/associations/default.php | 4 +- .../hathor/html/com_banners/banner/edit.php | 2 +- .../html/com_banners/banners/default.php | 12 +- .../hathor/html/com_banners/client/edit.php | 2 +- .../html/com_banners/clients/default.php | 2 +- .../html/com_banners/download/default.php | 2 +- .../html/com_banners/tracks/default.php | 4 +- .../hathor/html/com_cache/cache/default.php | 2 +- .../hathor/html/com_cache/purge/default.php | 2 +- .../com_categories/categories/default.php | 28 +- .../html/com_categories/category/edit.php | 2 +- .../com_categories/category/edit_options.php | 2 +- .../html/com_checkin/checkin/default.php | 2 +- .../html/com_config/application/default.php | 2 +- .../com_config/application/default_cache.php | 2 +- .../com_config/application/default_cookie.php | 2 +- .../application/default_database.php | 2 +- .../com_config/application/default_debug.php | 2 +- .../application/default_filters.php | 2 +- .../com_config/application/default_ftp.php | 2 +- .../application/default_ftplogin.php | 2 +- .../com_config/application/default_locale.php | 2 +- .../com_config/application/default_mail.php | 5 +- .../application/default_metadata.php | 2 +- .../application/default_navigation.php | 2 +- .../application/default_permissions.php | 2 +- .../com_config/application/default_seo.php | 2 +- .../com_config/application/default_server.php | 2 +- .../application/default_session.php | 2 +- .../com_config/application/default_site.php | 2 +- .../com_config/application/default_system.php | 2 +- .../html/com_config/component/default.php | 2 +- .../hathor/html/com_contact/contact/edit.php | 6 +- .../html/com_contact/contact/edit_params.php | 2 +- .../html/com_contact/contacts/default.php | 10 +- .../html/com_contact/contacts/modal.php | 2 +- .../hathor/html/com_content/article/edit.php | 4 +- .../html/com_content/articles/default.php | 10 +- .../html/com_content/articles/modal.php | 2 +- .../html/com_content/featured/default.php | 2 +- .../html/com_contenthistory/history/modal.php | 4 +- .../hathor/html/com_cpanel/cpanel/default.php | 2 +- .../hathor/html/com_fields/field/edit.php | 2 +- .../hathor/html/com_fields/fields/default.php | 4 +- .../hathor/html/com_fields/group/edit.php | 2 +- .../hathor/html/com_fields/groups/default.php | 2 +- .../html/com_finder/filters/default.php | 4 +- .../hathor/html/com_finder/index/default.php | 2 +- .../hathor/html/com_finder/maps/default.php | 2 +- .../html/com_installer/database/default.php | 8 +- .../com_installer/default/default_ftp.php | 2 +- .../html/com_installer/discover/default.php | 2 +- .../html/com_installer/install/default.php | 2 +- .../com_installer/install/default_form.php | 99 +- .../html/com_installer/languages/default.php | 5 +- .../languages/default_filter.php | 2 +- .../html/com_installer/manage/default.php | 8 +- .../com_installer/manage/default_filter.php | 20 +- .../html/com_installer/update/default.php | 4 +- .../html/com_installer/warnings/default.php | 2 +- .../html/com_joomlaupdate/default/default.php | 2 +- .../html/com_languages/installed/default.php | 2 +- .../com_languages/installed/default_ftp.php | 2 +- .../html/com_languages/languages/default.php | 20 +- .../html/com_languages/overrides/default.php | 2 +- .../hathor/html/com_menus/item/edit.php | 6 +- .../html/com_menus/item/edit_options.php | 2 +- .../hathor/html/com_menus/items/default.php | 86 +- .../hathor/html/com_menus/menu/edit.php | 6 +- .../hathor/html/com_menus/menus/default.php | 2 +- .../html/com_menus/menutypes/default.php | 4 +- .../hathor/html/com_messages/message/edit.php | 2 +- .../html/com_messages/messages/default.php | 2 +- .../hathor/html/com_modules/module/edit.php | 2 +- .../com_modules/module/edit_assignment.php | 4 +- .../html/com_modules/module/edit_options.php | 2 +- .../html/com_modules/modules/default.php | 42 +- .../html/com_modules/positions/modal.php | 2 +- .../html/com_newsfeeds/newsfeed/edit.php | 4 +- .../com_newsfeeds/newsfeed/edit_params.php | 2 +- .../html/com_newsfeeds/newsfeeds/default.php | 42 +- .../html/com_newsfeeds/newsfeeds/modal.php | 2 +- .../hathor/html/com_plugins/plugin/edit.php | 2 +- .../html/com_plugins/plugin/edit_options.php | 2 +- .../html/com_plugins/plugins/default.php | 42 +- .../html/com_postinstall/messages/default.php | 2 +- .../html/com_redirect/links/default.php | 23 +- .../html/com_search/searches/default.php | 2 +- .../hathor/html/com_tags/tag/edit.php | 2 +- .../html/com_tags/tag/edit_metadata.php | 2 +- .../hathor/html/com_tags/tag/edit_options.php | 2 +- .../hathor/html/com_tags/tags/default.php | 2 +- .../hathor/html/com_templates/style/edit.php | 2 +- .../com_templates/style/edit_assignment.php | 4 +- .../html/com_templates/style/edit_options.php | 2 +- .../html/com_templates/styles/default.php | 2 +- .../html/com_templates/template/default.php | 4 +- .../template/default_description.php | 2 +- .../template/default_folders.php | 2 +- .../com_templates/template/default_tree.php | 10 +- .../html/com_templates/templates/default.php | 2 +- .../html/com_users/debuggroup/default.php | 2 +- .../html/com_users/debuguser/default.php | 2 +- .../hathor/html/com_users/groups/default.php | 6 +- .../hathor/html/com_users/levels/default.php | 10 +- .../hathor/html/com_users/note/edit.php | 2 +- .../hathor/html/com_users/notes/default.php | 2 +- .../hathor/html/com_users/user/edit.php | 2 +- .../hathor/html/com_users/users/default.php | 6 +- .../hathor/html/com_users/users/modal.php | 2 +- .../hathor/html/com_weblinks/weblink/edit.php | 2 +- .../html/com_weblinks/weblink/edit_params.php | 2 +- .../html/com_weblinks/weblinks/default.php | 40 +- .../layouts/com_media/toolbar/deletemedia.php | 2 +- .../layouts/com_media/toolbar/newfolder.php | 2 +- .../layouts/com_media/toolbar/uploadmedia.php | 2 +- .../com_messages/toolbar/mysettings.php | 2 +- .../com_modules/toolbar/cancelselect.php | 2 +- .../layouts/com_modules/toolbar/newmodule.php | 2 +- .../html/layouts/joomla/edit/details.php | 2 +- .../html/layouts/joomla/edit/fieldset.php | 4 +- .../html/layouts/joomla/edit/global.php | 2 +- .../html/layouts/joomla/edit/metadata.php | 2 +- .../html/layouts/joomla/edit/params.php | 2 +- .../html/layouts/joomla/quickicons/icon.php | 2 +- .../html/layouts/joomla/sidebars/submenu.php | 4 +- .../html/layouts/joomla/toolbar/base.php | 2 +- .../html/layouts/joomla/toolbar/batch.php | 2 +- .../html/layouts/joomla/toolbar/confirm.php | 2 +- .../layouts/joomla/toolbar/containerclose.php | 2 +- .../layouts/joomla/toolbar/containeropen.php | 2 +- .../html/layouts/joomla/toolbar/help.php | 2 +- .../html/layouts/joomla/toolbar/iconclass.php | 2 +- .../html/layouts/joomla/toolbar/link.php | 2 +- .../html/layouts/joomla/toolbar/modal.php | 2 +- .../html/layouts/joomla/toolbar/popup.php | 2 +- .../html/layouts/joomla/toolbar/separator.php | 4 +- .../html/layouts/joomla/toolbar/slider.php | 2 +- .../html/layouts/joomla/toolbar/standard.php | 2 +- .../html/layouts/joomla/toolbar/title.php | 2 +- .../html/layouts/joomla/toolbar/versions.php | 2 +- .../plugins/user/profile/fields/dob.php | 2 +- .../hathor/html/mod_login/default.php | 2 +- .../hathor/html/mod_quickicon/default.php | 2 +- .../templates/hathor/html/modules.php | 2 +- .../templates/hathor/html/pagination.php | 2 +- administrator/templates/hathor/index.php | 4 +- administrator/templates/hathor/js/template.js | 2 +- .../language/en-GB/en-GB.tpl_hathor.ini | 2 +- .../language/en-GB/en-GB.tpl_hathor.sys.ini | 2 +- administrator/templates/hathor/login.php | 4 +- .../hathor/postinstall/hathormessage.php | 16 +- .../templates/hathor/templateDetails.xml | 26 +- administrator/templates/isis/component.php | 4 +- administrator/templates/isis/cpanel.php | 2 +- .../templates/isis/css/template-rtl.css | 197 +- administrator/templates/isis/css/template.css | 164 +- administrator/templates/isis/error.php | 24 +- .../com_media/imageslist/default_folder.php | 6 +- .../com_media/imageslist/default_image.php | 8 +- .../com_media/medialist/thumbs_folders.php | 12 +- .../html/com_media/medialist/thumbs_imgs.php | 16 +- .../html/layouts/joomla/form/field/media.php | 5 +- .../html/layouts/joomla/form/field/user.php | 2 +- .../html/layouts/joomla/pagination/link.php | 17 +- .../html/layouts/joomla/pagination/links.php | 34 +- .../html/layouts/joomla/system/message.php | 2 +- .../html/layouts/joomla/toolbar/versions.php | 6 +- .../isis/html/mod_version/default.php | 2 +- administrator/templates/isis/html/modules.php | 6 +- .../templates/isis/html/pagination.php | 4 +- administrator/templates/isis/index.php | 26 +- administrator/templates/isis/js/template.js | 644 +- .../isis/language/en-GB/en-GB.tpl_isis.ini | 2 +- .../language/en-GB/en-GB.tpl_isis.sys.ini | 2 +- .../templates/isis/less/blocks/_custom.less | 10 +- .../templates/isis/less/blocks/_forms.less | 39 +- .../templates/isis/less/blocks/_global.less | 12 + .../templates/isis/less/blocks/_header.less | 6 +- .../templates/isis/less/blocks/_login.less | 4 +- .../templates/isis/less/blocks/_media.less | 38 +- .../templates/isis/less/blocks/_modals.less | 2 +- .../templates/isis/less/blocks/_navbar.less | 14 +- .../isis/less/blocks/_quickicons.less | 56 +- .../templates/isis/less/blocks/_sidebar.less | 13 +- .../templates/isis/less/blocks/_status.less | 4 +- .../templates/isis/less/blocks/_tables.less | 2 +- .../templates/isis/less/blocks/_toolbar.less | 12 +- .../isis/less/blocks/_treeselect.less | 9 +- .../isis/less/pages/_com_templates.less | 4 +- .../templates/isis/less/template-rtl.less | 27 +- .../templates/isis/less/variables.less | 17 +- administrator/templates/isis/login.php | 13 +- .../templates/isis/templateDetails.xml | 171 +- administrator/templates/system/component.php | 2 +- administrator/templates/system/css/error.css | 2 +- administrator/templates/system/css/system.css | 2 +- administrator/templates/system/error.php | 14 +- .../templates/system/html/modules.php | 4 +- administrator/templates/system/index.php | 2 +- bin/keychain.php | 4 +- build.xml | 6 +- build/.gitignore | 3 + build/build.php | 222 +- build/bump.php | 22 +- build/deleted_file_check.php | 145 + build/generatecss.php | 9 +- build/helpTOC.php | 26 +- build/jenkins/docker-compose.yml | 31 + build/jenkins/unit-tests.sh | 26 + .../Sniffs/Commenting/FileCommentSniff.php | 2 +- .../Sniffs/Commenting/SingleCommentSniff.php | 2 +- .../ControlSignatureSniff.php | 2 +- build/phpcs/Joomla/ruleset.xml | 46 +- build/stubGenerator.php | 101 + build/travis/codeception-tests.sh | 46 + build/travis/phpenv/apcu-7.2.ini | 2 + build/travis/unit-tests.sh | 20 +- cli/deletefiles.php | 6 +- cli/finder_indexer.php | 2 +- cli/garbagecron.php | 6 +- cli/sessionGc.php | 56 + cli/sessionMetadataGc.php | 59 + cli/update_cron.php | 2 +- codeception.yml | 36 + components/com_ajax/ajax.php | 101 +- components/com_banners/banners.php | 2 +- components/com_banners/controller.php | 2 +- components/com_banners/helpers/banner.php | 2 +- components/com_banners/helpers/category.php | 2 +- components/com_banners/models/banner.php | 11 +- components/com_banners/models/banners.php | 2 +- components/com_banners/router.php | 2 +- components/com_config/config.php | 2 +- components/com_config/controller/cancel.php | 2 +- .../com_config/controller/canceladmin.php | 2 +- components/com_config/controller/cmsbase.php | 2 +- .../com_config/controller/config/display.php | 2 +- .../com_config/controller/config/save.php | 2 +- components/com_config/controller/display.php | 2 +- components/com_config/controller/helper.php | 2 +- .../com_config/controller/modules/cancel.php | 2 +- .../com_config/controller/modules/display.php | 9 +- .../com_config/controller/modules/save.php | 11 +- .../controller/templates/display.php | 4 +- .../com_config/controller/templates/save.php | 4 +- components/com_config/model/cms.php | 2 +- components/com_config/model/config.php | 2 +- components/com_config/model/form.php | 2 +- components/com_config/model/form/config.xml | 86 +- components/com_config/model/form/modules.xml | 84 +- .../model/form/modules_advanced.xml | 6 +- .../com_config/model/form/templates.xml | 22 +- components/com_config/model/modules.php | 2 +- components/com_config/model/templates.php | 4 +- components/com_config/view/cms/html.php | 2 +- components/com_config/view/cms/json.php | 2 +- components/com_config/view/config/html.php | 2 +- .../com_config/view/config/tmpl/default.php | 4 +- .../com_config/view/config/tmpl/default.xml | 3 +- .../view/config/tmpl/default_metadata.php | 2 +- .../view/config/tmpl/default_seo.php | 2 +- .../view/config/tmpl/default_site.php | 2 +- components/com_config/view/modules/html.php | 2 +- .../com_config/view/modules/tmpl/default.php | 27 +- .../view/modules/tmpl/default_options.php | 2 +- .../view/modules/tmpl/default_positions.php | 2 +- components/com_config/view/templates/html.php | 2 +- .../view/templates/tmpl/default.php | 4 +- .../view/templates/tmpl/default.xml | 3 +- .../view/templates/tmpl/default_options.php | 2 +- components/com_contact/contact.php | 3 +- components/com_contact/controller.php | 7 +- .../com_contact/controllers/contact.php | 107 +- .../com_contact/helpers/association.php | 2 +- components/com_contact/helpers/category.php | 2 +- .../com_contact/helpers/legacyrouter.php | 8 +- components/com_contact/helpers/route.php | 2 +- .../com_contact/layouts/field/render.php | 26 +- .../com_contact/layouts/fields/render.php | 7 +- .../layouts/joomla/form/renderfield.php | 2 +- components/com_contact/models/categories.php | 4 +- components/com_contact/models/category.php | 22 +- components/com_contact/models/contact.php | 96 +- components/com_contact/models/featured.php | 11 +- .../com_contact/models/forms/contact.xml | 6 + components/com_contact/models/forms/form.xml | 537 +- .../com_contact/models/rules/contactemail.php | 4 +- .../models/rules/contactemailmessage.php | 4 +- .../models/rules/contactemailsubject.php | 4 +- components/com_contact/router.php | 25 +- .../views/categories/tmpl/default.php | 13 +- .../views/categories/tmpl/default.xml | 640 +- .../views/categories/tmpl/default_items.php | 4 +- .../views/categories/view.html.php | 2 +- .../views/category/tmpl/default.php | 2 +- .../views/category/tmpl/default.xml | 569 +- .../views/category/tmpl/default_children.php | 2 +- .../views/category/tmpl/default_items.php | 124 +- .../com_contact/views/category/view.feed.php | 2 +- .../com_contact/views/category/view.html.php | 2 +- .../views/contact/tmpl/default.php | 82 +- .../views/contact/tmpl/default.xml | 284 +- .../views/contact/tmpl/default_address.php | 2 +- .../views/contact/tmpl/default_articles.php | 2 +- .../views/contact/tmpl/default_form.php | 2 +- .../views/contact/tmpl/default_links.php | 2 +- .../views/contact/tmpl/default_profile.php | 2 +- .../tmpl/default_user_custom_fields.php | 11 +- .../com_contact/views/contact/view.html.php | 210 +- .../com_contact/views/contact/view.vcf.php | 6 +- .../views/featured/tmpl/default.php | 2 +- .../views/featured/tmpl/default.xml | 353 +- .../views/featured/tmpl/default_items.php | 2 +- .../com_contact/views/featured/view.html.php | 2 +- components/com_content/content.php | 26 +- components/com_content/controller.php | 2 +- .../com_content/controllers/article.php | 99 +- .../com_content/helpers/association.php | 55 +- components/com_content/helpers/category.php | 2 +- components/com_content/helpers/icon.php | 11 +- .../com_content/helpers/legacyrouter.php | 4 +- components/com_content/helpers/query.php | 15 +- components/com_content/helpers/route.php | 30 +- .../layouts/field/prepare/modal_article.php | 47 - components/com_content/models/archive.php | 19 +- components/com_content/models/article.php | 4 +- components/com_content/models/articles.php | 155 +- components/com_content/models/categories.php | 4 +- components/com_content/models/category.php | 14 +- components/com_content/models/featured.php | 29 +- components/com_content/models/form.php | 2 +- .../com_content/models/forms/article.xml | 368 +- .../models/forms/filter_articles.xml | 65 +- components/com_content/router.php | 44 +- .../views/archive/tmpl/default.php | 2 +- .../views/archive/tmpl/default.xml | 142 +- .../views/archive/tmpl/default_items.php | 10 +- .../com_content/views/archive/view.html.php | 22 +- .../views/article/tmpl/default.php | 8 +- .../views/article/tmpl/default.xml | 30 +- .../views/article/tmpl/default_links.php | 2 +- .../com_content/views/article/view.html.php | 23 +- .../views/categories/tmpl/default.php | 13 +- .../views/categories/tmpl/default.xml | 408 +- .../views/categories/tmpl/default_items.php | 4 +- .../views/categories/view.html.php | 2 +- .../com_content/views/category/tmpl/blog.php | 6 +- .../com_content/views/category/tmpl/blog.xml | 143 +- .../views/category/tmpl/blog_children.php | 112 +- .../views/category/tmpl/blog_item.php | 22 +- .../views/category/tmpl/blog_links.php | 2 +- .../views/category/tmpl/default.php | 2 +- .../views/category/tmpl/default.xml | 333 +- .../views/category/tmpl/default_articles.php | 8 +- .../views/category/tmpl/default_children.php | 111 +- .../com_content/views/category/view.feed.php | 6 +- .../com_content/views/category/view.html.php | 17 +- .../views/featured/tmpl/default.php | 2 +- .../views/featured/tmpl/default.xml | 285 +- .../views/featured/tmpl/default_item.php | 16 +- .../views/featured/tmpl/default_links.php | 2 +- .../com_content/views/featured/view.feed.php | 4 +- .../com_content/views/featured/view.html.php | 8 +- .../com_content/views/form/tmpl/edit.php | 2 +- .../com_content/views/form/tmpl/edit.xml | 37 +- .../com_content/views/form/view.html.php | 7 +- .../com_contenthistory/contenthistory.php | 2 +- components/com_fields/controller.php | 2 +- components/com_fields/controllers/field.php | 49 - components/com_fields/fields.php | 21 +- .../com_fields/layouts/field/render.php | 7 +- .../com_fields/layouts/fields/render.php | 25 +- .../com_fields/models/forms/filter_fields.xml | 18 +- components/com_finder/controller.php | 2 +- .../controllers/suggestions.json.php | 2 +- components/com_finder/finder.php | 2 +- components/com_finder/helpers/html/filter.php | 29 +- components/com_finder/helpers/html/query.php | 6 +- components/com_finder/helpers/route.php | 2 +- components/com_finder/models/search.php | 44 +- components/com_finder/models/suggestions.php | 2 +- components/com_finder/router.php | 4 +- .../com_finder/views/search/tmpl/default.php | 45 +- .../com_finder/views/search/tmpl/default.xml | 39 +- .../views/search/tmpl/default_form.php | 29 +- .../views/search/tmpl/default_result.php | 25 +- .../views/search/tmpl/default_results.php | 30 +- .../com_finder/views/search/view.feed.php | 6 +- .../com_finder/views/search/view.html.php | 78 +- .../views/search/view.opensearch.php | 2 +- components/com_mailto/controller.php | 97 +- components/com_mailto/helpers/mailto.php | 2 +- components/com_mailto/mailto.php | 2 +- components/com_mailto/mailto.xml | 5 +- components/com_mailto/models/forms/mailto.xml | 51 + components/com_mailto/models/mailto.php | 104 + .../com_mailto/views/mailto/tmpl/default.php | 75 +- .../com_mailto/views/mailto/view.html.php | 61 +- .../com_mailto/views/sent/tmpl/default.php | 7 +- .../com_mailto/views/sent/view.html.php | 2 +- components/com_media/media.php | 2 +- components/com_menus/controller.php | 2 +- components/com_menus/menus.php | 3 +- components/com_modules/controller.php | 2 +- components/com_modules/modules.php | 2 +- components/com_newsfeeds/controller.php | 4 +- .../com_newsfeeds/helpers/association.php | 8 +- components/com_newsfeeds/helpers/category.php | 2 +- .../com_newsfeeds/helpers/legacyrouter.php | 18 +- components/com_newsfeeds/helpers/route.php | 6 +- .../com_newsfeeds/models/categories.php | 4 +- components/com_newsfeeds/models/category.php | 11 +- components/com_newsfeeds/models/newsfeed.php | 4 +- components/com_newsfeeds/newsfeeds.php | 2 +- components/com_newsfeeds/router.php | 26 +- .../views/categories/tmpl/default.php | 20 +- .../views/categories/tmpl/default.xml | 183 +- .../views/categories/tmpl/default_items.php | 47 +- .../views/categories/view.html.php | 2 +- .../views/category/tmpl/default.php | 15 +- .../views/category/tmpl/default.xml | 163 +- .../views/category/tmpl/default_children.php | 86 +- .../views/category/tmpl/default_items.php | 61 +- .../views/category/view.html.php | 6 +- .../views/newsfeed/tmpl/default.php | 232 +- .../views/newsfeed/tmpl/default.xml | 58 +- .../views/newsfeed/view.html.php | 13 +- components/com_search/controller.php | 14 +- components/com_search/models/search.php | 30 +- components/com_search/router.php | 11 +- components/com_search/search.php | 2 +- .../com_search/views/search/tmpl/default.php | 32 +- .../com_search/views/search/tmpl/default.xml | 3 + .../views/search/tmpl/default_error.php | 10 +- .../views/search/tmpl/default_form.php | 72 +- .../views/search/tmpl/default_results.php | 13 +- .../com_search/views/search/view.html.php | 250 +- .../views/search/view.opensearch.php | 2 +- components/com_tags/controller.php | 4 +- components/com_tags/controllers/tags.php | 23 +- components/com_tags/helpers/route.php | 8 +- components/com_tags/models/tag.php | 31 +- components/com_tags/models/tags.php | 11 +- components/com_tags/router.php | 8 +- components/com_tags/tags.php | 2 +- .../com_tags/views/tag/tmpl/default.php | 17 +- .../com_tags/views/tag/tmpl/default.xml | 48 +- .../com_tags/views/tag/tmpl/default_items.php | 138 +- components/com_tags/views/tag/tmpl/list.php | 7 +- components/com_tags/views/tag/tmpl/list.xml | 62 +- .../com_tags/views/tag/tmpl/list_items.php | 139 +- components/com_tags/views/tag/view.feed.php | 12 +- components/com_tags/views/tag/view.html.php | 90 +- .../com_tags/views/tags/tmpl/default.php | 15 +- .../com_tags/views/tags/tmpl/default.xml | 57 +- .../views/tags/tmpl/default_items.php | 90 +- components/com_tags/views/tags/view.feed.php | 17 +- components/com_tags/views/tags/view.html.php | 5 +- components/com_users/controller.php | 2 +- .../com_users/controllers/profile.json.php | 2 +- components/com_users/controllers/profile.php | 12 +- .../controllers/profile_base_json.php | 2 +- .../com_users/controllers/registration.php | 10 +- components/com_users/controllers/remind.php | 2 +- components/com_users/controllers/reset.php | 2 +- components/com_users/controllers/user.php | 23 +- components/com_users/helpers/html/users.php | 36 +- components/com_users/helpers/legacyrouter.php | 59 +- components/com_users/helpers/route.php | 44 +- .../com_users/models/forms/frontend.xml | 15 +- .../com_users/models/forms/frontend_admin.xml | 15 +- components/com_users/models/forms/login.xml | 9 +- components/com_users/models/forms/profile.xml | 18 +- .../com_users/models/forms/registration.xml | 20 +- components/com_users/models/forms/remind.xml | 2 +- .../com_users/models/forms/reset_complete.xml | 8 +- .../com_users/models/forms/reset_confirm.xml | 4 +- .../com_users/models/forms/reset_request.xml | 4 +- .../com_users/models/forms/sitelang.xml | 5 +- components/com_users/models/login.php | 7 +- components/com_users/models/profile.php | 24 +- components/com_users/models/registration.php | 20 +- components/com_users/models/remind.php | 2 +- components/com_users/models/reset.php | 2 +- .../models/rules/loginuniquefield.php | 16 +- .../models/rules/logoutuniquefield.php | 16 +- components/com_users/router.php | 2 +- components/com_users/users.php | 2 +- .../com_users/views/login/tmpl/default.php | 4 +- .../com_users/views/login/tmpl/default.xml | 122 +- .../views/login/tmpl/default_login.php | 73 +- .../views/login/tmpl/default_logout.php | 39 +- .../com_users/views/login/tmpl/logout.xml | 4 +- .../com_users/views/login/view.html.php | 2 +- .../com_users/views/profile/tmpl/default.php | 44 +- .../views/profile/tmpl/default_core.php | 9 +- .../views/profile/tmpl/default_custom.php | 13 +- .../views/profile/tmpl/default_params.php | 46 +- .../com_users/views/profile/tmpl/edit.php | 186 +- .../com_users/views/profile/view.html.php | 2 +- .../views/registration/tmpl/complete.php | 9 +- .../views/registration/tmpl/default.php | 56 +- .../views/registration/view.html.php | 4 +- .../com_users/views/remind/tmpl/default.php | 46 +- .../com_users/views/remind/view.html.php | 2 +- .../com_users/views/reset/tmpl/complete.php | 9 +- .../com_users/views/reset/tmpl/confirm.php | 9 +- .../com_users/views/reset/tmpl/default.php | 35 +- .../com_users/views/reset/view.html.php | 4 +- components/com_wrapper/controller.php | 2 +- components/com_wrapper/router.php | 2 +- .../views/wrapper/tmpl/default.php | 53 +- .../views/wrapper/tmpl/default.xml | 60 +- .../com_wrapper/views/wrapper/view.html.php | 8 +- components/com_wrapper/wrapper.php | 2 +- components/com_wrapper/wrapper.xml | 2 +- composer.json | 19 +- composer.lock | 832 ++- htaccess.txt | 2 +- includes/defines.php | 2 +- includes/framework.php | 8 +- index.php | 2 +- installation/COPYRIGHT | 2 +- installation/CREDITS | 4 +- installation/INSTALL | 2 +- installation/LICENSES | 2 +- installation/application/bootstrap.php | 2 +- installation/application/defines.php | 2 +- installation/application/framework.php | 2 +- installation/application/router.php | 2 +- installation/application/web.php | 14 +- installation/configuration.php-dist | 11 +- installation/controller/database.php | 2 +- installation/controller/default.php | 10 +- installation/controller/detectftproot.php | 4 +- installation/controller/ftp.php | 4 +- installation/controller/install/config.php | 4 +- installation/controller/install/database.php | 4 +- .../controller/install/database_backup.php | 4 +- .../controller/install/database_remove.php | 2 +- installation/controller/install/email.php | 10 +- installation/controller/install/languages.php | 4 +- installation/controller/install/sample.php | 4 +- installation/controller/preinstall.php | 4 +- installation/controller/removefolder.php | 14 +- .../controller/setdefaultlanguage.php | 34 +- installation/controller/setlanguage.php | 4 +- installation/controller/site.php | 4 +- installation/controller/summary.php | 4 +- installation/controller/verifyftpsettings.php | 4 +- installation/form/field/language.php | 2 +- installation/form/field/prefix.php | 6 +- installation/form/field/sample.php | 6 +- installation/form/rule/prefix.php | 2 +- installation/helper/database.php | 2 +- installation/html/helper.php | 8 +- installation/index.php | 4 +- installation/language/af-ZA/af-ZA.ini | 26 +- installation/language/af-ZA/af-ZA.xml | 10 +- installation/language/ar-AA/ar-AA.ini | 29 +- installation/language/ar-AA/ar-AA.xml | 8 +- installation/language/be-BY/be-BY.ini | 2 +- installation/language/be-BY/be-BY.xml | 2 +- installation/language/bg-BG/bg-BG.ini | 109 +- installation/language/bg-BG/bg-BG.xml | 16 +- installation/language/bn-BD/bn-BD.ini | 343 + installation/language/bn-BD/bn-BD.xml | 21 + installation/language/bs-BA/bs-BA.ini | 76 +- installation/language/bs-BA/bs-BA.xml | 8 +- installation/language/ca-ES/ca-ES.ini | 11 +- installation/language/ca-ES/ca-ES.xml | 8 +- installation/language/ckb-IQ/ckb-IQ.ini | 2 +- installation/language/ckb-IQ/ckb-IQ.xml | 2 +- installation/language/cs-CZ/cs-CZ.ini | 35 +- installation/language/cs-CZ/cs-CZ.xml | 9 +- installation/language/cy-GB/cy-GB.ini | 27 +- installation/language/cy-GB/cy-GB.xml | 8 +- installation/language/da-DK/da-DK.ini | 29 +- installation/language/da-DK/da-DK.xml | 8 +- installation/language/de-AT/de-AT.ini | 103 +- installation/language/de-AT/de-AT.xml | 32 +- installation/language/de-CH/de-CH.ini | 107 +- installation/language/de-CH/de-CH.xml | 8 +- installation/language/de-DE/de-DE.ini | 101 +- installation/language/de-DE/de-DE.xml | 8 +- installation/language/de-LI/de-LI.ini | 107 +- installation/language/de-LI/de-LI.xml | 8 +- installation/language/de-LU/de-LU.ini | 101 +- installation/language/de-LU/de-LU.xml | 8 +- installation/language/dz-BT/dz-BT.ini | 2 +- installation/language/dz-BT/dz-BT.xml | 2 +- installation/language/el-GR/el-GR.ini | 185 +- installation/language/el-GR/el-GR.xml | 9 +- installation/language/en-AU/en-AU.ini | 2 +- installation/language/en-AU/en-AU.xml | 2 +- installation/language/en-CA/en-CA.ini | 2 +- installation/language/en-CA/en-CA.xml | 2 +- installation/language/en-GB/en-GB.ini | 47 +- installation/language/en-GB/en-GB.xml | 8 +- installation/language/en-NZ/en-NZ.ini | 2 +- installation/language/en-NZ/en-NZ.xml | 2 +- installation/language/en-US/en-US.ini | 2 +- installation/language/en-US/en-US.xml | 2 +- installation/language/eo-XX/eo-XX.ini | 2 +- installation/language/eo-XX/eo-XX.xml | 2 +- installation/language/es-CO/es-CO.ini | 29 +- installation/language/es-CO/es-CO.xml | 8 +- installation/language/es-ES/es-ES.ini | 84 +- installation/language/es-ES/es-ES.xml | 6 +- installation/language/et-EE/et-EE.ini | 2 +- installation/language/et-EE/et-EE.xml | 2 +- installation/language/eu-ES/eu-ES.ini | 5 +- installation/language/eu-ES/eu-ES.xml | 6 +- installation/language/fa-IR/fa-IR.ini | 710 +- installation/language/fa-IR/fa-IR.xml | 8 +- installation/language/fi-FI/fi-FI.ini | 2 +- installation/language/fi-FI/fi-FI.xml | 2 +- installation/language/fr-CA/fr-CA.ini | 2 +- installation/language/fr-CA/fr-CA.xml | 2 +- installation/language/fr-FR/fr-FR.ini | 72 +- installation/language/fr-FR/fr-FR.xml | 8 +- installation/language/ga-IE/ga-IE.ini | 27 +- installation/language/ga-IE/ga-IE.xml | 8 +- installation/language/gl-ES/gl-ES.ini | 2 +- installation/language/gl-ES/gl-ES.xml | 2 +- installation/language/he-IL/he-IL.ini | 2 +- installation/language/he-IL/he-IL.xml | 2 +- installation/language/hi-IN/hi-IN.ini | 2 +- installation/language/hi-IN/hi-IN.xml | 2 +- installation/language/hr-HR/hr-HR.ini | 37 +- installation/language/hr-HR/hr-HR.xml | 16 +- installation/language/hu-HU/hu-HU.ini | 2 +- installation/language/hu-HU/hu-HU.xml | 2 +- installation/language/hy-AM/hy-AM.ini | 17 +- installation/language/hy-AM/hy-AM.xml | 6 +- installation/language/id-ID/id-ID.ini | 2 +- installation/language/id-ID/id-ID.xml | 2 +- installation/language/it-IT/it-IT.ini | 31 +- installation/language/it-IT/it-IT.xml | 8 +- installation/language/ja-JP/ja-JP.ini | 17 +- installation/language/ja-JP/ja-JP.xml | 6 +- installation/language/ka-GE/ka-GE.ini | 31 +- installation/language/ka-GE/ka-GE.xml | 12 +- installation/language/km-KH/km-KH.ini | 2 +- installation/language/km-KH/km-KH.xml | 2 +- installation/language/ko-KR/ko-KR.ini | 11 +- installation/language/ko-KR/ko-KR.xml | 6 +- installation/language/lt-LT/lt-LT.ini | 340 + installation/language/lt-LT/lt-LT.xml | 21 + installation/language/lv-LV/lv-LV.ini | 94 +- installation/language/lv-LV/lv-LV.xml | 15 +- installation/language/mk-MK/mk-MK.ini | 27 +- installation/language/mk-MK/mk-MK.xml | 8 +- installation/language/ms-MY/ms-MY.ini | 2 +- installation/language/ms-MY/ms-MY.xml | 2 +- installation/language/nb-NO/nb-NO.ini | 29 +- installation/language/nb-NO/nb-NO.xml | 10 +- installation/language/nl-NL/nl-NL.ini | 37 +- installation/language/nl-NL/nl-NL.xml | 8 +- installation/language/nn-NO/nn-NO.ini | 2 +- installation/language/nn-NO/nn-NO.xml | 2 +- installation/language/pl-PL/pl-PL.ini | 9 +- installation/language/pl-PL/pl-PL.xml | 8 +- installation/language/prs-AF/prs-AF.ini | 2 +- installation/language/prs-AF/prs-AF.xml | 2 +- installation/language/pt-BR/pt-BR.ini | 13 +- installation/language/pt-BR/pt-BR.xml | 8 +- installation/language/pt-PT/pt-PT.ini | 2 +- installation/language/pt-PT/pt-PT.xml | 2 +- installation/language/ro-RO/ro-RO.ini | 2 +- installation/language/ro-RO/ro-RO.xml | 2 +- installation/language/ru-RU/ru-RU.ini | 2 +- installation/language/ru-RU/ru-RU.xml | 2 +- installation/language/si-LK/si-LK.ini | 2 +- installation/language/si-LK/si-LK.xml | 2 +- installation/language/sk-SK/sk-SK.ini | 9 +- installation/language/sk-SK/sk-SK.xml | 6 +- installation/language/sl-SI/sl-SI.ini | 27 +- installation/language/sl-SI/sl-SI.xml | 12 +- installation/language/sr-RS/sr-RS.ini | 22 +- installation/language/sr-RS/sr-RS.xml | 8 +- installation/language/sr-YU/sr-YU.ini | 34 +- installation/language/sr-YU/sr-YU.xml | 8 +- installation/language/srp-ME/srp-ME.ini | 2 +- installation/language/srp-ME/srp-ME.xml | 2 +- installation/language/sv-SE/sv-SE.ini | 118 +- installation/language/sv-SE/sv-SE.xml | 15 +- installation/language/sw-KE/sw-KE.ini | 79 +- installation/language/sw-KE/sw-KE.xml | 8 +- installation/language/sy-IQ/sy-IQ.ini | 2 +- installation/language/sy-IQ/sy-IQ.xml | 2 +- installation/language/ta-IN/ta-IN.ini | 43 +- installation/language/ta-IN/ta-IN.xml | 9 +- installation/language/th-TH/th-TH.ini | 57 +- installation/language/th-TH/th-TH.xml | 8 +- installation/language/tk-TM/tk-TM.ini | 2 +- installation/language/tk-TM/tk-TM.xml | 2 +- installation/language/tr-TR/tr-TR.ini | 67 +- installation/language/tr-TR/tr-TR.xml | 9 +- installation/language/ug-CN/ug-CN.ini | 2 +- installation/language/ug-CN/ug-CN.xml | 2 +- installation/language/uk-UA/uk-UA.ini | 2 +- installation/language/uk-UA/uk-UA.xml | 2 +- installation/language/vi-VN/vi-VN.ini | 2 +- installation/language/vi-VN/vi-VN.xml | 2 +- installation/language/zh-CN/zh-CN.ini | 2 +- installation/language/zh-CN/zh-CN.xml | 2 +- installation/language/zh-TW/zh-TW.ini | 11 +- installation/language/zh-TW/zh-TW.xml | 8 +- installation/model/configuration.php | 18 +- installation/model/database.php | 139 +- installation/model/forms/database.xml | 21 +- installation/model/forms/defaultlanguage.xml | 14 +- installation/model/forms/ftp.xml | 23 +- installation/model/forms/preinstall.xml | 2 +- installation/model/forms/site.xml | 18 +- installation/model/forms/summary.xml | 13 +- installation/model/ftp.php | 14 +- installation/model/languages.php | 197 +- installation/model/setup.php | 34 +- installation/response/json.php | 4 +- installation/sql/mysql/joomla.sql | 75 +- installation/sql/mysql/sample_blog.sql | 2 +- installation/sql/mysql/sample_brochure.sql | 4 +- installation/sql/mysql/sample_learn.sql | 96 +- installation/sql/mysql/sample_testing.sql | 102 +- installation/sql/postgresql/joomla.sql | 78 +- installation/sql/postgresql/sample_blog.sql | 4 +- .../sql/postgresql/sample_brochure.sql | 4 +- installation/sql/postgresql/sample_data.sql | 7 +- installation/sql/postgresql/sample_learn.sql | 96 +- .../sql/postgresql/sample_testing.sql | 126 +- installation/sql/sqlazure/joomla.sql | 83 +- installation/sql/sqlazure/sample_blog.sql | 2 +- installation/sql/sqlazure/sample_brochure.sql | 4 +- installation/sql/sqlazure/sample_learn.sql | 96 +- installation/sql/sqlazure/sample_testing.sql | 102 +- installation/template/body.php | 2 +- installation/template/css/template.css | 2 +- installation/template/css/template_rtl.css | 2 +- installation/template/index.php | 2 +- installation/template/js/installation.js | 38 +- installation/view/complete/html.php | 2 +- installation/view/complete/tmpl/default.php | 8 +- installation/view/database/tmpl/default.php | 2 +- installation/view/default.php | 2 +- installation/view/defaultlanguage/html.php | 2 +- .../view/defaultlanguage/tmpl/default.php | 2 +- installation/view/ftp/tmpl/default.php | 2 +- installation/view/install/html.php | 4 +- installation/view/install/tmpl/default.php | 4 +- installation/view/languages/html.php | 2 +- installation/view/languages/tmpl/default.php | 18 +- installation/view/preinstall/html.php | 2 +- installation/view/preinstall/tmpl/default.php | 2 +- installation/view/remove/html.php | 2 +- installation/view/remove/tmpl/default.php | 6 +- installation/view/site/tmpl/default.php | 2 +- installation/view/summary/html.php | 2 +- installation/view/summary/tmpl/default.php | 40 +- jenkins-phpunit.xml | 36 + language/en-GB/en-GB.com_ajax.ini | 3 +- language/en-GB/en-GB.com_config.ini | 8 +- language/en-GB/en-GB.com_contact.ini | 4 +- language/en-GB/en-GB.com_content.ini | 8 +- language/en-GB/en-GB.com_finder.ini | 4 +- language/en-GB/en-GB.com_mailto.ini | 7 +- language/en-GB/en-GB.com_media.ini | 20 +- language/en-GB/en-GB.com_messages.ini | 4 +- language/en-GB/en-GB.com_newsfeeds.ini | 2 +- language/en-GB/en-GB.com_search.ini | 2 +- language/en-GB/en-GB.com_tags.ini | 2 +- language/en-GB/en-GB.com_users.ini | 34 +- language/en-GB/en-GB.com_weblinks.ini | 8 +- language/en-GB/en-GB.com_wrapper.ini | 2 +- language/en-GB/en-GB.files_joomla.sys.ini | 2 +- language/en-GB/en-GB.finder_cli.ini | 2 +- language/en-GB/en-GB.ini | 25 +- language/en-GB/en-GB.lib_fof.sys.ini | 2 +- language/en-GB/en-GB.lib_idna_convert.sys.ini | 2 +- language/en-GB/en-GB.lib_joomla.ini | 45 +- language/en-GB/en-GB.lib_joomla.sys.ini | 2 +- language/en-GB/en-GB.lib_phpass.sys.ini | 2 +- language/en-GB/en-GB.lib_phputf8.sys.ini | 2 +- language/en-GB/en-GB.lib_simplepie.sys.ini | 2 +- language/en-GB/en-GB.localise.php | 2 +- language/en-GB/en-GB.mod_articles_archive.ini | 4 +- .../en-GB/en-GB.mod_articles_archive.sys.ini | 4 +- .../en-GB/en-GB.mod_articles_categories.ini | 2 +- .../en-GB.mod_articles_categories.sys.ini | 2 +- .../en-GB/en-GB.mod_articles_category.ini | 11 +- .../en-GB/en-GB.mod_articles_category.sys.ini | 2 +- language/en-GB/en-GB.mod_articles_latest.ini | 6 +- .../en-GB/en-GB.mod_articles_latest.sys.ini | 4 +- language/en-GB/en-GB.mod_articles_news.ini | 4 +- .../en-GB/en-GB.mod_articles_news.sys.ini | 2 +- language/en-GB/en-GB.mod_articles_popular.ini | 6 +- .../en-GB/en-GB.mod_articles_popular.sys.ini | 4 +- language/en-GB/en-GB.mod_banners.ini | 2 +- language/en-GB/en-GB.mod_banners.sys.ini | 2 +- language/en-GB/en-GB.mod_breadcrumbs.ini | 2 +- language/en-GB/en-GB.mod_breadcrumbs.sys.ini | 2 +- language/en-GB/en-GB.mod_custom.ini | 2 +- language/en-GB/en-GB.mod_custom.sys.ini | 2 +- language/en-GB/en-GB.mod_feed.ini | 2 +- language/en-GB/en-GB.mod_feed.sys.ini | 2 +- language/en-GB/en-GB.mod_finder.ini | 2 +- language/en-GB/en-GB.mod_finder.sys.ini | 2 +- language/en-GB/en-GB.mod_footer.ini | 2 +- language/en-GB/en-GB.mod_footer.sys.ini | 2 +- language/en-GB/en-GB.mod_languages.ini | 6 +- language/en-GB/en-GB.mod_languages.sys.ini | 4 +- language/en-GB/en-GB.mod_login.ini | 6 +- language/en-GB/en-GB.mod_login.sys.ini | 2 +- language/en-GB/en-GB.mod_menu.ini | 4 +- language/en-GB/en-GB.mod_menu.sys.ini | 2 +- language/en-GB/en-GB.mod_random_image.ini | 2 +- language/en-GB/en-GB.mod_random_image.sys.ini | 2 +- language/en-GB/en-GB.mod_related_items.ini | 4 +- .../en-GB/en-GB.mod_related_items.sys.ini | 4 +- language/en-GB/en-GB.mod_search.ini | 2 +- language/en-GB/en-GB.mod_search.sys.ini | 2 +- language/en-GB/en-GB.mod_stats.ini | 4 +- language/en-GB/en-GB.mod_stats.sys.ini | 4 +- language/en-GB/en-GB.mod_syndicate.ini | 2 +- language/en-GB/en-GB.mod_syndicate.sys.ini | 2 +- language/en-GB/en-GB.mod_tags_popular.ini | 4 +- language/en-GB/en-GB.mod_tags_popular.sys.ini | 2 +- language/en-GB/en-GB.mod_tags_similar.ini | 2 +- language/en-GB/en-GB.mod_tags_similar.sys.ini | 2 +- language/en-GB/en-GB.mod_users_latest.ini | 2 +- language/en-GB/en-GB.mod_users_latest.sys.ini | 2 +- language/en-GB/en-GB.mod_weblinks.ini | 2 +- language/en-GB/en-GB.mod_weblinks.sys.ini | 2 +- language/en-GB/en-GB.mod_whosonline.ini | 2 +- language/en-GB/en-GB.mod_whosonline.sys.ini | 2 +- language/en-GB/en-GB.mod_wrapper.ini | 2 +- language/en-GB/en-GB.mod_wrapper.sys.ini | 2 +- language/en-GB/en-GB.tpl_beez3.ini | 2 +- language/en-GB/en-GB.tpl_beez3.sys.ini | 2 +- language/en-GB/en-GB.tpl_protostar.ini | 2 +- language/en-GB/en-GB.tpl_protostar.sys.ini | 2 +- language/en-GB/en-GB.xml | 8 +- language/en-GB/install.xml | 92 +- layouts/joomla/content/associations.php | 2 +- .../content/blog_style_default_item_title.php | 2 +- .../content/blog_style_default_links.php | 2 +- layouts/joomla/content/categories_default.php | 2 +- .../content/categories_default_items.php | 2 +- layouts/joomla/content/category_default.php | 2 +- layouts/joomla/content/full_image.php | 2 +- layouts/joomla/content/icons.php | 11 +- layouts/joomla/content/icons/create.php | 4 +- layouts/joomla/content/icons/edit.php | 2 +- layouts/joomla/content/icons/edit_lock.php | 2 +- layouts/joomla/content/icons/email.php | 4 +- layouts/joomla/content/icons/print_popup.php | 4 +- layouts/joomla/content/icons/print_screen.php | 4 +- layouts/joomla/content/info_block.php | 2 +- .../content/info_block/associations.php | 5 +- layouts/joomla/content/info_block/author.php | 2 +- layouts/joomla/content/info_block/block.php | 2 +- .../joomla/content/info_block/category.php | 2 +- .../joomla/content/info_block/create_date.php | 2 +- layouts/joomla/content/info_block/hits.php | 4 +- .../joomla/content/info_block/modify_date.php | 2 +- .../content/info_block/parent_category.php | 2 +- .../content/info_block/publish_date.php | 2 +- layouts/joomla/content/intro_image.php | 2 +- layouts/joomla/content/language.php | 6 +- layouts/joomla/content/options_default.php | 39 +- layouts/joomla/content/readmore.php | 45 +- layouts/joomla/content/tags.php | 4 +- layouts/joomla/content/text_filters.php | 24 + layouts/joomla/edit/associations.php | 3 +- layouts/joomla/edit/details.php | 4 +- layouts/joomla/edit/fieldset.php | 4 +- layouts/joomla/edit/frontediting_modules.php | 5 +- layouts/joomla/edit/global.php | 2 +- layouts/joomla/edit/item_title.php | 6 +- layouts/joomla/edit/metadata.php | 2 +- layouts/joomla/edit/params.php | 126 +- layouts/joomla/edit/publishingdata.php | 2 +- layouts/joomla/edit/title_alias.php | 2 +- layouts/joomla/editors/buttons.php | 4 +- layouts/joomla/editors/buttons/button.php | 4 +- layouts/joomla/error/backtrace.php | 2 +- layouts/joomla/form/field/calendar.php | 13 +- layouts/joomla/form/field/checkboxes.php | 14 +- layouts/joomla/form/field/color/advanced.php | 14 +- layouts/joomla/form/field/color/simple.php | 4 +- layouts/joomla/form/field/combo.php | 77 + layouts/joomla/form/field/contenthistory.php | 4 +- layouts/joomla/form/field/email.php | 4 +- layouts/joomla/form/field/file.php | 4 +- layouts/joomla/form/field/hidden.php | 2 +- layouts/joomla/form/field/media.php | 2 +- layouts/joomla/form/field/meter.php | 2 +- layouts/joomla/form/field/moduleorder.php | 2 +- layouts/joomla/form/field/number.php | 6 +- layouts/joomla/form/field/password.php | 6 +- layouts/joomla/form/field/radio.php | 18 +- layouts/joomla/form/field/range.php | 4 +- layouts/joomla/form/field/subform/default.php | 2 +- .../form/field/subform/repeatable-table.php | 8 +- .../repeatable-table/section-byfieldsets.php | 8 +- .../subform/repeatable-table/section.php | 8 +- .../joomla/form/field/subform/repeatable.php | 4 +- .../repeatable/section-byfieldsets.php | 8 +- .../form/field/subform/repeatable/section.php | 8 +- layouts/joomla/form/field/tel.php | 6 +- layouts/joomla/form/field/text.php | 8 +- layouts/joomla/form/field/textarea.php | 4 +- layouts/joomla/form/field/url.php | 6 +- layouts/joomla/form/field/user.php | 2 +- layouts/joomla/form/renderfield.php | 2 +- layouts/joomla/form/renderlabel.php | 2 +- layouts/joomla/html/batch/access.php | 2 +- layouts/joomla/html/batch/adminlanguage.php | 44 + layouts/joomla/html/batch/item.php | 2 +- layouts/joomla/html/batch/language.php | 2 +- layouts/joomla/html/batch/tag.php | 2 +- layouts/joomla/html/batch/user.php | 2 +- .../joomla/html/formbehavior/ajaxchosen.php | 2 +- layouts/joomla/html/formbehavior/chosen.php | 2 +- layouts/joomla/html/sortablelist.php | 2 +- layouts/joomla/html/tag.php | 91 +- layouts/joomla/html/treeprefix.php | 4 +- layouts/joomla/links/groupclose.php | 2 +- layouts/joomla/links/groupopen.php | 2 +- layouts/joomla/links/groupsclose.php | 2 +- layouts/joomla/links/groupseparator.php | 2 +- layouts/joomla/links/groupsopen.php | 2 +- layouts/joomla/links/link.php | 4 +- layouts/joomla/modal/body.php | 2 +- layouts/joomla/modal/footer.php | 2 +- layouts/joomla/modal/header.php | 2 +- layouts/joomla/modal/iframe.php | 6 +- layouts/joomla/modal/main.php | 34 +- layouts/joomla/pagination/link.php | 4 +- layouts/joomla/pagination/links.php | 4 +- layouts/joomla/pagination/list.php | 2 +- layouts/joomla/quickicons/icon.php | 4 +- layouts/joomla/searchtools/default.php | 4 +- layouts/joomla/searchtools/default/bar.php | 6 +- .../joomla/searchtools/default/filters.php | 2 +- layouts/joomla/searchtools/default/list.php | 2 +- .../joomla/searchtools/default/noitems.php | 2 +- .../joomla/searchtools/default/selector.php | 2 +- layouts/joomla/searchtools/grid/sort.php | 2 +- layouts/joomla/sidebars/submenu.php | 2 +- layouts/joomla/sidebars/toggle.php | 4 +- layouts/joomla/system/message.php | 2 +- layouts/joomla/tinymce/buttons.php | 2 +- layouts/joomla/tinymce/buttons/button.php | 2 +- layouts/joomla/tinymce/textarea.php | 2 +- layouts/joomla/tinymce/togglebutton.php | 4 +- layouts/joomla/toolbar/base.php | 2 +- layouts/joomla/toolbar/batch.php | 4 +- layouts/joomla/toolbar/confirm.php | 4 +- layouts/joomla/toolbar/containerclose.php | 2 +- layouts/joomla/toolbar/containeropen.php | 4 +- layouts/joomla/toolbar/help.php | 4 +- layouts/joomla/toolbar/iconclass.php | 2 +- layouts/joomla/toolbar/link.php | 4 +- layouts/joomla/toolbar/modal.php | 4 +- layouts/joomla/toolbar/popup.php | 4 +- layouts/joomla/toolbar/separator.php | 2 +- layouts/joomla/toolbar/slider.php | 4 +- layouts/joomla/toolbar/standard.php | 4 +- layouts/joomla/toolbar/title.php | 4 +- layouts/joomla/toolbar/versions.php | 4 +- .../libraries/cms/html/bootstrap/addtab.php | 2 +- .../cms/html/bootstrap/addtabscript.php | 2 +- .../libraries/cms/html/bootstrap/endtab.php | 2 +- .../cms/html/bootstrap/endtabset.php | 2 +- .../cms/html/bootstrap/starttabset.php | 2 +- .../cms/html/bootstrap/starttabsetscript.php | 2 +- .../editors/tinymce/field/tinymcebuilder.php | 2 +- .../field/tinymcebuilder/setoptions.php | 2 +- layouts/plugins/user/profile/fields/dob.php | 2 +- libraries/classmap.php | 429 +- libraries/cms.php | 17 +- libraries/cms/class/loader.php | 4 +- libraries/cms/component/exception/missing.php | 32 - libraries/cms/form/field/chromestyle.php | 144 - libraries/cms/form/field/plugin_status.php | 39 - libraries/cms/form/rule/captcha.php | 75 - libraries/cms/form/rule/notequals.php | 63 - libraries/cms/html/access.php | 6 +- libraries/cms/html/actionsdropdown.php | 6 +- libraries/cms/html/adminlanguage.php | 65 + libraries/cms/html/batch.php | 4 +- libraries/cms/html/behavior.php | 49 +- libraries/cms/html/bootstrap.php | 34 +- libraries/cms/html/category.php | 8 +- libraries/cms/html/content.php | 4 +- libraries/cms/html/contentlanguage.php | 4 +- libraries/cms/html/date.php | 14 +- libraries/cms/html/debug.php | 6 +- libraries/cms/html/dropdown.php | 4 +- libraries/cms/html/email.php | 4 +- libraries/cms/html/form.php | 57 +- libraries/cms/html/formbehavior.php | 4 +- libraries/cms/html/grid.php | 22 +- libraries/cms/html/icons.php | 2 +- libraries/cms/html/jgrid.php | 14 +- libraries/cms/html/jquery.php | 43 +- .../html/language/en-GB/en-GB.jhtmldate.ini | 2 +- libraries/cms/html/links.php | 2 +- libraries/cms/html/list.php | 4 +- libraries/cms/html/menu.php | 54 +- libraries/cms/html/number.php | 10 +- libraries/cms/html/rules.php | 4 +- libraries/cms/html/searchtools.php | 10 +- libraries/cms/html/select.php | 29 +- libraries/cms/html/sidebar.php | 4 +- libraries/cms/html/sliders.php | 4 +- libraries/cms/html/sortablelist.php | 8 +- libraries/cms/html/string.php | 26 +- libraries/cms/html/tabs.php | 6 +- libraries/cms/html/tag.php | 4 +- libraries/cms/html/tel.php | 12 +- libraries/cms/html/user.php | 4 +- libraries/cms/less/formatter/joomla.php | 4 +- libraries/cms/less/less.php | 8 +- libraries/cms/menu/administrator.php | 19 - libraries/cms/table/ucm.php | 30 - libraries/cms/ucm/base.php | 139 - libraries/cms/ucm/ucm.php | 19 - libraries/fof/database/query.php | 4 +- libraries/fof/form/header.php | 2 +- libraries/fof/view/view.php | 2 +- libraries/idna_convert/idna_convert.class.php | 4 +- libraries/import.legacy.php | 30 +- libraries/import.php | 26 +- .../joomla/access/exception/notallowed.php | 19 - libraries/joomla/application/web/router.php | 2 +- .../joomla/application/web/router/base.php | 2 +- .../joomla/application/web/router/rest.php | 2 +- libraries/joomla/archive/archive.php | 138 +- libraries/joomla/archive/bzip2.php | 5 +- libraries/joomla/archive/extractable.php | 5 +- libraries/joomla/archive/gzip.php | 5 +- libraries/joomla/archive/tar.php | 5 +- libraries/joomla/archive/wrapper/archive.php | 5 +- libraries/joomla/archive/zip.php | 5 +- libraries/joomla/base/adapter.php | 20 +- libraries/joomla/base/adapterinstance.php | 2 +- libraries/joomla/cache/exception.php | 19 - .../joomla/cache/exception/connecting.php | 19 - .../joomla/cache/exception/unsupported.php | 19 - libraries/joomla/client/ldap.php | 56 - libraries/joomla/controller/base.php | 2 +- libraries/joomla/controller/controller.php | 4 +- libraries/joomla/crypt/cipher.php | 53 - libraries/joomla/crypt/cipher/3des.php | 39 - libraries/joomla/crypt/cipher/blowfish.php | 39 - libraries/joomla/crypt/cipher/crypto.php | 125 - libraries/joomla/crypt/cipher/rijndael256.php | 39 - libraries/joomla/database/database.php | 2 +- libraries/joomla/database/driver.php | 30 +- libraries/joomla/database/driver/mysql.php | 20 +- libraries/joomla/database/driver/mysqli.php | 20 +- libraries/joomla/database/driver/oracle.php | 18 +- libraries/joomla/database/driver/pdo.php | 18 +- libraries/joomla/database/driver/pdomysql.php | 4 +- .../joomla/database/driver/postgresql.php | 24 +- libraries/joomla/database/driver/sqlazure.php | 4 +- libraries/joomla/database/driver/sqlite.php | 16 +- libraries/joomla/database/driver/sqlsrv.php | 31 +- .../joomla/database/exception/connecting.php | 2 +- .../joomla/database/exception/executing.php | 2 +- .../joomla/database/exception/unsupported.php | 2 +- libraries/joomla/database/exporter.php | 6 +- libraries/joomla/database/exporter/mysql.php | 2 +- libraries/joomla/database/exporter/mysqli.php | 2 +- .../joomla/database/exporter/pdomysql.php | 2 +- .../joomla/database/exporter/postgresql.php | 2 +- libraries/joomla/database/factory.php | 2 +- libraries/joomla/database/importer.php | 2 +- libraries/joomla/database/importer/mysql.php | 2 +- libraries/joomla/database/importer/mysqli.php | 2 +- .../joomla/database/importer/pdomysql.php | 2 +- .../joomla/database/importer/postgresql.php | 2 +- libraries/joomla/database/interface.php | 2 +- libraries/joomla/database/iterator.php | 6 +- libraries/joomla/database/iterator/mysql.php | 4 +- libraries/joomla/database/iterator/mysqli.php | 2 +- libraries/joomla/database/iterator/oracle.php | 2 +- libraries/joomla/database/iterator/pdo.php | 2 +- .../joomla/database/iterator/pdomysql.php | 4 +- .../joomla/database/iterator/postgresql.php | 2 +- .../joomla/database/iterator/sqlazure.php | 2 +- libraries/joomla/database/iterator/sqlite.php | 2 +- libraries/joomla/database/iterator/sqlsrv.php | 2 +- libraries/joomla/database/query.php | 27 +- libraries/joomla/database/query/element.php | 4 +- libraries/joomla/database/query/limitable.php | 2 +- libraries/joomla/database/query/mysql.php | 2 +- libraries/joomla/database/query/mysqli.php | 2 +- libraries/joomla/database/query/oracle.php | 2 +- libraries/joomla/database/query/pdo.php | 2 +- libraries/joomla/database/query/pdomysql.php | 2 +- .../joomla/database/query/postgresql.php | 2 +- .../joomla/database/query/preparable.php | 2 +- libraries/joomla/database/query/sqlazure.php | 2 +- libraries/joomla/database/query/sqlite.php | 2 +- libraries/joomla/database/query/sqlsrv.php | 15 +- libraries/joomla/document/feed.php | 492 -- .../joomla/document/feed/renderer/atom.php | 27 - .../joomla/document/feed/renderer/rss.php | 23 - .../document/html/renderer/component.php | 22 - .../joomla/document/html/renderer/head.php | 22 - .../joomla/document/html/renderer/message.php | 22 - .../joomla/document/html/renderer/module.php | 22 - .../joomla/document/html/renderer/modules.php | 22 - libraries/joomla/event/dispatcher.php | 4 +- libraries/joomla/event/event.php | 2 +- libraries/joomla/facebook/album.php | 4 +- libraries/joomla/facebook/checkin.php | 4 +- libraries/joomla/facebook/comment.php | 4 +- libraries/joomla/facebook/event.php | 4 +- libraries/joomla/facebook/facebook.php | 2 +- libraries/joomla/facebook/group.php | 6 +- libraries/joomla/facebook/link.php | 4 +- libraries/joomla/facebook/note.php | 4 +- libraries/joomla/facebook/oauth.php | 2 +- libraries/joomla/facebook/object.php | 12 +- libraries/joomla/facebook/photo.php | 4 +- libraries/joomla/facebook/post.php | 4 +- libraries/joomla/facebook/status.php | 4 +- libraries/joomla/facebook/user.php | 8 +- libraries/joomla/facebook/video.php | 4 +- libraries/joomla/feed/parser/atom.php | 204 - libraries/joomla/feed/parser/namespace.php | 42 - libraries/joomla/feed/parser/rss/itunes.php | 49 - libraries/joomla/feed/parser/rss/media.php | 49 - libraries/joomla/filesystem/file.php | 2 +- libraries/joomla/filesystem/folder.php | 4 +- libraries/joomla/filesystem/helper.php | 6 +- .../en-GB.lib_joomla_filesystem_patcher.ini | 2 +- libraries/joomla/filesystem/patcher.php | 6 +- libraries/joomla/filesystem/path.php | 27 +- libraries/joomla/filesystem/stream.php | 36 +- .../joomla/filesystem/streams/string.php | 10 +- .../filesystem/support/stringcontroller.php | 2 +- libraries/joomla/filesystem/wrapper/file.php | 2 +- .../joomla/filesystem/wrapper/folder.php | 2 +- libraries/joomla/filesystem/wrapper/path.php | 4 +- libraries/joomla/filter/wrapper/output.php | 157 - libraries/joomla/form/fields/accesslevel.php | 2 +- libraries/joomla/form/fields/aliastag.php | 2 +- libraries/joomla/form/fields/cachehandler.php | 2 +- libraries/joomla/form/fields/calendar.php | 23 +- libraries/joomla/form/fields/checkbox.php | 10 +- libraries/joomla/form/fields/checkboxes.php | 8 +- libraries/joomla/form/fields/color.php | 10 +- libraries/joomla/form/fields/combo.php | 66 +- libraries/joomla/form/fields/components.php | 2 +- .../joomla/form/fields/databaseconnection.php | 2 +- libraries/joomla/form/fields/email.php | 2 +- libraries/joomla/form/fields/file.php | 8 +- libraries/joomla/form/fields/filelist.php | 8 +- libraries/joomla/form/fields/folderlist.php | 8 +- libraries/joomla/form/fields/groupedlist.php | 2 +- libraries/joomla/form/fields/hidden.php | 2 +- libraries/joomla/form/fields/imagelist.php | 2 +- libraries/joomla/form/fields/integer.php | 2 +- libraries/joomla/form/fields/language.php | 2 +- libraries/joomla/form/fields/list.php | 12 +- libraries/joomla/form/fields/meter.php | 8 +- libraries/joomla/form/fields/note.php | 2 +- libraries/joomla/form/fields/number.php | 43 +- libraries/joomla/form/fields/password.php | 8 +- libraries/joomla/form/fields/plugins.php | 59 +- .../joomla/form/fields/predefinedlist.php | 2 +- libraries/joomla/form/fields/radio.php | 2 +- libraries/joomla/form/fields/range.php | 2 +- libraries/joomla/form/fields/repeatable.php | 11 +- libraries/joomla/form/fields/rules.php | 8 +- .../joomla/form/fields/sessionhandler.php | 2 +- libraries/joomla/form/fields/spacer.php | 18 +- libraries/joomla/form/fields/sql.php | 98 +- libraries/joomla/form/fields/subform.php | 12 +- libraries/joomla/form/fields/tel.php | 2 +- libraries/joomla/form/fields/text.php | 8 +- libraries/joomla/form/fields/textarea.php | 8 +- libraries/joomla/form/fields/timezone.php | 17 +- libraries/joomla/form/fields/url.php | 2 +- libraries/joomla/form/fields/usergroup.php | 2 +- libraries/joomla/form/rule.php | 81 - libraries/joomla/form/rule/calendar.php | 60 - libraries/joomla/form/rule/color.php | 64 - libraries/joomla/form/rule/equals.php | 70 - libraries/joomla/form/rule/number.php | 71 - libraries/joomla/form/rule/username.php | 62 - libraries/joomla/form/wrapper/helper.php | 127 - libraries/joomla/github/account.php | 2 +- libraries/joomla/github/commits.php | 2 +- libraries/joomla/github/forks.php | 2 +- libraries/joomla/github/github.php | 2 +- libraries/joomla/github/hooks.php | 2 +- libraries/joomla/github/http.php | 2 +- libraries/joomla/github/meta.php | 2 +- libraries/joomla/github/milestones.php | 2 +- libraries/joomla/github/object.php | 2 +- libraries/joomla/github/package.php | 2 +- libraries/joomla/github/package/activity.php | 2 +- .../joomla/github/package/activity/events.php | 2 +- .../github/package/activity/notifications.php | 2 +- .../github/package/activity/starring.php | 2 +- .../github/package/activity/watching.php | 2 +- .../joomla/github/package/authorization.php | 2 +- libraries/joomla/github/package/data.php | 2 +- .../joomla/github/package/data/blobs.php | 2 +- .../joomla/github/package/data/commits.php | 2 +- libraries/joomla/github/package/data/refs.php | 2 +- libraries/joomla/github/package/data/tags.php | 2 +- .../joomla/github/package/data/trees.php | 2 +- libraries/joomla/github/package/gists.php | 2 +- .../joomla/github/package/gists/comments.php | 2 +- libraries/joomla/github/package/gitignore.php | 2 +- libraries/joomla/github/package/issues.php | 2 +- .../github/package/issues/assignees.php | 2 +- .../joomla/github/package/issues/comments.php | 2 +- .../joomla/github/package/issues/events.php | 2 +- .../joomla/github/package/issues/labels.php | 2 +- .../github/package/issues/milestones.php | 2 +- libraries/joomla/github/package/orgs.php | 2 +- .../joomla/github/package/orgs/members.php | 2 +- .../joomla/github/package/orgs/teams.php | 2 +- libraries/joomla/github/package/pulls.php | 2 +- .../joomla/github/package/pulls/comments.php | 2 +- .../joomla/github/package/repositories.php | 2 +- .../package/repositories/collaborators.php | 2 +- .../github/package/repositories/comments.php | 2 +- .../github/package/repositories/commits.php | 2 +- .../github/package/repositories/contents.php | 2 +- .../github/package/repositories/downloads.php | 2 +- .../github/package/repositories/forks.php | 2 +- .../github/package/repositories/hooks.php | 2 +- .../github/package/repositories/keys.php | 2 +- .../github/package/repositories/merging.php | 2 +- .../package/repositories/statistics.php | 2 +- .../github/package/repositories/statuses.php | 2 +- libraries/joomla/github/package/search.php | 2 +- libraries/joomla/github/package/users.php | 4 +- .../joomla/github/package/users/emails.php | 4 +- .../joomla/github/package/users/followers.php | 4 +- .../joomla/github/package/users/keys.php | 4 +- libraries/joomla/github/refs.php | 2 +- libraries/joomla/github/statuses.php | 2 +- libraries/joomla/google/auth.php | 2 +- libraries/joomla/google/auth/oauth2.php | 2 +- libraries/joomla/google/data.php | 2 +- libraries/joomla/google/data/adsense.php | 2 +- libraries/joomla/google/data/calendar.php | 2 +- libraries/joomla/google/data/picasa.php | 2 +- libraries/joomla/google/data/picasa/album.php | 2 +- libraries/joomla/google/data/picasa/photo.php | 2 +- libraries/joomla/google/data/plus.php | 2 +- .../joomla/google/data/plus/activities.php | 2 +- .../joomla/google/data/plus/comments.php | 2 +- libraries/joomla/google/data/plus/people.php | 2 +- libraries/joomla/google/embed.php | 2 +- libraries/joomla/google/embed/analytics.php | 2 +- libraries/joomla/google/embed/maps.php | 2 +- libraries/joomla/google/google.php | 2 +- libraries/joomla/grid/grid.php | 5 +- libraries/joomla/image/filter.php | 66 - libraries/joomla/image/filter/emboss.php | 33 - libraries/joomla/image/filter/grayscale.php | 33 - libraries/joomla/image/filter/negate.php | 33 - libraries/joomla/image/filter/sketchy.php | 33 - libraries/joomla/input/input.php | 420 -- libraries/joomla/keychain/keychain.php | 2 +- .../joomla/language/wrapper/transliterate.php | 36 - libraries/joomla/linkedin/communications.php | 2 +- libraries/joomla/linkedin/companies.php | 4 +- libraries/joomla/linkedin/groups.php | 2 +- libraries/joomla/linkedin/jobs.php | 4 +- libraries/joomla/linkedin/linkedin.php | 2 +- libraries/joomla/linkedin/oauth.php | 4 +- libraries/joomla/linkedin/object.php | 2 +- libraries/joomla/linkedin/people.php | 4 +- libraries/joomla/linkedin/stream.php | 2 +- libraries/joomla/log/logger.php | 95 - libraries/joomla/log/logger/messagequeue.php | 56 - libraries/joomla/mediawiki/categories.php | 2 +- libraries/joomla/mediawiki/http.php | 2 +- libraries/joomla/mediawiki/images.php | 2 +- libraries/joomla/mediawiki/links.php | 4 +- libraries/joomla/mediawiki/mediawiki.php | 2 +- libraries/joomla/mediawiki/object.php | 2 +- libraries/joomla/mediawiki/pages.php | 2 +- libraries/joomla/mediawiki/search.php | 2 +- libraries/joomla/mediawiki/sites.php | 2 +- libraries/joomla/mediawiki/users.php | 2 +- libraries/joomla/model/base.php | 2 +- libraries/joomla/model/database.php | 2 +- libraries/joomla/model/model.php | 2 +- libraries/joomla/oauth1/client.php | 2 +- libraries/joomla/oauth2/client.php | 2 +- libraries/joomla/observable/interface.php | 2 +- libraries/joomla/observer/interface.php | 2 +- libraries/joomla/observer/mapper.php | 2 +- libraries/joomla/observer/updater.php | 32 +- .../joomla/observer/updater/interface.php | 2 +- libraries/joomla/observer/wrapper/mapper.php | 2 +- libraries/joomla/openstreetmap/changesets.php | 2 +- libraries/joomla/openstreetmap/elements.php | 4 +- libraries/joomla/openstreetmap/gps.php | 2 +- libraries/joomla/openstreetmap/info.php | 2 +- libraries/joomla/openstreetmap/oauth.php | 14 +- libraries/joomla/openstreetmap/object.php | 2 +- .../joomla/openstreetmap/openstreetmap.php | 6 +- libraries/joomla/openstreetmap/user.php | 2 +- libraries/joomla/platform.php | 6 +- libraries/joomla/route/wrapper/route.php | 3 +- .../joomla/session/exception/unsupported.php | 20 - .../joomla/session/handler/interface.php | 2 +- libraries/joomla/session/handler/joomla.php | 35 +- libraries/joomla/session/handler/native.php | 4 +- libraries/joomla/session/storage.php | 20 +- libraries/joomla/session/storage/apc.php | 4 +- libraries/joomla/session/storage/database.php | 4 +- libraries/joomla/session/storage/memcache.php | 10 +- .../joomla/session/storage/memcached.php | 10 +- libraries/joomla/session/storage/none.php | 4 +- libraries/joomla/session/storage/redis.php | 105 + libraries/joomla/session/storage/wincache.php | 7 +- libraries/joomla/session/storage/xcache.php | 2 +- libraries/joomla/string/string.php | 4 +- libraries/joomla/string/wrapper/normalise.php | 3 +- libraries/joomla/string/wrapper/punycode.php | 3 +- libraries/joomla/table/language.php | 89 - libraries/joomla/twitter/block.php | 2 +- libraries/joomla/twitter/directmessages.php | 2 +- libraries/joomla/twitter/favorites.php | 2 +- libraries/joomla/twitter/friends.php | 2 +- libraries/joomla/twitter/help.php | 2 +- libraries/joomla/twitter/lists.php | 2 +- libraries/joomla/twitter/oauth.php | 2 +- libraries/joomla/twitter/object.php | 2 +- libraries/joomla/twitter/places.php | 2 +- libraries/joomla/twitter/profile.php | 2 +- libraries/joomla/twitter/search.php | 2 +- libraries/joomla/twitter/statuses.php | 2 +- libraries/joomla/twitter/trends.php | 2 +- libraries/joomla/twitter/twitter.php | 2 +- libraries/joomla/twitter/users.php | 2 +- libraries/joomla/utilities/arrayhelper.php | 4 +- libraries/joomla/view/base.php | 2 +- libraries/joomla/view/html.php | 2 +- libraries/joomla/view/view.php | 2 +- libraries/legacy/access/rule.php | 36 - libraries/legacy/access/rules.php | 36 - libraries/legacy/application/application.php | 34 +- libraries/legacy/application/cli.php | 45 - libraries/legacy/application/daemon.php | 47 - libraries/legacy/base/node.php | 10 +- libraries/legacy/base/observable.php | 4 +- libraries/legacy/base/observer.php | 4 +- libraries/legacy/base/tree.php | 4 +- libraries/legacy/categories/categories.php | 1010 --- libraries/legacy/database/exception.php | 4 +- libraries/legacy/database/mysql.php | 6 +- libraries/legacy/database/mysqli.php | 6 +- libraries/legacy/database/sqlazure.php | 6 +- libraries/legacy/database/sqlsrv.php | 6 +- libraries/legacy/dispatcher/dispatcher.php | 4 +- libraries/legacy/error/error.php | 86 +- libraries/legacy/exception/exception.php | 6 +- libraries/legacy/form/field/category.php | 6 +- .../legacy/form/field/componentlayout.php | 22 +- libraries/legacy/form/field/modulelayout.php | 6 +- libraries/legacy/log/logexception.php | 4 +- libraries/legacy/request/request.php | 12 +- libraries/legacy/response/response.php | 6 +- libraries/legacy/simplecrypt/simplecrypt.php | 4 +- libraries/legacy/simplepie/factory.php | 4 +- libraries/legacy/table/session.php | 4 +- libraries/legacy/utilities/xmlelement.php | 10 +- libraries/legacy/web/client.php | 35 - libraries/legacy/web/web.php | 44 - libraries/loader.php | 203 +- libraries/phpass/PasswordHash.php | 82 +- .../access.php => src/Access/Access.php} | 134 +- libraries/src/Access/Exception/NotAllowed.php | 20 + .../access/rule.php => src/Access/Rule.php} | 15 +- .../access/rules.php => src/Access/Rules.php} | 38 +- .../Access/Wrapper/Access.php} | 75 +- .../Application/AdministratorApplication.php} | 133 +- .../Application/ApplicationHelper.php} | 48 +- .../Application/BaseApplication.php} | 50 +- .../Application/CMSApplication.php} | 399 +- .../Application/CliApplication.php} | 71 +- .../Application/DaemonApplication.php} | 134 +- .../Application/SiteApplication.php} | 139 +- .../Application/WebApplication.php} | 309 +- .../AssociationExtensionHelper.php} | 13 +- .../AssociationExtensionInterface.php} | 11 +- .../Authentication/Authentication.php} | 53 +- .../AuthenticationResponse.php} | 13 +- .../cache/cache.php => src/Cache/Cache.php} | 111 +- .../Cache/CacheController.php} | 48 +- .../Cache/CacheStorage.php} | 59 +- .../Cache/Controller/CallbackController.php} | 20 +- .../Cache/Controller/OutputController.php} | 26 +- .../Cache/Controller/PageController.php} | 31 +- .../Cache/Controller/ViewController.php} | 20 +- .../Exception/CacheConnectingException.php | 20 + .../Exception/CacheExceptionInterface.php | 20 + .../Exception/UnsupportedCacheException.php | 20 + .../Cache/Storage/ApcStorage.php} | 21 +- .../Cache/Storage/ApcuStorage.php} | 21 +- .../Cache/Storage/CacheStorageHelper.php} | 13 +- .../Cache/Storage/CacheliteStorage.php} | 44 +- .../Cache/Storage/FileStorage.php} | 39 +- .../Cache/Storage/MemcacheStorage.php} | 43 +- .../Cache/Storage/MemcachedStorage.php} | 47 +- .../Cache/Storage/RedisStorage.php} | 106 +- .../Cache/Storage/WincacheStorage.php} | 19 +- .../Cache/Storage/XcacheStorage.php} | 17 +- .../captcha.php => src/Captcha/Captcha.php} | 50 +- libraries/src/Categories/Categories.php | 391 ++ libraries/src/Categories/CategoryNode.php | 643 ++ .../Client/ClientHelper.php} | 33 +- .../Client/ClientWrapper.php} | 32 +- .../ftp.php => src/Client/FtpClient.php} | 228 +- .../Component/ComponentHelper.php} | 181 +- .../Component/ComponentRecord.php} | 15 +- .../Exception/MissingComponentException.php | 35 + .../Component/Router/RouterBase.php} | 21 +- .../Component/Router/RouterInterface.php} | 11 +- .../Component/Router/RouterLegacy.php} | 11 +- .../Component/Router/RouterView.php} | 39 +- .../Router/RouterViewConfiguration.php} | 35 +- .../Component/Router/Rules/MenuRules.php} | 116 +- .../Component/Router/Rules/NomenuRules.php} | 24 +- .../Router/Rules/RulesInterface.php} | 13 +- .../Component/Router/Rules/StandardRules.php} | 140 +- libraries/src/Crypt/Cipher/BlowfishCipher.php | 40 + libraries/src/Crypt/Cipher/CryptoCipher.php | 129 + .../Crypt/Cipher/McryptCipher.php} | 63 +- .../src/Crypt/Cipher/Rijndael256Cipher.php | 40 + .../Crypt/Cipher/SimpleCipher.php} | 43 +- libraries/src/Crypt/Cipher/SodiumCipher.php | 138 + .../src/Crypt/Cipher/TripleDesCipher.php | 40 + libraries/src/Crypt/CipherInterface.php | 54 + .../crypt/crypt.php => src/Crypt/Crypt.php} | 48 +- .../Crypt/CryptPassword.php} | 11 +- .../crypt/key.php => src/Crypt/Key.php} | 11 +- .../Crypt/Password/SimpleCryptPassword.php} | 34 +- .../{joomla/crypt => src/Crypt}/README.md | 32 +- .../date/date.php => src/Date/Date.php} | 100 +- .../Document/Document.php} | 152 +- .../Document/DocumentRenderer.php} | 23 +- .../Document/ErrorDocument.php} | 44 +- libraries/src/Document/Feed/FeedEnclosure.php | 49 + libraries/src/Document/Feed/FeedImage.php | 79 + libraries/src/Document/Feed/FeedItem.php | 155 + libraries/src/Document/FeedDocument.php | 246 + .../Document/HtmlDocument.php} | 70 +- .../Document/ImageDocument.php} | 17 +- .../Document/JsonDocument.php} | 21 +- .../Document/Opensearch/OpensearchImage.php | 59 + .../src/Document/Opensearch/OpensearchUrl.php | 49 + .../Document/OpensearchDocument.php} | 141 +- .../raw.php => src/Document/RawDocument.php} | 15 +- .../Document/Renderer/Feed/AtomRenderer.php} | 41 +- .../Document/Renderer/Feed/RssRenderer.php} | 40 +- .../Renderer/Html/ComponentRenderer.php} | 15 +- .../Document/Renderer/Html/HeadRenderer.php} | 34 +- .../Renderer/Html/MessageRenderer.php} | 25 +- .../Renderer/Html/ModuleRenderer.php} | 29 +- .../Renderer/Html/ModulesRenderer.php} | 27 +- .../xml.php => src/Document/XmlDocument.php} | 19 +- .../editor.php => src/Editor/Editor.php} | 55 +- .../Environment/Browser.php} | 155 +- .../Exception/ExceptionHandler.php} | 45 +- libraries/src/Extension/ExtensionHelper.php | 278 + .../{joomla/factory.php => src/Factory.php} | 236 +- .../feed/feed.php => src/Feed/Feed.php} | 111 +- .../feed/entry.php => src/Feed/FeedEntry.php} | 99 +- .../factory.php => src/Feed/FeedFactory.php} | 77 +- .../feed/link.php => src/Feed/FeedLink.php} | 15 +- .../parser.php => src/Feed/FeedParser.php} | 58 +- .../person.php => src/Feed/FeedPerson.php} | 11 +- libraries/src/Feed/Parser/AtomParser.php | 259 + .../Feed/Parser/NamespaceParserInterface.php | 46 + .../src/Feed/Parser/Rss/ItunesRssParser.php | 54 + .../src/Feed/Parser/Rss/MediaRssParser.php | 54 + .../rss.php => src/Feed/Parser/RssParser.php} | 134 +- .../input.php => src/Filter/InputFilter.php} | 345 +- .../Filter/OutputFilter.php} | 22 +- .../Filter/Wrapper/OutputFilterWrapper.php | 168 + .../Form/Field/AuthorField.php} | 18 +- .../Form/Field/CaptchaField.php} | 37 +- libraries/src/Form/Field/ChromestyleField.php | 251 + .../Form/Field/ContenthistoryField.php} | 23 +- .../Form/Field/ContentlanguageField.php} | 17 +- .../Form/Field/ContenttypeField.php} | 25 +- .../Form/Field/EditorField.php} | 83 +- .../Form/Field/FrontendlanguageField.php} | 35 +- .../Form/Field/HeadertagField.php} | 17 +- .../Form/Field/HelpsiteField.php} | 24 +- .../Form/Field/LastvisitdaterangeField.php} | 21 +- .../Form/Field/LimitboxField.php} | 19 +- .../Form/Field/MediaField.php} | 44 +- .../menu.php => src/Form/Field/MenuField.php} | 26 +- libraries/src/Form/Field/MenuitemField.php | 265 + .../Form/Field/ModuleorderField.php} | 34 +- .../Form/Field/ModulepositionField.php} | 50 +- .../Form/Field/ModuletagField.php} | 17 +- .../Form/Field/OrderingField.php} | 45 +- .../src/Form/Field/PluginstatusField.php | 42 + .../src/Form/Field/RedirectStatusField.php | 44 + .../Field/RegistrationdaterangeField.php} | 21 +- .../Form/Field/StatusField.php} | 15 +- .../tag.php => src/Form/Field/TagField.php} | 48 +- .../Form/Field/TemplatestyleField.php} | 47 +- .../user.php => src/Form/Field/UserField.php} | 41 +- .../Form/Field/UseractiveField.php} | 21 +- .../Form/Field/UsergrouplistField.php} | 36 +- .../Form/Field/UserstateField.php} | 15 +- .../form/form.php => src/Form/Form.php} | 337 +- .../form/field.php => src/Form/FormField.php} | 143 +- .../helper.php => src/Form/FormHelper.php} | 152 +- libraries/src/Form/FormRule.php | 82 + libraries/src/Form/FormWrapper.php | 134 + .../Form/Rule/BooleanRule.php} | 13 +- libraries/src/Form/Rule/CalendarRule.php | 64 + libraries/src/Form/Rule/CaptchaRule.php | 79 + libraries/src/Form/Rule/ColorRule.php | 67 + .../email.php => src/Form/Rule/EmailRule.php} | 39 +- libraries/src/Form/Rule/EqualsRule.php | 73 + libraries/src/Form/Rule/NotequalsRule.php | 66 + libraries/src/Form/Rule/NumberRule.php | 74 + .../Form/Rule/OptionsRule.php} | 30 +- .../Form/Rule/PasswordRule.php} | 72 +- .../rules.php => src/Form/Rule/RulesRule.php} | 36 +- .../tel.php => src/Form/Rule/TelRule.php} | 37 +- .../url.php => src/Form/Rule/UrlRule.php} | 41 +- libraries/src/Form/Rule/UsernameRule.php | 65 + .../html/html.php => src/HTML/HTMLHelper.php} | 187 +- .../{cms/help/help.php => src/Help/Help.php} | 27 +- .../Helper/AuthenticationHelper.php} | 21 +- .../helper.php => src/Helper/CMSHelper.php} | 58 +- .../Helper/ContentHelper.php} | 86 +- .../Helper/ContentHistoryHelper.php} | 38 +- .../Helper/LibraryHelper.php} | 31 +- .../media.php => src/Helper/MediaHelper.php} | 192 +- .../Helper/ModuleHelper.php} | 128 +- .../route.php => src/Helper/RouteHelper.php} | 47 +- .../Helper/SearchHelper.php} | 19 +- .../tags.php => src/Helper/TagsHelper.php} | 155 +- .../Helper/UserGroupsHelper.php} | 25 +- .../http/http.php => src/Http/Http.php} | 60 +- .../factory.php => src/Http/HttpFactory.php} | 41 +- .../response.php => src/Http/Response.php} | 11 +- .../Http/Transport/CurlTransport.php} | 48 +- .../Http/Transport/SocketTransport.php} | 56 +- .../Http/Transport/StreamTransport.php} | 44 +- .../Http/Transport}/cacert.pem | 0 .../Http/TransportInterface.php} | 20 +- .../Http/Wrapper/FactoryWrapper.php} | 34 +- libraries/src/Image/Image.php | 89 + libraries/src/Image/ImageFilter.php | 40 + .../input/cli.php => src/Input/Cli.php} | 28 +- .../input/cookie.php => src/Input/Cookie.php} | 20 +- .../input/files.php => src/Input/Files.php} | 25 +- libraries/src/Input/Input.php | 225 + .../input/json.php => src/Input/Json.php} | 21 +- .../Installer/Adapter/ComponentAdapter.php} | 308 +- .../Installer/Adapter/FileAdapter.php} | 135 +- .../Installer/Adapter/LanguageAdapter.php} | 175 +- .../Installer/Adapter/LibraryAdapter.php} | 130 +- .../Installer/Adapter/ModuleAdapter.php} | 178 +- .../Installer/Adapter/PackageAdapter.php} | 181 +- .../Installer/Adapter/PluginAdapter.php} | 164 +- .../Installer/Adapter/TemplateAdapter.php} | 194 +- .../Installer/Installer.php} | 377 +- .../Installer/InstallerAdapter.php} | 197 +- .../Installer/InstallerExtension.php} | 34 +- .../Installer/InstallerHelper.php} | 82 +- .../Installer/InstallerScript.php} | 59 +- .../Installer/Manifest.php} | 23 +- .../Installer/Manifest/LibraryManifest.php} | 19 +- .../Installer/Manifest/PackageManifest.php} | 24 +- .../Language/Associations.php} | 46 +- .../Language/Language.php} | 104 +- .../Language/LanguageHelper.php} | 84 +- .../Language/LanguageStemmer.php} | 21 +- .../Language/Multilanguage.php} | 23 +- .../Language/Stemmer/Porteren.php} | 87 +- .../text.php => src/Language/Text.php} | 57 +- .../Language/Transliterate.php} | 11 +- .../Language/Wrapper/JTextWrapper.php} | 48 +- .../Wrapper/LanguageHelperWrapper.php} | 33 +- .../Language/Wrapper/TransliterateWrapper.php | 39 + .../base.php => src/Layout/BaseLayout.php} | 17 +- .../file.php => src/Layout/FileLayout.php} | 44 +- .../Layout/LayoutHelper.php} | 25 +- .../Layout/LayoutInterface.php} | 13 +- libraries/src/Log/DelegatingPsrLogger.php | 112 + .../{joomla/log/log.php => src/Log/Log.php} | 80 +- .../log/entry.php => src/Log/LogEntry.php} | 53 +- libraries/src/Log/Logger.php | 72 + .../Log/Logger/CallbackLogger.php} | 24 +- .../Log/Logger/DatabaseLogger.php} | 28 +- .../Log/Logger/EchoLogger.php} | 18 +- .../Log/Logger/FormattedtextLogger.php} | 42 +- .../src/Log/Logger/MessagequeueLogger.php | 61 + .../Log/Logger/SyslogLogger.php} | 37 +- .../w3c.php => src/Log/Logger/W3cLogger.php} | 13 +- .../MVC/Controller/AdminController.php} | 91 +- .../MVC/Controller/BaseController.php} | 168 +- .../MVC/Controller/FormController.php} | 261 +- .../MVC/Model/AdminModel.php} | 346 +- .../MVC/Model/BaseDatabaseModel.php} | 99 +- .../form.php => src/MVC/Model/FormModel.php} | 94 +- .../item.php => src/MVC/Model/ItemModel.php} | 11 +- .../list.php => src/MVC/Model/ListModel.php} | 96 +- .../MVC/View/CategoriesView.php} | 25 +- .../MVC/View/CategoryFeedView.php} | 35 +- .../MVC/View/CategoryView.php} | 72 +- .../legacy.php => src/MVC/View/HtmlView.php} | 99 +- .../mail/mail.php => src/Mail/Mail.php} | 136 +- .../helper.php => src/Mail/MailHelper.php} | 17 +- .../helper.php => src/Mail/MailWrapper.php} | 38 +- .../Mail/language/phpmailer.lang-en_gb.php} | 3 +- .../menu.php => src/Menu/AbstractMenu.php} | 54 +- libraries/src/Menu/AdministratorMenu.php | 20 + libraries/src/Menu/MenuHelper.php | 388 ++ .../menu/item.php => src/Menu/MenuItem.php} | 19 +- libraries/src/Menu/Node.php | 272 + libraries/src/Menu/Node/Component.php | 117 + libraries/src/Menu/Node/Container.php | 21 + libraries/src/Menu/Node/Heading.php | 91 + libraries/src/Menu/Node/Separator.php | 65 + libraries/src/Menu/Node/Url.php | 105 + .../menu/site.php => src/Menu/SiteMenu.php} | 59 +- libraries/src/Menu/Tree.php | 219 + .../Microdata/Microdata.php} | 23 +- .../microdata => src/Microdata}/types.json | 0 .../object.php => src/Object/CMSObject.php} | 19 +- .../Pagination/Pagination.php} | 177 +- .../Pagination/PaginationObject.php} | 11 +- .../pathway.php => src/Pathway/Pathway.php} | 41 +- .../site.php => src/Pathway/SitePathway.php} | 20 +- .../plugin.php => src/Plugin/CMSPlugin.php} | 29 +- .../Plugin/PluginHelper.php} | 131 +- .../Profiler/Profiler.php} | 17 +- .../Response/JsonResponse.php} | 19 +- .../Router/AdministratorRouter.php} | 15 +- .../Exception/RouteNotFoundException.php | 38 + .../route.php => src/Router/Route.php} | 20 +- .../router.php => src/Router/Router.php} | 101 +- .../site.php => src/Router/SiteRouter.php} | 134 +- .../Schema/ChangeItem.php} | 69 +- .../Schema/ChangeItem/MysqlChangeItem.php} | 133 +- .../ChangeItem/PostgresqlChangeItem.php} | 33 +- .../Schema/ChangeItem/SqlsrvChangeItem.php} | 23 +- .../Schema/ChangeSet.php} | 55 +- .../Exception/UnsupportedStorageException.php | 20 + libraries/src/Session/MetadataManager.php | 160 + .../session.php => src/Session/Session.php} | 137 +- .../String/PunycodeHelper.php} | 17 +- .../table/asset.php => src/Table/Asset.php} | 46 +- .../category.php => src/Table/Category.php} | 51 +- .../content.php => src/Table/Content.php} | 66 +- .../Table/ContentHistory.php} | 41 +- .../Table/ContentType.php} | 41 +- .../Table/CoreContent.php} | 67 +- .../extension.php => src/Table/Extension.php} | 25 +- libraries/src/Table/Language.php | 143 + .../table/menu.php => src/Table/Menu.php} | 81 +- .../menu/type.php => src/Table/MenuType.php} | 57 +- .../table/module.php => src/Table/Module.php} | 32 +- .../table/nested.php => src/Table/Nested.php} | 129 +- .../Table/Observer/AbstractObserver.php} | 22 +- .../Table/Observer/ContentHistory.php} | 33 +- .../tags.php => src/Table/Observer/Tags.php} | 34 +- .../table/table.php => src/Table/Table.php} | 210 +- .../Table/TableInterface.php} | 35 +- libraries/src/Table/Ucm.php | 31 + .../table/update.php => src/Table/Update.php} | 19 +- .../Table/UpdateSite.php} | 17 +- .../table/user.php => src/Table/User.php} | 45 +- .../usergroup.php => src/Table/Usergroup.php} | 34 +- .../viewlevel.php => src/Table/ViewLevel.php} | 17 +- .../Toolbar/Button/ConfirmButton.php} | 23 +- .../Toolbar/Button/CustomButton.php} | 13 +- .../Toolbar/Button/HelpButton.php} | 23 +- .../Toolbar/Button/LinkButton.php} | 18 +- .../Toolbar/Button/PopupButton.php} | 30 +- .../Toolbar/Button/SeparatorButton.php} | 18 +- .../Toolbar/Button/SliderButton.php} | 24 +- .../Toolbar/Button/StandardButton.php} | 33 +- .../toolbar.php => src/Toolbar/Toolbar.php} | 142 +- .../Toolbar/ToolbarButton.php} | 42 +- libraries/src/UCM/UCM.php | 20 + libraries/src/UCM/UCMBase.php | 144 + .../content.php => src/UCM/UCMContent.php} | 67 +- .../{cms/ucm/type.php => src/UCM/UCMType.php} | 33 +- .../Updater/Adapter/CollectionAdapter.php} | 43 +- .../Updater/Adapter/ExtensionAdapter.php} | 73 +- libraries/src/Updater/DownloadSource.php | 91 + .../update.php => src/Updater/Update.php} | 105 +- .../Updater/UpdateAdapter.php} | 59 +- .../updater.php => src/Updater/Updater.php} | 62 +- .../{joomla/uri/uri.php => src/Uri/Uri.php} | 22 +- .../user/user.php => src/User/User.php} | 139 +- .../helper.php => src/User/UserHelper.php} | 136 +- .../helper.php => src/User/UserWrapper.php} | 93 +- .../Utility/BufferStreamHandler.php} | 50 +- .../utility.php => src/Utility/Utility.php} | 20 +- .../version/version.php => src/Version.php} | 103 +- libraries/vendor/composer/ClassLoader.php | 4 +- .../vendor/composer/autoload_classmap.php | 160 + libraries/vendor/composer/autoload_files.php | 5 +- libraries/vendor/composer/autoload_psr4.php | 9 +- libraries/vendor/composer/autoload_static.php | 210 +- libraries/vendor/composer/installed.json | 1341 ++-- .../application/src/AbstractApplication.php | 2 +- .../src/AbstractCliApplication.php | 5 +- .../src/AbstractDaemonApplication.php | 13 +- .../src/AbstractWebApplication.php | 182 +- .../joomla/application/src/Cli/CliInput.php | 5 +- .../joomla/application/src/Cli/CliOutput.php | 5 +- .../application/src/Cli/ColorProcessor.php | 4 +- .../joomla/application/src/Cli/ColorStyle.php | 5 +- .../Cli/Output/Processor/ColorProcessor.php | 7 +- .../Output/Processor/ProcessorInterface.php | 5 +- .../application/src/Cli/Output/Stdout.php | 5 +- .../joomla/application/src/Cli/Output/Xml.php | 5 +- .../joomla/application/src/Web/WebClient.php | 27 +- libraries/vendor/joomla/archive/LICENSE | 340 + .../vendor/joomla/archive/src/Archive.php | 233 + libraries/vendor/joomla/archive/src/Bzip2.php | 152 + .../archive/src/ExtractableInterface.php | 39 + libraries/vendor/joomla/archive/src/Gzip.php | 215 + libraries/vendor/joomla/archive/src/Tar.php | 253 + libraries/vendor/joomla/archive/src/Zip.php | 634 ++ libraries/vendor/joomla/di/src/Container.php | 236 +- .../joomla/di/src/ContainerAwareInterface.php | 4 +- .../joomla/di/src/ContainerAwareTrait.php | 7 +- .../DependencyResolutionException.php | 6 +- .../di/src/Exception/KeyNotFoundException.php | 20 + .../src/Exception/ProtectedKeyException.php | 20 + .../di/src/ServiceProviderInterface.php | 2 +- libraries/vendor/joomla/filesystem/LICENSE | 340 + .../en-GB.lib_joomla_filesystem_patcher.ini | 13 + .../vendor/joomla/filesystem/src/Buffer.php | 196 + .../filesystem/src/Clients/FtpClient.php | 1796 +++++ .../src/Exception/FilesystemException.php | 18 + .../vendor/joomla/filesystem/src/File.php | 260 + .../vendor/joomla/filesystem/src/Folder.php | 563 ++ .../vendor/joomla/filesystem/src/Helper.php | 299 + .../vendor/joomla/filesystem/src/Patcher.php | 544 ++ .../vendor/joomla/filesystem/src/Path.php | 307 + .../vendor/joomla/filesystem/src/Stream.php | 1441 ++++ .../joomla/filesystem/src/Stream/String.php | 22 + .../filesystem/src/Stream/StringWrapper.php | 287 + .../src/Support/StringController.php | 70 + .../vendor/joomla/filter/src/InputFilter.php | 204 +- .../vendor/joomla/filter/src/OutputFilter.php | 30 +- libraries/vendor/joomla/image/LICENSE | 340 + .../image/src/Filter/Backgroundfill.php} | 31 +- .../joomla/image/src/Filter/Brightness.php} | 19 +- .../joomla/image/src/Filter/Contrast.php} | 19 +- .../joomla/image/src/Filter/Edgedetect.php} | 18 +- .../vendor/joomla/image/src/Filter/Emboss.php | 35 + .../joomla/image/src/Filter/Grayscale.php | 35 + .../vendor/joomla/image/src/Filter/Negate.php | 35 + .../joomla/image/src/Filter/Sketchy.php | 35 + .../joomla/image/src/Filter/Smooth.php} | 19 +- .../joomla/image/src/Image.php} | 563 +- .../vendor/joomla/image/src/ImageFilter.php | 112 + libraries/vendor/joomla/input/src/Cli.php | 13 +- libraries/vendor/joomla/input/src/Cookie.php | 4 +- libraries/vendor/joomla/input/src/Files.php | 4 +- libraries/vendor/joomla/input/src/Input.php | 45 +- libraries/vendor/joomla/input/src/Json.php | 4 +- .../vendor/joomla/ldap/src/LdapClient.php | 370 +- .../registry/src/AbstractRegistryFormat.php | 2 +- .../vendor/joomla/registry/src/Factory.php | 2 +- .../vendor/joomla/registry/src/Format/Ini.php | 85 +- .../joomla/registry/src/Format/Json.php | 20 +- .../vendor/joomla/registry/src/Format/Php.php | 18 +- .../vendor/joomla/registry/src/Format/Xml.php | 6 +- .../joomla/registry/src/Format/Yaml.php | 4 +- .../joomla/registry/src/FormatInterface.php | 2 +- .../vendor/joomla/registry/src/Registry.php | 144 +- .../joomla/utilities/src/ArrayHelper.php | 143 +- .../random_compat/lib/byte_safe_strings.php | 26 +- .../random_compat/lib/cast_to_int.php | 33 +- .../random_compat/lib/error_polyfill.php | 29 +- .../paragonie/random_compat/lib/random.php | 336 +- .../lib/random_bytes_com_dotnet.php | 117 +- .../lib/random_bytes_dev_urandom.php | 190 +- .../lib/random_bytes_libsodium.php | 118 +- .../lib/random_bytes_libsodium_legacy.php | 120 +- .../random_compat/lib/random_bytes_mcrypt.php | 97 +- .../lib/random_bytes_openssl.php | 5 +- .../random_compat/lib/random_int.php | 319 +- .../vendor/paragonie/sodium_compat/LICENSE | 21 + .../paragonie/sodium_compat/autoload-fast.php | 4 + .../sodium_compat/autoload-pedantic.php | 6 + .../paragonie/sodium_compat/autoload.php | 49 + .../paragonie/sodium_compat/lib/constants.php | 50 + .../sodium_compat/lib/namespaced.php | 46 + .../sodium_compat/lib/php72compat.php | 1052 +++ .../sodium_compat/lib/sodium_compat.php | 835 +++ .../sodium_compat/namespaced/Compat.php | 7 + .../sodium_compat/namespaced/Core/BLAKE2b.php | 7 + .../namespaced/Core/ChaCha20.php | 7 + .../namespaced/Core/ChaCha20/Ctx.php | 7 + .../namespaced/Core/ChaCha20/IetfCtx.php | 7 + .../namespaced/Core/Curve25519.php | 7 + .../namespaced/Core/Curve25519/Fe.php | 7 + .../namespaced/Core/Curve25519/Ge/Cached.php | 7 + .../namespaced/Core/Curve25519/Ge/P1p1.php | 7 + .../namespaced/Core/Curve25519/Ge/P2.php | 7 + .../namespaced/Core/Curve25519/Ge/P3.php | 7 + .../namespaced/Core/Curve25519/Ge/Precomp.php | 7 + .../namespaced/Core/Curve25519/H.php | 7 + .../sodium_compat/namespaced/Core/Ed25519.php | 7 + .../namespaced/Core/HChaCha20.php | 7 + .../namespaced/Core/HSalsa20.php | 7 + .../namespaced/Core/Poly1305.php | 7 + .../namespaced/Core/Poly1305/State.php | 7 + .../sodium_compat/namespaced/Core/Salsa20.php | 7 + .../sodium_compat/namespaced/Core/SipHash.php | 7 + .../sodium_compat/namespaced/Core/Util.php | 7 + .../sodium_compat/namespaced/Core/X25519.php | 7 + .../namespaced/Core/XChaCha20.php | 7 + .../namespaced/Core/Xsalsa20.php | 7 + .../sodium_compat/namespaced/Crypto.php | 7 + .../sodium_compat/namespaced/File.php | 7 + .../paragonie/sodium_compat/src/Compat.php | 2706 ++++++++ .../sodium_compat/src/Core/BLAKE2b.php | 746 +++ .../sodium_compat/src/Core/ChaCha20.php | 395 ++ .../sodium_compat/src/Core/ChaCha20/Ctx.php | 120 + .../src/Core/ChaCha20/IetfCtx.php | 38 + .../sodium_compat/src/Core/Curve25519.php | 2978 +++++++++ .../sodium_compat/src/Core/Curve25519/Fe.php | 130 + .../src/Core/Curve25519/Ge/Cached.php | 65 + .../src/Core/Curve25519/Ge/P1p1.php | 64 + .../src/Core/Curve25519/Ge/P2.php | 54 + .../src/Core/Curve25519/Ge/P3.php | 65 + .../src/Core/Curve25519/Ge/Precomp.php | 54 + .../sodium_compat/src/Core/Curve25519/H.php | 1467 +++++ .../sodium_compat/src/Core/Ed25519.php | 479 ++ .../sodium_compat/src/Core/HChaCha20.php | 108 + .../sodium_compat/src/Core/HSalsa20.php | 96 + .../sodium_compat/src/Core/Poly1305.php | 63 + .../sodium_compat/src/Core/Poly1305/State.php | 419 ++ .../sodium_compat/src/Core/Salsa20.php | 273 + .../sodium_compat/src/Core/SipHash.php | 305 + .../paragonie/sodium_compat/src/Core/Util.php | 921 +++ .../sodium_compat/src/Core/X25519.php | 327 + .../sodium_compat/src/Core/XChaCha20.php | 64 + .../sodium_compat/src/Core/Xsalsa20.php | 57 + .../sodium_compat/src/Core32/BLAKE2b.php | 675 ++ .../sodium_compat/src/Core32/ChaCha20.php | 400 ++ .../sodium_compat/src/Core32/ChaCha20/Ctx.php | 126 + .../src/Core32/ChaCha20/IetfCtx.php | 39 + .../sodium_compat/src/Core32/Curve25519.php | 3543 ++++++++++ .../src/Core32/Curve25519/Fe.php | 221 + .../src/Core32/Curve25519/Ge/Cached.php | 65 + .../src/Core32/Curve25519/Ge/P1p1.php | 67 + .../src/Core32/Curve25519/Ge/P2.php | 54 + .../src/Core32/Curve25519/Ge/P3.php | 65 + .../src/Core32/Curve25519/Ge/Precomp.php | 56 + .../sodium_compat/src/Core32/Curve25519/H.php | 1467 +++++ .../src/Core32/Curve25519/README.md | 3 + .../sodium_compat/src/Core32/Ed25519.php | 480 ++ .../sodium_compat/src/Core32/HChaCha20.php | 127 + .../sodium_compat/src/Core32/HSalsa20.php | 141 + .../sodium_compat/src/Core32/Int32.php | 650 ++ .../sodium_compat/src/Core32/Int64.php | 743 +++ .../sodium_compat/src/Core32/Poly1305.php | 63 + .../src/Core32/Poly1305/State.php | 451 ++ .../sodium_compat/src/Core32/Salsa20.php | 306 + .../sodium_compat/src/Core32/SipHash.php | 239 + .../sodium_compat/src/Core32/Util.php | 13 + .../sodium_compat/src/Core32/X25519.php | 348 + .../sodium_compat/src/Core32/XChaCha20.php | 64 + .../sodium_compat/src/Core32/XSalsa20.php | 57 + .../paragonie/sodium_compat/src/Crypto.php | 1245 ++++ .../paragonie/sodium_compat/src/Crypto32.php | 1244 ++++ .../paragonie/sodium_compat/src/File.php | 1515 +++++ .../sodium_compat/src/SodiumException.php | 11 + libraries/vendor/phpmailer/phpmailer/VERSION | 2 +- .../phpmailer/phpmailer/class.phpmailer.php | 25 +- .../vendor/phpmailer/phpmailer/class.pop3.php | 2 +- .../vendor/phpmailer/phpmailer/class.smtp.php | 139 +- .../vendor/phpmailer/phpmailer/composer.lock | 911 +-- .../phpmailer/phpmailer/extras/htmlfilter.php | 4 +- libraries/vendor/psr/container/LICENSE | 21 + .../src/ContainerExceptionInterface.php | 13 + .../psr/container/src/ContainerInterface.php | 37 + .../src/NotFoundExceptionInterface.php | 13 + .../vendor/symfony/polyfill-ctype/Ctype.php | 227 + .../vendor/symfony/polyfill-ctype/LICENSE | 19 + .../symfony/polyfill-ctype/bootstrap.php | 26 + .../vendor/symfony/polyfill-php55/LICENSE | 2 +- .../vendor/symfony/polyfill-php55/Php55.php | 2 +- .../polyfill-php55/Php55ArrayColumn.php | 2 +- .../vendor/symfony/polyfill-php56/LICENSE | 2 +- .../vendor/symfony/polyfill-php56/Php56.php | 16 +- .../vendor/symfony/polyfill-php73/LICENSE | 19 + .../symfony/polyfill-php73/bootstrap.php | 16 + .../polyfill-util/BinaryNoFuncOverload.php | 2 +- .../vendor/symfony/polyfill-util/LICENSE | 2 +- libraries/vendor/symfony/yaml/Dumper.php | 4 +- libraries/vendor/symfony/yaml/Escaper.php | 10 +- .../symfony/yaml/Exception/ParseException.php | 14 +- libraries/vendor/symfony/yaml/Inline.php | 72 +- libraries/vendor/symfony/yaml/LICENSE | 2 +- libraries/vendor/symfony/yaml/Parser.php | 209 +- libraries/vendor/symfony/yaml/Yaml.php | 10 +- media/cms/css/debug.css | 2 +- media/com_associations/css/sidebyside.css | 2 +- .../js/sidebyside-uncompressed.js | 17 +- media/com_associations/js/sidebyside.js | 2 +- media/com_contact/js/admin-contacts-modal.js | 2 +- .../com_content/js/admin-article-pagebreak.js | 2 +- .../com_content/js/admin-article-readmore.js | 14 +- .../js/admin-article-readmore.min.js | 2 +- media/com_content/js/admin-articles-modal.js | 2 +- media/com_fields/js/admin-fields-modal.js | 2 +- media/com_joomlaupdate/js/update.js | 4 +- media/com_joomlaupdate/js/update.min.js | 2 +- media/com_menus/js/admin-items-modal.js | 2 +- media/com_modules/js/admin-modules-modal.js | 2 +- media/com_wrapper/js/iframe-height.js | 11 +- media/com_wrapper/js/iframe-height.min.js | 2 +- .../codemirror/addon/comment/comment.js | 4 - .../codemirror/addon/comment/comment.min.js | 2 +- .../addon/comment/continuecomment.js | 35 +- .../addon/comment/continuecomment.min.js | 2 +- .../editors/codemirror/addon/dialog/dialog.js | 4 + .../codemirror/addon/dialog/dialog.min.js | 2 +- .../codemirror/addon/display/placeholder.js | 1 + .../addon/display/placeholder.min.js | 2 +- .../codemirror/addon/edit/closebrackets.js | 40 +- .../addon/edit/closebrackets.min.js | 2 +- .../editors/codemirror/addon/edit/closetag.js | 16 +- .../codemirror/addon/edit/closetag.min.js | 2 +- .../codemirror/addon/edit/continuelist.js | 48 +- .../codemirror/addon/edit/continuelist.min.js | 2 +- .../codemirror/addon/edit/matchbrackets.js | 43 +- .../addon/edit/matchbrackets.min.js | 2 +- .../editors/codemirror/addon/fold/foldcode.js | 2 + .../codemirror/addon/fold/foldcode.min.js | 2 +- .../codemirror/addon/fold/indent-fold.js | 2 +- .../codemirror/addon/fold/indent-fold.min.js | 2 +- .../editors/codemirror/addon/fold/xml-fold.js | 8 +- .../codemirror/addon/fold/xml-fold.min.js | 2 +- .../codemirror/addon/hint/javascript-hint.js | 8 +- .../addon/hint/javascript-hint.min.js | 2 +- .../codemirror/addon/hint/show-hint.js | 21 +- .../codemirror/addon/hint/show-hint.min.js | 2 +- .../editors/codemirror/addon/hint/sql-hint.js | 54 +- .../codemirror/addon/hint/sql-hint.min.js | 2 +- .../addon/lint/coffeescript-lint.js | 6 + .../addon/lint/coffeescript-lint.min.js | 2 +- .../editors/codemirror/addon/lint/css-lint.js | 11 +- .../codemirror/addon/lint/css-lint.min.js | 2 +- .../codemirror/addon/lint/html-lint.js | 13 +- .../codemirror/addon/lint/html-lint.min.js | 2 +- .../codemirror/addon/lint/javascript-lint.js | 115 +- .../addon/lint/javascript-lint.min.js | 2 +- .../codemirror/addon/lint/json-lint.js | 9 + .../codemirror/addon/lint/json-lint.min.js | 2 +- media/editors/codemirror/addon/lint/lint.js | 18 +- .../editors/codemirror/addon/lint/lint.min.js | 2 +- .../codemirror/addon/lint/yaml-lint.js | 6 + .../codemirror/addon/lint/yaml-lint.min.js | 2 +- .../editors/codemirror/addon/merge/merge.css | 6 + media/editors/codemirror/addon/merge/merge.js | 11 +- .../codemirror/addon/merge/merge.min.css | 2 +- .../codemirror/addon/merge/merge.min.js | 2 +- .../codemirror/addon/mode/multiplex.js | 10 +- .../codemirror/addon/mode/multiplex.min.js | 2 +- media/editors/codemirror/addon/mode/simple.js | 13 +- .../codemirror/addon/mode/simple.min.js | 2 +- .../addon/runmode/runmode-standalone.js | 3 +- .../addon/runmode/runmode-standalone.min.js | 2 +- .../codemirror/addon/runmode/runmode.min.js | 2 +- .../codemirror/addon/runmode/runmode.node.js | 26 +- .../addon/search/match-highlighter.js | 2 +- .../addon/search/match-highlighter.min.js | 2 +- .../editors/codemirror/addon/search/search.js | 6 +- .../codemirror/addon/search/search.min.js | 2 +- .../codemirror/addon/search/searchcursor.js | 408 +- .../addon/search/searchcursor.min.js | 2 +- .../addon/selection/mark-selection.js | 2 +- .../addon/selection/mark-selection.min.js | 2 +- media/editors/codemirror/addon/tern/tern.js | 41 +- .../editors/codemirror/addon/tern/tern.min.js | 2 +- media/editors/codemirror/keymap/emacs.js | 47 +- media/editors/codemirror/keymap/emacs.min.js | 2 +- media/editors/codemirror/keymap/sublime.js | 289 +- .../editors/codemirror/keymap/sublime.min.js | 2 +- media/editors/codemirror/keymap/vim.js | 399 +- media/editors/codemirror/keymap/vim.min.js | 6 +- media/editors/codemirror/lib/addons.js | 5819 ++--------------- media/editors/codemirror/lib/addons.min.js | 6 +- media/editors/codemirror/lib/codemirror.css | 20 +- media/editors/codemirror/lib/codemirror.js | 2125 +++--- .../editors/codemirror/lib/codemirror.min.css | 2 +- .../editors/codemirror/lib/codemirror.min.js | 12 +- .../codemirror/mode/asciiarmor/asciiarmor.js | 1 + .../mode/asciiarmor/asciiarmor.min.js | 2 +- media/editors/codemirror/mode/clike/clike.js | 64 +- .../codemirror/mode/clike/clike.min.js | 2 +- .../mode/coffeescript/coffeescript.js | 4 + .../mode/coffeescript/coffeescript.min.js | 2 +- media/editors/codemirror/mode/css/css.js | 33 +- media/editors/codemirror/mode/css/css.min.js | 2 +- media/editors/codemirror/mode/d/d.js | 2 +- media/editors/codemirror/mode/d/d.min.js | 2 +- media/editors/codemirror/mode/dart/dart.js | 4 +- .../editors/codemirror/mode/dart/dart.min.js | 2 +- .../codemirror/mode/dockerfile/dockerfile.js | 168 +- .../mode/dockerfile/dockerfile.min.js | 2 +- media/editors/codemirror/mode/elm/elm.js | 2 +- media/editors/codemirror/mode/elm/elm.min.js | 2 +- .../editors/codemirror/mode/factor/factor.js | 50 +- .../codemirror/mode/factor/factor.min.js | 2 +- media/editors/codemirror/mode/gfm/gfm.js | 6 +- media/editors/codemirror/mode/gfm/gfm.min.js | 2 +- media/editors/codemirror/mode/go/go.js | 4 +- media/editors/codemirror/mode/go/go.min.js | 2 +- .../editors/codemirror/mode/groovy/groovy.js | 4 +- .../codemirror/mode/groovy/groovy.min.js | 2 +- .../codemirror/mode/haskell/haskell.js | 13 +- .../codemirror/mode/haskell/haskell.min.js | 2 +- media/editors/codemirror/mode/haxe/haxe.js | 2 +- .../editors/codemirror/mode/haxe/haxe.min.js | 2 +- .../mode/htmlembedded/htmlembedded.js | 9 + .../mode/htmlembedded/htmlembedded.min.js | 2 +- .../codemirror/mode/htmlmixed/htmlmixed.js | 4 +- .../mode/htmlmixed/htmlmixed.min.js | 2 +- .../codemirror/mode/javascript/javascript.js | 337 +- .../mode/javascript/javascript.min.js | 2 +- .../editors/codemirror/mode/jinja2/jinja2.js | 2 +- .../codemirror/mode/jinja2/jinja2.min.js | 2 +- media/editors/codemirror/mode/jsx/jsx.js | 2 +- media/editors/codemirror/mode/jsx/jsx.min.js | 2 +- media/editors/codemirror/mode/julia/julia.js | 76 +- .../codemirror/mode/julia/julia.min.js | 2 +- .../codemirror/mode/markdown/markdown.js | 259 +- .../codemirror/mode/markdown/markdown.min.js | 2 +- .../mode/mathematica/mathematica.js | 4 +- .../mode/mathematica/mathematica.min.js | 2 +- media/editors/codemirror/mode/meta.js | 23 +- media/editors/codemirror/mode/meta.min.js | 2 +- media/editors/codemirror/mode/mirc/mirc.js | 2 +- .../editors/codemirror/mode/mirc/mirc.min.js | 2 +- .../editors/codemirror/mode/mllike/mllike.js | 232 +- .../codemirror/mode/mllike/mllike.min.js | 2 +- media/editors/codemirror/mode/nsis/nsis.js | 8 +- .../editors/codemirror/mode/nsis/nsis.min.js | 2 +- .../codemirror/mode/ntriples/ntriples.js | 15 +- .../codemirror/mode/ntriples/ntriples.min.js | 2 +- media/editors/codemirror/mode/php/php.js | 2 +- media/editors/codemirror/mode/php/php.min.js | 2 +- .../codemirror/mode/powershell/powershell.js | 4 +- .../mode/powershell/powershell.min.js | 2 +- .../codemirror/mode/protobuf/protobuf.js | 3 +- .../codemirror/mode/protobuf/protobuf.min.js | 2 +- .../editors/codemirror/mode/python/python.js | 137 +- .../codemirror/mode/python/python.min.js | 2 +- media/editors/codemirror/mode/q/q.js | 14 +- media/editors/codemirror/mode/q/q.min.js | 2 +- media/editors/codemirror/mode/ruby/ruby.js | 3 +- .../editors/codemirror/mode/ruby/ruby.min.js | 2 +- media/editors/codemirror/mode/rust/rust.js | 1 + .../editors/codemirror/mode/rust/rust.min.js | 2 +- media/editors/codemirror/mode/sass/sass.js | 2 +- .../editors/codemirror/mode/sass/sass.min.js | 2 +- .../editors/codemirror/mode/scheme/scheme.js | 2 +- .../codemirror/mode/scheme/scheme.min.js | 2 +- media/editors/codemirror/mode/shell/shell.js | 30 +- .../codemirror/mode/shell/shell.min.js | 2 +- media/editors/codemirror/mode/sieve/sieve.js | 2 +- media/editors/codemirror/mode/solr/solr.js | 4 +- .../editors/codemirror/mode/solr/solr.min.js | 2 +- media/editors/codemirror/mode/soy/soy.js | 78 +- media/editors/codemirror/mode/soy/soy.min.js | 2 +- media/editors/codemirror/mode/sql/sql.js | 116 +- media/editors/codemirror/mode/sql/sql.min.js | 3 +- media/editors/codemirror/mode/stex/stex.js | 12 + .../editors/codemirror/mode/stex/stex.min.js | 2 +- .../editors/codemirror/mode/stylus/stylus.js | 12 +- .../codemirror/mode/stylus/stylus.min.js | 2 +- media/editors/codemirror/mode/swift/swift.js | 13 +- .../codemirror/mode/swift/swift.min.js | 2 +- .../codemirror/mode/textile/textile.js | 2 +- .../codemirror/mode/textile/textile.min.js | 2 +- media/editors/codemirror/mode/tiki/tiki.js | 16 +- .../editors/codemirror/mode/tiki/tiki.min.js | 2 +- media/editors/codemirror/mode/twig/twig.js | 2 +- .../editors/codemirror/mode/twig/twig.min.js | 2 +- media/editors/codemirror/mode/vb/vb.js | 1 - media/editors/codemirror/mode/vb/vb.min.js | 2 +- .../codemirror/mode/velocity/velocity.js | 2 +- .../codemirror/mode/velocity/velocity.min.js | 2 +- .../codemirror/mode/verilog/verilog.js | 4 +- .../codemirror/mode/verilog/verilog.min.js | 2 +- media/editors/codemirror/mode/vue/vue.js | 11 +- media/editors/codemirror/mode/vue/vue.min.js | 2 +- media/editors/codemirror/mode/xml/xml.js | 7 + media/editors/codemirror/mode/xml/xml.min.js | 2 +- .../editors/codemirror/mode/xquery/xquery.js | 57 +- .../codemirror/mode/xquery/xquery.min.js | 2 +- media/editors/codemirror/mode/yacas/yacas.js | 2 +- .../codemirror/mode/yacas/yacas.min.js | 2 +- media/editors/codemirror/mode/yaml/yaml.js | 3 +- .../editors/codemirror/mode/yaml/yaml.min.js | 2 +- media/editors/codemirror/theme/abcdef.css | 2 +- media/editors/codemirror/theme/ambiance.css | 2 +- media/editors/codemirror/theme/cobalt.css | 2 +- media/editors/codemirror/theme/colorforth.css | 2 +- media/editors/codemirror/theme/darcula.css | 34 + media/editors/codemirror/theme/dracula.css | 2 +- .../editors/codemirror/theme/duotone-dark.css | 2 +- .../codemirror/theme/duotone-light.css | 2 +- media/editors/codemirror/theme/eclipse.css | 2 +- .../editors/codemirror/theme/erlang-dark.css | 2 +- .../editors/codemirror/theme/gruvbox-dark.css | 34 + media/editors/codemirror/theme/icecoder.css | 2 +- media/editors/codemirror/theme/idea.css | 31 + .../editors/codemirror/theme/lesser-dark.css | 4 +- media/editors/codemirror/theme/liquibyte.css | 6 +- media/editors/codemirror/theme/lucario.css | 37 + media/editors/codemirror/theme/material.css | 4 +- media/editors/codemirror/theme/mdn-like.css | 2 +- media/editors/codemirror/theme/midnight.css | 2 - media/editors/codemirror/theme/monokai.css | 7 +- media/editors/codemirror/theme/night.css | 2 +- .../editors/codemirror/theme/oceanic-next.css | 44 + .../editors/codemirror/theme/panda-syntax.css | 2 +- .../codemirror/theme/pastel-on-dark.css | 2 +- media/editors/codemirror/theme/rubyblue.css | 2 +- media/editors/codemirror/theme/seti.css | 2 +- media/editors/codemirror/theme/shadowfox.css | 52 + media/editors/codemirror/theme/solarized.css | 3 +- media/editors/codemirror/theme/ssms.css | 16 + media/editors/codemirror/theme/the-matrix.css | 2 +- media/editors/codemirror/theme/ttcn.css | 2 +- media/editors/codemirror/theme/twilight.css | 2 +- .../editors/codemirror/theme/vibrant-ink.css | 2 +- media/editors/codemirror/theme/xq-dark.css | 2 +- media/editors/codemirror/theme/xq-light.css | 2 +- media/editors/codemirror/theme/yeti.css | 2 +- media/editors/none/js/none.js | 2 +- media/editors/tinymce/changelog.txt | 7 + .../tinymce/js/plugins/dragdrop/plugin.js | 2 +- .../tinymce/js/plugins/dragdrop/plugin.min.js | 2 +- media/editors/tinymce/js/tiny-close.js | 2 +- media/editors/tinymce/js/tinymce-builder.js | 4 +- media/editors/tinymce/js/tinymce.js | 2 +- media/editors/tinymce/langs/de.js | 4 +- media/editors/tinymce/langs/it.js | 1 + media/editors/tinymce/langs/lt.js | 257 +- media/editors/tinymce/langs/nl.js | 404 +- media/editors/tinymce/langs/th.js | 61 +- .../tinymce/plugins/advlist/plugin.min.js | 2 +- .../tinymce/plugins/autolink/plugin.min.js | 2 +- .../tinymce/plugins/autoresize/plugin.min.js | 2 +- .../tinymce/plugins/autosave/plugin.min.js | 2 +- .../tinymce/plugins/charmap/plugin.min.js | 2 +- .../tinymce/plugins/codesample/plugin.min.js | 2 +- .../tinymce/plugins/fullpage/plugin.min.js | 2 +- .../tinymce/plugins/fullscreen/plugin.min.js | 2 +- .../tinymce/plugins/image/plugin.min.js | 2 +- .../tinymce/plugins/imagetools/plugin.min.js | 2 +- .../tinymce/plugins/importcss/plugin.min.js | 2 +- .../plugins/insertdatetime/plugin.min.js | 2 +- .../tinymce/plugins/link/plugin.min.js | 2 +- .../tinymce/plugins/lists/plugin.min.js | 2 +- .../tinymce/plugins/media/plugin.min.js | 2 +- .../tinymce/plugins/paste/plugin.min.js | 2 +- .../tinymce/plugins/preview/plugin.min.js | 2 +- .../plugins/searchreplace/plugin.min.js | 2 +- .../plugins/spellchecker/plugin.min.js | 2 +- .../tinymce/plugins/tabfocus/plugin.min.js | 2 +- .../tinymce/plugins/table/plugin.min.js | 4 +- .../tinymce/plugins/template/plugin.min.js | 2 +- .../tinymce/plugins/textcolor/plugin.min.js | 2 +- .../tinymce/plugins/textpattern/plugin.min.js | 2 +- .../editors/tinymce/plugins/toc/plugin.min.js | 2 +- .../tinymce/plugins/visualchars/plugin.min.js | 2 +- .../tinymce/plugins/wordcount/plugin.min.js | 2 +- .../tinymce/skins/lightgray/content.min.css | 2 +- .../tinymce/themes/modern/theme.min.js | 2 +- media/editors/tinymce/tinymce.min.js | 12 +- media/jui/css/bootstrap-extended.css | 7 + media/jui/css/bootstrap-rtl.css | 16 - media/jui/css/bootstrap.css | 6 - media/jui/css/jquery.searchtools.css | 11 - media/jui/css/sortablelist.css | 2 +- media/jui/js/cms-uncompressed.js | 146 +- media/jui/js/cms.js | 2 +- media/jui/js/fielduser.js | 2 +- media/jui/js/jquery.autocomplete.js | 1999 +++--- media/jui/js/jquery.autocomplete.min.js | 16 +- media/jui/js/sortablelist.js | 2 +- media/jui/js/treeselectmenu.jquery.js | 2 +- media/jui/js/treeselectmenu.jquery.min.js | 2 +- media/jui/less/bootstrap-extended.less | 7 + media/jui/less/bootstrap-rtl.less | 15 - media/jui/less/dropdowns.less | 3 +- media/jui/less/forms.less | 26 +- media/jui/less/responsive-767px-max.less | 19 +- media/media/css/medialist-details.css | 2 +- media/media/css/medialist-details_rtl.css | 2 +- media/media/css/medialist-thumbs.css | 2 +- media/media/css/medialist-thumbs_rtl.css | 2 +- media/media/css/mediamanager.css | 2 +- media/media/css/mediamanager_rtl.css | 2 +- media/media/css/popup-imagelist.css | 2 +- media/media/css/popup-imagelist_rtl.css | 2 +- media/media/css/popup-imagemanager.css | 2 +- media/media/css/popup-imagemanager_rtl.css | 2 +- media/media/js/mediafield.js | 10 +- media/media/js/mediafield.min.js | 2 +- media/media/js/mediamanager.js | 2 +- media/media/js/popup-imagemanager.js | 14 +- media/media/js/popup-imagemanager.min.js | 2 +- media/mod_languages/images/de_at.gif | Bin 83 -> 97 bytes media/mod_sampledata/js/sampledata-process.js | 96 + media/overrider/css/overrider.css | 2 +- media/overrider/js/overrider.js | 2 +- media/plg_captcha_recaptcha/js/recaptcha.js | 2 +- .../js/extensionupdatecheck.js | 2 +- .../js/jupdatecheck.js | 2 +- media/plg_system_stats/js/stats.js | 2 +- media/system/css/adminlist.css | 2 +- media/system/css/calendar-jos.css | 2 +- media/system/css/fields/calendar-rtl.css | 7 +- media/system/css/fields/calendar.css | 7 +- media/system/css/frontediting.css | 2 +- media/system/css/mootree.css | 2 +- media/system/css/mootree_rtl.css | 2 +- media/system/css/system.css | 2 +- .../js/associations-edit-uncompressed.js | 2 +- .../system/js/calendar-setup-uncompressed.js | 2 +- media/system/js/caption-uncompressed.js | 2 +- media/system/js/color-field-adv-init.js | 34 +- media/system/js/color-field-adv-init.min.js | 2 +- media/system/js/color-field-init.js | 4 + media/system/js/color-field-init.min.js | 2 +- media/system/js/combobox-uncompressed.js | 2 +- media/system/js/core-uncompressed.js | 183 +- media/system/js/core.js | 2 +- media/system/js/fields/calendar-locales/bn.js | 19 + media/system/js/fields/calendar-locales/cs.js | 2 +- .../date/gregorian/date-helper.js | 5 +- .../date/gregorian/date-helper.min.js | 2 +- .../date/jalali/date-helper.js | 22 +- .../date/jalali/date-helper.min.js | 2 +- media/system/js/fields/calendar-locales/lt.js | 19 + media/system/js/fields/calendar-locales/pt.js | 4 +- media/system/js/fields/calendar-locales/ru.js | 19 + media/system/js/fields/calendar-locales/sk.js | 8 +- .../js/fields/calendar-locales/zh-TW.js | 4 +- media/system/js/fields/calendar.js | 296 +- media/system/js/fields/calendar.min.js | 2 +- media/system/js/frontediting-uncompressed.js | 2 +- media/system/js/helpsite.js | 2 +- media/system/js/highlighter-uncompressed.js | 2 +- media/system/js/html5fallback-uncompressed.js | 2 +- media/system/js/keepalive-uncompressed.js | 16 +- media/system/js/keepalive.js | 2 +- media/system/js/modal-fields-uncompressed.js | 2 +- media/system/js/multiselect-uncompressed.js | 2 +- .../system/js/polyfill.xpath-uncompressed.js | 85 + media/system/js/polyfill.xpath.js | 85 + media/system/js/repeatable-uncompressed.js | 19 +- media/system/js/repeatable.js | 2 +- media/system/js/sendtestmail-uncompressed.js | 2 +- .../js/subform-repeatable-uncompressed.js | 106 +- media/system/js/subform-repeatable.js | 3 +- media/system/js/switcher-uncompressed.js | 2 +- media/system/js/tabs-state-uncompressed.js | 243 + media/system/js/tabs-state.js | 83 +- media/system/js/tabs.js | 2 +- media/system/js/validate-uncompressed.js | 21 +- media/system/js/validate.js | 2 +- modules/mod_articles_archive/helper.php | 20 +- .../mod_articles_archive.php | 2 +- .../mod_articles_archive.xml | 9 +- modules/mod_articles_archive/tmpl/default.php | 2 +- modules/mod_articles_categories/helper.php | 2 +- .../mod_articles_categories.php | 2 +- .../mod_articles_categories.xml | 13 +- .../mod_articles_categories/tmpl/default.php | 2 +- .../tmpl/default_items.php | 11 +- modules/mod_articles_category/helper.php | 22 +- .../mod_articles_category.php | 2 +- .../mod_articles_category.xml | 130 +- .../mod_articles_category/tmpl/default.php | 8 +- modules/mod_articles_latest/helper.php | 11 +- .../mod_articles_latest.php | 2 +- .../mod_articles_latest.xml | 20 +- modules/mod_articles_latest/tmpl/default.php | 2 +- modules/mod_articles_news/helper.php | 22 +- .../mod_articles_news/mod_articles_news.php | 2 +- .../mod_articles_news/mod_articles_news.xml | 47 +- modules/mod_articles_news/tmpl/_item.php | 9 +- modules/mod_articles_news/tmpl/default.php | 2 +- modules/mod_articles_news/tmpl/horizontal.php | 2 +- modules/mod_articles_news/tmpl/vertical.php | 2 +- modules/mod_articles_popular/helper.php | 12 +- .../mod_articles_popular.php | 2 +- .../mod_articles_popular.xml | 29 +- modules/mod_articles_popular/tmpl/default.php | 2 +- modules/mod_banners/helper.php | 2 +- modules/mod_banners/mod_banners.php | 2 +- modules/mod_banners/mod_banners.xml | 24 +- modules/mod_banners/tmpl/default.php | 12 +- modules/mod_breadcrumbs/helper.php | 6 +- modules/mod_breadcrumbs/mod_breadcrumbs.php | 2 +- modules/mod_breadcrumbs/mod_breadcrumbs.xml | 9 +- modules/mod_breadcrumbs/tmpl/default.php | 4 +- modules/mod_custom/mod_custom.php | 2 +- modules/mod_custom/mod_custom.xml | 7 +- modules/mod_custom/tmpl/default.php | 2 +- modules/mod_feed/helper.php | 6 +- modules/mod_feed/mod_feed.php | 2 +- modules/mod_feed/mod_feed.xml | 18 +- modules/mod_feed/tmpl/default.php | 24 +- modules/mod_finder/helper.php | 6 +- modules/mod_finder/mod_finder.php | 8 +- modules/mod_finder/mod_finder.xml | 10 +- modules/mod_finder/tmpl/default.php | 8 +- modules/mod_footer/mod_footer.php | 2 +- modules/mod_footer/mod_footer.xml | 6 +- modules/mod_footer/tmpl/default.php | 2 +- modules/mod_languages/helper.php | 7 +- modules/mod_languages/mod_languages.php | 2 +- modules/mod_languages/mod_languages.xml | 18 +- modules/mod_languages/tmpl/default.php | 24 +- modules/mod_login/helper.php | 7 +- modules/mod_login/mod_login.php | 2 +- modules/mod_login/mod_login.xml | 32 +- modules/mod_login/tmpl/default.php | 10 +- modules/mod_login/tmpl/default_logout.php | 10 +- modules/mod_menu/helper.php | 23 +- modules/mod_menu/mod_menu.php | 4 +- modules/mod_menu/mod_menu.xml | 12 +- modules/mod_menu/tmpl/default.php | 2 +- modules/mod_menu/tmpl/default_component.php | 14 +- modules/mod_menu/tmpl/default_heading.php | 12 +- modules/mod_menu/tmpl/default_separator.php | 12 +- modules/mod_menu/tmpl/default_url.php | 19 +- modules/mod_random_image/helper.php | 17 +- modules/mod_random_image/mod_random_image.php | 2 +- modules/mod_random_image/mod_random_image.xml | 10 +- modules/mod_random_image/tmpl/default.php | 4 +- modules/mod_related_items/helper.php | 8 +- .../mod_related_items/mod_related_items.php | 2 +- .../mod_related_items/mod_related_items.xml | 13 +- modules/mod_related_items/tmpl/default.php | 2 +- modules/mod_search/helper.php | 6 +- modules/mod_search/mod_search.php | 2 +- modules/mod_search/mod_search.xml | 14 +- modules/mod_search/tmpl/default.php | 4 +- modules/mod_stats/helper.php | 63 +- modules/mod_stats/mod_stats.php | 6 +- modules/mod_stats/mod_stats.xml | 15 +- modules/mod_stats/tmpl/default.php | 2 +- modules/mod_syndicate/helper.php | 6 +- modules/mod_syndicate/mod_syndicate.php | 2 +- modules/mod_syndicate/mod_syndicate.xml | 5 +- modules/mod_syndicate/tmpl/default.php | 2 +- modules/mod_tags_popular/helper.php | 14 +- modules/mod_tags_popular/mod_tags_popular.php | 2 +- modules/mod_tags_popular/mod_tags_popular.xml | 22 +- modules/mod_tags_popular/tmpl/cloud.php | 4 +- modules/mod_tags_popular/tmpl/default.php | 4 +- modules/mod_tags_similar/helper.php | 56 +- modules/mod_tags_similar/mod_tags_similar.php | 2 +- modules/mod_tags_similar/mod_tags_similar.xml | 7 +- modules/mod_tags_similar/tmpl/default.php | 18 +- modules/mod_users_latest/helper.php | 9 +- modules/mod_users_latest/mod_users_latest.php | 3 +- modules/mod_users_latest/mod_users_latest.xml | 13 +- modules/mod_users_latest/tmpl/default.php | 2 +- modules/mod_whosonline/helper.php | 2 +- modules/mod_whosonline/mod_whosonline.php | 3 +- modules/mod_whosonline/mod_whosonline.xml | 8 +- modules/mod_whosonline/tmpl/default.php | 4 +- modules/mod_wrapper/helper.php | 12 +- modules/mod_wrapper/mod_wrapper.php | 4 +- modules/mod_wrapper/mod_wrapper.xml | 13 +- modules/mod_wrapper/tmpl/default.php | 5 +- phpunit.xml.dist | 5 +- plugins/authentication/cookie/cookie.php | 44 +- plugins/authentication/cookie/cookie.xml | 13 +- plugins/authentication/gmail/gmail.php | 23 +- plugins/authentication/gmail/gmail.xml | 12 +- plugins/authentication/joomla/joomla.php | 7 +- plugins/authentication/joomla/joomla.xml | 2 +- plugins/authentication/ldap/ldap.php | 67 +- plugins/authentication/ldap/ldap.xml | 23 +- .../captcha/recaptcha/postinstall/actions.php | 57 + plugins/captcha/recaptcha/recaptcha.php | 12 +- plugins/captcha/recaptcha/recaptcha.xml | 7 +- plugins/captcha/recaptcha/recaptchalib.php | 36 +- plugins/content/contact/contact.php | 6 +- plugins/content/contact/contact.xml | 2 +- plugins/content/emailcloak/emailcloak.php | 6 +- plugins/content/emailcloak/emailcloak.xml | 10 +- plugins/content/fields/fields.php | 160 +- plugins/content/fields/fields.xml | 2 +- plugins/content/finder/finder.php | 2 +- plugins/content/finder/finder.xml | 2 +- plugins/content/joomla/joomla.php | 2 +- plugins/content/joomla/joomla.xml | 9 +- plugins/content/loadmodule/loadmodule.php | 2 +- plugins/content/loadmodule/loadmodule.xml | 2 +- plugins/content/pagebreak/pagebreak.php | 35 +- plugins/content/pagebreak/pagebreak.xml | 7 +- .../content/pagenavigation/pagenavigation.php | 17 +- .../content/pagenavigation/pagenavigation.xml | 5 +- .../content/pagenavigation/tmpl/default.php | 10 +- plugins/content/vote/tmpl/rating.php | 10 +- plugins/content/vote/tmpl/vote.php | 4 +- plugins/content/vote/vote.php | 2 +- plugins/content/vote/vote.xml | 8 +- plugins/editors-xtd/article/article.php | 40 +- plugins/editors-xtd/article/article.xml | 2 +- plugins/editors-xtd/contact/contact.php | 2 +- plugins/editors-xtd/contact/contact.xml | 2 +- plugins/editors-xtd/fields/fields.php | 8 +- plugins/editors-xtd/fields/fields.xml | 2 +- plugins/editors-xtd/image/image.php | 6 +- plugins/editors-xtd/image/image.xml | 2 +- plugins/editors-xtd/menu/menu.php | 2 +- plugins/editors-xtd/menu/menu.xml | 2 +- plugins/editors-xtd/module/module.php | 2 +- plugins/editors-xtd/module/module.xml | 2 +- plugins/editors-xtd/pagebreak/pagebreak.php | 43 +- plugins/editors-xtd/pagebreak/pagebreak.xml | 2 +- plugins/editors-xtd/readmore/readmore.php | 2 +- plugins/editors-xtd/readmore/readmore.xml | 2 +- plugins/editors/codemirror/codemirror.php | 57 +- plugins/editors/codemirror/codemirror.xml | 95 +- plugins/editors/codemirror/fonts.json | 48 +- plugins/editors/codemirror/fonts.php | 2 +- .../layouts/editors/codemirror/element.php | 22 +- .../layouts/editors/codemirror/init.php | 73 +- .../layouts/editors/codemirror/styles.php | 2 +- plugins/editors/none/none.php | 2 +- plugins/editors/none/none.xml | 2 +- plugins/editors/tinymce/field/skins.php | 4 +- .../editors/tinymce/field/tinymcebuilder.php | 2 +- plugins/editors/tinymce/field/uploaddirs.php | 4 +- plugins/editors/tinymce/form/setoptions.xml | 374 +- plugins/editors/tinymce/tinymce.php | 96 +- plugins/editors/tinymce/tinymce.xml | 18 +- plugins/extension/joomla/joomla.php | 6 +- plugins/extension/joomla/joomla.xml | 2 +- plugins/fields/calendar/calendar.php | 2 +- plugins/fields/calendar/calendar.xml | 2 +- plugins/fields/calendar/params/calendar.xml | 4 +- plugins/fields/calendar/tmpl/calendar.php | 2 +- plugins/fields/checkboxes/checkboxes.php | 2 +- plugins/fields/checkboxes/checkboxes.xml | 18 +- .../fields/checkboxes/params/checkboxes.xml | 14 +- plugins/fields/checkboxes/tmpl/checkboxes.php | 2 +- plugins/fields/color/color.php | 2 +- plugins/fields/color/color.xml | 2 +- plugins/fields/color/tmpl/color.php | 2 +- plugins/fields/editor/editor.php | 4 +- plugins/fields/editor/editor.xml | 24 +- plugins/fields/editor/params/editor.xml | 12 +- plugins/fields/editor/tmpl/editor.php | 4 +- plugins/fields/imagelist/imagelist.php | 2 +- plugins/fields/imagelist/imagelist.xml | 20 +- plugins/fields/imagelist/params/imagelist.xml | 9 +- plugins/fields/imagelist/tmpl/imagelist.php | 35 +- plugins/fields/integer/integer.php | 2 +- plugins/fields/integer/integer.xml | 27 +- plugins/fields/integer/params/integer.xml | 6 +- plugins/fields/integer/tmpl/integer.php | 10 +- plugins/fields/list/list.php | 2 +- plugins/fields/list/list.xml | 26 +- plugins/fields/list/params/list.xml | 18 +- plugins/fields/list/tmpl/list.php | 2 +- plugins/fields/media/media.php | 2 +- plugins/fields/media/media.xml | 16 +- plugins/fields/media/params/media.xml | 6 +- plugins/fields/media/tmpl/media.php | 22 +- plugins/fields/radio/params/radio.xml | 14 +- plugins/fields/radio/radio.php | 2 +- plugins/fields/radio/radio.xml | 18 +- plugins/fields/radio/tmpl/radio.php | 2 +- plugins/fields/sql/params/sql.xml | 5 +- plugins/fields/sql/sql.php | 3 +- plugins/fields/sql/sql.xml | 13 +- plugins/fields/sql/tmpl/sql.php | 2 +- plugins/fields/text/params/text.xml | 9 +- plugins/fields/text/text.php | 2 +- plugins/fields/text/text.xml | 13 +- plugins/fields/text/tmpl/text.php | 2 +- plugins/fields/textarea/params/textarea.xml | 16 +- plugins/fields/textarea/textarea.php | 2 +- plugins/fields/textarea/textarea.xml | 24 +- plugins/fields/textarea/tmpl/textarea.php | 4 +- plugins/fields/url/params/url.xml | 8 +- plugins/fields/url/tmpl/url.php | 10 +- plugins/fields/url/url.php | 2 +- plugins/fields/url/url.xml | 16 +- plugins/fields/user/params/user.xml | 6 + plugins/fields/user/tmpl/user.php | 2 +- plugins/fields/user/user.php | 2 +- plugins/fields/user/user.xml | 2 +- .../usergrouplist/params/usergrouplist.xml | 3 +- .../usergrouplist/tmpl/usergrouplist.php | 2 +- .../fields/usergrouplist/usergrouplist.php | 2 +- .../fields/usergrouplist/usergrouplist.xml | 23 +- plugins/finder/categories/categories.php | 8 +- plugins/finder/categories/categories.xml | 2 +- plugins/finder/contacts/contacts.php | 7 +- plugins/finder/contacts/contacts.xml | 2 +- plugins/finder/content/content.php | 12 +- plugins/finder/content/content.xml | 2 +- plugins/finder/newsfeeds/newsfeeds.php | 6 +- plugins/finder/newsfeeds/newsfeeds.xml | 2 +- plugins/finder/tags/tags.php | 11 +- plugins/finder/tags/tags.xml | 2 +- .../folderinstaller/folderinstaller.php | 2 +- .../folderinstaller/folderinstaller.xml | 2 +- .../folderinstaller/tmpl/default.php | 2 +- .../packageinstaller/packageinstaller.php | 2 +- .../packageinstaller/packageinstaller.xml | 2 +- .../packageinstaller/tmpl/default.php | 2 +- .../installer/urlinstaller/tmpl/default.php | 2 +- .../installer/urlinstaller/urlinstaller.php | 2 +- .../installer/urlinstaller/urlinstaller.xml | 2 +- .../extensionupdate/extensionupdate.php | 4 +- .../extensionupdate/extensionupdate.xml | 5 +- .../quickicon/joomlaupdate/joomlaupdate.php | 4 +- .../quickicon/joomlaupdate/joomlaupdate.xml | 2 +- .../phpversioncheck/phpversioncheck.php | 19 +- .../phpversioncheck/phpversioncheck.xml | 2 +- plugins/sampledata/blog/blog.php | 1068 +++ plugins/sampledata/blog/blog.xml | 23 + plugins/search/categories/categories.php | 12 +- plugins/search/categories/categories.xml | 7 +- plugins/search/contacts/contacts.php | 11 +- plugins/search/contacts/contacts.xml | 7 +- plugins/search/content/content.php | 187 +- plugins/search/content/content.xml | 11 +- plugins/search/newsfeeds/newsfeeds.php | 11 +- plugins/search/newsfeeds/newsfeeds.xml | 7 +- plugins/search/tags/tags.php | 17 +- plugins/search/tags/tags.xml | 6 +- plugins/system/cache/cache.php | 93 +- plugins/system/cache/cache.xml | 6 +- plugins/system/debug/debug.php | 292 +- plugins/system/debug/debug.xml | 33 +- plugins/system/fields/fields.php | 143 +- plugins/system/fields/fields.xml | 2 +- plugins/system/highlight/highlight.php | 4 +- plugins/system/highlight/highlight.xml | 2 +- .../en-GB/en-GB.plg_system_languagecode.ini | 2 +- .../en-GB.plg_system_languagecode.sys.ini | 2 +- plugins/system/languagecode/languagecode.php | 14 +- plugins/system/languagecode/languagecode.xml | 2 +- .../system/languagefilter/languagefilter.php | 110 +- .../system/languagefilter/languagefilter.xml | 9 +- plugins/system/log/log.php | 13 +- plugins/system/log/log.xml | 3 +- plugins/system/logout/logout.php | 42 +- plugins/system/logout/logout.xml | 2 +- plugins/system/p3p/p3p.php | 4 +- plugins/system/p3p/p3p.xml | 2 +- plugins/system/redirect/form/excludes.xml | 19 + plugins/system/redirect/redirect.php | 124 +- plugins/system/redirect/redirect.xml | 24 +- plugins/system/remember/remember.php | 53 +- plugins/system/remember/remember.xml | 2 +- plugins/system/sef/sef.php | 29 +- plugins/system/sef/sef.xml | 2 +- plugins/system/sessiongc/sessiongc.php | 78 + plugins/system/sessiongc/sessiongc.xml | 74 + plugins/system/stats/field/base.php | 2 +- plugins/system/stats/field/data.php | 2 +- plugins/system/stats/field/uniqueid.php | 2 +- plugins/system/stats/layouts/field/data.php | 2 +- .../system/stats/layouts/field/uniqueid.php | 2 +- plugins/system/stats/layouts/message.php | 2 +- plugins/system/stats/layouts/stats.php | 2 +- plugins/system/stats/stats.php | 13 +- plugins/system/stats/stats.xml | 19 +- .../postinstall/updatecachetime.php | 6 +- .../updatenotification/updatenotification.php | 25 +- .../updatenotification/updatenotification.xml | 2 +- .../totp/postinstall/actions.php | 4 +- plugins/twofactorauth/totp/tmpl/form.php | 2 +- plugins/twofactorauth/totp/totp.php | 20 +- plugins/twofactorauth/totp/totp.xml | 3 +- plugins/twofactorauth/yubikey/tmpl/form.php | 2 +- plugins/twofactorauth/yubikey/yubikey.php | 18 +- plugins/twofactorauth/yubikey/yubikey.xml | 3 +- .../user/contactcreator/contactcreator.php | 4 +- .../user/contactcreator/contactcreator.xml | 4 +- plugins/user/joomla/joomla.php | 159 +- plugins/user/joomla/joomla.xml | 2 +- plugins/user/profile/field/dob.php | 4 +- plugins/user/profile/field/tos.php | 57 +- plugins/user/profile/profile.php | 64 +- plugins/user/profile/profile.xml | 52 +- plugins/user/profile/profiles/profile.xml | 1 + templates/beez3/component.php | 2 +- templates/beez3/css/ie7only.css | 2 +- templates/beez3/css/ieonly.css | 2 +- templates/beez3/css/layout.css | 2 +- templates/beez3/css/position.css | 2 +- templates/beez3/css/print.css | 2 +- templates/beez3/css/template.css | 2 +- templates/beez3/css/template_rtl.css | 2 +- templates/beez3/error.php | 17 +- .../html/com_contact/categories/default.php | 2 +- .../com_contact/categories/default_items.php | 8 +- .../html/com_contact/category/default.php | 6 +- .../com_contact/category/default_children.php | 20 +- .../com_contact/category/default_items.php | 2 +- .../html/com_contact/contact/default.php | 19 +- .../com_contact/contact/default_address.php | 6 +- .../com_contact/contact/default_articles.php | 2 +- .../html/com_contact/contact/default_form.php | 50 +- .../com_contact/contact/default_links.php | 4 +- .../com_contact/contact/default_profile.php | 2 +- .../contact/default_user_custom_fields.php | 4 +- .../html/com_contact/contact/encyclopedia.php | 2 +- .../html/com_content/archive/default.php | 2 +- .../com_content/archive/default_items.php | 11 +- .../html/com_content/article/default.php | 53 +- .../com_content/article/default_links.php | 4 +- .../html/com_content/categories/default.php | 2 +- .../com_content/categories/default_items.php | 8 +- .../beez3/html/com_content/category/blog.php | 19 +- .../com_content/category/blog_children.php | 100 +- .../html/com_content/category/blog_item.php | 32 +- .../html/com_content/category/blog_links.php | 20 +- .../html/com_content/category/default.php | 44 +- .../com_content/category/default_articles.php | 7 +- .../com_content/category/default_children.php | 94 +- .../html/com_content/featured/default.php | 4 +- .../com_content/featured/default_item.php | 38 +- .../com_content/featured/default_links.php | 2 +- .../beez3/html/com_content/form/edit.php | 8 +- .../html/com_newsfeeds/categories/default.php | 44 +- .../categories/default_items.php | 10 +- .../html/com_newsfeeds/category/default.php | 6 +- .../category/default_children.php | 22 +- .../com_newsfeeds/category/default_items.php | 44 +- .../html/com_weblinks/categories/default.php | 2 +- .../com_weblinks/categories/default_items.php | 14 +- .../html/com_weblinks/category/default.php | 6 +- .../category/default_children.php | 24 +- .../com_weblinks/category/default_items.php | 2 +- .../beez3/html/com_weblinks/form/edit.php | 8 +- .../html/layouts/joomla/system/message.php | 2 +- .../beez3/html/mod_breadcrumbs/default.php | 8 +- .../beez3/html/mod_languages/default.php | 4 +- templates/beez3/html/mod_login/default.php | 2 +- .../beez3/html/mod_login/default_logout.php | 4 +- templates/beez3/html/modules.php | 14 +- templates/beez3/index.php | 4 +- templates/beez3/javascript/template.js | 15 +- templates/beez3/jsstrings.php | 2 +- .../beez3/language/en-GB/en-GB.tpl_beez3.ini | 2 +- .../language/en-GB/en-GB.tpl_beez3.sys.ini | 2 +- templates/beez3/templateDetails.xml | 80 +- templates/protostar/component.php | 4 +- templates/protostar/css/offline.css | 2 +- templates/protostar/css/template.css | 93 +- templates/protostar/error.php | 26 +- .../com_media/imageslist/default_folder.php | 6 +- .../com_media/imageslist/default_image.php | 8 +- .../joomla/form/field/contenthistory.php | 4 +- .../html/layouts/joomla/form/field/media.php | 4 +- .../html/layouts/joomla/form/field/user.php | 2 +- .../html/layouts/joomla/system/message.php | 2 +- templates/protostar/html/modules.php | 8 +- templates/protostar/html/pagination.php | 61 +- templates/protostar/index.php | 24 +- templates/protostar/js/classes.js | 14 +- templates/protostar/js/template.js | 104 +- .../language/en-GB/en-GB.tpl_protostar.ini | 2 +- .../en-GB/en-GB.tpl_protostar.sys.ini | 2 +- templates/protostar/less/template.less | 17 +- templates/protostar/offline.php | 12 +- templates/protostar/templateDetails.xml | 72 +- templates/system/component.php | 2 +- templates/system/css/editor.css | 2 +- templates/system/css/error.css | 2 +- templates/system/css/error_rtl.css | 2 +- templates/system/css/general.css | 2 +- templates/system/css/offline.css | 2 +- templates/system/css/offline_rtl.css | 2 +- templates/system/css/system.css | 2 +- templates/system/css/toolbar.css | 2 +- templates/system/error.php | 14 +- templates/system/html/modules.php | 14 +- templates/system/index.php | 2 +- templates/system/offline.php | 2 +- tests/codeception/README.md | 70 + tests/codeception/_bootstrap.php | 3 + tests/codeception/_data/dump.sql | 1 + .../codeception/_support/AcceptanceTester.php | 61 + .../codeception/_support/FunctionalTester.php | 37 + .../_support/Helper/Acceptance.php | 49 + .../_support/Helper/Functional.php | 23 + .../codeception/_support/Helper/JoomlaDb.php | 162 + tests/codeception/_support/Helper/Unit.php | 23 + .../Acceptance/Administrator/AdminPage.php | 409 ++ .../Administrator/UserManagerPage.php | 196 + .../Page/Acceptance/Site/FrontPage.php | 44 + .../_support/Shared/UserCredentials.php | 50 + tests/codeception/_support/UnitTester.php | 37 + tests/codeception/acceptance.suite.dist.yml | 34 + tests/codeception/acceptance/_bootstrap.php | 5 + .../components/com_users/UserCest.php | 109 + .../components/com_users/UserCest.php | 19 + .../acceptance/install/InstallCest.php | 34 + tests/codeception/composer.json | 30 + tests/codeception/composer.lock | 3394 ++++++++++ tests/codeception/functional.suite.yml | 11 + tests/codeception/functional/_bootstrap.php | 3 + tests/codeception/travis-ci-apache.conf | 26 + tests/codeception/unit.suite.yml | 9 + tests/javascript/calendar/spec-setup.js | 2 +- tests/javascript/calendar/spec.js | 8 +- tests/javascript/caption/spec-setup.js | 2 +- tests/javascript/caption/spec.js | 2 +- tests/javascript/combobox/spec-setup.js | 2 +- tests/javascript/combobox/spec.js | 2 +- tests/javascript/core/spec-setup.js | 2 +- tests/javascript/core/spec.js | 8 +- tests/javascript/highlighter/spec-setup.js | 2 +- tests/javascript/highlighter/spec.js | 2 +- tests/javascript/permissions/spec-setup.js | 2 +- tests/javascript/permissions/spec.js | 2 +- tests/javascript/repeatable/spec-setup.js | 2 +- tests/javascript/repeatable/spec.js | 2 +- tests/javascript/sendtestmail/spec-setup.js | 2 +- tests/javascript/sendtestmail/spec.js | 2 +- .../subform-repeatable/fixtures/fixture.html | 16 +- .../subform-repeatable/spec-setup.js | 2 +- tests/javascript/subform-repeatable/spec.js | 32 +- tests/javascript/switcher/spec-setup.js | 2 +- tests/javascript/switcher/spec.js | 2 +- tests/javascript/validate/spec-setup.js | 2 +- tests/javascript/validate/spec.js | 2 +- tests/unit/bootstrap.php | 4 +- tests/unit/core/case/cache.php | 4 +- tests/unit/core/case/case.php | 4 +- tests/unit/core/case/database.php | 4 +- tests/unit/core/case/database/mysql.php | 4 +- tests/unit/core/case/database/mysqli.php | 4 +- tests/unit/core/case/database/oracle.php | 4 +- tests/unit/core/case/database/pdomysql.php | 4 +- tests/unit/core/case/database/postgresql.php | 4 +- tests/unit/core/case/database/sqlsrv.php | 4 +- tests/unit/core/helper.php | 15 +- tests/unit/core/mock/application.php | 4 +- tests/unit/core/mock/application/base.php | 4 +- tests/unit/core/mock/application/cli.php | 4 +- tests/unit/core/mock/application/cms.php | 4 +- tests/unit/core/mock/application/web.php | 4 +- tests/unit/core/mock/cache.php | 4 +- tests/unit/core/mock/config.php | 4 +- tests/unit/core/mock/controller.php | 4 +- tests/unit/core/mock/database/driver.php | 4 +- tests/unit/core/mock/database/query.php | 4 +- tests/unit/core/mock/dispatcher.php | 5 +- tests/unit/core/mock/document.php | 4 +- tests/unit/core/mock/input.php | 4 +- tests/unit/core/mock/language.php | 4 +- tests/unit/core/mock/menu.php | 4 +- tests/unit/core/mock/rules.php | 4 +- tests/unit/core/mock/session.php | 11 +- tests/unit/core/reflection.php | 4 +- tests/unit/schema/ddl.sql | 79 +- tests/unit/schema/sqlsrv.sql | 2 +- .../unit/stubs/DummyNamespace/DummyClass.php | 29 + tests/unit/stubs/FormInspectors.php | 4 +- tests/unit/stubs/bogusload.php | 4 +- tests/unit/stubs/config.wrongclass.php | 4 +- tests/unit/stubs/configuration.php | 4 +- tests/unit/stubs/database/jos_categories.csv | 4 +- tests/unit/stubs/database/jos_content.csv | 80 +- tests/unit/stubs/database/jos_extensions.csv | 244 +- .../unit/stubs/database/jos_finder_links.csv | 22 +- .../unit/stubs/database/jos_finder_terms.csv | 10 +- tests/unit/stubs/database/jos_menu.csv | 4 +- tests/unit/stubs/database/jos_modules.csv | 4 +- tests/unit/stubs/database/jos_ucm_content.csv | 78 +- .../unit/stubs/database/jos_update_sites.csv | 4 +- tests/unit/stubs/database/jos_users.csv | 11 +- tests/unit/stubs/discover2/challenger.php | 4 +- tests/unit/stubs/discover2/endeavour.php | 6 +- tests/unit/stubs/jhttp_stub.php | 4 +- tests/unit/stubs/loader/patch.php | 4 +- tests/unit/stubs/loader/patch/tester.php | 4 +- tests/unit/stubs/loader/tester/tester.php | 4 +- .../loaderoveralias/jloaderaliasstub.php | 11 + .../stubs/loaderoverride/aliasnewclass.php | 15 + .../loaderoverride/aliasoverrideclass.php | 15 + .../stubs/loaderoverride/originalnewclass.php | 15 + .../loaderoverride/originaloverrideclass.php | 15 + .../includes/JAdministratorHelperTest.php | 13 +- .../driver/mysql/JDatabaseDriverMysqlTest.php | 31 +- .../mysql/JDatabaseExporterMysqlTest.php | 66 +- .../mysql/JDatabaseImporterMysqlTest.php | 139 +- .../mysql/JDatabaseIteratorMysqlTest.php | 4 +- .../mysqli/JDatabaseDriverMysqliTest.php | 31 +- .../mysqli/JDatabaseExporterMysqliTest.php | 67 +- .../mysqli/JDatabaseImporterMysqliTest.php | 71 +- .../mysqli/JDatabaseIteratorMysqliTest.php | 4 +- .../mysqli/JDatabaseQueryMysqliTest.php | 12 +- .../pdomysql/JDatabaseDriverPdomysqlTest.php | 26 +- .../JDatabaseExporterPdomysqlTest.php | 63 +- .../JDatabaseImporterPdomysqlTest.php | 72 +- .../JDatabaseIteratorPdomysqlTest.php | 4 +- .../JDatabaseDriverPostgresqlTest.php | 117 +- .../JDatabaseExporterPostgresqlTest.php | 17 +- .../JDatabaseImporterPostgresqlTest.php | 126 +- .../JDatabaseIteratorPostgresqlTest.php | 6 +- .../JDatabaseQueryPostgresqlTest.php | 9 +- .../sqlite/JDatabaseQuerySqliteTest.php | 7 +- .../sqlsrv/JDatabaseDriverSqlsrvTest.php | 6 +- .../sqlsrv/JDatabaseIteratorSqlsrvTest.php | 4 +- .../sqlsrv/JDatabaseQuerySqlsrvTest.php | 43 +- .../finderIndexer/FinderIndexerHelperTest.php | 17 +- .../finderIndexer/FinderIndexerParserTest.php | 6 +- .../finderIndexer/FinderIndexerResultTest.php | 18 +- .../FinderIndexerStemmerTest.php | 6 +- .../finderIndexer/FinderIndexerTest.php | 11 +- .../finderIndexer/FinderIndexerTokenTest.php | 5 +- .../parser/FinderIndexerParserHtmlTest.php | 12 +- .../parser/FinderIndexerParserRtfTest.php | 6 +- .../stemmer/FinderIndexerStemmerFrTest.php | 7 +- .../FinderIndexerStemmerPorter_EnTest.php | 7 +- .../JApplicationAdministratorTest.php | 20 +- .../cms/application/JApplicationCmsTest.php | 72 +- .../cms/application/JApplicationSiteTest.php | 26 +- .../stubs/JApplicationCmsInspector.php | 4 +- .../stubs/JApplicationHelperInspector.php | 4 +- .../cms/component/JComponentHelperTest.php | 4 +- .../router/JComponentRouterBaseTest.php | 11 +- .../router/JComponentRouterLegacyTest.php | 4 +- .../router/JComponentRouterViewTest.php | 12 +- .../JComponentRouterViewconfigurationTest.php | 7 +- .../rules/JComponentRouterRulesMenuTest.php | 99 +- .../rules/JComponentRouterRulesNomenuTest.php | 10 +- .../JComponentRouterRulesStandardTest.php | 39 +- .../JComponentRouterRulesMenuInspector.php | 12 +- .../JComponentRouterRulesNomenuInspector.php | 10 +- ...ockJComponentRouterRulesMenuMenuObject.php | 162 +- .../router/stubs/ComContentRouter.php | 3 +- .../router/stubs/JCategoriesMock.php | 4 +- .../stubs/JComponentRouterBaseInspector.php | 12 +- .../stubs/JComponentRouterViewInspector.php | 58 +- .../router/stubs/componentrouter.php | 6 +- .../router/stubs/componentrouterrule.php | 78 +- .../libraries/cms/editor/JEditorTest.php | 4 +- .../cms/editor/stubs/EditorObserver.php | 4 +- .../libraries/cms/error/JErrorPageTest.php | 6 +- .../form/field/JFormFieldHeadertagTest.php | 4 +- .../cms/form/field/JFormFieldHelpsiteTest.php | 4 +- .../form/field/JFormFieldModuletagTest.php | 4 +- .../cms/form/rule/JFormRuleNotequalsTest.php | 4 +- .../suites/libraries/cms/help/JHelpTest.php | 4 +- .../cms/helper/JHelperContentTest.php | 10 +- .../libraries/cms/helper/JHelperMediaTest.php | 9 +- .../libraries/cms/helper/JHelperTest.php | 7 +- .../libraries/cms/html/JHtmlBatchTest.php | 4 +- .../libraries/cms/html/JHtmlBehaviorTest.php | 4 +- .../libraries/cms/html/JHtmlBootstrapTest.php | 10 +- .../libraries/cms/html/JHtmlDateTest.php | 4 +- .../libraries/cms/html/JHtmlDebugTest.php | 4 +- .../libraries/cms/html/JHtmlEmailTest.php | 4 +- .../libraries/cms/html/JHtmlFormTest.php | 24 +- .../cms/html/JHtmlFormbehaviorTest.php | 4 +- .../libraries/cms/html/JHtmlIconsTest.php | 4 +- .../libraries/cms/html/JHtmlJqueryTest.php | 23 +- .../libraries/cms/html/JHtmlListTest.php | 4 +- .../libraries/cms/html/JHtmlMenuTest.php | 10 +- .../libraries/cms/html/JHtmlNumberTest.php | 4 +- .../libraries/cms/html/JHtmlSelectTest.php | 4 +- .../libraries/cms/html/JHtmlStringTest.php | 10 +- .../libraries/cms/html/JHtmlTelTest.php | 4 +- .../suites/libraries/cms/html/JHtmlTest.php | 69 +- .../libraries/cms/html/JHtmlUserTest.php | 4 +- .../JHtmlSelect-helper-dataset.php | 4 +- .../cms/html/stubs/JHtmlBehaviorInspector.php | 6 +- .../html/stubs/JHtmlBootstrapInspector.php | 4 +- .../cms/html/stubs/JHtmlJqueryInspector.php | 4 +- .../libraries/cms/html/testfiles/empty.php | 4 +- .../cms/html/testfiles/inspector.php | 4 +- .../cms/installer/JInstallerAdapterTest.php | 186 +- .../cms/installer/JInstallerExtensionTest.php | 4 +- .../cms/installer/JInstallerHelperTest.php | 6 +- .../cms/installer/JInstallerTest.php | 8 +- .../libraries/cms/installer/data/joomla.xml | 4 +- .../cms/installer/data/mod_finder.xml | 129 +- .../cms/installer/data/pkg_joomla.xml | 4 +- .../JInstallerManifestLibraryTest.php | 6 +- .../JInstallerManifestPackageTest.php | 6 +- .../cms/language/JLanguageMultilangTest.php | 4 +- .../libraries/cms/layout/JLayoutBaseTest.php | 4 +- .../libraries/cms/layout/JLayoutFileTest.php | 4 +- .../cms/module/JModuleHelperTest.php | 4 +- .../cms/pagination/JPaginationObjectTest.php | 14 +- .../cms/pagination/JPaginationTest.php | 12 +- .../libraries/cms/pathway/JPathwayTest.php | 4 +- .../cms/pathway/stubs/includes/pathway.php | 4 +- .../cms/plugin/JPluginHelperTest.php | 6 +- .../libraries/cms/plugin/JPluginTest.php | 6 +- .../cms/plugin/stubs/PlgSystemBase.php | 4 +- .../cms/plugin/stubs/PlgSystemJoomla.php | 4 +- .../cms/plugin/stubs/PlgSystemPrivate.php | 4 +- .../cms/response/JResponseJsonTest.php | 4 +- .../cms/response/stubs/mock.application.php | 4 +- .../cms/router/JRouterAdministratorTest.php | 7 +- .../libraries/cms/router/JRouterSiteTest.php | 18 +- .../libraries/cms/router/JRouterTest.php | 19 +- .../libraries/cms/router/data/TestRouter.php | 4 +- .../cms/router/data/includes/router.php | 2 +- .../cms/schema/JSchemaChangeitemTest.php | 4 +- .../cms/schema/JSchemaChangesetTestMysql.php | 4 +- .../cms/schema/JSchemaChangesetTestMysqli.php | 4 +- .../schema/JSchemaChangesetTestPdomysql.php | 4 +- .../schema/JSchemaChangesetTestPostgresql.php | 4 +- .../cms/schema/JSchemaChangesetTestSqlsrv.php | 4 +- .../cms/schema/stubs/mysql/3.0.0.sql | 12 +- .../cms/schema/stubs/mysql/3.2.0.sql | 10 +- .../cms/schema/stubs/postgresql/3.2.0.sql | 10 +- .../cms/table/JTableContenttypeTest.php | 4 +- .../cms/table/JTableCorecontentTest.php | 4 +- .../cms/toolbar/JToolbarButtonTest.php | 14 +- .../libraries/cms/toolbar/JToolbarTest.php | 6 +- .../button/JToolbarButtonConfirmTest.php | 10 +- .../button/JToolbarButtonCustomTest.php | 7 +- .../toolbar/button/JToolbarButtonHelpTest.php | 10 +- .../toolbar/button/JToolbarButtonLinkTest.php | 9 +- .../button/JToolbarButtonPopupTest.php | 7 +- .../button/JToolbarButtonSliderTest.php | 7 +- .../button/JToolbarButtonStandardTest.php | 7 +- .../suites/libraries/cms/ucm/JUcmBaseTest.php | 4 +- .../libraries/cms/ucm/JUcmContentTest.php | 4 +- .../suites/libraries/cms/ucm/JUcmTypeTest.php | 4 +- .../libraries/cms/version/JVersionTest.php | 4 +- .../suites/libraries/joomla/JFactoryTest.php | 2 +- .../suites/libraries/joomla/JLoaderTest.php | 238 +- .../suites/libraries/joomla/JPlatformTest.php | 8 +- .../joomla/access/JAccessRuleTest.php | 34 +- .../joomla/access/JAccessRulesTest.php | 60 +- .../libraries/joomla/access/JAccessTest.php | 100 +- .../application/JApplicationBaseTest.php | 6 +- .../application/JApplicationCliTest.php | 4 +- .../application/JApplicationDaemonTest.php | 4 +- .../application/JApplicationWebTest.php | 155 +- .../stubs/JApplicationCliInspector.php | 4 +- .../stubs/JApplicationDaemonInspector.php | 10 +- .../stubs/JApplicationWebInspector.php | 4 +- .../web/JApplicationWebRouterTest.php | 4 +- .../router/JApplicationWebRouterBaseTest.php | 7 +- .../router/JApplicationWebRouterRestTest.php | 6 +- .../web/stubs/JWebClientInspector.php | 4 +- .../application/web/stubs/controllers/bar.php | 4 +- .../application/web/stubs/controllers/baz.php | 4 +- .../application/web/stubs/controllers/foo.php | 4 +- .../joomla/archive/JArchiveBzip2Test.php | 4 +- .../joomla/archive/JArchiveGzipTest.php | 4 +- .../joomla/archive/JArchiveTarTest.php | 4 +- .../libraries/joomla/archive/JArchiveTest.php | 9 +- .../joomla/archive/JArchiveTestCase.php | 10 +- .../joomla/archive/JArchiveZipTest.php | 4 +- .../joomla/base/JAdapterInstanceTest.php | 4 +- .../libraries/joomla/base/JAdapterTest.php | 4 +- .../joomla/base/stubs/testadapter.php | 4 +- .../joomla/base/stubs/testadapter2.php | 4 +- .../joomla/base/stubs/testadapter3.php | 4 +- .../joomla/base/stubs/testadapter4.php | 4 +- .../joomla/cache/JCacheConstructTest.php | 4 +- .../joomla/cache/JCacheStorageTest.php | 157 +- .../libraries/joomla/cache/JCacheTest.php | 63 +- .../JCacheControllerCallback.helper.php | 4 +- .../JCacheControllerCallbackCallbackTest.php | 4 +- .../cache/controller/JCacheControllerRaw.php | 4 +- .../cache/storage/JCacheStorageApcTest.php | 4 +- .../cache/storage/JCacheStorageApcuTest.php | 4 +- .../storage/JCacheStorageCacheliteTest.php | 5 +- .../cache/storage/JCacheStorageFileTest.php | 11 +- .../storage/JCacheStorageMemcacheTest.php | 37 +- .../storage/JCacheStorageMemcachedTest.php | 38 +- .../cache/storage/JCacheStorageMock.php | 4 +- .../cache/storage/JCacheStorageRedisTest.php | 55 +- .../storage/JCacheStorageWincacheTest.php | 4 +- .../cache/storage/JCacheStorageXcacheTest.php | 4 +- .../joomla/controller/JControllerBaseTest.php | 4 +- .../joomla/controller/stubs/tbase.php | 4 +- .../libraries/joomla/crypt/JCryptTest.php | 6 +- .../crypt/cipher/JCryptCipher3DesTest.php | 7 +- .../crypt/cipher/JCryptCipherBlowfishTest.php | 7 +- .../crypt/cipher/JCryptCipherCryptoTest.php | 8 +- .../cipher/JCryptCipherRijndael256Test.php | 7 +- .../crypt/cipher/JCryptCipherSimpleTest.php | 7 +- .../crypt/cipher/JCryptCipherSodiumTest.php | 85 + .../password/JCryptPasswordSimpleTest.php | 4 +- .../joomla/database/JDatabaseDriverTest.php | 2 +- .../joomla/database/JDatabaseFactoryTest.php | 2 +- .../JDatabaseQueryElementInspector.php | 2 +- .../database/JDatabaseQueryElementTest.php | 2 +- .../database/JDatabaseQueryInspector.php | 2 +- .../joomla/database/JDatabaseQueryTest.php | 7 +- .../joomla/database/stubs/nosqldriver.php | 4 +- .../libraries/joomla/date/JDateTest.php | 40 +- .../joomla/document/JDocumentRendererTest.php | 7 +- .../joomla/document/JDocumentTest.php | 4 +- .../document/error/JDocumentErrorTest.php | 4 +- .../document/feed/JDocumentFeedTest.php | 4 +- .../renderer/JDocumentRendererAtomTest.php | 7 +- .../renderer/JDocumentRendererRSSTest.php | 7 +- .../document/html/JDocumentHTMLTest.php | 4 +- .../JDocumentRendererComponentTest.php | 6 +- .../renderer/JDocumentRendererMessageTest.php | 6 +- .../document/image/JDocumentImageTest.php | 4 +- .../document/json/JDocumentJSONTest.php | 4 +- .../opensearch/JDocumentOpensearchTest.php | 4 +- .../joomla/document/raw/JDocumentRawTest.php | 4 +- .../JDocumentRendererHtmlModulesTest.php | 4 +- .../joomla/document/xml/JDocumentXmlTest.php | 4 +- .../joomla/environment/JBrowserTest.php | 160 +- .../joomla/event/JEventDispatcherTest.php | 4 +- .../joomla/event/JEventInspector.php | 4 +- .../libraries/joomla/event/JEventStub.php | 4 +- .../libraries/joomla/event/JEventTest.php | 4 +- .../joomla/facebook/JFacebookAlbumTest.php | 11 +- .../joomla/facebook/JFacebookCheckinTest.php | 11 +- .../joomla/facebook/JFacebookCommentTest.php | 11 +- .../joomla/facebook/JFacebookEventTest.php | 11 +- .../joomla/facebook/JFacebookGroupTest.php | 11 +- .../joomla/facebook/JFacebookLinkTest.php | 11 +- .../joomla/facebook/JFacebookNoteTest.php | 11 +- .../joomla/facebook/JFacebookOauthTest.php | 10 +- .../joomla/facebook/JFacebookObjectTest.php | 9 +- .../joomla/facebook/JFacebookPhotoTest.php | 11 +- .../joomla/facebook/JFacebookPostTest.php | 11 +- .../joomla/facebook/JFacebookStatusTest.php | 11 +- .../joomla/facebook/JFacebookTest.php | 9 +- .../joomla/facebook/JFacebookUserTest.php | 11 +- .../joomla/facebook/JFacebookVideoTest.php | 11 +- .../facebook/stubs/JFacebookObjectMock.php | 4 +- .../libraries/joomla/feed/JFeedEntryTest.php | 4 +- .../joomla/feed/JFeedFactoryTest.php | 4 +- .../libraries/joomla/feed/JFeedLinkTest.php | 4 +- .../libraries/joomla/feed/JFeedParserTest.php | 7 +- .../libraries/joomla/feed/JFeedPersonTest.php | 4 +- .../libraries/joomla/feed/JFeedTest.php | 4 +- .../feed/parser/JFeedParserAtomTest.php | 7 +- .../joomla/feed/parser/JFeedParserRssTest.php | 7 +- .../joomla/feed/stubs/JFeedParserMock.php | 4 +- .../feed/stubs/JFeedParserMockNamespace.php | 4 +- .../stubs/JFeedParserProcessElementMock.php | 4 +- .../libraries/joomla/filesystem/JFileTest.php | 4 +- .../filesystem/JFilesystemHelperTest.php | 4 +- .../filesystem/JFilesystemPatcherTest.php | 4 +- .../joomla/filesystem/JFolderTest.php | 4 +- .../libraries/joomla/filesystem/JPathTest.php | 4 +- .../joomla/filter/JFilterInputTest.php | 275 +- .../joomla/filter/JFilterOutputTest.php | 43 +- .../libraries/joomla/form/JFormDataHelper.php | 4 +- .../libraries/joomla/form/JFormFieldTest.php | 4 +- .../libraries/joomla/form/JFormTest.php | 45 +- .../TestHelpers/JHtmlField-helper-dataset.php | 4 +- .../libraries/joomla/form/_testfields/bar.php | 4 +- .../libraries/joomla/form/_testfields/foo.php | 4 +- .../joomla/form/_testfields/modal/bar.php | 4 +- .../joomla/form/_testfields/modal/foo.php | 4 +- .../joomla/form/_testfields/test.php | 4 +- .../joomla/form/_testrules/custom.php | 4 +- .../form/field/JFormFieldCategoryTest.php | 4 +- .../field/JFormFieldComponentLayoutTest.php | 4 +- .../form/field/JFormFieldModuleLayoutTest.php | 6 +- .../form/fields/JFormFieldAccessLevelTest.php | 4 +- .../fields/JFormFieldCacheHandlerTest.php | 4 +- .../form/fields/JFormFieldCheckboxTest.php | 4 +- .../form/fields/JFormFieldCheckboxesTest.php | 18 +- .../form/fields/JFormFieldColorTest.php | 4 +- .../form/fields/JFormFieldComboTest.php | 4 +- .../JFormFieldDatabaseConnectionTest.php | 4 +- .../form/fields/JFormFieldEmailTest.php | 4 +- .../form/fields/JFormFieldFileListTest.php | 5 +- .../joomla/form/fields/JFormFieldFileTest.php | 4 +- .../form/fields/JFormFieldFolderListTest.php | 4 +- .../form/fields/JFormFieldGroupedListTest.php | 4 +- .../form/fields/JFormFieldHiddenTest.php | 4 +- .../form/fields/JFormFieldImageListTest.php | 4 +- .../form/fields/JFormFieldIntegerTest.php | 4 +- .../form/fields/JFormFieldLanguageTest.php | 4 +- .../joomla/form/fields/JFormFieldListTest.php | 4 +- .../form/fields/JFormFieldNumberTest.php | 4 +- .../form/fields/JFormFieldPasswordTest.php | 4 +- .../form/fields/JFormFieldPluginsTest.php | 4 +- .../form/fields/JFormFieldRadioTest.php | 4 +- .../joomla/form/fields/JFormFieldRange.php | 4 +- .../form/fields/JFormFieldRulesTest.php | 4 +- .../joomla/form/fields/JFormFieldSQLTest.php | 4 +- .../fields/JFormFieldSessionHandlerTest.php | 4 +- .../form/fields/JFormFieldSpacerTest.php | 4 +- .../joomla/form/fields/JFormFieldTelTest.php | 4 +- .../joomla/form/fields/JFormFieldTextTest.php | 4 +- .../form/fields/JFormFieldTextareaTest.php | 4 +- .../form/fields/JFormFieldTimezoneTest.php | 4 +- .../joomla/form/fields/JFormFieldUrlTest.php | 4 +- .../form/fields/JFormFieldUsergroupTest.php | 4 +- .../JHtmlFieldCheckbox-helper-dataset.php | 4 +- .../JHtmlFieldEmail-helper-dataset.php | 4 +- .../JHtmlFieldNumber-helper-dataset.php | 4 +- .../JHtmlFieldPassword-helper-dataset.php | 4 +- .../JHtmlFieldRadio-helper-dataset.php | 4 +- .../JHtmlFieldRange-helper-dataset.php | 4 +- .../JHtmlFieldTel-helper-dataset.php | 4 +- .../JHtmlFieldText-helper-dataset.php | 4 +- .../JHtmlFieldTextarea-helper-dataset.php | 4 +- .../JHtmlFieldUrl-helper-dataset.php | 4 +- .../joomla/form/rule/JFormRuleBooleanTest.php | 4 +- .../joomla/form/rule/JFormRuleColorTest.php | 4 +- .../joomla/form/rule/JFormRuleEmailTest.php | 4 +- .../joomla/form/rule/JFormRuleOptionsTest.php | 4 +- .../joomla/form/rule/JFormRuleRulesTest.php | 4 +- .../joomla/form/rule/JFormRuleTelTest.php | 4 +- .../joomla/form/rule/JFormRuleUrlTest.php | 4 +- .../joomla/github/JGithubAccountTest.php | 8 +- .../joomla/github/JGithubCommitsTest.php | 8 +- .../joomla/github/JGithubForksTest.php | 8 +- .../joomla/github/JGithubGistsTest.php | 9 +- .../joomla/github/JGithubHooksTest.php | 9 +- .../joomla/github/JGithubHttpTest.php | 8 +- .../joomla/github/JGithubIssuesTest.php | 9 +- .../joomla/github/JGithubMetaTest.php | 9 +- .../joomla/github/JGithubMilestonesTest.php | 8 +- .../joomla/github/JGithubObjectTest.php | 8 +- .../JGithubPackageAuthorizationsTest.php | 8 +- .../joomla/github/JGithubPackageGistsTest.php | 8 +- .../github/JGithubPackageGitignoreTest.php | 9 +- .../github/JGithubPackageIssuesTest.php | 9 +- .../github/JGithubPackageMarkdownTest.php | 5 +- .../joomla/github/JGithubPackageOrgsTest.php | 5 +- .../joomla/github/JGithubPackagePullsTest.php | 8 +- .../github/JGithubPackageRepositoriesTest.php | 5 +- .../github/JGithubPackageSearchTest.php | 5 +- .../joomla/github/JGithubPackageUsersTest.php | 11 +- .../joomla/github/JGithubPullsTest.php | 9 +- .../joomla/github/JGithubRefsTest.php | 8 +- .../joomla/github/JGithubStatusesTest.php | 8 +- .../libraries/joomla/github/JGithubTest.php | 8 +- .../joomla/github/JGithubUsersTest.php | 9 +- .../JGithubPackageActivityEventsTest.php | 4 +- .../data/JGithubPackageDataRefsTest.php | 4 +- .../JGithubPackageIssuesMilestonesTest.php | 4 +- ...GithubPackageRepositoriesDownloadsTest.php | 2 +- .../JGithubPackageRepositoriesForksTest.php | 4 +- .../JGithubPackageRepositoriesHooksTest.php | 4 +- ...JGithubPackageRepositoriesStatusesTest.php | 4 +- .../joomla/github/stubs/JGithubObjectMock.php | 4 +- .../joomla/google/JGoogleAuthOauth2Test.php | 13 +- .../joomla/google/JGoogleDataAdsenseTest.php | 12 +- .../joomla/google/JGoogleDataCalendarTest.php | 12 +- .../google/JGoogleDataPicasaAlbumTest.php | 35 +- .../google/JGoogleDataPicasaPhotoTest.php | 17 +- .../joomla/google/JGoogleDataPicasaTest.php | 16 +- .../google/JGoogleDataPlusActivitiesTest.php | 12 +- .../google/JGoogleDataPlusCommentsTest.php | 12 +- .../google/JGoogleDataPlusPeopleTest.php | 12 +- .../joomla/google/JGoogleDataPlusTest.php | 12 +- .../google/JGoogleEmbedAnalyticsTest.php | 8 +- .../joomla/google/JGoogleEmbedMapsTest.php | 12 +- .../libraries/joomla/google/JGoogleTest.php | 12 +- .../libraries/joomla/grid/JGridTest.php | 4 +- .../joomla/http/JHttpFactoryTest.php | 6 +- .../libraries/joomla/http/JHttpTest.php | 8 +- .../joomla/http/JHttpTransportTest.php | 7 +- .../joomla/image/JImageFilterTest.php | 4 +- .../libraries/joomla/image/JImageTest.php | 46 +- .../filter/JImageFilterBackgroundfillTest.php | 4 +- .../filter/JImageFilterBrightnessTest.php | 4 +- .../image/filter/JImageFilterContrastTest.php | 4 +- .../filter/JImageFilterEdgedetectTest.php | 4 +- .../image/stubs/JImageFilterInspector.php | 4 +- .../joomla/image/stubs/JImageInspector.php | 6 +- .../libraries/joomla/input/JInputCliTest.php | 16 +- .../libraries/joomla/input/JInputTest.php | 20 +- .../joomla/input/stubs/JFilterInputMock.php | 4 +- .../input/stubs/JFilterInputMockTracker.php | 4 +- .../joomla/input/stubs/JInputInspector.php | 4 +- .../joomla/keychain/JKeychainTest.php | 54 +- .../joomla/language/JLanguageHelperTest.php | 4 +- .../joomla/language/JLanguageInspector.php | 4 +- .../joomla/language/JLanguageStemmerTest.php | 4 +- .../joomla/language/JLanguageTest.php | 19 +- .../language/JLanguageTransliterateTest.php | 4 +- .../data/language/en-GB/en-GB.localise.php | 2 +- .../language/data/language/en-GB/en-GB.xml | 2 +- .../stemmer/JLanguageStemmerPorterenTest.php | 4 +- .../linkedin/JLinkedinCommunicationsTest.php | 11 +- .../linkedin/JLinkedinCompaniesTest.php | 11 +- .../joomla/linkedin/JLinkedinGroupsTest.php | 11 +- .../joomla/linkedin/JLinkedinJobsTest.php | 11 +- .../joomla/linkedin/JLinkedinOAuthTest.php | 11 +- .../joomla/linkedin/JLinkedinObjectTest.php | 8 +- .../joomla/linkedin/JLinkedinPeopleTest.php | 11 +- .../joomla/linkedin/JLinkedinStreamTest.php | 11 +- .../joomla/linkedin/JLinkedinTest.php | 9 +- .../linkedin/stubs/JLinkedinObjectMock.php | 4 +- .../libraries/joomla/log/JLogEntryTest.php | 4 +- .../suites/libraries/joomla/log/JLogTest.php | 19 +- .../log/loggers/JLogLoggerCallbackTest.php | 8 +- .../log/loggers/JLogLoggerDatabaseTest.php | 4 +- .../joomla/log/loggers/JLogLoggerEchoTest.php | 4 +- .../loggers/JLogLoggerFormattedTextTest.php | 4 +- .../loggers/JLogLoggerMessageQueueTest.php | 4 +- .../joomla/log/loggers/JLogLoggerW3CTest.php | 4 +- .../log/loggers/stubs/callback/helper.php | 4 +- .../log/loggers/stubs/callback/inspector.php | 4 +- .../log/loggers/stubs/database/inspector.php | 4 +- .../loggers/stubs/formattedtext/inspector.php | 4 +- .../stubs/messagequeue/mock.application.php | 4 +- .../log/loggers/stubs/w3c/inspector.php | 4 +- .../joomla/log/stubs/log/inspector.php | 4 +- .../libraries/joomla/mail/JMailHelperTest.php | 4 +- .../libraries/joomla/mail/JMailTest.php | 8 +- .../mediawiki/JMediawikiCategoriesTest.php | 8 +- .../joomla/mediawiki/JMediawikiHttpTest.php | 8 +- .../joomla/mediawiki/JMediawikiImagesTest.php | 8 +- .../joomla/mediawiki/JMediawikiLinksTest.php | 8 +- .../joomla/mediawiki/JMediawikiObjectTest.php | 8 +- .../joomla/mediawiki/JMediawikiPagesTest.php | 8 +- .../joomla/mediawiki/JMediawikiSearchTest.php | 8 +- .../joomla/mediawiki/JMediawikiSitesTest.php | 8 +- .../joomla/mediawiki/JMediawikiTest.php | 8 +- .../joomla/mediawiki/JMediawikiUsersTest.php | 8 +- .../mediawiki/stubs/JMediawikiObjectMock.php | 4 +- .../joomla/microdata/JMicrodataTest.php | 4 +- .../libraries/joomla/model/JModelBaseTest.php | 4 +- .../joomla/model/JModelDatabaseTest.php | 4 +- .../libraries/joomla/model/stubs/tbase.php | 4 +- .../joomla/model/stubs/tdatabase.php | 4 +- .../joomla/oauth1/JOAuth1ClientTest.php | 18 +- .../oauth1/stubs/JOAuth1ClientInspector.php | 4 +- .../joomla/oauth2/JOauth2ClientTest.php | 11 +- .../libraries/joomla/object/JObjectTest.php | 13 +- .../JOpenstreetmapChangesetsTest.php | 13 +- .../JOpenstreetmapElementsTest.php | 11 +- .../openstreetmap/JOpenstreetmapGpsTest.php | 11 +- .../openstreetmap/JOpenstreetmapInfoTest.php | 11 +- .../openstreetmap/JOpenstreetmapOauthTest.php | 11 +- .../JOpenstreetmapObjectTest.php | 8 +- .../openstreetmap/JOpenstreetmapTest.php | 9 +- .../openstreetmap/JOpenstreetmapUserTest.php | 11 +- .../stubs/JOpenstreetmapObjectMock.php | 4 +- .../joomla/session/JSessionStorageTest.php | 4 +- .../libraries/joomla/session/JSessionTest.php | 7 +- .../joomla/session/handler/array.php | 21 +- .../storage/JSessionStorageApcTest.php | 4 +- .../storage/JSessionStorageDatabaseTest.php | 4 +- .../storage/JSessionStorageMemcacheTest.php | 4 +- .../storage/JSessionStorageNoneTest.php | 4 +- .../storage/JSessionStorageWincacheTest.php | 4 +- .../storage/JSessionStorageXcacheTest.php | 4 +- .../joomla/table/JTableExtensionTest.php | 4 +- .../joomla/table/JTableLanguageTest.php | 4 +- .../joomla/table/JTableNestedTest.php | 4 +- .../libraries/joomla/table/JTableTest.php | 12 +- .../libraries/joomla/table/JTableUserTest.php | 4 +- .../joomla/table/stubs/dbtestcomposite.php | 4 +- .../libraries/joomla/table/stubs/nested.php | 4 +- .../joomla/twitter/JTwitterBlockTest.php | 11 +- .../twitter/JTwitterDirectmessagesTest.php | 11 +- .../joomla/twitter/JTwitterFavoritesTest.php | 11 +- .../joomla/twitter/JTwitterFriendsTest.php | 11 +- .../joomla/twitter/JTwitterHelpTest.php | 18 +- .../joomla/twitter/JTwitterListsTest.php | 11 +- .../joomla/twitter/JTwitterOauthTest.php | 11 +- .../joomla/twitter/JTwitterObjectTest.php | 11 +- .../joomla/twitter/JTwitterPlacesTest.php | 11 +- .../joomla/twitter/JTwitterProfileTest.php | 11 +- .../joomla/twitter/JTwitterSearchTest.php | 11 +- .../joomla/twitter/JTwitterStatusesTest.php | 11 +- .../libraries/joomla/twitter/JTwitterTest.php | 9 +- .../joomla/twitter/JTwitterTrendsTest.php | 11 +- .../joomla/twitter/JTwitterUsersTest.php | 11 +- .../twitter/stubs/JTwitterObjectMock.php | 4 +- .../suites/libraries/joomla/uri/JURITest.php | 4 +- .../joomla/user/JAuthenticationTest.php | 4 +- .../libraries/joomla/user/JUserHelperTest.php | 14 +- .../libraries/joomla/user/JUserTest.php | 9 +- .../user/stubs/FakeAuthenticationPlugin.php | 4 +- .../joomla/utilities/JArrayHelperTest.php | 6 +- .../joomla/utilities/JBufferTest.php | 6 +- .../joomla/utilities/JUtilityTest.php | 6 +- .../libraries/joomla/utilities/stubs/test.xml | 2 +- .../libraries/joomla/view/JViewBaseTest.php | 4 +- .../libraries/joomla/view/JViewHtmlTest.php | 7 +- .../joomla/view/mocks/JModelMock.php | 2 +- .../libraries/joomla/view/stubs/tbase.php | 4 +- .../libraries/joomla/view/stubs/thtml.php | 4 +- .../legacy/application/JApplicationTest.php | 4 +- .../legacy/categories/JCategoriesTest.php | 4 +- .../legacy/controller/JControllerFormTest.php | 4 +- .../controller/JControllerLegacyTest.php | 6 +- .../legacy/controller/stubs/controller.php | 4 +- .../controller/stubs/controllerform.php | 4 +- .../legacy/error/JErrorInspector.php | 10 +- .../libraries/legacy/error/JErrorTest.php | 4 +- .../legacy/model/JModelAdminTest.php | 4 +- .../libraries/legacy/model/JModelFormTest.php | 4 +- .../libraries/legacy/model/JModelItemTest.php | 4 +- .../legacy/model/JModelLegacyTest.php | 4 +- .../libraries/legacy/model/JModelListTest.php | 244 +- .../model/stubs/constructorexceptiontest.php | 4 +- .../libraries/legacy/model/stubs/foobar.php | 4 +- .../libraries/legacy/model/stubs/lead.php | 4 +- .../model/stubs/listmodelexceptiontest.php | 4 +- .../legacy/model/stubs/listmodeltest.php | 4 +- .../libraries/legacy/model/stubs/name.php | 4 +- .../libraries/legacy/model/stubs/room.php | 4 +- .../legacy/response/JResponseTest.php | 4 +- .../legacy/table/JTableContentTest.php | 4 +- .../libraries/legacy/view/JViewLegacyTest.php | 6 +- .../legacy/view/stubs/ContentViewArticle.php | 4 +- .../legacy/view/stubs/ContentViewHtml.php | 4 +- .../legacy/view/stubs/ExampleViewSEOHtml.php | 4 +- .../legacy/view/stubs/MediaViewMediaList.php | 4 +- .../stubs/MediaViewMediaListItemsHtml.php | 4 +- .../emailcloak/PlgContentEmailcloakTest.php | 71 +- 4677 files changed, 110693 insertions(+), 49624 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE/Bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/Custom.md create mode 100644 .github/ISSUE_TEMPLATE/Feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/Security.md create mode 100644 .github/SUPPORT.md create mode 100644 .hound.yml create mode 100644 Jenkinsfile create mode 100644 RoboFile.dist.ini create mode 100644 RoboFile.php create mode 100644 SECURITY.md delete mode 100644 administrator/components/com_admin/postinstall/phpversion.php create mode 100644 administrator/components/com_admin/postinstall/updatedefaultsettings.php create mode 100644 administrator/components/com_admin/sql/updates/mysql/3.7.3-2017-06-03.sql create mode 100644 administrator/components/com_admin/sql/updates/mysql/3.7.4-2017-07-05.sql create mode 100644 administrator/components/com_admin/sql/updates/mysql/3.8.0-2017-07-28.sql create mode 100644 administrator/components/com_admin/sql/updates/mysql/3.8.0-2017-07-31.sql create mode 100644 administrator/components/com_admin/sql/updates/mysql/3.8.2-2017-10-14.sql create mode 100644 administrator/components/com_admin/sql/updates/mysql/3.8.4-2018-01-16.sql create mode 100644 administrator/components/com_admin/sql/updates/mysql/3.8.6-2018-02-14.sql create mode 100644 administrator/components/com_admin/sql/updates/mysql/3.8.8-2018-05-18.sql create mode 100644 administrator/components/com_admin/sql/updates/mysql/3.8.9-2018-06-19.sql create mode 100644 administrator/components/com_admin/sql/updates/postgresql/3.7.4-2017-07-05.sql create mode 100644 administrator/components/com_admin/sql/updates/postgresql/3.8.0-2017-07-28.sql create mode 100644 administrator/components/com_admin/sql/updates/postgresql/3.8.0-2017-07-31.sql create mode 100644 administrator/components/com_admin/sql/updates/postgresql/3.8.2-2017-10-14.sql create mode 100644 administrator/components/com_admin/sql/updates/postgresql/3.8.4-2018-01-16.sql create mode 100644 administrator/components/com_admin/sql/updates/postgresql/3.8.6-2018-02-14.sql create mode 100644 administrator/components/com_admin/sql/updates/postgresql/3.8.8-2018-05-18.sql create mode 100644 administrator/components/com_admin/sql/updates/postgresql/3.8.9-2018-06-19.sql create mode 100644 administrator/components/com_admin/sql/updates/sqlazure/3.7.4-2017-07-05.sql create mode 100644 administrator/components/com_admin/sql/updates/sqlazure/3.8.0-2017-07-28.sql create mode 100644 administrator/components/com_admin/sql/updates/sqlazure/3.8.0-2017-07-31.sql create mode 100644 administrator/components/com_admin/sql/updates/sqlazure/3.8.2-2017-10-14.sql create mode 100644 administrator/components/com_admin/sql/updates/sqlazure/3.8.4-2018-01-16.sql create mode 100644 administrator/components/com_admin/sql/updates/sqlazure/3.8.6-2018-02-14.sql create mode 100644 administrator/components/com_admin/sql/updates/sqlazure/3.8.8-2018-05-18.sql create mode 100644 administrator/components/com_admin/sql/updates/sqlazure/3.8.9-2018-06-19.sql create mode 100644 administrator/components/com_admin/views/help/tmpl/langforum.php create mode 100644 administrator/components/com_associations/views/associations/tmpl/default.xml create mode 100644 administrator/components/com_cache/access.xml create mode 100644 administrator/components/com_contact/models/forms/fields/mail.xml create mode 100644 administrator/components/com_content/models/fields/voteradio.php rename libraries/cms/form/field/menuitem.php => administrator/components/com_menus/models/fields/menuitembytype.php (75%) create mode 100644 administrator/components/com_menus/models/fields/menupreset.php create mode 100644 administrator/components/com_menus/presets/joomla.xml create mode 100644 administrator/components/com_menus/presets/menu.xsd create mode 100644 administrator/components/com_menus/presets/modern.xml create mode 100644 administrator/components/com_menus/views/menu/view.xml.php create mode 100644 administrator/components/com_modules/models/forms/filter_modulesadmin.xml create mode 100644 administrator/components/com_modules/models/forms/moduleadmin.xml create mode 100644 administrator/components/com_plugins/views/plugin/tmpl/modal.php create mode 100644 administrator/components/com_redirect/views/links/tmpl/default.xml create mode 100644 administrator/components/com_search/views/searches/tmpl/default.xml create mode 100644 administrator/components/com_tags/views/tags/tmpl/default.xml create mode 100644 administrator/components/com_users/models/forms/fields/user.xml create mode 100644 administrator/language/en-GB/en-GB.mod_sampledata.ini create mode 100644 administrator/language/en-GB/en-GB.mod_sampledata.sys.ini create mode 100644 administrator/language/en-GB/en-GB.plg_sampledata_blog.ini create mode 100644 administrator/language/en-GB/en-GB.plg_sampledata_blog.sys.ini create mode 100644 administrator/language/en-GB/en-GB.plg_system_sessiongc.ini create mode 100644 administrator/language/en-GB/en-GB.plg_system_sessiongc.sys.ini delete mode 100644 administrator/modules/mod_menu/preset/disabled.php delete mode 100644 administrator/modules/mod_menu/preset/enabled.php create mode 100644 administrator/modules/mod_menu/tmpl/default_submenu.php create mode 100644 administrator/modules/mod_sampledata/helper.php create mode 100644 administrator/modules/mod_sampledata/mod_sampledata.php create mode 100644 administrator/modules/mod_sampledata/mod_sampledata.xml create mode 100644 administrator/modules/mod_sampledata/tmpl/default.php create mode 100644 build/deleted_file_check.php create mode 100644 build/jenkins/docker-compose.yml create mode 100644 build/jenkins/unit-tests.sh create mode 100644 build/stubGenerator.php create mode 100644 build/travis/codeception-tests.sh create mode 100644 build/travis/phpenv/apcu-7.2.ini create mode 100644 cli/sessionGc.php create mode 100644 cli/sessionMetadataGc.php create mode 100644 codeception.yml delete mode 100644 components/com_content/layouts/field/prepare/modal_article.php delete mode 100644 components/com_fields/controllers/field.php create mode 100644 components/com_mailto/models/forms/mailto.xml create mode 100644 components/com_mailto/models/mailto.php create mode 100644 installation/language/bn-BD/bn-BD.ini create mode 100644 installation/language/bn-BD/bn-BD.xml create mode 100644 installation/language/lt-LT/lt-LT.ini create mode 100644 installation/language/lt-LT/lt-LT.xml create mode 100644 jenkins-phpunit.xml create mode 100644 layouts/joomla/content/text_filters.php create mode 100644 layouts/joomla/form/field/combo.php create mode 100644 layouts/joomla/html/batch/adminlanguage.php delete mode 100644 libraries/cms/component/exception/missing.php delete mode 100644 libraries/cms/form/field/chromestyle.php delete mode 100644 libraries/cms/form/field/plugin_status.php delete mode 100644 libraries/cms/form/rule/captcha.php delete mode 100644 libraries/cms/form/rule/notequals.php create mode 100644 libraries/cms/html/adminlanguage.php delete mode 100644 libraries/cms/menu/administrator.php delete mode 100644 libraries/cms/table/ucm.php delete mode 100644 libraries/cms/ucm/base.php delete mode 100644 libraries/cms/ucm/ucm.php delete mode 100644 libraries/joomla/access/exception/notallowed.php delete mode 100644 libraries/joomla/cache/exception.php delete mode 100644 libraries/joomla/cache/exception/connecting.php delete mode 100644 libraries/joomla/cache/exception/unsupported.php delete mode 100644 libraries/joomla/client/ldap.php delete mode 100644 libraries/joomla/crypt/cipher.php delete mode 100644 libraries/joomla/crypt/cipher/3des.php delete mode 100644 libraries/joomla/crypt/cipher/blowfish.php delete mode 100644 libraries/joomla/crypt/cipher/crypto.php delete mode 100644 libraries/joomla/crypt/cipher/rijndael256.php delete mode 100644 libraries/joomla/document/feed.php delete mode 100644 libraries/joomla/document/feed/renderer/atom.php delete mode 100644 libraries/joomla/document/feed/renderer/rss.php delete mode 100644 libraries/joomla/document/html/renderer/component.php delete mode 100644 libraries/joomla/document/html/renderer/head.php delete mode 100644 libraries/joomla/document/html/renderer/message.php delete mode 100644 libraries/joomla/document/html/renderer/module.php delete mode 100644 libraries/joomla/document/html/renderer/modules.php delete mode 100644 libraries/joomla/feed/parser/atom.php delete mode 100644 libraries/joomla/feed/parser/namespace.php delete mode 100644 libraries/joomla/feed/parser/rss/itunes.php delete mode 100644 libraries/joomla/feed/parser/rss/media.php delete mode 100644 libraries/joomla/filter/wrapper/output.php delete mode 100644 libraries/joomla/form/rule.php delete mode 100644 libraries/joomla/form/rule/calendar.php delete mode 100644 libraries/joomla/form/rule/color.php delete mode 100644 libraries/joomla/form/rule/equals.php delete mode 100644 libraries/joomla/form/rule/number.php delete mode 100644 libraries/joomla/form/rule/username.php delete mode 100644 libraries/joomla/form/wrapper/helper.php delete mode 100644 libraries/joomla/image/filter.php delete mode 100644 libraries/joomla/image/filter/emboss.php delete mode 100644 libraries/joomla/image/filter/grayscale.php delete mode 100644 libraries/joomla/image/filter/negate.php delete mode 100644 libraries/joomla/image/filter/sketchy.php delete mode 100644 libraries/joomla/input/input.php delete mode 100644 libraries/joomla/language/wrapper/transliterate.php delete mode 100644 libraries/joomla/log/logger.php delete mode 100644 libraries/joomla/log/logger/messagequeue.php delete mode 100644 libraries/joomla/session/exception/unsupported.php create mode 100644 libraries/joomla/session/storage/redis.php delete mode 100644 libraries/joomla/table/language.php delete mode 100644 libraries/legacy/access/rule.php delete mode 100644 libraries/legacy/access/rules.php delete mode 100644 libraries/legacy/application/cli.php delete mode 100644 libraries/legacy/application/daemon.php delete mode 100644 libraries/legacy/categories/categories.php delete mode 100644 libraries/legacy/web/client.php delete mode 100644 libraries/legacy/web/web.php rename libraries/{joomla/access/access.php => src/Access/Access.php} (89%) create mode 100644 libraries/src/Access/Exception/NotAllowed.php rename libraries/{joomla/access/rule.php => src/Access/Rule.php} (91%) rename libraries/{joomla/access/rules.php => src/Access/Rules.php} (79%) rename libraries/{joomla/access/wrapper/access.php => src/Access/Wrapper/Access.php} (60%) rename libraries/{cms/application/administrator.php => src/Application/AdministratorApplication.php} (68%) rename libraries/{cms/application/helper.php => src/Application/ApplicationHelper.php} (77%) rename libraries/{joomla/application/base.php => src/Application/BaseApplication.php} (67%) rename libraries/{cms/application/cms.php => src/Application/CMSApplication.php} (70%) rename libraries/{joomla/application/cli.php => src/Application/CliApplication.php} (65%) rename libraries/{joomla/application/daemon.php => src/Application/DaemonApplication.php} (81%) rename libraries/{cms/application/site.php => src/Application/SiteApplication.php} (78%) rename libraries/{joomla/application/web.php => src/Application/WebApplication.php} (75%) rename libraries/{joomla/association/extension/helper.php => src/Association/AssociationExtensionHelper.php} (94%) rename libraries/{joomla/association/extension/interface.php => src/Association/AssociationExtensionInterface.php} (54%) rename libraries/{joomla/authentication/authentication.php => src/Authentication/Authentication.php} (80%) rename libraries/{joomla/authentication/response.php => src/Authentication/AuthenticationResponse.php} (87%) rename libraries/{joomla/cache/cache.php => src/Cache/Cache.php} (87%) rename libraries/{joomla/cache/controller.php => src/Cache/CacheController.php} (75%) rename libraries/{joomla/cache/storage.php => src/Cache/CacheStorage.php} (79%) rename libraries/{joomla/cache/controller/callback.php => src/Cache/Controller/CallbackController.php} (91%) rename libraries/{joomla/cache/controller/output.php => src/Cache/Controller/OutputController.php} (89%) rename libraries/{joomla/cache/controller/page.php => src/Cache/Controller/PageController.php} (84%) rename libraries/{joomla/cache/controller/view.php => src/Cache/Controller/ViewController.php} (84%) create mode 100644 libraries/src/Cache/Exception/CacheConnectingException.php create mode 100644 libraries/src/Cache/Exception/CacheExceptionInterface.php create mode 100644 libraries/src/Cache/Exception/UnsupportedCacheException.php rename libraries/{joomla/cache/storage/apc.php => src/Cache/Storage/ApcStorage.php} (92%) rename libraries/{joomla/cache/storage/apcu.php => src/Cache/Storage/ApcuStorage.php} (92%) rename libraries/{joomla/cache/storage/helper.php => src/Cache/Storage/CacheStorageHelper.php} (66%) rename libraries/{joomla/cache/storage/cachelite.php => src/Cache/Storage/CacheliteStorage.php} (86%) rename libraries/{joomla/cache/storage/file.php => src/Cache/Storage/FileStorage.php} (91%) rename libraries/{joomla/cache/storage/memcache.php => src/Cache/Storage/MemcacheStorage.php} (88%) rename libraries/{joomla/cache/storage/memcached.php => src/Cache/Storage/MemcachedStorage.php} (87%) rename libraries/{joomla/cache/storage/redis.php => src/Cache/Storage/RedisStorage.php} (66%) rename libraries/{joomla/cache/storage/wincache.php => src/Cache/Storage/WincacheStorage.php} (88%) rename libraries/{joomla/cache/storage/xcache.php => src/Cache/Storage/XcacheStorage.php} (92%) rename libraries/{cms/captcha/captcha.php => src/Captcha/Captcha.php} (82%) create mode 100644 libraries/src/Categories/Categories.php create mode 100644 libraries/src/Categories/CategoryNode.php rename libraries/{joomla/client/helper.php => src/Client/ClientHelper.php} (87%) rename libraries/{joomla/client/wrapper/helper.php => src/Client/ClientWrapper.php} (64%) rename libraries/{joomla/client/ftp.php => src/Client/FtpClient.php} (77%) rename libraries/{cms/component/helper.php => src/Component/ComponentHelper.php} (72%) rename libraries/{cms/component/record.php => src/Component/ComponentRecord.php} (85%) create mode 100644 libraries/src/Component/Exception/MissingComponentException.php rename libraries/{cms/component/router/base.php => src/Component/Router/RouterBase.php} (60%) rename libraries/{cms/component/router/interface.php => src/Component/Router/RouterInterface.php} (83%) rename libraries/{cms/component/router/legacy.php => src/Component/Router/RouterLegacy.php} (87%) rename libraries/{cms/component/router/view.php => src/Component/Router/RouterView.php} (78%) rename libraries/{cms/component/router/viewconfiguration.php => src/Component/Router/RouterViewConfiguration.php} (74%) rename libraries/{cms/component/router/rules/menu.php => src/Component/Router/Rules/MenuRules.php} (61%) rename libraries/{cms/component/router/rules/nomenu.php => src/Component/Router/Rules/NomenuRules.php} (82%) rename libraries/{cms/component/router/rules/interface.php => src/Component/Router/Rules/RulesInterface.php} (81%) rename libraries/{cms/component/router/rules/standard.php => src/Component/Router/Rules/StandardRules.php} (70%) create mode 100644 libraries/src/Crypt/Cipher/BlowfishCipher.php create mode 100644 libraries/src/Crypt/Cipher/CryptoCipher.php rename libraries/{joomla/crypt/cipher/mcrypt.php => src/Crypt/Cipher/McryptCipher.php} (61%) create mode 100644 libraries/src/Crypt/Cipher/Rijndael256Cipher.php rename libraries/{joomla/crypt/cipher/simple.php => src/Crypt/Cipher/SimpleCipher.php} (78%) create mode 100644 libraries/src/Crypt/Cipher/SodiumCipher.php create mode 100644 libraries/src/Crypt/Cipher/TripleDesCipher.php create mode 100644 libraries/src/Crypt/CipherInterface.php rename libraries/{joomla/crypt/crypt.php => src/Crypt/Crypt.php} (79%) rename libraries/{joomla/crypt/password.php => src/Crypt/CryptPassword.php} (85%) rename libraries/{joomla/crypt/key.php => src/Crypt/Key.php} (84%) rename libraries/{joomla/crypt/password/simple.php => src/Crypt/Password/SimpleCryptPassword.php} (81%) rename libraries/{joomla/crypt => src/Crypt}/README.md (70%) rename libraries/{joomla/date/date.php => src/Date/Date.php} (77%) rename libraries/{joomla/document/document.php => src/Document/Document.php} (83%) rename libraries/{joomla/document/renderer.php => src/Document/DocumentRenderer.php} (70%) rename libraries/{joomla/document/error.php => src/Document/ErrorDocument.php} (73%) create mode 100644 libraries/src/Document/Feed/FeedEnclosure.php create mode 100644 libraries/src/Document/Feed/FeedImage.php create mode 100644 libraries/src/Document/Feed/FeedItem.php create mode 100644 libraries/src/Document/FeedDocument.php rename libraries/{joomla/document/html.php => src/Document/HtmlDocument.php} (89%) rename libraries/{joomla/document/image.php => src/Document/ImageDocument.php} (69%) rename libraries/{joomla/document/json.php => src/Document/JsonDocument.php} (75%) create mode 100644 libraries/src/Document/Opensearch/OpensearchImage.php create mode 100644 libraries/src/Document/Opensearch/OpensearchUrl.php rename libraries/{joomla/document/opensearch.php => src/Document/OpensearchDocument.php} (60%) rename libraries/{joomla/document/raw.php => src/Document/RawDocument.php} (65%) rename libraries/{joomla/document/renderer/feed/atom.php => src/Document/Renderer/Feed/AtomRenderer.php} (79%) rename libraries/{joomla/document/renderer/feed/rss.php => src/Document/Renderer/Feed/RssRenderer.php} (85%) rename libraries/{joomla/document/renderer/html/component.php => src/Document/Renderer/Html/ComponentRenderer.php} (56%) rename libraries/{joomla/document/renderer/html/head.php => src/Document/Renderer/Html/HeadRenderer.php} (91%) rename libraries/{joomla/document/renderer/html/message.php => src/Document/Renderer/Html/MessageRenderer.php} (64%) rename libraries/{joomla/document/renderer/html/module.php => src/Document/Renderer/Html/ModuleRenderer.php} (68%) rename libraries/{joomla/document/renderer/html/modules.php => src/Document/Renderer/Html/ModulesRenderer.php} (59%) rename libraries/{joomla/document/xml.php => src/Document/XmlDocument.php} (67%) rename libraries/{cms/editor/editor.php => src/Editor/Editor.php} (87%) rename libraries/{joomla/environment/browser.php => src/Environment/Browser.php} (76%) rename libraries/{cms/error/page.php => src/Exception/ExceptionHandler.php} (68%) create mode 100644 libraries/src/Extension/ExtensionHelper.php rename libraries/{joomla/factory.php => src/Factory.php} (71%) rename libraries/{joomla/feed/feed.php => src/Feed/Feed.php} (67%) rename libraries/{joomla/feed/entry.php => src/Feed/FeedEntry.php} (61%) rename libraries/{joomla/feed/factory.php => src/Feed/FeedFactory.php} (53%) rename libraries/{joomla/feed/link.php => src/Feed/FeedLink.php} (82%) rename libraries/{joomla/feed/parser.php => src/Feed/FeedParser.php} (74%) rename libraries/{joomla/feed/person.php => src/Feed/FeedPerson.php} (79%) create mode 100644 libraries/src/Feed/Parser/AtomParser.php create mode 100644 libraries/src/Feed/Parser/NamespaceParserInterface.php create mode 100644 libraries/src/Feed/Parser/Rss/ItunesRssParser.php create mode 100644 libraries/src/Feed/Parser/Rss/MediaRssParser.php rename libraries/{joomla/feed/parser/rss.php => src/Feed/Parser/RssParser.php} (61%) rename libraries/{joomla/filter/input.php => src/Filter/InputFilter.php} (78%) rename libraries/{joomla/filter/output.php => src/Filter/OutputFilter.php} (78%) create mode 100644 libraries/src/Filter/Wrapper/OutputFilterWrapper.php rename libraries/{cms/form/field/author.php => src/Form/Field/AuthorField.php} (74%) rename libraries/{cms/form/field/captcha.php => src/Form/Field/CaptchaField.php} (63%) create mode 100644 libraries/src/Form/Field/ChromestyleField.php rename libraries/{cms/form/field/contenthistory.php => src/Form/Field/ContenthistoryField.php} (64%) rename libraries/{cms/form/field/contentlanguage.php => src/Form/Field/ContentlanguageField.php} (53%) rename libraries/{cms/form/field/contenttype.php => src/Form/Field/ContenttypeField.php} (77%) rename libraries/{cms/form/field/editor.php => src/Form/Field/EditorField.php} (69%) rename libraries/{cms/form/field/frontend_language.php => src/Form/Field/FrontendlanguageField.php} (63%) rename libraries/{cms/form/field/headertag.php => src/Form/Field/HeadertagField.php} (60%) rename libraries/{cms/form/field/helpsite.php => src/Form/Field/HelpsiteField.php} (54%) rename libraries/{cms/form/field/lastvisitdaterange.php => src/Form/Field/LastvisitdaterangeField.php} (64%) rename libraries/{cms/form/field/limitbox.php => src/Form/Field/LimitboxField.php} (76%) rename libraries/{cms/form/field/media.php => src/Form/Field/MediaField.php} (75%) rename libraries/{cms/form/field/menu.php => src/Form/Field/MenuField.php} (77%) create mode 100644 libraries/src/Form/Field/MenuitemField.php rename libraries/{cms/form/field/moduleorder.php => src/Form/Field/ModuleorderField.php} (64%) rename libraries/{cms/form/field/moduleposition.php => src/Form/Field/ModulepositionField.php} (60%) rename libraries/{cms/form/field/moduletag.php => src/Form/Field/ModuletagField.php} (62%) rename libraries/{cms/form/field/ordering.php => src/Form/Field/OrderingField.php} (68%) create mode 100644 libraries/src/Form/Field/PluginstatusField.php create mode 100644 libraries/src/Form/Field/RedirectStatusField.php rename libraries/{cms/form/field/registrationdaterange.php => src/Form/Field/RegistrationdaterangeField.php} (64%) rename libraries/{cms/form/field/status.php => src/Form/Field/StatusField.php} (54%) rename libraries/{cms/form/field/tag.php => src/Form/Field/TagField.php} (76%) rename libraries/{cms/form/field/templatestyle.php => src/Form/Field/TemplatestyleField.php} (68%) rename libraries/{cms/form/field/user.php => src/Form/Field/UserField.php} (65%) rename libraries/{cms/form/field/useractive.php => src/Form/Field/UseractiveField.php} (56%) rename libraries/{cms/form/field/usergrouplist.php => src/Form/Field/UsergrouplistField.php} (53%) rename libraries/{cms/form/field/userstate.php => src/Form/Field/UserstateField.php} (51%) rename libraries/{joomla/form/form.php => src/Form/Form.php} (83%) rename libraries/{joomla/form/field.php => src/Form/FormField.php} (84%) rename libraries/{joomla/form/helper.php => src/Form/FormHelper.php} (69%) create mode 100644 libraries/src/Form/FormRule.php create mode 100644 libraries/src/Form/FormWrapper.php rename libraries/{joomla/form/rule/boolean.php => src/Form/Rule/BooleanRule.php} (59%) create mode 100644 libraries/src/Form/Rule/CalendarRule.php create mode 100644 libraries/src/Form/Rule/CaptchaRule.php create mode 100644 libraries/src/Form/Rule/ColorRule.php rename libraries/{joomla/form/rule/email.php => src/Form/Rule/EmailRule.php} (63%) create mode 100644 libraries/src/Form/Rule/EqualsRule.php create mode 100644 libraries/src/Form/Rule/NotequalsRule.php create mode 100644 libraries/src/Form/Rule/NumberRule.php rename libraries/{joomla/form/rule/options.php => src/Form/Rule/OptionsRule.php} (56%) rename libraries/{cms/form/rule/password.php => src/Form/Rule/PasswordRule.php} (58%) rename libraries/{joomla/form/rule/rules.php => src/Form/Rule/RulesRule.php} (57%) rename libraries/{joomla/form/rule/tel.php => src/Form/Rule/TelRule.php} (56%) rename libraries/{joomla/form/rule/url.php => src/Form/Rule/UrlRule.php} (65%) create mode 100644 libraries/src/Form/Rule/UsernameRule.php rename libraries/{cms/html/html.php => src/HTML/HTMLHelper.php} (85%) rename libraries/{cms/help/help.php => src/Help/Help.php} (87%) rename libraries/{cms/authentication/helper.php => src/Helper/AuthenticationHelper.php} (52%) rename libraries/{cms/helper/helper.php => src/Helper/CMSHelper.php} (52%) rename libraries/{cms/helper/content.php => src/Helper/ContentHelper.php} (59%) rename libraries/{cms/helper/contenthistory.php => src/Helper/ContentHistoryHelper.php} (76%) rename libraries/{cms/library/helper.php => src/Helper/LibraryHelper.php} (83%) rename libraries/{cms/helper/media.php => src/Helper/MediaHelper.php} (51%) rename libraries/{cms/module/helper.php => src/Helper/ModuleHelper.php} (78%) rename libraries/{cms/helper/route.php => src/Helper/RouteHelper.php} (80%) rename libraries/{cms/search/helper.php => src/Helper/SearchHelper.php} (76%) rename libraries/{cms/helper/tags.php => src/Helper/TagsHelper.php} (84%) rename libraries/{cms/helper/usergroups.php => src/Helper/UserGroupsHelper.php} (90%) rename libraries/{joomla/http/http.php => src/Http/Http.php} (81%) rename libraries/{joomla/http/factory.php => src/Http/HttpFactory.php} (66%) rename libraries/{joomla/http/response.php => src/Http/Response.php} (61%) rename libraries/{joomla/http/transport/curl.php => src/Http/Transport/CurlTransport.php} (87%) rename libraries/{joomla/http/transport/socket.php => src/Http/Transport/SocketTransport.php} (81%) rename libraries/{joomla/http/transport/stream.php => src/Http/Transport/StreamTransport.php} (83%) rename libraries/{joomla/http/transport => src/Http/Transport}/cacert.pem (100%) rename libraries/{joomla/http/transport.php => src/Http/TransportInterface.php} (62%) rename libraries/{joomla/http/wrapper/factory.php => src/Http/Wrapper/FactoryWrapper.php} (55%) create mode 100644 libraries/src/Image/Image.php create mode 100644 libraries/src/Image/ImageFilter.php rename libraries/{joomla/input/cli.php => src/Input/Cli.php} (81%) rename libraries/{joomla/input/cookie.php => src/Input/Cookie.php} (88%) rename libraries/{joomla/input/files.php => src/Input/Files.php} (78%) create mode 100644 libraries/src/Input/Input.php rename libraries/{joomla/input/json.php => src/Input/Json.php} (67%) rename libraries/{cms/installer/adapter/component.php => src/Installer/Adapter/ComponentAdapter.php} (79%) rename libraries/{cms/installer/adapter/file.php => src/Installer/Adapter/FileAdapter.php} (78%) rename libraries/{cms/installer/adapter/language.php => src/Installer/Adapter/LanguageAdapter.php} (77%) rename libraries/{cms/installer/adapter/library.php => src/Installer/Adapter/LibraryAdapter.php} (74%) rename libraries/{cms/installer/adapter/module.php => src/Installer/Adapter/ModuleAdapter.php} (77%) rename libraries/{cms/installer/adapter/package.php => src/Installer/Adapter/PackageAdapter.php} (76%) rename libraries/{cms/installer/adapter/plugin.php => src/Installer/Adapter/PluginAdapter.php} (78%) rename libraries/{cms/installer/adapter/template.php => src/Installer/Adapter/TemplateAdapter.php} (69%) rename libraries/{cms/installer/installer.php => src/Installer/Installer.php} (80%) rename libraries/{cms/installer/adapter.php => src/Installer/InstallerAdapter.php} (81%) rename libraries/{cms/installer/extension.php => src/Installer/InstallerExtension.php} (71%) rename libraries/{cms/installer/helper.php => src/Installer/InstallerHelper.php} (71%) rename libraries/{cms/installer/script.php => src/Installer/InstallerScript.php} (78%) rename libraries/{cms/installer/manifest.php => src/Installer/Manifest.php} (73%) rename libraries/{cms/installer/manifest/library.php => src/Installer/Manifest/LibraryManifest.php} (76%) rename libraries/{cms/installer/manifest/package.php => src/Installer/Manifest/PackageManifest.php} (73%) rename libraries/{cms/language/associations.php => src/Language/Associations.php} (77%) rename libraries/{joomla/language/language.php => src/Language/Language.php} (89%) rename libraries/{joomla/language/helper.php => src/Language/LanguageHelper.php} (84%) rename libraries/{joomla/language/stemmer.php => src/Language/LanguageStemmer.php} (66%) rename libraries/{cms/language/multilang.php => src/Language/Multilanguage.php} (77%) rename libraries/{joomla/language/stemmer/porteren.php => src/Language/Stemmer/Porteren.php} (77%) rename libraries/{joomla/language/text.php => src/Language/Text.php} (85%) rename libraries/{joomla/language/transliterate.php => src/Language/Transliterate.php} (94%) rename libraries/{joomla/language/wrapper/text.php => src/Language/Wrapper/JTextWrapper.php} (68%) rename libraries/{joomla/language/wrapper/helper.php => src/Language/Wrapper/LanguageHelperWrapper.php} (51%) create mode 100644 libraries/src/Language/Wrapper/TransliterateWrapper.php rename libraries/{cms/layout/base.php => src/Layout/BaseLayout.php} (90%) rename libraries/{cms/layout/file.php => src/Layout/FileLayout.php} (89%) rename libraries/{cms/layout/helper.php => src/Layout/LayoutHelper.php} (69%) rename libraries/{cms/layout/layout.php => src/Layout/LayoutInterface.php} (61%) create mode 100644 libraries/src/Log/DelegatingPsrLogger.php rename libraries/{joomla/log/log.php => src/Log/Log.php} (75%) rename libraries/{joomla/log/entry.php => src/Log/LogEntry.php} (65%) create mode 100644 libraries/src/Log/Logger.php rename libraries/{joomla/log/logger/callback.php => src/Log/Logger/CallbackLogger.php} (62%) rename libraries/{joomla/log/logger/database.php => src/Log/Logger/DatabaseLogger.php} (84%) rename libraries/{joomla/log/logger/echo.php => src/Log/Logger/EchoLogger.php} (65%) rename libraries/{joomla/log/logger/formattedtext.php => src/Log/Logger/FormattedtextLogger.php} (83%) create mode 100644 libraries/src/Log/Logger/MessagequeueLogger.php rename libraries/{joomla/log/logger/syslog.php => src/Log/Logger/SyslogLogger.php} (77%) rename libraries/{joomla/log/logger/w3c.php => src/Log/Logger/W3cLogger.php} (72%) rename libraries/{legacy/controller/admin.php => src/MVC/Controller/AdminController.php} (65%) rename libraries/{legacy/controller/legacy.php => src/MVC/Controller/BaseController.php} (82%) rename libraries/{legacy/controller/form.php => src/MVC/Controller/FormController.php} (74%) rename libraries/{legacy/model/admin.php => src/MVC/Model/AdminModel.php} (76%) rename libraries/{legacy/model/legacy.php => src/MVC/Model/BaseDatabaseModel.php} (78%) rename libraries/{legacy/model/form.php => src/MVC/Model/FormModel.php} (77%) rename libraries/{legacy/model/item.php => src/MVC/Model/ItemModel.php} (72%) rename libraries/{legacy/model/list.php => src/MVC/Model/ListModel.php} (86%) rename libraries/{legacy/view/categories.php => src/MVC/View/CategoriesView.php} (78%) rename libraries/{legacy/view/categoryfeed.php => src/MVC/View/CategoryFeedView.php} (76%) rename libraries/{legacy/view/category.php => src/MVC/View/CategoryView.php} (76%) rename libraries/{legacy/view/legacy.php => src/MVC/View/HtmlView.php} (85%) rename libraries/{joomla/mail/mail.php => src/Mail/Mail.php} (77%) rename libraries/{joomla/mail/helper.php => src/Mail/MailHelper.php} (90%) rename libraries/{joomla/mail/wrapper/helper.php => src/Mail/MailWrapper.php} (65%) rename libraries/{joomla/mail/language/phpmailer.lang-joomla.php => src/Mail/language/phpmailer.lang-en_gb.php} (91%) rename libraries/{cms/menu/menu.php => src/Menu/AbstractMenu.php} (78%) create mode 100644 libraries/src/Menu/AdministratorMenu.php create mode 100644 libraries/src/Menu/MenuHelper.php rename libraries/{cms/menu/item.php => src/Menu/MenuItem.php} (93%) create mode 100644 libraries/src/Menu/Node.php create mode 100644 libraries/src/Menu/Node/Component.php create mode 100644 libraries/src/Menu/Node/Container.php create mode 100644 libraries/src/Menu/Node/Heading.php create mode 100644 libraries/src/Menu/Node/Separator.php create mode 100644 libraries/src/Menu/Node/Url.php rename libraries/{cms/menu/site.php => src/Menu/SiteMenu.php} (71%) create mode 100644 libraries/src/Menu/Tree.php rename libraries/{joomla/microdata/microdata.php => src/Microdata/Microdata.php} (97%) rename libraries/{joomla/microdata => src/Microdata}/types.json (100%) rename libraries/{joomla/object/object.php => src/Object/CMSObject.php} (92%) rename libraries/{cms/pagination/pagination.php => src/Pagination/Pagination.php} (72%) rename libraries/{cms/pagination/object.php => src/Pagination/PaginationObject.php} (82%) rename libraries/{cms/pathway/pathway.php => src/Pathway/Pathway.php} (80%) rename libraries/{cms/pathway/site.php => src/Pathway/SitePathway.php} (76%) rename libraries/{cms/plugin/plugin.php => src/Plugin/CMSPlugin.php} (77%) rename libraries/{cms/plugin/helper.php => src/Plugin/PluginHelper.php} (60%) rename libraries/{joomla/profiler/profiler.php => src/Profiler/Profiler.php} (90%) rename libraries/{cms/response/json.php => src/Response/JsonResponse.php} (80%) rename libraries/{cms/router/administrator.php => src/Router/AdministratorRouter.php} (64%) create mode 100644 libraries/src/Router/Exception/RouteNotFoundException.php rename libraries/{joomla/application/route.php => src/Router/Route.php} (85%) rename libraries/{cms/router/router.php => src/Router/Router.php} (85%) rename libraries/{cms/router/site.php => src/Router/SiteRouter.php} (81%) rename libraries/{cms/schema/changeitem.php => src/Schema/ChangeItem.php} (76%) rename libraries/{cms/schema/changeitem/mysql.php => src/Schema/ChangeItem/MysqlChangeItem.php} (70%) rename libraries/{cms/schema/changeitem/postgresql.php => src/Schema/ChangeItem/PostgresqlChangeItem.php} (88%) rename libraries/{cms/schema/changeitem/sqlsrv.php => src/Schema/ChangeItem/SqlsrvChangeItem.php} (87%) rename libraries/{cms/schema/changeset.php => src/Schema/ChangeSet.php} (80%) create mode 100644 libraries/src/Session/Exception/UnsupportedStorageException.php create mode 100644 libraries/src/Session/MetadataManager.php rename libraries/{joomla/session/session.php => src/Session/Session.php} (84%) rename libraries/{joomla/string/punycode.php => src/String/PunycodeHelper.php} (92%) rename libraries/{joomla/table/asset.php => src/Table/Asset.php} (80%) rename libraries/{legacy/table/category.php => src/Table/Category.php} (74%) rename libraries/{legacy/table/content.php => src/Table/Content.php} (80%) rename libraries/{cms/table/contenthistory.php => src/Table/ContentHistory.php} (80%) rename libraries/{cms/table/contenttype.php => src/Table/ContentType.php} (67%) rename libraries/{cms/table/corecontent.php => src/Table/CoreContent.php} (84%) rename libraries/{joomla/table/extension.php => src/Table/Extension.php} (86%) create mode 100644 libraries/src/Table/Language.php rename libraries/{legacy/table/menu.php => src/Table/Menu.php} (69%) rename libraries/{legacy/table/menu/type.php => src/Table/MenuType.php} (75%) rename libraries/{legacy/table/module.php => src/Table/Module.php} (80%) rename libraries/{joomla/table/nested.php => src/Table/Nested.php} (92%) rename libraries/{joomla/table/observer.php => src/Table/Observer/AbstractObserver.php} (79%) rename libraries/{joomla/table/observer/contenthistory.php => src/Table/Observer/ContentHistory.php} (72%) rename libraries/{joomla/table/observer/tags.php => src/Table/Observer/Tags.php} (82%) rename libraries/{joomla/table/table.php => src/Table/Table.php} (85%) rename libraries/{joomla/table/interface.php => src/Table/TableInterface.php} (72%) create mode 100644 libraries/src/Table/Ucm.php rename libraries/{joomla/table/update.php => src/Table/Update.php} (81%) rename libraries/{joomla/table/updatesite.php => src/Table/UpdateSite.php} (59%) rename libraries/{joomla/table/user.php => src/Table/User.php} (89%) rename libraries/{joomla/table/usergroup.php => src/Table/Usergroup.php} (83%) rename libraries/{joomla/table/viewlevel.php => src/Table/ViewLevel.php} (74%) rename libraries/{cms/toolbar/button/confirm.php => src/Toolbar/Button/ConfirmButton.php} (82%) rename libraries/{cms/toolbar/button/custom.php => src/Toolbar/Button/CustomButton.php} (74%) rename libraries/{cms/toolbar/button/help.php => src/Toolbar/Button/HelpButton.php} (74%) rename libraries/{cms/toolbar/button/link.php => src/Toolbar/Button/LinkButton.php} (76%) rename libraries/{cms/toolbar/button/popup.php => src/Toolbar/Button/PopupButton.php} (80%) rename libraries/{cms/toolbar/button/separator.php => src/Toolbar/Button/SeparatorButton.php} (68%) rename libraries/{cms/toolbar/button/slider.php => src/Toolbar/Button/SliderButton.php} (76%) rename libraries/{cms/toolbar/button/standard.php => src/Toolbar/Button/StandardButton.php} (73%) rename libraries/{cms/toolbar/toolbar.php => src/Toolbar/Toolbar.php} (62%) rename libraries/{cms/toolbar/button.php => src/Toolbar/ToolbarButton.php} (67%) create mode 100644 libraries/src/UCM/UCM.php create mode 100644 libraries/src/UCM/UCMBase.php rename libraries/{cms/ucm/content.php => src/UCM/UCMContent.php} (65%) rename libraries/{cms/ucm/type.php => src/UCM/UCMType.php} (86%) rename libraries/{joomla/updater/adapters/collection.php => src/Updater/Adapter/CollectionAdapter.php} (82%) rename libraries/{joomla/updater/adapters/extension.php => src/Updater/Adapter/ExtensionAdapter.php} (80%) create mode 100644 libraries/src/Updater/DownloadSource.php rename libraries/{joomla/updater/update.php => src/Updater/Update.php} (78%) rename libraries/{joomla/updater/updateadapter.php => src/Updater/UpdateAdapter.php} (79%) rename libraries/{joomla/updater/updater.php => src/Updater/Updater.php} (87%) rename libraries/{joomla/uri/uri.php => src/Uri/Uri.php} (93%) rename libraries/{joomla/user/user.php => src/User/User.php} (82%) rename libraries/{joomla/user/helper.php => src/User/UserHelper.php} (84%) rename libraries/{joomla/user/wrapper/helper.php => src/User/UserWrapper.php} (67%) rename libraries/{joomla/utilities/buffer.php => src/Utility/BufferStreamHandler.php} (83%) rename libraries/{joomla/utilities/utility.php => src/Utility/Utility.php} (71%) rename libraries/{cms/version/version.php => src/Version.php} (70%) create mode 100644 libraries/vendor/joomla/archive/LICENSE create mode 100644 libraries/vendor/joomla/archive/src/Archive.php create mode 100644 libraries/vendor/joomla/archive/src/Bzip2.php create mode 100644 libraries/vendor/joomla/archive/src/ExtractableInterface.php create mode 100644 libraries/vendor/joomla/archive/src/Gzip.php create mode 100644 libraries/vendor/joomla/archive/src/Tar.php create mode 100644 libraries/vendor/joomla/archive/src/Zip.php create mode 100644 libraries/vendor/joomla/di/src/Exception/KeyNotFoundException.php create mode 100644 libraries/vendor/joomla/di/src/Exception/ProtectedKeyException.php create mode 100644 libraries/vendor/joomla/filesystem/LICENSE create mode 100644 libraries/vendor/joomla/filesystem/meta/language/en-GB/en-GB.lib_joomla_filesystem_patcher.ini create mode 100644 libraries/vendor/joomla/filesystem/src/Buffer.php create mode 100644 libraries/vendor/joomla/filesystem/src/Clients/FtpClient.php create mode 100644 libraries/vendor/joomla/filesystem/src/Exception/FilesystemException.php create mode 100644 libraries/vendor/joomla/filesystem/src/File.php create mode 100644 libraries/vendor/joomla/filesystem/src/Folder.php create mode 100644 libraries/vendor/joomla/filesystem/src/Helper.php create mode 100644 libraries/vendor/joomla/filesystem/src/Patcher.php create mode 100644 libraries/vendor/joomla/filesystem/src/Path.php create mode 100644 libraries/vendor/joomla/filesystem/src/Stream.php create mode 100644 libraries/vendor/joomla/filesystem/src/Stream/String.php create mode 100644 libraries/vendor/joomla/filesystem/src/Stream/StringWrapper.php create mode 100644 libraries/vendor/joomla/filesystem/src/Support/StringController.php create mode 100644 libraries/vendor/joomla/image/LICENSE rename libraries/{joomla/image/filter/backgroundfill.php => vendor/joomla/image/src/Filter/Backgroundfill.php} (85%) rename libraries/{joomla/image/filter/brightness.php => vendor/joomla/image/src/Filter/Brightness.php} (62%) rename libraries/{joomla/image/filter/contrast.php => vendor/joomla/image/src/Filter/Contrast.php} (62%) rename libraries/{joomla/image/filter/edgedetect.php => vendor/joomla/image/src/Filter/Edgedetect.php} (50%) create mode 100644 libraries/vendor/joomla/image/src/Filter/Emboss.php create mode 100644 libraries/vendor/joomla/image/src/Filter/Grayscale.php create mode 100644 libraries/vendor/joomla/image/src/Filter/Negate.php create mode 100644 libraries/vendor/joomla/image/src/Filter/Sketchy.php rename libraries/{joomla/image/filter/smooth.php => vendor/joomla/image/src/Filter/Smooth.php} (62%) rename libraries/{joomla/image/image.php => vendor/joomla/image/src/Image.php} (66%) create mode 100644 libraries/vendor/joomla/image/src/ImageFilter.php create mode 100644 libraries/vendor/paragonie/sodium_compat/LICENSE create mode 100644 libraries/vendor/paragonie/sodium_compat/autoload-fast.php create mode 100644 libraries/vendor/paragonie/sodium_compat/autoload-pedantic.php create mode 100644 libraries/vendor/paragonie/sodium_compat/autoload.php create mode 100644 libraries/vendor/paragonie/sodium_compat/lib/constants.php create mode 100644 libraries/vendor/paragonie/sodium_compat/lib/namespaced.php create mode 100644 libraries/vendor/paragonie/sodium_compat/lib/php72compat.php create mode 100644 libraries/vendor/paragonie/sodium_compat/lib/sodium_compat.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Compat.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/BLAKE2b.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/ChaCha20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/ChaCha20/Ctx.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/ChaCha20/IetfCtx.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/Curve25519.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Fe.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/Cached.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P1p1.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P2.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P3.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/Precomp.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/H.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/Ed25519.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/HChaCha20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/HSalsa20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/Poly1305.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/Poly1305/State.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/Salsa20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/SipHash.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/Util.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/X25519.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/XChaCha20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Core/Xsalsa20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/Crypto.php create mode 100644 libraries/vendor/paragonie/sodium_compat/namespaced/File.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Compat.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/BLAKE2b.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/ChaCha20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/ChaCha20/Ctx.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/ChaCha20/IetfCtx.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/Curve25519.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/Curve25519/Fe.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/Cached.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/P1p1.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/P2.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/P3.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/Curve25519/Ge/Precomp.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/Curve25519/H.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/Ed25519.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/HChaCha20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/HSalsa20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/Poly1305.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/Poly1305/State.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/Salsa20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/SipHash.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/Util.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/X25519.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/XChaCha20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core/Xsalsa20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/BLAKE2b.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/ChaCha20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/ChaCha20/Ctx.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/ChaCha20/IetfCtx.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/Curve25519.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Fe.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/Cached.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P1p1.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P2.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/P3.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/Curve25519/Ge/Precomp.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/Curve25519/H.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/Curve25519/README.md create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/Ed25519.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/HChaCha20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/HSalsa20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/Int32.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/Int64.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/Poly1305.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/Poly1305/State.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/Salsa20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/SipHash.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/Util.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/X25519.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/XChaCha20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Core32/XSalsa20.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Crypto.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/Crypto32.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/File.php create mode 100644 libraries/vendor/paragonie/sodium_compat/src/SodiumException.php create mode 100644 libraries/vendor/psr/container/LICENSE create mode 100644 libraries/vendor/psr/container/src/ContainerExceptionInterface.php create mode 100644 libraries/vendor/psr/container/src/ContainerInterface.php create mode 100644 libraries/vendor/psr/container/src/NotFoundExceptionInterface.php create mode 100644 libraries/vendor/symfony/polyfill-ctype/Ctype.php create mode 100644 libraries/vendor/symfony/polyfill-ctype/LICENSE create mode 100644 libraries/vendor/symfony/polyfill-ctype/bootstrap.php create mode 100644 libraries/vendor/symfony/polyfill-php73/LICENSE create mode 100644 libraries/vendor/symfony/polyfill-php73/bootstrap.php create mode 100644 media/editors/codemirror/theme/darcula.css create mode 100644 media/editors/codemirror/theme/gruvbox-dark.css create mode 100644 media/editors/codemirror/theme/idea.css create mode 100644 media/editors/codemirror/theme/lucario.css create mode 100644 media/editors/codemirror/theme/oceanic-next.css create mode 100644 media/editors/codemirror/theme/shadowfox.css create mode 100644 media/editors/codemirror/theme/ssms.css create mode 100644 media/mod_sampledata/js/sampledata-process.js create mode 100644 media/system/js/fields/calendar-locales/bn.js create mode 100644 media/system/js/fields/calendar-locales/lt.js create mode 100644 media/system/js/fields/calendar-locales/ru.js create mode 100644 media/system/js/polyfill.xpath-uncompressed.js create mode 100644 media/system/js/polyfill.xpath.js create mode 100644 media/system/js/tabs-state-uncompressed.js create mode 100644 plugins/captcha/recaptcha/postinstall/actions.php create mode 100644 plugins/sampledata/blog/blog.php create mode 100644 plugins/sampledata/blog/blog.xml create mode 100644 plugins/system/redirect/form/excludes.xml create mode 100644 plugins/system/sessiongc/sessiongc.php create mode 100644 plugins/system/sessiongc/sessiongc.xml create mode 100644 tests/codeception/README.md create mode 100644 tests/codeception/_bootstrap.php create mode 100644 tests/codeception/_data/dump.sql create mode 100644 tests/codeception/_support/AcceptanceTester.php create mode 100644 tests/codeception/_support/FunctionalTester.php create mode 100644 tests/codeception/_support/Helper/Acceptance.php create mode 100644 tests/codeception/_support/Helper/Functional.php create mode 100644 tests/codeception/_support/Helper/JoomlaDb.php create mode 100644 tests/codeception/_support/Helper/Unit.php create mode 100644 tests/codeception/_support/Page/Acceptance/Administrator/AdminPage.php create mode 100644 tests/codeception/_support/Page/Acceptance/Administrator/UserManagerPage.php create mode 100644 tests/codeception/_support/Page/Acceptance/Site/FrontPage.php create mode 100644 tests/codeception/_support/Shared/UserCredentials.php create mode 100644 tests/codeception/_support/UnitTester.php create mode 100644 tests/codeception/acceptance.suite.dist.yml create mode 100644 tests/codeception/acceptance/_bootstrap.php create mode 100644 tests/codeception/acceptance/administrator/components/com_users/UserCest.php create mode 100644 tests/codeception/acceptance/components/com_users/UserCest.php create mode 100644 tests/codeception/acceptance/install/InstallCest.php create mode 100644 tests/codeception/composer.json create mode 100644 tests/codeception/composer.lock create mode 100644 tests/codeception/functional.suite.yml create mode 100644 tests/codeception/functional/_bootstrap.php create mode 100644 tests/codeception/travis-ci-apache.conf create mode 100644 tests/codeception/unit.suite.yml create mode 100644 tests/unit/stubs/DummyNamespace/DummyClass.php create mode 100644 tests/unit/stubs/loaderoveralias/jloaderaliasstub.php create mode 100644 tests/unit/stubs/loaderoverride/aliasnewclass.php create mode 100644 tests/unit/stubs/loaderoverride/aliasoverrideclass.php create mode 100644 tests/unit/stubs/loaderoverride/originalnewclass.php create mode 100644 tests/unit/stubs/loaderoverride/originaloverrideclass.php create mode 100644 tests/unit/suites/libraries/joomla/crypt/cipher/JCryptCipherSodiumTest.php diff --git a/.appveyor.yml b/.appveyor.yml index d5fac65bf107b..60cee9472f7bf 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -33,23 +33,32 @@ install: $VC = "vc14" $PHPBuild = "x64" } - - cinst -y sqlite + - appveyor-retry cinst -y sqlite - cd C:\tools\php # Get the MSSQL DLL's - ps: >- If ($env:PHP -eq "1") { If ($env:php_ver_target -eq "5.6") { - appveyor-retry appveyor DownloadFile https://files.nette.org/misc/php-sqlsrv.zip + $source = "https://cdn.joomla.org/ci/php-sqlsrv.zip" + $destination = "c:\tools\php\php-sqlsrv.zip" + Invoke-WebRequest $source -OutFile $destination + #appveyor-retry appveyor DownloadFile https://cdn.joomla.org/ci/php-sqlsrv.zip 7z x -y php-sqlsrv.zip > $null copy SQLSRV\php_sqlsrv_56_nts.dll ext\php_sqlsrv_nts.dll copy SQLSRV\php_pdo_sqlsrv_56_nts.dll ext\php_pdo_sqlsrv_nts.dll Remove-Item C:\tools\php\* -include .zip } Else { - $DLLVersion = "4.1.6.1" + $DLLVersion = "4.3.0" cd c:\tools\php\ext - appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip + $source = "http://windows.php.net/downloads/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip" + $destination = "c:\tools\php\ext\php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip" + Invoke-WebRequest $source -OutFile $destination + #appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip 7z x -y php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip > $null - appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip + $source = "http://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip" + $destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip" + Invoke-WebRequest $source -OutFile $destination + #appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip 7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip > $null Remove-Item c:\tools\php\ext* -include .zip cd c:\tools\php}} @@ -83,7 +92,10 @@ install: If ($env:PHP -eq "1") { If ($env:php_ver_target -eq "5.6") {$wincache = "1.3.7.12"} Else {$wincache = "2.0.0.8"} cd c:\tools\php\ext - appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip + $source = "http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip" + $destination = "c:\tools\php\ext\php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip" + Invoke-WebRequest $source -OutFile $destination + #appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip 7z x -y php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip > $null Remove-Item C:\tools\php\ext* -include .zip cd c:\tools\php} @@ -91,6 +103,7 @@ install: - IF %PHP%==1 echo wincache.enablecli = 1 >> php.ini - IF %PHP%==1 echo zend_extension=php_opcache.dll >> php.ini - IF %PHP%==1 echo opcache.enable_cli=1 >> php.ini + - IF %PHP%==1 echo extension=php_ldap.dll >> php.ini - IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat - appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar - cd C:\projects\joomla-cms diff --git a/.drone.yml b/.drone.yml index 85f368db19b48..da8e3fda4a91b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,7 +7,7 @@ pipeline: image: joomlaprojects/docker-phpcs commands: - echo $(date) - - /root/.composer/vendor/bin/phpcs --report=full --extensions=php -p --standard=build/phpcs/Joomla . + - /root/.composer/vendor/bin/phpcs --report=full --encoding=utf-8 --extensions=php -p --standard=build/phpcs/Joomla . - echo $(date) javascript: @@ -26,3 +26,12 @@ pipeline: - tests/javascript/node_modules/karma/bin/karma start karma.conf.js --single-run - echo $(date) + analysis: + image: rips/rips-cli + secrets: [rips_username, rips_password] + commands: + - export RIPS_BASE_URI='https://api.rips.joomla.org' + - export RIPS_USERNAME=$RIPS_USERNAME + - export RIPS_PASSWORD=$RIPS_PASSWORD + - rips-cli rips:scan:start -a 1 -t 1 -p $(pwd) -t 1 -T $DRONE_REPO_OWNER-$DRONE_BRANCH || { echo "Please contact the security team at security@joomla.org"; exit 1; } + diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000000..3af433d8336f1 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,60 @@ +# Custom Fields +administrator/components/com_fields/* @laoneo +components/com_fields/* @laoneo +plugins/content/fields/* @laoneo +plugins/editors-xtd/fields/* @laoneo +plugins/fields/* @laoneo +plugins/systems/fields/* @laoneo + +# Smart Search +administrator/components/com_finder/* @mbabker +components/com_finder/* @mbabker +modules/mod_finder/* @mbabker +plugins/content/finder/* @mbabker +plugins/finder/* @mbabker + +# Language strings +administrator/language/en-GB/* @brianteeman +installation/language/en-GB/* @brianteeman +language/en-GB/* @brianteeman +README.md @brianteeman +README.txt @brianteeman + +# CodeMirror +media/editors/codemirror/* @okonomiyaki3000 +plugins/editors/codemirror/* @okonomiyaki3000 + +# Statistics Server +plugins/system/stats/* @mbabker @wilsonge + +# Release Tools +build.xml @mbabker +build/build.php @mbabker @rdeutz @wilsonge +build/bump.php @mbabker @rdeutz @wilsonge +build/deleted_file_check.php @mbabker @rdeutz @wilsonge + +# Core/Extension Install/Update Tools +administrator/components/com_joomlaupdate/* @mbabker @rdeutz @wilsonge @zero-24 +libraries/src/Installer/* @mbabker @rdeutz @wilsonge @zero-24 +libraries/src/Updater/* @mbabker @rdeutz @wilsonge @zero-24 + +# Automated Testing +build/jenkins/* @mbabker @rdeutz +build/travis/* @mbabker @rdeutz +tests/codeception/* @rdeutz +tests/javascript/* @dgt41 @rdeutz +tests/unit/* @mbabker @rdeutz +.appveyor.yml @mbabker @rdeutz +.drone.yml @rdeutz +.hound.yml @mbabker +.travis.yml @mbabker @rdeutz +appveyor-phpunit.xml @mbabker @rdeutz +codeception.yml @rdeutz +karma.conf.js @dgt41 @rdeutz +phpunit.xml.dist @mbabker @rdeutz +RoboFile.dist.ini @rdeutz +RoboFile.php @rdeutz +travis-phpunit.xml @mbabker @rdeutz + +# Core JS +media/*/js/* @dgt41 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index a569407e7d792..8de2598070b5a 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -20,6 +20,6 @@ There are other branches available which serve specific purposes. | Branch | Purpose | | ------ | ------- | | staging | Current codebase. Branch for the next minor Joomla version. New backward compatible features go into this branch. | -| master | Each commit made to staging gets tested if it passes unit tests and codestyle rules. It is then merged into master. This is done automatically. | -| 3.8-dev | Branch for the next minor Joomla version. The 3.8.0 release will only include compatibility features for 4.0. Commits to staging will be applied to this branch as well. | +| 3.9-dev | Branch for the next minor Joomla version. The 3.9.0 release will include the Privacy Tools Suite features. Commits to staging will be applied to this branch as well. | +| 3.10-dev | Branch for the next minor Joomla version. The 3.10.0 release will only include compatibility features for 4.0. Commits to staging will be applied to this branch as well. | | 4.0-dev | Branch for the next major Joomla version. New features go into this branch. Commits to staging will be applied to this branch as well. | diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md new file mode 100644 index 0000000000000..f234699b23618 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -0,0 +1,23 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +### Steps to reproduce the issue + + + +### Expected result + + + +### Actual result + + + +### System information (as much as possible) + + + +### Additional comments diff --git a/.github/ISSUE_TEMPLATE/Custom.md b/.github/ISSUE_TEMPLATE/Custom.md new file mode 100644 index 0000000000000..1c32a221edc25 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Custom.md @@ -0,0 +1,16 @@ +--- +name: Fix this template +about: Suggest a fix it + +--- + +### What needs to be fixed + + +### Why this should be fixed + + +### How would you fix it + + +### Side Effects expected diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md new file mode 100644 index 0000000000000..e853c4610a791 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Feature_request.md @@ -0,0 +1,15 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +### Is your feature request related to a problem? Please describe. + + + +### Describe the solution you'd like + + + +### Additional context diff --git a/.github/ISSUE_TEMPLATE/Security.md b/.github/ISSUE_TEMPLATE/Security.md new file mode 100644 index 0000000000000..d7ff7ea26e670 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Security.md @@ -0,0 +1,11 @@ +--- +name: Security +about: Report a security issue + +--- + +Security issues should **NOT** be reported on this repository. + +If you believe you have found a security issue, please contact the Joomla Security Strike Team via email at security@joomla.org or through the contact form at https://developer.joomla.org/security/contact-the-team.html. + +Please see https://developer.joomla.org/security.html for more information on how the Joomla project responds to security issues. diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md new file mode 100644 index 0000000000000..f716bd5f7e8e5 --- /dev/null +++ b/.github/SUPPORT.md @@ -0,0 +1,8 @@ +Where can you get support and help? +==================== +* [The Joomla! Documentation](https://docs.joomla.org/Special:MyLanguage/Main_Page); +* [Frequently Asked Questions](https://docs.joomla.org/Special:MyLanguage/Category:FAQ) (FAQ); +* Find the [information you need](https://docs.joomla.org/Special:MyLanguage/Start_here); +* Find [help and other users](https://www.joomla.org/about-joomla/create-and-share.html); +* Post questions at [our forums](https://forum.joomla.org); +* [Joomla Resources Directory](https://resources.joomla.org) (JRD). diff --git a/.gitignore b/.gitignore index bbfb1deaa049f..fea6b1c925bcc 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,8 @@ /administrator/logs /cache /installation/cache +/installation/sessions +/libraries/autoload_psr4.php /tmp /configuration.php /.htaccess @@ -21,6 +23,9 @@ # Test Related Files # /phpunit.xml +# Stubs file holding mapped classes +/stubs.php + # Node modules # node_modules/ @@ -36,6 +41,16 @@ phpdoc-* # Install from Web plugin # /plugins/installer/webinstaller +# Languages # +administrator/language/* +!administrator/language/en-GB +administrator/manifests/packages/* +!administrator/manifests/packages/pkg_en-GB.xml +!administrator/language/overrides/index.html +language/* +!language/en-GB +!language/overrides/index.html + # OSX # ._* .Spotlight-V100 @@ -61,17 +76,20 @@ Desktop.ini /libraries/vendor/ircmaxell/password-compat/phpunit.xml.dist /libraries/vendor/ircmaxell/password-compat/README.md /libraries/vendor/ircmaxell/password-compat/version-test.php +/libraries/vendor/joomla/*/.gitattributes /libraries/vendor/joomla/*/.github /libraries/vendor/joomla/*/.gitignore /libraries/vendor/joomla/*/.gitmodules /libraries/vendor/joomla/*/docs /libraries/vendor/joomla/*/Tests /libraries/vendor/joomla/*/vendor +/libraries/vendor/joomla/*/.scrutinizer.yml /libraries/vendor/joomla/*/.travis.yml /libraries/vendor/joomla/*/CONTRIBUTING.md /libraries/vendor/joomla/*/composer.json /libraries/vendor/joomla/*/phpunit.xml.dist /libraries/vendor/joomla/*/README.md +/libraries/vendor/joomla/*/ruleset.xml /libraries/vendor/joomla/session/Joomla/Session/.github /libraries/vendor/joomla/session/Joomla/Session/_Tests /libraries/vendor/joomla/session/Joomla/Session/build @@ -95,10 +113,23 @@ Desktop.ini /libraries/vendor/paragonie/random_compat/other /libraries/vendor/paragonie/random_compat/CHANGELOG.md /libraries/vendor/paragonie/random_compat/ERRATA.md +/libraries/vendor/paragonie/random_compat/RATIONALE.md /libraries/vendor/paragonie/random_compat/README.md /libraries/vendor/paragonie/random_compat/SECURITY.md +/libraries/vendor/paragonie/random_compat/build-phar.sh /libraries/vendor/paragonie/random_compat/composer.json +/libraries/vendor/paragonie/random_compat/psalm-autoload.php +/libraries/vendor/paragonie/random_compat/psalm.xml /libraries/vendor/paragonie/random_compat/tests +/libraries/vendor/paragonie/sodium_compat/.gitignore +/libraries/vendor/paragonie/sodium_compat/appveyor.yml +/libraries/vendor/paragonie/sodium_compat/build-phar.sh +/libraries/vendor/paragonie/sodium_compat/composer.json +/libraries/vendor/paragonie/sodium_compat/composer.lock +/libraries/vendor/paragonie/sodium_compat/dist +/libraries/vendor/paragonie/sodium_compat/phpunit.xml.dist +/libraries/vendor/paragonie/sodium_compat/README.md +/libraries/vendor/paragonie/sodium_compat/src/Core/Curve25519/README.md /libraries/vendor/phpmailer/phpmailer/docs /libraries/vendor/phpmailer/phpmailer/examples /libraries/vendor/phpmailer/phpmailer/language @@ -108,21 +139,33 @@ Desktop.ini /libraries/vendor/phpmailer/phpmailer/.travis.yml /libraries/vendor/phpmailer/phpmailer/changelog.md /libraries/vendor/phpmailer/phpmailer/composer.json +/libraries/vendor/phpmailer/phpmailer/ISSUE_TEMPLATE.md +/libraries/vendor/phpmailer/phpmailer/phpdoc.dist.xml /libraries/vendor/phpmailer/phpmailer/README.md /libraries/vendor/phpmailer/phpmailer/travis.phpunit.xml.dist +/libraries/vendor/phpmailer/phpmailer/UPGRADING.md /libraries/vendor/phpmailer/phpmailer/extras/README.md /libraries/vendor/phpmailer/phpmailer/get_oauth_token.php +/libraries/vendor/psr/container/.gitignore +/libraries/vendor/psr/container/composer.json +/libraries/vendor/psr/container/README.md /libraries/vendor/psr/log/Psr/Log/Test /libraries/vendor/psr/log/.gitignore /libraries/vendor/psr/log/composer.json /libraries/vendor/psr/log/README.md +/libraries/vendor/symfony/polyfill-ctype/composer.json +/libraries/vendor/symfony/polyfill-ctype/README.md /libraries/vendor/symfony/polyfill-php55/composer.json /libraries/vendor/symfony/polyfill-php55/README.md /libraries/vendor/symfony/polyfill-php56/composer.json /libraries/vendor/symfony/polyfill-php56/README.md +/libraries/vendor/symfony/polyfill-php73/composer.json +/libraries/vendor/symfony/polyfill-php73/README.md /libraries/vendor/symfony/polyfill-util/composer.json /libraries/vendor/symfony/polyfill-util/README.md +/libraries/vendor/symfony/polyfill-util/LegacyTestListener.php /libraries/vendor/symfony/polyfill-util/TestListener.php +/libraries/vendor/symfony/polyfill-util/TestListenerTrait.php /libraries/vendor/symfony/yaml/Tests /libraries/vendor/symfony/yaml/.gitignore /libraries/vendor/symfony/yaml/CHANGELOG.md @@ -139,3 +182,19 @@ Desktop.ini /libraries/vendor/simplepie/simplepie/build /libraries/vendor/simplepie/simplepie/idn/ReadMe.txt /libraries/vendor/simplepie/simplepie/composer.json + +# System Test related files +tests/codeception/acceptance.suite.yml +tests/codeception/_support/_generated/*TesterActions.php +tests/codeception/joomla-cms* +tests/codeception/_output* +selenium-server-standalone.jar +selenium.log +tests/codeception/cache +tests/codeception/_output +tests/codeception/vendor +composer.phar + +# Build related +RoboFile.ini + diff --git a/.hound.yml b/.hound.yml new file mode 100644 index 0000000000000..87a3326e2f952 --- /dev/null +++ b/.hound.yml @@ -0,0 +1,13 @@ +fail_on_violations: false + +scss: + enabled: false + +jshint: + enabled: false + +eslint: + enabled: false + +ruby: + enabled: false diff --git a/.travis.yml b/.travis.yml index 8595f2f766792..070893c5e55d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,35 +13,29 @@ env: matrix: fast_finish: true include: + - php: 7.0 + env: INSTALL_APCU="yes" INSTALL_MEMCACHE="no" + - php: 7.1 + env: INSTALL_APCU="yes" INSTALL_MEMCACHE="no" + # Requires older Precise image - php: 5.3 env: INSTALL_APC="yes" + sudo: true + dist: precise + # The new Trusty image has issues with running APC, do not enable it here - php: 5.4 - env: INSTALL_APC="yes" + env: INSTALL_APC="no" - php: 5.5 env: INSTALL_APCU="yes" - php: 5.6 env: INSTALL_APCU="yes" - - php: 7.0 - env: INSTALL_APCU="yes" INSTALL_APCU_BC_BETA="no" INSTALL_MEMCACHE="no" INSTALL_MEMCACHED="no" INSTALL_REDIS="no" # Disabled apcu_bc install until https://github.com/travis-ci/travis-ci/issues/5207 is resolved - - php: 7.1 - env: INSTALL_APCU="yes" INSTALL_APCU_BC_BETA="no" INSTALL_MEMCACHE="no" INSTALL_MEMCACHED="no" INSTALL_REDIS="no" # Disabled apcu_bc install until https://github.com/travis-ci/travis-ci/issues/5207 is resolved - - php: hhvm - sudo: true - dist: trusty - group: edge # until the next update - addons: - apt: - packages: - - mysql-server-5.6 - - mysql-client-core-5.6 - - mysql-client-5.6 - services: - - mysql - - postgresql - - redis-server - env: INSTALL_APCU_BC_BETA="no" INSTALL_MEMCACHE="no" INSTALL_MEMCACHED="no" # Disabled items that currently do not work in travis-ci hhvm + - php: 7.2 + env: INSTALL_APCU="yes" INSTALL_MEMCACHE="no" + - php: nightly + env: INSTALL_APCU="yes" INSTALL_MEMCACHE="no" allow_failures: - - php: hhvm + - php: 7.2 + - php: nightly services: - memcache diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000000000..5b7fd8f3ce9e2 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,75 @@ +#!groovy + +pipeline { + agent any + + stages { + + stage('codestyles') { + agent { + docker 'joomlaprojects/docker-phpcs' + } + steps { + sh '/usr/local/vendor/bin/phpcs --report=full --extensions=php -p --standard=build/phpcs/Joomla .' + } + } + + stage("Testing PHP") { + steps { + // You can only use the parallel step if it's the *only* step in the stage. + parallel( + PHP53: { + sh 'export PHPVERSION=php53;/usr/local/bin/docker-compose --project-name php53-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh' + }, + PHP54: { + sh 'export PHPVERSION=php54;/usr/local/bin/docker-compose --project-name php54-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh' + }, + PHP55: { + sh 'export PHPVERSION=php55;/usr/local/bin/docker-compose --project-name php55-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh' + }, + PHP56: { + sh 'export PHPVERSION=php56;/usr/local/bin/docker-compose --project-name php56-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh' + }, + PHP70: { + sh 'export PHPVERSION=php70;/usr/local/bin/docker-compose --project-name php70-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh' + }, + PHP71: { + sh 'export PHPVERSION=php71;/usr/local/bin/docker-compose --project-name php71-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh' + } + ) + } + post { + always { + // Spin down containers no matter what happens + sh 'export PHPVERSION=php53;/usr/local/bin/docker-compose --project-name php53-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down' + sh 'export PHPVERSION=php54;/usr/local/bin/docker-compose --project-name php54-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down' + sh 'export PHPVERSION=php55;/usr/local/bin/docker-compose --project-name php55-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down' + sh 'export PHPVERSION=php56;/usr/local/bin/docker-compose --project-name php56-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down' + sh 'export PHPVERSION=php70;/usr/local/bin/docker-compose --project-name php70-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down' + sh 'export PHPVERSION=php71;/usr/local/bin/docker-compose --project-name php71-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down' + } + } + } + + stage('Testing-Javascript') { + agent { + docker { + image 'joomlaprojects/docker-systemtests' + args '--user 0' + } + } + steps { + sh ''' + ln -s /usr/bin/nodejs /usr/bin/node && \ + export DISPLAY=:0 && \ + (Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset &) && \ + sleep 3 && \ + (fluxbox &) && \ + cd tests/javascript && npm install --no-optional && cd ../.. && \ + tests/javascript/node_modules/karma/bin/karma start karma.conf.js --single-run + ''' + } + } + } + +} diff --git a/README.md b/README.md index 00e0c5964b458..0fe606fe5be58 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,18 @@ -Joomla! CMS™ [![Analytics](https://ga-beacon.appspot.com/UA-544070-3/joomla-cms/readme)](https://github.com/igrigorik/ga-beacon) +Joomla! CMS™ [![Analytics](https://ga-beacon.appspot.com/UA-544070-3/joomla-cms/readme)](https://github.com/igrigorik/ga-beacon) [![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com) ==================== Build Status --------------------- -Travis-CI: [![Build Status](https://travis-ci.org/joomla/joomla-cms.svg?branch=staging)](https://travis-ci.org/joomla/joomla-cms) - -Drone -CI: [![Build Status](http://213.160.72.75/api/badges/joomla/joomla-cms/status.svg)](http://213.160.72.75/joomla/joomla-cms) - -AppVeyor: [![Build status](https://ci.appveyor.com/api/projects/status/bpcxulw6nnxlv8kb/branch/staging?svg=true)](https://ci.appveyor.com/project/joomla/joomla-cms) - -Jenkins: [![Build Status](http://build.joomla.org/job/cms/badge/icon)](http://build.joomla.org/job/cms/) +| Travis-CI | Drone-CI | AppVeyor | Jenkins | +| ------------- | ------------- | ------------- | ------------- | +| [![Build Status](https://travis-ci.org/joomla/joomla-cms.svg?branch=staging)](https://travis-ci.org/joomla/joomla-cms) | [![Build Status](http://213.160.72.75/api/badges/joomla/joomla-cms/status.svg)](http://213.160.72.75/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/bpcxulw6nnxlv8kb/branch/staging?svg=true)](https://ci.appveyor.com/project/joomla/joomla-cms) | [![Build Status](http://build.joomla.org/job/cms/badge/icon)](http://build.joomla.org/job/cms/) | What is this? --------------------- * This is a Joomla! 3.x installation/upgrade package. * Joomla's [Official website](https://www.joomla.org). -* Joomla! 3.7 [version history](https://docs.joomla.org/Joomla_3.7_version_history). -* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/master). +* Joomla! 3.8 [version history](https://docs.joomla.org/Special:MyLanguage/Joomla_3.8_version_history). +* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/staging). What is Joomla? --------------------- @@ -26,20 +22,20 @@ What is Joomla? Is Joomla! for you? --------------------- -* Joomla! is [the right solution for most content web projects](https://docs.joomla.org/Portal:Learn_More). +* Joomla! is [the right solution for most content web projects](https://docs.joomla.org/Special:MyLanguage/Portal:Learn_More). * View Joomla's [core features here](https://www.joomla.org/core-features.html). * Try it out for yourself in our [online demo](https://demo.joomla.org). How to find a Joomla! translation? --------------------- * Repository of [accredited language packs](https://community.joomla.org/translations.html). -* You can also [add languages](https://docs.joomla.org/J3.x:Setup_a_Multilingual_Site/Installing_New_Language) directly to your website via your Joomla! administration panel. -* Learn how to [setup a Multilingual Joomla! Site](https://docs.joomla.org/J3.x:Setup_a_Multilingual_Site) +* You can also [add languages](https://docs.joomla.org/Special:MyLanguage/J3.x:Setup_a_Multilingual_Site/Installing_New_Language) directly to your website via your Joomla! administration panel. +* Learn how to [setup a Multilingual Joomla! Site](https://docs.joomla.org/Special:MyLanguage/J3.x:Setup_a_Multilingual_Site) Learn Joomla! --------------------- -* Read ['Getting Started with Joomla!'](https://docs.joomla.org/J3.x:Getting_Started_with_Joomla!) to learn the basics. -* Before installing, read the ['Beginners' Guide'](https://docs.joomla.org/Portal:Beginners). +* Read ['Getting Started with Joomla!'](https://docs.joomla.org/Special:MyLanguage/J3.x:Getting_Started_with_Joomla!) to learn the basics. +* Before installing, read the ['Beginners' Guide'](https://docs.joomla.org/Special:MyLanguage/Portal:Beginners). What are the benefits of Joomla? --------------------- @@ -51,13 +47,13 @@ Is it easy to change the layout display? --------------------- * The layout is controlled by templates that you can edit. * There are a lot of ready-made professional templates that you can download. -* Template management information is [available here](https://docs.joomla.org/Portal:Template_Management). +* Template management information is [available here](https://docs.joomla.org/Special:MyLanguage/Portal:Template_Management). Ready to install Joomla? --------------------- * Check the [minimum requirements](https://downloads.joomla.org/technical-requirements). -* How do you [install Joomla](https://docs.joomla.org/J3.x:Installing_Joomla)? -* You could start your Joomla! experience by [building your site on a local test server](https://docs.joomla.org/Installing_Joomla_locally). +* How do you [install Joomla](https://docs.joomla.org/Special:MyLanguage/J3.x:Installing_Joomla)? +* You could start your Joomla! experience by [building your site on a local test server](https://docs.joomla.org/Special:MyLanguage/Installing_Joomla_locally). When ready, it can be moved to an online hosting account of your choice. Updates are free! @@ -66,31 +62,31 @@ Updates are free! Where can you get support and help? --------------------- -* [The Joomla! Documentation](https://docs.joomla.org/Main_Page); -* [Frequently Asked Questions](https://docs.joomla.org/Category:FAQ) (FAQ); -* Find the [information you need](https://docs.joomla.org/Start_here); +* [The Joomla! Documentation](https://docs.joomla.org/Special:MyLanguage/Main_Page); +* [Frequently Asked Questions](https://docs.joomla.org/Special:MyLanguage/Category:FAQ) (FAQ); +* Find the [information you need](https://docs.joomla.org/Special:MyLanguage/Start_here); * Find [help and other users](https://www.joomla.org/about-joomla/create-and-share.html); * Post questions at [our forums](https://forum.joomla.org); -* [Joomla Resources Directory](https://resources.joomla.org/) (JRD). +* [Joomla Resources Directory](https://resources.joomla.org) (JRD). Do you already have a Joomla! site that isn't built with Joomla! 3.x? --------------------- * What's [new in Joomla! 3.x](https://www.joomla.org/3)? -* What are the [main differences between 2.5 and 3.x](https://docs.joomla.org/What_are_the_major_differences_between_Joomla!_2.5_and_3.x%3F)? -* How to [migrate from 2.5.x to 3.x](https://docs.joomla.org/Joomla_2.5_to_3.x_Step_by_Step_Migration). -* How to [migrate from 1.5.x to 3.x](https://docs.joomla.org/Joomla_1.5_to_3.x_Step_by_Step_Migration). +* What are the [main differences between 2.5 and 3.x](https://docs.joomla.org/Special:MyLanguage/What_are_the_major_differences_between_Joomla!_2.5_and_3.x%3F)? +* How to [migrate from 2.5.x to 3.x](https://docs.joomla.org/Special:MyLanguage/Joomla_2.5_to_3.x_Step_by_Step_Migration). +* How to [migrate from 1.5.x to 3.x](https://docs.joomla.org/Special:MyLanguage/Joomla_1.5_to_3.x_Step_by_Step_Migration). Do you want to improve Joomla? -------------------- -* Where to [request a feature](https://issues.joomla.org/)? -* How do you [report a bug](https://docs.joomla.org/Filing_bugs_and_issues) on the [Issue Tracker](https://issues.joomla.org/)? -* Get Involved: Joomla! is community developed software. [Join the community](https://volunteers.joomla.org/). -* Documentation for [Developers](https://docs.joomla.org/Portal:Developers). -* Documentation for [Web designers](https://docs.joomla.org/Web_designers). +* Where to [request a feature](https://issues.joomla.org)? +* How do you [report a bug](https://docs.joomla.org/Special:MyLanguage/Filing_bugs_and_issues) on the [Issue Tracker](https://issues.joomla.org)? +* Get Involved: Joomla! is community developed software. [Join the community](https://volunteers.joomla.org). +* Documentation for [Developers](https://docs.joomla.org/Special:MyLanguage/Portal:Developers). +* Documentation for [Web designers](https://docs.joomla.org/Special:MyLanguage/Web_designers). Copyright --------------------- -* Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved. -* [Special Thanks](https://docs.joomla.org/Joomla!_Credits_and_Thanks) +* Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved. +* [Special Thanks](https://docs.joomla.org/Special:MyLanguage/Joomla!_Credits_and_Thanks) * Distributed under the GNU General Public License version 2 or later -* See [License details](https://docs.joomla.org/Joomla_Licenses) +* See [License details](https://docs.joomla.org/Special:MyLanguage/Joomla_Licenses) diff --git a/README.txt b/README.txt index 9881b46597896..6d93aedcc1e61 100644 --- a/README.txt +++ b/README.txt @@ -1,8 +1,8 @@ 1- What is this? * This is a Joomla! installation/upgrade package to version 3.x * Joomla! Official site: https://www.joomla.org - * Joomla! 3.7 version history - https://docs.joomla.org/Joomla_3.7_version_history - * Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/master + * Joomla! 3.8 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_3.8_version_history + * Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/staging 2- What is Joomla? * Joomla! is a Content Management System (CMS) which enables you to build Web sites and powerful online applications. @@ -11,18 +11,18 @@ You can find full technical requirements here: https://downloads.joomla.org/technical-requirements. 3- Is Joomla! for you? - * Joomla! is the right solution for most content web projects: https://docs.joomla.org/Portal:Learn_More + * Joomla! is the right solution for most content web projects: https://docs.joomla.org/Special:MyLanguage/Portal:Learn_More * See Joomla's core features - https://www.joomla.org/core-features.html - * Try out our online demo: https://demo.joomla.org/ + * Try out our online demo: https://demo.joomla.org 4- How to find a Joomla! translation? * Repository of accredited language packs: https://community.joomla.org/translations.html - * You can also add languages directly to your website via your Joomla! administration panel: https://docs.joomla.org/J3.x:Setup_a_Multilingual_Site/Installing_New_Language - * Learn how to setup a Multilingual Joomla! Site: https://docs.joomla.org/J3.x:Setup_a_Multilingual_Site + * You can also add languages directly to your website via your Joomla! administration panel: https://docs.joomla.org/Special:MyLanguage/J3.x:Setup_a_Multilingual_Site/Installing_New_Language + * Learn how to setup a Multilingual Joomla! Site: https://docs.joomla.org/Special:MyLanguage/J3.x:Setup_a_Multilingual_Site 5- Learn Joomla! - * Read Getting Started with Joomla to find out the basics: https://docs.joomla.org/J3.x:Getting_Started_with_Joomla! - * Before installing, read the beginners guide: https://docs.joomla.org/Portal:Beginners + * Read Getting Started with Joomla to find out the basics: https://docs.joomla.org/Special:MyLanguage/J3.x:Getting_Started_with_Joomla! + * Before installing, read the beginners guide: https://docs.joomla.org/Special:MyLanguage/Portal:Beginners 6- What are the benefits of Joomla? * The functionality of a Joomla! website can be extended by installing extensions that you can create (or download) to suit your needs. @@ -32,41 +32,41 @@ 7- Is it easy to change the layout display? * The layout is controlled by templates that you can edit. * There are a lot of ready-made professional templates that you can download. - * Check out the template management information: https://docs.joomla.org/Portal:Template_Management + * Check out the template management information: https://docs.joomla.org/Special:MyLanguage/Portal:Template_Management 8- Ready to install Joomla? * Check the minimum requirements here: https://downloads.joomla.org/technical-requirements - * How do you install Joomla - https://docs.joomla.org/J3.x:Installing_Joomla + * How do you install Joomla - https://docs.joomla.org/Special:MyLanguage/J3.x:Installing_Joomla * You could start your Joomla! experience building your site on a local test server. When ready it can be moved to an online hosting account of your choice. - See the tutorial: https://docs.joomla.org/Installing_Joomla_locally + See the tutorial: https://docs.joomla.org/Special:MyLanguage/Installing_Joomla_locally 9- Updates are free! * Always use the latest version: https://downloads.joomla.org/latest 10- Where can you get support and help? - * The Joomla! Documentation: https://docs.joomla.org/Main_Page - * FAQ Frequently Asked Questions: https://docs.joomla.org/Category:FAQ - * Find the information you need: https://docs.joomla.org/Start_here + * The Joomla! Documentation: https://docs.joomla.org/Special:MyLanguage/Main_Page + * FAQ Frequently Asked Questions: https://docs.joomla.org/Special:MyLanguage/Category:FAQ + * Find the information you need: https://docs.joomla.org/Special:MyLanguage/Start_here * Find help and other users: https://www.joomla.org/about-joomla/create-and-share.html * Post questions at our forums: https://forum.joomla.org * Joomla! Resources Directory (JRD): https://resources.joomla.org/ 11- Do you already have a Joomla! site that's not built with Joomla! 3.x ? * What's new in Joomla! 3.x: https://www.joomla.org/3 - * What are the main differences from 2.5 to 3? https://docs.joomla.org/What_are_the_major_differences_between_Joomla!_2.5_and_3.x%3F - * How to migrate from 2.5.x to 3.x? Tutorial: https://docs.joomla.org/Joomla_2.5_to_3.x_Step_by_Step_Migration - * How to migrate from 1.5.x to 3.x? Tutorial: https://docs.joomla.org/Joomla_1.5_to_3.x_Step_by_Step_Migration + * What are the main differences from 2.5 to 3? https://docs.joomla.org/Special:MyLanguage/What_are_the_major_differences_between_Joomla!_2.5_and_3.x%3F + * How to migrate from 2.5.x to 3.x? Tutorial: https://docs.joomla.org/Special:MyLanguage/Joomla_2.5_to_3.x_Step_by_Step_Migration + * How to migrate from 1.5.x to 3.x? Tutorial: https://docs.joomla.org/Special:MyLanguage/Joomla_1.5_to_3.x_Step_by_Step_Migration 12- Do you want to improve Joomla? - * Where to request a feature? https://issues.joomla.org/ - * How do you report a bug? https://docs.joomla.org/Filing_bugs_and_issues - * Get Involved: Joomla! is a community developed software. Join the community at https://volunteers.joomla.org/ - * Documentation for Developers: https://docs.joomla.org/Portal:Developers - * Documentation for Web designers: https://docs.joomla.org/Web_designers + * Where to request a feature? https://issues.joomla.org + * How do you report a bug? https://docs.joomla.org/Special:MyLanguage/Filing_bugs_and_issues + * Get Involved: Joomla! is a community developed software. Join the community at https://volunteers.joomla.org + * Documentation for Developers: https://docs.joomla.org/Special:MyLanguage/Portal:Developers + * Documentation for Web designers: https://docs.joomla.org/Special:MyLanguage/Web_designers Copyright: - * Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved. - * Special Thanks: https://docs.joomla.org/Joomla!_Credits_and_Thanks + * Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved. + * Special Thanks: https://docs.joomla.org/Special:MyLanguage/Joomla!_Credits_and_Thanks * Distributed under the GNU General Public License version 2 or later - * See Licenses details at https://docs.joomla.org/Joomla_Licenses + * See Licenses details at https://docs.joomla.org/Special:MyLanguage/Joomla_Licenses diff --git a/RoboFile.dist.ini b/RoboFile.dist.ini new file mode 100644 index 0000000000000..ea5cafda52596 --- /dev/null +++ b/RoboFile.dist.ini @@ -0,0 +1,6 @@ +; If you want to setup your test website (document root) in a different folder, you can do that here. +; You can also set an absolute path, i.e. /path/to/my/cms/folder +cmsPath = tests/codeception/joomla-cms + +; (Linux / Mac only) If you want to set a different owner for the CMS root folder, you can set it here. +localUser = diff --git a/RoboFile.php b/RoboFile.php new file mode 100644 index 0000000000000..e271464e187ec --- /dev/null +++ b/RoboFile.php @@ -0,0 +1,558 @@ +configuration = $this->getConfiguration(); + $this->cmsPath = $this->getTestingPath(); + + // Set default timezone (so no warnings are generated if it is not set) + date_default_timezone_set('UTC'); + } + + /** + * Get (optional) configuration from an external file + * + * @since 3.7.3 + * + * @return \stdClass|null + */ + public function getConfiguration() + { + $configurationFile = __DIR__ . '/RoboFile.ini'; + + if (!file_exists($configurationFile)) + { + $this->say('No local configuration file'); + + return null; + } + + $configuration = parse_ini_file($configurationFile); + + if ($configuration === false) + { + $this->say('Local configuration file is empty or wrong (check is it in correct .ini format'); + + return null; + } + + return json_decode(json_encode($configuration)); + } + + /** + * Get the correct CMS root path + * + * @since 3.7.3 + * + * @return string + */ + private function getTestingPath() + { + if (empty($this->configuration->cmsPath)) + { + return $this->testsPath . 'joomla-cms'; + } + + if (!file_exists(dirname($this->configuration->cmsPath))) + { + $this->say('CMS path written in local configuration does not exists or is not readable'); + + return $this->testsPath . 'joomla-cms'; + } + + return $this->configuration->cmsPath; + } + + /** + * Creates a testing Joomla site for running the tests (use it before run:test) + * + * @param bool $useHtaccess (1/0) Rename and enable embedded Joomla .htaccess file + * + * @since 3.7.3 + * + * @return void + */ + public function createTestingSite($useHtaccess = false) + { + // Clean old testing site + if (is_dir($this->cmsPath)) + { + try + { + $this->taskDeleteDir($this->cmsPath)->run(); + } + catch (Exception $e) + { + // Sorry, we tried :( + $this->say('Sorry, you will have to delete ' . $this->cmsPath . ' manually.'); + + exit(1); + } + } + + $exclude = ['tests', 'tests-phpunit', '.run', '.github', '.git']; + + $this->copyJoomla($this->cmsPath, $exclude); + + // Optionally change owner to fix permissions issues + if (!empty($this->configuration->localUser)) + { + $this->_exec('chown -R ' . $this->configuration->localUser . ' ' . $this->cmsPath); + } + + // Optionally uses Joomla default htaccess file. Used by TravisCI + if ($useHtaccess == true) + { + $this->say('Renaming htaccess.txt to .htaccess'); + $this->_copy('./htaccess.txt', $this->cmsPath . '/.htaccess'); + $this->_exec('sed -e "s,# RewriteBase /,RewriteBase /tests/codeception/joomla-cms,g" -in-place tests/codeception/joomla-cms/.htaccess'); + } + } + + /** + * Copy the Joomla installation excluding folders + * + * @param string $dst Target folder + * @param array $exclude Exclude list of folders + * + * @throws Exception + * + * @since 3.7.3 + * + * @return void + */ + protected function copyJoomla($dst, $exclude = array()) + { + $dir = @opendir("."); + + if (false === $dir) + { + throw new Exception($this, "Cannot open source directory"); + } + + if (!is_dir($dst)) + { + mkdir($dst, 0755, true); + } + + while (false !== ($file = readdir($dir))) + { + if (in_array($file, $exclude)) + { + continue; + } + + if (($file !== '.') && ($file !== '..')) + { + $srcFile = "." . '/' . $file; + $destFile = $dst . '/' . $file; + + if (is_dir($srcFile)) + { + $this->_copyDir($srcFile, $destFile); + } + else + { + copy($srcFile, $destFile); + } + } + } + + closedir($dir); + } + + /** + * Downloads Composer + * + * @since 3.7.3 + * + * @return void + */ + private function getComposer() + { + // Make sure we have Composer + if (!file_exists($this->testsPath . 'composer.phar')) + { + $this->_exec('curl -o ' . $this->testsPath . 'composer.phar --retry 3 --retry-delay 5 -sS https://getcomposer.org/installer | php'); + } + } + + /** + * Runs Selenium Standalone Server. + * + * @since 3.7.3 + * + * @return void + */ + public function runSelenium() + { + if (!$this->isWindows()) + { + $this->_exec($this->testsPath . "vendor/bin/selenium-server-standalone " . $this->getWebDriver() . ' >> selenium.log 2>&1 &'); + } + else + { + $this->_exec("START java.exe -jar " . $this->getWebDriver() . ' tests\codeception\vendor\joomla-projects\selenium-server-standalone\bin\selenium-server-standalone.jar '); + } + + sleep(3); + } + + /** + * Executes all the Selenium System Tests in a suite on your machine + * + * @param array $opts Array of configuration options: + * - 'use-htaccess': renames and enable embedded Joomla .htaccess file + * - 'env': set a specific environment to get configuration from + * + * @since 3.7.3 + * + * @return mixed + */ + public function runTests($opts = ['use-htaccess' => false, 'env' => 'desktop']) + { + $this->say("Running tests"); + + $this->createTestingSite($opts['use-htaccess']); + + $this->getComposer(); + $this->taskComposerInstall($this->testsPath . 'composer.phar')->run(); + + $this->runSelenium(); + + // Make sure to run the build command to generate AcceptanceTester + if ($this->isWindows()) + { + $this->_exec('php ' . $this->getWindowsPath($this->testsPath . 'vendor/bin/codecept') . ' build'); + $pathToCodeception = $this->getWindowsPath($this->testsPath . 'vendor/bin/codecept'); + } + else + { + $this->_exec('php ' . $this->testsPath . 'vendor/bin/codecept build'); + + $pathToCodeception = $this->testsPath . 'vendor/bin/codecept'; + } + + $this->taskCodecept($pathToCodeception) + ->arg('--steps') + ->arg('--debug') + ->arg('--fail-fast') + ->env($opts['env']) + ->arg($this->testsPath . 'acceptance/install/') + ->run() + ->stopOnFail(); + + $this->taskCodecept() + ->arg('--steps') + ->arg('--debug') + ->arg('--fail-fast') + ->env($opts['env']) + ->arg($this->testsPath . '/acceptance/administrator/components/com_users') + ->run() + ->stopOnFail(); + } + + /** + * Executes a specific Selenium System Tests in your machine + * + * @param string $pathToTestFile Optional name of the test to be run + * @param string $suite Optional name of the suite containing the tests, Acceptance by default. + * + * @since 3.7.3 + * + * @return void + */ + public function runTest($pathToTestFile = null, $suite = 'acceptance') + { + $this->runSelenium(); + + // Make sure to run the build command to generate AcceptanceTester + $path = 'tests/codeception/vendor/bin/codecept'; + $this->_exec('php ' . $this->isWindows() ? $this->getWindowsPath($path) : $path . ' build'); + + if (!$pathToTestFile) + { + $this->say('Available tests in the system:'); + + $iterator = new RecursiveIteratorIterator( + new RecursiveDirectoryIterator( + $this->testsPath . $suite, + RecursiveDirectoryIterator::SKIP_DOTS + ), + RecursiveIteratorIterator::SELF_FIRST + ); + + $tests = array(); + $i = 1; + + $iterator->rewind(); + + while ($iterator->valid()) + { + if (strripos($iterator->getSubPathName(), 'cept.php') + || strripos($iterator->getSubPathName(), 'cest.php') + || strripos($iterator->getSubPathName(), '.feature') + ) + { + $this->say('[' . $i . '] ' . $iterator->getSubPathName()); + + $tests[$i] = $iterator->getSubPathName(); + $i++; + } + + $iterator->next(); + } + + $this->say(''); + $testNumber = $this->ask('Type the number of the test in the list that you want to run...'); + $test = $tests[$testNumber]; + } + + $pathToTestFile = $this->testsPath . $suite . '/' . $test; + + // Loading the class to display the methods in the class + + // Logic to fetch the class name from the file name + $fileName = explode("/", $test); + + // If the selected file is cest only then we will give the option to execute individual methods, we don't need this in cept or feature files + $i = 1; + + if (isset($fileName[1]) && strripos($fileName[1], 'cest')) + { + require $this->testsPath . $suite . '/' . $test; + + $className = explode(".", $fileName[1]); + $class_methods = get_class_methods($className[0]); + + $this->say('[' . $i . '] ' . 'All'); + + $methods[$i] = 'All'; + $i++; + + foreach ($class_methods as $method_name) + { + $reflect = new ReflectionMethod($className[0], $method_name); + + if (!$reflect->isConstructor() && $reflect->isPublic()) + { + $this->say('[' . $i . '] ' . $method_name); + + $methods[$i] = $method_name; + + $i++; + } + } + + $this->say(''); + $methodNumber = $this->ask('Please choose the method in the test that you would want to run...'); + $method = $methods[$methodNumber]; + } + + if (isset($method) && $method != 'All') + { + $pathToTestFile = $pathToTestFile . ':' . $method; + } + + $testPathCodecept = $this->testsPath . 'vendor/bin/codecept'; + + $this->taskCodecept($this->isWindows() ? $this->getWindowsPath($testPathCodecept) : $testPathCodecept) + ->test($pathToTestFile) + ->arg('--steps') + ->arg('--debug') + ->run() + ->stopOnFail(); + } + + /** + * Check if local OS is Windows + * + * @return bool + * + * @since 3.7.3 + */ + private function isWindows() + { + return strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'; + } + + /** + * Return the correct path for Windows (needed by CMD) + * + * @param string $path Linux path + * + * @return string + * + * @since 3.7.3 + */ + private function getWindowsPath($path) + { + return str_replace('/', DIRECTORY_SEPARATOR, $path); + } + + /** + * Detect the correct driver for selenium + * + * @return string the webdriver string to use with selenium + * + * @since 3.7.3 + */ + public function getWebdriver() + { + $suiteConfig = $this->getSuiteConfig(); + $codeceptMainConfig = \Codeception\Configuration::config(); + $browser = $suiteConfig['modules']['config']['JoomlaBrowser']['browser']; + + if ($browser == 'chrome') + { + $driver['type'] = 'webdriver.chrome.driver'; + } + elseif ($browser == 'firefox') + { + $driver['type'] = 'webdriver.gecko.driver'; + } + elseif ($browser == 'MicrosoftEdge') + { + $driver['type'] = 'webdriver.edge.driver'; + + // Check if we are using Windows Insider builds + if ($suiteConfig['modules']['config']['AcceptanceHelper']['MicrosoftEdgeInsiders']) + { + $browser = 'MicrosoftEdgeInsiders'; + } + } + elseif ($browser == 'internet explorer') + { + $driver['type'] = 'webdriver.ie.driver'; + } + + // Check if we have a path for this browser and OS in the codeception settings + if (isset($codeceptMainConfig['webdrivers'][$browser][$this->getOs()])) + { + $driverPath = $codeceptMainConfig['webdrivers'][$browser][$this->getOs()]; + } + else + { + $this->yell('No driver for your browser. Check your browser in acceptance.suite.yml and the webDrivers in codeception.yml'); + + // We can't do anything without a driver, exit + exit(1); + } + + $driver['path'] = $driverPath; + + return '-D' . implode('=', $driver); + } + + /** + * Return the os name + * + * @return string + * + * @since 3.7.3 + */ + private function getOs() + { + $os = php_uname('s'); + + if (strpos(strtolower($os), 'windows') !== false) + { + return 'windows'; + } + + if (strpos(strtolower($os), 'darwin') !== false) + { + return 'mac'; + } + + return 'linux'; + } + + /** + * Get the suite configuration + * + * @param string $suite Name of the test suite + * + * @return array + * + * @since 3.7.3 + */ + private function getSuiteConfig($suite = 'acceptance') + { + if (!$this->suiteConfig) + { + $this->suiteConfig = Symfony\Component\Yaml\Yaml::parse(file_get_contents("tests/codeception/{$suite}.suite.yml")); + } + + return $this->suiteConfig; + } +} diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000000000..449c2a5978fdd --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,39 @@ +# Security Policies and Procedures + +This document outlines security procedures and policies for the `Joomla! Project`. + + * [Reporting a Bug](#reporting-a-bug) + * [Response Handling](#response-handling) + * [Security Announcement Policy](#security-announcement-policy) + * [Further Details on the Joomla! Security Policies](https://security.joomla.org) + +## Reporting a Bug + +The `Joomla` team and community take all security bugs in `Joomla` seriously. + +The Joomla! Project takes security vulnerabilities very seriously. As such, the Joomla! Security Strike Team (JSST) oversees the project's security issues and follows some specific procedures when dealing with these issues. + +If you find a possible vulnerability, please report it to the JSST using the [online form](https://developer.joomla.org/security/contact-the-team.html) or via email at security@joomla.org + +We maintain a list of [GPG keys and addresses](https://developer.joomla.org/security/gpg-keys.html) for the security@joomla.org address and members of the JSST to allow signed and encrypted communications. + +To report an issue in a Joomla! extension, please submit it to the [Vulnerable Extensions List.](https://vel.joomla.org/submit-vel) + +For support with a site which has been attacked, please visit the [Joomla! Forum.](https://forum.joomla.org/viewforum.php?f=714) + +Thank you for improving the security of `Joomla`. + +## Response Handling + +The JSST aims to ensure all issues are handled in a timely manner and for clear communication between the team and issue reporters. As such, we have established the following guidelines for responding to issue reports: + +* Within 24 hours every report gets acknowledged +* Within 7 days every report gets a further response stating either + * the issue is closed (and why) + * the issue is still under investigation; if needed, additional information will be requested +* Within 21 days every report must be resolved unless there are exceptional circumstances requiring additional time + +## Security Announcement Policy +* Verified vulnerabilities will only be publicly announced AFTER a release is issued which fixes the vulnerability. +* All announcements will contain as much information as possible, but will NOT contain step-by-step instructions for the vulnerability. +* The `Joomla! Project` will properly credit individuals and/or organizations who responsibly disclose security issues to the JSST. You can indicate the way you would like to be referred to in the advisory about the vulnerability. Our preference is to use full names. If you do not specify then we will use the contact name associated with the email address the report was received from. You can also request a pseudonym or having your name withheld. diff --git a/administrator/components/com_admin/admin.php b/administrator/components/com_admin/admin.php index e4f61bfbb0ee5..3e0986cdaeed3 100644 --- a/administrator/components/com_admin/admin.php +++ b/administrator/components/com_admin/admin.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/admin.xml b/administrator/components/com_admin/admin.xml index 9cbd5f7140866..aeeaea2513515 100644 --- a/administrator/components/com_admin/admin.xml +++ b/administrator/components/com_admin/admin.xml @@ -3,7 +3,7 @@ com_admin Joomla! Project April 2006 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_admin/controller.php b/administrator/components/com_admin/controller.php index 8d95c42abe836..305dbc4fe703a 100644 --- a/administrator/components/com_admin/controller.php +++ b/administrator/components/com_admin/controller.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/controllers/profile.php b/administrator/components/com_admin/controllers/profile.php index 0c7496f417f33..9b213ca2d1853 100644 --- a/administrator/components/com_admin/controllers/profile.php +++ b/administrator/components/com_admin/controllers/profile.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/helpers/html/directory.php b/administrator/components/com_admin/helpers/html/directory.php index f0b7bb523a603..17a977367489c 100644 --- a/administrator/components/com_admin/helpers/html/directory.php +++ b/administrator/components/com_admin/helpers/html/directory.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/helpers/html/phpsetting.php b/administrator/components/com_admin/helpers/html/phpsetting.php index bf753492dec2d..d84f3cb93ee7e 100644 --- a/administrator/components/com_admin/helpers/html/phpsetting.php +++ b/administrator/components/com_admin/helpers/html/phpsetting.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/helpers/html/system.php b/administrator/components/com_admin/helpers/html/system.php index 6d8c3dc7fb804..cd17d6eb05c3e 100644 --- a/administrator/components/com_admin/helpers/html/system.php +++ b/administrator/components/com_admin/helpers/html/system.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/models/forms/profile.xml b/administrator/components/com_admin/models/forms/profile.xml index ca772b2e257fb..35f6fbd87a0c0 100644 --- a/administrator/components/com_admin/models/forms/profile.xml +++ b/administrator/components/com_admin/models/forms/profile.xml @@ -1,46 +1,56 @@
- - - - - + />
@@ -90,48 +100,63 @@
- + description="COM_ADMIN_USER_FIELD_BACKEND_TEMPLATE_DESC" + client="administrator" + filter="uint" + > - + description="COM_ADMIN_USER_FIELD_BACKEND_LANGUAGE_DESC" + client="administrator" + > - + description="COM_ADMIN_USER_FIELD_FRONTEND_LANGUAGE_DESC" + client="site" + > - + description="COM_ADMIN_USER_FIELD_EDITOR_DESC" + folder="editors" + useaccess="true" + > - + > - + >
diff --git a/administrator/components/com_admin/models/help.php b/administrator/components/com_admin/models/help.php index 9d08624249b92..ed29c3ab6a1d3 100644 --- a/administrator/components/com_admin/models/help.php +++ b/administrator/components/com_admin/models/help.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/models/profile.php b/administrator/components/com_admin/models/profile.php index 9cc985eb23d01..79f84acb803e6 100644 --- a/administrator/components/com_admin/models/profile.php +++ b/administrator/components/com_admin/models/profile.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/models/sysinfo.php b/administrator/components/com_admin/models/sysinfo.php index c8d8850f46558..b08decc9be32a 100644 --- a/administrator/components/com_admin/models/sysinfo.php +++ b/administrator/components/com_admin/models/sysinfo.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -118,11 +118,15 @@ class AdminModelSysInfo extends JModelLegacy 'proxy_host', 'proxy_user', 'proxy_pass', + 'redis_server_host', + 'redis_server_auth', 'secret', 'sendmail', 'session.save_path', 'session_memcache_server_host', 'session_memcached_server_host', + 'session_redis_server_host', + 'session_redis_server_auth', 'sitename', 'smtphost', 'tmp_path', @@ -159,7 +163,7 @@ class AdminModelSysInfo extends JModelLegacy * Remove sections of data marked as private in the privateSettings * * @param array $dataArray Array with data tha may contain private informati - * @param string $dataType Type of data to search for an specific section in the privateSettings array + * @param string $dataType Type of data to search for a specific section in the privateSettings array * * @return array * @@ -193,7 +197,7 @@ protected function cleanPrivateData($dataArray, $dataType = 'other') } /** - * Offuscate section values + * Obfuscate section values * * @param mixed $sectionValues Section data * @@ -242,7 +246,7 @@ public function &getPhpSettings() 'file_uploads' => ini_get('file_uploads') == '1', 'magic_quotes_gpc' => ini_get('magic_quotes_gpc') == '1', 'register_globals' => ini_get('register_globals') == '1', - 'output_buffering' => (bool) ini_get('output_buffering'), + 'output_buffering' => (int) ini_get('output_buffering') !== 0, 'open_basedir' => ini_get('open_basedir'), 'session.save_path' => ini_get('session.save_path'), 'session.auto_start' => ini_get('session.auto_start'), @@ -252,7 +256,6 @@ public function &getPhpSettings() 'zip' => function_exists('zip_open') && function_exists('zip_read'), 'mbstring' => extension_loaded('mbstring'), 'iconv' => function_exists('iconv'), - 'mcrypt' => extension_loaded('mcrypt'), 'max_input_vars' => ini_get('max_input_vars'), ); @@ -305,6 +308,7 @@ public function &getInfo() $this->info = array( 'php' => php_uname(), + 'dbserver' => $db->getServerType(), 'dbversion' => $db->getVersion(), 'dbcollation' => $db->getCollation(), 'dbconnectioncollation' => $db->getConnectionCollation(), @@ -482,18 +486,13 @@ public function getExtensions() 'authorUrl' => 'unknown', ); - $manifest = json_decode($extension->manifest_cache); - - if (!$manifest instanceof stdClass) - { - continue; - } + $manifest = new Registry($extension->manifest_cache); $extraData = array( - 'author' => $manifest->author, - 'version' => $manifest->version, - 'creationDate' => $manifest->creationDate, - 'authorUrl' => $manifest->authorUrl, + 'author' => $manifest->get('author', ''), + 'version' => $manifest->get('version', ''), + 'creationDate' => $manifest->get('creationDate', ''), + 'authorUrl' => $manifest->get('authorUrl', '') ); $installed[$extension->name] = array_merge($installed[$extension->name], $extraData); diff --git a/administrator/components/com_admin/postinstall/eaccelerator.php b/administrator/components/com_admin/postinstall/eaccelerator.php index 9136998a23de4..50cc782c5962a 100644 --- a/administrator/components/com_admin/postinstall/eaccelerator.php +++ b/administrator/components/com_admin/postinstall/eaccelerator.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * * This file contains post-installation message handling for eAccelerator compatibility. @@ -60,7 +60,7 @@ function admin_postinstall_eaccelerator_action() // Attempt to make the file writeable if using FTP. if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0644')) { - JError::raiseNotice('SOME_ERROR_CODE', JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTWRITABLE')); + JError::raiseNotice(500, JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTWRITABLE')); } // Attempt to write the configuration file as a PHP class named JConfig. @@ -76,6 +76,6 @@ function admin_postinstall_eaccelerator_action() // Attempt to make the file unwriteable if using FTP. if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0444')) { - JError::raiseNotice('SOME_ERROR_CODE', JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTUNWRITABLE')); + JError::raiseNotice(500, JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTUNWRITABLE')); } } diff --git a/administrator/components/com_admin/postinstall/htaccess.php b/administrator/components/com_admin/postinstall/htaccess.php index 0ce7291f4d7dd..7a1ff985e4def 100644 --- a/administrator/components/com_admin/postinstall/htaccess.php +++ b/administrator/components/com_admin/postinstall/htaccess.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * * This file contains post-installation message handling for notifying users of a change diff --git a/administrator/components/com_admin/postinstall/joomla40checks.php b/administrator/components/com_admin/postinstall/joomla40checks.php index 7f921fa3629e7..df26ad6235327 100644 --- a/administrator/components/com_admin/postinstall/joomla40checks.php +++ b/administrator/components/com_admin/postinstall/joomla40checks.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * * This file contains post-installation message handling for Joomla 4.0 pre checks @@ -12,13 +12,14 @@ defined('_JEXEC') or die; /** - * Checks if the installation meats the current requirements for Joomla 4 + * Checks if the installation meets the current requirements for Joomla 4 * * @return boolean True if any check fails. * * @since 3.7 * - * @see https://developer.joomla.org/news/658-joomla4-manifesto.html + * @link https://developer.joomla.org/news/658-joomla4-manifesto.html + * @link https://developer.joomla.org/news/704-looking-forward-with-joomla-4.html */ function admin_postinstall_joomla40checks_condition() { @@ -50,6 +51,6 @@ function admin_postinstall_joomla40checks_condition() return true; } - // PHP minimum version is 5.5 - return version_compare(PHP_VERSION, '5.5.9', 'lt'); + // PHP minimum version is 7.0 + return version_compare(PHP_VERSION, '7.0', 'lt'); } diff --git a/administrator/components/com_admin/postinstall/languageaccess340.php b/administrator/components/com_admin/postinstall/languageaccess340.php index 86186a95d355d..915379dfd9fad 100644 --- a/administrator/components/com_admin/postinstall/languageaccess340.php +++ b/administrator/components/com_admin/postinstall/languageaccess340.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * * This file contains post-installation message handling for the checks if the installation is @@ -15,8 +15,8 @@ /** * Checks if the installation is affected by the issue with content languages access in 3.4.0 * - * @see https://github.com/joomla/joomla-cms/pull/6172 - * @see https://github.com/joomla/joomla-cms/pull/6194 + * @link https://github.com/joomla/joomla-cms/pull/6172 + * @link https://github.com/joomla/joomla-cms/pull/6194 * * @return boolean * diff --git a/administrator/components/com_admin/postinstall/phpversion.php b/administrator/components/com_admin/postinstall/phpversion.php deleted file mode 100644 index 7e1a4aec28533..0000000000000 --- a/administrator/components/com_admin/postinstall/phpversion.php +++ /dev/null @@ -1,24 +0,0 @@ - 0; + +UPDATE `#__modules` + SET `params` = REPLACE(`params`,'"menutype":"main"','"menutype":"main_is_reserved_133C585"') + WHERE `client_id` = 0 + AND (SELECT COUNT(`id`) FROM `#__menu_types` WHERE `client_id` = 0 AND `menutype` = 'main') > 0; + +UPDATE `#__menu_types` + SET `menutype` = 'main_is_reserved_133C585' + WHERE `client_id` = 0 + AND `menutype` = 'main'; + +-- Step 2: What remains now are the main menu items, possibly with wrong +-- client_id if there was nothing hit by step 1 because there was no record in +-- the menu types table with client_id = 0. +UPDATE `#__menu` + SET `client_id` = 1 + WHERE `menutype` = 'main'; + +-- Step 3: If we have menu items for the admin using menutype = "menu" and +-- having correct client_id = 1, we can be sure they belong to the admin menu +-- and so rename the menutype. +UPDATE `#__menu` + SET `menutype` = 'main' + WHERE `client_id` = 1 + AND `menutype` = 'menu'; + +-- Step 4: If there is no user-defined menu type "menu" for the site, we can +-- assume that any menu items for that menu type belong to the admin. +-- Fix the client_id for those as it was done with the original version of this +-- schema update script here. +UPDATE `#__menu` + SET `menutype` = 'main', + `client_id` = 1 + WHERE `menutype` = 'menu' + AND (SELECT COUNT(`id`) FROM `#__menu_types` WHERE `client_id` = 0 AND `menutype` = 'menu') = 0; + +-- Step 5: For the standard admin menu items of menutype "main" there is no record +-- in the menutype table on a clean Joomla installation. If there is one, it is a +-- mistake and it should be deleted. This is also the case with menu type "menu" +-- for the admin, for which we changed the menutype of the menu items in step 3. +DELETE FROM `#__menu_types` + WHERE `client_id` = 1 + AND `menutype` IN ('main', 'menu'); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-03-09.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-03-09.sql index 7520aea947e6b..84100ee83ce63 100644 --- a/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-03-09.sql +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-03-09.sql @@ -1,3 +1,4 @@ +UPDATE `#__categories` SET `published` = 1 WHERE `alias` = 'root'; UPDATE `#__categories` AS `c` INNER JOIN ( SELECT c2.id, CASE WHEN MIN(p.published) > 0 THEN MAX(p.published) ELSE MIN(p.published) END AS newPublished FROM `#__categories` AS `c2` @@ -6,6 +7,7 @@ UPDATE `#__categories` AS `c` INNER JOIN ( ON c.id = c2.id SET published = c2.newPublished; +UPDATE `#__menu` SET `published` = 1 WHERE `alias` = 'root'; UPDATE `#__menu` AS `c` INNER JOIN ( SELECT c2.id, CASE WHEN MIN(p.published) > 0 THEN MAX(p.published) ELSE MIN(p.published) END AS newPublished FROM `#__menu` AS `c2` diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.3-2017-06-03.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.3-2017-06-03.sql new file mode 100644 index 0000000000000..eac66fa67b28e --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.3-2017-06-03.sql @@ -0,0 +1 @@ +ALTER TABLE `#__menu` MODIFY `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'The time the menu item was checked out.'; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.7.4-2017-07-05.sql b/administrator/components/com_admin/sql/updates/mysql/3.7.4-2017-07-05.sql new file mode 100644 index 0000000000000..0c4bb1b3b6d9e --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.7.4-2017-07-05.sql @@ -0,0 +1 @@ +DELETE FROM `#__postinstall_messages` WHERE `title_key` = 'COM_CPANEL_MSG_PHPVERSION_TITLE'; \ No newline at end of file diff --git a/administrator/components/com_admin/sql/updates/mysql/3.8.0-2017-07-28.sql b/administrator/components/com_admin/sql/updates/mysql/3.8.0-2017-07-28.sql new file mode 100644 index 0000000000000..3ea86df61fc79 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.8.0-2017-07-28.sql @@ -0,0 +1 @@ +ALTER TABLE `#__fields_groups` ADD COLUMN `params` TEXT NOT NULL AFTER `ordering`; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.8.0-2017-07-31.sql b/administrator/components/com_admin/sql/updates/mysql/3.8.0-2017-07-31.sql new file mode 100644 index 0000000000000..81a631edd50c8 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.8.0-2017-07-31.sql @@ -0,0 +1,5 @@ +INSERT INTO `#__extensions` +(`extension_id`, `package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) +VALUES + (318, 0, 'mod_sampledata', 'module', 'mod_sampledata', '', 1, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0), + (479, 0, 'plg_sampledata_blog', 'plugin', 'blog', 'sampledata', 0, 0, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.8.2-2017-10-14.sql b/administrator/components/com_admin/sql/updates/mysql/3.8.2-2017-10-14.sql new file mode 100644 index 0000000000000..d379ef208d611 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.8.2-2017-10-14.sql @@ -0,0 +1,5 @@ +-- +-- Add index for alias check #__content +-- + +ALTER TABLE `#__content` ADD INDEX `idx_alias` (`alias`(191)); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.8.4-2018-01-16.sql b/administrator/components/com_admin/sql/updates/mysql/3.8.4-2018-01-16.sql new file mode 100644 index 0000000000000..1d204b7f63f13 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.8.4-2018-01-16.sql @@ -0,0 +1,2 @@ +ALTER TABLE `#__user_keys` DROP INDEX `series_2`; +ALTER TABLE `#__user_keys` DROP INDEX `series_3`; diff --git a/administrator/components/com_admin/sql/updates/mysql/3.8.6-2018-02-14.sql b/administrator/components/com_admin/sql/updates/mysql/3.8.6-2018-02-14.sql new file mode 100644 index 0000000000000..b88087a13504f --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.8.6-2018-02-14.sql @@ -0,0 +1,6 @@ +INSERT INTO `#__extensions` (`extension_id`, `package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES +(480, 0, 'plg_system_sessiongc', 'plugin', 'sessiongc', 'system', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0); + +INSERT INTO `#__postinstall_messages` (`extension_id`, `title_key`, `description_key`, `action_key`, `language_extension`, `language_client_id`, `type`, `action_file`, `action`, `condition_file`, `condition_method`, `version_introduced`, `enabled`) +VALUES +(700, 'PLG_PLG_RECAPTCHA_VERSION_1_POSTINSTALL_TITLE', 'PLG_PLG_RECAPTCHA_VERSION_1_POSTINSTALL_BODY', 'PLG_PLG_RECAPTCHA_VERSION_1_POSTINSTALL_ACTION', 'plg_captcha_recaptcha', 1, 'action', 'site://plugins/captcha/recaptcha/postinstall/actions.php', 'recaptcha_postinstall_action', 'site://plugins/captcha/recaptcha/postinstall/actions.php', 'recaptcha_postinstall_condition', '3.8.6', 1); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.8.8-2018-05-18.sql b/administrator/components/com_admin/sql/updates/mysql/3.8.8-2018-05-18.sql new file mode 100644 index 0000000000000..981549dd05ab5 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.8.8-2018-05-18.sql @@ -0,0 +1,3 @@ +INSERT INTO `#__postinstall_messages` (`extension_id`, `title_key`, `description_key`, `action_key`, `language_extension`, `language_client_id`, `type`, `action_file`, `action`, `condition_file`, `condition_method`, `version_introduced`, `enabled`) +VALUES +(700, 'COM_CPANEL_MSG_UPDATEDEFAULTSETTINGS_TITLE', 'COM_CPANEL_MSG_UPDATEDEFAULTSETTINGS_BODY', '', 'com_cpanel', 1, 'message', '', '', 'admin://components/com_admin/postinstall/updatedefaultsettings.php', 'admin_postinstall_updatedefaultsettings_condition', '3.8.8', 1); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.8.9-2018-06-19.sql b/administrator/components/com_admin/sql/updates/mysql/3.8.9-2018-06-19.sql new file mode 100644 index 0000000000000..cd46b4624a2ac --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/3.8.9-2018-06-19.sql @@ -0,0 +1,2 @@ +-- Enable Sample Data Module. +UPDATE `#__extensions` SET `enabled` = '1' WHERE `name` = 'mod_sampledata'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.1.0.sql b/administrator/components/com_admin/sql/updates/postgresql/3.1.0.sql index 7a7ec83dd5247..1893538b9d3b9 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.1.0.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.1.0.sql @@ -183,11 +183,11 @@ CREATE INDEX "#__ucm_content_idx_core_type_id" ON "#__ucm_content" ("core_type_i -- Add extensions table records -- INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") VALUES -(29, 'com_tags', 'component', 'com_tags', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_tags","type":"component","creationDate":"March 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"COM_TAGS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(315, 'mod_stats_admin', 'module', 'mod_stats_admin', '', 1, 1, 1, 0, '{"name":"mod_stats_admin","type":"module","creationDate":"September 2012","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"MOD_STATS_XML_DESCRIPTION","group":""}', '{"serverinfo":"0","siteinfo":"0","counter":"0","increase":"0","cache":"1","cache_time":"900","cachemode":"static"}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(316, 'mod_tags_popular', 'module', 'mod_tags_popular', '', 0, 1, 1, 0, '{"name":"mod_tags_popular","type":"module","creationDate":"January 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.1.0","description":"MOD_TAGS_POPULAR_XML_DESCRIPTION","group":""}', '{"maximum":"5","timeframe":"alltime","owncache":"1"}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(317, 'mod_tags_similar', 'module', 'mod_tags_similar', '', 0, 1, 1, 0, '{"name":"mod_tags_similar","type":"module","creationDate":"January 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.1.0","description":"MOD_TAGS_SIMILAR_XML_DESCRIPTION","group":""}', '{"maximum":"5","matchtype":"any","owncache":"1"}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(447, 'plg_finder_tags', 'plugin', 'tags', 'finder', 0, 1, 1, 0, '{"name":"plg_finder_tags","type":"plugin","creationDate":"February 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"PLG_FINDER_TAGS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); +(29, 'com_tags', 'component', 'com_tags', '', 1, 1, 1, 1, '{"legacy":false,"name":"com_tags","type":"component","creationDate":"March 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2018 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"COM_TAGS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(315, 'mod_stats_admin', 'module', 'mod_stats_admin', '', 1, 1, 1, 0, '{"name":"mod_stats_admin","type":"module","creationDate":"September 2012","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"MOD_STATS_XML_DESCRIPTION","group":""}', '{"serverinfo":"0","siteinfo":"0","counter":"0","increase":"0","cache":"1","cache_time":"900","cachemode":"static"}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(316, 'mod_tags_popular', 'module', 'mod_tags_popular', '', 0, 1, 1, 0, '{"name":"mod_tags_popular","type":"module","creationDate":"January 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.1.0","description":"MOD_TAGS_POPULAR_XML_DESCRIPTION","group":""}', '{"maximum":"5","timeframe":"alltime","owncache":"1"}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(317, 'mod_tags_similar', 'module', 'mod_tags_similar', '', 0, 1, 1, 0, '{"name":"mod_tags_similar","type":"module","creationDate":"January 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.1.0","description":"MOD_TAGS_SIMILAR_XML_DESCRIPTION","group":""}', '{"maximum":"5","matchtype":"any","owncache":"1"}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(447, 'plg_finder_tags', 'plugin', 'tags', 'finder', 0, 1, 1, 0, '{"name":"plg_finder_tags","type":"plugin","creationDate":"February 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2018 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"PLG_FINDER_TAGS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); -- -- Add menu table records diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.2.0.sql b/administrator/components/com_admin/sql/updates/postgresql/3.2.0.sql index b6020f0a3b936..bc22cf3698af2 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.2.0.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.2.0.sql @@ -19,13 +19,13 @@ UPDATE "#__extensions" SET "params" = '{"template_positions_display":"0","upload UPDATE "#__extensions" SET "params" = '{"lineNumbers":"1","lineWrapping":"1","matchTags":"1","matchBrackets":"1","marker-gutter":"1","autoCloseTags":"1","autoCloseBrackets":"1","autoFocus":"1","theme":"default","tabmode":"indent"}' WHERE "extension_id" = 410; INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") VALUES -(30, 'com_contenthistory', 'component', 'com_contenthistory', '', 1, 1, 1, 0, '{"name":"com_contenthistory","type":"component","creationDate":"May 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"COM_CONTENTHISTORY_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(31, 'com_ajax', 'component', 'com_ajax', '', 1, 1, 1, 0, '{"name":"com_ajax","type":"component","creationDate":"August 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"COM_AJAX_DESC","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(30, 'com_contenthistory', 'component', 'com_contenthistory', '', 1, 1, 1, 0, '{"name":"com_contenthistory","type":"component","creationDate":"May 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2018 Open Source Matters. All rights reserved.\\n\\t","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"COM_CONTENTHISTORY_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(31, 'com_ajax', 'component', 'com_ajax', '', 1, 1, 1, 0, '{"name":"com_ajax","type":"component","creationDate":"August 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2018 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"COM_AJAX_DESC","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), (32, 'com_postinstall', 'component', 'com_postinstall', '', 1, 1, 1, 1, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0), (105, 'FOF', 'library', 'fof', '', 0, 1, 1, 1, '{"legacy":false,"name":"FOF","type":"library","creationDate":"2013-10-08","author":"Nicholas K. Dionysopoulos \/ Akeeba Ltd","copyright":"(C)2011-2013 Nicholas K. Dionysopoulos","authorEmail":"nicholas@akeebabackup.com","authorUrl":"https:\/\/www.akeebabackup.com","version":"2.1.rc4","description":"Framework-on-Framework (FOF) - A rapid component development framework for Joomla!","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(448, 'plg_twofactorauth_totp', 'plugin', 'totp', 'twofactorauth', 0, 0, 1, 0, '{"name":"plg_twofactorauth_totp","type":"plugin","creationDate":"August 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"PLG_TWOFACTORAUTH_TOTP_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(449, 'plg_authentication_cookie', 'plugin', 'cookie', 'authentication', 0, 1, 1, 0, '{"name":"plg_authentication_cookie","type":"plugin","creationDate":"July 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"PLG_AUTH_COOKIE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), -(450, 'plg_twofactorauth_yubikey', 'plugin', 'yubikey', 'twofactorauth', 0, 0, 1, 0, '{"name":"plg_twofactorauth_yubikey","type":"plugin","creationDate":"Se[ptember 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2016 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"PLG_TWOFACTORAUTH_YUBIKEY_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); +(448, 'plg_twofactorauth_totp', 'plugin', 'totp', 'twofactorauth', 0, 0, 1, 0, '{"name":"plg_twofactorauth_totp","type":"plugin","creationDate":"August 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2018 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"PLG_TWOFACTORAUTH_TOTP_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(449, 'plg_authentication_cookie', 'plugin', 'cookie', 'authentication', 0, 1, 1, 0, '{"name":"plg_authentication_cookie","type":"plugin","creationDate":"July 2013","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.0.0","description":"PLG_AUTH_COOKIE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), +(450, 'plg_twofactorauth_yubikey', 'plugin', 'yubikey', 'twofactorauth', 0, 0, 1, 0, '{"name":"plg_twofactorauth_yubikey","type":"plugin","creationDate":"Se[ptember 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2018 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.2.0","description":"PLG_TWOFACTORAUTH_YUBIKEY_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0); INSERT INTO "#__menu" ("menutype", "title", "alias", "note", "path", "link", "type", "published", "parent_id", "level", "component_id", "checked_out", "checked_out_time", "browserNav", "access", "img", "template_style_id", "params", "lft", "rgt", "home", "language", "client_id") VALUES ('main', 'com_postinstall', 'Post-installation messages', '', 'Post-installation messages', 'index.php?option=com_postinstall', 'component', 0, 1, 1, 32, 0, '1970-01-01 00:00:00', 0, 1, 'class:postinstall', 0, '', 45, 46, 0, '*', 1); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.3.6-2014-09-30.sql b/administrator/components/com_admin/sql/updates/postgresql/3.3.6-2014-09-30.sql index fae9c20d45522..d54a13381e721 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.3.6-2014-09-30.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.3.6-2014-09-30.sql @@ -1,5 +1,5 @@ INSERT INTO "#__update_sites" ("name", "type", "location", "enabled") VALUES -('Joomla! Update Component Update Site', 'extension', 'http://update.joomla.org/core/extensions/com_joomlaupdate.xml', 1); +('Joomla! Update Component Update Site', 'extension', 'https://update.joomla.org/core/extensions/com_joomlaupdate.xml', 1); INSERT INTO "#__update_sites_extensions" ("update_site_id", "extension_id") VALUES ((SELECT "update_site_id" FROM "#__update_sites" WHERE "name" = 'Joomla! Update Component Update Site'), (SELECT "extension_id" FROM "#__extensions" WHERE "name" = 'com_joomlaupdate')); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-19.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-19.sql index da2b368041418..1711f5761e2e9 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-19.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-19.sql @@ -1,3 +1,3 @@ -ALTER TABLE "#__menu_types" ADD "client_id" int DEFAULT 0 NOT NULL; +ALTER TABLE "#__menu_types" ADD COLUMN "client_id" int DEFAULT 0 NOT NULL; UPDATE "#__menu" SET "published" = 1 WHERE "menutype" = 'main' OR "menutype" = 'menu'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-21.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-21.sql index 3fee4a355d6a9..e68abd215444d 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-21.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2016-11-21.sql @@ -1,2 +1,2 @@ -- Replace language image UNIQUE index for a normal INDEX. -ALTER TABLE "#__languages" DROP CONSTRAINT "#__idx_image"; +ALTER TABLE "#__languages" DROP CONSTRAINT "#__languages_idx_image"; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-17.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-17.sql index 4f13b235764f7..3009938a54d1c 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-17.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-01-17.sql @@ -1,3 +1,58 @@ -- Sync menutype for admin menu and set client_id correct -UPDATE "#__menu" SET "client_id" = 1 WHERE "menutype" = 'main' OR "menutype" = 'menu'; -UPDATE "#__menu" SET "menutype" = 'main' WHERE "menutype" = 'main' OR "menutype" = 'menu'; + +-- Note: This file had to be modified with Joomla 3.7.3 because the +-- original version made site menus disappear if there were menu types +-- "main" or "menu" defined for the site. + +-- Step 1: If there is any user-defined menu and menu type "main" for the site +-- (client_id = 0), then change the menu type for the menu, any module and the +-- menu type to something very likely not being used yet and just within the +-- max. length of 24 characters. +UPDATE "#__menu" + SET "menutype" = 'main_is_reserved_133C585' + WHERE "client_id" = 0 + AND "menutype" = 'main' + AND (SELECT COUNT("id") FROM "#__menu_types" WHERE "client_id" = 0 AND "menutype" = 'main') > 0; + +UPDATE "#__modules" + SET "params" = REPLACE("params",'"menutype":"main"','"menutype":"main_is_reserved_133C585"') + WHERE "client_id" = 0 + AND (SELECT COUNT("id") FROM "#__menu_types" WHERE "client_id" = 0 AND "menutype" = 'main') > 0; + +UPDATE "#__menu_types" + SET "menutype" = 'main_is_reserved_133C585' + WHERE "client_id" = 0 + AND "menutype" = 'main'; + +-- Step 2: What remains now are the main menu items, possibly with wrong +-- client_id if there was nothing hit by step 1 because there was no record in +-- the menu types table with client_id = 0. +UPDATE "#__menu" + SET "client_id" = 1 + WHERE "menutype" = 'main'; + +-- Step 3: If we have menu items for the admin using menutype = "menu" and +-- having correct client_id = 1, we can be sure they belong to the admin menu +-- and so rename the menutype. +UPDATE "#__menu" + SET "menutype" = 'main' + WHERE "client_id" = 1 + AND "menutype" = 'menu'; + +-- Step 4: If there is no user-defined menu type "menu" for the site, we can +-- assume that any menu items for that menu type belong to the admin. +-- Fix the client_id for those as it was done with the original version of this +-- schema update script here. +UPDATE "#__menu" + SET "menutype" = 'main', + "client_id" = 1 + WHERE "menutype" = 'menu' + AND (SELECT COUNT("id") FROM "#__menu_types" WHERE "client_id" = 0 AND "menutype" = 'menu') > 0; + +-- Step 5: For the standard admin menu items of menutype "main" there is no record +-- in the menutype table on a clean Joomla installation. If there is one, it is a +-- mistake and it should be deleted. This is also the case with menu type "menu" +-- for the admin, for which we changed the menutype of the menu items in step 3. +DELETE FROM "#__menu_types" + WHERE "client_id" = 1 + AND "menutype" IN ('main', 'menu'); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-03-09.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-03-09.sql index 109609388f86a..08aa07b95e254 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-03-09.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-03-09.sql @@ -1,3 +1,4 @@ +UPDATE "#__categories" SET published = 1 WHERE alias = 'root'; UPDATE "#__categories" AS "c" SET published = c2.newPublished FROM ( @@ -7,6 +8,7 @@ INNER JOIN "#__categories" AS "p" ON p.lft <= c2.lft AND c2.rgt <= p.rgt GROUP BY c2.id) AS c2 WHERE c2.id = c.id; +UPDATE "#__menu" SET published = 1 WHERE alias = 'root'; UPDATE "#__menu" AS "c" SET published = c2.newPublished FROM ( diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-04-19.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-04-19.sql index 5df4318cc3680..a71c3e11b2db5 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-04-19.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.0-2017-04-19.sql @@ -1,2 +1,2 @@ -- Set integer field default values. -UPDATE `#__extensions` SET `params` = '{"multiple":"0","first":"1","last":"100","step":"1"}' WHERE `name` = 'plg_fields_integer'; +UPDATE "#__extensions" SET "params" = '{"multiple":"0","first":"1","last":"100","step":"1"}' WHERE "name" = 'plg_fields_integer'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.7.4-2017-07-05.sql b/administrator/components/com_admin/sql/updates/postgresql/3.7.4-2017-07-05.sql new file mode 100644 index 0000000000000..e9f5f2b099a0f --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.7.4-2017-07-05.sql @@ -0,0 +1 @@ +DELETE FROM "#__postinstall_messages" WHERE "title_key" = 'COM_CPANEL_MSG_PHPVERSION_TITLE'; \ No newline at end of file diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.8.0-2017-07-28.sql b/administrator/components/com_admin/sql/updates/postgresql/3.8.0-2017-07-28.sql new file mode 100644 index 0000000000000..6b88b64d45039 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.8.0-2017-07-28.sql @@ -0,0 +1 @@ +ALTER TABLE "#__fields_groups" ADD COLUMN "params" TEXT NOT NULL; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.8.0-2017-07-31.sql b/administrator/components/com_admin/sql/updates/postgresql/3.8.0-2017-07-31.sql new file mode 100644 index 0000000000000..e03ec77abc604 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.8.0-2017-07-31.sql @@ -0,0 +1,5 @@ +INSERT INTO "#__extensions" +("extension_id", "package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") +VALUES + (318, 0, 'mod_sampledata', 'module', 'mod_sampledata', '', 1, 0, 1, 0, '', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0), + (479, 0, 'plg_sampledata_blog', 'plugin', 'blog', 'sampledata', 0, 0, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.8.2-2017-10-14.sql b/administrator/components/com_admin/sql/updates/postgresql/3.8.2-2017-10-14.sql new file mode 100644 index 0000000000000..f7183db8bd2a3 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.8.2-2017-10-14.sql @@ -0,0 +1,5 @@ +-- +-- Add index for alias check #__content +-- + +CREATE INDEX "#__content_idx_alias" ON "#__content" ("alias"); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.8.4-2018-01-16.sql b/administrator/components/com_admin/sql/updates/postgresql/3.8.4-2018-01-16.sql new file mode 100644 index 0000000000000..4546bab50b54a --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.8.4-2018-01-16.sql @@ -0,0 +1,2 @@ +DROP INDEX "#__user_keys_series_2"; +DROP INDEX "#__user_keys_series_3"; diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.8.6-2018-02-14.sql b/administrator/components/com_admin/sql/updates/postgresql/3.8.6-2018-02-14.sql new file mode 100644 index 0000000000000..bd70f521d3872 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.8.6-2018-02-14.sql @@ -0,0 +1,6 @@ +INSERT INTO "#__extensions" ("extension_id", "package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") VALUES +(480, 0, 'plg_system_sessiongc', 'plugin', 'sessiongc', 'system', 0, 1, 1, 0, '', '', '', '', 0, '1970-01-01 00:00:00', 0, 0); + +INSERT INTO "#__postinstall_messages" ("extension_id", "title_key", "description_key", "action_key", "language_extension", "language_client_id", "type", "action_file", "action", "condition_file", "condition_method", "version_introduced", "enabled") +VALUES +(700, 'PLG_PLG_RECAPTCHA_VERSION_1_POSTINSTALL_TITLE', 'PLG_PLG_RECAPTCHA_VERSION_1_POSTINSTALL_BODY', 'PLG_PLG_RECAPTCHA_VERSION_1_POSTINSTALL_ACTION', 'plg_captcha_recaptcha', 1, 'action', 'site://plugins/captcha/recaptcha/postinstall/actions.php', 'recaptcha_postinstall_action', 'site://plugins/captcha/recaptcha/postinstall/actions.php', 'recaptcha_postinstall_condition', '3.8.6', 1); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.8.8-2018-05-18.sql b/administrator/components/com_admin/sql/updates/postgresql/3.8.8-2018-05-18.sql new file mode 100644 index 0000000000000..975876d250321 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.8.8-2018-05-18.sql @@ -0,0 +1,3 @@ +INSERT INTO "#__postinstall_messages" ("extension_id", "title_key", "description_key", "action_key", "language_extension", "language_client_id", "type", "action_file", "action", "condition_file", "condition_method", "version_introduced", "enabled") +VALUES +(700, 'COM_CPANEL_MSG_UPDATEDEFAULTSETTINGS_TITLE', 'COM_CPANEL_MSG_UPDATEDEFAULTSETTINGS_BODY', '', 'com_cpanel', 1, 'message', '', '', 'admin://components/com_admin/postinstall/updatedefaultsettings.php', 'admin_postinstall_updatedefaultsettings_condition', '3.8.8', 1); diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.8.9-2018-06-19.sql b/administrator/components/com_admin/sql/updates/postgresql/3.8.9-2018-06-19.sql new file mode 100644 index 0000000000000..666def7ad577b --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/3.8.9-2018-06-19.sql @@ -0,0 +1,2 @@ +-- Enable Sample Data Module. +UPDATE "#__extensions" SET "enabled" = '1' WHERE "name" = 'mod_sampledata'; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/2.5.4-2012-03-18.sql b/administrator/components/com_admin/sql/updates/sqlazure/2.5.4-2012-03-18.sql index f3f38ed99e370..310ec720750bc 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/2.5.4-2012-03-18.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/2.5.4-2012-03-18.sql @@ -1,7 +1,7 @@ SET IDENTITY_INSERT [#__extensions] ON; INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) -SELECT 28, 'com_joomlaupdate', 'component', 'com_joomlaupdate', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_joomlaupdate","type":"component","creationDate":"February 2012","author":"Joomla! Project","copyright":"(C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"2.5.2","description":"COM_JOOMLAUPDATE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1900-01-01 00:00:00', 0, 0; +SELECT 28, 'com_joomlaupdate', 'component', 'com_joomlaupdate', '', 1, 1, 0, 1, '{"legacy":false,"name":"com_joomlaupdate","type":"component","creationDate":"February 2012","author":"Joomla! Project","copyright":"(C) 2005 - 2018 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"2.5.2","description":"COM_JOOMLAUPDATE_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1900-01-01 00:00:00', 0, 0; SET IDENTITY_INSERT [#__extensions] OFF; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/2.5.7.sql b/administrator/components/com_admin/sql/updates/sqlazure/2.5.7.sql index a3655c75bafd8..b249c8a8cbbef 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/2.5.7.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/2.5.7.sql @@ -1,5 +1,5 @@ INSERT INTO [#__update_sites] ([name], [type], [location], [enabled], [last_check_timestamp]) -SELECT 'Accredited Joomla! Translations', 'collection', 'http://update.joomla.org/language/translationlist.xml', 1, 0; +SELECT 'Accredited Joomla! Translations', 'collection', 'https://update.joomla.org/language/translationlist.xml', 1, 0; INSERT INTO [#__update_sites_extensions] ([update_site_id], [extension_id]) SELECT SCOPE_IDENTITY(), 600; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.1.0.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.1.0.sql index a2f47b58adfef..4ca149cecb628 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.1.0.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.1.0.sql @@ -318,7 +318,7 @@ CREATE NONCLUSTERED INDEX [idx_core_type_id] ON [#__ucm_content] SET IDENTITY_INSERT [#__extensions] ON; INSERT INTO [#__extensions] ([extension_id], [name], [type], [element], [folder], [client_id], [enabled], [access], [protected], [manifest_cache], [params], [custom_data], [system_data], [checked_out], [checked_out_time], [ordering], [state]) -SELECT 29, 'com_tags', 'component', 'com_tags', '', 1, 1, 1, 1, '{"name":"com_joomlaupdate","type":"component","creationDate":"March 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2017 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.1.0","description":"COM_TAGS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1900-01-01 00:00:00', 0, 0; +SELECT 29, 'com_tags', 'component', 'com_tags', '', 1, 1, 1, 1, '{"name":"com_joomlaupdate","type":"component","creationDate":"March 2013","author":"Joomla! Project","copyright":"(C) 2005 - 2018 Open Source Matters. All rights reserved.","authorEmail":"admin@joomla.org","authorUrl":"www.joomla.org","version":"3.1.0","description":"COM_TAGS_XML_DESCRIPTION","group":""}', '{}', '', '', 0, '1900-01-01 00:00:00', 0, 0; SET IDENTITY_INSERT [#__extensions] OFF; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.3.6-2014-09-30.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.3.6-2014-09-30.sql index 309ade5b7c50a..1ff46584f11cd 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.3.6-2014-09-30.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.3.6-2014-09-30.sql @@ -1,5 +1,5 @@ INSERT INTO [#__update_sites] ([name], [type], [location], [enabled]) -SELECT 'Joomla! Update Component Update Site', 'extension', 'http://update.joomla.org/core/extensions/com_joomlaupdate.xml', 1; +SELECT 'Joomla! Update Component Update Site', 'extension', 'https://update.joomla.org/core/extensions/com_joomlaupdate.xml', 1; INSERT INTO [#__update_sites_extensions] ([update_site_id], [extension_id]) SELECT (SELECT [update_site_id] FROM [#__update_sites] WHERE [name] = 'Joomla! Update Component Update Site'), (SELECT [extension_id] FROM [#__extensions] WHERE [name] = 'com_joomlaupdate'); diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-17.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-17.sql index 7bf8964d9c432..86ffa3836f9d5 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-17.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-01-17.sql @@ -1,6 +1,62 @@ -- Sync menutype for admin menu and set client_id correct -UPDATE [#__menu] SET [client_id] = 1 WHERE [menutype] = 'main' OR [menutype] = 'menu'; -UPDATE [#__menu] SET [menutype] = 'main' WHERE [menutype] = 'main' OR [menutype] = 'menu'; +-- Note: This change had to be modified with Joomla 3.7.3 because the +-- original version made site menus disappear if there were menu types +-- "main" or "menu" defined for the site. + +-- Step 1: If there is any user-defined menu and menu type "main" for the site +-- (client_id = 0), then change the menu type for the menu, any module and the +-- menu type to something very likely not being used yet and just within the +-- max. length of 24 characters. +UPDATE [#__menu] + SET [menutype] = 'main_is_reserved_133C585' + WHERE [client_id] = 0 + AND [menutype] = 'main' + AND (SELECT COUNT([id]) FROM [#__menu_types] WHERE [client_id] = 0 AND [menutype] = 'main') > 0; + +UPDATE [#__modules] + SET [params] = REPLACE([params],'"menutype":"main"','"menutype":"main_is_reserved_133C585"') + WHERE [client_id] = 0 + AND (SELECT COUNT([id]) FROM [#__menu_types] WHERE [client_id] = 0 AND [menutype] = 'main') > 0; + +UPDATE [#__menu_types] + SET [menutype] = 'main_is_reserved_133C585' + WHERE [client_id] = 0 + AND [menutype] = 'main'; + +-- Step 2: What remains now are the main menu items, possibly with wrong +-- client_id if there was nothing hit by step 1 because there was no record in +-- the menu types table with client_id = 0. +UPDATE [#__menu] + SET [client_id] = 1 + WHERE [menutype] = 'main'; + +-- Step 3: If we have menu items for the admin using menutype = "menu" and +-- having correct client_id = 1, we can be sure they belong to the admin menu +-- and so rename the menutype. +UPDATE [#__menu] + SET [menutype] = 'main' + WHERE [client_id] = 1 + AND [menutype] = 'menu'; + +-- Step 4: If there is no user-defined menu type "menu" for the site, we can +-- assume that any menu items for that menu type belong to the admin. +-- Fix the client_id for those as it was done with the original version of this +-- schema update script here. +UPDATE [#__menu] + SET [menutype] = 'main', + [client_id] = 1 + WHERE [menutype] = 'menu' + AND (SELECT COUNT([id]) FROM [#__menu_types] WHERE [client_id] = 0 AND [menutype] = 'menu') > 0; + +-- Step 5: For the standard admin menu items of menutype "main" there is no record +-- in the menutype table on a clean Joomla installation. If there is one, it is a +-- mistake and it should be deleted. This is also the case with menu type "menu" +-- for the admin, for which we changed the menutype of the menu items in step 3. +DELETE FROM [#__menu_types] + WHERE [client_id] = 1 + AND [menutype] IN ('main', 'menu'); + +-- End sync menutype for admin menu and set client_id correct SET IDENTITY_INSERT #__extensions ON; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-03-09.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-03-09.sql index d250fb881f58a..feb0fc106b9f7 100644 --- a/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-03-09.sql +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.0-2017-03-09.sql @@ -1,3 +1,4 @@ +UPDATE "#__categories" SET published = 1 WHERE alias = 'root'; UPDATE "c" SET published = c2.newPublished FROM "#__categories" AS "c" @@ -7,6 +8,7 @@ FROM "#__categories" AS "c2" INNER JOIN "#__categories" AS "p" ON p.lft <= c2.lft AND c2.rgt <= p.rgt GROUP BY c2.id) AS c2 ON c2.id = c.id; +UPDATE "#__menu" SET published = 1 WHERE alias = 'root'; UPDATE "c" SET published = c2.newPublished FROM "#__menu" AS "c" diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.7.4-2017-07-05.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.7.4-2017-07-05.sql new file mode 100644 index 0000000000000..5fa10e2f7f73b --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.7.4-2017-07-05.sql @@ -0,0 +1 @@ +DELETE FROM [#__postinstall_messages] WHERE [title_key] = 'COM_CPANEL_MSG_PHPVERSION_TITLE'; \ No newline at end of file diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.8.0-2017-07-28.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.8.0-2017-07-28.sql new file mode 100644 index 0000000000000..b25399e2478ec --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.8.0-2017-07-28.sql @@ -0,0 +1 @@ +ALTER TABLE [#__fields_groups] ADD [params] [text] NOT NULL DEFAULT ''; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.8.0-2017-07-31.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.8.0-2017-07-31.sql new file mode 100644 index 0000000000000..b9ed858fcd02b --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.8.0-2017-07-31.sql @@ -0,0 +1,4 @@ +INSERT INTO "#__extensions" ("extension_id", "package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") +VALUES + (318, 0, 'mod_sampledata', 'module', 'mod_sampledata', '', 1, 0, 1, 0, '', '{}', '', '', 0, '1900-01-01 00:00:00', 0, 0), + (479, 0, 'plg_sampledata_blog', 'plugin', 'blog', 'sampledata', 0, 0, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0); diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.8.2-2017-10-14.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.8.2-2017-10-14.sql new file mode 100644 index 0000000000000..72df8133711c1 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.8.2-2017-10-14.sql @@ -0,0 +1,8 @@ +-- +-- Add index for alias check #__content +-- + +CREATE NONCLUSTERED INDEX [idx_alias] ON [#__content] +( + [alias] ASC +)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF); diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.8.4-2018-01-16.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.8.4-2018-01-16.sql new file mode 100644 index 0000000000000..15c43cf51df1c --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.8.4-2018-01-16.sql @@ -0,0 +1,2 @@ +ALTER TABLE [#__user_keys] DROP CONSTRAINT [#__user_keys$series_2]; +ALTER TABLE [#__user_keys] DROP CONSTRAINT [#__user_keys$series_3]; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.8.6-2018-02-14.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.8.6-2018-02-14.sql new file mode 100644 index 0000000000000..29ad515aec05a --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.8.6-2018-02-14.sql @@ -0,0 +1,6 @@ +INSERT INTO "#__extensions" ("extension_id", "package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") VALUES +(480, 0, 'plg_system_sessiongc', 'plugin', 'sessiongc', 'system', 0, 1, 1, 0, '', '', '', '', 0, '1900-01-01 00:00:00', 0, 0); + +INSERT INTO "#__postinstall_messages" ("extension_id", "title_key", "description_key", "action_key", "language_extension", "language_client_id", "type", "action_file", "action", "condition_file", "condition_method", "version_introduced", "enabled") +VALUES +(700, 'PLG_PLG_RECAPTCHA_VERSION_1_POSTINSTALL_TITLE', 'PLG_PLG_RECAPTCHA_VERSION_1_POSTINSTALL_BODY', 'PLG_PLG_RECAPTCHA_VERSION_1_POSTINSTALL_ACTION', 'plg_captcha_recaptcha', 1, 'action', 'site://plugins/captcha/recaptcha/postinstall/actions.php', 'recaptcha_postinstall_action', 'site://plugins/captcha/recaptcha/postinstall/actions.php', 'recaptcha_postinstall_condition', '3.8.6', 1); diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.8.8-2018-05-18.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.8.8-2018-05-18.sql new file mode 100644 index 0000000000000..f4c1998c71c39 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.8.8-2018-05-18.sql @@ -0,0 +1,2 @@ +INSERT INTO [#__postinstall_messages] ([extension_id], [title_key], [description_key], [action_key], [language_extension], [language_client_id], [type], [action_file], [action], [condition_file], [condition_method], [version_introduced], [enabled]) +SELECT 700, 'COM_CPANEL_MSG_UPDATEDEFAULTSETTINGS_TITLE', 'COM_CPANEL_MSG_UPDATEDEFAULTSETTINGS_BODY', '', 'com_cpanel', 1, 'message', '', '', 'admin://components/com_admin/postinstall/updatedefaultsettings.php', 'admin_postinstall_updatedefaultsettings_condition', '3.8.8', 1; diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.8.9-2018-06-19.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.8.9-2018-06-19.sql new file mode 100644 index 0000000000000..e1f8d0af48bd0 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/sqlazure/3.8.9-2018-06-19.sql @@ -0,0 +1,3 @@ +-- Enable Sample Data Module. +UPDATE [#__extensions] SET [enabled] = '1' WHERE [name] = 'mod_sampledata'; + diff --git a/administrator/components/com_admin/views/help/tmpl/default.php b/administrator/components/com_admin/views/help/tmpl/default.php index 35b6122941db2..f839eac951c3a 100644 --- a/administrator/components/com_admin/views/help/tmpl/default.php +++ b/administrator/components/com_admin/views/help/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -21,7 +21,7 @@
  • latest_version_check, JText::_('COM_ADMIN_LATEST_VERSION_CHECK'), array('target' => 'helpFrame')); ?>
  • 'helpFrame')); ?>
  • 'helpFrame')); ?>
  • -
    +
  • toc as $k => $v) : ?>
  • @@ -33,7 +33,7 @@
    - +
    diff --git a/administrator/components/com_admin/views/help/tmpl/langforum.php b/administrator/components/com_admin/views/help/tmpl/langforum.php new file mode 100644 index 0000000000000..a090003330b21 --- /dev/null +++ b/administrator/components/com_admin/views/help/tmpl/langforum.php @@ -0,0 +1,23 @@ +load('mod_menu', JPATH_ADMINISTRATOR, null, false, true); + +$forumId = (int) JText::_('MOD_MENU_HELP_SUPPORT_OFFICIAL_LANGUAGE_FORUM_VALUE'); + +if (empty($forumId)) +{ + $forumId = 511; +} + +$forum_url = 'https://forum.joomla.org/viewforum.php?f=' . $forumId; + +JFactory::getApplication()->redirect($forum_url); diff --git a/administrator/components/com_admin/views/help/view.html.php b/administrator/components/com_admin/views/help/view.html.php index f872b010e0ea4..0c1ae713774f2 100644 --- a/administrator/components/com_admin/views/help/view.html.php +++ b/administrator/components/com_admin/views/help/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/views/profile/tmpl/edit.php b/administrator/components/com_admin/views/profile/tmpl/edit.php index bf342abc3c7b3..e21f3367135dc 100644 --- a/administrator/components/com_admin/views/profile/tmpl/edit.php +++ b/administrator/components/com_admin/views/profile/tmpl/edit.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/views/profile/view.html.php b/administrator/components/com_admin/views/profile/view.html.php index d23010b43fe92..3184d7d60a5e1 100644 --- a/administrator/components/com_admin/views/profile/view.html.php +++ b/administrator/components/com_admin/views/profile/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -58,9 +58,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } $this->form->setValue('password', null); diff --git a/administrator/components/com_admin/views/sysinfo/tmpl/default.php b/administrator/components/com_admin/views/sysinfo/tmpl/default.php index 02589ee91b18e..66a2774f85292 100644 --- a/administrator/components/com_admin/views/sysinfo/tmpl/default.php +++ b/administrator/components/com_admin/views/sysinfo/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/views/sysinfo/tmpl/default_config.php b/administrator/components/com_admin/views/sysinfo/tmpl/default_config.php index 4510e23390421..12c59f96f7750 100644 --- a/administrator/components/com_admin/views/sysinfo/tmpl/default_config.php +++ b/administrator/components/com_admin/views/sysinfo/tmpl/default_config.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/views/sysinfo/tmpl/default_directory.php b/administrator/components/com_admin/views/sysinfo/tmpl/default_directory.php index 07fe5a24437c8..2e5686af81138 100644 --- a/administrator/components/com_admin/views/sysinfo/tmpl/default_directory.php +++ b/administrator/components/com_admin/views/sysinfo/tmpl/default_directory.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/views/sysinfo/tmpl/default_phpinfo.php b/administrator/components/com_admin/views/sysinfo/tmpl/default_phpinfo.php index 28909428f0ce8..76050b4f658ca 100644 --- a/administrator/components/com_admin/views/sysinfo/tmpl/default_phpinfo.php +++ b/administrator/components/com_admin/views/sysinfo/tmpl/default_phpinfo.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_admin/views/sysinfo/tmpl/default_phpsettings.php b/administrator/components/com_admin/views/sysinfo/tmpl/default_phpsettings.php index d17f2869a1ac0..b34fe0e1b467d 100644 --- a/administrator/components/com_admin/views/sysinfo/tmpl/default_phpsettings.php +++ b/administrator/components/com_admin/views/sysinfo/tmpl/default_phpsettings.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -157,14 +157,6 @@ php_settings['iconv']); ?> - - - - - - php_settings['mcrypt']); ?> - - diff --git a/administrator/components/com_admin/views/sysinfo/tmpl/default_system.php b/administrator/components/com_admin/views/sysinfo/tmpl/default_system.php index 4e1f1ab2df9a4..3fe026dc4658a 100644 --- a/administrator/components/com_admin/views/sysinfo/tmpl/default_system.php +++ b/administrator/components/com_admin/views/sysinfo/tmpl/default_system.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -36,6 +36,14 @@ info['php']; ?> + + + + + + info['dbserver']; ?> + + diff --git a/administrator/components/com_admin/views/sysinfo/view.html.php b/administrator/components/com_admin/views/sysinfo/view.html.php index fc1a93a1bf795..6997bddf3e5f0 100644 --- a/administrator/components/com_admin/views/sysinfo/view.html.php +++ b/administrator/components/com_admin/views/sysinfo/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -70,7 +70,7 @@ public function display($tpl = null) // Access check. if (!JFactory::getUser()->authorise('core.admin')) { - return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); + throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403); } $this->php_settings = $this->get('PhpSettings'); @@ -92,6 +92,7 @@ public function display($tpl = null) * * @since 1.6 * @note Necessary for Hathor compatibility + * @deprecated 4.0 To be removed with Hathor */ protected function _setSubMenu() { diff --git a/administrator/components/com_admin/views/sysinfo/view.json.php b/administrator/components/com_admin/views/sysinfo/view.json.php index 92455c573581b..c3f010b1b8a8c 100644 --- a/administrator/components/com_admin/views/sysinfo/view.json.php +++ b/administrator/components/com_admin/views/sysinfo/view.json.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -30,7 +30,7 @@ public function display($tpl = null) // Access check. if (!JFactory::getUser()->authorise('core.admin')) { - return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); + throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403); } header('MIME-Version: 1.0'); diff --git a/administrator/components/com_admin/views/sysinfo/view.text.php b/administrator/components/com_admin/views/sysinfo/view.text.php index f284e2cf3e6b7..dd8c833a06e83 100644 --- a/administrator/components/com_admin/views/sysinfo/view.text.php +++ b/administrator/components/com_admin/views/sysinfo/view.text.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_admin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -30,7 +30,7 @@ public function display($tpl = null) // Access check. if (!JFactory::getUser()->authorise('core.admin')) { - return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); + throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403); } header('Content-Type: text/plain; charset=utf-8'); diff --git a/administrator/components/com_ajax/ajax.php b/administrator/components/com_ajax/ajax.php index 665c30efbadeb..0bbcfdf5da4a1 100644 --- a/administrator/components/com_ajax/ajax.php +++ b/administrator/components/com_ajax/ajax.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_ajax * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_ajax/ajax.xml b/administrator/components/com_ajax/ajax.xml index 4f75361049219..81da9b53d0bfd 100644 --- a/administrator/components/com_ajax/ajax.xml +++ b/administrator/components/com_ajax/ajax.xml @@ -3,7 +3,7 @@ com_ajax Joomla! Project August 2013 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_associations/associations.php b/administrator/components/com_associations/associations.php index 2426f4960053c..67bbd2551e0bb 100644 --- a/administrator/components/com_associations/associations.php +++ b/administrator/components/com_associations/associations.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_associations * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_associations/associations.xml b/administrator/components/com_associations/associations.xml index 877f5c615526b..751df652d825f 100644 --- a/administrator/components/com_associations/associations.xml +++ b/administrator/components/com_associations/associations.xml @@ -3,7 +3,7 @@ com_associations Joomla! Project Januar 2017 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_associations/controller.php b/administrator/components/com_associations/controller.php index d81bbcf51204f..f6dd3579a81c3 100644 --- a/administrator/components/com_associations/controller.php +++ b/administrator/components/com_associations/controller.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_associations * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_associations/controllers/association.php b/administrator/components/com_associations/controllers/association.php index cbc614ebc1e59..d37d6a7779063 100644 --- a/administrator/components/com_associations/controllers/association.php +++ b/administrator/components/com_associations/controllers/association.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_associations * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -52,7 +52,7 @@ public function edit($key = null, $urlVar = null) * * @param string $key The name of the primary key of the URL variable. * - * @return void. + * @return void * * @since 3.7.0 */ diff --git a/administrator/components/com_associations/controllers/associations.php b/administrator/components/com_associations/controllers/associations.php index 8ec6606574b6b..6ef44726748b4 100644 --- a/administrator/components/com_associations/controllers/associations.php +++ b/administrator/components/com_associations/controllers/associations.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_associations * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -34,7 +34,7 @@ class AssociationsControllerAssociations extends JControllerAdmin * @param string $prefix The class prefix. Optional. * @param array $config The array of possible config values. Optional. * - * @return JModel|bool + * @return JModel|boolean * * @since 3.7.0 */ @@ -68,4 +68,63 @@ public function clean() $this->getModel('associations')->clean(); $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false)); } + + /** + * Method to check in an item from the association item overview. + * + * @return void + * + * @since 3.7.1 + */ + public function checkin() + { + // Set the redirect so we can just stop processing when we find a condition we can't process + $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false)); + + // Figure out if the item supports checking and check it in + $type = null; + + list($extensionName, $typeName) = explode('.', $this->input->get('itemtype')); + + $extension = AssociationsHelper::getSupportedExtension($extensionName); + $types = $extension->get('types'); + + if (!array_key_exists($typeName, $types)) + { + return; + } + + if (AssociationsHelper::typeSupportsCheckout($extensionName, $typeName) === false) + { + // How on earth we came to that point, eject internet + return; + } + + $cid = $this->input->get('cid', array(), 'array'); + + if (empty($cid)) + { + // Seems we don't have an id to work with. + return; + } + + // We know the first element is the one we need because we don't allow multi selection of rows + $id = $cid[0]; + + if (AssociationsHelper::canCheckinItem($extensionName, $typeName, $id) === true) + { + $item = AssociationsHelper::getItem($extensionName, $typeName, $id); + + $item->checkIn($id); + + return; + } + + $this->setRedirect( + JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list), + JText::_('COM_ASSOCIATIONS_YOU_ARE_NOT_ALLOWED_TO_CHECKIN_THIS_ITEM') + ); + + return; + } } diff --git a/administrator/components/com_associations/helpers/associations.php b/administrator/components/com_associations/helpers/associations.php index 02bb2c2d3a0aa..be4e55b7cb5cd 100644 --- a/administrator/components/com_associations/helpers/associations.php +++ b/administrator/components/com_associations/helpers/associations.php @@ -3,13 +3,14 @@ * @package Joomla.Administrator * @subpackage com_associations * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Registry\Registry; +use Joomla\CMS\Language\LanguageHelper; /** * Associations component helper. @@ -111,7 +112,7 @@ public static function getItem($extensionName, $typeName, $itemId) * * @param string $extensionName The extension name with com_ * - * @return bool + * @return boolean * * @since 3.7.0 */ @@ -130,7 +131,7 @@ public static function hasSupport($extensionName) * * @param string $extensionName The extension name with com_ * - * @return bool + * @return boolean * * @since 3.7.0 */ @@ -177,7 +178,7 @@ public static function getAssociationHtmlList($extensionName, $typeName, $itemId $titleFieldName = self::getTypeFieldName($extensionName, $typeName, 'title'); // Get all content languages. - $languages = self::getContentLanguages(); + $languages = LanguageHelper::getContentLanguages(array(0, 1)); $canEditReference = self::allowEdit($extensionName, $typeName, $itemId); $canCreate = self::allowAdd($extensionName, $typeName); @@ -284,6 +285,7 @@ public static function getAssociationHtmlList($extensionName, $typeName, $itemId } JHtml::_('bootstrap.popover'); + return JLayoutHelper::render('joomla.content.associations', $items); } @@ -444,18 +446,7 @@ private static function getEnabledExtensions() */ public static function getContentLanguages() { - $db = JFactory::getDbo(); - - // Get all content languages. - $query = $db->getQuery(true) - ->select($db->quoteName(array('sef', 'lang_code', 'image', 'title', 'published'))) - ->from($db->quoteName('#__languages')) - ->where($db->quoteName('published') . ' != -2') - ->order($db->quoteName('ordering') . ' ASC'); - - $db->setQuery($query); - - return $db->loadObjectList('lang_code'); + return LanguageHelper::getContentLanguages(array(0, 1)); } /** @@ -465,7 +456,7 @@ public static function getContentLanguages() * @param string $typeName The item type * @param int $itemId The id of item for which we need the associated items * - * @return bool + * @return boolean * * @since 3.7.0 */ @@ -477,7 +468,7 @@ public static function allowEdit($extensionName, $typeName, $itemId) } // Get the extension specific helper method - $helper= self::getExtensionHelper($extensionName); + $helper = self::getExtensionHelper($extensionName); if (method_exists($helper, 'allowEdit')) { @@ -505,7 +496,7 @@ public static function allowAdd($extensionName, $typeName) } // Get the extension specific helper method - $helper= self::getExtensionHelper($extensionName); + $helper = self::getExtensionHelper($extensionName); if (method_exists($helper, 'allowAdd')) { @@ -641,4 +632,33 @@ public static function getTypeFieldName($extensionName, $typeName, $fieldName) return $helper->getTypeFieldName($typeName, $fieldName); } + + /** + * Gets the language filter system plugin extension id. + * + * @return integer The language filter system plugin extension id. + * + * @since 3.7.2 + */ + public static function getLanguagefilterPluginId() + { + $db = JFactory::getDbo(); + $query = $db->getQuery(true) + ->select($db->quoteName('extension_id')) + ->from($db->quoteName('#__extensions')) + ->where($db->quoteName('folder') . ' = ' . $db->quote('system')) + ->where($db->quoteName('element') . ' = ' . $db->quote('languagefilter')); + $db->setQuery($query); + + try + { + $result = (int) $db->loadResult(); + } + catch (RuntimeException $e) + { + JError::raiseWarning(500, $e->getMessage()); + } + + return $result; + } } diff --git a/administrator/components/com_associations/layouts/joomla/searchtools/default/bar.php b/administrator/components/com_associations/layouts/joomla/searchtools/default/bar.php index 1f6761abd74ec..db174b29dc7b9 100644 --- a/administrator/components/com_associations/layouts/joomla/searchtools/default/bar.php +++ b/administrator/components/com_associations/layouts/joomla/searchtools/default/bar.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_associations * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_associations/models/association.php b/administrator/components/com_associations/models/association.php index 10fdac9c8e4cc..79b39ef910f59 100644 --- a/administrator/components/com_associations/models/association.php +++ b/administrator/components/com_associations/models/association.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_associations * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_associations/models/associations.php b/administrator/components/com_associations/models/associations.php index 03a3696e3d78e..bee4212e780ce 100644 --- a/administrator/components/com_associations/models/associations.php +++ b/administrator/components/com_associations/models/associations.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_associations * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -60,7 +60,7 @@ public function __construct($config = array()) * * @return void * - * @since 3.7.0 + * @since 3.7.0 */ protected function populateState($ordering = 'ordering', $direction = 'asc') { @@ -144,14 +144,13 @@ protected function getStoreId($id = '') /** * Build an SQL query to load the list data. * - * @return JDatabaseQuery|bool + * @return JDatabaseQuery|boolean * * @since 3.7.0 */ protected function getListQuery() { $type = null; - $listOrdering = $this->getState('list.fullordering'); list($extensionName, $typeName) = explode('.', $this->state->get('itemtype')); @@ -396,18 +395,19 @@ protected function getListQuery() { $search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%')); $query->where('(' . $db->qn($fields['title']) . ' LIKE ' . $search - . ' OR ' . $db->qn($fields['alias']) . ' LIKE ' . $search . ')'); + . ' OR ' . $db->qn($fields['alias']) . ' LIKE ' . $search . ')' + ); } } // Add the group by clause $query->group($db->qn($groupby)); - // Add the list ordering clause. - if (!empty($listOrdering)) - { - $query->order($db->escape($listOrdering)); - } + // Add the list ordering clause + $listOrdering = $this->state->get('list.ordering', 'id'); + $orderDirn = $this->state->get('list.direction', 'ASC'); + + $query->order($db->escape($listOrdering) . ' ' . $db->escape($orderDirn)); return $query; } diff --git a/administrator/components/com_associations/models/fields/itemlanguage.php b/administrator/components/com_associations/models/fields/itemlanguage.php index 459a91a7c2c6f..1c8ddf46d52ec 100644 --- a/administrator/components/com_associations/models/fields/itemlanguage.php +++ b/administrator/components/com_associations/models/fields/itemlanguage.php @@ -3,13 +3,14 @@ * @package Joomla.Administrator * @subpackage com_associations * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_BASE') or die; use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Language\LanguageHelper; JLoader::register('AssociationsHelper', JPATH_ADMINISTRATOR . '/components/com_associations/helpers/associations.php'); JFormHelper::loadFieldClass('list'); @@ -57,7 +58,7 @@ protected function getOptions() $canCreate = AssociationsHelper::allowAdd($extensionName, $typeName); // Gets existing languages. - $existingLanguages = AssociationsHelper::getContentLanguages(); + $existingLanguages = LanguageHelper::getContentLanguages(array(0, 1)); $options = array(); @@ -79,7 +80,7 @@ protected function getOptions() $itemId = (int) $associations[$language->lang_code]['id']; $options[$langCode]->value = $language->lang_code . ':' . $itemId . ':edit'; - // Check if user does have permission to edit the associated item. + // Check if user does have permission to edit the associated item. $canEdit = AssociationsHelper::allowEdit($extensionName, $typeName, $itemId); // Check if item can be checked out diff --git a/administrator/components/com_associations/models/fields/itemtype.php b/administrator/components/com_associations/models/fields/itemtype.php index 6ec671a3ec042..f3335c6e6c68d 100644 --- a/administrator/components/com_associations/models/fields/itemtype.php +++ b/administrator/components/com_associations/models/fields/itemtype.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_associations * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_BASE') or die; @@ -26,7 +26,7 @@ class JFormFieldItemType extends JFormFieldGroupedList * @since 3.7.0 */ protected $type = 'ItemType'; - + /** * Method to get the field input markup. * diff --git a/administrator/components/com_associations/models/fields/modalassociation.php b/administrator/components/com_associations/models/fields/modalassociation.php index 64371e85df692..85dae7257a4ec 100644 --- a/administrator/components/com_associations/models/fields/modalassociation.php +++ b/administrator/components/com_associations/models/fields/modalassociation.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_associations * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -75,11 +75,11 @@ protected function getInput() // Clear association button $html[] = '' - . '' . JText::_('JCLEAR') - . ''; + . ' class="btn' . ($value ? '' : ' hidden') . '"' + . ' onclick="return Joomla.submitbutton(\'undo-association\');"' + . ' id="remove-assoc">' + . '' . JText::_('JCLEAR') + . ''; $html[] = ''; @@ -95,8 +95,8 @@ protected function getInput() 'width' => '800px', 'bodyHeight' => '70', 'modalWidth' => '80', - 'footer' => '', + 'footer' => '', ) ); diff --git a/administrator/components/com_associations/models/forms/association.xml b/administrator/components/com_associations/models/forms/association.xml index 89add5542b210..9e8d880e22984 100644 --- a/administrator/components/com_associations/models/forms/association.xml +++ b/administrator/components/com_associations/models/forms/association.xml @@ -6,7 +6,7 @@ type="itemlanguage" label="COM_ASSOCIATIONS_ITEM_FIELD_LANGUAGE_LABEL" description="COM_ASSOCIATIONS_ITEM_FIELD_LANGUAGE_DESC" - > + > diff --git a/administrator/components/com_associations/models/forms/filter_associations.xml b/administrator/components/com_associations/models/forms/filter_associations.xml index c44a3804fd005..9563de4489650 100644 --- a/administrator/components/com_associations/models/forms/filter_associations.xml +++ b/administrator/components/com_associations/models/forms/filter_associations.xml @@ -7,7 +7,7 @@ description="COM_ASSOCIATIONS_COMPONENT_SELECTOR_DESC" filtermode="selector" onchange="jQuery('select[id^=\'filter_\']').val('');jQuery('select[id^=\'list_\']').val('');this.form.submit();" - > + > @@ -15,10 +15,10 @@ name="language" type="contentlanguage" label="JOPTION_FILTER_LANGUAGE" - filtermode="selector" description="JOPTION_FILTER_LANGUAGE_DESC" + filtermode="selector" onchange="this.form.submit();" - > + > @@ -37,7 +37,7 @@ label="JOPTION_FILTER_PUBLISHED" description="JOPTION_FILTER_PUBLISHED_DESC" onchange="this.form.submit();" - > + > @@ -49,7 +49,7 @@ published="0,1,2" extension="dynamic" onchange="this.form.submit();" - > + > @@ -60,7 +60,7 @@ description="COM_ASSOCIATIONS_FILTER_MENUTYPE_DESC" clientid="0" onchange="this.form.submit();" - > + > @@ -70,7 +70,7 @@ label="JOPTION_FILTER_ACCESS" description="JOPTION_FILTER_ACCESS_DESC" onchange="this.form.submit();" - > + > @@ -83,7 +83,7 @@ last="10" step="1" onchange="this.form.submit();" - > + > @@ -94,7 +94,7 @@ type="list" default="id ASC" onchange="this.form.submit();" - > + > diff --git a/administrator/components/com_associations/views/association/tmpl/edit.php b/administrator/components/com_associations/views/association/tmpl/edit.php index ced7000ad5d54..2fe76e58a7775 100644 --- a/administrator/components/com_associations/views/association/tmpl/edit.php +++ b/administrator/components/com_associations/views/association/tmpl/edit.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_associations * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -22,7 +22,7 @@ 'id' => $this->referenceId, ); ?> - @@ -32,12 +32,13 @@

    - @@ -50,12 +51,13 @@ form->getInput('modalassociation'); ?> form->getInput('itemlanguage'); ?>
    - diff --git a/administrator/components/com_associations/views/association/view.html.php b/administrator/components/com_associations/views/association/view.html.php index 1440bad871201..f071bec34671a 100644 --- a/administrator/components/com_associations/views/association/view.html.php +++ b/administrator/components/com_associations/views/association/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_associations * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -110,6 +110,7 @@ public function display($tpl = null) $reference = ArrayHelper::fromObject(AssociationsHelper::getItem($extensionName, $typeName, $referenceId)); $this->referenceLanguage = $reference[$languageField]; + $this->referenceTitle = AssociationsHelper::getTypeFieldName($extensionName, $typeName, 'title'); $options = array( 'option' => $typeName === 'category' ? 'com_categories' : $extensionName, @@ -126,6 +127,7 @@ public function display($tpl = null) $this->targetLanguage = ''; $this->defaultTargetSrc = ''; $this->targetAction = ''; + $this->targetTitle = ''; if ($target = $input->get('target', '', 'string')) { @@ -133,8 +135,9 @@ public function display($tpl = null) $this->targetAction = $matches[2]; $this->targetId = $matches[1]; $this->targetLanguage = $matches[0]; + $this->targetTitle = AssociationsHelper::getTypeFieldName($extensionName, $typeName, 'title'); $task = $typeName . '.' . $this->targetAction; - $this->defaultTargetSrc = JRoute::_($this->editUri . '&task= ' . $task . ' &id=' . (int) $this->targetId); + $this->defaultTargetSrc = JRoute::_($this->editUri . '&task=' . $task . '&id=' . (int) $this->targetId); $this->form->setValue('itemlanguage', '', $this->targetLanguage . ':' . $this->targetId . ':' . $this->targetAction); } @@ -154,7 +157,7 @@ public function display($tpl = null) // We also need to change the category filter to show show categories with All or the forced language. if ($forcedLanguage = JFactory::getApplication()->input->get('forcedLanguage', '', 'CMD')) { - // If the language is forced we can't allow to select the language, so transform the language selector filter into an hidden field. + // If the language is forced we can't allow to select the language, so transform the language selector filter into a hidden field. $languageXml = new SimpleXMLElement(''); $this->filterForm->setField($languageXml, 'filter', true); @@ -197,13 +200,13 @@ protected function addToolbar() $bar->appendButton( 'Custom', '', 'reference' ); $bar->appendButton( 'Custom', '', 'target' ); diff --git a/administrator/components/com_associations/views/associations/tmpl/default.php b/administrator/components/com_associations/views/associations/tmpl/default.php index 9b6dbaa6893c5..c33f6cf041dc9 100644 --- a/administrator/components/com_associations/views/associations/tmpl/default.php +++ b/administrator/components/com_associations/views/associations/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_associations * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -16,7 +16,7 @@ JHtml::_('behavior.multiselect'); JHtml::_('formbehavior.chosen', 'select'); -$listOrder = $this->escape($this->state->get('list.fullordering')); +$listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $canManageCheckin = JFactory::getUser()->authorise('core.manage', 'com_checkin'); $colSpan = 5; @@ -110,7 +110,6 @@ items as $i => $item) : - $canCheckin = true; $canEdit = AssociationsHelper::allowEdit($this->extensionName, $this->typeName, $item->id); $canCheckin = $canManageCheckin || AssociationsHelper::canCheckinItem($this->extensionName, $this->typeName, $item->id); $isCheckout = AssociationsHelper::isCheckoutItem($this->extensionName, $this->typeName, $item->id); @@ -122,9 +121,13 @@ + id); ?> level)) : ?> $item->level)); ?> + + editor, $item->checked_out_time, 'associations.'); ?> + editor, $item->checked_out_time, 'associations.', $canCheckin); ?> @@ -173,6 +176,7 @@ +
    diff --git a/administrator/components/com_associations/views/associations/tmpl/default.xml b/administrator/components/com_associations/views/associations/tmpl/default.xml new file mode 100644 index 0000000000000..d2dc27b12bdf2 --- /dev/null +++ b/administrator/components/com_associations/views/associations/tmpl/default.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/administrator/components/com_associations/views/associations/tmpl/modal.php b/administrator/components/com_associations/views/associations/tmpl/modal.php index 2a5d2755000fe..6d21097cac952 100644 --- a/administrator/components/com_associations/views/associations/tmpl/modal.php +++ b/administrator/components/com_associations/views/associations/tmpl/modal.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_associations * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -21,10 +21,12 @@ JHtml::_('behavior.multiselect'); JHtml::_('formbehavior.chosen', 'select'); -$function = $app->input->getCmd('function', 'jSelectAssociation'); -$listOrder = $this->escape($this->state->get('list.ordering')); -$listDirn = $this->escape($this->state->get('list.direction')); -$colSpan = 4; +$function = $app->input->getCmd('function', 'jSelectAssociation'); +$listOrder = $this->escape($this->state->get('list.ordering')); +$listDirn = $this->escape($this->state->get('list.direction')); +$canManageCheckin = JFactory::getUser()->authorise('core.manage', 'com_checkin'); +$colSpan = 4; + $iconStates = array( -2 => 'icon-trash', 0 => 'icon-unpublish', @@ -44,8 +46,8 @@ });" ); ?> -
    + sidebar)) : ?>
    @@ -102,18 +104,31 @@ items as $i => $item) : + $canEdit = AssociationsHelper::allowEdit($this->extensionName, $this->typeName, $item->id); + $canCheckin = $canManageCheckin || AssociationsHelper::canCheckinItem($this->extensionName, $this->typeName, $item->id); + $isCheckout = AssociationsHelper::isCheckoutItem($this->extensionName, $this->typeName, $item->id); ?> typeSupports['state'])) : ?> - + level)) : ?> $item->level)); ?> - escape($item->title); ?> + + + escape($item->title); ?> + + editor, $item->checked_out_time, 'associations.'); ?> + + escape($item->title); ?> + + + escape($item->title); ?> + typeFields['alias'])) : ?> escape($item->alias)); ?> diff --git a/administrator/components/com_associations/views/associations/view.html.php b/administrator/components/com_associations/views/associations/view.html.php index 5c82f82b483d5..92e5d7b916a4c 100644 --- a/administrator/components/com_associations/views/associations/view.html.php +++ b/administrator/components/com_associations/views/associations/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_associations * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -69,7 +69,8 @@ public function display($tpl = null) if (!JLanguageAssociations::isEnabled()) { - JFactory::getApplication()->enqueueMessage(JText::_('COM_ASSOCIATIONS_ERROR_NO_ASSOC'), 'warning'); + $link = JRoute::_('index.php?option=com_plugins&task=plugin.edit&extension_id=' . AssociationsHelper::getLanguagefilterPluginId()); + JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_ASSOCIATIONS_ERROR_NO_ASSOC', $link), 'warning'); } elseif ($this->state->get('itemtype') == '' || $this->state->get('language') == '') { @@ -128,21 +129,25 @@ public function display($tpl = null) unset($this->activeFilters['state']); $this->filterForm->removeField('state', 'filter'); } + if (empty($support['category'])) { unset($this->activeFilters['category_id']); $this->filterForm->removeField('category_id', 'filter'); } + if ($extensionName !== 'com_menus') { unset($this->activeFilters['menutype']); $this->filterForm->removeField('menutype', 'filter'); } + if (empty($support['level'])) { unset($this->activeFilters['level']); $this->filterForm->removeField('level', 'filter'); } + if (empty($support['acl'])) { unset($this->activeFilters['access']); @@ -221,6 +226,7 @@ protected function addToolbar() JToolbarHelper::custom('associations.purge', 'purge', 'purge', 'COM_ASSOCIATIONS_PURGE', false, false); JToolbarHelper::custom('associations.clean', 'refresh', 'refresh', 'COM_ASSOCIATIONS_DELETE_ORPHANS', false, false); } + JToolbarHelper::preferences('com_associations'); } diff --git a/administrator/components/com_banners/banners.php b/administrator/components/com_banners/banners.php index f1afc76b48e61..df7d18bf53a95 100644 --- a/administrator/components/com_banners/banners.php +++ b/administrator/components/com_banners/banners.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_banners/banners.xml b/administrator/components/com_banners/banners.xml index 13ebc6bea19a9..e2bda0c984173 100644 --- a/administrator/components/com_banners/banners.xml +++ b/administrator/components/com_banners/banners.xml @@ -3,7 +3,7 @@ com_banners Joomla! Project April 2006 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_banners/config.xml b/administrator/components/com_banners/config.xml index 74e81cb77c9ee..6d55b5decf705 100644 --- a/administrator/components/com_banners/config.xml +++ b/administrator/components/com_banners/config.xml @@ -75,7 +75,7 @@ setState('basename', $form['basename']); $model->setState('compressed', $form['compressed']); - $config = JFactory::getConfig(); - $cookie_domain = $config->get('cookie_domain', ''); - $cookie_path = $config->get('cookie_path', '/'); + // Create one year cookies. + $cookieLifeTime = time() + 365 * 86400; + $cookieDomain = $app->get('cookie_domain', ''); + $cookiePath = $app->get('cookie_path', '/'); + $isHttpsForced = $app->isHttpsForced(); - setcookie(JApplicationHelper::getHash($this->context . '.basename'), $form['basename'], time() + 365 * 86400, $cookie_path, $cookie_domain); - setcookie(JApplicationHelper::getHash($this->context . '.compressed'), $form['compressed'], time() + 365 * 86400, $cookie_path, $cookie_domain); + $app->input->cookie->set( + JApplicationHelper::getHash($this->context . '.basename'), + $form['basename'], + $cookieLifeTime, + $cookiePath, + $cookieDomain, + $isHttpsForced, + true + ); + + $app->input->cookie->set( + JApplicationHelper::getHash($this->context . '.compressed'), + $form['compressed'], + $cookieLifeTime, + $cookiePath, + $cookieDomain, + $isHttpsForced, + true + ); // Push the model into the view (as default). $view->setModel($model, true); diff --git a/administrator/components/com_banners/helpers/banners.php b/administrator/components/com_banners/helpers/banners.php index b73dcfa3c50ff..1af52a92149f2 100644 --- a/administrator/components/com_banners/helpers/banners.php +++ b/administrator/components/com_banners/helpers/banners.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -188,7 +188,7 @@ public static function getClientOptions() /** * Adds Count Items for Category Manager. * - * @param stdClass[] &$items The banner category objects + * @param stdClass[] $items The banner category objects * * @return stdClass[] * @@ -242,7 +242,7 @@ public static function countItems(&$items) /** * Adds Count Items for Tag Manager. * - * @param stdClass[] &$items The banner tag objects + * @param stdClass[] $items The banner tag objects * @param string $extension The name of the active view. * * @return stdClass[] diff --git a/administrator/components/com_banners/helpers/html/banner.php b/administrator/components/com_banners/helpers/html/banner.php index fe5b52cf9cfba..fdbbebd273ca5 100644 --- a/administrator/components/com_banners/helpers/html/banner.php +++ b/administrator/components/com_banners/helpers/html/banner.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_banners/models/banner.php b/administrator/components/com_banners/models/banner.php index 37a07e9d101d7..bf1e662526716 100644 --- a/administrator/components/com_banners/models/banner.php +++ b/administrator/components/com_banners/models/banner.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -104,7 +104,7 @@ protected function batchClient($value, $pks, $contexts) * * @return mixed An array of new IDs on success, boolean false on failure. * - * @since 2.5 + * @since 2.5 */ protected function batchCopy($value, $pks, $contexts) { @@ -373,7 +373,7 @@ protected function loadFormData() /** * Method to stick records. * - * @param array &$pks The ids of the items to publish. + * @param array $pks The ids of the items to publish. * @param integer $value The value of the published state * * @return boolean True on success. @@ -562,7 +562,7 @@ public function save($data) /** * Is the user allowed to create an on the fly category? * - * @return bool + * @return boolean * * @since 3.6.1 */ diff --git a/administrator/components/com_banners/models/banners.php b/administrator/components/com_banners/models/banners.php index e2e9495da0b26..6cb80bcf5c178 100644 --- a/administrator/components/com_banners/models/banners.php +++ b/administrator/components/com_banners/models/banners.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_banners/models/client.php b/administrator/components/com_banners/models/client.php index 9d14c0d348479..557784839b37f 100644 --- a/administrator/components/com_banners/models/client.php +++ b/administrator/components/com_banners/models/client.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_banners/models/clients.php b/administrator/components/com_banners/models/clients.php index 380c72b34dbb9..5908ecf8f5ba7 100644 --- a/administrator/components/com_banners/models/clients.php +++ b/administrator/components/com_banners/models/clients.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_banners/models/download.php b/administrator/components/com_banners/models/download.php index c01de0b0e29f7..ae066753d7465 100644 --- a/administrator/components/com_banners/models/download.php +++ b/administrator/components/com_banners/models/download.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -72,7 +72,7 @@ public function getForm($data = array(), $loadData = true) */ protected function loadFormData() { - $data = array( + $data = (object) array( 'basename' => $this->getState('basename'), 'compressed' => $this->getState('compressed'), ); diff --git a/administrator/components/com_banners/models/fields/bannerclient.php b/administrator/components/com_banners/models/fields/bannerclient.php index b7e2c46fc2c90..9fa42f3c31b1e 100644 --- a/administrator/components/com_banners/models/fields/bannerclient.php +++ b/administrator/components/com_banners/models/fields/bannerclient.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_banners/models/fields/clicks.php b/administrator/components/com_banners/models/fields/clicks.php index d3d9166eba712..d7ea386cc9850 100644 --- a/administrator/components/com_banners/models/fields/clicks.php +++ b/administrator/components/com_banners/models/fields/clicks.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_banners/models/fields/impmade.php b/administrator/components/com_banners/models/fields/impmade.php index da6e26889ce30..6c2f9ea3f8212 100644 --- a/administrator/components/com_banners/models/fields/impmade.php +++ b/administrator/components/com_banners/models/fields/impmade.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_banners/models/fields/imptotal.php b/administrator/components/com_banners/models/fields/imptotal.php index ec5afcdc2067a..f0ce87ee802e0 100644 --- a/administrator/components/com_banners/models/fields/imptotal.php +++ b/administrator/components/com_banners/models/fields/imptotal.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_banners/models/forms/banner.xml b/administrator/components/com_banners/models/forms/banner.xml index 0276b64f55858..ed79d80450594 100644 --- a/administrator/components/com_banners/models/forms/banner.xml +++ b/administrator/components/com_banners/models/forms/banner.xml @@ -4,7 +4,7 @@ getAdapter('zip')) { $this->setError(JText::_('COM_BANNERS_ERR_ZIP_ADAPTER_FAILURE')); diff --git a/administrator/components/com_banners/tables/banner.php b/administrator/components/com_banners/tables/banner.php index 3bc75e59e20b8..c83b502792bdb 100644 --- a/administrator/components/com_banners/tables/banner.php +++ b/administrator/components/com_banners/tables/banner.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -22,7 +22,7 @@ class BannersTableBanner extends JTable /** * Constructor * - * @param JDatabaseDriver &$db Database connector object + * @param JDatabaseDriver $db Database connector object * * @since 1.5 */ @@ -150,8 +150,8 @@ public function bind($array, $ignore = array()) $height = abs((int) $registry->get('height', 0)); // Sets the width and height to an empty string if = 0 - $registry->set('width', ($width ? $width : '')); - $registry->set('height', ($height ? $height : '')); + $registry->set('width', $width ?: ''); + $registry->set('height', $height ?: ''); $array['params'] = (string) $registry; } @@ -173,6 +173,8 @@ public function bind($array, $ignore = array()) */ public function store($updateNulls = false) { + $db = $this->getDbo(); + if (empty($this->id)) { $purchaseType = $this->purchase_type; @@ -180,7 +182,7 @@ public function store($updateNulls = false) if ($purchaseType < 0 && $this->cid) { /** @var BannersTableClient $client */ - $client = JTable::getInstance('Client', 'BannersTable'); + $client = JTable::getInstance('Client', 'BannersTable', array('dbo' => $db)); $client->load($this->cid); $purchaseType = $client->purchase_type; } @@ -220,7 +222,7 @@ public function store($updateNulls = false) { // Get the old row /** @var BannersTableBanner $oldrow */ - $oldrow = JTable::getInstance('Banner', 'BannersTable'); + $oldrow = JTable::getInstance('Banner', 'BannersTable', array('dbo' => $db)); if (!$oldrow->load($this->id) && $oldrow->getError()) { @@ -229,7 +231,7 @@ public function store($updateNulls = false) // Verify that the alias is unique /** @var BannersTableBanner $table */ - $table = JTable::getInstance('Banner', 'BannersTable'); + $table = JTable::getInstance('Banner', 'BannersTable', array('dbo' => $db)); if ($table->load(array('alias' => $this->alias, 'catid' => $this->catid)) && ($table->id != $this->id || $this->id == 0)) { diff --git a/administrator/components/com_banners/tables/client.php b/administrator/components/com_banners/tables/client.php index fea12f8715da8..38540cdf0b55c 100644 --- a/administrator/components/com_banners/tables/client.php +++ b/administrator/components/com_banners/tables/client.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -21,7 +21,7 @@ class BannersTableClient extends JTable /** * Constructor * - * @param JDatabaseDriver &$db Database connector object + * @param JDatabaseDriver $db Database connector object * * @since 1.5 */ diff --git a/administrator/components/com_banners/views/banner/tmpl/edit.php b/administrator/components/com_banners/views/banner/tmpl/edit.php index dc07733319e0f..9d98677a35811 100644 --- a/administrator/components/com_banners/views/banner/tmpl/edit.php +++ b/administrator/components/com_banners/views/banner/tmpl/edit.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_banners/views/banner/view.html.php b/administrator/components/com_banners/views/banner/view.html.php index 503ab2b4f03e2..da154a92eb65f 100644 --- a/administrator/components/com_banners/views/banner/view.html.php +++ b/administrator/components/com_banners/views/banner/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -56,9 +56,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } $this->addToolbar(); diff --git a/administrator/components/com_banners/views/banners/tmpl/default.php b/administrator/components/com_banners/views/banners/tmpl/default.php index faacb3bfedeba..01d348812c758 100644 --- a/administrator/components/com_banners/views/banners/tmpl/default.php +++ b/administrator/components/com_banners/views/banners/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -111,7 +111,7 @@ + value="ordering; ?>" class="width-20 text-area-order" /> @@ -130,8 +130,8 @@ ?>
    - -
    + +
    checked_out) : ?> editor, $item->checked_out_time, 'banners.', $canCheckin); ?> @@ -141,7 +141,7 @@ escape($item->name); ?> - + escape($item->alias)); ?>
    @@ -156,7 +156,7 @@ client_name; ?> - impmade, $item->imptotal ? $item->imptotal : JText::_('COM_BANNERS_UNLIMITED')); ?> + impmade, $item->imptotal ?: JText::_('COM_BANNERS_UNLIMITED')); ?> clicks; ?> - @@ -180,8 +180,8 @@ 'bootstrap.renderModal', 'collapseModal', array( - 'title' => JText::_('COM_BANNERS_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') + 'title' => JText::_('COM_BANNERS_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer'), ), $this->loadTemplate('batch_body') ); ?> diff --git a/administrator/components/com_banners/views/banners/tmpl/default_batch_body.php b/administrator/components/com_banners/views/banners/tmpl/default_batch_body.php index 128cc76b9834d..2bbf95a642b1e 100644 --- a/administrator/components/com_banners/views/banners/tmpl/default_batch_body.php +++ b/administrator/components/com_banners/views/banners/tmpl/default_batch_body.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_banners/views/banners/tmpl/default_batch_footer.php b/administrator/components/com_banners/views/banners/tmpl/default_batch_footer.php index df299bbf7ba60..9d985b15e27a2 100644 --- a/administrator/components/com_banners/views/banners/tmpl/default_batch_footer.php +++ b/administrator/components/com_banners/views/banners/tmpl/default_batch_footer.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_banners/views/banners/view.html.php b/administrator/components/com_banners/views/banners/view.html.php index d954cff9ccb0e..322dc269038b4 100644 --- a/administrator/components/com_banners/views/banners/view.html.php +++ b/administrator/components/com_banners/views/banners/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -65,9 +65,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } BannersHelper::addSubmenu('banners'); @@ -103,7 +101,7 @@ protected function addToolbar() JToolbarHelper::addNew('banner.add'); } - if (($canDo->get('core.edit'))) + if ($canDo->get('core.edit')) { JToolbarHelper::editList('banner.edit'); } @@ -175,15 +173,15 @@ protected function addToolbar() protected function getSortFields() { return array( - 'ordering' => JText::_('JGRID_HEADING_ORDERING'), - 'a.state' => JText::_('JSTATUS'), - 'a.name' => JText::_('COM_BANNERS_HEADING_NAME'), - 'a.sticky' => JText::_('COM_BANNERS_HEADING_STICKY'), + 'ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.state' => JText::_('JSTATUS'), + 'a.name' => JText::_('COM_BANNERS_HEADING_NAME'), + 'a.sticky' => JText::_('COM_BANNERS_HEADING_STICKY'), 'client_name' => JText::_('COM_BANNERS_HEADING_CLIENT'), - 'impmade' => JText::_('COM_BANNERS_HEADING_IMPRESSIONS'), - 'clicks' => JText::_('COM_BANNERS_HEADING_CLICKS'), - 'a.language' => JText::_('JGRID_HEADING_LANGUAGE'), - 'a.id' => JText::_('JGRID_HEADING_ID') + 'impmade' => JText::_('COM_BANNERS_HEADING_IMPRESSIONS'), + 'clicks' => JText::_('COM_BANNERS_HEADING_CLICKS'), + 'a.language' => JText::_('JGRID_HEADING_LANGUAGE'), + 'a.id' => JText::_('JGRID_HEADING_ID'), ); } } diff --git a/administrator/components/com_banners/views/client/tmpl/edit.php b/administrator/components/com_banners/views/client/tmpl/edit.php index e2e84a0cef1bf..0c55c5c21008b 100644 --- a/administrator/components/com_banners/views/client/tmpl/edit.php +++ b/administrator/components/com_banners/views/client/tmpl/edit.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_banners/views/client/view.html.php b/administrator/components/com_banners/views/client/view.html.php index ab0975e8acc1e..269081b4658b8 100644 --- a/administrator/components/com_banners/views/client/view.html.php +++ b/administrator/components/com_banners/views/client/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -63,9 +63,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } $this->addToolbar(); diff --git a/administrator/components/com_banners/views/clients/tmpl/default.php b/administrator/components/com_banners/views/clients/tmpl/default.php index ef63cdba1779f..210d4de9a9f24 100644 --- a/administrator/components/com_banners/views/clients/tmpl/default.php +++ b/administrator/components/com_banners/views/clients/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -27,7 +27,7 @@ $userId = $user->get('id'); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); -$params = (isset($this->state->params)) ? $this->state->params : new JObject; +$params = isset($this->state->params) ? $this->state->params : new JObject; ?>
    diff --git a/administrator/components/com_banners/views/clients/view.html.php b/administrator/components/com_banners/views/clients/view.html.php index efdc218fc5df4..5d796e522ee20 100644 --- a/administrator/components/com_banners/views/clients/view.html.php +++ b/administrator/components/com_banners/views/clients/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -57,9 +57,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } BannersHelper::addSubmenu('clients'); diff --git a/administrator/components/com_banners/views/download/tmpl/default.php b/administrator/components/com_banners/views/download/tmpl/default.php index 3698048b51409..89f9aefb020fa 100644 --- a/administrator/components/com_banners/views/download/tmpl/default.php +++ b/administrator/components/com_banners/views/download/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_banners/views/download/view.html.php b/administrator/components/com_banners/views/download/view.html.php index a4b0a4243a313..4b72496970781 100644 --- a/administrator/components/com_banners/views/download/view.html.php +++ b/administrator/components/com_banners/views/download/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -37,9 +37,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } return parent::display($tpl); diff --git a/administrator/components/com_banners/views/tracks/tmpl/default.php b/administrator/components/com_banners/views/tracks/tmpl/default.php index f815f4bddadf6..a41d327614272 100644 --- a/administrator/components/com_banners/views/tracks/tmpl/default.php +++ b/administrator/components/com_banners/views/tracks/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -76,7 +76,7 @@ count; ?> - track_date, JText::_('DATE_FORMAT_LC4') . ' H:i'); ?> + track_date, JText::_('DATE_FORMAT_LC5')); ?> diff --git a/administrator/components/com_banners/views/tracks/view.html.php b/administrator/components/com_banners/views/tracks/view.html.php index 32887e9947e8a..768122d6f509a 100644 --- a/administrator/components/com_banners/views/tracks/view.html.php +++ b/administrator/components/com_banners/views/tracks/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -57,9 +57,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } BannersHelper::addSubmenu('tracks'); diff --git a/administrator/components/com_banners/views/tracks/view.raw.php b/administrator/components/com_banners/views/tracks/view.raw.php index 918fca9583554..d4ffe1c6acfba 100644 --- a/administrator/components/com_banners/views/tracks/view.raw.php +++ b/administrator/components/com_banners/views/tracks/view.raw.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_banners * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -33,9 +33,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } $document = JFactory::getDocument(); diff --git a/administrator/components/com_cache/access.xml b/administrator/components/com_cache/access.xml new file mode 100644 index 0000000000000..e40c7101c90c8 --- /dev/null +++ b/administrator/components/com_cache/access.xml @@ -0,0 +1,7 @@ + + +
    + + +
    +
    diff --git a/administrator/components/com_cache/cache.php b/administrator/components/com_cache/cache.php index b78b099d45938..92ffc99e14f9b 100644 --- a/administrator/components/com_cache/cache.php +++ b/administrator/components/com_cache/cache.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_cache * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_cache/cache.xml b/administrator/components/com_cache/cache.xml index 613d151756345..c9ef2a72fae35 100644 --- a/administrator/components/com_cache/cache.xml +++ b/administrator/components/com_cache/cache.xml @@ -3,7 +3,7 @@ com_cache Joomla! Project April 2006 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_cache/config.xml b/administrator/components/com_cache/config.xml index 76186ee8c3f1d..692b89a61db12 100644 --- a/administrator/components/com_cache/config.xml +++ b/administrator/components/com_cache/config.xml @@ -12,15 +12,6 @@ filter="rules" validate="rules" component="com_cache" - section="component"> - - - + section="component" />
  • diff --git a/administrator/components/com_cache/controller.php b/administrator/components/com_cache/controller.php index 9b2e404a20b8d..b00b2c68a6421 100644 --- a/administrator/components/com_cache/controller.php +++ b/administrator/components/com_cache/controller.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_cache * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_cache/helpers/cache.php b/administrator/components/com_cache/helpers/cache.php index f4e1c6c2b262b..260f10b33b701 100644 --- a/administrator/components/com_cache/helpers/cache.php +++ b/administrator/components/com_cache/helpers/cache.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_cache * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_cache/models/cache.php b/administrator/components/com_cache/models/cache.php index e1647f05bb18a..f9dca0ed8839a 100644 --- a/administrator/components/com_cache/models/cache.php +++ b/administrator/components/com_cache/models/cache.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_cache * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -54,7 +54,7 @@ public function __construct($config = array()) 'group', 'count', 'size', - 'cliend_id', + 'client_id', ); } diff --git a/administrator/components/com_cache/views/cache/tmpl/default.php b/administrator/components/com_cache/views/cache/tmpl/default.php index 1886d59a66721..b299ded846306 100644 --- a/administrator/components/com_cache/views/cache/tmpl/default.php +++ b/administrator/components/com_cache/views/cache/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_cache * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -56,18 +56,18 @@ foreach ($this->data as $folder => $item) : ?> - + count; ?> - size*1024); ?> + size); ?> diff --git a/administrator/components/com_cache/views/cache/view.html.php b/administrator/components/com_cache/views/cache/view.html.php index 35e56171b5751..6208442ca9ac5 100644 --- a/administrator/components/com_cache/views/cache/view.html.php +++ b/administrator/components/com_cache/views/cache/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_cache * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -47,9 +47,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } $this->addToolbar(); @@ -78,7 +76,7 @@ protected function addToolbar() } JToolbarHelper::custom('delete', 'delete.png', 'delete_f2.png', 'JTOOLBAR_DELETE', true); - JToolbarHelper::custom('deleteAll', 'delete.png', 'delete_f2.png', 'JTOOLBAR_DELETE_ALL', false); + JToolbarHelper::custom('deleteAll', 'remove.png', 'delete_f2.png', 'JTOOLBAR_DELETE_ALL', false); JToolbarHelper::divider(); if (JFactory::getUser()->authorise('core.admin', 'com_cache')) diff --git a/administrator/components/com_cache/views/purge/tmpl/default.php b/administrator/components/com_cache/views/purge/tmpl/default.php index 4000dab735b57..7391eca4d903f 100644 --- a/administrator/components/com_cache/views/purge/tmpl/default.php +++ b/administrator/components/com_cache/views/purge/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_cache * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_cache/views/purge/view.html.php b/administrator/components/com_cache/views/purge/view.html.php index 1e3736bf2b3b4..ed1fbd42255a0 100644 --- a/administrator/components/com_cache/views/purge/view.html.php +++ b/administrator/components/com_cache/views/purge/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_cache * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_categories/categories.php b/administrator/components/com_categories/categories.php index 764b293b3058b..979ee32f9a97a 100644 --- a/administrator/components/com_categories/categories.php +++ b/administrator/components/com_categories/categories.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_categories/categories.xml b/administrator/components/com_categories/categories.xml index 8d003a387d258..56a5cb0d3743f 100644 --- a/administrator/components/com_categories/categories.xml +++ b/administrator/components/com_categories/categories.xml @@ -3,7 +3,7 @@ com_categories Joomla! Project December 2007 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_categories/controller.php b/administrator/components/com_categories/controller.php index 8e815de2ec1c9..baea25b846ea3 100644 --- a/administrator/components/com_categories/controller.php +++ b/administrator/components/com_categories/controller.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_categories/controllers/categories.php b/administrator/components/com_categories/controllers/categories.php index e64ab88d4291b..08ea45974674b 100644 --- a/administrator/components/com_categories/controllers/categories.php +++ b/administrator/components/com_categories/controllers/categories.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -37,7 +37,7 @@ public function getModel($name = 'Category', $prefix = 'CategoriesModel', $confi /** * Rebuild the nested set tree. * - * @return bool False on failure or error, true on success. + * @return boolean False on failure or error, true on success. * * @since 1.6 */ @@ -68,7 +68,7 @@ public function rebuild() /** * Save the manual order inputs from the categories list page. * - * @return void + * @return boolean True on success * * @since 1.6 * @see JControllerAdmin::saveorder() diff --git a/administrator/components/com_categories/controllers/category.php b/administrator/components/com_categories/controllers/category.php index 79fecc0742acd..d63b1110a969a 100644 --- a/administrator/components/com_categories/controllers/category.php +++ b/administrator/components/com_categories/controllers/category.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_categories/helpers/association.php b/administrator/components/com_categories/helpers/association.php index ddda743cd1a95..66ac7413e7eff 100644 --- a/administrator/components/com_categories/helpers/association.php +++ b/administrator/components/com_categories/helpers/association.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -25,12 +25,13 @@ abstract class CategoryHelperAssociation * * @param integer $id Id of the item * @param string $extension Name of the component + * @param string $layout Category layout * * @return array Array of associations for the component categories * * @since 3.0 */ - public static function getCategoryAssociations($id = 0, $extension = 'com_content') + public static function getCategoryAssociations($id = 0, $extension = 'com_content', $layout = null) { $return = array(); @@ -46,11 +47,13 @@ public static function getCategoryAssociations($id = 0, $extension = 'com_conten { if (class_exists($helperClassname) && is_callable(array($helperClassname, 'getCategoryRoute'))) { - $return[$tag] = $helperClassname::getCategoryRoute($item, $tag); + $return[$tag] = $helperClassname::getCategoryRoute($item, $tag, $layout); } else { - $return[$tag] = 'index.php?option=' . $extension . '&view=category&id=' . $item; + $viewLayout = $layout ? '&layout=' . $layout : ''; + + $return[$tag] = 'index.php?option=' . $extension . '&view=category&id=' . $item . $viewLayout; } } } diff --git a/administrator/components/com_categories/helpers/categories.php b/administrator/components/com_categories/helpers/categories.php index da87beab3b9da..6b10a6c8dfe92 100644 --- a/administrator/components/com_categories/helpers/categories.php +++ b/administrator/components/com_categories/helpers/categories.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -111,11 +111,30 @@ public static function getActions($extension, $categoryId = 0) public static function getAssociations($pk, $extension = 'com_content') { $langAssociations = JLanguageAssociations::getAssociations($extension, '#__categories', 'com_categories.item', $pk, 'id', 'alias', ''); - $associations = array(); + $associations = array(); + $user = JFactory::getUser(); + $groups = implode(',', $user->getAuthorisedViewLevels()); foreach ($langAssociations as $langAssociation) { - $associations[$langAssociation->language] = $langAssociation->id; + // Include only published categories with user access + $arrId = explode(':', $langAssociation->id); + $assocId = $arrId[0]; + + $db = \JFactory::getDbo(); + + $query = $db->getQuery(true) + ->select($db->qn('published')) + ->from($db->qn('#__categories')) + ->where('access IN (' . $groups . ')') + ->where($db->qn('id') . ' = ' . (int) $assocId); + + $result = (int) $db->setQuery($query)->loadResult(); + + if ($result === 1) + { + $associations[$langAssociation->language] = $langAssociation->id; + } } return $associations; @@ -127,7 +146,7 @@ public static function getAssociations($pk, $extension = 'com_content') * @param mixed $catid Name or ID of category. * @param string $extension Extension that triggers this function * - * @return int $catid Category ID. + * @return integer $catid Category ID. */ public static function validateCategoryId($catid, $extension) { @@ -152,7 +171,7 @@ public static function validateCategoryId($catid, $extension) * * @param array $data Array of data for new category. * - * @return integer. + * @return integer */ public static function createCategory($data) { diff --git a/administrator/components/com_categories/helpers/html/categoriesadministrator.php b/administrator/components/com_categories/helpers/html/categoriesadministrator.php index 3f2bdc464ef90..0d54843e86ecb 100644 --- a/administrator/components/com_categories/helpers/html/categoriesadministrator.php +++ b/administrator/components/com_categories/helpers/html/categoriesadministrator.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -49,6 +49,7 @@ public static function association($catid, $extension = 'com_content') ->select('l.lang_code') ->from('#__categories as c') ->where('c.id IN (' . implode(',', array_values($associations)) . ')') + ->where('c.id != ' . $catid) ->join('LEFT', '#__languages as l ON c.language=l.lang_code') ->select('l.image') ->select('l.title as language_title'); diff --git a/administrator/components/com_categories/models/categories.php b/administrator/components/com_categories/models/categories.php index 061603e82d62d..f19ba56073061 100644 --- a/administrator/components/com_categories/models/categories.php +++ b/administrator/components/com_categories/models/categories.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -47,6 +47,11 @@ public function __construct($config = array()) ); } + if (JLanguageAssociations::isEnabled()) + { + $config['filter_fields'][] = 'association'; + } + parent::__construct($config); } @@ -361,7 +366,7 @@ public function getItems() /** * Method to load the countItems method from the extensions * - * @param stdClass[] &$items The category items + * @param stdClass[] $items The category items * @param string $extension The category extension * * @return void diff --git a/administrator/components/com_categories/models/category.php b/administrator/components/com_categories/models/category.php index a684032c74d4c..458b01eb22740 100644 --- a/administrator/components/com_categories/models/category.php +++ b/administrator/components/com_categories/models/category.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -57,6 +57,9 @@ public function __construct($config = array()) parent::__construct($config); $extension = JFactory::getApplication()->input->get('extension', 'com_content'); $this->typeAlias = $extension . '.category'; + + // Add a new batch command + $this->batch_commands['flip_ordering'] = 'batchFlipordering'; } /** @@ -356,7 +359,7 @@ protected function loadFormData() * @param mixed $data The data expected for the form. * @param string $group The name of the plugin group to import. * - * @return void + * @return mixed * * @see JFormField * @since 1.6 @@ -480,7 +483,7 @@ public function save($data) $isNew = true; $context = $this->option . '.' . $this->name; - if ((!empty($data['tags']) && $data['tags'][0] != '')) + if (!empty($data['tags']) && $data['tags'][0] != '') { $table->newTags = $data['tags']; } @@ -692,7 +695,7 @@ public function save($data) /** * Method to change the published state of one or more records. * - * @param array &$pks A list of the primary keys to change. + * @param array $pks A list of the primary keys to change. * @param integer $value The value of the published state. * * @return boolean True on success. @@ -819,6 +822,56 @@ protected function batchTag($value, $pks, $contexts) return true; } + /** + * Batch flip category ordering. + * + * @param integer $value The new category. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return mixed An array of new IDs on success, boolean false on failure. + * + * @since 3.6.3 + */ + protected function batchFlipordering($value, $pks, $contexts) + { + $successful = array(); + + $db = $this->getDbo(); + $query = $db->getQuery(true); + + /** + * For each category get the max ordering value + * Re-order with max - ordering + */ + foreach ($pks as $id) + { + $query->select('MAX(ordering)') + ->from('#__content') + ->where($db->qn('catid') . ' = ' . $db->q($id)); + + $db->setQuery($query); + + $max = (int) $db->loadresult(); + $max++; + + $query->clear(); + + $query->update('#__content') + ->set($db->qn('ordering') . ' = ' . $max . ' - ' . $db->qn('ordering')) + ->where($db->qn('catid') . ' = ' . $db->q($id)); + + $db->setQuery($query); + + if ($db->execute()) + { + $successful[] = $id; + } + } + + return empty($successful) ? false : $successful; + } + /** * Batch copy categories to a new category. * diff --git a/administrator/components/com_categories/models/fields/categoryedit.php b/administrator/components/com_categories/models/fields/categoryedit.php index be7220b4ab1cf..6d6e19e095108 100644 --- a/administrator/components/com_categories/models/fields/categoryedit.php +++ b/administrator/components/com_categories/models/fields/categoryedit.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -41,7 +41,7 @@ class JFormFieldCategoryEdit extends JFormFieldList * * @param SimpleXMLElement $element The SimpleXMLElement object representing the tag for the form field object. * @param mixed $value The form field value to validate. - * @param string $group The field name group control value. This acts as as an array container for the field. + * @param string $group The field name group control value. This acts as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * @@ -65,7 +65,7 @@ public function setup(SimpleXMLElement $element, $value, $group = null) /** * Method to get certain otherwise inaccessible properties from the form field object. * - * @param string $name The property name for which to the the value. + * @param string $name The property name for which to get the value. * * @return mixed The property value or null. * @@ -85,7 +85,7 @@ public function __get($name) /** * Method to set certain otherwise inaccessible properties of the form field object. * - * @param string $name The property name for which to the the value. + * @param string $name The property name for which to set the value. * @param mixed $value The value of the property. * * @return void @@ -119,7 +119,7 @@ public function __set($name, $value) protected function getOptions() { $options = array(); - $published = $this->element['published'] ? $this->element['published'] : array(0, 1); + $published = $this->element['published'] ? explode(',', (string) $this->element['published']) : array(0, 1); $name = (string) $this->element['name']; // Let's get the id for the current item, either category or content item. @@ -141,24 +141,26 @@ protected function getOptions() $extension = $this->element['extension'] ? (string) $this->element['extension'] : (string) $jinput->get('option', 'com_content'); } + // Account for case that a submitted form has a multi-value category id field (e.g. a filtering form), just use the first category + $oldCat = is_array($oldCat) + ? (int) reset($oldCat) + : (int) $oldCat; + $db = JFactory::getDbo(); $user = JFactory::getUser(); - $groups = implode(',', $user->getAuthorisedViewLevels()); $query = $db->getQuery(true) - ->select('DISTINCT a.id AS value, a.title AS text, a.level, a.published, a.lft'); - $subQuery = $db->getQuery(true) - ->select('id,title,level,published,parent_id,extension,lft,rgt') - ->from('#__categories'); + ->select('a.id AS value, a.title AS text, a.level, a.published, a.lft, a.language') + ->from('#__categories AS a'); // Filter by the extension type if ($this->element['parent'] == true || $jinput->get('option') == 'com_categories') { - $subQuery->where('(extension = ' . $db->quote($extension) . ' OR parent_id = 0)'); + $query->where('(a.extension = ' . $db->quote($extension) . ' OR a.parent_id = 0)'); } else { - $subQuery->where('(extension = ' . $db->quote($extension) . ')'); + $query->where('(a.extension = ' . $db->quote($extension) . ')'); } // Filter language @@ -172,24 +174,21 @@ protected function getOptions() { $language = $db->quote($this->element['language']); } - $subQuery->where($db->quoteName('language') . ' IN (' . $language . ')'); + + $query->where($db->quoteName('a.language') . ' IN (' . $language . ')'); } // Filter on the published state - if (is_numeric($published)) - { - $subQuery->where('published = ' . (int) $published); - } - elseif (is_array($published)) - { - $subQuery->where('published IN (' . implode(',', ArrayHelper::toInteger($published)) . ')'); - } + $query->where('a.published IN (' . implode(',', ArrayHelper::toInteger($published)) . ')'); // Filter categories on User Access Level - $subQuery->where('access IN (' . $groups . ')'); + // Filter by access level on categories. + if (!$user->authorise('core.admin')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } - $query->from('(' . (string) $subQuery . ') AS a') - ->join('LEFT', $db->quoteName('#__categories') . ' AS b ON a.lft > b.lft AND a.rgt < b.rgt'); $query->order('a.lft ASC'); // If parent isn't explicitly stated but we are in com_categories assume we want parents @@ -232,34 +231,22 @@ protected function getOptions() } } - // Displays language code if not set to All - $db = JFactory::getDbo(); - $query = $db->getQuery(true) - ->select($db->quoteName('language')) - ->where($db->quoteName('id') . '=' . (int) $options[$i]->value) - ->from($db->quoteName('#__categories')); - - $db->setQuery($query); - $language = $db->loadResult(); - if ($options[$i]->published == 1) { - $options[$i]->text = str_repeat('- ', $options[$i]->level) . $options[$i]->text; + $options[$i]->text = str_repeat('- ', !$options[$i]->level ? 0 : $options[$i]->level - 1) . $options[$i]->text; } else { - $options[$i]->text = str_repeat('- ', $options[$i]->level) . '[' . $options[$i]->text . ']'; + $options[$i]->text = str_repeat('- ', !$options[$i]->level ? 0 : $options[$i]->level - 1) . '[' . $options[$i]->text . ']'; } - if ($language !== '*') + // Displays language code if not set to All + if ($options[$i]->language !== '*') { - $options[$i]->text = $options[$i]->text . ' (' . $language . ')'; + $options[$i]->text = $options[$i]->text . ' (' . $options[$i]->language . ')'; } } - // Get the current user object. - $user = JFactory::getUser(); - // For new items we want a list of categories you are allowed to create in. if ($oldCat == 0) { @@ -293,7 +280,7 @@ protected function getOptions() continue; } - if ($option->level != 0 && isset($oldParent) && $option->value != $oldParent && !$user->authorise('core.edit.state', $assetKey)) + if ($option->level != 0 && isset($oldParent) && $option->value != $oldParent && !$user->authorise('core.edit.state', $assetKey)) { unset($options[$i]); continue; @@ -311,7 +298,7 @@ protected function getOptions() continue; } - if ($option->level != 0 && isset($oldParent) && $option->value != $oldParent && !$user->authorise('core.create', $assetKey)) + if ($option->level != 0 && isset($oldParent) && $option->value != $oldParent && !$user->authorise('core.create', $assetKey)) { unset($options[$i]); continue; @@ -413,8 +400,19 @@ protected function getInput() } } else - // Create a regular list. { + // Create a regular list. + if (count($options) === 0) + { + // All Categories have been deleted, so we need a new category (This will create on save if selected). + $options[0] = new stdClass; + $options[0]->value = 'Uncategorised'; + $options[0]->text = 'Uncategorised'; + $options[0]->level = '1'; + $options[0]->published = '1'; + $options[0]->lft = '1'; + } + $html[] = JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id); } diff --git a/administrator/components/com_categories/models/fields/categoryparent.php b/administrator/components/com_categories/models/fields/categoryparent.php index 2ea6216327d38..3aae6dc264c96 100644 --- a/administrator/components/com_categories/models/fields/categoryparent.php +++ b/administrator/components/com_categories/models/fields/categoryparent.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -14,7 +14,8 @@ /** * Category Parent field. * - * @since 1.6 + * @since 1.6 + * @deprecated 4.0 Use categoryedit instead. */ class JFormFieldCategoryParent extends JFormFieldList { diff --git a/administrator/components/com_categories/models/fields/modal/category.php b/administrator/components/com_categories/models/fields/modal/category.php index 09ff66d9806a1..0b77986150697 100644 --- a/administrator/components/com_categories/models/fields/modal/category.php +++ b/administrator/components/com_categories/models/fields/modal/category.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_categories/models/forms/category.xml b/administrator/components/com_categories/models/forms/category.xml index 1b41ed27ac806..b249d0235f926 100644 --- a/administrator/components/com_categories/models/forms/category.xml +++ b/administrator/components/com_categories/models/forms/category.xml @@ -3,7 +3,7 @@ JGLOBAL_TITLE_DESC + + diff --git a/administrator/components/com_categories/tables/category.php b/administrator/components/com_categories/tables/category.php index 066540fcf078d..014619eac6831 100644 --- a/administrator/components/com_categories/tables/category.php +++ b/administrator/components/com_categories/tables/category.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_categories/views/categories/tmpl/default.php b/administrator/components/com_categories/views/categories/tmpl/default.php index 66c5926a9ec22..5ad84b77391b8 100644 --- a/administrator/components/com_categories/views/categories/tmpl/default.php +++ b/administrator/components/com_categories/views/categories/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -128,7 +128,6 @@ items as $i => $item) : ?> id, $this->ordering[$item->parent_id]); $canEdit = $user->authorise('core.edit', $extension . '.category.' . $item->id); $canCheckin = $user->authorise('core.admin', 'com_checkin') || $item->checked_out == $userId || $item->checked_out == 0; $canEditOwn = $user->authorise('core.edit.own', $extension . '.category.' . $item->id) && $item->created_user_id == $userId; @@ -177,7 +176,7 @@ - + @@ -220,25 +219,25 @@ items[0]) && property_exists($this->items[0], 'count_published')) : ?> - + count_published; ?> items[0]) && property_exists($this->items[0], 'count_unpublished')) : ?> - + count_unpublished; ?> items[0]) && property_exists($this->items[0], 'count_archived')) : ?> - + count_archived; ?> items[0]) && property_exists($this->items[0], 'count_trashed')) : ?> - + count_trashed; ?> @@ -269,14 +268,14 @@ && $user->authorise('core.edit', $extension) && $user->authorise('core.edit.state', $extension)) : ?> JText::_('COM_CATEGORIES_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') - ), - $this->loadTemplate('batch_body') - ); ?> + 'bootstrap.renderModal', + 'collapseModal', + array( + 'title' => JText::_('COM_CATEGORIES_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer'), + ), + $this->loadTemplate('batch_body') + ); ?> diff --git a/administrator/components/com_categories/views/categories/tmpl/default_batch_body.php b/administrator/components/com_categories/views/categories/tmpl/default_batch_body.php index 4110990f81b7b..1307d418e608b 100644 --- a/administrator/components/com_categories/views/categories/tmpl/default_batch_body.php +++ b/administrator/components/com_categories/views/categories/tmpl/default_batch_body.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -38,7 +38,7 @@
    @@ -55,4 +55,15 @@ +
    +
    +
    + + +
    +
    +
    + diff --git a/administrator/components/com_categories/views/categories/tmpl/default_batch_footer.php b/administrator/components/com_categories/views/categories/tmpl/default_batch_footer.php index 173c85e9ee790..2530fc28554eb 100644 --- a/administrator/components/com_categories/views/categories/tmpl/default_batch_footer.php +++ b/administrator/components/com_categories/views/categories/tmpl/default_batch_footer.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_categories/views/categories/tmpl/modal.php b/administrator/components/com_categories/views/categories/tmpl/modal.php index 6590314d0bcc2..436dff200da84 100644 --- a/administrator/components/com_categories/views/categories/tmpl/modal.php +++ b/administrator/components/com_categories/views/categories/tmpl/modal.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -23,6 +23,7 @@ JHtml::_('behavior.core'); JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); +JHtml::_('bootstrap.popover', '.hasPopover', array('placement' => 'bottom')); JHtml::_('formbehavior.chosen', 'select'); // Special case for the search field tooltip. @@ -78,9 +79,9 @@ 'icon-trash', - 0 => 'icon-unpublish', - 1 => 'icon-publish', - 2 => 'icon-archive', + 0 => 'icon-unpublish', + 1 => 'icon-publish', + 2 => 'icon-archive', ); ?> items as $i => $item) : ?> @@ -107,13 +108,19 @@ ?> - + $item->level)); ?> - escape($item->title); ?> - + escape($item->title); ?> + + note)) : ?> + escape($item->alias)); ?> + + escape($item->alias), $this->escape($item->note)); ?> + + escape($item->access_level); ?> diff --git a/administrator/components/com_categories/views/categories/view.html.php b/administrator/components/com_categories/views/categories/view.html.php index f60d332b7af9d..4428001631ab6 100644 --- a/administrator/components/com_categories/views/categories/view.html.php +++ b/administrator/components/com_categories/views/categories/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -84,9 +84,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } // Preprocess the list of items to find ordering divisions. @@ -120,7 +118,7 @@ public function display($tpl = null) // In article associations modal we need to remove language filter if forcing a language. if ($forcedLanguage = JFactory::getApplication()->input->get('forcedLanguage', '', 'CMD')) { - // If the language is forced we can't allow to select the language, so transform the language selector filter into an hidden field. + // If the language is forced we can't allow to select the language, so transform the language selector filter into a hidden field. $languageXml = new SimpleXMLElement(''); $this->filterForm->setField($languageXml, 'filter', true); @@ -186,7 +184,7 @@ protected function addToolbar() // Prepare the toolbar. JToolbarHelper::title($title, 'folder categories ' . substr($component, 4) . ($section ? "-$section" : '') . '-categories'); - if ($canDo->get('core.create') || (count($user->getAuthorisedCategories($component, 'core.create'))) > 0) + if ($canDo->get('core.create') || count($user->getAuthorisedCategories($component, 'core.create')) > 0) { JToolbarHelper::addNew('category.add'); } @@ -277,12 +275,12 @@ protected function addToolbar() protected function getSortFields() { return array( - 'a.lft' => JText::_('JGRID_HEADING_ORDERING'), + 'a.lft' => JText::_('JGRID_HEADING_ORDERING'), 'a.published' => JText::_('JSTATUS'), - 'a.title' => JText::_('JGLOBAL_TITLE'), - 'a.access' => JText::_('JGRID_HEADING_ACCESS'), - 'language' => JText::_('JGRID_HEADING_LANGUAGE'), - 'a.id' => JText::_('JGRID_HEADING_ID') + 'a.title' => JText::_('JGLOBAL_TITLE'), + 'a.access' => JText::_('JGRID_HEADING_ACCESS'), + 'language' => JText::_('JGRID_HEADING_LANGUAGE'), + 'a.id' => JText::_('JGRID_HEADING_ID'), ); } } diff --git a/administrator/components/com_categories/views/category/tmpl/edit.php b/administrator/components/com_categories/views/category/tmpl/edit.php index fb033124e9bd4..54dbeeb267f0e 100644 --- a/administrator/components/com_categories/views/category/tmpl/edit.php +++ b/administrator/components/com_categories/views/category/tmpl/edit.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_categories * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_categories/views/category/tmpl/edit.xml b/administrator/components/com_categories/views/category/tmpl/edit.xml index 11d01e0cf8540..f96948e4ad153 100755 --- a/administrator/components/com_categories/views/category/tmpl/edit.xml +++ b/administrator/components/com_categories/views/category/tmpl/edit.xml @@ -13,7 +13,7 @@ label="COM_CATEGORIES_CHOOSE_COMPONENT_LABEL" description="COM_CATEGORIES_CHOOSE_COMPONENT_DESC" required="true" - > + > get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } // Check for tag type diff --git a/administrator/components/com_checkin/checkin.php b/administrator/components/com_checkin/checkin.php index f0f4a61bc1567..0e07b11dc54d6 100644 --- a/administrator/components/com_checkin/checkin.php +++ b/administrator/components/com_checkin/checkin.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_checkin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_checkin/checkin.xml b/administrator/components/com_checkin/checkin.xml index 8aabfb76e4763..338dfbd5562fd 100644 --- a/administrator/components/com_checkin/checkin.xml +++ b/administrator/components/com_checkin/checkin.xml @@ -3,7 +3,7 @@ com_checkin Joomla! Project April 2006 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_checkin/controller.php b/administrator/components/com_checkin/controller.php index 035ee20e2d54c..66ddd9bc8f639 100644 --- a/administrator/components/com_checkin/controller.php +++ b/administrator/components/com_checkin/controller.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_checkin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_checkin/models/checkin.php b/administrator/components/com_checkin/models/checkin.php index a1e30fee3980b..2affd1593ad12 100644 --- a/administrator/components/com_checkin/models/checkin.php +++ b/administrator/components/com_checkin/models/checkin.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_checkin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_checkin/views/checkin/tmpl/default.php b/administrator/components/com_checkin/views/checkin/tmpl/default.php index 393a264a2ca5a..374fed70a9c34 100644 --- a/administrator/components/com_checkin/views/checkin/tmpl/default.php +++ b/administrator/components/com_checkin/views/checkin/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_checkin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_checkin/views/checkin/view.html.php b/administrator/components/com_checkin/views/checkin/view.html.php index 4594dbd113411..12c16424360e7 100644 --- a/administrator/components/com_checkin/views/checkin/view.html.php +++ b/administrator/components/com_checkin/views/checkin/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_checkin * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -71,9 +71,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } $this->addToolbar(); diff --git a/administrator/components/com_config/config.php b/administrator/components/com_config/config.php index 8b53654a73aee..6b9c7e6576f2f 100644 --- a/administrator/components/com_config/config.php +++ b/administrator/components/com_config/config.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/config.xml b/administrator/components/com_config/config.xml index 025af553fc887..bccece35f8ba1 100644 --- a/administrator/components/com_config/config.xml +++ b/administrator/components/com_config/config.xml @@ -3,7 +3,7 @@ com_config Joomla! Project April 2006 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_config/controller.php b/administrator/components/com_config/controller.php index 3ed2386416717..d5f11a6cb0110 100644 --- a/administrator/components/com_config/controller.php +++ b/administrator/components/com_config/controller.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/controller/application/cancel.php b/administrator/components/com_config/controller/application/cancel.php index 217eef0c04cb8..06ef0a07c46d2 100644 --- a/administrator/components/com_config/controller/application/cancel.php +++ b/administrator/components/com_config/controller/application/cancel.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/controller/application/display.php b/administrator/components/com_config/controller/application/display.php index c4a6b5b9774fc..75ed0ea9d8032 100644 --- a/administrator/components/com_config/controller/application/display.php +++ b/administrator/components/com_config/controller/application/display.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/controller/application/removeroot.php b/administrator/components/com_config/controller/application/removeroot.php index 98806f6d60f6f..77df2aadc09c5 100644 --- a/administrator/components/com_config/controller/application/removeroot.php +++ b/administrator/components/com_config/controller/application/removeroot.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_config/controller/application/save.php b/administrator/components/com_config/controller/application/save.php index 4e999538f1ec8..2dc062536cdf9 100644 --- a/administrator/components/com_config/controller/application/save.php +++ b/administrator/components/com_config/controller/application/save.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -71,9 +71,6 @@ public function execute() // Validate the posted data. $return = $model->validate($form, $data); - // Save the posted data in the session. - $this->app->setUserState('com_config.config.global.data', $data); - // Check for validation errors. if ($return === false) { @@ -81,6 +78,9 @@ public function execute() * The validate method enqueued all messages for us, so we just need to redirect back. */ + // Save the posted data in the session. + $this->app->setUserState('com_config.config.global.data', $data); + // Redirect back to the edit screen. $this->app->redirect(JRoute::_('index.php?option=com_config&controller=config.display.application', false)); } @@ -89,9 +89,6 @@ public function execute() $data = $return; $return = $model->save($data); - // Save the validated data in the session. - $this->app->setUserState('com_config.config.global.data', $data); - // Check the return value. if ($return === false) { @@ -99,6 +96,9 @@ public function execute() * The save method enqueued all messages for us, so we just need to redirect back. */ + // Save the validated data in the session. + $this->app->setUserState('com_config.config.global.data', $data); + // Save failed, go back to the screen and display a notice. $this->app->redirect(JRoute::_('index.php?option=com_config&controller=config.display.application', false)); } @@ -106,6 +106,9 @@ public function execute() // Set the success message. $this->app->enqueueMessage(JText::_('COM_CONFIG_SAVE_SUCCESS'), 'message'); + // Clear the data from the session. + $this->app->setUserState('com_config.config.global.data', null); + // Set the redirect based on the task. switch ($this->options[3]) { diff --git a/administrator/components/com_config/controller/application/sendtestmail.php b/administrator/components/com_config/controller/application/sendtestmail.php index b4636df201912..4de91c8814524 100644 --- a/administrator/components/com_config/controller/application/sendtestmail.php +++ b/administrator/components/com_config/controller/application/sendtestmail.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_config/controller/application/store.php b/administrator/components/com_config/controller/application/store.php index ef588f3ebc8fc..dcd8dc9184d81 100644 --- a/administrator/components/com_config/controller/application/store.php +++ b/administrator/components/com_config/controller/application/store.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_config/controller/component/cancel.php b/administrator/components/com_config/controller/component/cancel.php index ec42372327829..8d5919f1a06dc 100644 --- a/administrator/components/com_config/controller/component/cancel.php +++ b/administrator/components/com_config/controller/component/cancel.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/controller/component/display.php b/administrator/components/com_config/controller/component/display.php index c0d7aed521f19..456fcb788ec33 100644 --- a/administrator/components/com_config/controller/component/display.php +++ b/administrator/components/com_config/controller/component/display.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/controller/component/save.php b/administrator/components/com_config/controller/component/save.php index f5dd80b954ae5..b0825aad4ec9c 100644 --- a/administrator/components/com_config/controller/component/save.php +++ b/administrator/components/com_config/controller/component/save.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/controllers/application.php b/administrator/components/com_config/controllers/application.php index 03af706a4eac4..33e3efae1d05b 100644 --- a/administrator/components/com_config/controllers/application.php +++ b/administrator/components/com_config/controllers/application.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -36,7 +36,7 @@ public function __construct($config = array()) /** * Method to save the configuration. * - * @return bool True on success, false on failure. + * @return boolean True on success, false on failure. * * @since 1.5 * @deprecated 4.0 Use ConfigControllerApplicationSave instead. @@ -91,7 +91,7 @@ public function cancel() /** * Method to remove the root property from the configuration. * - * @return bool True on success, false on failure. + * @return boolean True on success, false on failure. * * @since 1.5 * @deprecated 4.0 Use ConfigControllerApplicationRemoveroot instead. diff --git a/administrator/components/com_config/controllers/component.php b/administrator/components/com_config/controllers/component.php index 7255f0ec903ae..a6800ce05cec8 100644 --- a/administrator/components/com_config/controllers/component.php +++ b/administrator/components/com_config/controllers/component.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/helper/config.php b/administrator/components/com_config/helper/config.php index 50b9e1f7838c2..67bd435243830 100644 --- a/administrator/components/com_config/helper/config.php +++ b/administrator/components/com_config/helper/config.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/model/application.php b/administrator/components/com_config/model/application.php index e8ed2890c2e81..4abbbfaebc07c 100644 --- a/administrator/components/com_config/model/application.php +++ b/administrator/components/com_config/model/application.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -184,7 +184,7 @@ public function save($data) if (!$asset->check() || !$asset->store()) { - $app->enqueueMessage(JText::_('SOME_ERROR_CODE'), 'error'); + $app->enqueueMessage($asset->getError(), 'error'); return; } @@ -215,7 +215,7 @@ public function save($data) if (!$extension->check() || !$extension->store()) { - $app->enqueueMessage(JText::_('SOME_ERROR_CODE'), 'error'); + $app->enqueueMessage($extension->getError(), 'error'); return; } @@ -283,7 +283,7 @@ public function save($data) * Look for a custom cache_path * First check if a path is given in the submitted data, then check if a path exists in the previous data, otherwise use the default */ - if (isset($data['cache_path'])) + if (!empty($data['cache_path'])) { $path = $data['cache_path']; } @@ -564,120 +564,100 @@ public function storePermissions($permission = null) try { - // Load the current settings for this component. - $query = $this->db->getQuery(true) - ->select($this->db->quoteName(array('name', 'rules'))) - ->from($this->db->quoteName('#__assets')) - ->where($this->db->quoteName('name') . ' = ' . $this->db->quote($permission['component'])); - - $this->db->setQuery($query); - - // Load the results as a list of stdClass objects (see later for more options on retrieving data). - $results = $this->db->loadAssocList(); - } - catch (Exception $e) - { - $app->enqueueMessage($e->getMessage(), 'error'); - - return false; - } - - // No record found, let's create one. - if (empty($results)) - { - $data = array(); - $data[$permission['action']] = array($permission['rule'] => $permission['value']); + $asset = JTable::getInstance('asset'); + $result = $asset->loadByName($permission['component']); - $rules = new JAccessRules($data); - $asset = JTable::getInstance('asset'); - $asset->rules = (string) $rules; - $asset->name = (string) $permission['component']; - $asset->title = (string) $permission['title']; - - // Get the parent asset id so we have a correct tree. - $parentAsset = JTable::getInstance('Asset'); - - if (strpos($asset->name, '.') !== false) + if ($result === false) { - $assetParts = explode('.', $asset->name); - $parentAsset->loadByName($assetParts[0]); - $parentAssetId = $parentAsset->id; - } - else - { - $parentAssetId = $parentAsset->getRootId(); - } - - /** - * @to do: incorrect ACL stored - * When changing a permission of an item that doesn't have a row in the asset table the row a new row is created. - * This works fine for item <-> component <-> global config scenario and component <-> global config scenario. - * But doesn't work properly for item <-> section(s) <-> component <-> global config scenario, - * because a wrong parent asset id (the component) is stored. - * Happens when there is no row in the asset table (ex: deleted or not created on update). - */ + $data = array($permission['action'] => array($permission['rule'] => $permission['value'])); - $asset->setLocation($parentAssetId, 'last-child'); + $rules = new JAccessRules($data); + $asset->rules = (string) $rules; + $asset->name = (string) $permission['component']; + $asset->title = (string) $permission['title']; - if (!$asset->check() || !$asset->store()) - { - $app->enqueueMessage(JText::_('JLIB_UNKNOWN'), 'error'); + // Get the parent asset id so we have a correct tree. + $parentAsset = JTable::getInstance('Asset'); - return false; - } - } - else - { - // Decode the rule settings. - $temp = json_decode($results[0]['rules'], true); - - // Check if a new value is to be set. - if (isset($permission['value'])) - { - // Check if we already have an action entry. - if (!isset($temp[$permission['action']])) + if (strpos($asset->name, '.') !== false) { - $temp[$permission['action']] = array(); + $assetParts = explode('.', $asset->name); + $parentAsset->loadByName($assetParts[0]); + $parentAssetId = $parentAsset->id; } - - // Check if we already have a rule entry. - if (!isset($temp[$permission['action']][$permission['rule']])) + else { - $temp[$permission['action']][$permission['rule']] = array(); + $parentAssetId = $parentAsset->getRootId(); } - // Set the new permission. - $temp[$permission['action']][$permission['rule']] = (int) $permission['value']; + /** + * @to do: incorrect ACL stored + * When changing a permission of an item that doesn't have a row in the asset table the row a new row is created. + * This works fine for item <-> component <-> global config scenario and component <-> global config scenario. + * But doesn't work properly for item <-> section(s) <-> component <-> global config scenario, + * because a wrong parent asset id (the component) is stored. + * Happens when there is no row in the asset table (ex: deleted or not created on update). + */ - // Check if we have an inherited setting. - if (strlen($permission['value']) === 0) - { - unset($temp[$permission['action']][$permission['rule']]); - } + $asset->setLocation($parentAssetId, 'last-child'); } else { - // There is no value so remove the action as it's not needed. - unset($temp[$permission['action']]); - } + // Decode the rule settings. + $temp = json_decode($asset->rules, true); - // Store the new permissions. - try - { - $query->clear() - ->update($this->db->quoteName('#__assets')) - ->set($this->db->quoteName('rules') . ' = ' . $this->db->quote(json_encode($temp))) - ->where($this->db->quoteName('name') . ' = ' . $this->db->quote($permission['component'])); + // Check if a new value is to be set. + if (isset($permission['value'])) + { + // Check if we already have an action entry. + if (!isset($temp[$permission['action']])) + { + $temp[$permission['action']] = array(); + } + + // Check if we already have a rule entry. + if (!isset($temp[$permission['action']][$permission['rule']])) + { + $temp[$permission['action']][$permission['rule']] = array(); + } + + // Set the new permission. + $temp[$permission['action']][$permission['rule']] = (int) $permission['value']; + + // Check if we have an inherited setting. + if ($permission['value'] === '') + { + unset($temp[$permission['action']][$permission['rule']]); + } + + // Check if we have any rules. + if (!$temp[$permission['action']]) + { + unset($temp[$permission['action']]); + } + } + else + { + // There is no value so remove the action as it's not needed. + unset($temp[$permission['action']]); + } - $this->db->setQuery($query)->execute(); + $asset->rules = json_encode($temp, JSON_FORCE_OBJECT); } - catch (Exception $e) + + if (!$asset->check() || !$asset->store()) { - $app->enqueueMessage($e->getMessage(), 'error'); + $app->enqueueMessage(JText::_('JLIB_UNKNOWN'), 'error'); return false; } } + catch (Exception $e) + { + $app->enqueueMessage($e->getMessage(), 'error'); + + return false; + } // All checks done. $result = array( @@ -691,7 +671,7 @@ public function storePermissions($permission = null) try { // Get the asset id by the name of the component. - $query->clear() + $query = $this->db->getQuery(true) ->select($this->db->quoteName('id')) ->from($this->db->quoteName('#__assets')) ->where($this->db->quoteName('name') . ' = ' . $this->db->quote($permission['component'])); diff --git a/administrator/components/com_config/model/component.php b/administrator/components/com_config/model/component.php index 120533f97735b..e6db1e48eedea 100644 --- a/administrator/components/com_config/model/component.php +++ b/administrator/components/com_config/model/component.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/model/field/configcomponents.php b/administrator/components/com_config/model/field/configcomponents.php index 2e3f66a59cfe9..550c66524f159 100644 --- a/administrator/components/com_config/model/field/configcomponents.php +++ b/administrator/components/com_config/model/field/configcomponents.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/model/field/filters.php b/administrator/components/com_config/model/field/filters.php index a2ee15192b8d8..204f59ad59747 100644 --- a/administrator/components/com_config/model/field/filters.php +++ b/administrator/components/com_config/model/field/filters.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -51,16 +51,13 @@ protected function getInput() $html[] = ' ' . JText::_('JGLOBAL_FILTER_GROUPS_LABEL') . ''; $html[] = ' '; $html[] = ' '; - $html[] = ' ' - . JText::_('JGLOBAL_FILTER_TYPE_LABEL') . ''; + $html[] = ' ' . JText::_('JGLOBAL_FILTER_TYPE_LABEL') . ''; $html[] = ' '; $html[] = ' '; - $html[] = ' ' - . JText::_('JGLOBAL_FILTER_TAGS_LABEL') . ''; + $html[] = ' ' . JText::_('JGLOBAL_FILTER_TAGS_LABEL') . ''; $html[] = ' '; $html[] = ' '; - $html[] = ' ' - . JText::_('JGLOBAL_FILTER_ATTRIBUTES_LABEL') . ''; + $html[] = ' ' . JText::_('JGLOBAL_FILTER_ATTRIBUTES_LABEL') . ''; $html[] = ' '; $html[] = ' '; $html[] = ' '; @@ -107,7 +104,6 @@ protected function getInput() . ' name="' . $this->name . '[' . $group->value . '][filter_tags]"' . ' type="text"' . ' id="' . $this->id . $group->value . '_filter_tags" class="novalidate"' - . ' title="' . JText::_('JGLOBAL_FILTER_TAGS_LABEL') . '"' . ' value="' . $group_filter['filter_tags'] . '"' . '/>'; $html[] = ' '; @@ -116,7 +112,6 @@ protected function getInput() . ' name="' . $this->name . '[' . $group->value . '][filter_attributes]"' . ' type="text"' . ' id="' . $this->id . $group->value . '_filter_attributes" class="novalidate"' - . ' title="' . JText::_('JGLOBAL_FILTER_ATTRIBUTES_LABEL') . '"' . ' value="' . $group_filter['filter_attributes'] . '"' . '/>'; $html[] = ' '; diff --git a/administrator/components/com_config/model/form/application.xml b/administrator/components/com_config/model/form/application.xml index 2f965fe43d503..1dc1bc51543bb 100644 --- a/administrator/components/com_config/model/form/application.xml +++ b/administrator/components/com_config/model/form/application.xml @@ -7,9 +7,9 @@ @@ -32,7 +32,7 @@ default="1" showon="cache_handler:memcache" filter="integer" - > + > @@ -46,7 +46,7 @@ default="0" showon="cache_handler:memcache" filter="integer" - > + > @@ -85,7 +85,7 @@ default="1" showon="cache_handler:memcached" filter="integer" - > + >
    @@ -99,7 +99,7 @@ default="0" showon="cache_handler:memcached" filter="integer" - > + >
    @@ -138,7 +138,7 @@ default="1" filter="integer" showon="cache_handler:redis" - > + >
    @@ -181,7 +181,7 @@ + > @@ -223,7 +222,7 @@ description="COM_CONFIG_FIELD_CACHE_DESC" default="2" filter="integer" - > + > @@ -282,9 +281,9 @@ @@ -298,12 +297,12 @@ + > @@ -311,31 +310,29 @@ + > -
    +
    + > @@ -390,8 +387,8 @@ name="ftp_root" type="text" label="COM_CONFIG_FIELD_FTP_ROOT_LABEL" - showon="ftp_enable:1" description="COM_CONFIG_FIELD_FTP_ROOT_DESC" + showon="ftp_enable:1" filter="string" size="50" /> @@ -405,12 +402,12 @@ + > @@ -470,10 +467,10 @@ + default="UTC" + > @@ -491,7 +488,7 @@ class="btn-group btn-group-yesno" default="1" filter="integer" - > + > @@ -505,7 +502,7 @@ default="0" filter="integer" showon="mailonline:1" - > + > @@ -560,7 +557,7 @@ default="mail" filter="word" showon="mailonline:1" - > + > @@ -600,7 +597,6 @@ hint="25" validate="number" filter="integer" - required="true" size="5" /> @@ -612,7 +608,7 @@ default="none" showon="mailonline:1[AND]mailer:smtp" filter="word" - > + > @@ -627,7 +623,7 @@ default="0" showon="mailonline:1[AND]mailer:smtp" filter="integer" - > + > @@ -686,7 +682,7 @@ label="JFIELD_METADATA_ROBOTS_LABEL" description="JFIELD_METADATA_ROBOTS_DESC" default="" - > + > @@ -706,12 +702,12 @@ + > @@ -719,12 +715,12 @@ + > @@ -738,12 +734,12 @@ + > @@ -751,13 +747,13 @@ + > @@ -765,13 +761,13 @@ + > @@ -779,13 +775,13 @@ + > @@ -793,11 +789,11 @@ + > @@ -821,12 +817,12 @@ + > @@ -834,11 +830,11 @@ + > @@ -849,11 +845,11 @@ + > @@ -924,14 +920,74 @@ size="5" /> + + + + + + + + + + + + + > @@ -969,12 +1025,12 @@ + > @@ -982,12 +1038,12 @@ + > @@ -1015,11 +1071,11 @@ + > @@ -1028,42 +1084,42 @@ + > + > @@ -1079,11 +1135,11 @@ + > @@ -1097,11 +1153,11 @@ + > @@ -1169,7 +1225,7 @@ translate_label="false" validate="rules" filter="rules" - > + > + name = JText::_('COM_CONFIG_TEXT_FILTER_SETTINGS'); $this->fieldsname = 'filters'; $this->description = JText::_('COM_CONFIG_TEXT_FILTERS_DESC'); -echo JLayoutHelper::render('joomla.content.options_default', $this); +echo JLayoutHelper::render('joomla.content.text_filters', $this); diff --git a/administrator/components/com_config/view/application/tmpl/default_ftp.php b/administrator/components/com_config/view/application/tmpl/default_ftp.php index a0fffe48ecc0e..8f030252b6133 100644 --- a/administrator/components/com_config/view/application/tmpl/default_ftp.php +++ b/administrator/components/com_config/view/application/tmpl/default_ftp.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/view/application/tmpl/default_ftplogin.php b/administrator/components/com_config/view/application/tmpl/default_ftplogin.php index 18695365451c1..fdb4998d616db 100644 --- a/administrator/components/com_config/view/application/tmpl/default_ftplogin.php +++ b/administrator/components/com_config/view/application/tmpl/default_ftplogin.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/view/application/tmpl/default_locale.php b/administrator/components/com_config/view/application/tmpl/default_locale.php index 1774bb3828194..8b4aa72c0fb4e 100644 --- a/administrator/components/com_config/view/application/tmpl/default_locale.php +++ b/administrator/components/com_config/view/application/tmpl/default_locale.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/view/application/tmpl/default_mail.php b/administrator/components/com_config/view/application/tmpl/default_mail.php index 8b7342ebebb68..e5151c1d7e44d 100644 --- a/administrator/components/com_config/view/application/tmpl/default_mail.php +++ b/administrator/components/com_config/view/application/tmpl/default_mail.php @@ -3,12 +3,13 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; +JHtml::_('jquery.token'); JHtml::_('script', 'system/sendtestmail.js', array('version' => 'auto', 'relative' => true)); // Load JavaScript message titles @@ -25,7 +26,7 @@ JText::script('JLIB_JS_AJAX_ERROR_TIMEOUT'); // Ajax request data. -$ajaxUri = JRoute::_('index.php?option=com_config&task=config.sendtestmail.application&format=json&' . JSession::getFormToken() . '=1'); +$ajaxUri = JRoute::_('index.php?option=com_config&task=config.sendtestmail.application&format=json'); $this->name = JText::_('COM_CONFIG_MAIL_SETTINGS'); $this->fieldsname = 'mail'; diff --git a/administrator/components/com_config/view/application/tmpl/default_metadata.php b/administrator/components/com_config/view/application/tmpl/default_metadata.php index 3a55cf5d20c02..825383a6be21b 100644 --- a/administrator/components/com_config/view/application/tmpl/default_metadata.php +++ b/administrator/components/com_config/view/application/tmpl/default_metadata.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/view/application/tmpl/default_navigation.php b/administrator/components/com_config/view/application/tmpl/default_navigation.php index 5c1224f168844..27e9272f9233e 100644 --- a/administrator/components/com_config/view/application/tmpl/default_navigation.php +++ b/administrator/components/com_config/view/application/tmpl/default_navigation.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/view/application/tmpl/default_permissions.php b/administrator/components/com_config/view/application/tmpl/default_permissions.php index 0110c017863ca..cf5ece8b683ae 100644 --- a/administrator/components/com_config/view/application/tmpl/default_permissions.php +++ b/administrator/components/com_config/view/application/tmpl/default_permissions.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/view/application/tmpl/default_proxy.php b/administrator/components/com_config/view/application/tmpl/default_proxy.php index 528025e522c76..2fb9c48577a8e 100644 --- a/administrator/components/com_config/view/application/tmpl/default_proxy.php +++ b/administrator/components/com_config/view/application/tmpl/default_proxy.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/view/application/tmpl/default_seo.php b/administrator/components/com_config/view/application/tmpl/default_seo.php index 7a65e47626868..c54fd195aea72 100644 --- a/administrator/components/com_config/view/application/tmpl/default_seo.php +++ b/administrator/components/com_config/view/application/tmpl/default_seo.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/view/application/tmpl/default_server.php b/administrator/components/com_config/view/application/tmpl/default_server.php index 1fab0987b7a0e..9b23386969611 100644 --- a/administrator/components/com_config/view/application/tmpl/default_server.php +++ b/administrator/components/com_config/view/application/tmpl/default_server.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/view/application/tmpl/default_session.php b/administrator/components/com_config/view/application/tmpl/default_session.php index c34c46f51138b..4b6ccdaaafa5d 100644 --- a/administrator/components/com_config/view/application/tmpl/default_session.php +++ b/administrator/components/com_config/view/application/tmpl/default_session.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/view/application/tmpl/default_site.php b/administrator/components/com_config/view/application/tmpl/default_site.php index 5cd4d6cfbc01d..275274855e599 100644 --- a/administrator/components/com_config/view/application/tmpl/default_site.php +++ b/administrator/components/com_config/view/application/tmpl/default_site.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/view/application/tmpl/default_system.php b/administrator/components/com_config/view/application/tmpl/default_system.php index 91cc59ded441f..de2ad23aba16f 100644 --- a/administrator/components/com_config/view/application/tmpl/default_system.php +++ b/administrator/components/com_config/view/application/tmpl/default_system.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/view/component/html.php b/administrator/components/com_config/view/component/html.php index c6e0f5f06e9ed..efc090ffaa115 100644 --- a/administrator/components/com_config/view/component/html.php +++ b/administrator/components/com_config/view/component/html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_config/view/component/tmpl/default.php b/administrator/components/com_config/view/component/tmpl/default.php index 0be7229786596..f52399e951c17 100644 --- a/administrator/components/com_config/view/component/tmpl/default.php +++ b/administrator/components/com_config/view/component/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -78,7 +78,10 @@ form->getFieldset($name) as $field) : ?> - + type === 'Spacer' ? ' field-spacer' : ''; + ?> showon) : ?> 'auto', 'relative' => true)); ?> @@ -87,7 +90,7 @@ hidden) : ?> input; ?> -
    > +
    >
    label; ?> diff --git a/administrator/components/com_config/view/component/tmpl/default_navigation.php b/administrator/components/com_config/view/component/tmpl/default_navigation.php index cc4ca57a43c1c..c26bbee57fa96 100644 --- a/administrator/components/com_config/view/component/tmpl/default_navigation.php +++ b/administrator/components/com_config/view/component/tmpl/default_navigation.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_config * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contact/config.xml b/administrator/components/com_contact/config.xml index 3683321c4073f..15ee14fa5de99 100644 --- a/administrator/components/com_contact/config.xml +++ b/administrator/components/com_contact/config.xml @@ -45,7 +45,7 @@ - + @@ -133,11 +135,25 @@ description="COM_CONTACT_FIELD_PARAMS_CONTACT_E_MAIL_DESC" default="0" class="btn-group btn-group-yesno" + showon="show_info:1" > + + + + + @@ -157,6 +174,7 @@ description="COM_CONTACT_FIELD_PARAMS_TOWN-SUBURB_DESC" default="1" class="btn-group btn-group-yesno" + showon="show_info:1" > @@ -169,6 +187,7 @@ description="COM_CONTACT_FIELD_PARAMS_STATE-COUNTY_DESC" default="1" class="btn-group btn-group-yesno" + showon="show_info:1" > @@ -181,6 +200,7 @@ description="COM_CONTACT_FIELD_PARAMS_POST-ZIP_CODE_DESC" default="1" class="btn-group btn-group-yesno" + showon="show_info:1" > @@ -193,6 +213,7 @@ description="COM_CONTACT_FIELD_PARAMS_COUNTRY_DESC" default="1" class="btn-group btn-group-yesno" + showon="show_info:1" > @@ -205,6 +226,7 @@ description="COM_CONTACT_FIELD_PARAMS_TELEPHONE_DESC" default="1" class="btn-group btn-group-yesno" + showon="show_info:1" > @@ -217,6 +239,7 @@ description="COM_CONTACT_FIELD_PARAMS_MOBILE_DESC" default="1" class="btn-group btn-group-yesno" + showon="show_info:1" > @@ -229,6 +252,7 @@ description="COM_CONTACT_FIELD_PARAMS_FAX_DESC" default="1" class="btn-group btn-group-yesno" + showon="show_info:1" > @@ -241,6 +265,7 @@ description="COM_CONTACT_FIELD_PARAMS_WEBPAGE_DESC" default="1" class="btn-group btn-group-yesno" + showon="show_info:1" > @@ -253,11 +278,21 @@ description="COM_CONTACT_FIELD_PARAMS_SHOW_IMAGE_DESC" default="1" class="btn-group btn-group-yesno" + showon="show_info:1" > + + JHIDE - - @@ -896,11 +922,10 @@ type="plugins" label="COM_CONTACT_FIELD_CAPTCHA_LABEL" description="COM_CONTACT_FIELD_CAPTCHA_DESC" - default="" folder="captcha" filter="cmd" + useglobal="true" > - @@ -921,7 +946,7 @@ type="radio" label="COM_CONTACT_FIELD_EMAIL_EMAIL_COPY_LABEL" description="COM_CONTACT_FIELD_EMAIL_EMAIL_COPY_DESC" - default="1" + default="0" class="btn-group btn-group-yesno" showon="show_email_form:1" > @@ -1018,6 +1043,33 @@ + + + + + + + + + + com_contact Joomla! Project April 2006 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_contact/controller.php b/administrator/components/com_contact/controller.php index 963f05abc8b64..5169195180191 100644 --- a/administrator/components/com_contact/controller.php +++ b/administrator/components/com_contact/controller.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contact/controllers/contact.php b/administrator/components/com_contact/controllers/contact.php index 088f51b5b4958..2f69d30bfd993 100644 --- a/administrator/components/com_contact/controllers/contact.php +++ b/administrator/components/com_contact/controllers/contact.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contact/controllers/contacts.php b/administrator/components/com_contact/controllers/contacts.php index 4f0458f5a77c6..b800b51f7d54e 100644 --- a/administrator/components/com_contact/controllers/contacts.php +++ b/administrator/components/com_contact/controllers/contacts.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -78,9 +78,18 @@ public function featured() { JError::raiseWarning(500, $model->getError()); } + + if ($value == 1) + { + $message = JText::plural('COM_CONTACT_N_ITEMS_FEATURED', count($ids)); + } + else + { + $message = JText::plural('COM_CONTACT_N_ITEMS_UNFEATURED', count($ids)); + } } - $this->setRedirect('index.php?option=com_contact&view=contacts'); + $this->setRedirect('index.php?option=com_contact&view=contacts', $message); } /** diff --git a/administrator/components/com_contact/helpers/associations.php b/administrator/components/com_contact/helpers/associations.php index c2070d843b2ac..be5ebdbede39e 100644 --- a/administrator/components/com_contact/helpers/associations.php +++ b/administrator/components/com_contact/helpers/associations.php @@ -3,13 +3,13 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; -use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Association\AssociationExtensionHelper; JTable::addIncludePath(__DIR__ . '/../tables'); @@ -18,7 +18,7 @@ * * @since 3.7.0 */ -class ContactAssociationsHelper extends JAssociationExtensionHelper +class ContactAssociationsHelper extends AssociationExtensionHelper { /** * The extension name diff --git a/administrator/components/com_contact/helpers/contact.php b/administrator/components/com_contact/helpers/contact.php index ccdec780130c5..fa33ca7b492e4 100644 --- a/administrator/components/com_contact/helpers/contact.php +++ b/administrator/components/com_contact/helpers/contact.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -57,7 +57,7 @@ public static function addSubmenu($vName) /** * Adds Count Items for Category Manager. * - * @param stdClass[] &$items The contact category objects + * @param stdClass[] $items The contact category objects * * @return stdClass[] * @@ -111,7 +111,7 @@ public static function countItems(&$items) /** * Adds Count Items for Tag Manager. * - * @param stdClass[] &$items The banner tag objects + * @param stdClass[] $items The banner tag objects * @param string $extension The name of the active view. * * @return stdClass[] @@ -123,15 +123,19 @@ public static function countTagItems(&$items, $extension) $db = JFactory::getDbo(); $parts = explode('.', $extension); $section = null; + if (count($parts) > 1) { $section = $parts[1]; } + $join = $db->qn('#__contact_details') . ' AS c ON ct.content_item_id=c.id'; + if ($section === 'category') { $join = $db->qn('#__categories') . ' AS c ON ct.content_item_id=c.id'; } + foreach ($items as $item) { $item->count_trashed = 0; @@ -195,6 +199,12 @@ public static function validateSection($section, $item) $section = 'mail'; } + if (JFactory::getApplication()->isClient('site') && $section == 'category') + { + // The contact form needs to be the mail section + $section = 'contact'; + } + if ($section != 'mail' && $section != 'contact') { // We don't know other sections diff --git a/administrator/components/com_contact/helpers/html/contact.php b/administrator/components/com_contact/helpers/html/contact.php index aff48320506c3..4e0915975a595 100644 --- a/administrator/components/com_contact/helpers/html/contact.php +++ b/administrator/components/com_contact/helpers/html/contact.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -51,6 +51,7 @@ public static function association($contactid) ->select('cat.title as category_title') ->join('LEFT', '#__categories as cat ON cat.id=c.catid') ->where('c.id IN (' . implode(',', array_values($associations)) . ')') + ->where('c.id != ' . $contactid) ->join('LEFT', '#__languages as l ON c.language=l.lang_code') ->select('l.image') ->select('l.title as language_title'); @@ -114,12 +115,13 @@ public static function featured($value = 0, $i, $canChange = true) if ($canChange) { $html = ''; + . ($value == 1 ? ' active' : '') . '" title="' . JHtml::_('tooltipText', $state[3]) + . '">'; } else { - $html = ''; + $html = ''; } return $html; diff --git a/administrator/components/com_contact/models/contact.php b/administrator/components/com_contact/models/contact.php index fe10f796b468a..936591f4979d9 100644 --- a/administrator/components/com_contact/models/contact.php +++ b/administrator/components/com_contact/models/contact.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -52,9 +52,9 @@ class ContactModelContact extends JModelAdmin */ protected $batch_commands = array( 'assetgroup_id' => 'batchAccess', - 'language_id' => 'batchLanguage', - 'tag' => 'batchTag', - 'user_id' => 'batchUser' + 'language_id' => 'batchLanguage', + 'tag' => 'batchTag', + 'user_id' => 'batchUser', ); /** @@ -267,7 +267,7 @@ public function getTable($type = 'Contact', $prefix = 'ContactTable', $config = */ public function getForm($data = array(), $loadData = true) { - JForm::addFieldPath('JPATH_ADMINISTRATOR/components/com_users/models/fields'); + JForm::addFieldPath(JPATH_ADMINISTRATOR . '/components/com_users/models/fields'); // Get the form. $form = $this->loadForm('com_contact.contact', 'contact', array('control' => 'jform', 'load_data' => $loadData)); diff --git a/administrator/components/com_contact/models/contacts.php b/administrator/components/com_contact/models/contacts.php index 4604a36f46674..287f732c55110 100644 --- a/administrator/components/com_contact/models/contacts.php +++ b/administrator/components/com_contact/models/contacts.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -131,7 +131,7 @@ protected function getStoreId($id = '') // Compile the store id. $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.published'); - $id .= ':' . $this->getState('filter.category_id'); + $id .= ':' . serialize($this->getState('filter.category_id')); $id .= ':' . $this->getState('filter.access'); $id .= ':' . $this->getState('filter.language'); $id .= ':' . $this->getState('filter.tag'); diff --git a/administrator/components/com_contact/models/fields/modal/contact.php b/administrator/components/com_contact/models/fields/modal/contact.php index b8f84ccc75fef..e03511d6855c3 100644 --- a/administrator/components/com_contact/models/fields/modal/contact.php +++ b/administrator/components/com_contact/models/fields/modal/contact.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contact/models/forms/contact.xml b/administrator/components/com_contact/models/forms/contact.xml index f697a5f1cbc4e..3146bfcc9df4b 100644 --- a/administrator/components/com_contact/models/forms/contact.xml +++ b/administrator/components/com_contact/models/forms/contact.xml @@ -5,7 +5,7 @@ + > @@ -501,6 +501,7 @@ description="COM_CONTACT_FIELD_PARAMS_NAME_DESC" class="chzn-color" useglobal="true" + showon="show_info:1" > @@ -513,6 +514,7 @@ description="COM_CONTACT_FIELD_PARAMS_CONTACT_POSITION_DESC" class="chzn-color" useglobal="true" + showon="show_info:1" > @@ -525,11 +527,25 @@ description="COM_CONTACT_FIELD_PARAMS_CONTACT_E_MAIL_DESC" class="chzn-color" useglobal="true" + showon="show_info:1" > + + + + + @@ -549,6 +566,7 @@ description="COM_CONTACT_FIELD_PARAMS_TOWN-SUBURB_DESC" class="chzn-color" useglobal="true" + showon="show_info:1" > @@ -561,6 +579,7 @@ description="COM_CONTACT_FIELD_PARAMS_STATE-COUNTY_DESC" class="chzn-color" useglobal="true" + showon="show_info:1" > @@ -573,6 +592,7 @@ description="COM_CONTACT_FIELD_PARAMS_POST-ZIP_CODE_DESC" class="chzn-color" useglobal="true" + showon="show_info:1" > @@ -585,6 +605,7 @@ description="COM_CONTACT_FIELD_PARAMS_COUNTRY_DESC" class="chzn-color" useglobal="true" + showon="show_info:1" > @@ -597,6 +618,7 @@ description="COM_CONTACT_FIELD_PARAMS_TELEPHONE_DESC" class="chzn-color" useglobal="true" + showon="show_info:1" > @@ -609,6 +631,7 @@ description="COM_CONTACT_FIELD_PARAMS_MOBILE_DESC" class="chzn-color" useglobal="true" + showon="show_info:1" > @@ -621,6 +644,7 @@ description="COM_CONTACT_FIELD_PARAMS_FAX_DESC" class="chzn-color" useglobal="true" + showon="show_info:1" > @@ -633,6 +657,7 @@ description="COM_CONTACT_FIELD_PARAMS_WEBPAGE_DESC" class="chzn-color" useglobal="true" + showon="show_info:1" > @@ -645,6 +670,7 @@ description="COM_CONTACT_FIELD_PARAMS_SHOW_IMAGE_DESC" class="chzn-color" useglobal="true" + showon="show_info:1" > @@ -725,10 +751,10 @@ @@ -957,7 +983,7 @@ + + +
    + +
    +
    + diff --git a/administrator/components/com_contact/tables/contact.php b/administrator/components/com_contact/tables/contact.php index 556baa184e63a..d34d46d49f6e6 100644 --- a/administrator/components/com_contact/tables/contact.php +++ b/administrator/components/com_contact/tables/contact.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -30,7 +30,7 @@ class ContactTableContact extends JTable /** * Constructor * - * @param JDatabaseDriver &$db Database connector object + * @param JDatabaseDriver $db Database connector object * * @since 1.0 */ @@ -110,7 +110,7 @@ public function store($updateNulls = false) $this->webpage = JStringPunycode::urlToPunycode($this->webpage); // Verify that the alias is unique - $table = JTable::getInstance('Contact', 'ContactTable'); + $table = JTable::getInstance('Contact', 'ContactTable', array('dbo' => $this->_db)); if ($table->load(array('alias' => $this->alias, 'catid' => $this->catid)) && ($table->id != $this->id || $this->id == 0)) { @@ -161,7 +161,7 @@ public function check() } // Sanity check for user_id - if (!($this->user_id)) + if (!$this->user_id) { $this->user_id = 0; } diff --git a/administrator/components/com_contact/views/contact/tmpl/edit.php b/administrator/components/com_contact/views/contact/tmpl/edit.php index 0c3cb3a790324..38313b9f5e202 100644 --- a/administrator/components/com_contact/views/contact/tmpl/edit.php +++ b/administrator/components/com_contact/views/contact/tmpl/edit.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -58,7 +58,7 @@ item->id) ? JText::_('COM_CONTACT_NEW_CONTACT') : JText::_('COM_CONTACT_EDIT_CONTACT')); ?>
    -
    +
    form->renderField('user_id'); ?> form->renderField('image'); ?> diff --git a/administrator/components/com_contact/views/contact/tmpl/edit_associations.php b/administrator/components/com_contact/views/contact/tmpl/edit_associations.php index 152abcd82c017..2aebf23a4a27b 100644 --- a/administrator/components/com_contact/views/contact/tmpl/edit_associations.php +++ b/administrator/components/com_contact/views/contact/tmpl/edit_associations.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contact/views/contact/tmpl/edit_metadata.php b/administrator/components/com_contact/views/contact/tmpl/edit_metadata.php index 3e815e20f2dc2..3194ca935857c 100644 --- a/administrator/components/com_contact/views/contact/tmpl/edit_metadata.php +++ b/administrator/components/com_contact/views/contact/tmpl/edit_metadata.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contact/views/contact/tmpl/edit_params.php b/administrator/components/com_contact/views/contact/tmpl/edit_params.php index 92115983f4213..6088e67c10fc8 100644 --- a/administrator/components/com_contact/views/contact/tmpl/edit_params.php +++ b/administrator/components/com_contact/views/contact/tmpl/edit_params.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contact/views/contact/tmpl/modal.php b/administrator/components/com_contact/views/contact/tmpl/modal.php index 50bee08bf17b0..3a551aa7e1e1a 100644 --- a/administrator/components/com_contact/views/contact/tmpl/modal.php +++ b/administrator/components/com_contact/views/contact/tmpl/modal.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contact/views/contact/tmpl/modal_associations.php b/administrator/components/com_contact/views/contact/tmpl/modal_associations.php index 152abcd82c017..2aebf23a4a27b 100644 --- a/administrator/components/com_contact/views/contact/tmpl/modal_associations.php +++ b/administrator/components/com_contact/views/contact/tmpl/modal_associations.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contact/views/contact/tmpl/modal_metadata.php b/administrator/components/com_contact/views/contact/tmpl/modal_metadata.php index 3e815e20f2dc2..3194ca935857c 100644 --- a/administrator/components/com_contact/views/contact/tmpl/modal_metadata.php +++ b/administrator/components/com_contact/views/contact/tmpl/modal_metadata.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contact/views/contact/tmpl/modal_params.php b/administrator/components/com_contact/views/contact/tmpl/modal_params.php index 92115983f4213..6088e67c10fc8 100644 --- a/administrator/components/com_contact/views/contact/tmpl/modal_params.php +++ b/administrator/components/com_contact/views/contact/tmpl/modal_params.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contact/views/contact/view.html.php b/administrator/components/com_contact/views/contact/view.html.php index de63c695b8827..1e109067633ed 100644 --- a/administrator/components/com_contact/views/contact/view.html.php +++ b/administrator/components/com_contact/views/contact/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -54,9 +54,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } // If we are forcing a language in modal (used for associations). diff --git a/administrator/components/com_contact/views/contacts/tmpl/default.php b/administrator/components/com_contact/views/contacts/tmpl/default.php index a50ecd75adc81..23cf5d561c82f 100644 --- a/administrator/components/com_contact/views/contacts/tmpl/default.php +++ b/administrator/components/com_contact/views/contacts/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -115,7 +115,7 @@ + value="ordering; ?>" class="width-20 text-area-order" /> @@ -187,8 +187,8 @@ 'bootstrap.renderModal', 'collapseModal', array( - 'title' => JText::_('COM_CONTACT_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') + 'title' => JText::_('COM_CONTACT_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer'), ), $this->loadTemplate('batch_body') ); ?> diff --git a/administrator/components/com_contact/views/contacts/tmpl/default_batch.php b/administrator/components/com_contact/views/contacts/tmpl/default_batch.php index 0d3e882454412..136e9384bb156 100644 --- a/administrator/components/com_contact/views/contacts/tmpl/default_batch.php +++ b/administrator/components/com_contact/views/contacts/tmpl/default_batch.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contact/views/contacts/tmpl/default_batch_body.php b/administrator/components/com_contact/views/contacts/tmpl/default_batch_body.php index 68ad1a9ef8a20..16fd78fbb7325 100644 --- a/administrator/components/com_contact/views/contacts/tmpl/default_batch_body.php +++ b/administrator/components/com_contact/views/contacts/tmpl/default_batch_body.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_contact/views/contacts/tmpl/default_batch_footer.php b/administrator/components/com_contact/views/contacts/tmpl/default_batch_footer.php index 50b3ec588949c..500e7dd2df8d8 100644 --- a/administrator/components/com_contact/views/contacts/tmpl/default_batch_footer.php +++ b/administrator/components/com_contact/views/contacts/tmpl/default_batch_footer.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_contact/views/contacts/tmpl/modal.php b/administrator/components/com_contact/views/contacts/tmpl/modal.php index 0b87502a434f5..fa241fb8baa12 100644 --- a/administrator/components/com_contact/views/contacts/tmpl/modal.php +++ b/administrator/components/com_contact/views/contacts/tmpl/modal.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -22,6 +22,7 @@ JHtml::_('behavior.core'); JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); +JHtml::_('bootstrap.popover', '.hasPopover', array('placement' => 'bottom')); JHtml::_('formbehavior.chosen', 'select'); JHtml::_('behavior.polyfill', array('event'), 'lt IE 9'); JHtml::_('script', 'com_contact/admin-contacts-modal.min.js', array('version' => 'auto', 'relative' => true)); @@ -88,9 +89,9 @@ 'icon-trash', - 0 => 'icon-unpublish', - 1 => 'icon-publish', - 2 => 'icon-archive', + 0 => 'icon-unpublish', + 1 => 'icon-publish', + 2 => 'icon-archive', ); ?> items as $i => $item) : ?> @@ -116,10 +117,10 @@ ?> - + - + escape($item->name); ?> escape($item->name); ?> diff --git a/administrator/components/com_contact/views/contacts/view.html.php b/administrator/components/com_contact/views/contacts/view.html.php index 81a2a48b2251c..9233fca34d001 100644 --- a/administrator/components/com_contact/views/contacts/view.html.php +++ b/administrator/components/com_contact/views/contacts/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contact * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -81,9 +81,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } // Preprocess the list of items to find ordering divisions. @@ -106,7 +104,7 @@ public function display($tpl = null) // We also need to change the category filter to show show categories with All or the forced language. if ($forcedLanguage = JFactory::getApplication()->input->get('forcedLanguage', '', 'CMD')) { - // If the language is forced we can't allow to select the language, so transform the language selector filter into an hidden field. + // If the language is forced we can't allow to select the language, so transform the language selector filter into a hidden field. $languageXml = new SimpleXMLElement(''); $this->filterForm->setField($languageXml, 'filter', true); @@ -135,12 +133,12 @@ protected function addToolbar() JToolbarHelper::title(JText::_('COM_CONTACT_MANAGER_CONTACTS'), 'address contact'); - if ($canDo->get('core.create') || (count($user->getAuthorisedCategories('com_contact', 'core.create'))) > 0) + if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_contact', 'core.create')) > 0) { JToolbarHelper::addNew('contact.add'); } - if (($canDo->get('core.edit')) || ($canDo->get('core.edit.own'))) + if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) { JToolbarHelper::editList('contact.edit'); } @@ -198,15 +196,15 @@ protected function addToolbar() protected function getSortFields() { return array( - 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), - 'a.published' => JText::_('JSTATUS'), - 'a.name' => JText::_('JGLOBAL_TITLE'), + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.name' => JText::_('JGLOBAL_TITLE'), 'category_title' => JText::_('JCATEGORY'), - 'ul.name' => JText::_('COM_CONTACT_FIELD_LINKED_USER_LABEL'), - 'a.featured' => JText::_('JFEATURED'), - 'a.access' => JText::_('JGRID_HEADING_ACCESS'), - 'a.language' => JText::_('JGRID_HEADING_LANGUAGE'), - 'a.id' => JText::_('JGRID_HEADING_ID') + 'ul.name' => JText::_('COM_CONTACT_FIELD_LINKED_USER_LABEL'), + 'a.featured' => JText::_('JFEATURED'), + 'a.access' => JText::_('JGRID_HEADING_ACCESS'), + 'a.language' => JText::_('JGRID_HEADING_LANGUAGE'), + 'a.id' => JText::_('JGRID_HEADING_ID'), ); } } diff --git a/administrator/components/com_content/config.xml b/administrator/components/com_content/config.xml index 489f400a55985..cb91b6f2c8855 100644 --- a/administrator/components/com_content/config.xml +++ b/administrator/components/com_content/config.xml @@ -3,10 +3,12 @@
    + description="COM_CONTENT_CONFIG_ARTICLE_SETTINGS_DESC" + > + > @@ -28,11 +31,12 @@ + class="btn-group btn-group-yesno" + default="1" + showon="show_title:1" + > @@ -40,10 +44,11 @@ + > @@ -51,9 +56,10 @@ + description="COM_CONTENT_FIELD_INFOBLOCK_POSITION_DESC" + default="0" + > @@ -62,10 +68,11 @@ + class="btn-group btn-group-yesno" + default="1" + > @@ -73,10 +80,11 @@ + class="btn-group btn-group-yesno" + default="1" + > @@ -84,11 +92,12 @@ + showon="show_category:1" + > @@ -96,10 +105,11 @@ + class="btn-group btn-group-yesno" + default="1" + > @@ -107,11 +117,12 @@ + showon="show_parent_category:1" + > @@ -125,11 +136,11 @@ + > @@ -137,12 +148,12 @@ + > @@ -156,10 +167,11 @@ + class="btn-group btn-group-yesno" + default="1" + > @@ -167,11 +179,12 @@ + showon="show_author:1" + > @@ -179,10 +192,11 @@ + class="btn-group btn-group-yesno" + default="1" + > @@ -190,10 +204,11 @@ + class="btn-group btn-group-yesno" + default="1" + > @@ -201,10 +216,11 @@ + class="btn-group btn-group-yesno" + default="1" + > @@ -212,10 +228,11 @@ + class="btn-group btn-group-yesno" + default="1" + > @@ -223,20 +240,23 @@ + class="btn-group btn-group-yesno" + default="0" + > + + class="btn-group btn-group-yesno" + default="1" + > @@ -244,18 +264,19 @@ + showon="show_readmore:1" + > + > @@ -279,13 +301,15 @@ type="spacer" hr="true" /> + + class="btn-group btn-group-yesno" + default="1" + > @@ -293,10 +317,11 @@ + class="btn-group btn-group-yesno" + default="1" + > @@ -304,10 +329,11 @@ + class="btn-group btn-group-yesno" + default="1" + > @@ -315,10 +341,11 @@ + class="btn-group btn-group-yesno" + default="1" + > @@ -326,107 +353,123 @@ + > + + description="COM_CONTENT_FIELD_URLSPOSITION_DESC" + class="btn-group btn-group-yesno" + default="0" + >
    -
    + +
    + - + useglobal="true" + > + + class="btn-group btn-group-yesno" + default="1" + > + + class="btn-group btn-group-yesno" + default="1" + > + + class="btn-group btn-group-yesno" + default="0" + > + + + class="btn-group btn-group-yesno" + default="0" + > + + class="btn-group btn-group-yesno" + default="0" + > + + + > + + > + + > + + > + + > @@ -501,65 +548,77 @@
    -
    + + class="btn-group btn-group-yesno" + default="1" + > - + > - + > - + > - + > @@ -569,82 +628,92 @@ - + > - + > - + class="btn-group btn-group-yesno" + > - + > - + >
    -
    - + class="btn-group btn-group-yesno" + default="1" + > - + description="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_DESC" + default="-1" + > @@ -654,101 +723,109 @@ - + > - + > - + class="btn-group btn-group-yesno" + default="1" + >
    -
    - - + description="JGLOBAL_NUM_LEADING_ARTICLES_DESC" + default="1" + /> - - + description="JGLOBAL_NUM_INTRO_ARTICLES_DESC" + default="4" + /> - - + description="JGLOBAL_NUM_COLUMNS_DESC" + default="2" + /> - - + description="JGLOBAL_NUM_LINKS_DESC" + default="4" + /> - - - + > + + - - + description="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_DESC" + default="0" + > @@ -759,26 +836,32 @@
    -
    - + > - + description="JGLOBAL_FILTER_FIELD_DESC" + default="hide" + > @@ -786,181 +869,177 @@ - + > - + description="JGLOBAL_SHOW_DATE_DESC" + default="0" + > - - + > - + > - - - + description="JGLOBAL_LIST_VOTES_DESC" + class="btn-group btn-group-yesno" + default="0" + > + + - - - + description="JGLOBAL_LIST_RATINGS_DESC" + class="btn-group btn-group-yesno" + default="0" + > + +
    -
    - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + default="published" + > - + description="JGLOBAL_PAGINATION_DESC" + default="2" + > - + > - + default="show" + > @@ -968,7 +1047,8 @@
    -
    @@ -976,10 +1056,11 @@ + > @@ -991,36 +1072,58 @@ description="JGLOBAL_FEED_SUMMARY_DESC" default="0" showon="show_feed_link:1" - > - - + > + + + > + + + + + + + + + + + > @@ -1040,6 +1143,7 @@ validate="rules" filter="rules" component="com_content" - section="component"/> + section="component" + />
    diff --git a/administrator/components/com_content/content.php b/administrator/components/com_content/content.php index 1f8504b1e6f70..9ca9f5580506c 100644 --- a/administrator/components/com_content/content.php +++ b/administrator/components/com_content/content.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_content/content.xml b/administrator/components/com_content/content.xml index 472164a470eeb..2e07450a236cc 100644 --- a/administrator/components/com_content/content.xml +++ b/administrator/components/com_content/content.xml @@ -3,7 +3,7 @@ com_content Joomla! Project April 2006 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_content/controller.php b/administrator/components/com_content/controller.php index 34d876074484e..cead07fb6cd95 100644 --- a/administrator/components/com_content/controller.php +++ b/administrator/components/com_content/controller.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_content/controllers/article.php b/administrator/components/com_content/controllers/article.php index 705584b51db57..1a504d40d1896 100644 --- a/administrator/components/com_content/controllers/article.php +++ b/administrator/components/com_content/controllers/article.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_content/controllers/articles.php b/administrator/components/com_content/controllers/articles.php index 82ae9ccbcd184..85948486d7f20 100644 --- a/administrator/components/com_content/controllers/articles.php +++ b/administrator/components/com_content/controllers/articles.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_content/controllers/featured.php b/administrator/components/com_content/controllers/featured.php index e3ef401689e91..f5ffbbc144d21 100644 --- a/administrator/components/com_content/controllers/featured.php +++ b/administrator/components/com_content/controllers/featured.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_content/helpers/associations.php b/administrator/components/com_content/helpers/associations.php index b5352e9e0fc36..24aa985151908 100644 --- a/administrator/components/com_content/helpers/associations.php +++ b/administrator/components/com_content/helpers/associations.php @@ -3,20 +3,20 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; -use Joomla\Utilities\ArrayHelper; +use Joomla\CMS\Association\AssociationExtensionHelper; /** * Content associations helper. * * @since 3.7.0 */ -class ContentAssociationsHelper extends JAssociationExtensionHelper +class ContentAssociationsHelper extends AssociationExtensionHelper { /** * The extension name @@ -141,7 +141,6 @@ public function getType($typeName = '') if (in_array($typeName, $this->itemTypes)) { - switch ($typeName) { case 'article': diff --git a/administrator/components/com_content/helpers/content.php b/administrator/components/com_content/helpers/content.php index edd822c453a4c..a8a0b62e72c7c 100644 --- a/administrator/components/com_content/helpers/content.php +++ b/administrator/components/com_content/helpers/content.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -40,6 +40,12 @@ public static function addSubmenu($vName) $vName == 'categories' ); + JHtmlSidebar::addEntry( + JText::_('COM_CONTENT_SUBMENU_FEATURED'), + 'index.php?option=com_content&view=featured', + $vName == 'featured' + ); + if (JComponentHelper::isEnabled('com_fields') && JComponentHelper::getParams('com_content')->get('custom_fields_enable', '1')) { JHtmlSidebar::addEntry( @@ -53,12 +59,6 @@ public static function addSubmenu($vName) $vName == 'fields.groups' ); } - - JHtmlSidebar::addEntry( - JText::_('COM_CONTENT_SUBMENU_FEATURED'), - 'index.php?option=com_content&view=featured', - $vName == 'featured' - ); } /** @@ -91,7 +91,7 @@ public static function filterText($text) /** * Adds Count Items for Category Manager. * - * @param stdClass[] &$items The banner category objects + * @param stdClass[] $items The banner category objects * * @return stdClass[] * @@ -145,7 +145,7 @@ public static function countItems(&$items) /** * Adds Count Items for Tag Manager. * - * @param stdClass[] &$items The content objects + * @param stdClass[] $items The content objects * @param string $extension The name of the active view. * * @return stdClass[] diff --git a/administrator/components/com_content/helpers/html/contentadministrator.php b/administrator/components/com_content/helpers/html/contentadministrator.php index b3f7bd06dd9e3..821c9d2d01da7 100644 --- a/administrator/components/com_content/helpers/html/contentadministrator.php +++ b/administrator/components/com_content/helpers/html/contentadministrator.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -52,6 +52,7 @@ public static function association($articleid) ->select('cat.title as category_title') ->join('LEFT', '#__categories as cat ON cat.id=c.catid') ->where('c.id IN (' . implode(',', array_values($associations)) . ')') + ->where('c.id != ' . $articleid) ->join('LEFT', '#__languages as l ON c.language=l.lang_code') ->select('l.image') ->select('l.title as language_title'); @@ -114,12 +115,13 @@ public static function featured($value = 0, $i, $canChange = true) if ($canChange) { $html = ''; + . ($value == 1 ? ' active' : '') . '" title="' . JHtml::_('tooltipText', $state[3]) + . '">'; } else { $html = ''; + . JHtml::_('tooltipText', $state[2]) . '">'; } return $html; diff --git a/administrator/components/com_content/models/article.php b/administrator/components/com_content/models/article.php index b6dba4d0cfefe..868182bd67f2e 100644 --- a/administrator/components/com_content/models/article.php +++ b/administrator/components/com_content/models/article.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -67,6 +67,12 @@ protected function batchCopy($value, $pks, $contexts) return false; } + JPluginHelper::importPlugin('system'); + $dispatcher = JEventDispatcher::getInstance(); + + // Register FieldsHelper + JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'); + // Parent exists so we let's proceed while (!empty($pks)) { @@ -93,6 +99,19 @@ protected function batchCopy($value, $pks, $contexts) } } + $fields = FieldsHelper::getFields('com_content.article', $this->table, true); + $fieldsData = array(); + + if (!empty($fields)) + { + $fieldsData['com_fields'] = array(); + + foreach ($fields as $field) + { + $fieldsData['com_fields'][$field->name] = $field->rawvalue; + } + } + // Alter the title & alias $data = $this->generateNewTitle($categoryId, $this->table->alias, $this->table->title); $this->table->title = $data['0']; @@ -150,6 +169,9 @@ protected function batchCopy($value, $pks, $contexts) $db->setQuery($query); $db->execute(); } + + // Run event for copied article + $dispatcher->trigger('onContentAfterSave', array('com_content.article', &$this->table, true, $fieldsData)); } // Clean the cache @@ -158,6 +180,117 @@ protected function batchCopy($value, $pks, $contexts) return $newIds; } + /** + * Batch move categories to a new category. + * + * @param integer $value The new category ID. + * @param array $pks An array of row IDs. + * @param array $contexts An array of item contexts. + * + * @return boolean True on success. + * + * @since 3.8.6 + */ + protected function batchMove($value, $pks, $contexts) + { + if (empty($this->batchSet)) + { + // Set some needed variables. + $this->user = JFactory::getUser(); + $this->table = $this->getTable(); + $this->tableClassName = get_class($this->table); + $this->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + } + + $categoryId = (int) $value; + + if (!$this->checkCategoryId($categoryId)) + { + return false; + } + + JPluginHelper::importPlugin('system'); + $dispatcher = JEventDispatcher::getInstance(); + + // Register FieldsHelper + JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'); + + // Parent exists so we proceed + foreach ($pks as $pk) + { + if (!$this->user->authorise('core.edit', $contexts[$pk])) + { + $this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT')); + + return false; + } + + // Check that the row actually exists + if (!$this->table->load($pk)) + { + if ($error = $this->table->getError()) + { + // Fatal error + $this->setError($error); + + return false; + } + else + { + // Not fatal error + $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); + continue; + } + } + + $fields = FieldsHelper::getFields('com_content.article', $this->table, true); + $fieldsData = array(); + + if (!empty($fields)) + { + $fieldsData['com_fields'] = array(); + + foreach ($fields as $field) + { + $fieldsData['com_fields'][$field->name] = $field->rawvalue; + } + } + + // Set the new category ID + $this->table->catid = $categoryId; + + // Check the row. + if (!$this->table->check()) + { + $this->setError($this->table->getError()); + + return false; + } + + if (!empty($this->type)) + { + $this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table); + } + + // Store the row. + if (!$this->table->store()) + { + $this->setError($this->table->getError()); + + return false; + } + + // Run event for moved article + $dispatcher->trigger('onContentAfterSave', array('com_content.article', &$this->table, false, $fieldsData)); + } + + // Clean the cache + $this->cleanCache(); + + return true; + } + /** * Method to test whether a record can be deleted. * @@ -208,7 +341,7 @@ protected function canEditState($record) } // Default to component settings if neither article nor category known. - return parent::canEditState(); + return parent::canEditState($record); } /** @@ -525,7 +658,7 @@ public function save($data) $catid = CategoriesHelper::validateCategoryId($data['catid'], 'com_content'); } - // Save New Categoryg + // Save New Category if ($catid == 0 && $this->canCreateCategory()) { $table = array(); @@ -837,7 +970,7 @@ private function canCreateCategory() /** * Delete #__content_frontpage items if the deleted articles was featured * - * @param object &$pks The primary key related to the contents that was deleted. + * @param object $pks The primary key related to the contents that was deleted. * * @return boolean * @@ -850,7 +983,7 @@ public function delete(&$pks) if ($return) { // Now check to see if this articles was featured if so delete it from the #__content_frontpage table - $db = JFactory::getDbo(); + $db = $this->getDbo(); $query = $db->getQuery(true) ->delete($db->quoteName('#__content_frontpage')) ->where('content_id IN (' . implode(',', $pks) . ')'); diff --git a/administrator/components/com_content/models/articles.php b/administrator/components/com_content/models/articles.php index dd4606404256a..c38c16b5d5293 100644 --- a/administrator/components/com_content/models/articles.php +++ b/administrator/components/com_content/models/articles.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -40,6 +40,7 @@ public function __construct($config = array()) 'state', 'a.state', 'access', 'a.access', 'access_level', 'created', 'a.created', + 'modified', 'a.modified', 'created_by', 'a.created_by', 'created_by_alias', 'a.created_by_alias', 'ordering', 'a.ordering', @@ -52,7 +53,8 @@ public function __construct($config = array()) 'author_id', 'category_id', 'level', - 'tag' + 'tag', + 'rating_count', 'rating', ); if (JLanguageAssociations::isEnabled()) @@ -97,26 +99,36 @@ protected function populateState($ordering = 'a.id', $direction = 'desc') $search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); $this->setState('filter.search', $search); - $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access'); - $this->setState('filter.access', $access); - - $authorId = $app->getUserStateFromRequest($this->context . '.filter.author_id', 'filter_author_id'); - $this->setState('filter.author_id', $authorId); - $published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); $this->setState('filter.published', $published); - $categoryId = $this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id'); - $this->setState('filter.category_id', $categoryId); - $level = $this->getUserStateFromRequest($this->context . '.filter.level', 'filter_level'); $this->setState('filter.level', $level); $language = $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', ''); $this->setState('filter.language', $language); - $tag = $this->getUserStateFromRequest($this->context . '.filter.tag', 'filter_tag', ''); - $this->setState('filter.tag', $tag); + $formSubmited = $app->input->post->get('form_submited'); + + $access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access'); + $authorId = $this->getUserStateFromRequest($this->context . '.filter.author_id', 'filter_author_id'); + $categoryId = $this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id'); + $tag = $this->getUserStateFromRequest($this->context . '.filter.tag', 'filter_tag', ''); + + if ($formSubmited) + { + $access = $app->input->post->get('access'); + $this->setState('filter.access', $access); + + $authorId = $app->input->post->get('author_id'); + $this->setState('filter.author_id', $authorId); + + $categoryId = $app->input->post->get('category_id'); + $this->setState('filter.category_id', $categoryId); + + $tag = $app->input->post->get('tag'); + $this->setState('filter.tag', $tag); + } // List state information. parent::populateState($ordering, $direction); @@ -146,11 +158,12 @@ protected function getStoreId($id = '') { // Compile the store id. $id .= ':' . $this->getState('filter.search'); - $id .= ':' . $this->getState('filter.access'); + $id .= ':' . serialize($this->getState('filter.access')); $id .= ':' . $this->getState('filter.published'); - $id .= ':' . $this->getState('filter.category_id'); - $id .= ':' . $this->getState('filter.author_id'); + $id .= ':' . serialize($this->getState('filter.category_id')); + $id .= ':' . serialize($this->getState('filter.author_id')); $id .= ':' . $this->getState('filter.language'); + $id .= ':' . serialize($this->getState('filter.tag')); return parent::getStoreId($id); } @@ -165,17 +178,17 @@ protected function getStoreId($id = '') protected function getListQuery() { // Create a new query object. - $db = $this->getDbo(); + $db = $this->getDbo(); $query = $db->getQuery(true); - $user = JFactory::getUser(); + $user = JFactory::getUser(); // Select the required fields from the table. $query->select( $this->getState( 'list.select', - 'a.id, a.title, a.alias, a.checked_out, a.checked_out_time, a.catid' . - ', a.state, a.access, a.created, a.created_by, a.created_by_alias, a.ordering, a.featured, a.language, a.hits' . - ', a.publish_up, a.publish_down' + 'DISTINCT a.id, a.title, a.alias, a.checked_out, a.checked_out_time, a.catid' . + ', a.state, a.access, a.created, a.created_by, a.created_by_alias, a.modified, a.ordering, a.featured, a.language, a.hits' . + ', a.publish_up, a.publish_down' ) ); $query->from('#__content AS a'); @@ -221,10 +234,18 @@ protected function getListQuery() } // Filter by access level. - if ($access = $this->getState('filter.access')) + $access = $this->getState('filter.access'); + + if (is_numeric($access)) { $query->where('a.access = ' . (int) $access); } + elseif (is_array($access)) + { + $access = ArrayHelper::toInteger($access); + $access = implode(',', $access); + $query->where('a.access IN (' . $access . ')'); + } // Filter by access level on categories. if (!$user->authorise('core.admin')) @@ -246,29 +267,38 @@ protected function getListQuery() $query->where('(a.state = 0 OR a.state = 1)'); } - // Filter by a single or group of categories. - $baselevel = 1; - $categoryId = $this->getState('filter.category_id'); + // Filter by categories and by level + $categoryId = $this->getState('filter.category_id', array()); + $level = $this->getState('filter.level'); - if (is_numeric($categoryId)) + if (!is_array($categoryId)) { - $categoryTable= JTable::getInstance('Category', 'JTable'); - $categoryTable->load($categoryId); - $rgt = $categoryTable->rgt; - $lft = $categoryTable->lft; - $baselevel = (int) $categoryTable->level; - $query->where('c.lft >= ' . (int) $lft) - ->where('c.rgt <= ' . (int) $rgt); + $categoryId = $categoryId ? array($categoryId) : array(); } - elseif (is_array($categoryId)) + + // Case: Using both categories filter and by level filter + if (count($categoryId)) { - $query->where('a.catid IN (' . implode(',', ArrayHelper::toInteger($categoryId)) . ')'); + $categoryId = ArrayHelper::toInteger($categoryId); + $categoryTable = JTable::getInstance('Category', 'JTable'); + $subCatItemsWhere = array(); + + foreach ($categoryId as $filter_catid) + { + $categoryTable->load($filter_catid); + $subCatItemsWhere[] = '(' . + ($level ? 'c.level <= ' . ((int) $level + (int) $categoryTable->level - 1) . ' AND ' : '') . + 'c.lft >= ' . (int) $categoryTable->lft . ' AND ' . + 'c.rgt <= ' . (int) $categoryTable->rgt . ')'; + } + + $query->where('(' . implode(' OR ', $subCatItemsWhere) . ')'); } - // Filter on the level. - if ($level = $this->getState('filter.level')) + // Case: Using only the by level filter + elseif ($level) { - $query->where('c.level <= ' . ((int) $level + (int) $baselevel - 1)); + $query->where('c.level <= ' . (int) $level); } // Filter by author @@ -279,6 +309,12 @@ protected function getListQuery() $type = $this->getState('filter.author_id.include', true) ? '= ' : '<>'; $query->where('a.created_by ' . $type . (int) $authorId); } + elseif (is_array($authorId)) + { + $authorId = ArrayHelper::toInteger($authorId); + $authorId = implode(',', $authorId); + $query->where('a.created_by IN (' . $authorId . ')'); + } // Filter by search in title. $search = $this->getState('filter.search'); @@ -307,30 +343,41 @@ protected function getListQuery() $query->where('a.language = ' . $db->quote($language)); } - // Filter by a single tag. - $tagId = $this->getState('filter.tag'); + // Filter by a single or group of tags. + $hasTag = false; + $tagId = $this->getState('filter.tag'); if (is_numeric($tagId)) { - $query->where($db->quoteName('tagmap.tag_id') . ' = ' . (int) $tagId) - ->join( - 'LEFT', - $db->quoteName('#__contentitem_tag_map', 'tagmap') - . ' ON ' . $db->quoteName('tagmap.content_item_id') . ' = ' . $db->quoteName('a.id') - . ' AND ' . $db->quoteName('tagmap.type_alias') . ' = ' . $db->quote('com_content.article') - ); + $hasTag = true; + + $query->where($db->quoteName('tagmap.tag_id') . ' = ' . (int) $tagId); } + elseif (is_array($tagId)) + { + $tagId = ArrayHelper::toInteger($tagId); + $tagId = implode(',', $tagId); - // Add the list ordering clause. - $orderCol = $this->state->get('list.fullordering', 'a.id'); - $orderDirn = ''; + if (!empty($tagId)) + { + $hasTag = true; + + $query->where($db->quoteName('tagmap.tag_id') . ' IN (' . $tagId . ')'); + } + } - if (empty($orderCol)) + if ($hasTag) { - $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'DESC'); + $query->join('LEFT', $db->quoteName('#__contentitem_tag_map', 'tagmap') + . ' ON ' . $db->quoteName('tagmap.content_item_id') . ' = ' . $db->quoteName('a.id') + . ' AND ' . $db->quoteName('tagmap.type_alias') . ' = ' . $db->quote('com_content.article') + ); } + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'DESC'); + $query->order($db->escape($orderCol) . ' ' . $db->escape($orderDirn)); return $query; @@ -346,7 +393,7 @@ protected function getListQuery() public function getAuthors() { // Create a new query object. - $db = $this->getDbo(); + $db = $this->getDbo(); $query = $db->getQuery(true); // Construct the query @@ -379,7 +426,7 @@ public function getItems() { $groups = JFactory::getUser()->getAuthorisedViewLevels(); - for ($x = 0, $count = count($items); $x < $count; $x++) + foreach (array_keys($items) as $x) { // Check the access level. Remove articles the user shouldn't see if (!in_array($items[$x]->access, $groups)) diff --git a/administrator/components/com_content/models/feature.php b/administrator/components/com_content/models/feature.php index 69fe1346bcc27..34f0c2ed6cdef 100644 --- a/administrator/components/com_content/models/feature.php +++ b/administrator/components/com_content/models/feature.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_content/models/featured.php b/administrator/components/com_content/models/featured.php index 1293c1abacc2a..944126fd52335 100644 --- a/administrator/components/com_content/models/featured.php +++ b/administrator/components/com_content/models/featured.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -55,7 +55,8 @@ public function __construct($config = array()) 'author_id', 'category_id', 'level', - 'tag' + 'tag', + 'rating_count', 'rating', ); } @@ -81,7 +82,7 @@ protected function getListQuery() $this->getState( 'list.select', 'a.id, a.title, a.alias, a.checked_out, a.checked_out_time, a.catid, a.state, a.access, a.created, a.hits,' . - 'a.featured, a.language, a.created_by_alias, a.publish_up, a.publish_down' + 'a.created_by, a.featured, a.language, a.created_by_alias, a.publish_up, a.publish_down' ) ); $query->from('#__content AS a'); @@ -113,21 +114,30 @@ protected function getListQuery() // Join on voting table if (JPluginHelper::isEnabled('content', 'vote')) { - $query->select('COALESCE(NULLIF(ROUND(v.rating_sum / v.rating_count, 0), 0), 0) AS rating, + $query->select('COALESCE(NULLIF(ROUND(v.rating_sum / v.rating_count, 0), 0), 0) AS rating, COALESCE(NULLIF(v.rating_count, 0), 0) as rating_count') ->join('LEFT', '#__content_rating AS v ON a.id = v.content_id'); } // Filter by access level. - if ($access = $this->getState('filter.access')) + $access = $this->getState('filter.access'); + + if (is_numeric($access)) { $query->where('a.access = ' . (int) $access); } + elseif (is_array($access)) + { + $access = ArrayHelper::toInteger($access); + $access = implode(',', $access); + $query->where('a.access IN (' . $access . ')'); + } // Filter by access level on categories. if (!$user->authorise('core.admin')) { $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); $query->where('c.access IN (' . $groups . ')'); } @@ -177,6 +187,12 @@ protected function getListQuery() $type = $this->getState('filter.author_id.include', true) ? '= ' : '<>'; $query->where('a.created_by ' . $type . (int) $authorId); } + elseif (is_array($authorId)) + { + $authorId = ArrayHelper::toInteger($authorId); + $authorId = implode(',', $authorId); + $query->where('a.created_by IN (' . $authorId . ')'); + } // Filter by search in title. $search = $this->getState('filter.search'); @@ -205,30 +221,44 @@ protected function getListQuery() $query->where('a.language = ' . $db->quote($language)); } - // Filter by a single tag. + // Filter by a single or group of tags. $tagId = $this->getState('filter.tag'); - if (is_numeric($tagId)) + if (is_array($tagId) && count($tagId) === 1) { - $query->where($db->quoteName('tagmap.tag_id') . ' = ' . (int) $tagId) - ->join( - 'LEFT', - $db->quoteName('#__contentitem_tag_map', 'tagmap') - . ' ON ' . $db->quoteName('tagmap.content_item_id') . ' = ' . $db->quoteName('a.id') - . ' AND ' . $db->quoteName('tagmap.type_alias') . ' = ' . $db->quote('com_content.article') - ); + $tagId = current($tagId); } - // Add the list ordering clause. - $orderCol = $this->state->get('list.fullordering', 'a.title'); - $orderDirn = ''; + if (is_array($tagId)) + { + $tagId = implode(',', ArrayHelper::toInteger($tagId)); - if (empty($orderCol)) + if ($tagId) + { + $subQuery = $db->getQuery(true) + ->select('DISTINCT content_item_id') + ->from($db->quoteName('#__contentitem_tag_map')) + ->where('tag_id IN (' . $tagId . ')') + ->where('type_alias = ' . $db->quote('com_content.article')); + + $query->join('INNER', '(' . (string) $subQuery . ') AS tagmap ON tagmap.content_item_id = a.id'); + } + } + elseif ($tagId) { - $orderCol = $this->state->get('list.ordering', 'a.title'); - $orderDirn = $this->state->get('list.direction', 'ASC'); + $query->join( + 'INNER', + $db->quoteName('#__contentitem_tag_map', 'tagmap') + . ' ON tagmap.tag_id = ' . (int) $tagId + . ' AND tagmap.content_item_id = a.id' + . ' AND tagmap.type_alias = ' . $db->quote('com_content.article') + ); } + // Add the list ordering clause. + $orderCol = $this->state->get('list.ordering', 'a.title'); + $orderDirn = $this->state->get('list.direction', 'ASC'); + $query->order($db->escape($orderCol) . ' ' . $db->escape($orderDirn)); return $query; diff --git a/administrator/components/com_content/models/fields/modal/article.php b/administrator/components/com_content/models/fields/modal/article.php index 639db98ed1c5c..28934a3cc7131 100644 --- a/administrator/components/com_content/models/fields/modal/article.php +++ b/administrator/components/com_content/models/fields/modal/article.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_content/models/fields/voteradio.php b/administrator/components/com_content/models/fields/voteradio.php new file mode 100644 index 0000000000000..2a2d2a63bd16c --- /dev/null +++ b/administrator/components/com_content/models/fields/voteradio.php @@ -0,0 +1,58 @@ +
    - + - + - + required="true" + /> - + size="40" + /> - - - - - - - - - + size="45" + /> + + + + + + + + - - + default="" + /> - - + /> + /> - + filter="user_utc" + /> - + - + - + filter="user_utc" + /> - + - + - + - + filter="user_utc" + /> - + filter="user_utc" + /> - + - + - + - + - + - + - + > - + > -
    @@ -166,19 +272,22 @@
    - @@ -188,40 +297,42 @@ - - + @@ -246,10 +357,10 @@ @@ -258,10 +369,10 @@ @@ -270,10 +381,10 @@ @@ -282,10 +393,10 @@ @@ -294,9 +405,9 @@ @@ -306,10 +417,10 @@ @@ -318,10 +429,10 @@ @@ -330,10 +441,10 @@ @@ -342,10 +453,10 @@ @@ -354,9 +465,9 @@ @@ -366,10 +477,10 @@ @@ -378,10 +489,10 @@ @@ -390,10 +501,10 @@ @@ -402,10 +513,10 @@ @@ -414,10 +525,10 @@ @@ -426,10 +537,10 @@ @@ -438,10 +549,10 @@ @@ -450,10 +561,10 @@ @@ -465,63 +576,71 @@ hr="true" /> - + size="25" + /> - - + size="25" + />
    + + + @@ -534,140 +653,145 @@ type="hidden" label="JGLOBAL_SHOW_TITLE_LABEL" description="JGLOBAL_SHOW_TITLE_DESC" - > - + /> - + description="JGLOBAL_LINKED_TITLES_DESC" + /> - - + description="JGLOBAL_SHOW_INTRO_DESC" + /> - + description="JGLOBAL_SHOW_CATEGORY_DESC" + /> - + description="JGLOBAL_LINK_CATEGORY_DESC" + /> - + description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC" + /> - + description="JGLOBAL_LINK_PARENT_CATEGORY_DESC" + /> - + description="JGLOBAL_SHOW_AUTHOR_DESC" + /> - + description="JGLOBAL_LINK_AUTHOR_DESC" + /> - + description="JGLOBAL_SHOW_CREATE_DATE_DESC" + /> - + description="JGLOBAL_SHOW_MODIFY_DATE_DESC" + /> - + description="JGLOBAL_SHOW_PUBLISH_DATE_DESC" + /> - + description="JGLOBAL_SHOW_NAVIGATION_DESC" + /> - + description="JGLOBAL_SHOW_ICONS_DESC" + /> - + description="JGLOBAL_SHOW_PRINT_ICON_DESC" + /> - + description="JGLOBAL_SHOW_EMAIL_ICON_DESC" + /> + - + /> + - + description="JGLOBAL_SHOW_HITS_DESC" + /> - + description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC" + /> - + size="25" + /> - - + size="20" + /> + description="COM_CONTENT_FIELD_INTRO_DESC" + /> + COM_CONTENT_LEFT - - + + + size="20" + /> + + /> + + description="COM_CONTENT_FIELD_FULL_DESC" + /> + COM_CONTENT_LEFT - - + + + size="20" + /> - + + + size="20" + /> + JBROWSERTARGET_POPUP + + /> + - + + + size="20" + /> + JBROWSERTARGET_POPUP + + /> + + /> + + size="20" + /> + - JGLOBAL_NOINDEX_NOFOLLOW - + - - + + + size="20" + />
    - - + + +
    diff --git a/administrator/components/com_content/models/forms/filter_articles.xml b/administrator/components/com_content/models/forms/filter_articles.xml index 3ac0fcdbbdcc8..2e1995ca81e10 100644 --- a/administrator/components/com_content/models/forms/filter_articles.xml +++ b/administrator/components/com_content/models/forms/filter_articles.xml @@ -8,6 +8,7 @@ description="COM_CONTENT_FILTER_SEARCH_DESC" hint="JSEARCH_FILTER" /> + + - - + /> + + + - + - - - + JOPTION_SELECT_LANGUAGE + - - - - - + /> + + + + + + JGRID_HEADING_LANGUAGE_DESC + + @@ -123,13 +136,14 @@ + diff --git a/administrator/components/com_content/models/forms/filter_featured.xml b/administrator/components/com_content/models/forms/filter_featured.xml index 2f7f1a9621a33..79bbe00fa71c3 100644 --- a/administrator/components/com_content/models/forms/filter_featured.xml +++ b/administrator/components/com_content/models/forms/filter_featured.xml @@ -8,6 +8,7 @@ description="COM_CONTENT_FILTER_SEARCH_DESC" hint="JSEARCH_FILTER" /> + + + + - + + + + - + - - - + JOPTION_SELECT_LANGUAGE + - - - - - + /> + JGRID_HEADING_ID_ASC + diff --git a/administrator/components/com_content/tables/featured.php b/administrator/components/com_content/tables/featured.php index b472a692d7d38..2a1d4808afefd 100644 --- a/administrator/components/com_content/tables/featured.php +++ b/administrator/components/com_content/tables/featured.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -19,7 +19,7 @@ class ContentTableFeatured extends JTable /** * Constructor * - * @param JDatabaseDriver &$db Database connector object + * @param JDatabaseDriver $db Database connector object * * @since 1.6 */ diff --git a/administrator/components/com_content/views/article/tmpl/edit.php b/administrator/components/com_content/views/article/tmpl/edit.php index 0c556a40c7d60..4e0a15cab02a2 100644 --- a/administrator/components/com_content/views/article/tmpl/edit.php +++ b/administrator/components/com_content/views/article/tmpl/edit.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -24,7 +24,7 @@ $this->ignore_fieldsets = array('jmetadata', 'item_associations'); // Create shortcut to parameters. -$params = clone($this->state->get('params')); +$params = clone $this->state->get('params'); $params->merge(new Registry($this->item->attribs)); $app = JFactory::getApplication(); diff --git a/administrator/components/com_content/views/article/tmpl/edit_associations.php b/administrator/components/com_content/views/article/tmpl/edit_associations.php index 76cd3dd2e934f..9638336872009 100644 --- a/administrator/components/com_content/views/article/tmpl/edit_associations.php +++ b/administrator/components/com_content/views/article/tmpl/edit_associations.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_content/views/article/tmpl/edit_metadata.php b/administrator/components/com_content/views/article/tmpl/edit_metadata.php index 8560b8731de23..764ea0ee1a9c2 100644 --- a/administrator/components/com_content/views/article/tmpl/edit_metadata.php +++ b/administrator/components/com_content/views/article/tmpl/edit_metadata.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_content/views/article/tmpl/modal.php b/administrator/components/com_content/views/article/tmpl/modal.php index 84b0775f5a2a0..28dfda203796b 100644 --- a/administrator/components/com_content/views/article/tmpl/modal.php +++ b/administrator/components/com_content/views/article/tmpl/modal.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_content/views/article/tmpl/modal_associations.php b/administrator/components/com_content/views/article/tmpl/modal_associations.php index 76cd3dd2e934f..9638336872009 100644 --- a/administrator/components/com_content/views/article/tmpl/modal_associations.php +++ b/administrator/components/com_content/views/article/tmpl/modal_associations.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_content/views/article/tmpl/modal_metadata.php b/administrator/components/com_content/views/article/tmpl/modal_metadata.php index 8560b8731de23..764ea0ee1a9c2 100644 --- a/administrator/components/com_content/views/article/tmpl/modal_metadata.php +++ b/administrator/components/com_content/views/article/tmpl/modal_metadata.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_content/views/article/tmpl/pagebreak.php b/administrator/components/com_content/views/article/tmpl/pagebreak.php index 2941fa70722e0..a9684c5ae3508 100644 --- a/administrator/components/com_content/views/article/tmpl/pagebreak.php +++ b/administrator/components/com_content/views/article/tmpl/pagebreak.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_content/views/article/view.html.php b/administrator/components/com_content/views/article/view.html.php index 4a3154fbb5161..f0bfabc687c40 100644 --- a/administrator/components/com_content/views/article/view.html.php +++ b/administrator/components/com_content/views/article/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -57,7 +57,6 @@ public function display($tpl = null) { if ($this->getLayout() == 'pagebreak') { - return parent::display($tpl); } @@ -69,9 +68,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } // If we are forcing a language in modal (used for associations). diff --git a/administrator/components/com_content/views/articles/tmpl/default.php b/administrator/components/com_content/views/articles/tmpl/default.php index a06d75f48f795..14d5f48f0c6b9 100644 --- a/administrator/components/com_content/views/articles/tmpl/default.php +++ b/administrator/components/com_content/views/articles/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -13,12 +13,16 @@ JHtml::_('bootstrap.tooltip'); JHtml::_('behavior.multiselect'); +JHtml::_('formbehavior.chosen', '.multipleTags', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_TAG'))); +JHtml::_('formbehavior.chosen', '.multipleCategories', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_CATEGORY'))); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_ACCESS'))); +JHtml::_('formbehavior.chosen', '.multipleAuthors', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_AUTHOR'))); JHtml::_('formbehavior.chosen', 'select'); $app = JFactory::getApplication(); $user = JFactory::getUser(); $userId = $user->get('id'); -$listOrder = str_replace(' ' . $this->state->get('list.direction'), '', $this->state->get('list.fullordering')); +$listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $saveOrder = $listOrder == 'a.ordering'; $columns = 10; @@ -31,6 +35,10 @@ { $orderingColumn = 'publish_down'; } +elseif (strpos($listOrder, 'modified') !== false) +{ + $orderingColumn = 'modified'; +} else { $orderingColumn = 'created'; @@ -147,7 +155,7 @@ - + @@ -172,11 +180,6 @@ checked_out) : ?> editor, $item->checked_out_time, 'articles.', $canCheckin); ?> - language == '*') : ?> - - - language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> - escape($item->title); ?> @@ -202,13 +205,22 @@ - created_by_alias) : ?> - - escape($item->author_name); ?> -
    escape($item->created_by_alias)); ?>
    + created_by != 0) : ?> + created_by_alias) : ?> + + escape($item->author_name); ?> +
    escape($item->created_by_alias)); ?>
    + + + escape($item->author_name); ?> + - - escape($item->author_name); ?> + created_by_alias) : ?> + +
    escape($item->created_by_alias)); ?>
    + + + @@ -252,8 +264,8 @@ 'bootstrap.renderModal', 'collapseModal', array( - 'title' => JText::_('COM_CONTENT_BATCH_OPTIONS'), - 'footer' => $this->loadTemplate('batch_footer') + 'title' => JText::_('COM_CONTENT_BATCH_OPTIONS'), + 'footer' => $this->loadTemplate('batch_footer'), ), $this->loadTemplate('batch_body') ); ?> diff --git a/administrator/components/com_content/views/articles/tmpl/default_batch_body.php b/administrator/components/com_content/views/articles/tmpl/default_batch_body.php index 0e4b61a3e5aba..73afe728bfa56 100644 --- a/administrator/components/com_content/views/articles/tmpl/default_batch_body.php +++ b/administrator/components/com_content/views/articles/tmpl/default_batch_body.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_content/views/articles/tmpl/default_batch_footer.php b/administrator/components/com_content/views/articles/tmpl/default_batch_footer.php index d31131ee2c927..5be5d8c979435 100644 --- a/administrator/components/com_content/views/articles/tmpl/default_batch_footer.php +++ b/administrator/components/com_content/views/articles/tmpl/default_batch_footer.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_content/views/articles/tmpl/modal.php b/administrator/components/com_content/views/articles/tmpl/modal.php index 686b71450018d..1ccce20f6e1f0 100644 --- a/administrator/components/com_content/views/articles/tmpl/modal.php +++ b/administrator/components/com_content/views/articles/tmpl/modal.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -25,6 +25,12 @@ JHtml::_('behavior.polyfill', array('event'), 'lt IE 9'); JHtml::_('script', 'com_content/admin-articles-modal.min.js', array('version' => 'auto', 'relative' => true)); JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); +JHtml::_('bootstrap.popover', '.hasPopover', array('placement' => 'bottom')); +JHtml::_('behavior.multiselect'); +JHtml::_('formbehavior.chosen', '.multipleTags', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_TAG'))); +JHtml::_('formbehavior.chosen', '.multipleCategories', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_CATEGORY'))); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_ACCESS'))); +JHtml::_('formbehavior.chosen', '.multipleAuthors', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_AUTHOR'))); JHtml::_('formbehavior.chosen', 'select'); // Special case for the search field tooltip. @@ -91,9 +97,9 @@ 'icon-trash', - 0 => 'icon-unpublish', - 1 => 'icon-publish', - 2 => 'icon-archive', + 0 => 'icon-unpublish', + 1 => 'icon-publish', + 2 => 'icon-archive', ); ?> items as $i => $item) : ?> @@ -119,12 +125,12 @@ ?> - + escape($onclick) . '"' . ' data-id="' . $item->id . '"' - . ' data-title="' . $this->escape(addslashes($item->title)) . '"' + . ' data-title="' . $this->escape($item->title) . '"' . ' data-cat-id="' . $this->escape($item->catid) . '"' . ' data-uri="' . $this->escape(ContentHelperRoute::getArticleRoute($item->id, $item->catid, $item->language)) . '"' . ' data-language="' . $this->escape($lang) . '"'; diff --git a/administrator/components/com_content/views/articles/view.html.php b/administrator/components/com_content/views/articles/view.html.php index 76b97bddcdc3c..3ce0edcb5fe10 100644 --- a/administrator/components/com_content/views/articles/view.html.php +++ b/administrator/components/com_content/views/articles/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -90,12 +90,11 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } // Levels filter - Used in Hathor. + // @deprecated 4.0 To be removed with Hathor $this->f_levels = array( JHtml::_('select.option', '1', JText::_('J1')), JHtml::_('select.option', '2', JText::_('J2')), @@ -121,7 +120,7 @@ public function display($tpl = null) // We also need to change the category filter to show show categories with All or the forced language. if ($forcedLanguage = JFactory::getApplication()->input->get('forcedLanguage', '', 'CMD')) { - // If the language is forced we can't allow to select the language, so transform the language selector filter into an hidden field. + // If the language is forced we can't allow to select the language, so transform the language selector filter into a hidden field. $languageXml = new SimpleXMLElement(''); $this->filterForm->setField($languageXml, 'filter', true); @@ -153,12 +152,12 @@ protected function addToolbar() JToolbarHelper::title(JText::_('COM_CONTENT_ARTICLES_TITLE'), 'stack article'); - if ($canDo->get('core.create') || (count($user->getAuthorisedCategories('com_content', 'core.create'))) > 0) + if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_content', 'core.create')) > 0) { JToolbarHelper::addNew('article.add'); } - if (($canDo->get('core.edit')) || ($canDo->get('core.edit.own'))) + if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) { JToolbarHelper::editList('article.edit'); } diff --git a/administrator/components/com_content/views/featured/tmpl/default.php b/administrator/components/com_content/views/featured/tmpl/default.php index 4c41a9168e3b5..b6124c6e38a45 100644 --- a/administrator/components/com_content/views/featured/tmpl/default.php +++ b/administrator/components/com_content/views/featured/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -13,11 +13,15 @@ JHtml::_('bootstrap.tooltip'); JHtml::_('behavior.multiselect'); +JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_ACCESS'))); +JHtml::_('formbehavior.chosen', '.multipleAuthors', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_AUTHOR'))); +JHtml::_('formbehavior.chosen', '.multipleCategories', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_CATEGORY'))); +JHtml::_('formbehavior.chosen', '.multipleTags', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_TAG'))); JHtml::_('formbehavior.chosen', 'select'); $user = JFactory::getUser(); $userId = $user->get('id'); -$listOrder = str_replace(' ' . $this->state->get('list.direction'), '', $this->state->get('list.fullordering')); +$listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $saveOrder = $listOrder == 'fp.ordering'; $columns = 10; @@ -141,7 +145,7 @@ - + @@ -166,11 +170,6 @@ checked_out) : ?> editor, $item->checked_out_time, 'articles.', $canCheckin); ?> - language == '*') : ?> - - - language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> - escape($item->title); ?> @@ -189,11 +188,22 @@ escape($item->access_level); ?> - created_by_alias) : ?> - escape($item->author_name); ?> -

    escape($item->created_by_alias)); ?>

    + created_by != 0) : ?> + created_by_alias) : ?> + + escape($item->author_name); ?> +
    escape($item->created_by_alias)); ?>
    + + + escape($item->author_name); ?> + - escape($item->author_name); ?> + created_by_alias) : ?> + +
    escape($item->created_by_alias)); ?>
    + + + @@ -203,7 +213,8 @@ {$orderingColumn}; echo $date > 0 ? JHtml::_('date', $date, JText::_('DATE_FORMAT_LC4')) : '-'; - ?> + ?> + hits; ?> diff --git a/administrator/components/com_content/views/featured/view.html.php b/administrator/components/com_content/views/featured/view.html.php index 0fbd1bd3aa920..3a213b011cf35 100644 --- a/administrator/components/com_content/views/featured/view.html.php +++ b/administrator/components/com_content/views/featured/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_content * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -87,12 +87,11 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } // Levels filter - Used in Hathor. + // @deprecated 4.0 To be removed with Hathor $this->f_levels = array( JHtml::_('select.option', '1', JText::_('J1')), JHtml::_('select.option', '2', JText::_('J2')), @@ -172,15 +171,15 @@ protected function addToolbar() protected function getSortFields() { return array( - 'fp.ordering' => JText::_('JGRID_HEADING_ORDERING'), - 'a.state' => JText::_('JSTATUS'), - 'a.title' => JText::_('JGLOBAL_TITLE'), + 'fp.ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.state' => JText::_('JSTATUS'), + 'a.title' => JText::_('JGLOBAL_TITLE'), 'category_title' => JText::_('JCATEGORY'), - 'access_level' => JText::_('JGRID_HEADING_ACCESS'), - 'a.created_by' => JText::_('JAUTHOR'), - 'language' => JText::_('JGRID_HEADING_LANGUAGE'), - 'a.created' => JText::_('JDATE'), - 'a.id' => JText::_('JGRID_HEADING_ID') + 'access_level' => JText::_('JGRID_HEADING_ACCESS'), + 'a.created_by' => JText::_('JAUTHOR'), + 'language' => JText::_('JGRID_HEADING_LANGUAGE'), + 'a.created' => JText::_('JDATE'), + 'a.id' => JText::_('JGRID_HEADING_ID'), ); } } diff --git a/administrator/components/com_contenthistory/contenthistory.php b/administrator/components/com_contenthistory/contenthistory.php index e77df780dbc03..e7308dd000ed4 100644 --- a/administrator/components/com_contenthistory/contenthistory.php +++ b/administrator/components/com_contenthistory/contenthistory.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contenthistory * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contenthistory/contenthistory.xml b/administrator/components/com_contenthistory/contenthistory.xml index 3053b02441307..1e878284c7d14 100644 --- a/administrator/components/com_contenthistory/contenthistory.xml +++ b/administrator/components/com_contenthistory/contenthistory.xml @@ -3,7 +3,7 @@ com_contenthistory Joomla! Project May 2013 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_contenthistory/controller.php b/administrator/components/com_contenthistory/controller.php index e7187bb833463..fb828a28bb64a 100644 --- a/administrator/components/com_contenthistory/controller.php +++ b/administrator/components/com_contenthistory/controller.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contenthistory * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contenthistory/controllers/history.php b/administrator/components/com_contenthistory/controllers/history.php index a41d010d73ad5..1802a9431bb5e 100644 --- a/administrator/components/com_contenthistory/controllers/history.php +++ b/administrator/components/com_contenthistory/controllers/history.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contenthistory * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contenthistory/controllers/preview.php b/administrator/components/com_contenthistory/controllers/preview.php index 2d18cbe9ef611..1f926454130f3 100644 --- a/administrator/components/com_contenthistory/controllers/preview.php +++ b/administrator/components/com_contenthistory/controllers/preview.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contenthistory * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contenthistory/helpers/contenthistory.php b/administrator/components/com_contenthistory/helpers/contenthistory.php index 5b4d971fdb0f3..9077ef75b88a2 100644 --- a/administrator/components/com_contenthistory/helpers/contenthistory.php +++ b/administrator/components/com_contenthistory/helpers/contenthistory.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contenthistory * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -29,6 +29,11 @@ public static function createObjectArray($object) { $result = array(); + if ($object === null) + { + return $result; + } + foreach ($object as $name => $value) { $result[$name] = $value; @@ -289,6 +294,11 @@ public static function mergeLabels($object, $formValues) { $result = new stdClass; + if ($object === null) + { + return $result; + } + $labelsArray = $formValues->labels; $valuesArray = $formValues->values; diff --git a/administrator/components/com_contenthistory/helpers/html/textdiff.php b/administrator/components/com_contenthistory/helpers/html/textdiff.php index 3b34ac97eca50..c81a9c3e7d87b 100644 --- a/administrator/components/com_contenthistory/helpers/html/textdiff.php +++ b/administrator/components/com_contenthistory/helpers/html/textdiff.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_contenthistory * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_PLATFORM') or die; diff --git a/administrator/components/com_contenthistory/models/compare.php b/administrator/components/com_contenthistory/models/compare.php index e753b3cc788c7..8221ec7e861f4 100644 --- a/administrator/components/com_contenthistory/models/compare.php +++ b/administrator/components/com_contenthistory/models/compare.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contenthistory * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -76,7 +76,7 @@ public function getItems() $object->version_note = $table->version_note; // Let's use custom calendars when present - $object->save_date = JHtml::_('date', $table->save_date, 'Y-m-d H:i:s'); + $object->save_date = JHtml::_('date', $table->save_date, JText::_('DATE_FORMAT_LC6')); $dateProperties = array ( 'modified_time', @@ -92,7 +92,7 @@ public function getItems() { if (array_key_exists($dateProperty, $object->data) && $object->data->$dateProperty->value != '0000-00-00 00:00:00') { - $object->data->$dateProperty->value = JHtml::_('date', $object->data->$dateProperty->value, 'Y-m-d H:i:s'); + $object->data->$dateProperty->value = JHtml::_('date', $object->data->$dateProperty->value, JText::_('DATE_FORMAT_LC6')); } } diff --git a/administrator/components/com_contenthistory/models/history.php b/administrator/components/com_contenthistory/models/history.php index 166b5927cc4dd..84c24b84864a5 100644 --- a/administrator/components/com_contenthistory/models/history.php +++ b/administrator/components/com_contenthistory/models/history.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contenthistory * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -104,7 +104,7 @@ protected function canDelete($record) /** * Method to delete one or more records from content history table. * - * @param array &$pks An array of record primary keys. + * @param array $pks An array of record primary keys. * * @return boolean True if successful, false if an error occurs. * @@ -120,6 +120,12 @@ public function delete(&$pks) { if ($table->load($pk)) { + if ($table->keep_forever === "1") + { + unset($pks[$i]); + continue; + } + if ($this->canEdit($table)) { if (!$table->delete($pk)) @@ -243,7 +249,7 @@ public function getTable($type = 'Contenthistory', $prefix = 'JTable', $config = /** * Method to toggle on and off the keep forever value for one or more records from content history table. * - * @param array &$pks An array of record primary keys. + * @param array $pks An array of record primary keys. * * @return boolean True if successful, false if an error occurs. * diff --git a/administrator/components/com_contenthistory/models/preview.php b/administrator/components/com_contenthistory/models/preview.php index 334da24e88659..267aafa53a459 100644 --- a/administrator/components/com_contenthistory/models/preview.php +++ b/administrator/components/com_contenthistory/models/preview.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contenthistory * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -68,7 +68,7 @@ public function getItem() $result->data = ContenthistoryHelper::prepareData($table); // Let's use custom calendars when present - $result->save_date = JHtml::_('date', $table->save_date, 'Y-m-d H:i:s'); + $result->save_date = JHtml::_('date', $table->save_date, JText::_('DATE_FORMAT_LC6')); $dateProperties = array ( 'modified_time', @@ -84,7 +84,7 @@ public function getItem() { if (array_key_exists($dateProperty, $result->data) && $result->data->$dateProperty->value != '0000-00-00 00:00:00') { - $result->data->$dateProperty->value = JHtml::_('date', $result->data->$dateProperty->value, 'Y-m-d H:i:s'); + $result->data->$dateProperty->value = JHtml::_('date', $result->data->$dateProperty->value, JText::_('DATE_FORMAT_LC6')); } } diff --git a/administrator/components/com_contenthistory/views/compare/tmpl/compare.php b/administrator/components/com_contenthistory/views/compare/tmpl/compare.php index 84fb6ae42a968..2b7db450efb34 100644 --- a/administrator/components/com_contenthistory/views/compare/tmpl/compare.php +++ b/administrator/components/com_contenthistory/views/compare/tmpl/compare.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contenthistory * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contenthistory/views/compare/view.html.php b/administrator/components/com_contenthistory/views/compare/view.html.php index 701242388f6a0..59d2718c1d65e 100644 --- a/administrator/components/com_contenthistory/views/compare/view.html.php +++ b/administrator/components/com_contenthistory/views/compare/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contenthistory * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -37,9 +37,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } return parent::display($tpl); diff --git a/administrator/components/com_contenthistory/views/history/tmpl/modal.php b/administrator/components/com_contenthistory/views/history/tmpl/modal.php index 70da60d755d3a..4dc45a3c1fec2 100644 --- a/administrator/components/com_contenthistory/views/history/tmpl/modal.php +++ b/administrator/components/com_contenthistory/views/history/tmpl/modal.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contenthistory * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -91,15 +91,15 @@
    - - - - -
    @@ -147,7 +147,7 @@ - save_date, 'Y-m-d H:i:s'); ?> + save_date, JText::_('DATE_FORMAT_LC6')); ?> sha1_hash == $hash) : ?>   diff --git a/administrator/components/com_contenthistory/views/history/view.html.php b/administrator/components/com_contenthistory/views/history/view.html.php index a3596af43d3d3..0cb7e07870595 100644 --- a/administrator/components/com_contenthistory/views/history/view.html.php +++ b/administrator/components/com_contenthistory/views/history/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contenthistory * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -40,9 +40,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } return parent::display($tpl); diff --git a/administrator/components/com_contenthistory/views/preview/tmpl/preview.php b/administrator/components/com_contenthistory/views/preview/tmpl/preview.php index 5243c14f14bfb..540a635b4d317 100644 --- a/administrator/components/com_contenthistory/views/preview/tmpl/preview.php +++ b/administrator/components/com_contenthistory/views/preview/tmpl/preview.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contenthistory * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_contenthistory/views/preview/view.html.php b/administrator/components/com_contenthistory/views/preview/view.html.php index 726cbd4c9b87a..8b3a00b16e438 100644 --- a/administrator/components/com_contenthistory/views/preview/view.html.php +++ b/administrator/components/com_contenthistory/views/preview/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_contenthistory * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -46,9 +46,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } return parent::display($tpl); diff --git a/administrator/components/com_cpanel/controller.php b/administrator/components/com_cpanel/controller.php index 8b6415e5c56d0..88971f64bc608 100644 --- a/administrator/components/com_cpanel/controller.php +++ b/administrator/components/com_cpanel/controller.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_cpanel * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_cpanel/cpanel.php b/administrator/components/com_cpanel/cpanel.php index 69e7e5853586e..c075c62355510 100644 --- a/administrator/components/com_cpanel/cpanel.php +++ b/administrator/components/com_cpanel/cpanel.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_cpanel * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_cpanel/cpanel.xml b/administrator/components/com_cpanel/cpanel.xml index 4db0bcf6e3ced..ee09c6ee56243 100644 --- a/administrator/components/com_cpanel/cpanel.xml +++ b/administrator/components/com_cpanel/cpanel.xml @@ -3,7 +3,7 @@ com_cpanel Joomla! Project April 2006 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_cpanel/views/cpanel/tmpl/default.php b/administrator/components/com_cpanel/views/cpanel/tmpl/default.php index 6250e9d38af30..9d3551d32bfcb 100644 --- a/administrator/components/com_cpanel/views/cpanel/tmpl/default.php +++ b/administrator/components/com_cpanel/views/cpanel/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_cpanel * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -28,13 +28,13 @@
    -
    +
    authorise('core.manage', 'com_postinstall') && $this->postinstall_message_count) : ?>
    -

    +

    -

    +

    diff --git a/administrator/components/com_cpanel/views/cpanel/view.html.php b/administrator/components/com_cpanel/views/cpanel/view.html.php index 54e05b29a4da0..18e215b91326b 100644 --- a/administrator/components/com_cpanel/views/cpanel/view.html.php +++ b/administrator/components/com_cpanel/views/cpanel/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_cpanel * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_fields/controller.php b/administrator/components/com_fields/controller.php index b3bbeed9ff8ec..6acbf0a96c251 100644 --- a/administrator/components/com_fields/controller.php +++ b/administrator/components/com_fields/controller.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_fields/controllers/field.php b/administrator/components/com_fields/controllers/field.php index d2205e87d837a..3b6d8f90c4be7 100644 --- a/administrator/components/com_fields/controllers/field.php +++ b/administrator/components/com_fields/controllers/field.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -46,44 +46,6 @@ public function __construct($config = array()) $this->component = $parts ? $parts[0] : null; } - /** - * Stores the form data into the user state. - * - * @return void - * - * @since 3.7.0 - */ - public function storeform() - { - JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); - - $app = JFactory::getApplication(); - $data = $this->input->get($this->input->get('formcontrol', 'jform'), array(), 'array'); - - $parts = FieldsHelper::extract($this->input->getCmd('context')); - - if ($parts) - { - $app->setUserState($parts[0] . '.edit.' . $parts[1] . '.data', $data); - } - - if ($this->input->get('userstatevariable')) - { - $app->setUserState($this->input->get('userstatevariable'), $data); - } - - $redirectUrl = base64_decode($this->input->get->getBase64('return')); - - // Don't redirect to an external URL. - If (!JUri::isInternal($redirectUrl)) - { - $redirectUrl = 'index.php'; - } - - $app->redirect($redirectUrl); - $app->close(); - } - /** * Method override to check if you can add a new record. * @@ -111,12 +73,12 @@ protected function allowAdd($data = array()) protected function allowEdit($data = array(), $key = 'id') { $recordId = (int) isset($data[$key]) ? $data[$key] : 0; - $user = JFactory::getUser(); + $user = JFactory::getUser(); - // Check general edit permission first. - if ($user->authorise('core.edit', $this->component)) + // Zero record (id:0), return component edit permission by calling parent controller method + if (!$recordId) { - return true; + return parent::allowEdit($data, $key); } // Check edit on the record asset (explicit or inherited) diff --git a/administrator/components/com_fields/controllers/fields.php b/administrator/components/com_fields/controllers/fields.php index 5d98d5a14c3b3..d6429e2756bac 100644 --- a/administrator/components/com_fields/controllers/fields.php +++ b/administrator/components/com_fields/controllers/fields.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_fields/controllers/group.php b/administrator/components/com_fields/controllers/group.php index aa3277e258838..d2e9a21bce9db 100644 --- a/administrator/components/com_fields/controllers/group.php +++ b/administrator/components/com_fields/controllers/group.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -104,10 +104,10 @@ protected function allowEdit($data = array(), $key = 'parent_id') $recordId = (int) isset($data[$key]) ? $data[$key] : 0; $user = JFactory::getUser(); - // Check general edit permission first. - if ($user->authorise('core.edit', $this->component)) + // Zero record (parent_id:0), return component edit permission by calling parent controller method + if (!$recordId) { - return true; + return parent::allowEdit($data, $key); } // Check edit on the record asset (explicit or inherited) diff --git a/administrator/components/com_fields/controllers/groups.php b/administrator/components/com_fields/controllers/groups.php index 8b051a1fb13e9..b2fb9a30c1ff9 100644 --- a/administrator/components/com_fields/controllers/groups.php +++ b/administrator/components/com_fields/controllers/groups.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_fields/fields.php b/administrator/components/com_fields/fields.php index ef0dbf01d9c9a..7e0d4eafb7f31 100644 --- a/administrator/components/com_fields/fields.php +++ b/administrator/components/com_fields/fields.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -22,7 +22,7 @@ if (!$parts || !JFactory::getUser()->authorise('core.manage', $parts[0])) { - return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); + throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403); } $controller = JControllerLegacy::getInstance('Fields'); diff --git a/administrator/components/com_fields/fields.xml b/administrator/components/com_fields/fields.xml index 63bdec64a3986..9920c0a5ad6c6 100644 --- a/administrator/components/com_fields/fields.xml +++ b/administrator/components/com_fields/fields.xml @@ -3,7 +3,7 @@ com_fields Joomla! Project March 2016 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_fields/helpers/fields.php b/administrator/components/com_fields/helpers/fields.php index aedb4666112b0..f58c295fa2259 100644 --- a/administrator/components/com_fields/helpers/fields.php +++ b/administrator/components/com_fields/helpers/fields.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -79,7 +79,7 @@ public static function extract($contextString, $item = null) * * @param string $context The context of the content passed to the helper * @param stdClass $item item - * @param boolean $prepareValue prepareValue + * @param int|bool $prepareValue (if int is display event): 1 - AfterTitle, 2 - BeforeDisplay, 3 - AfterDisplay, 0 - OFF * @param array $valuesToOverride The values to override * * @return array @@ -106,10 +106,12 @@ public static function getFields($context, $item = null, $prepareValue = false, { $item = (object) $item; } - if (JLanguageMultilang::isEnabled() && isset($item->language) && $item->language !='*') + + if (JLanguageMultilang::isEnabled() && isset($item->language) && $item->language != '*') { self::$fieldsCache->setState('filter.language', array('*', $item->language)); } + self::$fieldsCache->setState('filter.context', $context); /* @@ -146,7 +148,7 @@ public static function getFields($context, $item = null, $prepareValue = false, } $fieldIds = array_map( - function($f) + function ($f) { return $f->id; }, @@ -185,7 +187,8 @@ function($f) $field->rawvalue = $field->value; - if ($prepareValue) + // If boolean prepare, if int, it is the event type: 1 - After Title, 2 - Before Display, 3 - After Display, 0 - Do not prepare + if ($prepareValue && (is_bool($prepareValue) || $prepareValue === (int) $field->params->get('display', '2'))) { JPluginHelper::importPlugin('fields'); @@ -199,7 +202,7 @@ function($f) if (is_array($value)) { - $value = implode($value, ' '); + $value = implode(' ', $value); } // Event allow plugins to modfify the output of the prepared field @@ -277,6 +280,8 @@ public static function prepareForm($context, JForm $form, $data) return true; } + $context = $parts[0] . '.' . $parts[1]; + // When no fields available return here $fields = self::getFields($parts[0] . '.' . $parts[1], new JObject); @@ -290,6 +295,11 @@ public static function prepareForm($context, JForm $form, $data) $assignedCatids = isset($data->catid) ? $data->catid : (isset($data->fieldscatid) ? $data->fieldscatid : $form->getValue('catid')); + // Account for case that a submitted form has a multi-value category id field (e.g. a filtering form), just use the first category + $assignedCatids = is_array($assignedCatids) + ? (int) reset($assignedCatids) + : (int) $assignedCatids; + if (!$assignedCatids && $formField = $form->getField('catid')) { $assignedCatids = $formField->getAttribute('default', null); @@ -303,6 +313,7 @@ public static function prepareForm($context, JForm $form, $data) { $assignedCatids = $firstChoice->getAttribute('value'); } + $data->fieldscatid = $assignedCatids; } @@ -312,25 +323,6 @@ public static function prepareForm($context, JForm $form, $data) */ if ($form->getField('catid') && $parts[0] != 'com_fields') { - // The uri to submit to - $uri = clone JUri::getInstance('index.php'); - - /* - * Removing the catid parameter from the actual URL and set it as - * return - */ - $returnUri = clone JUri::getInstance(); - $returnUri->setVar('catid', null); - $uri->setVar('return', base64_encode($returnUri->toString())); - - // Setting the options - $uri->setVar('option', 'com_fields'); - $uri->setVar('task', 'field.storeform'); - $uri->setVar('context', $parts[0] . '.' . $parts[1]); - $uri->setVar('formcontrol', $form->getFormControl()); - $uri->setVar('view', null); - $uri->setVar('layout', null); - /* * Setting the onchange event to reload the page when the category * has changed @@ -340,18 +332,18 @@ public static function prepareForm($context, JForm $form, $data) // Preload spindle-wheel when we need to submit form due to category selector changed JFactory::getDocument()->addScriptDeclaration(" function categoryHasChanged(element) { - Joomla.loadingLayer('show'); var cat = jQuery(element); if (cat.val() == '" . $assignedCatids . "')return; - jQuery('input[name=task]').val('field.storeform'); - element.form.action='" . $uri . "'; + Joomla.loadingLayer('show'); + jQuery('input[name=task]').val('" . $section . ".reload'); element.form.submit(); } jQuery( document ).ready(function() { Joomla.loadingLayer('load'); var formControl = '#" . $form->getFormControl() . "_catid'; if (!jQuery(formControl).val() != '" . $assignedCatids . "'){jQuery(formControl).val('" . $assignedCatids . "');} - });"); + });" + ); } // Getting the fields @@ -403,10 +395,24 @@ function categoryHasChanged(element) { // On the front, sometimes the admin fields path is not included JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_fields/tables'); + $model = JModelLegacy::getInstance('Groups', 'FieldsModel', array('ignore_request' => true)); + $model->setState('filter.context', $context); + + /** + * $model->getItems() would only return existing groups, but we also + * have the 'default' group with id 0 which is not in the database, + * so we create it virtually here. + */ + $defaultGroup = new \stdClass; + $defaultGroup->id = 0; + $defaultGroup->title = ''; + $defaultGroup->description = ''; + $iterateGroups = array_merge(array($defaultGroup), $model->getItems()); + // Looping through the groups - foreach ($fieldsPerGroup as $group_id => $groupFields) + foreach ($iterateGroups as $group) { - if (!$groupFields) + if (empty($fieldsPerGroup[$group->id])) { continue; } @@ -414,49 +420,32 @@ function categoryHasChanged(element) { // Defining the field set /** @var DOMElement $fieldset */ $fieldset = $fieldsNode->appendChild(new DOMElement('fieldset')); - $fieldset->setAttribute('name', 'fields-' . $group_id); + $fieldset->setAttribute('name', 'fields-' . $group->id); $fieldset->setAttribute('addfieldpath', '/administrator/components/' . $component . '/models/fields'); $fieldset->setAttribute('addrulepath', '/administrator/components/' . $component . '/models/rules'); - $label = ''; - $description = ''; + $label = $group->title; + $description = $group->description; - if ($group_id) + if (!$label) { - $group = JTable::getInstance('Group', 'FieldsTable'); - $group->load($group_id); + $key = strtoupper($component . '_FIELDS_' . $section . '_LABEL'); - if ($group->id) + if (!JFactory::getLanguage()->hasKey($key)) { - $label = $group->title; - $description = $group->description; + $key = 'JGLOBAL_FIELDS'; } + + $label = $key; } - if (!$label || !$description) + if (!$description) { - $lang = JFactory::getLanguage(); + $key = strtoupper($component . '_FIELDS_' . $section . '_DESC'); - if (!$label) + if (JFactory::getLanguage()->hasKey($key)) { - $key = strtoupper($component . '_FIELDS_' . $section . '_LABEL'); - - if (!$lang->hasKey($key)) - { - $key = 'JGLOBAL_FIELDS'; - } - - $label = $key; - } - - if (!$description) - { - $key = strtoupper($component . '_FIELDS_' . $section . '_DESC'); - - if ($lang->hasKey($key)) - { - $description = $key; - } + $description = $key; } } @@ -464,11 +453,11 @@ function categoryHasChanged(element) { $fieldset->setAttribute('description', strip_tags($description)); // Looping through the fields for that context - foreach ($groupFields as $field) + foreach ($fieldsPerGroup[$group->id] as $field) { try { - JEventDispatcher::getInstance()->trigger('onCustomFieldsPrepareDom', array($field, $fieldset, $form)); + JFactory::getApplication()->triggerEvent('onCustomFieldsPrepareDom', array($field, $fieldset, $form)); /* * If the field belongs to an assigned_cat_id but the assigned_cat_ids in the data @@ -553,10 +542,56 @@ public static function canEditFieldValue($field) return JFactory::getUser()->authorise('core.edit.value', $parts[0] . '.field.' . (int) $field->id); } + /** + * Return a boolean based on field (and field group) display / show_on settings + * + * @param stdClass $field The field + * + * @return boolean + * + * @since 3.8.7 + */ + public static function displayFieldOnForm($field) + { + $app = JFactory::getApplication(); + + // Detect if the field should be shown at all + if ($field->params->get('show_on') == 1 && $app->isClient('administrator')) + { + return false; + } + elseif ($field->params->get('show_on') == 2 && $app->isClient('site')) + { + return false; + } + + if (!self::canEditFieldValue($field)) + { + $fieldDisplayReadOnly = $field->params->get('display_readonly', '2'); + + if ($fieldDisplayReadOnly == '2') + { + // Inherit from field group display read-only setting + $groupModel = JModelLegacy::getInstance('Group', 'FieldsModel', array('ignore_request' => true)); + $groupDisplayReadOnly = $groupModel->getItem($field->group_id)->params->get('display_readonly', '1'); + $fieldDisplayReadOnly = $groupDisplayReadOnly; + } + + if ($fieldDisplayReadOnly == '0') + { + // Do not display field on form when field is read-only + return false; + } + } + + // Display field on form + return true; + } + /** * Adds Count Items for Category Manager. * - * @param stdClass[] &$items The field category objects + * @param stdClass[] $items The field category objects * * @return stdClass[] * @@ -621,9 +656,9 @@ public static function getAssignedCategoriesTitles($fieldId) $query = $db->getQuery(true); $query->select($db->quoteName('c.title')) - ->from($db->quoteName('#__fields_categories', 'a')) - ->join('LEFT', $db->quoteName('#__categories', 'c') . ' ON a.category_id = c.id') - ->where('field_id = ' . $fieldId); + ->from($db->quoteName('#__fields_categories', 'a')) + ->join('INNER', $db->quoteName('#__categories', 'c') . ' ON a.category_id = c.id') + ->where('field_id = ' . $fieldId); $db->setQuery($query); @@ -633,7 +668,7 @@ public static function getAssignedCategoriesTitles($fieldId) /** * Gets the fields system plugin extension id. * - * @return int The fields system plugin extension id. + * @return integer The fields system plugin extension id. * * @since 3.7.0 */ @@ -641,10 +676,10 @@ public static function getFieldsPluginId() { $db = JFactory::getDbo(); $query = $db->getQuery(true) - ->select($db->quoteName('extension_id')) - ->from($db->quoteName('#__extensions')) - ->where($db->quoteName('folder') . ' = ' . $db->quote('system')) - ->where($db->quoteName('element') . ' = ' . $db->quote('fields')); + ->select($db->quoteName('extension_id')) + ->from($db->quoteName('#__extensions')) + ->where($db->quoteName('folder') . ' = ' . $db->quote('system')) + ->where($db->quoteName('element') . ' = ' . $db->quote('fields')); $db->setQuery($query); try @@ -749,4 +784,17 @@ public static function getFieldTypes() return $data; } + + /** + * Clears the internal cache for the custom fields. + * + * @return void + * + * @since 3.8.0 + */ + public static function clearFieldsCache() + { + self::$fieldCache = null; + self::$fieldsCache = null; + } } diff --git a/administrator/components/com_fields/libraries/fieldslistplugin.php b/administrator/components/com_fields/libraries/fieldslistplugin.php index 2074010440035..2a17117a5ddff 100644 --- a/administrator/components/com_fields/libraries/fieldslistplugin.php +++ b/administrator/components/com_fields/libraries/fieldslistplugin.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -42,7 +42,7 @@ public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form foreach ($this->getOptionsFromField($field) as $value => $name) { $option = new DOMElement('option', htmlspecialchars($value, ENT_COMPAT, 'UTF-8')); - $option->nodeValue = htmlspecialchars(JText::_($name), ENT_COMPAT, 'UTF-8'); + $option->textContent = htmlspecialchars(JText::_($name), ENT_COMPAT, 'UTF-8'); $element = $fieldNode->appendChild($option); $element->setAttribute('value', $value); @@ -65,7 +65,7 @@ public function getOptionsFromField($field) $data = array(); // Fetch the options from the plugin - $params = clone($this->params); + $params = clone $this->params; $params->merge($field->fieldparams); foreach ($params->get('options', array()) as $option) diff --git a/administrator/components/com_fields/libraries/fieldsplugin.php b/administrator/components/com_fields/libraries/fieldsplugin.php index 84eca9a148988..3a88cb0e774e3 100644 --- a/administrator/components/com_fields/libraries/fieldsplugin.php +++ b/administrator/components/com_fields/libraries/fieldsplugin.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -26,6 +26,14 @@ abstract class FieldsPlugin extends JPlugin */ public function onCustomFieldsGetTypes() { + // Cache filesystem access / checks + static $types_cache = array(); + + if (isset($types_cache[$this->_type . $this->_name])) + { + return $types_cache[$this->_type . $this->_name]; + } + $types = array(); // The root of the plugin @@ -84,7 +92,9 @@ public function onCustomFieldsGetTypes() $types[] = $data; } - // Return the data + // Add to cache and return the data + $types_cache[$this->_type . $this->_name] = $types; + return $types; } @@ -142,14 +152,8 @@ public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form return null; } - $app = JFactory::getApplication(); - - // Detect if the field should be shown at all - if ($field->params->get('show_on') == 1 && $app->isClient('administrator')) - { - return; - } - elseif ($field->params->get('show_on') == 2 && $app->isClient('site')) + // Detect if the field is configured to be displayed on the form + if (!FieldsHelper::displayFieldOnForm($field)) { return null; } @@ -160,13 +164,18 @@ public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form // Set the attributes $node->setAttribute('name', $field->name); $node->setAttribute('type', $field->type); - $node->setAttribute('default', $field->default_value); $node->setAttribute('label', $field->label); $node->setAttribute('description', $field->description); $node->setAttribute('class', $field->params->get('class')); $node->setAttribute('hint', $field->params->get('hint')); $node->setAttribute('required', $field->required ? 'true' : 'false'); + if ($field->default_value !== '') + { + $defaultNode = $node->appendChild(new DOMElement('default')); + $defaultNode->appendChild(new DOMCdataSection($field->default_value)); + } + // Combine the two params $params = clone $this->params; $params->merge($field->fieldparams); diff --git a/administrator/components/com_fields/models/field.php b/administrator/components/com_fields/models/field.php index 28da33a686e84..2445eeda3c215 100644 --- a/administrator/components/com_fields/models/field.php +++ b/administrator/components/com_fields/models/field.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -109,7 +109,7 @@ public function save($data) if ($data['title'] == $origTable->title) { - list($title, $name) = $this->generateNewTitle($data['group_id'], $data['alias'], $data['title']); + list($title, $name) = $this->generateNewTitle($data['group_id'], $data['name'], $data['title']); $data['title'] = $title; $data['label'] = $title; $data['name'] = $name; @@ -184,10 +184,12 @@ public function save($data) if (is_object($oldParams) && is_object($newParams) && $oldParams != $newParams) { $names = array(); + foreach ($newParams as $param) { $names[] = $db->q($param['value']); } + $query = $db->getQuery(true); $query->delete('#__fields_values')->where('field_id = ' . (int) $field->id) ->where('value NOT IN (' . implode(',', $names) . ')'); @@ -196,6 +198,8 @@ public function save($data) } } + FieldsHelper::clearFieldsCache(); + return true; } @@ -324,7 +328,7 @@ public function getItem($pk = null) $result->context = JFactory::getApplication()->input->getCmd('context', $this->getState('field.context')); } - if (property_exists($result, 'fieldparams')) + if (property_exists($result, 'fieldparams') && $result->fieldparams !== null) { $registry = new Registry; $registry->loadString($result->fieldparams); @@ -429,7 +433,7 @@ protected function generateNewTitle($category_id, $name, $title) /** * Method to delete one or more records. * - * @param array &$pks An array of record primary keys. + * @param array $pks An array of record primary keys. * * @return boolean True if successful, false if an error occurs. * @@ -545,7 +549,7 @@ public function getForm($data = array(), $loadData = true) } /** - * Setting the value for the gven field id, context and item id. + * Setting the value for the given field id, context and item id. * * @param string $fieldId The field ID. * @param string $itemId The ID of the item. @@ -575,32 +579,26 @@ public function setFieldValue($fieldId, $itemId, $value) $needsInsert = false; $needsUpdate = false; - if ($field->default_value == $value) + $oldValue = $this->getFieldValue($fieldId, $itemId); + $value = (array) $value; + + if ($oldValue === null) { - $needsDelete = true; + // No records available, doing normal insert + $needsInsert = true; + } + elseif (count($value) == 1 && count((array) $oldValue) == 1) + { + // Only a single row value update can be done when not empty + $needsUpdate = is_array($value[0]) ? count($value[0]) : strlen($value[0]); + $needsDelete = !$needsUpdate; } else { - $oldValue = $this->getFieldValue($fieldId, $itemId); - $value = (array) $value; - - if ($oldValue === null) - { - // No records available, doing normal insert - $needsInsert = true; - } - elseif (count($value) == 1 && count((array) $oldValue) == 1) - { - // Only a single row value update can be done - $needsUpdate = true; - } - else - { - // Multiple values, we need to purge the data and do a new - // insert - $needsDelete = true; - $needsInsert = true; - } + // Multiple values, we need to purge the data and do a new + // insert + $needsDelete = true; + $needsInsert = true; } if ($needsDelete) @@ -642,6 +640,7 @@ public function setFieldValue($fieldId, $itemId, $value) } $this->valueCache = array(); + FieldsHelper::clearFieldsCache(); return true; } @@ -920,6 +919,7 @@ protected function loadFormData() protected function preprocessForm(JForm $form, $data, $group = 'content') { $component = $this->state->get('field.component'); + $section = $this->state->get('field.section'); $dataObject = $data; if (is_array($dataObject)) @@ -939,16 +939,24 @@ protected function preprocessForm(JForm $form, $data, $group = 'content') // Allow to override the default value label and description through the plugin $key = 'PLG_FIELDS_' . strtoupper($dataObject->type) . '_DEFAULT_VALUE_LABEL'; + if (JFactory::getLanguage()->hasKey($key)) { $form->setFieldAttribute('default_value', 'label', $key); } $key = 'PLG_FIELDS_' . strtoupper($dataObject->type) . '_DEFAULT_VALUE_DESC'; + if (JFactory::getLanguage()->hasKey($key)) { $form->setFieldAttribute('default_value', 'description', $key); } + + // Remove placeholder field on list fields + if ($dataObject->type == 'list') + { + $form->removeField('hint', 'params'); + } } // Setting the context for the category field @@ -967,6 +975,21 @@ protected function preprocessForm(JForm $form, $data, $group = 'content') $form->setFieldAttribute('group_id', 'context', $this->state->get('field.context')); $form->setFieldAttribute('rules', 'component', $component); + // Looking first in the component models/forms folder + $path = JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/models/forms/fields/' . $section . '.xml'); + + if (file_exists($path)) + { + $lang = JFactory::getLanguage(); + $lang->load($component, JPATH_BASE, null, false, true); + $lang->load($component, JPATH_BASE . '/components/' . $component, null, false, true); + + if (!$form->loadFile($path, false)) + { + throw new Exception(JText::_('JERROR_LOADFILE_FAILED')); + } + } + // Trigger the default form events. parent::preprocessForm($form, $data, $group); } diff --git a/administrator/components/com_fields/models/fields.php b/administrator/components/com_fields/models/fields.php index 97cc4715b3cff..55179ea50659a 100644 --- a/administrator/components/com_fields/models/fields.php +++ b/administrator/components/com_fields/models/fields.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -155,7 +155,7 @@ protected function getListQuery() $query->select('ua.name AS author_name')->join('LEFT', '#__users AS ua ON ua.id = a.created_user_id'); // Join over the field groups. - $query->select('g.title AS group_title, g.access as group_access, g.state AS group_state'); + $query->select('g.title AS group_title, g.access as group_access, g.state AS group_state, g.note as group_note'); $query->join('LEFT', '#__fields_groups AS g ON g.id = a.group_id'); // Filter by context @@ -214,8 +214,7 @@ protected function getListQuery() $categories = array_unique($categories); // Join over the assigned categories - $query->join('LEFT', $db->quoteName('#__fields_categories') . ' AS fc ON fc.field_id = a.id') - ->group('a.id, l.title, l.image, uc.name, ag.title, ua.name, g.title, g.access, g.state'); + $query->join('LEFT', $db->quoteName('#__fields_categories') . ' AS fc ON fc.field_id = a.id'); if (in_array('0', $categories)) { @@ -241,6 +240,7 @@ protected function getListQuery() $includeGroupState = !$app->isClient('administrator') || $app->input->get('option') != 'com_fields' || $app->input->get('view') != 'fields'; + if (is_numeric($state)) { $query->where('a.state = ' . (int) $state); @@ -302,16 +302,10 @@ protected function getListQuery() } // Add the list ordering clause - $listOrdering = $this->getState('list.fullordering', 'a.ordering'); - $orderDirn = ''; + $listOrdering = $this->state->get('list.ordering', 'a.ordering'); + $orderDirn = $this->state->get('list.direction', 'ASC'); - if (empty($listOrdering)) - { - $listOrdering = $this->state->get('list.ordering', 'a.ordering'); - $orderDirn = $this->state->get('list.direction', 'DESC'); - } - - $query->order($db->escape($listOrdering) . ' ' . $db->escape($orderDirn)); + $query->order($db->escape($listOrdering) . ' ' . $db->escape($orderDirn)); return $query; } @@ -350,7 +344,7 @@ protected function _getList($query, $limitstart = 0, $limit = 0) * @param array $data data * @param boolean $loadData load current data * - * @return JForm/false the JForm object or false + * @return JForm|false the JForm object or false * * @since 3.7.0 */ diff --git a/administrator/components/com_fields/models/fields/fieldcontexts.php b/administrator/components/com_fields/models/fields/fieldcontexts.php index 7678f5a99c0d0..262c4f1447302 100644 --- a/administrator/components/com_fields/models/fields/fieldcontexts.php +++ b/administrator/components/com_fields/models/fields/fieldcontexts.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_fields/models/fields/fieldgroups.php b/administrator/components/com_fields/models/fields/fieldgroups.php index 0adac1584a04a..7932d50186a0f 100644 --- a/administrator/components/com_fields/models/fields/fieldgroups.php +++ b/administrator/components/com_fields/models/fields/fieldgroups.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -31,7 +31,7 @@ class JFormFieldFieldgroups extends JFormFieldList protected function getOptions() { $context = (string) $this->element['context']; - $states = $this->element['state'] ? $this->element['state'] : '0,1'; + $states = $this->element['state'] ?: '0,1'; $states = ArrayHelper::toInteger(explode(',', $states)); $user = JFactory::getUser(); @@ -44,6 +44,7 @@ protected function getOptions() $query->where('state IN (' . implode(',', $states) . ')'); $query->where('context = ' . $db->quote($context)); $query->where('access IN (' . implode(',', $viewlevels) . ')'); + $query->order('ordering asc, id asc'); $db->setQuery($query); $options = $db->loadObjectList(); @@ -54,6 +55,7 @@ protected function getOptions() { $option->text = '[' . $option->text . ']'; } + if ($option->state == 2) { $option->text = '{' . $option->text . '}'; diff --git a/administrator/components/com_fields/models/fields/section.php b/administrator/components/com_fields/models/fields/section.php index 4d74202c1d61b..75b99bd70ce7b 100644 --- a/administrator/components/com_fields/models/fields/section.php +++ b/administrator/components/com_fields/models/fields/section.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -24,7 +24,7 @@ class JFormFieldSection extends JFormFieldList * * @param SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. - * @param string $group The field name group control value. This acts as as an array container for the field. + * @param string $group The field name group control value. This acts as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * @@ -50,17 +50,18 @@ public function setup(SimpleXMLElement $element, $value, $group = null) * * @since 3.7.0 */ - protected function getInput () + protected function getInput() { // Add the change context function to the document JFactory::getDocument()->addScriptDeclaration( - "function fieldsChangeContext(context) + "function fieldsChangeContext(context) { var regex = new RegExp(\"([?;&])context[^&;]*[;&]?\"); var url = window.location.href; var query = url.replace(regex, \"$1\").replace(/&$/, ''); window.location.href = (query.length > 2 ? query + \"&\" : \"?\") + (context ? \"context=\" + context : ''); - }"); + }" + ); return parent::getInput(); } diff --git a/administrator/components/com_fields/models/fields/type.php b/administrator/components/com_fields/models/fields/type.php index 054fb68b9b9f0..05b3270ba72d3 100644 --- a/administrator/components/com_fields/models/fields/type.php +++ b/administrator/components/com_fields/models/fields/type.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -24,7 +24,7 @@ class JFormFieldType extends JFormFieldList * * @param SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. * @param mixed $value The form field value to validate. - * @param string $group The field name group control value. This acts as as an array container for the field. + * @param string $group The field name group control value. This acts as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * @@ -68,25 +68,6 @@ function ($a, $b) } ); - // Reload the page when the type changes - $uri = clone JUri::getInstance('index.php'); - - // Removing the catid parameter from the actual URL and set it as - // return - $returnUri = clone JUri::getInstance(); - $returnUri->setVar('catid', null); - $uri->setVar('return', base64_encode($returnUri->toString())); - - // Setting the options - $uri->setVar('option', 'com_fields'); - $uri->setVar('task', 'field.storeform'); - $uri->setVar('context', 'com_fields.field'); - $uri->setVar('formcontrol', $this->form->getFormControl()); - $uri->setVar('userstatevariable', 'com_fields.edit.field.data'); - $uri->setVar('view', null); - $uri->setVar('layout', null); - - JFactory::getDocument()->addScriptDeclaration(" jQuery( document ).ready(function() { Joomla.loadingLayer('load'); @@ -94,11 +75,11 @@ function ($a, $b) function typeHasChanged(element){ Joomla.loadingLayer('show'); var cat = jQuery(element); - jQuery('input[name=task]').val('field.storeform'); - element.form.action='" . $uri . "'; + jQuery('input[name=task]').val('field.reload'); element.form.submit(); } - "); + " + ); return $options; } diff --git a/administrator/components/com_fields/models/forms/field.xml b/administrator/components/com_fields/models/forms/field.xml index c4ba27f22d8ee..7958234104aaf 100644 --- a/administrator/components/com_fields/models/forms/field.xml +++ b/administrator/components/com_fields/models/forms/field.xml @@ -3,10 +3,10 @@
    @@ -27,7 +27,7 @@ type="fieldgroups" label="COM_FIELDS_FIELD_GROUP_LABEL" description="COM_FIELDS_FIELD_GROUP_DESC" - > + > @@ -35,10 +35,10 @@ name="assigned_cat_ids" type="category" label="JCATEGORY" - extension="com_content" description="JFIELD_FIELDS_CATEGORY_DESC" + extension="com_content" multiple="true" - > + > @@ -65,19 +65,19 @@ name="type" type="type" label="COM_FIELDS_FIELD_TYPE_LABEL" - default="text" description="COM_FIELDS_FIELD_TYPE_DESC" + default="text" required="true" /> + class="btn-group btn-group-yesno" + default="0" + > @@ -85,20 +85,20 @@ + > @@ -107,9 +107,9 @@ + > @@ -189,8 +189,8 @@ name="description" type="textarea" label="JGLOBAL_DESCRIPTION" - size="40" description="COM_FIELDS_FIELD_DESCRIPTION_DESC" + size="40" filter="HTML" /> @@ -202,10 +202,10 @@ />
    +
    + class="btn-group btn-group-yesno" + default="1" + > @@ -264,11 +265,11 @@ + class="btn-group btn-group-yesno" + default="" + > @@ -280,10 +281,23 @@ label="COM_FIELDS_FIELD_DISPLAY_LABEL" description="COM_FIELDS_FIELD_DISPLAY_DESC" default="2" - > + > + + + + + +
    diff --git a/administrator/components/com_fields/models/forms/filter_fields.xml b/administrator/components/com_fields/models/forms/filter_fields.xml index be53abbe5cea9..aca47a63e508b 100644 --- a/administrator/components/com_fields/models/forms/filter_fields.xml +++ b/administrator/components/com_fields/models/forms/filter_fields.xml @@ -20,7 +20,7 @@ name="state" type="status" onchange="this.form.submit();" - > + >
    @@ -45,7 +45,7 @@ name="access" type="accesslevel" onchange="this.form.submit();" - > + >
    @@ -53,7 +53,7 @@ name="language" type="contentlanguage" onchange="this.form.submit();" - > + > @@ -63,11 +63,11 @@ name="fullordering" type="list" label="JGLOBAL_SORT_BY" - statuses="*,0,1,2,-2" description="JGLOBAL_SORT_BY" + statuses="*,0,1,2,-2" onchange="this.form.submit();" default="a.ordering ASC" - > + > @@ -90,9 +90,10 @@ diff --git a/administrator/components/com_fields/models/forms/group.xml b/administrator/components/com_fields/models/forms/group.xml index d4e4e114368d3..4ed5c46842c27 100644 --- a/administrator/components/com_fields/models/forms/group.xml +++ b/administrator/components/com_fields/models/forms/group.xml @@ -3,7 +3,7 @@
    + > @@ -74,7 +74,7 @@ name="created_by" type="user" label="JGLOBAL_FIELD_CREATED_BY_LABEL" - desc="JGLOBAL_FIELD_CREATED_BY_DESC" + description="JGLOBAL_FIELD_CREATED_BY_DESC" /> -
    + + +
    + + + + +
    +
    diff --git a/administrator/components/com_fields/models/group.php b/administrator/components/com_fields/models/group.php index 70d890db89acd..cf9147f815af4 100644 --- a/administrator/components/com_fields/models/group.php +++ b/administrator/components/com_fields/models/group.php @@ -3,11 +3,13 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; +use Joomla\Registry\Registry; + /** * Group Model * @@ -69,6 +71,11 @@ public function save($data) */ public function getTable($name = 'Group', $prefix = 'FieldsTable', $options = array()) { + if (strpos(JPATH_COMPONENT, 'com_fields') === false) + { + $this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_fields/tables'); + } + return JTable::getInstance($name, $prefix, $options); } @@ -220,10 +227,34 @@ protected function preprocessForm(JForm $form, $data, $group = 'content') $parts = FieldsHelper::extract($this->state->get('filter.context')); + // Extract the component name + $component = $parts[0]; + + // Extract the optional section name + $section = (count($parts) > 1) ? $parts[1] : null; + if ($parts) { // Set the access control rules field component value. - $form->setFieldAttribute('rules', 'component', $parts[0]); + $form->setFieldAttribute('rules', 'component', $component); + } + + if ($section !== null) + { + // Looking first in the component models/forms folder + $path = JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/models/forms/fieldgroup/' . $section . '.xml'); + + if (file_exists($path)) + { + $lang = JFactory::getLanguage(); + $lang->load($component, JPATH_BASE, null, false, true); + $lang->load($component, JPATH_BASE . '/components/' . $component, null, false, true); + + if (!$form->loadFile($path, false)) + { + throw new Exception(JText::_('JERROR_LOADFILE_FAILED')); + } + } } } @@ -290,6 +321,11 @@ public function getItem($pk = null) $item->context = $this->getState('filter.context'); } + if (property_exists($item, 'params')) + { + $item->params = new Registry($item->params); + } + // Convert the created and modified dates to local user time for display in the form. $tz = new DateTimeZone(JFactory::getApplication()->get('offset')); diff --git a/administrator/components/com_fields/models/groups.php b/administrator/components/com_fields/models/groups.php index beb82f0d2ad4b..4619ab801f0b6 100644 --- a/administrator/components/com_fields/models/groups.php +++ b/administrator/components/com_fields/models/groups.php @@ -3,11 +3,12 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; +use Joomla\Registry\Registry; use Joomla\Utilities\ArrayHelper; /** @@ -121,13 +122,7 @@ protected function getListQuery() $user = JFactory::getUser(); // Select the required fields from the table. - $query->select( - $this->getState( - 'list.select', - 'a.id, a.title, a.checked_out, a.checked_out_time, a.note' . - ', a.state, a.access, a.created, a.created_by, a.ordering, a.language' - ) - ); + $query->select($this->getState('list.select', 'a.*')); $query->from('#__fields_groups AS a'); // Join over the language @@ -219,4 +214,31 @@ protected function getListQuery() return $query; } + + /** + * Gets an array of objects from the results of database query. + * + * @param string $query The query. + * @param integer $limitstart Offset. + * @param integer $limit The number of records. + * + * @return array An array of results. + * + * @since 3.8.7 + * @throws RuntimeException + */ + protected function _getList($query, $limitstart = 0, $limit = 0) + { + $result = parent::_getList($query, $limitstart, $limit); + + if (is_array($result)) + { + foreach ($result as $group) + { + $group->params = new Registry($group->params); + } + } + + return $result; + } } diff --git a/administrator/components/com_fields/tables/field.php b/administrator/components/com_fields/tables/field.php index 0d64971277bee..daf46e6874b5a 100644 --- a/administrator/components/com_fields/tables/field.php +++ b/administrator/components/com_fields/tables/field.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -78,7 +78,7 @@ public function bind($src, $ignore = '') * * @return boolean True if the instance is sane and able to be stored in the database. * - * @link https://docs.joomla.org/JTable/check + * @link https://docs.joomla.org/Special:MyLanguage/JTable/check * @since 3.7.0 */ public function check() @@ -177,7 +177,7 @@ protected function _getAssetName() * * @return string The string to use as the title in the asset table. * - * @link https://docs.joomla.org/JTable/getAssetTitle + * @link https://docs.joomla.org/Special:MyLanguage/JTable/getAssetTitle * @since 3.7.0 */ protected function _getAssetTitle() diff --git a/administrator/components/com_fields/tables/group.php b/administrator/components/com_fields/tables/group.php index ec160ddc46336..cec38c262417d 100644 --- a/administrator/components/com_fields/tables/group.php +++ b/administrator/components/com_fields/tables/group.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -71,7 +71,7 @@ public function bind($src, $ignore = '') * * @return boolean True if the instance is sane and able to be stored in the database. * - * @link https://docs.joomla.org/JTable/check + * @link https://docs.joomla.org/Special:MyLanguage/JTable/check * @since 3.7.0 */ public function check() @@ -133,7 +133,7 @@ protected function _getAssetName() * * @return string The string to use as the title in the asset table. * - * @link https://docs.joomla.org/JTable/getAssetTitle + * @link https://docs.joomla.org/Special:MyLanguage/JTable/getAssetTitle * @since 3.7.0 */ protected function _getAssetTitle() diff --git a/administrator/components/com_fields/views/field/tmpl/edit.php b/administrator/components/com_fields/views/field/tmpl/edit.php index d3d1f9d528548..991273c74cbdf 100644 --- a/administrator/components/com_fields/views/field/tmpl/edit.php +++ b/administrator/components/com_fields/views/field/tmpl/edit.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_fields/views/field/view.html.php b/administrator/components/com_fields/views/field/view.html.php index 32f5c449f7cb8..2c665643a2285 100644 --- a/administrator/components/com_fields/views/field/view.html.php +++ b/administrator/components/com_fields/views/field/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -57,9 +57,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } JFactory::getApplication()->input->set('hidemainmenu', true); diff --git a/administrator/components/com_fields/views/fields/tmpl/default.php b/administrator/components/com_fields/views/fields/tmpl/default.php index e05c47f302200..34fda9402c41c 100644 --- a/administrator/components/com_fields/views/fields/tmpl/default.php +++ b/administrator/components/com_fields/views/fields/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -20,7 +20,7 @@ $userId = $user->get('id'); $context = $this->escape($this->state->get('filter.context')); $component = $this->state->get('filter.component'); -$listOrder = str_replace(' ' . $this->state->get('list.direction'), '', $this->state->get('list.fullordering')); +$listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $ordering = ($listOrder == 'a.ordering'); $saveOrder = ($listOrder == 'a.ordering' && strtolower($listDirn) == 'asc'); diff --git a/administrator/components/com_fields/views/fields/tmpl/default_batch_body.php b/administrator/components/com_fields/views/fields/tmpl/default_batch_body.php index d60370b64926f..fabf1e1e61562 100644 --- a/administrator/components/com_fields/views/fields/tmpl/default_batch_body.php +++ b/administrator/components/com_fields/views/fields/tmpl/default_batch_body.php @@ -2,8 +2,8 @@ /** * @package Joomla.Administrator * @subpackage com_fields - * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_fields/views/fields/tmpl/default_batch_footer.php b/administrator/components/com_fields/views/fields/tmpl/default_batch_footer.php index 9192d5745880c..10ca5b037e684 100644 --- a/administrator/components/com_fields/views/fields/tmpl/default_batch_footer.php +++ b/administrator/components/com_fields/views/fields/tmpl/default_batch_footer.php @@ -2,8 +2,8 @@ /** * @package Joomla.Administrator * @subpackage com_fields - * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_fields/views/fields/tmpl/modal.php b/administrator/components/com_fields/views/fields/tmpl/modal.php index 50bc7b1875da5..2c5cb5890f0a3 100644 --- a/administrator/components/com_fields/views/fields/tmpl/modal.php +++ b/administrator/components/com_fields/views/fields/tmpl/modal.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -16,6 +16,7 @@ JHtml::_('behavior.core'); JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom')); +JHtml::_('bootstrap.popover', '.hasPopover', array('placement' => 'bottom')); JHtml::_('formbehavior.chosen', 'select'); JHtml::_('script', 'com_fields/admin-fields-modal.js', array('version' => 'auto', 'relative' => true)); @@ -82,7 +83,7 @@ ?> - + escape($item->title); ?> diff --git a/administrator/components/com_fields/views/fields/view.html.php b/administrator/components/com_fields/views/fields/view.html.php index a6cefc6fe9e25..d2e72347a7722 100644 --- a/administrator/components/com_fields/views/fields/view.html.php +++ b/administrator/components/com_fields/views/fields/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -78,9 +78,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } // Display a warning if the fields system plugin is disabled diff --git a/administrator/components/com_fields/views/group/tmpl/edit.php b/administrator/components/com_fields/views/group/tmpl/edit.php index 6c40f38bab4f5..e00f223e871c5 100644 --- a/administrator/components/com_fields/views/group/tmpl/edit.php +++ b/administrator/components/com_fields/views/group/tmpl/edit.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -38,7 +38,6 @@
    form->renderField('label'); ?> - form->renderField('context'); ?> form->renderField('description'); ?>
    diff --git a/administrator/components/com_fields/views/group/view.html.php b/administrator/components/com_fields/views/group/view.html.php index 9b89f2527e17a..c017989773556 100644 --- a/administrator/components/com_fields/views/group/view.html.php +++ b/administrator/components/com_fields/views/group/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -75,9 +75,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } JFactory::getApplication()->input->set('hidemainmenu', true); diff --git a/administrator/components/com_fields/views/groups/tmpl/default.php b/administrator/components/com_fields/views/groups/tmpl/default.php index a3006194aa3ab..65da48e8832c9 100644 --- a/administrator/components/com_fields/views/groups/tmpl/default.php +++ b/administrator/components/com_fields/views/groups/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_fields/views/groups/tmpl/default_batch_body.php b/administrator/components/com_fields/views/groups/tmpl/default_batch_body.php index d42f8af576fbb..e9e7a76e9c286 100644 --- a/administrator/components/com_fields/views/groups/tmpl/default_batch_body.php +++ b/administrator/components/com_fields/views/groups/tmpl/default_batch_body.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_fields/views/groups/tmpl/default_batch_footer.php b/administrator/components/com_fields/views/groups/tmpl/default_batch_footer.php index 4a313168175e2..4fcb5c8f3596b 100644 --- a/administrator/components/com_fields/views/groups/tmpl/default_batch_footer.php +++ b/administrator/components/com_fields/views/groups/tmpl/default_batch_footer.php @@ -2,8 +2,8 @@ /** * @package Joomla.Administrator * @subpackage com_fields - * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_fields/views/groups/view.html.php b/administrator/components/com_fields/views/groups/view.html.php index f0bdcec38b51f..f08cc0d666dbd 100644 --- a/administrator/components/com_fields/views/groups/view.html.php +++ b/administrator/components/com_fields/views/groups/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_fields * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -78,9 +78,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } // Display a warning if the fields system plugin is disabled diff --git a/administrator/components/com_finder/config.xml b/administrator/components/com_finder/config.xml index 6c3e4491d6d81..869fba3f886ad 100644 --- a/administrator/components/com_finder/config.xml +++ b/administrator/components/com_finder/config.xml @@ -3,185 +3,229 @@
    + description="COM_FINDER_FIELDSET_SEARCH_OPTIONS_DESCRIPTION" + > + + > + + > + - + > + + > + + > - + > - + > + + > - + > + + > + + > - + > - + > + + > + + +
    +
    + description="COM_FINDER_FIELDSET_INDEX_OPTIONS_DESCRIPTION" + > + + default="50" + validate="options" + > @@ -193,86 +237,107 @@ + + size="10" + default="30000" + filter="integer" + /> + + /> + + /> + + /> + + /> + + /> + + > + + > + + > +
    +
    + description="JCONFIG_PERMISSIONS_DESC" + > + + section="component" + /> +
    diff --git a/administrator/components/com_finder/controller.php b/administrator/components/com_finder/controller.php index 48b9014d479b4..339dc9b4571f1 100644 --- a/administrator/components/com_finder/controller.php +++ b/administrator/components/com_finder/controller.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -43,7 +43,7 @@ public function display($cachable = false, $urlparams = array()) $filterId = $this->input->get('filter_id', null, 'int'); // Check for edit form. - if ($view == 'filter' && $layout == 'edit' && !$this->checkEditId('com_finder.edit.filter', $filterId)) + if ($view === 'filter' && $layout === 'edit' && !$this->checkEditId('com_finder.edit.filter', $filterId)) { // Somehow the person just went to the form - we don't allow that. $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $filterId)); diff --git a/administrator/components/com_finder/controllers/filter.php b/administrator/components/com_finder/controllers/filter.php index b3bba2c42a6c9..2948b065235ea 100644 --- a/administrator/components/com_finder/controllers/filter.php +++ b/administrator/components/com_finder/controllers/filter.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -70,7 +70,7 @@ public function save($key = null, $urlVar = null) $data[$key] = $recordId; // The save2copy task needs to be handled slightly differently. - if ($task == 'save2copy') + if ($task === 'save2copy') { // Check-in the original row. if ($checkin && $model->checkin($data[$key]) === false) @@ -121,7 +121,7 @@ public function save($key = null, $urlVar = null) // Push up to three validation messages out to the user. for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++) { - if (($errors[$i]) instanceof Exception) + if ($errors[$i] instanceof Exception) { $app->enqueueMessage($errors[$i]->getMessage(), 'warning'); } @@ -185,8 +185,8 @@ public function save($key = null, $urlVar = null) $this->setMessage( JText::_( - (JFactory::getLanguage()->hasKey($this->text_prefix . ($recordId == 0 && $app->isClient('site') ? '_SUBMIT' : '') . '_SAVE_SUCCESS') - ? $this->text_prefix : 'JLIB_APPLICATION') . ($recordId == 0 && $app->isClient('site') ? '_SUBMIT' : '') . '_SAVE_SUCCESS' + (JFactory::getLanguage()->hasKey($this->text_prefix . ($recordId === 0 && $app->isClient('site') ? '_SUBMIT' : '') . '_SAVE_SUCCESS') + ? $this->text_prefix : 'JLIB_APPLICATION') . ($recordId === 0 && $app->isClient('site') ? '_SUBMIT' : '') . '_SAVE_SUCCESS' ) ); diff --git a/administrator/components/com_finder/controllers/filters.php b/administrator/components/com_finder/controllers/filters.php index 5a03f1a6c04f1..f9c045f20af53 100644 --- a/administrator/components/com_finder/controllers/filters.php +++ b/administrator/components/com_finder/controllers/filters.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/controllers/index.php b/administrator/components/com_finder/controllers/index.php index fff73f3b77e2b..6c1de7509fbc1 100644 --- a/administrator/components/com_finder/controllers/index.php +++ b/administrator/components/com_finder/controllers/index.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/controllers/indexer.json.php b/administrator/components/com_finder/controllers/indexer.json.php index ac6e08e8b4570..b9c087b3e96a3 100644 --- a/administrator/components/com_finder/controllers/indexer.json.php +++ b/administrator/components/com_finder/controllers/indexer.json.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -55,7 +55,7 @@ public function start() $app->setHeader('Pragma', 'no-cache'); // Check for a valid token. If invalid, send a 403 with the error message. - JSession::checkToken('request') or $this->sendResponse(new Exception(JText::_('JINVALID_TOKEN'), 403)); + JSession::checkToken('request') or static::sendResponse(new Exception(JText::_('JINVALID_TOKEN'), 403)); // Put in a buffer to silence noise. ob_start(); @@ -81,12 +81,13 @@ public function start() $state->start = 1; // Send the response. - $this->sendResponse($state); + static::sendResponse($state); } + // Catch an exception and return the response. catch (Exception $e) { - $this->sendResponse($e); + static::sendResponse($e); } } @@ -126,7 +127,7 @@ public function batch() $app->setHeader('Pragma', 'no-cache'); // Check for a valid token. If invalid, send a 403 with the error message. - JSession::checkToken('request') or $this->sendResponse(new Exception(JText::_('JINVALID_TOKEN'), 403)); + JSession::checkToken('request') or static::sendResponse(new Exception(JText::_('JINVALID_TOKEN'), 403)); // Put in a buffer to silence noise. ob_start(); @@ -165,6 +166,8 @@ public function batch() // Get the HTML document. $html = JDocument::getInstance('html', $attributes); + + // Todo: Why is this document fetched and immediately overwritten? $doc = JFactory::getDocument(); // Swap the documents. @@ -178,6 +181,8 @@ public function batch() // Swap the app. $app = JFactory::getApplication(); + + // Todo: Why is the app fetched and immediately overwritten? $app = $site; // Start the indexer. @@ -211,8 +216,9 @@ public function batch() } // Send the response. - $this->sendResponse($state); + static::sendResponse($state); } + // Catch an exception and return the response. catch (Exception $e) { @@ -220,7 +226,7 @@ public function batch() $doc = $raw; // Send the response. - $this->sendResponse($e); + static::sendResponse($e); } } @@ -241,7 +247,7 @@ public function optimize() $app->setHeader('Pragma', 'no-cache'); // Check for a valid token. If invalid, send a 403 with the error message. - JSession::checkToken('request') or $this->sendResponse(new Exception(JText::_('JINVALID_TOKEN'), 403)); + JSession::checkToken('request') or static::sendResponse(new Exception(JText::_('JINVALID_TOKEN'), 403)); // Put in a buffer to silence noise. ob_start(); @@ -260,12 +266,13 @@ public function optimize() $state->complete = 1; // Send the response. - $this->sendResponse($state); + static::sendResponse($state); } + // Catch an exception and return the response. catch (Exception $e) { - $this->sendResponse($e); + static::sendResponse($e); } } diff --git a/administrator/components/com_finder/controllers/maps.php b/administrator/components/com_finder/controllers/maps.php index 74e3df9052b4b..0a31778d128c9 100644 --- a/administrator/components/com_finder/controllers/maps.php +++ b/administrator/components/com_finder/controllers/maps.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/finder.php b/administrator/components/com_finder/finder.php index c386a830d2758..4318352a8b47e 100644 --- a/administrator/components/com_finder/finder.php +++ b/administrator/components/com_finder/finder.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/finder.xml b/administrator/components/com_finder/finder.xml index 1b9d4fb7a66fd..4a232b08a11b2 100644 --- a/administrator/components/com_finder/finder.xml +++ b/administrator/components/com_finder/finder.xml @@ -2,7 +2,7 @@ com_finder Joomla! Project - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. August 2011 GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org diff --git a/administrator/components/com_finder/helpers/finder.php b/administrator/components/com_finder/helpers/finder.php index 824304147561c..07b6c82ed409c 100644 --- a/administrator/components/com_finder/helpers/finder.php +++ b/administrator/components/com_finder/helpers/finder.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -38,24 +38,24 @@ public static function addSubmenu($vName) JHtmlSidebar::addEntry( JText::_('COM_FINDER_SUBMENU_INDEX'), 'index.php?option=com_finder&view=index', - $vName == 'index' + $vName === 'index' ); JHtmlSidebar::addEntry( JText::_('COM_FINDER_SUBMENU_MAPS'), 'index.php?option=com_finder&view=maps', - $vName == 'maps' + $vName === 'maps' ); JHtmlSidebar::addEntry( JText::_('COM_FINDER_SUBMENU_FILTERS'), 'index.php?option=com_finder&view=filters', - $vName == 'filters' + $vName === 'filters' ); } /** * Gets the finder system plugin extension id. * - * @return int The finder system plugin extension id. + * @return integer The finder system plugin extension id. * * @since 3.6.0 */ diff --git a/administrator/components/com_finder/helpers/html/finder.php b/administrator/components/com_finder/helpers/html/finder.php index d31ebeb2f2447..6995cd42890e9 100644 --- a/administrator/components/com_finder/helpers/html/finder.php +++ b/administrator/components/com_finder/helpers/html/finder.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/helpers/indexer/adapter.php b/administrator/components/com_finder/helpers/indexer/adapter.php index e73547a10be83..6ef6b2e422958 100644 --- a/administrator/components/com_finder/helpers/indexer/adapter.php +++ b/administrator/components/com_finder/helpers/indexer/adapter.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -125,8 +125,8 @@ abstract class FinderIndexerAdapter extends JPlugin /** * Method to instantiate the indexer adapter. * - * @param object &$subject The object to observe. - * @param array $config An array that holds the plugin configuration. + * @param object $subject The object to observe. + * @param array $config An array that holds the plugin configuration. * * @since 2.5 */ diff --git a/administrator/components/com_finder/helpers/indexer/driver/mysql.php b/administrator/components/com_finder/helpers/indexer/driver/mysql.php index 20cfa9ffbeb27..c91c1295e24a9 100644 --- a/administrator/components/com_finder/helpers/indexer/driver/mysql.php +++ b/administrator/components/com_finder/helpers/indexer/driver/mysql.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -41,7 +41,7 @@ public function index($item, $format = 'html') { // Mark beforeIndexing in the profiler. static::$profiler ? static::$profiler->mark('beforeIndexing') : null; - $db = JFactory::getDbo(); + $db = $this->db; $nd = $db->getNullDate(); // Check if the item is in the database. @@ -125,24 +125,24 @@ public function index($item, $format = 'html') ->insert($db->quoteName('#__finder_links')) ->columns($columnsArray) ->values( - $db->quote($item->url) . ', ' - . $db->quote($item->route) . ', ' - . $db->quote($item->title) . ', ' - . $db->quote($item->description) . ', ' - . $query->currentTimestamp() . ', ' - . '1, ' - . (int) $item->state . ', ' - . (int) $item->access . ', ' - . $db->quote($item->language) . ', ' - . (int) $item->type_id . ', ' - . $db->quote(serialize($item)) . ', ' - . $db->quote($item->publish_start_date) . ', ' - . $db->quote($item->publish_end_date) . ', ' - . $db->quote($item->start_date) . ', ' - . $db->quote($item->end_date) . ', ' - . (double) ($item->list_price ? $item->list_price : 0) . ', ' - . (double) ($item->sale_price ? $item->sale_price : 0) - ); + $db->quote($item->url) . ', ' + . $db->quote($item->route) . ', ' + . $db->quote($item->title) . ', ' + . $db->quote($item->description) . ', ' + . $query->currentTimestamp() . ', ' + . '1, ' + . (int) $item->state . ', ' + . (int) $item->access . ', ' + . $db->quote($item->language) . ', ' + . (int) $item->type_id . ', ' + . $db->quote(serialize($item)) . ', ' + . $db->quote($item->publish_start_date) . ', ' + . $db->quote($item->publish_end_date) . ', ' + . $db->quote($item->start_date) . ', ' + . $db->quote($item->end_date) . ', ' + . (double) ($item->list_price ?: 0) . ', ' + . (double) ($item->sale_price ?: 0) + ); $db->setQuery($query); $db->execute(); @@ -167,8 +167,8 @@ public function index($item, $format = 'html') ->set($db->quoteName('publish_end_date') . ' = ' . $db->quote($item->publish_end_date)) ->set($db->quoteName('start_date') . ' = ' . $db->quote($item->start_date)) ->set($db->quoteName('end_date') . ' = ' . $db->quote($item->end_date)) - ->set($db->quoteName('list_price') . ' = ' . (double) ($item->list_price ? $item->list_price : 0)) - ->set($db->quoteName('sale_price') . ' = ' . (double) ($item->sale_price ? $item->sale_price : 0)) + ->set($db->quoteName('list_price') . ' = ' . (double) ($item->list_price ?: 0)) + ->set($db->quoteName('sale_price') . ' = ' . (double) ($item->sale_price ?: 0)) ->where('link_id = ' . (int) $linkId); $db->setQuery($query); $db->execute(); @@ -287,30 +287,30 @@ public function index($item, $format = 'html') * table. */ $query = 'INSERT INTO ' . $db->quoteName('#__finder_tokens_aggregate') . - ' (' . $db->quoteName('term_id') . - ', ' . $db->quoteName('map_suffix') . + ' (' . $db->quoteName('term_id') . + ', ' . $db->quoteName('map_suffix') . ', ' . $db->quoteName('term') . - ', ' . $db->quoteName('stem') . - ', ' . $db->quoteName('common') . - ', ' . $db->quoteName('phrase') . - ', ' . $db->quoteName('term_weight') . - ', ' . $db->quoteName('context') . - ', ' . $db->quoteName('context_weight') . - ', ' . $db->quoteName('total_weight') . + ', ' . $db->quoteName('stem') . + ', ' . $db->quoteName('common') . + ', ' . $db->quoteName('phrase') . + ', ' . $db->quoteName('term_weight') . + ', ' . $db->quoteName('context') . + ', ' . $db->quoteName('context_weight') . + ', ' . $db->quoteName('total_weight') . ', ' . $db->quoteName('language') . ')' . - ' SELECT' . - ' COALESCE(t.term_id, 0), \'\', t1.term, t1.stem, t1.common, t1.phrase, t1.weight, t1.context,' . - ' ROUND( t1.weight * COUNT( t2.term ) * %F, 8 ) AS context_weight, 0, t1.language' . - ' FROM (' . - ' SELECT DISTINCT t1.term, t1.stem, t1.common, t1.phrase, t1.weight, t1.context, t1.language' . - ' FROM ' . $db->quoteName('#__finder_tokens') . ' AS t1' . - ' WHERE t1.context = %d' . - ' ) AS t1' . - ' JOIN ' . $db->quoteName('#__finder_tokens') . ' AS t2 ON t2.term = t1.term' . - ' LEFT JOIN ' . $db->quoteName('#__finder_terms') . ' AS t ON t.term = t1.term' . - ' WHERE t2.context = %d' . - ' GROUP BY t1.term, t.term_id, t1.term, t1.stem, t1.common, t1.phrase, t1.weight, t1.context, t1.language' . - ' ORDER BY t1.term DESC'; + ' SELECT' . + ' COALESCE(t.term_id, 0), \'\', t1.term, t1.stem, t1.common, t1.phrase, t1.weight, t1.context,' . + ' ROUND( t1.weight * COUNT( t2.term ) * %F, 8 ) AS context_weight, 0, t1.language' . + ' FROM (' . + ' SELECT DISTINCT t1.term, t1.stem, t1.common, t1.phrase, t1.weight, t1.context, t1.language' . + ' FROM ' . $db->quoteName('#__finder_tokens') . ' AS t1' . + ' WHERE t1.context = %d' . + ' ) AS t1' . + ' JOIN ' . $db->quoteName('#__finder_tokens') . ' AS t2 ON t2.term = t1.term' . + ' LEFT JOIN ' . $db->quoteName('#__finder_terms') . ' AS t ON t.term = t1.term' . + ' WHERE t2.context = %d' . + ' GROUP BY t1.term, t.term_id, t1.term, t1.stem, t1.common, t1.phrase, t1.weight, t1.context, t1.language' . + ' ORDER BY t1.term DESC'; // Iterate through the contexts and aggregate the tokens per context. foreach ($state->weights as $context => $multiplier) @@ -451,64 +451,6 @@ public function index($item, $format = 'html') return $linkId; } - /** - * Method to remove a link from the index. - * - * @param integer $linkId The id of the link. - * - * @return boolean True on success. - * - * @since 2.5 - * @throws Exception on database error. - */ - public function remove($linkId) - { - $db = JFactory::getDbo(); - $query = $db->getQuery(true); - - // Update the link counts and remove the mapping records. - for ($i = 0; $i <= 15; $i++) - { - // Update the link counts for the terms. - $query->clear() - ->update($db->quoteName('#__finder_terms') . ' AS t') - ->join('INNER', $db->quoteName('#__finder_links_terms' . dechex($i)) . ' AS m ON m.term_id = t.term_id') - ->set('t.links = t.links - 1') - ->where('m.link_id = ' . $db->quote((int) $linkId)); - $db->setQuery($query); - $db->execute(); - - // Remove all records from the mapping tables. - $query->clear() - ->delete($db->quoteName('#__finder_links_terms' . dechex($i))) - ->where($db->quoteName('link_id') . ' = ' . (int) $linkId); - $db->setQuery($query); - $db->execute(); - } - - // Delete all orphaned terms. - $query->clear() - ->delete($db->quoteName('#__finder_terms')) - ->where($db->quoteName('links') . ' <= 0'); - $db->setQuery($query); - $db->execute(); - - // Delete the link from the index. - $query->clear() - ->delete($db->quoteName('#__finder_links')) - ->where($db->quoteName('link_id') . ' = ' . $db->quote((int) $linkId)); - $db->setQuery($query); - $db->execute(); - - // Remove the taxonomy maps. - FinderIndexerTaxonomy::removeMaps($linkId); - - // Remove the orphaned taxonomy nodes. - FinderIndexerTaxonomy::removeOrphanNodes(); - - return true; - } - /** * Method to optimize the index. We use this method to remove unused terms * and any other optimizations that might be necessary. @@ -521,7 +463,7 @@ public function remove($linkId) public function optimize() { // Get the database object. - $db = JFactory::getDbo(); + $db = $this->db; $query = $db->getQuery(true); // Delete all orphaned terms. @@ -567,63 +509,6 @@ public function optimize() return true; } - /** - * Method to add a set of tokens to the database. - * - * @param mixed $tokens An array or single FinderIndexerToken object. - * @param mixed $context The context of the tokens. See context constants. [optional] - * - * @return integer The number of tokens inserted into the database. - * - * @since 3.0 - * @throws Exception on database error. - */ - protected function addTokensToDb($tokens, $context = '') - { - // Get the database object. - $db = JFactory::getDbo(); - $query = $db->getQuery(true); - - // Force tokens to an array. - $tokens = is_array($tokens) ? $tokens : array($tokens); - - // Count the number of token values. - $values = 0; - - // Insert the tokens into the database. - $query->insert($db->quoteName('#__finder_tokens')) - ->columns( - array( - $db->quoteName('term'), - $db->quoteName('stem'), - $db->quoteName('common'), - $db->quoteName('phrase'), - $db->quoteName('weight'), - $db->quoteName('context'), - $db->quoteName('language') - ) - ); - - // Iterate through the tokens to create SQL value sets. - foreach ($tokens as $token) - { - $query->values( - $db->quote($token->term) . ', ' - . $db->quote($token->stem) . ', ' - . (int) $token->common . ', ' - . (int) $token->phrase . ', ' - . (float) $token->weight . ', ' - . (int) $context . ', ' - . $db->quote($token->language) - ); - $values++; - } - - $db->setQuery($query); - $db->execute(); - - return $values; - } /** * Method to switch the token tables from Memory tables to MyISAM tables @@ -641,7 +526,7 @@ protected function toggleTables($memory) static $state; // Get the database adapter. - $db = JFactory::getDbo(); + $db = $this->db; // Check if we are setting the tables to the Memory engine. if ($memory === true && $state !== true) diff --git a/administrator/components/com_finder/helpers/indexer/driver/postgresql.php b/administrator/components/com_finder/helpers/indexer/driver/postgresql.php index 9b454cdf73a3d..cc3a32055eba9 100644 --- a/administrator/components/com_finder/helpers/indexer/driver/postgresql.php +++ b/administrator/components/com_finder/helpers/indexer/driver/postgresql.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -33,7 +33,7 @@ public function index($item, $format = 'html') { // Mark beforeIndexing in the profiler. static::$profiler ? static::$profiler->mark('beforeIndexing') : null; - $db = JFactory::getDbo(); + $db = $this->db; $nd = $db->getNullDate(); // Check if the item is in the database. @@ -117,24 +117,24 @@ public function index($item, $format = 'html') ->insert($db->quoteName('#__finder_links')) ->columns($columnsArray) ->values( - $db->quote($item->url) . ', ' - . $db->quote($item->route) . ', ' - . $db->quote($item->title) . ', ' - . $db->quote($item->description) . ', ' - . $query->currentTimestamp() . ', ' - . '1, ' - . (int) $item->state . ', ' - . (int) $item->access . ', ' - . $db->quote($item->language) . ', ' - . (int) $item->type_id . ', ' - . $db->quote(serialize($item)) . ', ' - . $db->quote($item->publish_start_date) . ', ' - . $db->quote($item->publish_end_date) . ', ' - . $db->quote($item->start_date) . ', ' - . $db->quote($item->end_date) . ', ' - . (double) ($item->list_price ? $item->list_price : 0) . ', ' - . (double) ($item->sale_price ? $item->sale_price : 0) - ); + $db->quote($item->url) . ', ' + . $db->quote($item->route) . ', ' + . $db->quote($item->title) . ', ' + . $db->quote($item->description) . ', ' + . $query->currentTimestamp() . ', ' + . '1, ' + . (int) $item->state . ', ' + . (int) $item->access . ', ' + . $db->quote($item->language) . ', ' + . (int) $item->type_id . ', ' + . $db->quote(serialize($item)) . ', ' + . $db->quote($item->publish_start_date) . ', ' + . $db->quote($item->publish_end_date) . ', ' + . $db->quote($item->start_date) . ', ' + . $db->quote($item->end_date) . ', ' + . (double) ($item->list_price ?: 0) . ', ' + . (double) ($item->sale_price ?: 0) + ); $db->setQuery($query); $db->execute(); @@ -159,8 +159,8 @@ public function index($item, $format = 'html') ->set($db->quoteName('publish_end_date') . ' = ' . $db->quote($item->publish_end_date)) ->set($db->quoteName('start_date') . ' = ' . $db->quote($item->start_date)) ->set($db->quoteName('end_date') . ' = ' . $db->quote($item->end_date)) - ->set($db->quoteName('list_price') . ' = ' . (double) ($item->list_price ? $item->list_price : 0)) - ->set($db->quoteName('sale_price') . ' = ' . (double) ($item->sale_price ? $item->sale_price : 0)) + ->set($db->quoteName('list_price') . ' = ' . (double) ($item->list_price ?: 0)) + ->set($db->quoteName('sale_price') . ' = ' . (double) ($item->sale_price ?: 0)) ->where('link_id = ' . (int) $linkId); $db->setQuery($query); $db->execute(); @@ -320,7 +320,8 @@ public function index($item, $format = 'html') * table have a term of 0, then no term record exists for that * term so we need to add it to the terms table. */ - /* Emulation of IGNORE INTO behaviour */ + + // Emulation of IGNORE INTO behaviour $db->setQuery( ' SELECT ta.term' . ' FROM ' . $db->quoteName('#__finder_tokens_aggregate') . ' AS ta' . @@ -451,64 +452,6 @@ public function index($item, $format = 'html') return $linkId; } - /** - * Method to remove a link from the index. - * - * @param integer $linkId The id of the link. - * - * @return boolean True on success. - * - * @since 2.5 - * @throws Exception on database error. - */ - public function remove($linkId) - { - $db = JFactory::getDbo(); - $query = $db->getQuery(true); - - // Update the link counts and remove the mapping records. - for ($i = 0; $i <= 15; $i++) - { - // Update the link counts for the terms. - $query->clear() - ->update($db->quoteName('#__finder_terms') . ' AS t') - ->join('INNER', $db->quoteName('#__finder_links_terms' . dechex($i)) . ' AS m ON m.term_id = t.term_id') - ->set('links = t.links - 1') - ->where('m.link_id = ' . $db->quote((int) $linkId)); - $db->setQuery($query); - $db->execute(); - - // Remove all records from the mapping tables. - $query->clear() - ->delete($db->quoteName('#__finder_links_terms' . dechex($i))) - ->where($db->quoteName('link_id') . ' = ' . (int) $linkId); - $db->setQuery($query); - $db->execute(); - } - - // Delete all orphaned terms. - $query->clear() - ->delete($db->quoteName('#__finder_terms')) - ->where($db->quoteName('links') . ' <= 0'); - $db->setQuery($query); - $db->execute(); - - // Delete the link from the index. - $query->clear() - ->delete($db->quoteName('#__finder_links')) - ->where($db->quoteName('link_id') . ' = ' . $db->quote((int) $linkId)); - $db->setQuery($query); - $db->execute(); - - // Remove the taxonomy maps. - FinderIndexerTaxonomy::removeMaps($linkId); - - // Remove the orphaned taxonomy nodes. - FinderIndexerTaxonomy::removeOrphanNodes(); - - return true; - } - /** * Method to optimize the index. We use this method to remove unused terms * and any other optimizations that might be necessary. @@ -521,7 +464,7 @@ public function remove($linkId) public function optimize() { // Get the database object. - $db = JFactory::getDbo(); + $db = $this->db; $query = $db->getQuery(true); // Delete all orphaned terms. @@ -552,7 +495,7 @@ public function optimize() // Optimize the terms common table. $db->setQuery('REINDEX TABLE ' . $db->quoteName('#__finder_terms_common')); $db->execute(); - + // Optimize the types table. $db->setQuery('REINDEX TABLE ' . $db->quoteName('#__finder_types')); $db->execute(); @@ -570,78 +513,4 @@ public function optimize() return true; } - - /** - * Method to add a set of tokens to the database. - * - * @param mixed $tokens An array or single FinderIndexerToken object. - * @param mixed $context The context of the tokens. See context constants. [optional] - * - * @return integer The number of tokens inserted into the database. - * - * @since 2.5 - * @throws Exception on database error. - */ - protected function addTokensToDb($tokens, $context = '') - { - // Get the database object. - $db = JFactory::getDbo(); - $query = $db->getQuery(true); - - // Force tokens to an array. - $tokens = is_array($tokens) ? $tokens : array($tokens); - - // Count the number of token values. - $values = 0; - - // Insert the tokens into the database. - $query->insert($db->quoteName('#__finder_tokens')) - ->columns( - array( - $db->quoteName('term'), - $db->quoteName('stem'), - $db->quoteName('common'), - $db->quoteName('phrase'), - $db->quoteName('weight'), - $db->quoteName('context'), - $db->quoteName('language') - ) - ); - - // Iterate through the tokens to create SQL value sets. - foreach ($tokens as $token) - { - $query->values( - $db->quote($token->term) . ', ' - . $db->quote($token->stem) . ', ' - . (int) $token->common . ', ' - . (int) $token->phrase . ', ' - . (float) $token->weight . ', ' - . (int) $context . ', ' - . $db->quote($token->language) - ); - $values++; - } - - $db->setQuery($query); - $db->execute(); - - return $values; - } - - /** - * Method to switch the token tables from Memory tables to MyISAM tables - * when they are close to running out of memory. - * - * @param boolean $memory Flag to control how they should be toggled. - * - * @return boolean True on success. - * - * @since 2.5 - * @throws Exception on database error. - */ - protected function toggleTables($memory) - { - return true; - } } diff --git a/administrator/components/com_finder/helpers/indexer/driver/sqlsrv.php b/administrator/components/com_finder/helpers/indexer/driver/sqlsrv.php index bea14157e0430..dd975dc1e9470 100644 --- a/administrator/components/com_finder/helpers/indexer/driver/sqlsrv.php +++ b/administrator/components/com_finder/helpers/indexer/driver/sqlsrv.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -41,7 +41,7 @@ public function index($item, $format = 'html') { // Mark beforeIndexing in the profiler. static::$profiler ? static::$profiler->mark('beforeIndexing') : null; - $db = JFactory::getDbo(); + $db = $this->db; $nd = $db->getNullDate(); // Check if the item is in the database. @@ -125,24 +125,24 @@ public function index($item, $format = 'html') ->insert($db->quoteName('#__finder_links')) ->columns($columnsArray) ->values( - $db->quote($item->url) . ', ' - . $db->quote($item->route) . ', ' - . $db->quote($item->title) . ', ' - . $db->quote($item->description) . ', ' - . $query->currentTimestamp() . ', ' - . '1, ' - . (int) $item->state . ', ' - . (int) $item->access . ', ' - . $db->quote($item->language) . ', ' - . (int) $item->type_id . ', ' - . $db->quote(serialize($item)) . ', ' - . $db->quote($item->publish_start_date) . ', ' - . $db->quote($item->publish_end_date) . ', ' - . $db->quote($item->start_date) . ', ' - . $db->quote($item->end_date) . ', ' - . (double) ($item->list_price ? $item->list_price : 0) . ', ' - . (double) ($item->sale_price ? $item->sale_price : 0) - ); + $db->quote($item->url) . ', ' + . $db->quote($item->route) . ', ' + . $db->quote($item->title) . ', ' + . $db->quote($item->description) . ', ' + . $query->currentTimestamp() . ', ' + . '1, ' + . (int) $item->state . ', ' + . (int) $item->access . ', ' + . $db->quote($item->language) . ', ' + . (int) $item->type_id . ', ' + . $db->quote(serialize($item)) . ', ' + . $db->quote($item->publish_start_date) . ', ' + . $db->quote($item->publish_end_date) . ', ' + . $db->quote($item->start_date) . ', ' + . $db->quote($item->end_date) . ', ' + . (double) ($item->list_price ?: 0) . ', ' + . (double) ($item->sale_price ?: 0) + ); $db->setQuery($query); $db->execute(); @@ -167,8 +167,8 @@ public function index($item, $format = 'html') ->set($db->quoteName('publish_end_date') . ' = ' . $db->quote($item->publish_end_date)) ->set($db->quoteName('start_date') . ' = ' . $db->quote($item->start_date)) ->set($db->quoteName('end_date') . ' = ' . $db->quote($item->end_date)) - ->set($db->quoteName('list_price') . ' = ' . (double) ($item->list_price ? $item->list_price : 0)) - ->set($db->quoteName('sale_price') . ' = ' . (double) ($item->sale_price ? $item->sale_price : 0)) + ->set($db->quoteName('list_price') . ' = ' . (double) ($item->list_price ?: 0)) + ->set($db->quoteName('sale_price') . ' = ' . (double) ($item->sale_price ?: 0)) ->where('link_id = ' . (int) $linkId); $db->setQuery($query); $db->execute(); @@ -458,7 +458,7 @@ public function index($item, $format = 'html') */ public function remove($linkId) { - $db = JFactory::getDbo(); + $db = $this->db; $query = $db->getQuery(true); // Update the link counts and remove the mapping records. @@ -514,7 +514,7 @@ public function remove($linkId) public function optimize() { // Get the database object. - $db = JFactory::getDbo(); + $db = $this->db; $query = $db->getQuery(true); // Delete all orphaned terms. @@ -528,101 +528,4 @@ public function optimize() return true; } - - /** - * Method to add a set of tokens to the database. - * - * @param mixed $tokens An array or single FinderIndexerToken object. - * @param mixed $context The context of the tokens. See context constants. [optional] - * - * @return integer The number of tokens inserted into the database. - * - * @since 3.1 - * @throws Exception on database error. - */ - protected function addTokensToDb($tokens, $context = '') - { - // Get the database object. - $db = JFactory::getDbo(); - $query = $db->getQuery(true); - - // Force tokens to an array. - $tokens = is_array($tokens) ? $tokens : array($tokens); - - // Count the number of token values. - $values = 0; - - // Set some variables to count the iterations - $totalTokens = count($tokens); - $remaining = $totalTokens; - $iterations = 0; - $loop = true; - - do - { - // Shift the token off the array - $token = array_shift($tokens); - - $query->values( - $db->quote($token->term) . ', ' - . $db->quote($token->stem) . ', ' - . (int) $token->common . ', ' - . (int) $token->phrase . ', ' - . (float) $token->weight . ', ' - . (int) $context . ', ' - . $db->quote($token->language) - ); - $values++; - $iterations++; - $remaining--; - - // Run the query if we've reached 1000 iterations or there are no tokens remaining - if ($iterations == 1000 || $remaining == 0) - { - // Insert the tokens into the database. - $query->insert($db->quoteName('#__finder_tokens')) - ->columns( - array( - $db->quoteName('term'), - $db->quoteName('stem'), - $db->quoteName('common'), - $db->quoteName('phrase'), - $db->quoteName('weight'), - $db->quoteName('context'), - $db->quoteName('language') - ) - ); - $db->setQuery($query); - $db->execute(); - - // Reset the query - $query->clear(); - } - - // If there's nothing remaining, we're done looping - if ($remaining == 0) - { - $loop = false; - } - } - while ($loop == true); - - return $values; - } - - /** - * Method to switch the token tables from Memory tables to MyISAM tables - * when they are close to running out of memory. - * - * @param boolean $memory Flag to control how they should be toggled. - * - * @return boolean True on success. - * - * @since 3.1 - * @throws Exception on database error. - */ - protected function toggleTables($memory) - { - return true; - } } diff --git a/administrator/components/com_finder/helpers/indexer/helper.php b/administrator/components/com_finder/helpers/indexer/helper.php index 312c2f906d745..3a8d3768b096c 100644 --- a/administrator/components/com_finder/helpers/indexer/helper.php +++ b/administrator/components/com_finder/helpers/indexer/helper.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -311,15 +311,25 @@ public static function addContentType($title, $mime = null) public static function isCommon($token, $lang) { static $data; + static $default; + + $langCode = $lang; + + // If language requested is wildcard, use the default language. + if ($lang == '*') + { + $default = $default === null ? substr(self::getDefaultLanguage(), 0, 2) : $default; + $langCode = $default; + } // Load the common tokens for the language if necessary. - if (!isset($data[$lang])) + if (!isset($data[$langCode])) { - $data[$lang] = self::getCommonWords($lang); + $data[$langCode] = self::getCommonWords($langCode); } // Check if the token is in the common array. - return in_array($token, $data[$lang], true); + return in_array($token, $data[$langCode], true); } /** @@ -433,7 +443,7 @@ public static function getContentPath($url) * Method to get extra data for a content before being indexed. This is how * we add Comments, Tags, Labels, etc. that should be available to Finder. * - * @param FinderIndexerResult &$item The item to index as an FinderIndexerResult object. + * @param FinderIndexerResult $item The item to index as a FinderIndexerResult object. * * @return boolean True on success, false on failure. * @@ -464,14 +474,15 @@ public static function getContentExtras(FinderIndexerResult &$item) /** * Method to process content text using the onContentPrepare event trigger. * - * @param string $text The content to process. - * @param Registry $params The parameters object. [optional] + * @param string $text The content to process. + * @param Registry $params The parameters object. [optional] + * @param FinderIndexerResult $item The item which get prepared. [optional] * * @return string The processed content. * * @since 2.5 */ - public static function prepareContent($text, $params = null) + public static function prepareContent($text, $params = null, FinderIndexerResult $item = null) { static $loaded; @@ -496,6 +507,17 @@ public static function prepareContent($text, $params = null) $content = JTable::getInstance('Content'); $content->text = $text; + if ($item) + { + $content->bind((array) $item); + $content->bind($item->getElements()); + } + + if ($item && !empty($item->context)) + { + $content->context = $item->context; + } + // Fire the onContentPrepare event. $dispatcher->trigger('onContentPrepare', array('com_finder.indexer', &$content, &$params, 0)); diff --git a/administrator/components/com_finder/helpers/indexer/indexer.php b/administrator/components/com_finder/helpers/indexer/indexer.php index 8648d39326b03..34af6698cf5a6 100644 --- a/administrator/components/com_finder/helpers/indexer/indexer.php +++ b/administrator/components/com_finder/helpers/indexer/indexer.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -90,6 +90,48 @@ abstract class FinderIndexer */ public static $profiler; + /** + * Database driver cache. + * + * @var JDatabaseDriver + * @since 3.8.0 + */ + protected $db; + + /** + * Reusable Query Template. To be used with clone. + * + * @var JDatabaseQuery + * @since 3.8.0 + */ + protected $addTokensToDbQueryTemplate; + + /** + * FinderIndexer constructor. + * + * @since 3.8.0 + */ + public function __construct() + { + $this->db = JFactory::getDbo(); + + $db = $this->db; + + // Set up query template for addTokensToDb + $this->addTokensToDbQueryTemplate = $db->getQuery(true)->insert($db->quoteName('#__finder_tokens')) + ->columns( + array( + $db->quoteName('term'), + $db->quoteName('stem'), + $db->quoteName('common'), + $db->quoteName('phrase'), + $db->quoteName('weight'), + $db->quoteName('context'), + $db->quoteName('language') + ) + ); + } + /** * Returns a reference to the FinderIndexer object. * @@ -254,7 +296,51 @@ abstract public function index($item, $format = 'html'); * @since 2.5 * @throws Exception on database error. */ - abstract public function remove($linkId); + public function remove($linkId) + { + $db = $this->db; + $query = $db->getQuery(true); + + // Update the link counts and remove the mapping records. + for ($i = 0; $i <= 15; $i++) + { + // Update the link counts for the terms. + $query->clear() + ->update($db->quoteName('#__finder_terms', 't')) + ->join('INNER', $db->quoteName('#__finder_links_terms' . dechex($i), 'm') . + ' ON ' . $db->quoteName('m.term_id') . ' = ' . $db->quoteName('t.term_id') + ) + ->set($db->quoteName('links') . ' = ' . $db->quoteName('links') . ' - 1') + ->where($db->quoteName('m.link_id') . ' = ' . (int) $linkId); + $db->setQuery($query)->execute(); + + // Remove all records from the mapping tables. + $query->clear() + ->delete($db->quoteName('#__finder_links_terms' . dechex($i))) + ->where($db->quoteName('link_id') . ' = ' . (int) $linkId); + $db->setQuery($query)->execute(); + } + + // Delete all orphaned terms. + $query->clear() + ->delete($db->quoteName('#__finder_terms')) + ->where($db->quoteName('links') . ' <= 0'); + $db->setQuery($query)->execute(); + + // Delete the link from the index. + $query->clear() + ->delete($db->quoteName('#__finder_links')) + ->where($db->quoteName('link_id') . ' = ' . (int) $linkId); + $db->setQuery($query)->execute(); + + // Remove the taxonomy maps. + FinderIndexerTaxonomy::removeMaps($linkId); + + // Remove the orphaned taxonomy nodes. + FinderIndexerTaxonomy::removeOrphanNodes(); + + return true; + } /** * Method to optimize the index. We use this method to remove unused terms @@ -340,7 +426,7 @@ protected function tokenizeToDb($input, $context, $lang, $format) $string = substr($buffer, 0, $ls); // Adjust the buffer based on the last space for the next iteration and trim. - $buffer = JString::trim(substr($buffer, $ls)); + $buffer = StringHelper::trim(substr($buffer, $ls)); } // No space character was found. else @@ -420,11 +506,51 @@ private function tokenizeToDbShort($input, $context, $lang, $format, $count) * @since 2.5 * @throws Exception on database error. */ - abstract protected function addTokensToDb($tokens, $context = ''); + protected function addTokensToDb($tokens, $context = '') + { + // Get the database object. + $db = $this->db; + + $query = clone $this->addTokensToDbQueryTemplate; + + // Check if a single FinderIndexerToken object was given and make it to be an array of FinderIndexerToken objects + $tokens = is_array($tokens) ? $tokens : array($tokens); + + // Count the number of token values. + $values = 0; + + // Break into chunks of no more than 1000 items + $chunks = array_chunk($tokens, 1000); + + foreach ($chunks as $tokens) + { + $query->clear('values'); + + // Iterate through the tokens to create SQL value sets. + foreach ($tokens as $token) + { + $query->values( + $db->quote($token->term) . ', ' + . $db->quote($token->stem) . ', ' + . (int) $token->common . ', ' + . (int) $token->phrase . ', ' + . (float) $token->weight . ', ' + . (int) $context . ', ' + . $db->quote($token->language) + ); + ++$values; + } + + $db->setQuery($query)->execute(); + } + + return $values; + } /** - * Method to switch the token tables from Memory tables to MyISAM tables + * Method to switch the token tables from Memory tables to Disk tables * when they are close to running out of memory. + * Since this is not supported/implemented in all DB-drivers, the default is a stub method, which simply returns true. * * @param boolean $memory Flag to control how they should be toggled. * @@ -433,5 +559,8 @@ abstract protected function addTokensToDb($tokens, $context = ''); * @since 2.5 * @throws Exception on database error. */ - abstract protected function toggleTables($memory); + protected function toggleTables($memory) + { + return true; + } } diff --git a/administrator/components/com_finder/helpers/indexer/parser.php b/administrator/components/com_finder/helpers/indexer/parser.php index 943f0b5c6c12f..9237195a3be18 100644 --- a/administrator/components/com_finder/helpers/indexer/parser.php +++ b/administrator/components/com_finder/helpers/indexer/parser.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/helpers/indexer/parser/html.php b/administrator/components/com_finder/helpers/indexer/parser/html.php index f7f3fcf2cac5e..4bf1e79b8dfce 100644 --- a/administrator/components/com_finder/helpers/indexer/parser/html.php +++ b/administrator/components/com_finder/helpers/indexer/parser/html.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/helpers/indexer/parser/rtf.php b/administrator/components/com_finder/helpers/indexer/parser/rtf.php index 37872f5f2f773..fbb2563d2c4db 100644 --- a/administrator/components/com_finder/helpers/indexer/parser/rtf.php +++ b/administrator/components/com_finder/helpers/indexer/parser/rtf.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/helpers/indexer/parser/txt.php b/administrator/components/com_finder/helpers/indexer/parser/txt.php index a58aa646163a3..4b8b516823589 100644 --- a/administrator/components/com_finder/helpers/indexer/parser/txt.php +++ b/administrator/components/com_finder/helpers/indexer/parser/txt.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/helpers/indexer/query.php b/administrator/components/com_finder/helpers/indexer/query.php index fd83b4509ed7b..02850fc13f73c 100644 --- a/administrator/components/com_finder/helpers/indexer/query.php +++ b/administrator/components/com_finder/helpers/indexer/query.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -244,9 +244,8 @@ public function __construct($options) // Remove the temporary date storage. unset($this->dates); - /* - * Lastly, determine whether this query can return a result set. - */ + // Lastly, determine whether this query can return a result set. + // Check if we have a query string. if (!empty($this->input)) { @@ -346,9 +345,10 @@ public function toUri($base = null) // Get the menu item id. $query = array( 'view' => $uri->getVar('view'), - 'f' => $uri->getVar('f'), - 'q' => $uri->getVar('q') + 'f' => $uri->getVar('f'), + 'q' => $uri->getVar('q'), ); + $item = FinderHelperRoute::getItemid($query); // Add the menu item id if present. @@ -742,7 +742,7 @@ protected function processString($input, $lang, $mode) */ $patterns = array( 'before' => JText::_('COM_FINDER_FILTER_WHEN_BEFORE'), - 'after' => JText::_('COM_FINDER_FILTER_WHEN_AFTER') + 'after' => JText::_('COM_FINDER_FILTER_WHEN_AFTER'), ); // Add the taxonomy branch titles to the possible patterns. @@ -753,7 +753,7 @@ protected function processString($input, $lang, $mode) } // Container for search terms and phrases. - $terms = array(); + $terms = array(); $phrases = array(); // Cleared filter branches. @@ -844,7 +844,7 @@ protected function processString($input, $lang, $mode) } break; - } + } } // Clean up the input string again. @@ -964,8 +964,8 @@ protected function processString($input, $lang, $mode) // An array of our boolean operators. $operator => $translation $operators = array( 'AND' => StringHelper::strtolower(JText::_('COM_FINDER_QUERY_OPERATOR_AND')), - 'OR' => StringHelper::strtolower(JText::_('COM_FINDER_QUERY_OPERATOR_OR')), - 'NOT' => StringHelper::strtolower(JText::_('COM_FINDER_QUERY_OPERATOR_NOT')) + 'OR' => StringHelper::strtolower(JText::_('COM_FINDER_QUERY_OPERATOR_OR')), + 'NOT' => StringHelper::strtolower(JText::_('COM_FINDER_QUERY_OPERATOR_NOT')), ); // If language debugging is enabled you need to ignore the debug strings in matching. diff --git a/administrator/components/com_finder/helpers/indexer/result.php b/administrator/components/com_finder/helpers/indexer/result.php index 623c57d753bba..58629d069bf27 100644 --- a/administrator/components/com_finder/helpers/indexer/result.php +++ b/administrator/components/com_finder/helpers/indexer/result.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -40,10 +40,10 @@ class FinderIndexerResult */ protected $instructions = array( FinderIndexer::TITLE_CONTEXT => array('title', 'subtitle', 'id'), - FinderIndexer::TEXT_CONTEXT => array('summary', 'body'), - FinderIndexer::META_CONTEXT => array('meta', 'list_price', 'sale_price'), - FinderIndexer::PATH_CONTEXT => array('path', 'alias'), - FinderIndexer::MISC_CONTEXT => array('comments') + FinderIndexer::TEXT_CONTEXT => array('summary', 'body'), + FinderIndexer::META_CONTEXT => array('meta', 'list_price', 'sale_price'), + FinderIndexer::PATH_CONTEXT => array('path', 'alias'), + FinderIndexer::MISC_CONTEXT => array('comments'), ); /** @@ -272,6 +272,18 @@ public function getElement($name) return null; } + /** + * Method to retrieve all elements. + * + * @return array The elements + * + * @since 3.8.3 + */ + public function getElements() + { + return $this->elements; + } + /** * Method to set additional element values in the elements array. * diff --git a/administrator/components/com_finder/helpers/indexer/stemmer.php b/administrator/components/com_finder/helpers/indexer/stemmer.php index f1853a59d4809..15ecc7cbb55cd 100644 --- a/administrator/components/com_finder/helpers/indexer/stemmer.php +++ b/administrator/components/com_finder/helpers/indexer/stemmer.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/helpers/indexer/stemmer/fr.php b/administrator/components/com_finder/helpers/indexer/stemmer/fr.php index 6d0d77cc663fd..8aa080efc5fff 100644 --- a/administrator/components/com_finder/helpers/indexer/stemmer/fr.php +++ b/administrator/components/com_finder/helpers/indexer/stemmer/fr.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -199,7 +199,7 @@ private static function check($reversed_stem) } // And at least one of these must be a vowel or "y" - return (preg_match('/[' . $vars['vowels'] . ']/', utf8_encode($reversed_stem))); + return preg_match('/[' . $vars['vowels'] . ']/', utf8_encode($reversed_stem)); } } @@ -234,7 +234,7 @@ private static function getStem($input) $rule = $vars['rules'][$rule_number]; preg_match($vars['rule_pattern'], $rule, $matches); - if (($matches[2] != '*') || ($intact)) + if ($matches[2] != '*' || $intact) { $reversed_stem = utf8_decode($matches[4]) . substr($reversed_input, $matches[3], strlen($reversed_input) - $matches[3]); diff --git a/administrator/components/com_finder/helpers/indexer/stemmer/porter_en.php b/administrator/components/com_finder/helpers/indexer/stemmer/porter_en.php index 59b561a2465ef..663cc6cf26f55 100644 --- a/administrator/components/com_finder/helpers/indexer/stemmer/porter_en.php +++ b/administrator/components/com_finder/helpers/indexer/stemmer/porter_en.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -95,13 +95,13 @@ private static function step1ab($word) if (substr($word, -1) == 's') { self::replace($word, 'sses', 'ss') - or self::replace($word, 'ies', 'i') - or self::replace($word, 'ss', 'ss') - or self::replace($word, 's', ''); + || self::replace($word, 'ies', 'i') + || self::replace($word, 'ss', 'ss') + || self::replace($word, 's', ''); } // Part b - if (substr($word, -2, 1) != 'e' or !self::replace($word, 'eed', 'ee', 0)) + if (substr($word, -2, 1) != 'e' || !self::replace($word, 'eed', 'ee', 0)) { // First rule $v = self::$regex_vowel; @@ -109,17 +109,17 @@ private static function step1ab($word) // Words ending with ing and ed // Note use of && and OR, for precedence reasons if (preg_match("#$v+#", substr($word, 0, -3)) && self::replace($word, 'ing', '') - or preg_match("#$v+#", substr($word, 0, -2)) && self::replace($word, 'ed', '')) + || preg_match("#$v+#", substr($word, 0, -2)) && self::replace($word, 'ed', '')) { // If one of above two test successful - if (!self::replace($word, 'at', 'ate') and !self::replace($word, 'bl', 'ble') and !self::replace($word, 'iz', 'ize')) + if (!self::replace($word, 'at', 'ate') && !self::replace($word, 'bl', 'ble') && !self::replace($word, 'iz', 'ize')) { // Double consonant ending - if (self::doubleConsonant($word) and substr($word, -2) != 'll' and substr($word, -2) != 'ss' and substr($word, -2) != 'zz') + if (self::doubleConsonant($word) && substr($word, -2) != 'll' && substr($word, -2) != 'ss' && substr($word, -2) != 'zz') { $word = substr($word, 0, -1); } - elseif (self::m($word) == 1 and self::cvc($word)) + elseif (self::m($word) == 1 && self::cvc($word)) { $word .= 'e'; } @@ -166,11 +166,11 @@ private static function step2($word) { case 'a': self::replace($word, 'ational', 'ate', 0) - or self::replace($word, 'tional', 'tion', 0); + || self::replace($word, 'tional', 'tion', 0); break; case 'c': self::replace($word, 'enci', 'ence', 0) - or self::replace($word, 'anci', 'ance', 0); + || self::replace($word, 'anci', 'ance', 0); break; case 'e': self::replace($word, 'izer', 'ize', 0); @@ -180,26 +180,26 @@ private static function step2($word) break; case 'l': self::replace($word, 'entli', 'ent', 0) - or self::replace($word, 'ousli', 'ous', 0) - or self::replace($word, 'alli', 'al', 0) - or self::replace($word, 'bli', 'ble', 0) - or self::replace($word, 'eli', 'e', 0); + || self::replace($word, 'ousli', 'ous', 0) + || self::replace($word, 'alli', 'al', 0) + || self::replace($word, 'bli', 'ble', 0) + || self::replace($word, 'eli', 'e', 0); break; case 'o': self::replace($word, 'ization', 'ize', 0) - or self::replace($word, 'ation', 'ate', 0) - or self::replace($word, 'ator', 'ate', 0); + || self::replace($word, 'ation', 'ate', 0) + || self::replace($word, 'ator', 'ate', 0); break; case 's': self::replace($word, 'iveness', 'ive', 0) - or self::replace($word, 'fulness', 'ful', 0) - or self::replace($word, 'ousness', 'ous', 0) - or self::replace($word, 'alism', 'al', 0); + || self::replace($word, 'fulness', 'ful', 0) + || self::replace($word, 'ousness', 'ous', 0) + || self::replace($word, 'alism', 'al', 0); break; case 't': self::replace($word, 'biliti', 'ble', 0) - or self::replace($word, 'aliti', 'al', 0) - or self::replace($word, 'iviti', 'ive', 0); + || self::replace($word, 'aliti', 'al', 0) + || self::replace($word, 'iviti', 'ive', 0); break; } @@ -227,7 +227,7 @@ private static function step3($word) break; case 't': self::replace($word, 'icate', 'ic', 0) - or self::replace($word, 'iciti', 'ic', 0); + || self::replace($word, 'iciti', 'ic', 0); break; case 'u': self::replace($word, 'ful', '', 0); @@ -260,8 +260,8 @@ private static function step4($word) self::replace($word, 'al', '', 1); break; case 'c': - self::replace($word, 'ance', '', 1) - or self::replace($word, 'ence', '', 1); + self::replace($word, 'ance', '', 1) + || self::replace($word, 'ence', '', 1); break; case 'e': self::replace($word, 'er', '', 1); @@ -271,16 +271,16 @@ private static function step4($word) break; case 'l': self::replace($word, 'able', '', 1) - or self::replace($word, 'ible', '', 1); + || self::replace($word, 'ible', '', 1); break; case 'n': self::replace($word, 'ant', '', 1) - or self::replace($word, 'ement', '', 1) - or self::replace($word, 'ment', '', 1) - or self::replace($word, 'ent', '', 1); + || self::replace($word, 'ement', '', 1) + || self::replace($word, 'ment', '', 1) + || self::replace($word, 'ent', '', 1); break; case 'o': - if (substr($word, -4) == 'tion' or substr($word, -4) == 'sion') + if (substr($word, -4) == 'tion' || substr($word, -4) == 'sion') { self::replace($word, 'ion', '', 1); } @@ -293,8 +293,8 @@ private static function step4($word) self::replace($word, 'ism', '', 1); break; case 't': - self::replace($word, 'ate', '', 1) - or self::replace($word, 'iti', '', 1); + self::replace($word, 'ate', '', 1) + || self::replace($word, 'iti', '', 1); break; case 'u': self::replace($word, 'ous', '', 1); @@ -338,7 +338,7 @@ private static function step5($word) } // Part b - if (self::m($word) > 1 and self::doubleConsonant($word) and substr($word, -1) == 'l') + if (self::m($word) > 1 && self::doubleConsonant($word) && substr($word, -1) == 'l') { $word = substr($word, 0, -1); } @@ -350,7 +350,7 @@ private static function step5($word) * Replaces the first string with the second, at the end of the string. If third * arg is given, then the preceding string must match that m count at least. * - * @param string &$str String to check + * @param string $str String to check * @param string $check Ending to check for * @param string $repl Replacement string * @param integer $m Optional minimum number of m() to meet @@ -369,7 +369,7 @@ private static function replace(&$str, $check, $repl, $m = null) { $substr = substr($str, 0, $len); - if (is_null($m) or self::m($substr) > $m) + if (is_null($m) || self::m($substr) > $m) { $str = $substr . $repl; } @@ -423,7 +423,7 @@ private static function doubleConsonant($str) { $c = self::$regex_consonant; - return preg_match("#$c{2}$#", $str, $matches) and $matches[0]{0} == $matches[0]{1}; + return preg_match("#$c{2}$#", $str, $matches) && $matches[0]{0} == $matches[0]{1}; } /** @@ -440,7 +440,7 @@ private static function cvc($str) $c = self::$regex_consonant; $v = self::$regex_vowel; - return preg_match("#($c$v$c)$#", $str, $matches) and strlen($matches[1]) == 3 and $matches[1]{2} != 'w' and $matches[1]{2} != 'x' - and $matches[1]{2} != 'y'; + return preg_match("#($c$v$c)$#", $str, $matches) && strlen($matches[1]) == 3 && $matches[1]{2} != 'w' && $matches[1]{2} != 'x' + && $matches[1]{2} != 'y'; } } diff --git a/administrator/components/com_finder/helpers/indexer/stemmer/snowball.php b/administrator/components/com_finder/helpers/indexer/stemmer/snowball.php index e691d870714fd..44a8899654a72 100644 --- a/administrator/components/com_finder/helpers/indexer/stemmer/snowball.php +++ b/administrator/components/com_finder/helpers/indexer/stemmer/snowball.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/helpers/indexer/taxonomy.php b/administrator/components/com_finder/helpers/indexer/taxonomy.php index 1f022f8d27ed6..92637310965b5 100644 --- a/administrator/components/com_finder/helpers/indexer/taxonomy.php +++ b/administrator/components/com_finder/helpers/indexer/taxonomy.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/helpers/indexer/token.php b/administrator/components/com_finder/helpers/indexer/token.php index b359fd52f0704..ec8040983605d 100644 --- a/administrator/components/com_finder/helpers/indexer/token.php +++ b/administrator/components/com_finder/helpers/indexer/token.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/helpers/language.php b/administrator/components/com_finder/helpers/language.php index 3a84cb8ff3abb..dce9e644e5edb 100644 --- a/administrator/components/com_finder/helpers/language.php +++ b/administrator/components/com_finder/helpers/language.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -29,7 +29,7 @@ public static function branchPlural($branchName) { $return = preg_replace('/[^a-zA-Z0-9]+/', '_', strtoupper($branchName)); - if ($return != '_') + if ($return !== '_') { return 'PLG_FINDER_QUERY_FILTER_BRANCH_P_' . $return; } @@ -66,13 +66,14 @@ public static function branchLanguageTitle($branchName) { $title = $branchName; - if ($branchName == '*') + if ($branchName === '*') { $title = JText::_('JALL_LANGUAGE'); } else { $languages = JLanguageHelper::getLanguages('lang_code'); + if (isset($languages[$branchName])) { $title = $languages[$branchName]->title; diff --git a/administrator/components/com_finder/models/fields/branches.php b/administrator/components/com_finder/models/fields/branches.php index bd3b8f6b7bc78..5e36f32971a76 100644 --- a/administrator/components/com_finder/models/fields/branches.php +++ b/administrator/components/com_finder/models/fields/branches.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_BASE') or die(); diff --git a/administrator/components/com_finder/models/fields/contentmap.php b/administrator/components/com_finder/models/fields/contentmap.php index 0f55e16111952..0bf38efc87555 100644 --- a/administrator/components/com_finder/models/fields/contentmap.php +++ b/administrator/components/com_finder/models/fields/contentmap.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_PLATFORM') or die; @@ -93,7 +93,7 @@ protected function getGroups() { $levelPrefix = str_repeat('- ', max(0, $branch->level - 1)); - if (trim($name, '**') == 'Language') + if (trim($name, '**') === 'Language') { $text = FinderHelperLanguage::branchLanguageTitle($branch->text); } diff --git a/administrator/components/com_finder/models/fields/contenttypes.php b/administrator/components/com_finder/models/fields/contenttypes.php index 9cdbda8b583bd..013f833a16caa 100644 --- a/administrator/components/com_finder/models/fields/contenttypes.php +++ b/administrator/components/com_finder/models/fields/contenttypes.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_BASE') or die(); diff --git a/administrator/components/com_finder/models/fields/directories.php b/administrator/components/com_finder/models/fields/directories.php index 890612c8727bc..49dc6c995725f 100644 --- a/administrator/components/com_finder/models/fields/directories.php +++ b/administrator/components/com_finder/models/fields/directories.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/models/fields/searchfilter.php b/administrator/components/com_finder/models/fields/searchfilter.php index 371ca13ecdab9..07fa70aadb885 100644 --- a/administrator/components/com_finder/models/fields/searchfilter.php +++ b/administrator/components/com_finder/models/fields/searchfilter.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_BASE') or die(); diff --git a/administrator/components/com_finder/models/filter.php b/administrator/components/com_finder/models/filter.php index fde588a811e63..3c9290271dc99 100644 --- a/administrator/components/com_finder/models/filter.php +++ b/administrator/components/com_finder/models/filter.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -163,13 +163,11 @@ protected function loadFormData() */ public function getTotal() { - $db = JFactory::getDbo(); + $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select('MAX(link_id)') ->from('#__finder_links'); - $db->setQuery($query); - $total = $db->loadResult(); - return $total; + return $db->setQuery($query)->loadResult(); } } diff --git a/administrator/components/com_finder/models/filters.php b/administrator/components/com_finder/models/filters.php index 3f33df3b23944..48e8e0ca3c2cf 100644 --- a/administrator/components/com_finder/models/filters.php +++ b/administrator/components/com_finder/models/filters.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/models/forms/filter.xml b/administrator/components/com_finder/models/forms/filter.xml index b0a311e78ac4b..f281aa884712c 100644 --- a/administrator/components/com_finder/models/forms/filter.xml +++ b/administrator/components/com_finder/models/forms/filter.xml @@ -1,20 +1,36 @@
    - + - + - + hint="JFIELD_ALIAS_PLACEHOLDER" + size="45" + /> - + - - + + - - - + + - - - + filter="intval" + size="1" + default="1" + > + + + name="map_count" + type="text" + label="COM_FINDER_FILTER_MAP_COUNT" + description="COM_FINDER_FILTER_MAP_COUNT_DESCRIPTION" + class="readonly" + size="10" + default="0" + readonly="true" + />
    @@ -82,14 +126,16 @@ label="COM_FINDER_FILTER_WHEN_START_DATE_LABEL" description="COM_FINDER_FILTER_WHEN_START_DATE_DESCRIPTION" default="" - filter="string"> + filter="string" + > - + filter="string" + > diff --git a/administrator/components/com_finder/models/forms/filter_filters.xml b/administrator/components/com_finder/models/forms/filter_filters.xml index f125a445c87e4..f5ea1528f992b 100644 --- a/administrator/components/com_finder/models/forms/filter_filters.xml +++ b/administrator/components/com_finder/models/forms/filter_filters.xml @@ -8,17 +8,19 @@ description="COM_FINDER_SEARCH_FILTER_SEARCH_DESC" hint="JSEARCH_FILTER" /> + + JGRID_HEADING_ID_ASC + + + + COM_FINDER_FILTER_SELECT_CONTENT_MAP + COM_FINDER_INDEX_HEADING_LINK_URL_ASC + + + + JOPTION_SELECT_MAX_LEVELS + JSTATUS_ASC + getState('list.ordering', 'l.title'); $listDir = $this->getState('list.direction', 'ASC'); - if ($listOrder == 't.title') + if ($listOrder === 't.title') { $ordering = $db->quoteName('t.title') . ' ' . $db->escape($listDir) . ', ' . $db->quoteName('l.title') . ' ' . $db->escape($listDir); } @@ -287,7 +287,7 @@ protected function getStoreId($id = '') /** * Gets the total of indexed items. * - * @return int The total of indexed items. + * @return integer The total of indexed items. * * @since 3.6.0 */ @@ -395,7 +395,7 @@ protected function populateState($ordering = 'l.title', $direction = 'asc') /** * Method to change the published state of one or more records. * - * @param array &$pks A list of the primary keys to change. + * @param array $pks A list of the primary keys to change. * @param integer $value The value of the published state. [optional] * * @return boolean True on success. @@ -417,16 +417,13 @@ public function publish(&$pks, $value = 1) { $table->reset(); - if ($table->load($pk)) + if ($table->load($pk) && !$this->canEditState($table)) { - if (!$this->canEditState($table)) - { - // Prune items that you can't change. - unset($pks[$i]); - $this->setError(JText::_('JLIB_APPLICATION_ERROR_EDITSTATE_NOT_PERMITTED')); + // Prune items that you can't change. + unset($pks[$i]); + $this->setError(JText::_('JLIB_APPLICATION_ERROR_EDITSTATE_NOT_PERMITTED')); - return false; - } + return false; } } diff --git a/administrator/components/com_finder/models/indexer.php b/administrator/components/com_finder/models/indexer.php index 107dc4e6c26e9..0a4d03ed93ed7 100644 --- a/administrator/components/com_finder/models/indexer.php +++ b/administrator/components/com_finder/models/indexer.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/models/maps.php b/administrator/components/com_finder/models/maps.php index 7b767d68b52a2..1dc75b1f68820 100644 --- a/administrator/components/com_finder/models/maps.php +++ b/administrator/components/com_finder/models/maps.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die(); @@ -71,7 +71,7 @@ protected function canEditState($record) /** * Method to delete one or more records. * - * @param array &$pks An array of record primary keys. + * @param array $pks An array of record primary keys. * * @return boolean True if successful, false if an error occurs. * @@ -225,11 +225,11 @@ protected function getListQuery() $listOrdering = $this->getState('list.ordering', 'd.branch_title'); $listDirn = $this->getState('list.direction', 'ASC'); - if ($listOrdering == 'd.branch_title') + if ($listOrdering === 'd.branch_title') { $query->order("branch_title $listDirn, level ASC, a.title $listDirn"); } - elseif ($listOrdering == 'a.state') + elseif ($listOrdering === 'a.state') { $query->order("a.state $listDirn, branch_title $listDirn, level ASC"); } @@ -323,7 +323,7 @@ protected function populateState($ordering = 'd.branch_title', $direction = 'ASC /** * Method to change the published state of one or more records. * - * @param array &$pks A list of the primary keys to change. + * @param array $pks A list of the primary keys to change. * @param integer $value The value of the published state. [optional] * * @return boolean True on success. @@ -345,16 +345,13 @@ public function publish(&$pks, $value = 1) { $table->reset(); - if ($table->load($pk)) + if ($table->load($pk) && !$this->canEditState($table)) { - if (!$this->canEditState($table)) - { - // Prune items that you can't change. - unset($pks[$i]); - $this->setError(JText::_('JLIB_APPLICATION_ERROR_EDITSTATE_NOT_PERMITTED')); + // Prune items that you can't change. + unset($pks[$i]); + $this->setError(JText::_('JLIB_APPLICATION_ERROR_EDITSTATE_NOT_PERMITTED')); - return false; - } + return false; } } diff --git a/administrator/components/com_finder/models/statistics.php b/administrator/components/com_finder/models/statistics.php index eb9b361631dc0..a301d9b342f3f 100644 --- a/administrator/components/com_finder/models/statistics.php +++ b/administrator/components/com_finder/models/statistics.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/tables/filter.php b/administrator/components/com_finder/tables/filter.php index 32a68ea75a339..35cc290d70353 100644 --- a/administrator/components/com_finder/tables/filter.php +++ b/administrator/components/com_finder/tables/filter.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -22,7 +22,7 @@ class FinderTableFilter extends JTable /** * Constructor * - * @param JDatabaseDriver &$db JDatabaseDriver connector object. + * @param JDatabaseDriver $db JDatabaseDriver connector object. * * @since 2.5 */ @@ -67,14 +67,14 @@ public function bind($array, $ignore = '') */ public function check() { - if (trim($this->alias) == '') + if (trim($this->alias) === '') { $this->alias = $this->title; } $this->alias = JApplicationHelper::stringURLSafe($this->alias); - if (trim(str_replace('-', '', $this->alias)) == '') + if (trim(str_replace('-', '', $this->alias)) === '') { $this->alias = JFactory::getDate()->format('Y-m-d-H-i-s'); } @@ -168,12 +168,12 @@ public function publish($pks = null, $state = 1, $userId = 0) } // If checkin is supported and all rows were adjusted, check them in. - if ($checkin && (count($pks) == $this->_db->getAffectedRows())) + if ($checkin && count($pks) === $this->_db->getAffectedRows()) { // Checkin the rows. foreach ($pks as $pk) { - $this->checkin($pk); + $this->checkIn($pk); } } @@ -240,7 +240,7 @@ public function store($updateNulls = false) } // Verify that the alias is unique - $table = JTable::getInstance('Filter', 'FinderTable'); + $table = JTable::getInstance('Filter', 'FinderTable', array('dbo' => $this->_db)); if ($table->load(array('alias' => $this->alias)) && ($table->filter_id != $this->filter_id || $this->filter_id == 0)) { diff --git a/administrator/components/com_finder/tables/link.php b/administrator/components/com_finder/tables/link.php index f3b47e8251d34..7f8e6fbe8d0c6 100644 --- a/administrator/components/com_finder/tables/link.php +++ b/administrator/components/com_finder/tables/link.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -19,7 +19,7 @@ class FinderTableLink extends JTable /** * Constructor * - * @param JDatabaseDriver &$db JDatabaseDriver connector object. + * @param JDatabaseDriver $db JDatabaseDriver connector object. * * @since 2.5 */ diff --git a/administrator/components/com_finder/tables/map.php b/administrator/components/com_finder/tables/map.php index 6d2f9d9b618d1..cdb07f0d7682a 100644 --- a/administrator/components/com_finder/tables/map.php +++ b/administrator/components/com_finder/tables/map.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -21,7 +21,7 @@ class FinderTableMap extends JTable /** * Constructor * - * @param JDatabaseDriver &$db JDatabaseDriver connector object. + * @param JDatabaseDriver $db JDatabaseDriver connector object. * * @since 2.5 */ diff --git a/administrator/components/com_finder/views/filter/tmpl/edit.php b/administrator/components/com_finder/views/filter/tmpl/edit.php index e8c7a6bdeac2c..822d0bd036d32 100644 --- a/administrator/components/com_finder/views/filter/tmpl/edit.php +++ b/administrator/components/com_finder/views/filter/tmpl/edit.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -12,6 +12,7 @@ JHtml::_('behavior.formvalidator'); JHtml::_('behavior.keepalive'); JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('behavior.tabstate'); JFactory::getDocument()->addScriptDeclaration(' Joomla.submitbutton = function(task) @@ -70,7 +71,7 @@
    form->renderField('map_count'); ?>
    - diff --git a/administrator/components/com_finder/views/filter/view.html.php b/administrator/components/com_finder/views/filter/view.html.php index fa7140476bb02..a34c3216705d0 100644 --- a/administrator/components/com_finder/views/filter/view.html.php +++ b/administrator/components/com_finder/views/filter/view.html.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -20,6 +20,8 @@ class FinderViewFilter extends JViewLegacy * The filter object * * @var FinderTableFilter + * + * @since 3.6.2 */ protected $filter; @@ -27,23 +29,38 @@ class FinderViewFilter extends JViewLegacy * The JForm object * * @var JForm + * + * @since 3.6.2 */ protected $form; /** * The active item * - * @var object + * @var JObject|boolean + * + * @since 3.6.2 */ protected $item; /** * The model state * - * @var object + * @var mixed + * + * @since 3.6.2 */ protected $state; + /** + * The total indexed items + * + * @var integer + * + * @since 3.8.0 + */ + protected $total; + /** * Method to display the view. * @@ -65,9 +82,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); @@ -116,19 +131,16 @@ protected function addToolbar() else { // Can't save the record if it's checked out. - if (!$checkedOut) + // Since it's an existing record, check the edit permission. + if (!$checkedOut && $canDo->get('core.edit')) { - // Since it's an existing record, check the edit permission. - if ($canDo->get('core.edit')) + JToolbarHelper::apply('filter.apply'); + JToolbarHelper::save('filter.save'); + + // We can save this record, but check the create permission to see if we can return to make a new one. + if ($canDo->get('core.create')) { - JToolbarHelper::apply('filter.apply'); - JToolbarHelper::save('filter.save'); - - // We can save this record, but check the create permission to see if we can return to make a new one. - if ($canDo->get('core.create')) - { - JToolbarHelper::save2new('filter.save2new'); - } + JToolbarHelper::save2new('filter.save2new'); } } diff --git a/administrator/components/com_finder/views/filters/tmpl/default.php b/administrator/components/com_finder/views/filters/tmpl/default.php index f177ad7804cce..b8ccb6f458d03 100644 --- a/administrator/components/com_finder/views/filters/tmpl/default.php +++ b/administrator/components/com_finder/views/filters/tmpl/default.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -88,43 +88,47 @@ authorise('core.create', 'com_finder'); + $canEdit = $user->authorise('core.edit', 'com_finder'); + $userAuthoriseCoreManage = $user->authorise('core.manage', 'com_checkin'); + $userAuthoriseCoreEditState = $user->authorise('core.edit.state', 'com_finder'); + $userId = $user->get('id'); foreach ($this->items as $i => $item) : - $canCreate = $user->authorise('core.create', 'com_finder'); - $canEdit = $user->authorise('core.edit', 'com_finder'); - $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->get('id') || $item->checked_out == 0; - $canChange = $user->authorise('core.edit.state', 'com_finder') && $canCheckin; - ?> - - - filter_id); ?> - - - state, $i, 'filters.', $canChange); ?> - - - checked_out) : ?> - editor, $item->checked_out_time, 'filters.', $canCheckin); ?> - - - - escape($item->title); ?> - - escape($item->title); ?> - - - - created_by_alias ? $item->created_by_alias : $item->user_name; ?> - - - created, JText::_('DATE_FORMAT_LC4')); ?> - - - map_count; ?> - - - filter_id; ?> - - + $canCheckIn = $userAuthoriseCoreManage || $item->checked_out == $userId || $item->checked_out == 0; + $canChange = $userAuthoriseCoreEditState && $canCheckIn; + $escapedTitle = $this->escape($item->title); + ?> + + + filter_id); ?> + + + state, $i, 'filters.', $canChange); ?> + + + checked_out) : ?> + editor, $item->checked_out_time, 'filters.', $canCheckIn); ?> + + + + + + + + + + created_by_alias ?: $item->user_name; ?> + + + created, JText::_('DATE_FORMAT_LC4')); ?> + + + map_count; ?> + + + filter_id; ?> + + diff --git a/administrator/components/com_finder/views/filters/view.html.php b/administrator/components/com_finder/views/filters/view.html.php index e557b22c746c0..1cf544b525cfe 100644 --- a/administrator/components/com_finder/views/filters/view.html.php +++ b/administrator/components/com_finder/views/filters/view.html.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -20,6 +20,8 @@ class FinderViewFilters extends JViewLegacy * An array of items * * @var array + * + * @since 3.6.1 */ protected $items; @@ -27,6 +29,8 @@ class FinderViewFilters extends JViewLegacy * The pagination object * * @var JPagination + * + * @since 3.6.1 */ protected $pagination; @@ -34,20 +38,26 @@ class FinderViewFilters extends JViewLegacy * The HTML markup for the sidebar * * @var string + * + * @since 3.6.1 */ protected $sidebar; /** * The model state * - * @var object + * @var mixed + * + * @since 3.6.1 */ protected $state; /** * The total number of items * - * @var object + * @var integer + * + * @since 3.6.1 */ protected $total; @@ -75,9 +85,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); diff --git a/administrator/components/com_finder/views/index/tmpl/default.php b/administrator/components/com_finder/views/index/tmpl/default.php index 87a097e4be91b..422e6ad71c6f1 100644 --- a/administrator/components/com_finder/views/index/tmpl/default.php +++ b/administrator/components/com_finder/views/index/tmpl/default.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -118,7 +118,7 @@ indexdate, JText::_('DATE_FORMAT_LC4')); ?> - publish_start_date) or intval($item->publish_end_date) or intval($item->start_date) or intval($item->end_date)) : ?> + publish_start_date || (int) $item->publish_end_date || (int) $item->start_date || (int) $item->end_date) : ?> publish_start_date, $item->publish_end_date, $item->start_date, $item->end_date); ?> diff --git a/administrator/components/com_finder/views/index/view.html.php b/administrator/components/com_finder/views/index/view.html.php index 53fc3f7e27f1e..a30d5c87bf2b2 100644 --- a/administrator/components/com_finder/views/index/view.html.php +++ b/administrator/components/com_finder/views/index/view.html.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -22,6 +22,8 @@ class FinderViewIndex extends JViewLegacy * An array of items * * @var array + * + * @since 3.6.1 */ protected $items; @@ -29,6 +31,8 @@ class FinderViewIndex extends JViewLegacy * The pagination object * * @var JPagination + * + * @since 3.6.1 */ protected $pagination; @@ -36,6 +40,8 @@ class FinderViewIndex extends JViewLegacy * The state of core Smart Search plugins * * @var array + * + * @since 3.6.1 */ protected $pluginState; @@ -43,20 +49,26 @@ class FinderViewIndex extends JViewLegacy * The HTML markup for the sidebar * * @var string + * + * @since 3.6.1 */ protected $sidebar; /** * The model state * - * @var object + * @var mixed + * + * @since 3.6.1 */ protected $state; /** * The total number of items * - * @var object + * @var integer + * + * @since 3.6.1 */ protected $total; diff --git a/administrator/components/com_finder/views/indexer/tmpl/default.php b/administrator/components/com_finder/views/indexer/tmpl/default.php index fb27f4f0ea5a9..53c8098c1881f 100644 --- a/administrator/components/com_finder/views/indexer/tmpl/default.php +++ b/administrator/components/com_finder/views/indexer/tmpl/default.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/views/indexer/view.html.php b/administrator/components/com_finder/views/indexer/view.html.php index 4f86a099052aa..3f17744a1ba79 100644 --- a/administrator/components/com_finder/views/indexer/view.html.php +++ b/administrator/components/com_finder/views/indexer/view.html.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_finder/views/maps/tmpl/default.php b/administrator/components/com_finder/views/maps/tmpl/default.php index 8e48034755864..ec06d97b1916f 100644 --- a/administrator/components/com_finder/views/maps/tmpl/default.php +++ b/administrator/components/com_finder/views/maps/tmpl/default.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -99,7 +99,7 @@ parent_title, '**') == 'Language') + if (trim($item->parent_title, '**') === 'Language') { $title = FinderHelperLanguage::branchLanguageTitle($item->title); } @@ -115,7 +115,7 @@ - escape(trim($title, '**')) == 'Language' && JLanguageMultilang::isEnabled()) : ?> + escape(trim($title, '**')) === 'Language' && JLanguageMultilang::isEnabled()) : ?> diff --git a/administrator/components/com_finder/views/maps/view.html.php b/administrator/components/com_finder/views/maps/view.html.php index e0f3287594f33..31a0d0f4da49a 100644 --- a/administrator/components/com_finder/views/maps/view.html.php +++ b/administrator/components/com_finder/views/maps/view.html.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -22,6 +22,8 @@ class FinderViewMaps extends JViewLegacy * An array of items * * @var array + * + * @since 3.6.1 */ protected $items; @@ -29,6 +31,8 @@ class FinderViewMaps extends JViewLegacy * The pagination object * * @var JPagination + * + * @since 3.6.1 */ protected $pagination; @@ -36,6 +40,8 @@ class FinderViewMaps extends JViewLegacy * The HTML markup for the sidebar * * @var string + * + * @since 3.6.1 */ protected $sidebar; @@ -43,6 +49,8 @@ class FinderViewMaps extends JViewLegacy * The model state * * @var object + * + * @since 3.6.1 */ protected $state; @@ -50,6 +58,8 @@ class FinderViewMaps extends JViewLegacy * The total number of items * * @var object + * + * @since 3.6.1 */ protected $total; @@ -80,9 +90,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); diff --git a/administrator/components/com_finder/views/statistics/tmpl/default.php b/administrator/components/com_finder/views/statistics/tmpl/default.php index b163df4dc7f5d..3ae82a5066255 100644 --- a/administrator/components/com_finder/views/statistics/tmpl/default.php +++ b/administrator/components/com_finder/views/statistics/tmpl/default.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -34,7 +34,7 @@ type_title); $lang_string = JText::_($lang_key); - echo ($lang_string == $lang_key) ? $type->type_title : $lang_string; + echo $lang_string === $lang_key ? $type->type_title : $lang_string; ?> diff --git a/administrator/components/com_finder/views/statistics/view.html.php b/administrator/components/com_finder/views/statistics/view.html.php index bb7ad0c0b8e93..ab45541e8a208 100644 --- a/administrator/components/com_finder/views/statistics/view.html.php +++ b/administrator/components/com_finder/views/statistics/view.html.php @@ -3,8 +3,8 @@ * @package Joomla.Administrator * @subpackage com_finder * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; @@ -20,6 +20,8 @@ class FinderViewStatistics extends JViewLegacy * The index statistics * * @var JObject + * + * @since 3.6.1 */ protected $data; @@ -40,9 +42,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } return parent::display($tpl); diff --git a/administrator/components/com_installer/controller.php b/administrator/components/com_installer/controller.php index da48efd484fd4..12ecac70e9a9f 100644 --- a/administrator/components/com_installer/controller.php +++ b/administrator/components/com_installer/controller.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/controllers/database.php b/administrator/components/com_installer/controllers/database.php index bd549005d683e..c4f0fa936c4dd 100644 --- a/administrator/components/com_installer/controllers/database.php +++ b/administrator/components/com_installer/controllers/database.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/controllers/discover.php b/administrator/components/com_installer/controllers/discover.php index 2d2ca5473c4a5..28d8220c7b13f 100644 --- a/administrator/components/com_installer/controllers/discover.php +++ b/administrator/components/com_installer/controllers/discover.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/controllers/install.php b/administrator/components/com_installer/controllers/install.php index 9334a83800781..f39ead23a3ac1 100644 --- a/administrator/components/com_installer/controllers/install.php +++ b/administrator/components/com_installer/controllers/install.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -28,15 +28,11 @@ public function install() // Check for request forgeries. JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + /** @var InstallerModelInstall $model */ $model = $this->getModel('install'); - if ($result = $model->install()) - { - $cache = JFactory::getCache('mod_menu'); - $cache->clean(); - - // TODO: Reset the users acl here as well to kill off any missing bits. - } + // TODO: Reset the users acl here as well to kill off any missing bits. + $result = $model->install(); $app = JFactory::getApplication(); $redirect_url = $app->getUserState('com_installer.redirect_url'); diff --git a/administrator/components/com_installer/controllers/manage.php b/administrator/components/com_installer/controllers/manage.php index af9df3f34e942..3c0c17c746205 100644 --- a/administrator/components/com_installer/controllers/manage.php +++ b/administrator/components/com_installer/controllers/manage.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -58,6 +58,7 @@ public function publish() else { // Get the model. + /** @var InstallerModelManage $model */ $model = $this->getModel('manage'); // Change the state of the records. @@ -95,7 +96,9 @@ public function remove() // Check for request forgeries. JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); - $eid = $this->input->get('cid', array(), 'array'); + $eid = $this->input->get('cid', array(), 'array'); + + /** @var InstallerModelManage $model */ $model = $this->getModel('manage'); $eid = ArrayHelper::toInteger($eid, array()); diff --git a/administrator/components/com_installer/controllers/update.php b/administrator/components/com_installer/controllers/update.php index a3b541c07a6ef..e179e77c8d027 100644 --- a/administrator/components/com_installer/controllers/update.php +++ b/administrator/components/com_installer/controllers/update.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -39,15 +39,10 @@ public function update() // Get the minimum stability. $component = JComponentHelper::getComponent('com_installer'); $params = $component->params; - $minimum_stability = $params->get('minimum_stability', JUpdater::STABILITY_STABLE, 'int'); + $minimum_stability = (int) $params->get('minimum_stability', JUpdater::STABILITY_STABLE); $model->update($uid, $minimum_stability); - if ($model->getState('result', false)) - { - JFactory::getCache('mod_menu')->clean(); - } - $app = JFactory::getApplication(); $redirect_url = $app->getUserState('com_installer.redirect_url'); @@ -86,11 +81,11 @@ public function find() // Get the caching duration. $component = JComponentHelper::getComponent('com_installer'); $params = $component->params; - $cache_timeout = $params->get('cachetimeout', 6, 'int'); + $cache_timeout = (int) $params->get('cachetimeout', 6); $cache_timeout = 3600 * $cache_timeout; // Get the minimum stability. - $minimum_stability = $params->get('minimum_stability', JUpdater::STABILITY_STABLE, 'int'); + $minimum_stability = (int) $params->get('minimum_stability', JUpdater::STABILITY_STABLE); // Find updates. /** @var InstallerModelUpdate $model */ @@ -161,13 +156,13 @@ public function ajax() if ($cache_timeout == 0) { - $cache_timeout = $params->get('cachetimeout', 6, 'int'); + $cache_timeout = (int) $params->get('cachetimeout', 6); $cache_timeout = 3600 * $cache_timeout; } if ($minimum_stability < 0) { - $minimum_stability = $params->get('minimum_stability', JUpdater::STABILITY_STABLE, 'int'); + $minimum_stability = (int) $params->get('minimum_stability', JUpdater::STABILITY_STABLE); } /** @var InstallerModelUpdate $model */ diff --git a/administrator/components/com_installer/controllers/updatesites.php b/administrator/components/com_installer/controllers/updatesites.php index cb32710e6efac..d004167f0a49e 100644 --- a/administrator/components/com_installer/controllers/updatesites.php +++ b/administrator/components/com_installer/controllers/updatesites.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/helpers/html/manage.php b/administrator/components/com_installer/helpers/html/manage.php index 0ac6b08b7e35a..4aaf19ee502c0 100644 --- a/administrator/components/com_installer/helpers/html/manage.php +++ b/administrator/components/com_installer/helpers/html/manage.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/helpers/html/updatesites.php b/administrator/components/com_installer/helpers/html/updatesites.php index 93667774a9845..6a69aa0a49561 100644 --- a/administrator/components/com_installer/helpers/html/updatesites.php +++ b/administrator/components/com_installer/helpers/html/updatesites.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/helpers/installer.php b/administrator/components/com_installer/helpers/installer.php index 654c3757a9f3c..6ca57ffb1d6e7 100644 --- a/administrator/components/com_installer/helpers/installer.php +++ b/administrator/components/com_installer/helpers/installer.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -51,7 +51,7 @@ public static function addSubmenu($vName = 'install') $vName == 'database' ); JHtmlSidebar::addEntry( - JText::_('COM_INSTALLER_SUBMENU_WARNINGS'), + JText::_('COM_INSTALLER_SUBMENU_WARNINGS'), 'index.php?option=com_installer&view=warnings', $vName == 'warnings' ); diff --git a/administrator/components/com_installer/installer.php b/administrator/components/com_installer/installer.php index 74e07d27a0157..301771b9dcb76 100644 --- a/administrator/components/com_installer/installer.php +++ b/administrator/components/com_installer/installer.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/installer.xml b/administrator/components/com_installer/installer.xml index 8fb20c27e6fb4..e787399132ba3 100644 --- a/administrator/components/com_installer/installer.xml +++ b/administrator/components/com_installer/installer.xml @@ -3,7 +3,7 @@ com_installer Joomla! Project April 2006 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_installer/models/database.php b/administrator/components/com_installer/models/database.php index 6d24747c3f6e6..800519e36889b 100644 --- a/administrator/components/com_installer/models/database.php +++ b/administrator/components/com_installer/models/database.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -15,7 +15,7 @@ JLoader::register('JoomlaInstallerScript', JPATH_ADMINISTRATOR . '/components/com_admin/script.php'); /** - * Installer Manage Model + * Installer Database Model * * @since 1.6 */ @@ -99,6 +99,7 @@ public function getItems() return false; } + return $changeSet; } @@ -309,16 +310,18 @@ private function prepareUtf8mb4StatusTable() if ($count > 1) { // Table messed up somehow, clear it - $db->setQuery('DELETE FROM ' . $db->quoteName('#__utf8_conversion') - . ';')->execute(); + $db->setQuery('DELETE FROM ' . $db->quoteName('#__utf8_conversion') . ';') + ->execute(); $db->setQuery('INSERT INTO ' . $db->quoteName('#__utf8_conversion') - . ' (' . $db->quoteName('converted') . ') VALUES (0);')->execute(); + . ' (' . $db->quoteName('converted') . ') VALUES (0);' + )->execute(); } elseif ($count == 0) { // Record missing somehow, fix this $db->setQuery('INSERT INTO ' . $db->quoteName('#__utf8_conversion') - . ' (' . $db->quoteName('converted') . ') VALUES (0);')->execute(); + . ' (' . $db->quoteName('converted') . ') VALUES (0);' + )->execute(); } } } diff --git a/administrator/components/com_installer/models/discover.php b/administrator/components/com_installer/models/discover.php index 1403e816f4e93..e2c45141ba8c3 100644 --- a/administrator/components/com_installer/models/discover.php +++ b/administrator/components/com_installer/models/discover.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -228,7 +228,7 @@ public function discover_install() /** * Cleans out the list of discovered extensions. * - * @return bool True on success + * @return boolean True on success * * @since 1.6 */ diff --git a/administrator/components/com_installer/models/extension.php b/administrator/components/com_installer/models/extension.php index cdeaa1e63601b..203a20f21e697 100644 --- a/administrator/components/com_installer/models/extension.php +++ b/administrator/components/com_installer/models/extension.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -92,6 +92,7 @@ protected function _getList($query, $limitstart = 0, $limit = 0) { // Check if search string exists in any of the fields to be searched. $found = 0; + foreach ($searchFields as $key => $field) { if (!$found && preg_match('/' . $escapedSearchString . '/i', $item->{$field})) @@ -122,7 +123,7 @@ protected function _getList($query, $limitstart = 0, $limit = 0) $this->setState('list.start', 0); } - return array_slice($result, $limitstart, $limit ? $limit : null); + return array_slice($result, $limitstart, $limit ?: null); } // Process searching, ordering and pagination for regular database fields. @@ -136,7 +137,7 @@ protected function _getList($query, $limitstart = 0, $limit = 0) /** * Translate a list of objects * - * @param array &$items The array of objects + * @param array $items The array of objects * * @return array The array of translated objects */ diff --git a/administrator/components/com_installer/models/fields/extensionstatus.php b/administrator/components/com_installer/models/fields/extensionstatus.php index ce8afbc5fc58c..987b90d1a4525 100644 --- a/administrator/components/com_installer/models/fields/extensionstatus.php +++ b/administrator/components/com_installer/models/fields/extensionstatus.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/models/fields/folder.php b/administrator/components/com_installer/models/fields/folder.php index 013423dd0ec35..0fcc969cb4a95 100644 --- a/administrator/components/com_installer/models/fields/folder.php +++ b/administrator/components/com_installer/models/fields/folder.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/models/fields/location.php b/administrator/components/com_installer/models/fields/location.php index f5b7023b5b755..95a53c0acd3e0 100644 --- a/administrator/components/com_installer/models/fields/location.php +++ b/administrator/components/com_installer/models/fields/location.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/models/fields/type.php b/administrator/components/com_installer/models/fields/type.php index 5d0c28722963a..eddf06f09a74e 100644 --- a/administrator/components/com_installer/models/fields/type.php +++ b/administrator/components/com_installer/models/fields/type.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -14,7 +14,7 @@ JFormHelper::loadFieldClass('list'); /** - * Type field. + * Form field for a list of extension types. * * @since 3.5 */ diff --git a/administrator/components/com_installer/models/forms/filter_discover.xml b/administrator/components/com_installer/models/forms/filter_discover.xml index 8f21ab2d8e954..b11e1f2dd4379 100644 --- a/administrator/components/com_installer/models/forms/filter_discover.xml +++ b/administrator/components/com_installer/models/forms/filter_discover.xml @@ -10,6 +10,7 @@ description="COM_INSTALLER_DISCOVER_FILTER_SEARCH_DESC" hint="JSEARCH_FILTER" /> + + + COM_INSTALLER_VALUE_FOLDER_SELECT
    + JGRID_HEADING_ID_ASC + COM_INSTALLER_HEADING_LANGUAGE_TAG_ASC + + + + + COM_INSTALLER_VALUE_FOLDER_SELECT + JGRID_HEADING_ID_ASC + - - + + cleanCache('_system', 0); + $this->cleanCache('_system', 1); + $this->cleanCache('com_modules', 0); + $this->cleanCache('com_modules', 1); + $this->cleanCache('com_plugins', 0); + $this->cleanCache('com_plugins', 1); + $this->cleanCache('mod_menu', 0); + $this->cleanCache('mod_menu', 1); + return $result; } diff --git a/administrator/components/com_installer/models/languages.php b/administrator/components/com_installer/models/languages.php index 5c742dd97b3e0..63f8c3b6ed199 100644 --- a/administrator/components/com_installer/models/languages.php +++ b/administrator/components/com_installer/models/languages.php @@ -2,7 +2,7 @@ /** * @package Joomla.Administrator * @subpackage com_installer - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -141,7 +141,7 @@ protected function getLanguages() foreach ($extension->attributes() as $key => $value) { - $language->$key = (string) $value; + $language->$key = (string) $value; } if ($search) diff --git a/administrator/components/com_installer/models/manage.php b/administrator/components/com_installer/models/manage.php index 18ccb15b9e987..0781019dd2393 100644 --- a/administrator/components/com_installer/models/manage.php +++ b/administrator/components/com_installer/models/manage.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -79,7 +79,7 @@ protected function populateState($ordering = 'name', $direction = 'asc') /** * Enable/Disable an extension. * - * @param array &$eid Extension ids to un/publish + * @param array $eid Extension ids to un/publish * @param int $value Publish value * * @return boolean True on success @@ -146,6 +146,14 @@ public function publish(&$eid = array(), $value = 1) } } + // Clear the cached extension data and menu cache + $this->cleanCache('_system', 0); + $this->cleanCache('_system', 1); + $this->cleanCache('com_modules', 0); + $this->cleanCache('com_modules', 1); + $this->cleanCache('mod_menu', 0); + $this->cleanCache('mod_menu', 1); + return $result; } @@ -261,6 +269,16 @@ public function remove($eid = array()) $app->setUserState('com_installer.message', $installer->message); $app->setUserState('com_installer.extension_message', $installer->get('extension_message')); + // Clear the cached extension data and menu cache + $this->cleanCache('_system', 0); + $this->cleanCache('_system', 1); + $this->cleanCache('com_modules', 0); + $this->cleanCache('com_modules', 1); + $this->cleanCache('com_plugins', 0); + $this->cleanCache('com_plugins', 1); + $this->cleanCache('mod_menu', 0); + $this->cleanCache('mod_menu', 1); + return $result; } diff --git a/administrator/components/com_installer/models/update.php b/administrator/components/com_installer/models/update.php index 368b48101cb37..54c1dad542530 100644 --- a/administrator/components/com_installer/models/update.php +++ b/administrator/components/com_installer/models/update.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -154,7 +154,7 @@ protected function getListQuery() /** * Translate a list of objects * - * @param array &$items The array of objects + * @param array $items The array of objects * * @return array The array of translated objects * @@ -168,7 +168,7 @@ protected function translate(&$items) $manifest = json_decode($item->manifest_cache); $item->current_version = isset($manifest->version) ? $manifest->version : JText::_('JLIB_UNKNOWN'); $item->type_translated = JText::_('COM_INSTALLER_TYPE_' . strtoupper($item->type)); - $item->folder_translated = $item->folder ? $item->folder : JText::_('COM_INSTALLER_TYPE_NONAPPLICABLE'); + $item->folder_translated = $item->folder ?: JText::_('COM_INSTALLER_TYPE_NONAPPLICABLE'); $item->install_type = $item->extension_id ? JText::_('COM_INSTALLER_MSG_UPDATE_UPDATE') : JText::_('COM_INSTALLER_NEW_INSTALL'); } @@ -207,7 +207,7 @@ protected function _getList($query, $limitstart = 0, $limit = 0) $this->setState('list.start', 0); } - return array_slice($result, $limitstart, $limit ? $limit : null); + return array_slice($result, $limitstart, $limit ?: null); } else { @@ -371,6 +371,16 @@ public function update($uids, $minimum_stability = JUpdater::STABILITY_STABLE) $result = $res & $result; } + // Clear the cached extension data and menu cache + $this->cleanCache('_system', 0); + $this->cleanCache('_system', 1); + $this->cleanCache('com_modules', 0); + $this->cleanCache('com_modules', 1); + $this->cleanCache('com_plugins', 0); + $this->cleanCache('com_plugins', 1); + $this->cleanCache('mod_menu', 0); + $this->cleanCache('mod_menu', 1); + // Set the final state $this->setState('result', $result); } @@ -395,7 +405,8 @@ private function install($update) return false; } - $url = $update->downloadurl->_data; + $url = $update->downloadurl->_data; + $sources = $update->get('downloadSources', array()); if ($extra_query = $update->get('extra_query')) { @@ -403,7 +414,21 @@ private function install($update) $url .= $extra_query; } - $p_file = JInstallerHelper::downloadPackage($url); + $mirror = 0; + + while (!($p_file = JInstallerHelper::downloadPackage($url)) && isset($sources[$mirror])) + { + $name = $sources[$mirror]; + $url = $name->url; + + if ($extra_query) + { + $url .= (strpos($url, '?') === false) ? '?' : '&'; + $url .= $extra_query; + } + + $mirror++; + } // Was the package downloaded? if (!$p_file) @@ -485,6 +510,7 @@ public function getForm($data = array(), $loadData = true) return false; } + // Check the session for previously entered form data. $data = $this->loadFormData(); @@ -525,7 +551,7 @@ protected function loadFormData() protected function preparePreUpdate($update, $table) { jimport('joomla.filesystem.file'); - + switch ($table->type) { // Components could have a helper which adds additional data @@ -535,11 +561,11 @@ protected function preparePreUpdate($update, $table) $cname = ucfirst($ename) . 'Helper'; $path = JPATH_ADMINISTRATOR . '/components/' . $table->element . '/helpers/' . $fname; - + if (JFile::exists($path)) { require_once $path; - + if (class_exists($cname) && is_callable(array($cname, 'prepareUpdate'))) { call_user_func_array(array($cname, 'prepareUpdate'), array(&$update, &$table)); @@ -552,19 +578,19 @@ protected function preparePreUpdate($update, $table) case 'module': $cname = str_replace('_', '', $table->element) . 'Helper'; $path = ($table->client_id ? JPATH_ADMINISTRATOR : JPATH_SITE) . '/modules/' . $table->element . '/helper.php'; - + if (JFile::exists($path)) { require_once $path; - + if (class_exists($cname) && is_callable(array($cname, 'prepareUpdate'))) { call_user_func_array(array($cname, 'prepareUpdate'), array(&$update, &$table)); } } - + break; - + // If we have a plugin, we can use the plugin trigger "onInstallerBeforePackageDownload" // But we should make sure, that our plugin is loaded, so we don't need a second "installer" plugin case 'plugin': diff --git a/administrator/components/com_installer/models/updatesites.php b/administrator/components/com_installer/models/updatesites.php index 2ac0445b33b5a..d8097ace4a7dc 100644 --- a/administrator/components/com_installer/models/updatesites.php +++ b/administrator/components/com_installer/models/updatesites.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -73,7 +73,7 @@ protected function populateState($ordering = 'name', $direction = 'asc') /** * Enable/Disable an extension. * - * @param array &$eid Extension ids to un/publish + * @param array $eid Extension ids to un/publish * @param int $value Publish value * * @return boolean True on success @@ -328,7 +328,10 @@ public function rebuild() $query = $db->getQuery(true) ->select($db->quoteName('extension_id')) ->from($db->quoteName('#__extensions')) - ->where($db->quoteName('name') . ' = ' . $db->quote($manifest->name)) + ->where('(' + . $db->quoteName('name') . ' = ' . $db->quote($manifest->name) + . ' OR ' . $db->quoteName('name') . ' = ' . $db->quote($manifest->packagename) + . ')' ) ->where($db->quoteName('type') . ' = ' . $db->quote($manifest['type'])) ->where($db->quoteName('extension_id') . ' NOT IN (' . $joomlaCoreExtensionIds . ')') ->where($db->quoteName('state') . ' != -1'); @@ -388,8 +391,9 @@ protected function getJoomlaUpdateSitesIds($column = 0) . '(' . $db->qn('e.type') . ' = ' . $db->quote('file') . ' AND ' . $db->qn('e.element') . ' = ' . $db->quote('joomla') . ')' . ' OR (' . $db->qn('e.type') . ' = ' . $db->quote('package') . ' AND ' . $db->qn('e.element') . ' = ' . $db->quote('pkg_en-GB') . ')' . ' OR (' . $db->qn('e.type') . ' = ' . $db->quote('component') . ' AND ' . $db->qn('e.element') . ' = ' . $db->quote('com_joomlaupdate') . ')' - . ')'); - + . ')' + ); + $db->setQuery($query); return $db->loadColumn($column); diff --git a/administrator/components/com_installer/models/warnings.php b/administrator/components/com_installer/models/warnings.php index e62aea647785d..6f7856a674e89 100644 --- a/administrator/components/com_installer/models/warnings.php +++ b/administrator/components/com_installer/models/warnings.php @@ -3,14 +3,14 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** - * Extension Manager Templates Model + * Installer Warnings Model * * @since 1.6 */ diff --git a/administrator/components/com_installer/views/database/tmpl/default.php b/administrator/components/com_installer/views/database/tmpl/default.php index e16680737ec15..ee591b46645f7 100644 --- a/administrator/components/com_installer/views/database/tmpl/default.php +++ b/administrator/components/com_installer/views/database/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -44,9 +44,9 @@ queryType; $msgs = $error->msgElements; $file = basename($error->file); - $msg0 = (isset($msgs[0])) ? $msgs[0] : ' '; - $msg1 = (isset($msgs[1])) ? $msgs[1] : ' '; - $msg2 = (isset($msgs[2])) ? $msgs[2] : ' '; + $msg0 = isset($msgs[0]) ? $msgs[0] : ' '; + $msg1 = isset($msgs[1]) ? $msgs[1] : ' '; + $msg2 = isset($msgs[2]) ? $msgs[2] : ' '; $message = JText::sprintf($key, $file, $msg0, $msg1, $msg2); ?>
  • diff --git a/administrator/components/com_installer/views/database/view.html.php b/administrator/components/com_installer/views/database/view.html.php index d1cf21f5ea9c7..392f3dc0861d7 100644 --- a/administrator/components/com_installer/views/database/view.html.php +++ b/administrator/components/com_installer/views/database/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -12,7 +12,7 @@ JLoader::register('InstallerViewDefault', dirname(__DIR__) . '/default/view.php'); /** - * Extension Manager Manage View + * Extension Manager Database View * * @since 1.6 */ @@ -40,8 +40,8 @@ public function display($tpl = null) $this->schemaVersion = $this->get('SchemaVersion'); $this->updateVersion = $this->get('UpdateVersion'); $this->filterParams = $this->get('DefaultTextFilters'); - $this->schemaVersion = ($this->schemaVersion) ? $this->schemaVersion : JText::_('JNONE'); - $this->updateVersion = ($this->updateVersion) ? $this->updateVersion : JText::_('JNONE'); + $this->schemaVersion = $this->schemaVersion ?: JText::_('JNONE'); + $this->updateVersion = $this->updateVersion ?: JText::_('JNONE'); $this->pagination = $this->get('Pagination'); $this->errorCount = count($this->errors); diff --git a/administrator/components/com_installer/views/default/tmpl/default_ftp.php b/administrator/components/com_installer/views/default/tmpl/default_ftp.php index d493627a810fe..30b834dbade8f 100644 --- a/administrator/components/com_installer/views/default/tmpl/default_ftp.php +++ b/administrator/components/com_installer/views/default/tmpl/default_ftp.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/views/default/tmpl/default_message.php b/administrator/components/com_installer/views/default/tmpl/default_message.php index 7a3d9aa04c45a..ed015443bd505 100644 --- a/administrator/components/com_installer/views/default/tmpl/default_message.php +++ b/administrator/components/com_installer/views/default/tmpl/default_message.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/views/default/view.php b/administrator/components/com_installer/views/default/view.php index 07f98082d83ba..a95d5cac0aa35 100644 --- a/administrator/components/com_installer/views/default/view.php +++ b/administrator/components/com_installer/views/default/view.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/views/discover/tmpl/default.php b/administrator/components/com_installer/views/discover/tmpl/default.php index d2918e86ce134..164e4da354b67 100644 --- a/administrator/components/com_installer/views/discover/tmpl/default.php +++ b/administrator/components/com_installer/views/discover/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/views/discover/tmpl/default_item.php b/administrator/components/com_installer/views/discover/tmpl/default_item.php index 89104377d76e9..aa3789f736567 100644 --- a/administrator/components/com_installer/views/discover/tmpl/default_item.php +++ b/administrator/components/com_installer/views/discover/tmpl/default_item.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/views/discover/view.html.php b/administrator/components/com_installer/views/discover/view.html.php index 2ce9baabd6a78..906928f683fce 100644 --- a/administrator/components/com_installer/views/discover/view.html.php +++ b/administrator/components/com_installer/views/discover/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/views/install/tmpl/default.php b/administrator/components/com_installer/views/install/tmpl/default.php index 69787c48ce18a..bfc386882c342 100644 --- a/administrator/components/com_installer/views/install/tmpl/default.php +++ b/administrator/components/com_installer/views/install/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -116,7 +116,7 @@ ' . str_replace('"', '"', JText::_('COM_INSTALLER_SHOW_JED_INFORMATION_TOOLTIP')) . '', 'class="alert-options hasTooltip icon-options" data-dismiss="alert" title="' . str_replace('"', '"', JText::_('COM_INSTALLER_SHOW_JED_INFORMATION_TOOLTIP')) . '"' ); ?> diff --git a/administrator/components/com_installer/views/install/view.html.php b/administrator/components/com_installer/views/install/view.html.php index 6e2c0b06862bd..0fbd0b052655d 100644 --- a/administrator/components/com_installer/views/install/view.html.php +++ b/administrator/components/com_installer/views/install/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/views/languages/tmpl/default.php b/administrator/components/com_installer/views/languages/tmpl/default.php index 6eb4e5bb65336..801524dffc70d 100644 --- a/administrator/components/com_installer/views/languages/tmpl/default.php +++ b/administrator/components/com_installer/views/languages/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -74,16 +74,15 @@ - + name; ?> code; ?> + - version, 0, 3) != $version::RELEASE || substr($language->version, 0, 5) != $currentShortVersion) : ?> + version, $minorVersion) !== 0 || strpos($language->version, $currentShortVersion) !== 0) : ?> version; ?> version; ?> diff --git a/administrator/components/com_installer/views/languages/view.html.php b/administrator/components/com_installer/views/languages/view.html.php index 7c41f9cee388a..45f158971979a 100644 --- a/administrator/components/com_installer/views/languages/view.html.php +++ b/administrator/components/com_installer/views/languages/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -12,7 +12,7 @@ JLoader::register('InstallerViewDefault', dirname(__DIR__) . '/default/view.php'); /** - * Language installer view + * Extension Manager Language Install View * * @since 2.5.7 */ @@ -53,9 +53,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } parent::display($tpl); diff --git a/administrator/components/com_installer/views/manage/tmpl/default.php b/administrator/components/com_installer/views/manage/tmpl/default.php index ccc6bff0c7c25..d7dcd2444a834 100644 --- a/administrator/components/com_installer/views/manage/tmpl/default.php +++ b/administrator/components/com_installer/views/manage/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/views/manage/view.html.php b/administrator/components/com_installer/views/manage/view.html.php index 4f1b6d4aae3f7..3fe03cda7161b 100644 --- a/administrator/components/com_installer/views/manage/view.html.php +++ b/administrator/components/com_installer/views/manage/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -47,9 +47,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } // Include the component HTML helpers. diff --git a/administrator/components/com_installer/views/update/tmpl/default.php b/administrator/components/com_installer/views/update/tmpl/default.php index 7d470a2154ccc..0c5b6faf0123f 100644 --- a/administrator/components/com_installer/views/update/tmpl/default.php +++ b/administrator/components/com_installer/views/update/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -93,7 +93,7 @@ diff --git a/administrator/components/com_installer/views/update/view.html.php b/administrator/components/com_installer/views/update/view.html.php index 09f0e58de07e3..d5ee00be10ab1 100644 --- a/administrator/components/com_installer/views/update/view.html.php +++ b/administrator/components/com_installer/views/update/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/views/updatesites/tmpl/default.php b/administrator/components/com_installer/views/updatesites/tmpl/default.php index 5f54c2a268805..77a7bca4349e5 100644 --- a/administrator/components/com_installer/views/updatesites/tmpl/default.php +++ b/administrator/components/com_installer/views/updatesites/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/views/updatesites/view.html.php b/administrator/components/com_installer/views/updatesites/view.html.php index 75f957ec11cc6..a6065eb17028e 100644 --- a/administrator/components/com_installer/views/updatesites/view.html.php +++ b/administrator/components/com_installer/views/updatesites/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/views/warnings/tmpl/default.php b/administrator/components/com_installer/views/warnings/tmpl/default.php index 45b6d5d2847ae..fa4a21dd8b50c 100644 --- a/administrator/components/com_installer/views/warnings/tmpl/default.php +++ b/administrator/components/com_installer/views/warnings/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_installer/views/warnings/view.html.php b/administrator/components/com_installer/views/warnings/view.html.php index 0a9078f99c34f..e3d12bf1225ec 100644 --- a/administrator/components/com_installer/views/warnings/view.html.php +++ b/administrator/components/com_installer/views/warnings/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_installer * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -12,7 +12,7 @@ JLoader::register('InstallerViewDefault', dirname(__DIR__) . '/default/view.php'); /** - * Extension Manager Templates View + * Extension Manager Warning View * * @since 1.6 */ diff --git a/administrator/components/com_joomlaupdate/controller.php b/administrator/components/com_joomlaupdate/controller.php index 28748ee9b1f0e..c6bb6b22ccfec 100644 --- a/administrator/components/com_joomlaupdate/controller.php +++ b/administrator/components/com_joomlaupdate/controller.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_joomlaupdate/controllers/update.php b/administrator/components/com_joomlaupdate/controllers/update.php index 9330ad6dd7ee2..cb57d84c7f072 100644 --- a/administrator/components/com_joomlaupdate/controllers/update.php +++ b/administrator/components/com_joomlaupdate/controllers/update.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -421,7 +421,7 @@ protected function _applyCredentials() // Add credentials to the session if (!JClientHelper::setCredentials('ftp', $user, $pass)) { - JError::raiseWarning('SOME_ERROR_CODE', JText::_('JLIB_CLIENT_ERROR_HELPER_SETCREDENTIALSFROMREQUEST_FAILED')); + JError::raiseWarning(500, JText::_('JLIB_CLIENT_ERROR_HELPER_SETCREDENTIALSFROMREQUEST_FAILED')); } } } diff --git a/administrator/components/com_joomlaupdate/helpers/joomlaupdate.php b/administrator/components/com_joomlaupdate/helpers/joomlaupdate.php index 1cb10fd75679c..0044abdfc364e 100644 --- a/administrator/components/com_joomlaupdate/helpers/joomlaupdate.php +++ b/administrator/components/com_joomlaupdate/helpers/joomlaupdate.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_joomlaupdate/helpers/select.php b/administrator/components/com_joomlaupdate/helpers/select.php index d23f68281af6f..edf2de79ebfa1 100644 --- a/administrator/components/com_joomlaupdate/helpers/select.php +++ b/administrator/components/com_joomlaupdate/helpers/select.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_joomlaupdate/joomlaupdate.php b/administrator/components/com_joomlaupdate/joomlaupdate.php index 51371547a32ce..4baf72dd8186a 100644 --- a/administrator/components/com_joomlaupdate/joomlaupdate.php +++ b/administrator/components/com_joomlaupdate/joomlaupdate.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_joomlaupdate/joomlaupdate.xml b/administrator/components/com_joomlaupdate/joomlaupdate.xml index 0376ba843a86f..c84bfe31608f5 100644 --- a/administrator/components/com_joomlaupdate/joomlaupdate.xml +++ b/administrator/components/com_joomlaupdate/joomlaupdate.xml @@ -3,7 +3,7 @@ com_joomlaupdate Joomla! Project February 2012 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_joomlaupdate/models/default.php b/administrator/components/com_joomlaupdate/models/default.php index 3af6fcd0ea384..6b046699bf8a8 100644 --- a/administrator/components/com_joomlaupdate/models/default.php +++ b/administrator/components/com_joomlaupdate/models/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -243,7 +243,7 @@ public function purge() /** * Downloads the update package to the site. * - * @return bool|string False on failure, basename of the file in any other case. + * @return boolean|string False on failure, basename of the file in any other case. * * @since 2.5.4 */ @@ -251,6 +251,7 @@ public function download() { $updateInfo = $this->getUpdateInformation(); $packageURL = $updateInfo['object']->downloadurl->_data; + $sources = $updateInfo['object']->get('downloadSources', array()); $headers = get_headers($packageURL, 1); // Follow the Location headers until the actual download URL is known @@ -279,7 +280,16 @@ public function download() if (!$exists) { // Not there, let's fetch it. - return $this->downloadPackage($packageURL, $target); + $mirror = 0; + + while (!($download = $this->downloadPackage($packageURL, $target)) && isset($sources[$mirror])) + { + $name = $sources[$mirror]; + $packageURL = $name->url; + $mirror++; + } + + return $download; } else { @@ -288,7 +298,16 @@ public function download() if (empty($filesize)) { - return $this->downloadPackage($packageURL, $target); + $mirror = 0; + + while (!($download = $this->downloadPackage($packageURL, $target)) && isset($sources[$mirror])) + { + $name = $sources[$mirror]; + $packageURL = $name->url; + $mirror++; + } + + return $download; } // Yes, it's there, skip downloading. @@ -335,7 +354,14 @@ protected function downloadPackage($url, $target) JFile::delete($target); // Download the package - $result = $http->get($url); + try + { + $result = $http->get($url); + } + catch (RuntimeException $e) + { + return false; + } if (!$result || ($result->code != 200 && $result->code != 310)) { @@ -399,7 +425,9 @@ public function createRestorationFile($basename = null) 'kickstart.setup.destdir' => '$siteroot', 'kickstart.setup.restoreperms' => '0', 'kickstart.setup.filetype' => 'zip', - 'kickstart.setup.dryrun' => '0' + 'kickstart.setup.dryrun' => '0', + 'kickstart.setup.renamefiles' => array(), + 'kickstart.setup.postrenamefiles' => false ENDDATA; if ($method != 'direct') @@ -849,7 +877,7 @@ public function upload() // Make sure that zlib is loaded so that the package can be unpacked. if (!extension_loaded('zlib')) { - throw new RuntimeException(('COM_INSTALLER_MSG_INSTALL_WARNINSTALLZLIB'), 500); + throw new RuntimeException('COM_INSTALLER_MSG_INSTALL_WARNINSTALLZLIB', 500); } // If there is no uploaded file, we have a problem... @@ -914,7 +942,7 @@ public function upload() * * @param array $credentials The credentials to authenticate the user with * - * @return bool + * @return boolean * * @since 3.6.0 */ @@ -924,7 +952,7 @@ public function captiveLogin($credentials) $username = isset($credentials['username']) ? $credentials['username'] : null; $user = JFactory::getUser(); - if ($user->username != $username) + if (strtolower($user->username) != strtolower($username)) { return false; } @@ -950,7 +978,7 @@ public function captiveLogin($credentials) /** * Does the captive (temporary) file we uploaded before still exist? * - * @return bool + * @return boolean * * @since 3.6.0 */ diff --git a/administrator/components/com_joomlaupdate/restore.php b/administrator/components/com_joomlaupdate/restore.php index 093e9d815d7b8..4c16959c42f82 100644 --- a/administrator/components/com_joomlaupdate/restore.php +++ b/administrator/components/com_joomlaupdate/restore.php @@ -1,10 +1,18 @@ _errors); } } + $this->_errors[] = $error; } @@ -407,7 +434,7 @@ protected function setWarningsQueueSize($newSize = 0) * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -492,9 +519,9 @@ abstract class AKAbstractPart extends AKAbstractObject /** * The public interface to an engine part. This method takes care for * calling the correct method in order to perform the initialisation - - * run - finalisation cycle of operation and return a proper reponse array. + * run - finalisation cycle of operation and return a proper response array. * - * @return array A Reponse Array + * @return array A Response Array */ final public function tick() { @@ -729,7 +756,7 @@ function attach(AKAbstractPartObserver $obs) } /** - * Dettaches an observer object + * Detaches an observer object * * @param AKAbstractPartObserver $obs */ @@ -780,7 +807,7 @@ protected function notify($message) * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -1119,18 +1146,18 @@ protected function _run() if ($status) { // Send start of file notification - $message = new stdClass; - $message->type = 'startfile'; - $message->content = new stdClass; + $message = new stdClass; + $message->type = 'startfile'; + $message->content = new stdClass; + $message->content->realfile = $this->fileHeader->file; + $message->content->file = $this->fileHeader->file; + $message->content->uncompressed = $this->fileHeader->uncompressed; + if (array_key_exists('realfile', get_object_vars($this->fileHeader))) { $message->content->realfile = $this->fileHeader->realFile; } - else - { - $message->content->realfile = $this->fileHeader->file; - } - $message->content->file = $this->fileHeader->file; + if (array_key_exists('compressed', get_object_vars($this->fileHeader))) { $message->content->compressed = $this->fileHeader->compressed; @@ -1139,7 +1166,6 @@ protected function _run() { $message->content->compressed = 0; } - $message->content->uncompressed = $this->fileHeader->uncompressed; debugMsg(__CLASS__ . '::_run() - Preparing to extract ' . $message->content->realfile); @@ -1218,7 +1244,7 @@ protected function _run() /** * Concrete classes must use this method to read the file header * - * @return bool True if reading the file was successful, false if an error occured or we reached end of archive + * @return bool True if reading the file was successful, false if an error occurred or we reached end of archive */ protected abstract function readFileHeader(); @@ -1226,7 +1252,7 @@ protected abstract function readFileHeader(); * Concrete classes must use this method to process file data. It must set $runState to AK_STATE_DATAREAD when * it's finished processing the file data. * - * @return bool True if processing the file data was successful, false if an error occured + * @return bool True if processing the file data was successful, false if an error occurred */ protected abstract function processFileData(); @@ -1402,7 +1428,7 @@ protected function removePath($path) * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -1460,7 +1486,7 @@ abstract public function rename($from, $to); * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -1482,7 +1508,7 @@ abstract public function update($object, $message); * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -1617,7 +1643,7 @@ public function rename($from, $to) * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -2194,7 +2220,7 @@ public function rename($from, $to) * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -2842,7 +2868,7 @@ public function rename($from, $to) * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -3230,7 +3256,7 @@ private function fixPermissions($path) // Turn off error reporting if (!defined('KSDEBUG')) { - $oldErrorReporting = @error_reporting(E_NONE); + $oldErrorReporting = error_reporting(0); } // Get UNIX style paths @@ -3607,7 +3633,7 @@ public function rename($from, $to) * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -3706,7 +3732,7 @@ protected function readArchiveHeader() /** * Concrete classes must use this method to read the file header * - * @return bool True if reading the file was successful, false if an error occured or we reached end of archive + * @return bool True if reading the file was successful, false if an error occurred or we reached end of archive */ protected function readFileHeader() { @@ -4077,7 +4103,7 @@ protected function createDirectory() * Concrete classes must use this method to process file data. It must set $runState to AK_STATE_DATAREAD when * it's finished processing the file data. * - * @return bool True if processing the file data was successful, false if an error occured + * @return bool True if processing the file data was successful, false if an error occurred */ protected function processFileData() { @@ -4216,7 +4242,7 @@ private function processTypeFileUncompressed() // Can we write to the file? if (($outfp === false) && (!$ignore)) { - // An error occured + // An error occurred debugMsg('Could not write to output file'); $this->setError(AKText::sprintf('COULDNT_WRITE_FILE', $this->fileHeader->realFile)); @@ -4320,7 +4346,7 @@ private function processTypeFileCompressedSimple() if (($outfp === false) && (!$ignore)) { - // An error occured + // An error occurred debugMsg('Could not write to output file'); $this->setError(AKText::sprintf('COULDNT_WRITE_FILE', $this->fileHeader->realFile)); @@ -4393,7 +4419,7 @@ private function processTypeFileCompressedSimple() * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -4468,7 +4494,7 @@ protected function readArchiveHeader() /** * Concrete classes must use this method to read the file header * - * @return bool True if reading the file was successful, false if an error occured or we reached end of archive + * @return bool True if reading the file was successful, false if an error occurred or we reached end of archive */ protected function readFileHeader() { @@ -4719,7 +4745,7 @@ protected function readFileHeader() * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -4730,10 +4756,55 @@ protected function readFileHeader() */ class AKUnarchiverJPS extends AKUnarchiverJPA { + /** + * Header data for the archive + * + * @var array + */ protected $archiveHeaderData = array(); + /** + * Plaintext password from which the encryption key will be derived with PBKDF2 + * + * @var string + */ protected $password = ''; + /** + * Which hash algorithm should I use for key derivation with PBKDF2. + * + * @var string + */ + private $pbkdf2Algorithm = 'sha1'; + + /** + * How many iterations should I use for key derivation with PBKDF2 + * + * @var int + */ + private $pbkdf2Iterations = 1000; + + /** + * Should I use a static salt for key derivation with PBKDF2? + * + * @var bool + */ + private $pbkdf2UseStaticSalt = 0; + + /** + * Static salt for key derivation with PBKDF2 + * + * @var string + */ + private $pbkdf2StaticSalt = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; + + /** + * How much compressed data I have read since the last file header read + * + * @var int + */ + private $compressedSizeReadSinceLastFileHeader = 0; + public function __construct() { parent::__construct(); @@ -4741,6 +4812,18 @@ public function __construct() $this->password = AKFactory::get('kickstart.jps.password', ''); } + public function __wakeup() + { + parent::__wakeup(); + + // Make sure the decryption is all set up (required!) + AKEncryptionAES::setPbkdf2Algorithm($this->pbkdf2Algorithm); + AKEncryptionAES::setPbkdf2Iterations($this->pbkdf2Iterations); + AKEncryptionAES::setPbkdf2UseStaticSalt($this->pbkdf2UseStaticSalt); + AKEncryptionAES::setPbkdf2StaticSalt($this->pbkdf2StaticSalt); + } + + protected function readArchiveHeader() { // Initialize header data array @@ -4770,15 +4853,24 @@ protected function readArchiveHeader() $bin_data = fread($this->fp, 5); $header_data = unpack('Cmajor/Cminor/cspanned/vextra', $bin_data); - // Load any remaining header data (forward compatibility) + // Is this a v2 archive? + $versionHumanReadable = $header_data['major'] . '.' . $header_data['minor']; + $isV2Archive = version_compare($versionHumanReadable, '2.0', 'ge'); + + // Load any remaining header data $rest_length = $header_data['extra']; - if ($rest_length > 0) + + if ($isV2Archive && $rest_length) { - $junk = fread($this->fp, $rest_length); + // V2 archives only have one kind of extra header + if (!$this->readKeyExpansionExtraHeader()) + { + return false; + } } - else + elseif ($rest_length > 0) { - $junk = ''; + $junk = fread($this->fp, $rest_length); } // Temporary array with all the data we read @@ -4804,7 +4896,7 @@ protected function readArchiveHeader() /** * Concrete classes must use this method to read the file header * - * @return bool True if reading the file was successful, false if an error occured or we reached end of archive + * @return bool True if reading the file was successful, false if an error occurred or we reached end of archive */ protected function readFileHeader() { @@ -4861,17 +4953,27 @@ protected function readFileHeader() return false; } } - // This a JPA Entity Block. Process the header. + + // This a JPS Entity Block. Process the header. $isBannedFile = false; + // Make sure the decryption is all set up + AKEncryptionAES::setPbkdf2Algorithm($this->pbkdf2Algorithm); + AKEncryptionAES::setPbkdf2Iterations($this->pbkdf2Iterations); + AKEncryptionAES::setPbkdf2UseStaticSalt($this->pbkdf2UseStaticSalt); + AKEncryptionAES::setPbkdf2StaticSalt($this->pbkdf2StaticSalt); + // Read and decrypt the header $edbhData = fread($this->fp, 4); $edbh = unpack('vencsize/vdecsize', $edbhData); $bin_data = fread($this->fp, $edbh['encsize']); + // Add the header length to the data read + $this->compressedSizeReadSinceLastFileHeader += $edbh['encsize'] + 4; + // Decrypt and truncate - $bin_data = AKEncryptionAES::AESDecryptCBC($bin_data, $this->password, 128); + $bin_data = AKEncryptionAES::AESDecryptCBC($bin_data, $this->password); $bin_data = substr($bin_data, 0, $edbh['decsize']); // Read length of EDB and of the Entity Path Data @@ -4975,11 +5077,14 @@ protected function readFileHeader() // Skip forward by the amount of compressed data $miniHead = unpack('Vencsize/Vdecsize', $binMiniHead); @fseek($this->fp, $miniHead['encsize'], SEEK_CUR); + $this->compressedSizeReadSinceLastFileHeader += 8 + $miniHead['encsize']; } } - $this->currentPartOffset = @ftell($this->fp); - $this->runState = AK_STATE_DONE; + $this->currentPartOffset = @ftell($this->fp); + $this->runState = AK_STATE_DONE; + $this->fileHeader->compressed = $this->compressedSizeReadSinceLastFileHeader; + $this->compressedSizeReadSinceLastFileHeader = 0; return true; } @@ -5030,6 +5135,9 @@ protected function readFileHeader() $this->postProcEngine->processFilename(null); } + $this->fileHeader->compressed = $this->compressedSizeReadSinceLastFileHeader; + $this->compressedSizeReadSinceLastFileHeader = 0; + $this->createDirectory(); // Header is read @@ -5053,25 +5161,24 @@ protected function createDirectory() // Do we need to create a directory? $lastSlash = strrpos($this->fileHeader->realFile, '/'); $dirName = substr($this->fileHeader->realFile, 0, $lastSlash); - $perms = $this->flagRestorePermissions ? $retArray['permissions'] : 0755; + $perms = 0755; $ignore = AKFactory::get('kickstart.setup.ignoreerrors', false) || $this->isIgnoredDirectory($dirName); + if (($this->postProcEngine->createDirRecursive($dirName, $perms) == false) && (!$ignore)) { $this->setError(AKText::sprintf('COULDNT_CREATE_DIR', $dirName)); return false; } - else - { - return true; - } + + return true; } /** * Concrete classes must use this method to process file data. It must set $runState to AK_STATE_DATAREAD when * it's finished processing the file data. * - * @return bool True if processing the file data was successful, false if an error occured + * @return bool True if processing the file data was successful, false if an error occurred */ protected function processFileData() { @@ -5135,6 +5242,7 @@ private function processTypeLink() // Read the mini header $binMiniHeader = fread($this->fp, 8); $reallyReadBytes = akstringlen($binMiniHeader); + if ($reallyReadBytes < 8) { // We read less than requested! Why? Did we hit local EOF? @@ -5167,6 +5275,8 @@ private function processTypeLink() $toReadBytes = $miniHeader['encsize']; $data = $this->fread($this->fp, $toReadBytes); $reallyReadBytes = akstringlen($data); + $this->compressedSizeReadSinceLastFileHeader += 8 + $miniHeader['encsize']; + if ($reallyReadBytes < $toReadBytes) { // We read less than requested! Why? Did we hit local EOF? @@ -5196,7 +5306,7 @@ private function processTypeLink() } // Decrypt the data - $data = AKEncryptionAES::AESDecryptCBC($data, $this->password, 128); + $data = AKEncryptionAES::AESDecryptCBC($data, $this->password); // Is the length of the decrypted data less than expected? $data_length = akstringlen($data); @@ -5258,7 +5368,7 @@ private function processTypeFileUncompressed() // Can we write to the file? if (($outfp === false) && (!$ignore)) { - // An error occured + // An error occurred $this->setError(AKText::sprintf('COULDNT_WRITE_FILE', $this->fileHeader->realFile)); return false; @@ -5277,14 +5387,10 @@ private function processTypeFileUncompressed() return true; } - else - { - $this->setError('An uncompressed file was detected; this is not supported by this archive extraction utility'); - return false; - } + $this->setError('An uncompressed file was detected; this is not supported by this archive extraction utility'); - return true; + return false; } private function processTypeFileCompressedSimple() @@ -5309,7 +5415,7 @@ private function processTypeFileCompressedSimple() AKFactory::get('kickstart.setup.ignoreerrors', false) || $this->isIgnoredDirectory($this->fileHeader->file); if (($outfp === false) && (!$ignore)) { - // An error occured + // An error occurred $this->setError(AKText::sprintf('COULDNT_WRITE_FILE', $this->fileHeader->realFile)); return false; @@ -5372,6 +5478,9 @@ private function processTypeFileCompressedSimple() $toReadBytes = $miniHeader['encsize']; $data = $this->fread($this->fp, $toReadBytes); $reallyReadBytes = akstringlen($data); + + $this->compressedSizeReadSinceLastFileHeader += $miniHeader['encsize'] + 8; + if ($reallyReadBytes < $toReadBytes) { // We read less than requested! Why? Did we hit local EOF? @@ -5408,7 +5517,7 @@ private function processTypeFileCompressedSimple() } // Decrypt the data - $data = AKEncryptionAES::AESDecryptCBC($data, $this->password, 128); + $data = AKEncryptionAES::AESDecryptCBC($data, $this->password); // Is the length of the decrypted data less than expected? $data_length = akstringlen($data); @@ -5463,13 +5572,66 @@ private function processTypeFileCompressedSimple() return true; } + + private function readKeyExpansionExtraHeader() + { + $signature = fread($this->fp, 4); + + if ($signature != "JH\x00\x01") + { + // Not a valid JPS file + $this->setError(AKText::_('ERR_NOT_A_JPS_FILE')); + + return false; + } + + $bin_data = fread($this->fp, 8); + $header_data = unpack('vlength/Calgo/Viterations/CuseStaticSalt', $bin_data); + + if ($header_data['length'] != 76) + { + // Not a valid JPS file + $this->setError(AKText::_('ERR_NOT_A_JPS_FILE')); + + return false; + } + + switch ($header_data['algo']) + { + case 0: + $algorithm = 'sha1'; + break; + + case 1: + $algorithm = 'sha256'; + break; + + case 2: + $algorithm = 'sha512'; + break; + + default: + // Not a valid JPS file + $this->setError(AKText::_('ERR_NOT_A_JPS_FILE')); + + return false; + break; + } + + $this->pbkdf2Algorithm = $algorithm; + $this->pbkdf2Iterations = $header_data['iterations']; + $this->pbkdf2UseStaticSalt = $header_data['useStaticSalt']; + $this->pbkdf2StaticSalt = fread($this->fp, 64); + + return true; + } } /** * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -5654,13 +5816,21 @@ public function resetTime() { $this->start_time = $this->microtime_float(); } + + /** + * @param int $max_exec_time + */ + public function setMaxExecTime($max_exec_time) + { + $this->max_exec_time = $max_exec_time; + } } /** * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -5766,7 +5936,7 @@ public function &getFolders($folder, $pattern = '*') * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -5863,10 +6033,10 @@ class AKText extends AKAbstractObject 'RESTACLEANUP' => 'Restoration and Clean Up', 'BTN_RUNINSTALLER' => 'Run the Installer', 'BTN_CLEANUP' => 'Clean Up', - 'BTN_SITEFE' => 'Visit your site\'s front-end', - 'BTN_SITEBE' => 'Visit your site\'s back-end', + 'BTN_SITEFE' => 'Visit your site\'s frontend', + 'BTN_SITEBE' => 'Visit your site\'s backend', 'WARNINGS' => 'Extraction Warnings', - 'ERROR_OCCURED' => 'An error occured', + 'ERROR_OCCURED' => 'An error occurred', 'STEALTH_MODE' => 'Stealth mode', 'STEALTH_URL' => 'HTML file to show to web visitors', 'ERR_NOT_A_JPS_FILE' => 'The file is not a JPA archive', @@ -5888,7 +6058,8 @@ class AKText extends AKAbstractObject 'RELOAD_ARCHIVES' => 'Reload', 'CONFIG_UI_SFTPBROWSER_TITLE' => 'SFTP Directory Browser', 'ERR_COULD_NOT_OPEN_ARCHIVE_PART' => 'Could not open archive part file %s for reading. Check that the file exists, is readable by the web server and is not in a directory made out of reach by chroot, open_basedir restrictions or any other restriction put in place by your host.', - 'RENAME_FILES' => 'Rename server configuration files' + 'RENAME_FILES' => 'Rename server configuration files', + 'RESTORE_PERMISSIONS' => 'Restore file permissions', ); /** @@ -6313,7 +6484,7 @@ public function addDefaultLanguageStrings($stringList = array()) * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -6325,13 +6496,16 @@ public function addDefaultLanguageStrings($stringList = array()) */ class AKFactory { - /** @var array A list of instanciated objects */ + /** @var array A list of instantiated objects */ private $objectlist = array(); - /** @var array Simple hash data storage */ + /** @var array Simple hash data storage */ private $varlist = array(); - /** Private constructor makes sure we can't directly instanciate the class */ + /** @var self Static instance */ + private static $instance = null; + + /** Private constructor makes sure we can't directly instantiate the class */ private function __construct() { } @@ -6476,6 +6650,7 @@ public static function &getUnarchiver($configOverride = null) public static function get($key, $default = null) { $self = self::getInstance(); + if (array_key_exists($key, $self->varlist)) { return $self->varlist[$key]; @@ -6495,20 +6670,19 @@ public static function get($key, $default = null) */ protected static function &getInstance($serialized_data = null) { - static $myInstance; - if (!is_object($myInstance) || !is_null($serialized_data)) + if (!is_object(self::$instance) || !is_null($serialized_data)) { if (!is_null($serialized_data)) { - $myInstance = unserialize($serialized_data); + self::$instance = unserialize($serialized_data); } else { - $myInstance = new self(); + self::$instance = new self(); } } - return $myInstance; + return self::$instance; } /** @@ -6522,6 +6696,7 @@ protected static function &getInstance($serialized_data = null) protected static function &getClassInstance($class_name) { $self = self::getInstance(); + if (!isset($self->objectlist[$class_name])) { $self->objectlist[$class_name] = new $class_name; @@ -6553,12 +6728,7 @@ public static function unserialize($serialized_data) */ public static function nuke() { - $self = self::getInstance(); - foreach ($self->objectlist as $key => $object) - { - $self->objectlist[$key] = null; - } - $self->objectlist = array(); + self::$instance = null; } // ======================================================================== @@ -6607,7 +6777,7 @@ public static function &getTimer() * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -6647,7 +6817,7 @@ public function isSupported(); * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -6735,7 +6905,7 @@ protected function getZeroPadding($string, $blockSize) * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -6837,7 +7007,7 @@ public function getBlockSize() * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -6942,7 +7112,7 @@ public function getBlockSize() * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -6993,6 +7163,34 @@ class AKEncryptionAES protected static $passwords = array(); + /** + * The algorithm to use for PBKDF2. Must be a supported hash_hmac algorithm. Default: sha1 + * + * @var string + */ + private static $pbkdf2Algorithm = 'sha1'; + + /** + * Number of iterations to use for PBKDF2 + * + * @var int + */ + private static $pbkdf2Iterations = 1000; + + /** + * Should we use a static salt for PBKDF2? + * + * @var int + */ + private static $pbkdf2UseStaticSalt = 0; + + /** + * The static salt to use for PBKDF2 + * + * @var string + */ + private static $pbkdf2StaticSalt = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; + /** * Encrypt a text using AES encryption in Counter mode of operation * - see http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf @@ -7419,22 +7617,50 @@ public static function AESDecryptCBC($ciphertext, $password) return false; } - // Get the expanded key from the password - $key = self::expandKey($password); - // Read the data size $data_size = unpack('V', substr($ciphertext, -4)); + // Do I have a PBKDF2 salt? + $salt = substr($ciphertext, -92, 68); + $rightStringLimit = -4; + + $params = self::getKeyDerivationParameters(); + $keySizeBytes = $params['keySize']; + $algorithm = $params['algorithm']; + $iterations = $params['iterations']; + $useStaticSalt = $params['useStaticSalt']; + + if (substr($salt, 0, 4) == 'JPST') + { + // We have a stored salt. Retrieve it and tell decrypt to process the string minus the last 44 bytes + // (4 bytes for JPST, 16 bytes for the salt, 4 bytes for JPIV, 16 bytes for the IV, 4 bytes for the + // uncompressed string length - note that using PBKDF2 means we're also using a randomized IV per the + // format specification). + $salt = substr($salt, 4); + $rightStringLimit -= 68; + + $key = self::pbkdf2($password, $salt, $algorithm, $iterations, $keySizeBytes); + } + elseif ($useStaticSalt) + { + // We have a static salt. Use it for PBKDF2. + $key = self::getStaticSaltExpandedKey($password); + } + else + { + // Get the expanded key from the password. THIS USES THE OLD, INSECURE METHOD. + $key = self::expandKey($password); + } + // Try to get the IV from the data $iv = substr($ciphertext, -24, 20); - $rightStringLimit = -4; if (substr($iv, 0, 4) == 'JPIV') { // We have a stored IV. Retrieve it and tell mdecrypt to process the string minus the last 24 bytes // (4 bytes for JPIV, 16 bytes for the IV, 4 bytes for the uncompressed string length) $iv = substr($iv, 4); - $rightStringLimit = -24; + $rightStringLimit -= 20; } else { @@ -7455,7 +7681,7 @@ public static function AESDecryptCBC($ciphertext, $password) } /** - * That's the old way of craeting an IV that's definitely not cryptographically sound. + * That's the old way of creating an IV that's definitely not cryptographically sound. * * DO NOT USE, EVER, UNLESS YOU WANT TO DECRYPT LEGACY DATA * @@ -7565,13 +7791,177 @@ public static function getAdapter() return $adapter; } + + /** + * @return string + */ + public static function getPbkdf2Algorithm() + { + return self::$pbkdf2Algorithm; + } + + /** + * @param string $pbkdf2Algorithm + * @return void + */ + public static function setPbkdf2Algorithm($pbkdf2Algorithm) + { + self::$pbkdf2Algorithm = $pbkdf2Algorithm; + } + + /** + * @return int + */ + public static function getPbkdf2Iterations() + { + return self::$pbkdf2Iterations; + } + + /** + * @param int $pbkdf2Iterations + * @return void + */ + public static function setPbkdf2Iterations($pbkdf2Iterations) + { + self::$pbkdf2Iterations = $pbkdf2Iterations; + } + + /** + * @return int + */ + public static function getPbkdf2UseStaticSalt() + { + return self::$pbkdf2UseStaticSalt; + } + + /** + * @param int $pbkdf2UseStaticSalt + * @return void + */ + public static function setPbkdf2UseStaticSalt($pbkdf2UseStaticSalt) + { + self::$pbkdf2UseStaticSalt = $pbkdf2UseStaticSalt; + } + + /** + * @return string + */ + public static function getPbkdf2StaticSalt() + { + return self::$pbkdf2StaticSalt; + } + + /** + * @param string $pbkdf2StaticSalt + * @return void + */ + public static function setPbkdf2StaticSalt($pbkdf2StaticSalt) + { + self::$pbkdf2StaticSalt = $pbkdf2StaticSalt; + } + + /** + * Get the parameters fed into PBKDF2 to expand the user password into an encryption key. These are the static + * parameters (key size, hashing algorithm and number of iterations). A new salt is used for each encryption block + * to minimize the risk of attacks against the password. + * + * @return array + */ + public static function getKeyDerivationParameters() + { + return array( + 'keySize' => 16, + 'algorithm' => self::$pbkdf2Algorithm, + 'iterations' => self::$pbkdf2Iterations, + 'useStaticSalt' => self::$pbkdf2UseStaticSalt, + 'staticSalt' => self::$pbkdf2StaticSalt, + ); + } + + /** + * PBKDF2 key derivation function as defined by RSA's PKCS #5: https://www.ietf.org/rfc/rfc2898.txt + * + * Test vectors can be found here: https://www.ietf.org/rfc/rfc6070.txt + * + * This implementation of PBKDF2 was originally created by https://defuse.ca + * With improvements by http://www.variations-of-shadow.com + * Modified for Akeeba Engine by Akeeba Ltd (removed unnecessary checks to make it faster) + * + * @param string $password The password. + * @param string $salt A salt that is unique to the password. + * @param string $algorithm The hash algorithm to use. Default is sha1. + * @param int $count Iteration count. Higher is better, but slower. Default: 1000. + * @param int $key_length The length of the derived key in bytes. + * + * @return string A string of $key_length bytes + */ + public static function pbkdf2($password, $salt, $algorithm = 'sha1', $count = 1000, $key_length = 16) + { + if (function_exists("hash_pbkdf2")) + { + return hash_pbkdf2($algorithm, $password, $salt, $count, $key_length, true); + } + + $hash_length = akstringlen(hash($algorithm, "", true)); + $block_count = ceil($key_length / $hash_length); + + $output = ""; + + for ($i = 1; $i <= $block_count; $i++) + { + // $i encoded as 4 bytes, big endian. + $last = $salt . pack("N", $i); + + // First iteration + $xorResult = hash_hmac($algorithm, $last, $password, true); + $last = $xorResult; + + // Perform the other $count - 1 iterations + for ($j = 1; $j < $count; $j++) + { + $last = hash_hmac($algorithm, $last, $password, true); + $xorResult ^= $last; + } + + $output .= $xorResult; + } + + return aksubstr($output, 0, $key_length); + } + + /** + * Get the expanded key from the user supplied password using a static salt. The results are cached for performance + * reasons. + * + * @param string $password The user-supplied password, UTF-8 encoded. + * + * @return string The expanded key + */ + private static function getStaticSaltExpandedKey($password) + { + $params = self::getKeyDerivationParameters(); + $keySizeBytes = $params['keySize']; + $algorithm = $params['algorithm']; + $iterations = $params['iterations']; + $staticSalt = $params['staticSalt']; + + $lookupKey = "PBKDF2-$algorithm-$iterations-" . md5($password . $staticSalt); + + if (!array_key_exists($lookupKey, self::$passwords)) + { + self::$passwords[$lookupKey] = self::pbkdf2($password, $staticSalt, $algorithm, $iterations, $keySizeBytes); + } + + return self::$passwords[$lookupKey]; + } + } /** * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -7769,7 +8159,7 @@ function masterSetup() * Akeeba Restore * A JSON-powered JPA, JPS and ZIP archive extraction library * - * @copyright 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. + * @copyright 2008-2017 Nicholas K. Dionysopoulos / Akeeba Ltd. * @license GNU GPL v2 or - at your option - any later version * @package akeebabackup * @subpackage kickstart @@ -7834,11 +8224,16 @@ public function __toString() $timer->enforce_min_exec_time(); break; + /** + * There are two separate steps here since we were using an inefficient restoration intialization method in + * the past. Now both startRestore and stepRestore are identical. The difference in behavior depends + * exclusively on the calling Javascript. If no serialized factory was passed in the request then we start a + * new restoration. If a serialized factory was passed in the request then the restoration is resumed. For + * this reason we should NEVER call AKFactory::nuke() in startRestore anymore: that would simply reset the + * extraction engine configuration which was done in masterSetup() leading to an error about the file being + * invalid (since no file is found). + */ case 'startRestore': - AKFactory::nuke(); // Reset the factory - - // Let the control flow to the next step (the rest of the code is common!!) - case 'stepRestore': $engine = AKFactory::getUnarchiver(); // Get the engine $observer = new RestorationObserver(); // Create a new observer @@ -7878,24 +8273,32 @@ public function __toString() $postproc = AKFactory::getPostProc(); - // Rename htaccess.bak to .htaccess - if (file_exists($root . '/htaccess.bak')) + /** + * Should I rename the htaccess.bak and web.config.bak files back to their live filenames...? + */ + $renameFiles = AKFactory::get('kickstart.setup.postrenamefiles', true); + + if ($renameFiles) { - if (file_exists($root . '/.htaccess')) + // Rename htaccess.bak to .htaccess + if (file_exists($root . '/htaccess.bak')) { - $postproc->unlink($root . '/.htaccess'); + if (file_exists($root . '/.htaccess')) + { + $postproc->unlink($root . '/.htaccess'); + } + $postproc->rename($root . '/htaccess.bak', $root . '/.htaccess'); } - $postproc->rename($root . '/htaccess.bak', $root . '/.htaccess'); - } - // Rename htaccess.bak to .htaccess - if (file_exists($root . '/web.config.bak')) - { - if (file_exists($root . '/web.config')) + // Rename htaccess.bak to .htaccess + if (file_exists($root . '/web.config.bak')) { - $postproc->unlink($root . '/web.config'); + if (file_exists($root . '/web.config')) + { + $postproc->unlink($root . '/web.config'); + } + $postproc->rename($root . '/web.config.bak', $root . '/web.config'); } - $postproc->rename($root . '/web.config.bak', $root . '/web.config'); } // Remove restoration.php diff --git a/administrator/components/com_joomlaupdate/restore_finalisation.php b/administrator/components/com_joomlaupdate/restore_finalisation.php index fd702319997b1..24eaa99a52694 100644 --- a/administrator/components/com_joomlaupdate/restore_finalisation.php +++ b/administrator/components/com_joomlaupdate/restore_finalisation.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -49,7 +49,7 @@ abstract class JFile * * @param string $fileName The path to the file to be checked * - * @return bool + * @return boolean * * @since 3.5.1 */ @@ -63,7 +63,7 @@ public static function exists($fileName) * * @param string $fileName The path to the file to be deleted * - * @return bool + * @return boolean * * @since 3.5.1 */ @@ -90,7 +90,7 @@ abstract class JFolder * * @param string $folderName The path to the folder to be checked * - * @return bool + * @return boolean * * @since 3.5.1 */ @@ -164,7 +164,7 @@ function finalizeRestore($siteRoot, $restorePath) if (file_exists($filePath)) { - require_once ($filePath); + require_once $filePath; } // Make sure Joomla!'s code can figure out which files exist and need be removed diff --git a/administrator/components/com_joomlaupdate/views/default/tmpl/complete.php b/administrator/components/com_joomlaupdate/views/default/tmpl/complete.php index 446f5b7b83457..45b2f9c6847db 100644 --- a/administrator/components/com_joomlaupdate/views/default/tmpl/complete.php +++ b/administrator/components/com_joomlaupdate/views/default/tmpl/complete.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_joomlaupdate/views/default/tmpl/default.php b/administrator/components/com_joomlaupdate/views/default/tmpl/default.php index f418e632ce4a5..cbeacb47c4d19 100644 --- a/administrator/components/com_joomlaupdate/views/default/tmpl/default.php +++ b/administrator/components/com_joomlaupdate/views/default/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_joomlaupdate/views/default/tmpl/default_nodownload.php b/administrator/components/com_joomlaupdate/views/default/tmpl/default_nodownload.php index 0e2153d2dba76..9ea9f1a01c264 100644 --- a/administrator/components/com_joomlaupdate/views/default/tmpl/default_nodownload.php +++ b/administrator/components/com_joomlaupdate/views/default/tmpl/default_nodownload.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_joomlaupdate/views/default/tmpl/default_reinstall.php b/administrator/components/com_joomlaupdate/views/default/tmpl/default_reinstall.php index dd9ae2ab87e7c..d124c14d79bde 100644 --- a/administrator/components/com_joomlaupdate/views/default/tmpl/default_reinstall.php +++ b/administrator/components/com_joomlaupdate/views/default/tmpl/default_reinstall.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_joomlaupdate/views/default/tmpl/default_update.php b/administrator/components/com_joomlaupdate/views/default/tmpl/default_update.php index 416d11ddb9e1e..5b5bd3cf63d1e 100644 --- a/administrator/components/com_joomlaupdate/views/default/tmpl/default_update.php +++ b/administrator/components/com_joomlaupdate/views/default/tmpl/default_update.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_joomlaupdate/views/default/tmpl/default_updatemefirst.php b/administrator/components/com_joomlaupdate/views/default/tmpl/default_updatemefirst.php index 9087ce8098cdd..8cf3621599414 100644 --- a/administrator/components/com_joomlaupdate/views/default/tmpl/default_updatemefirst.php +++ b/administrator/components/com_joomlaupdate/views/default/tmpl/default_updatemefirst.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; diff --git a/administrator/components/com_joomlaupdate/views/default/tmpl/default_upload.php b/administrator/components/com_joomlaupdate/views/default/tmpl/default_upload.php index 8e12a89bb3828..f745d06486322 100644 --- a/administrator/components/com_joomlaupdate/views/default/tmpl/default_upload.php +++ b/administrator/components/com_joomlaupdate/views/default/tmpl/default_upload.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -61,7 +61,7 @@

    - +

    diff --git a/administrator/components/com_joomlaupdate/views/default/view.html.php b/administrator/components/com_joomlaupdate/views/default/view.html.php index 5fdd89881c021..bf818032ed2be 100644 --- a/administrator/components/com_joomlaupdate/views/default/view.html.php +++ b/administrator/components/com_joomlaupdate/views/default/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_joomlaupdate/views/update/tmpl/default.php b/administrator/components/com_joomlaupdate/views/update/tmpl/default.php index 1289724fe5aba..cba3286f460c6 100644 --- a/administrator/components/com_joomlaupdate/views/update/tmpl/default.php +++ b/administrator/components/com_joomlaupdate/views/update/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_joomlaupdate/views/update/tmpl/finaliseconfirm.php b/administrator/components/com_joomlaupdate/views/update/tmpl/finaliseconfirm.php index 3131121d07d19..eedb4d9ecdcf7 100644 --- a/administrator/components/com_joomlaupdate/views/update/tmpl/finaliseconfirm.php +++ b/administrator/components/com_joomlaupdate/views/update/tmpl/finaliseconfirm.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -33,7 +33,7 @@
    - + @@ -46,7 +46,7 @@
    - + @@ -60,14 +60,14 @@
    - + - +
    @@ -77,12 +77,12 @@
    diff --git a/administrator/components/com_joomlaupdate/views/update/view.html.php b/administrator/components/com_joomlaupdate/views/update/view.html.php index a9067ece2dba2..cbbab460a9044 100644 --- a/administrator/components/com_joomlaupdate/views/update/view.html.php +++ b/administrator/components/com_joomlaupdate/views/update/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -21,22 +21,14 @@ class JoomlaupdateViewUpdate extends JViewLegacy * * @param string $tpl Template name. * - * @return void + * @return void */ - public function display($tpl=null) + public function display($tpl = null) { + JFactory::getApplication()->input->set('hidemainmenu', true); + // Set the toolbar information. JToolbarHelper::title(JText::_('COM_JOOMLAUPDATE_OVERVIEW'), 'loop install'); - JToolBarHelper::divider(); - JToolBarHelper::help('JHELP_COMPONENTS_JOOMLA_UPDATE'); - - // Add toolbar buttons. - $user = JFactory::getUser(); - - if ($user->authorise('core.admin', 'com_joomlaupdate') || $user->authorise('core.options', 'com_joomlaupdate')) - { - JToolbarHelper::preferences('com_joomlaupdate'); - } // Import com_login's model JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_login/models', 'LoginModel'); diff --git a/administrator/components/com_joomlaupdate/views/upload/tmpl/captive.php b/administrator/components/com_joomlaupdate/views/upload/tmpl/captive.php index 0f293137091e8..3f3d46fd5ea47 100644 --- a/administrator/components/com_joomlaupdate/views/upload/tmpl/captive.php +++ b/administrator/components/com_joomlaupdate/views/upload/tmpl/captive.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -32,7 +32,7 @@
    - + @@ -45,7 +45,7 @@
    - + @@ -59,14 +59,14 @@
    - + - +
    @@ -76,12 +76,12 @@
    diff --git a/administrator/components/com_joomlaupdate/views/upload/view.html.php b/administrator/components/com_joomlaupdate/views/upload/view.html.php index bc720d4c355d2..aafadcf81448c 100644 --- a/administrator/components/com_joomlaupdate/views/upload/view.html.php +++ b/administrator/components/com_joomlaupdate/views/upload/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_joomlaupdate * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_languages/config.xml b/administrator/components/com_languages/config.xml index 5453162acf872..1662ae7c83c93 100644 --- a/administrator/components/com_languages/config.xml +++ b/administrator/components/com_languages/config.xml @@ -2,23 +2,25 @@
    + section="component" + /> + $warn) { - if (($warn->alang == 1) && ($warn->slang == 0)) + if ($warn->alang == 1 && $warn->slang == 0) { unset($warnings[$index]); } - if (($warn->alang == 0) && (($warn->slang == 0) && (empty($warn->mlang)))) + if ($warn->alang == 0 && $warn->slang == 0 && empty($warn->mlang)) { unset($warnings[$index]); } - if (($warn->alang == 0) && (($warn->slang == $languages) && (empty($warn->mlang)))) + if ($warn->alang == 0 && $warn->slang == $languages && empty($warn->mlang)) { unset($warnings[$index]); } diff --git a/administrator/components/com_languages/languages.php b/administrator/components/com_languages/languages.php index 3a07360d932b5..219b308e9ea8b 100644 --- a/administrator/components/com_languages/languages.php +++ b/administrator/components/com_languages/languages.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_languages/languages.xml b/administrator/components/com_languages/languages.xml index bf364005ef39c..33e98d4cccb4c 100644 --- a/administrator/components/com_languages/languages.xml +++ b/administrator/components/com_languages/languages.xml @@ -3,7 +3,7 @@ com_languages Joomla! Project April 2006 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_languages/models/forms/language.xml b/administrator/components/com_languages/models/forms/language.xml index 89b50cb9d8074..61e900bc6844e 100644 --- a/administrator/components/com_languages/models/forms/language.xml +++ b/administrator/components/com_languages/models/forms/language.xml @@ -1,41 +1,51 @@
    - - - - - - - + > -
    - -
    - diff --git a/administrator/components/com_languages/models/forms/override.xml b/administrator/components/com_languages/models/forms/override.xml index 954a6cb4c67fb..8d1a2ddb64e1d 100644 --- a/administrator/components/com_languages/models/forms/override.xml +++ b/administrator/components/com_languages/models/forms/override.xml @@ -8,7 +8,8 @@ description="COM_LANGUAGES_OVERRIDE_FIELD_KEY_DESC" size="60" required="true" - filter="LanguagesHelper::filterKey" /> + filter="LanguagesHelper::filterKey" + /> + filter="LanguagesHelper::filterText" + /> + filter="boolean" + /> + size="50" + /> + default="value" + > - - - + type="hidden" + />
    diff --git a/administrator/components/com_languages/models/installed.php b/administrator/components/com_languages/models/installed.php index 97811176d0326..23da9a79fafcc 100644 --- a/administrator/components/com_languages/models/installed.php +++ b/administrator/components/com_languages/models/installed.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -83,7 +83,7 @@ public function __construct($config = array()) 'author', 'authorEmail', 'extension_id', - 'cliend_id', + 'client_id', ); } @@ -280,6 +280,7 @@ public function getData() if ($limit !== 0) { $start = (int) $this->getState('list.start', 0); + return array_slice($installedLanguages, $start, $limit); } diff --git a/administrator/components/com_languages/models/language.php b/administrator/components/com_languages/models/language.php index 5b221e58c2beb..92416726e1771 100644 --- a/administrator/components/com_languages/models/language.php +++ b/administrator/components/com_languages/models/language.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_languages/models/languages.php b/administrator/components/com_languages/models/languages.php index 09fb317bb669d..2cf61483c335e 100644 --- a/administrator/components/com_languages/models/languages.php +++ b/administrator/components/com_languages/models/languages.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_languages/models/override.php b/administrator/components/com_languages/models/override.php index e76c752057425..29682a48c66a5 100644 --- a/administrator/components/com_languages/models/override.php +++ b/administrator/components/com_languages/models/override.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -42,7 +42,7 @@ public function getForm($data = array(), $loadData = true) if (!$langName) { - // If a language only exists in frontend, it's meta data cannot be + // If a language only exists in frontend, its metadata cannot be // loaded in backend at the moment, so fall back to the language tag. $langName = $language; } @@ -105,7 +105,7 @@ public function getItem($pk = null) $result->override = $strings[$pk]; } - $opposite_filename = constant('JPATH_' . strtoupper($this->getState('filter.client') == 'site' ? 'administrator' : 'site')) + $opposite_filename = constant('JPATH_' . strtoupper($this->getState('filter.client') == 'site' ? 'administrator' : 'site')) . '/language/overrides/' . $this->getState('filter.language', 'en-GB') . '.override.ini'; $opposite_strings = LanguagesHelper::parseFile($opposite_filename); $result->both = isset($opposite_strings[$pk]) && ($opposite_strings[$pk] == $strings[$pk]); diff --git a/administrator/components/com_languages/models/overrides.php b/administrator/components/com_languages/models/overrides.php index a30a891923505..a7baba6a8bfb0 100644 --- a/administrator/components/com_languages/models/overrides.php +++ b/administrator/components/com_languages/models/overrides.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -21,7 +21,7 @@ class LanguagesModelOverrides extends JModelList * * @param array $config An optional associative array of configuration settings. * - * @since 2.5 + * @since 2.5 */ public function __construct($config = array()) { @@ -112,9 +112,9 @@ public function getOverrides($all = false) /** * Method to get the total number of overrides. * - * @return int The total number of overrides. + * @return integer The total number of overrides. * - * @since 2.5 + * @since 2.5 */ public function getTotal() { @@ -190,7 +190,7 @@ protected function populateState($ordering = 'key', $direction = 'asc') * * @return array Sorted associative array of languages. * - * @since 2.5 + * @since 2.5 */ public function getLanguages() { @@ -230,9 +230,9 @@ public function getLanguages() * * @param array $cids Array of keys to delete. * - * @return integer Number of successfully deleted overrides, boolean false if an error occurred. + * @return integer Number of successfully deleted overrides, boolean false if an error occurred. * - * @since 2.5 + * @since 2.5 */ public function delete($cids) { @@ -277,7 +277,7 @@ public function delete($cids) /** * Removes all of the cached strings from the table. * - * @return boolean result of operation + * @return boolean result of operation * * @since 3.4.2 */ diff --git a/administrator/components/com_languages/models/strings.php b/administrator/components/com_languages/models/strings.php index f3f7b84d52c0e..a0e5751d5f408 100644 --- a/administrator/components/com_languages/models/strings.php +++ b/administrator/components/com_languages/models/strings.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -44,8 +44,8 @@ public function refresh() // Create the insert query. $query = $this->_db->getQuery(true) - ->insert($this->_db->quoteName('#__overrider')) - ->columns('constant, string, file'); + ->insert($this->_db->quoteName('#__overrider')) + ->columns('constant, string, file'); // Initialize some variables. $client = $app->getUserState('com_languages.overrides.filter.client', 'site') ? 'administrator' : 'site'; @@ -74,7 +74,7 @@ public function refresh() $files = array_merge($files, JFolder::files($base . '/templates', $language . '.*ini$', 3, true)); // Parse language directories of plugins. - $files = array_merge($files, JFolder::files(JPATH_PLUGINS, $language . '.*ini$', 3, true)); + $files = array_merge($files, JFolder::files(JPATH_PLUGINS, $language . '.*ini$', 4, true)); // Parse all found ini files and add the strings to the database cache. foreach ($files as $file) @@ -148,7 +148,7 @@ public function search() // Check whether there are more results than already loaded. $query->clear('select')->clear('limit') - ->select('COUNT(id)'); + ->select('COUNT(id)'); $this->_db->setQuery($query); if ($this->_db->loadResult() > $limitstart + 10) diff --git a/administrator/components/com_languages/views/installed/tmpl/default.php b/administrator/components/com_languages/views/installed/tmpl/default.php index 858eaa16ef1c2..e445862fd180c 100644 --- a/administrator/components/com_languages/views/installed/tmpl/default.php +++ b/administrator/components/com_languages/views/installed/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -100,8 +100,9 @@ published, $i, 'installed.', !$row->published && $canChange); ?> + - version, 0, 3) != $version::RELEASE || substr($row->version, 0, 5) != $currentShortVersion) : ?> + version, $minorVersion) !== 0 || strpos($row->version, $currentShortVersion) !== 0) : ?> version; ?> version; ?> diff --git a/administrator/components/com_languages/views/installed/view.html.php b/administrator/components/com_languages/views/installed/view.html.php index 282bc9449612d..9f5fcae7db305 100644 --- a/administrator/components/com_languages/views/installed/view.html.php +++ b/administrator/components/com_languages/views/installed/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -70,9 +70,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } $this->addToolbar(); diff --git a/administrator/components/com_languages/views/language/tmpl/edit.php b/administrator/components/com_languages/views/language/tmpl/edit.php index e47d89fb8751a..17889ecef501e 100644 --- a/administrator/components/com_languages/views/language/tmpl/edit.php +++ b/administrator/components/com_languages/views/language/tmpl/edit.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_languages/views/language/view.html.php b/administrator/components/com_languages/views/language/view.html.php index 93ca48e1fe771..1c0d0a96e9107 100644 --- a/administrator/components/com_languages/views/language/view.html.php +++ b/administrator/components/com_languages/views/language/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -39,9 +39,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } $this->addToolbar(); diff --git a/administrator/components/com_languages/views/languages/tmpl/default.php b/administrator/components/com_languages/views/languages/tmpl/default.php index f98dde1fbbc62..bcdd7506580c6 100644 --- a/administrator/components/com_languages/views/languages/tmpl/default.php +++ b/administrator/components/com_languages/views/languages/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_languages/views/languages/view.html.php b/administrator/components/com_languages/views/languages/view.html.php index 6c771d2a38f82..ba09b0e8eaa4f 100644 --- a/administrator/components/com_languages/views/languages/view.html.php +++ b/administrator/components/com_languages/views/languages/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -42,9 +42,7 @@ public function display($tpl = null) // Check for errors. if (count($errors = $this->get('Errors'))) { - JError::raiseError(500, implode("\n", $errors)); - - return false; + throw new Exception(implode("\n", $errors), 500); } $this->addToolbar(); @@ -124,15 +122,15 @@ protected function addToolbar() protected function getSortFields() { return array( - 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), - 'a.published' => JText::_('JSTATUS'), - 'a.title' => JText::_('JGLOBAL_TITLE'), - 'a.title_native' => JText::_('COM_LANGUAGES_HEADING_TITLE_NATIVE'), - 'a.lang_code' => JText::_('COM_LANGUAGES_FIELD_LANG_TAG_LABEL'), - 'a.sef' => JText::_('COM_LANGUAGES_FIELD_LANG_CODE_LABEL'), - 'a.image' => JText::_('COM_LANGUAGES_HEADING_LANG_IMAGE'), - 'a.access' => JText::_('JGRID_HEADING_ACCESS'), - 'a.lang_id' => JText::_('JGRID_HEADING_ID') + 'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), + 'a.published' => JText::_('JSTATUS'), + 'a.title' => JText::_('JGLOBAL_TITLE'), + 'a.title_native' => JText::_('COM_LANGUAGES_HEADING_TITLE_NATIVE'), + 'a.lang_code' => JText::_('COM_LANGUAGES_FIELD_LANG_TAG_LABEL'), + 'a.sef' => JText::_('COM_LANGUAGES_FIELD_LANG_CODE_LABEL'), + 'a.image' => JText::_('COM_LANGUAGES_HEADING_LANG_IMAGE'), + 'a.access' => JText::_('JGRID_HEADING_ACCESS'), + 'a.lang_id' => JText::_('JGRID_HEADING_ID'), ); } } diff --git a/administrator/components/com_languages/views/multilangstatus/tmpl/default.php b/administrator/components/com_languages/views/multilangstatus/tmpl/default.php index 1cf0404029675..f88f5d59a0483 100644 --- a/administrator/components/com_languages/views/multilangstatus/tmpl/default.php +++ b/administrator/components/com_languages/views/multilangstatus/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_languages/views/multilangstatus/view.html.php b/administrator/components/com_languages/views/multilangstatus/view.html.php index 8f0e95eeaa3fc..4f8612fe97069 100644 --- a/administrator/components/com_languages/views/multilangstatus/view.html.php +++ b/administrator/components/com_languages/views/multilangstatus/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_languages/views/override/tmpl/edit.php b/administrator/components/com_languages/views/override/tmpl/edit.php index c5509debec431..1718789fa4d2a 100644 --- a/administrator/components/com_languages/views/override/tmpl/edit.php +++ b/administrator/components/com_languages/views/override/tmpl/edit.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_languages/views/override/view.html.php b/administrator/components/com_languages/views/override/view.html.php index 0e33acfd298ff..30d74e9963ad9 100644 --- a/administrator/components/com_languages/views/override/view.html.php +++ b/administrator/components/com_languages/views/override/view.html.php @@ -3,14 +3,14 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** - * View to edit an language override + * View to edit a language override * * @since 2.5 */ diff --git a/administrator/components/com_languages/views/overrides/tmpl/default.php b/administrator/components/com_languages/views/overrides/tmpl/default.php index f7cf21f49267d..779689363d7a3 100644 --- a/administrator/components/com_languages/views/overrides/tmpl/default.php +++ b/administrator/components/com_languages/views/overrides/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -38,8 +38,8 @@
    - - + +
    diff --git a/administrator/components/com_languages/views/overrides/view.html.php b/administrator/components/com_languages/views/overrides/view.html.php index 1e25e2d295abf..ef88e5e918f6c 100644 --- a/administrator/components/com_languages/views/overrides/view.html.php +++ b/administrator/components/com_languages/views/overrides/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_languages * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_login/controller.php b/administrator/components/com_login/controller.php index 7c6dc49fbf77b..ef368dc15f80b 100644 --- a/administrator/components/com_login/controller.php +++ b/administrator/components/com_login/controller.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_login * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_login/login.php b/administrator/components/com_login/login.php index 87665a673dd02..c270b8cfafcba 100644 --- a/administrator/components/com_login/login.php +++ b/administrator/components/com_login/login.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_login * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_login/login.xml b/administrator/components/com_login/login.xml index 0361c09f23bf9..82bebcabe5647 100644 --- a/administrator/components/com_login/login.xml +++ b/administrator/components/com_login/login.xml @@ -3,7 +3,7 @@ com_login Joomla! Project April 2006 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_login/models/login.php b/administrator/components/com_login/models/login.php index efc00a6a5befe..530d7e3918b9e 100644 --- a/administrator/components/com_login/models/login.php +++ b/administrator/components/com_login/models/login.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_login * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -27,20 +27,18 @@ class LoginModelLogin extends JModelLegacy */ protected function populateState() { - $app = JFactory::getApplication(); - - $input = $app->input; - $method = $input->getMethod(); + $input = JFactory::getApplication()->input->getInputForRequestMethod(); $credentials = array( - 'username' => $input->$method->get('username', '', 'USERNAME'), - 'password' => $input->$method->get('passwd', '', 'RAW'), - 'secretkey' => $input->$method->get('secretkey', '', 'RAW'), + 'username' => $input->get('username', '', 'USERNAME'), + 'password' => $input->get('passwd', '', 'RAW'), + 'secretkey' => $input->get('secretkey', '', 'RAW'), ); + $this->setState('credentials', $credentials); // Check for return URL from the request first. - if ($return = $input->$method->get('return', '', 'BASE64')) + if ($return = $input->get('return', '', 'BASE64')) { $return = base64_decode($return); diff --git a/administrator/components/com_login/views/login/tmpl/default.php b/administrator/components/com_login/views/login/tmpl/default.php index 909bc162cf18b..0774f913000ec 100644 --- a/administrator/components/com_login/views/login/tmpl/default.php +++ b/administrator/components/com_login/views/login/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_login * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_login/views/login/view.html.php b/administrator/components/com_login/views/login/view.html.php index 0f9d047e4bf87..9b3840c3662c6 100644 --- a/administrator/components/com_login/views/login/view.html.php +++ b/administrator/components/com_login/views/login/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_login * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -16,7 +16,7 @@ */ class LoginViewLogin extends JViewLegacy { - /** + /** * Display the view. * * @param string $tpl The name of the template file to parse. @@ -30,9 +30,9 @@ public function display($tpl = null) /** * To prevent clickjacking, only allow the login form to be used inside a frame in the same origin. * So send a X-Frame-Options HTTP Header with the SAMEORIGIN value. - * - * @see https://www.owasp.org/index.php/Clickjacking_Defense_Cheat_Sheet - * https://tools.ietf.org/html/rfc7034 + * + * @link https://www.owasp.org/index.php/Clickjacking_Defense_Cheat_Sheet + * @link https://tools.ietf.org/html/rfc7034 */ JFactory::getApplication()->setHeader('X-Frame-Options', 'SAMEORIGIN'); diff --git a/administrator/components/com_media/config.xml b/administrator/components/com_media/config.xml index ffe071a62f513..5e0ade0601fe4 100644 --- a/administrator/components/com_media/config.xml +++ b/administrator/components/com_media/config.xml @@ -6,46 +6,56 @@ + description="COM_MEDIA_FIELD_LEGAL_EXTENSIONS_DESC" + size="50" + default="bmp,csv,doc,gif,ico,jpg,jpeg,odg,odp,ods,odt,pdf,png,ppt,txt,xcf,xls,BMP,CSV,DOC,GIF,ICO,JPG,JPEG,ODG,ODP,ODS,ODT,PDF,PNG,PPT,TXT,XCF,XLS" + /> + /> - + /> + /> + > @@ -53,10 +63,12 @@ + showon="restrict_uploads:1" + > @@ -64,33 +76,40 @@ + showon="restrict_uploads:1" + /> + description="COM_MEDIA_FIELD_IGNORED_EXTENSIONS_DESC" + size="50" + /> + description="COM_MEDIA_FIELD_LEGAL_MIME_TYPES_DESC" + size="50" + default="image/jpeg,image/gif,image/png,image/bmp,application/msword,application/excel,application/pdf,application/powerpoint,text/plain,application/x-zip" + showon="restrict_uploads:1" + /> + showon="restrict_uploads:1" + />
    + section="component" + />
    diff --git a/administrator/components/com_media/controller.php b/administrator/components/com_media/controller.php index b03948df3f541..f3098b1c633a7 100644 --- a/administrator/components/com_media/controller.php +++ b/administrator/components/com_media/controller.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_media/controllers/file.json.php b/administrator/components/com_media/controllers/file.json.php index f3dc02b1cf28b..a76b13b96ba2b 100644 --- a/administrator/components/com_media/controllers/file.json.php +++ b/administrator/components/com_media/controllers/file.json.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -115,12 +115,12 @@ public function upload() return; } - // Trigger the onContentBeforeSave event. - JPluginHelper::importPlugin('content'); - $dispatcher = JEventDispatcher::getInstance(); - $object_file = new JObject($file); - $object_file->filepath = $filepath; - $result = $dispatcher->trigger('onContentBeforeSave', array('com_media.file', &$object_file, true)); + // Trigger the onContentBeforeSave event. + JPluginHelper::importPlugin('content'); + $dispatcher = JEventDispatcher::getInstance(); + $object_file = new JObject($file); + $object_file->filepath = $filepath; + $result = $dispatcher->trigger('onContentBeforeSave', array('com_media.file', &$object_file, true)); if (in_array(false, $result, true)) { diff --git a/administrator/components/com_media/controllers/file.php b/administrator/components/com_media/controllers/file.php index 7d5ee2952afd1..891a5bd3e0d07 100644 --- a/administrator/components/com_media/controllers/file.php +++ b/administrator/components/com_media/controllers/file.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -60,6 +60,14 @@ public function upload() $this->setRedirect('index.php?option=com_media&folder=' . $this->folder); } + if (!$files) + { + // If we could not get any data from the request we can not upload it. + JFactory::getApplication()->enqueueMessage(JText::_('COM_MEDIA_ERROR_WARNFILENOTSAFE'), 'error'); + + return false; + } + // Authorize the user if (!$this->authoriseUser('create')) { @@ -143,7 +151,6 @@ public function upload() if (!MediaHelper::canUpload($file, $err)) { // The file can't be uploaded - return false; } diff --git a/administrator/components/com_media/controllers/folder.php b/administrator/components/com_media/controllers/folder.php index 6b0da855a18fb..f1439adbc9034 100644 --- a/administrator/components/com_media/controllers/folder.php +++ b/administrator/components/com_media/controllers/folder.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_media/helpers/media.php b/administrator/components/com_media/helpers/media.php index e81aff5a1ca32..03213eb80b4a4 100644 --- a/administrator/components/com_media/helpers/media.php +++ b/administrator/components/com_media/helpers/media.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_media/layouts/toolbar/deletemedia.php b/administrator/components/com_media/layouts/toolbar/deletemedia.php index 318d85be711e6..e605566750f19 100644 --- a/administrator/components/com_media/layouts/toolbar/deletemedia.php +++ b/administrator/components/com_media/layouts/toolbar/deletemedia.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_media/layouts/toolbar/newfolder.php b/administrator/components/com_media/layouts/toolbar/newfolder.php index c8b9d57fa6c3f..b62eeebc1dc4e 100644 --- a/administrator/components/com_media/layouts/toolbar/newfolder.php +++ b/administrator/components/com_media/layouts/toolbar/newfolder.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_media/layouts/toolbar/uploadmedia.php b/administrator/components/com_media/layouts/toolbar/uploadmedia.php index 6c4599709f630..2d0f501739dfb 100644 --- a/administrator/components/com_media/layouts/toolbar/uploadmedia.php +++ b/administrator/components/com_media/layouts/toolbar/uploadmedia.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_media/media.php b/administrator/components/com_media/media.php index 66810dfafb499..7069de516037a 100644 --- a/administrator/components/com_media/media.php +++ b/administrator/components/com_media/media.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -15,7 +15,7 @@ $author = $input->get('author'); // Access check. -if (!$user->authorise('core.manage', 'com_media') && (!$asset or (!$user->authorise('core.edit', $asset) +if (!$user->authorise('core.manage', 'com_media') && (!$asset || (!$user->authorise('core.edit', $asset) && !$user->authorise('core.create', $asset) && count($user->getAuthorisedCategories($asset, 'core.create')) == 0) && !($user->id == $author && $user->authorise('core.edit.own', $asset)))) diff --git a/administrator/components/com_media/media.xml b/administrator/components/com_media/media.xml index d4e454590c9f0..9bdf880abd6a9 100644 --- a/administrator/components/com_media/media.xml +++ b/administrator/components/com_media/media.xml @@ -3,7 +3,7 @@ com_media Joomla! Project April 2006 - (C) 2005 - 2017 Open Source Matters. All rights reserved. + (C) 2005 - 2018 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org diff --git a/administrator/components/com_media/models/list.php b/administrator/components/com_media/models/list.php index 1d6fd526c3839..ef6848a639362 100644 --- a/administrator/components/com_media/models/list.php +++ b/administrator/components/com_media/models/list.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -131,11 +131,13 @@ public function getList() // Iterate over the files if they exist if ($fileList !== false) { + $tmpBaseObject = new JObject; + foreach ($fileList as $file) { if (is_file($basePath . '/' . $file) && substr($file, 0, 1) != '.' && strtolower($file) !== 'index.html') { - $tmp = new JObject; + $tmp = clone $tmpBaseObject; $tmp->name = $file; $tmp->title = $file; $tmp->path = str_replace(DIRECTORY_SEPARATOR, '/', JPath::clean($basePath . '/' . $file)); @@ -209,9 +211,11 @@ public function getList() // Iterate over the folders if they exist if ($folderList !== false) { + $tmpBaseObject = new JObject; + foreach ($folderList as $folder) { - $tmp = new JObject; + $tmp = clone $tmpBaseObject; $tmp->name = basename($folder); $tmp->path = str_replace(DIRECTORY_SEPARATOR, '/', JPath::clean($basePath . '/' . $folder)); $tmp->path_relative = str_replace($mediaBase, '', $tmp->path); diff --git a/administrator/components/com_media/models/manager.php b/administrator/components/com_media/models/manager.php index a7c9c397d14ed..bb8987e0d2ca6 100644 --- a/administrator/components/com_media/models/manager.php +++ b/administrator/components/com_media/models/manager.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -65,6 +65,7 @@ public function getFolderList($base = null) { $base = COM_MEDIA_BASE; } + // Corrections for windows paths $base = str_replace(DIRECTORY_SEPARATOR, '/', $base); $com_media_base_uni = str_replace(DIRECTORY_SEPARATOR, '/', COM_MEDIA_BASE); diff --git a/administrator/components/com_media/views/images/tmpl/default.php b/administrator/components/com_media/views/images/tmpl/default.php index 79b60094b1187..4baf462ad6479 100644 --- a/administrator/components/com_media/views/images/tmpl/default.php +++ b/administrator/components/com_media/views/images/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -16,6 +16,8 @@ $onClick = ''; $fieldInput = $this->state->get('field.id'); $isMoo = $input->getInt('ismoo', 1); +$author = $input->getCmd('author'); +$asset = $input->getCmd('asset'); JHtml::_('formbehavior.chosen', 'select'); @@ -23,6 +25,7 @@ JHtml::_('bootstrap.tooltip', '.noHtmlTip', array('html' => false)); // Include jQuery +JHtml::_('behavior.core'); JHtml::_('jquery.framework'); JHtml::_('script', 'media/popup-imagemanager.min.js', array('version' => 'auto', 'relative' => true)); JHtml::_('stylesheet', 'media/popup-imagemanager.css', array('version' => 'auto', 'relative' => true)); @@ -32,10 +35,12 @@ JHtml::_('stylesheet', 'media/popup-imagemanager_rtl.css', array('version' => 'auto', 'relative' => true)); } -JFactory::getDocument()->addScriptDeclaration( - " - var image_base_path = '" . $params->get('image_path', 'images') . "/'; - " +JFactory::getDocument()->addScriptOptions( + 'mediamanager', array( + 'base' => $params->get('image_path', 'images') . '/', + 'asset' => $asset, + 'author' => $author + ) ); /** @@ -60,7 +65,7 @@ ?>
    -
    +
    - +
    @@ -166,7 +171,7 @@ authorise('core.create', 'com_media')) : ?> -
    +
    @@ -183,7 +188,7 @@
    - set('com_media.return_url', 'index.php?option=com_media&view=images&tmpl=component&fieldid=' . $input->getCmd('fieldid', '') . '&e_name=' . $input->getCmd('e_name') . '&asset=' . $input->getCmd('asset') . '&author=' . $input->getCmd('author')); ?> + set('com_media.return_url', 'index.php?option=com_media&view=images&tmpl=component&fieldid=' . $input->getCmd('fieldid', '') . '&e_name=' . $input->getCmd('e_name') . '&asset=' . $asset . '&author=' . $author); ?>
    diff --git a/administrator/components/com_media/views/images/view.html.php b/administrator/components/com_media/views/images/view.html.php index 43d7939e093e5..d8e029a3ccd5b 100644 --- a/administrator/components/com_media/views/images/view.html.php +++ b/administrator/components/com_media/views/images/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_media/views/imageslist/tmpl/default.php b/administrator/components/com_media/views/imageslist/tmpl/default.php index 417e19ab3eacf..dbae859ee82f1 100644 --- a/administrator/components/com_media/views/imageslist/tmpl/default.php +++ b/administrator/components/com_media/views/imageslist/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_media/views/imageslist/tmpl/default_folder.php b/administrator/components/com_media/views/imageslist/tmpl/default_folder.php index f01cf7e7dd5d9..c7acd2bfed2be 100644 --- a/administrator/components/com_media/views/imageslist/tmpl/default_folder.php +++ b/administrator/components/com_media/views/imageslist/tmpl/default_folder.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -12,12 +12,12 @@ $input = JFactory::getApplication()->input; ?>
  • - +
    - _tmp_folder->name, 10, false); ?> + escape($this->_tmp_folder->name), 10, false); ?>
  • diff --git a/administrator/components/com_media/views/imageslist/tmpl/default_image.php b/administrator/components/com_media/views/imageslist/tmpl/default_image.php index 4bfffe9d6dd29..543c003fd8cd2 100644 --- a/administrator/components/com_media/views/imageslist/tmpl/default_image.php +++ b/administrator/components/com_media/views/imageslist/tmpl/default_image.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -17,12 +17,12 @@ ?>
  • - +
    - baseURL . '/' . $this->_tmp_img->path_relative, JText::sprintf('COM_MEDIA_IMAGE_TITLE', $this->_tmp_img->title, JHtml::_('number.bytes', $this->_tmp_img->size)), array('width' => $this->_tmp_img->width_60, 'height' => $this->_tmp_img->height_60)); ?> + baseURL . '/' . $this->escape($this->_tmp_img->path_relative), JText::sprintf('COM_MEDIA_IMAGE_TITLE', $this->escape($this->_tmp_img->title), JHtml::_('number.bytes', $this->_tmp_img->size)), array('width' => $this->_tmp_img->width_60, 'height' => $this->_tmp_img->height_60)); ?>
    - _tmp_img->name, 10, false); ?> + escape($this->_tmp_img->name), 10, false); ?>
  • diff --git a/administrator/components/com_media/views/imageslist/view.html.php b/administrator/components/com_media/views/imageslist/view.html.php index bdf82b08e8d33..716cea8fe07d4 100644 --- a/administrator/components/com_media/views/imageslist/view.html.php +++ b/administrator/components/com_media/views/imageslist/view.html.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ diff --git a/administrator/components/com_media/views/media/tmpl/default.php b/administrator/components/com_media/views/media/tmpl/default.php index 406acdb925073..bc1488dd82779 100644 --- a/administrator/components/com_media/views/media/tmpl/default.php +++ b/administrator/components/com_media/views/media/tmpl/default.php @@ -3,7 +3,7 @@ * @package Joomla.Administrator * @subpackage com_media * - * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ @@ -47,7 +47,7 @@
    sidebar; ?>
    -

    +