From 5cb153c551dcdf4a3f032f0f57d531850c665908 Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Sat, 7 May 2016 20:08:55 +0100 Subject: [PATCH 01/22] colspan correct (#10291) --- .../components/com_users/views/levels/tmpl/default.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/components/com_users/views/levels/tmpl/default.php b/administrator/components/com_users/views/levels/tmpl/default.php index 0e6e4263b46a0..5e930b933c302 100644 --- a/administrator/components/com_users/views/levels/tmpl/default.php +++ b/administrator/components/com_users/views/levels/tmpl/default.php @@ -67,7 +67,7 @@ - + pagination->getListFooter(); ?> From 20805571d25d905378ac1cb1a8431907842f5184 Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Sat, 7 May 2016 20:40:36 +0100 Subject: [PATCH 02/22] ACL update notes * Remove note from acl rules * Remove note 1 * Remove note 2 * add strong * add strong * strong * strong again like FrankD --- administrator/language/en-GB/en-GB.com_banners.ini | 2 +- administrator/language/en-GB/en-GB.com_cache.ini | 2 +- administrator/language/en-GB/en-GB.com_categories.ini | 2 +- administrator/language/en-GB/en-GB.com_checkin.ini | 2 +- administrator/language/en-GB/en-GB.com_config.ini | 2 +- administrator/language/en-GB/en-GB.com_contact.ini | 2 +- administrator/language/en-GB/en-GB.com_content.ini | 4 ++-- administrator/language/en-GB/en-GB.com_installer.ini | 2 +- administrator/language/en-GB/en-GB.com_languages.ini | 2 +- administrator/language/en-GB/en-GB.com_media.ini | 2 +- administrator/language/en-GB/en-GB.com_menus.ini | 2 +- administrator/language/en-GB/en-GB.com_messages.ini | 2 +- administrator/language/en-GB/en-GB.com_modules.ini | 2 +- administrator/language/en-GB/en-GB.com_newsfeeds.ini | 2 +- administrator/language/en-GB/en-GB.com_plugins.ini | 2 +- administrator/language/en-GB/en-GB.com_redirect.ini | 2 +- administrator/language/en-GB/en-GB.com_templates.ini | 2 +- administrator/language/en-GB/en-GB.com_users.ini | 2 +- administrator/language/en-GB/en-GB.com_weblinks.ini | 2 +- administrator/language/en-GB/en-GB.lib_joomla.ini | 8 ++++---- language/en-GB/en-GB.lib_joomla.ini | 8 ++++---- 21 files changed, 28 insertions(+), 28 deletions(-) diff --git a/administrator/language/en-GB/en-GB.com_banners.ini b/administrator/language/en-GB/en-GB.com_banners.ini index bd1231339ea5c..39f2baf179de6 100644 --- a/administrator/language/en-GB/en-GB.com_banners.ini +++ b/administrator/language/en-GB/en-GB.com_banners.ini @@ -242,4 +242,4 @@ COM_BANNERS_TYPE1="Impressions" COM_BANNERS_TYPE2="Clicks" COM_BANNERS_UNLIMITED="Unlimited" COM_BANNERS_XML_DESCRIPTION="This component manages banners and banner clients." -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." diff --git a/administrator/language/en-GB/en-GB.com_cache.ini b/administrator/language/en-GB/en-GB.com_cache.ini index c10ec8827951e..97b5fe930a9f2 100644 --- a/administrator/language/en-GB/en-GB.com_cache.ini +++ b/administrator/language/en-GB/en-GB.com_cache.ini @@ -36,4 +36,4 @@ COM_CACHE_RESOURCE_INTENSIVE_WARNING="This can be resource intensive on sites wi COM_CACHE_SIZE="Size" COM_CACHE_SELECT_CLIENT="- Select Location -" COM_CACHE_XML_DESCRIPTION="Component for cache management." -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." diff --git a/administrator/language/en-GB/en-GB.com_categories.ini b/administrator/language/en-GB/en-GB.com_categories.ini index 642c732f0bbcf..0885078d3e984 100644 --- a/administrator/language/en-GB/en-GB.com_categories.ini +++ b/administrator/language/en-GB/en-GB.com_categories.ini @@ -83,4 +83,4 @@ COM_CATEGORY_COUNT_UNPUBLISHED_ITEMS="Unpublished items" COM_CATEGORY_HEADING_ASSOCIATION="Association" JGLOBAL_NO_ITEM_SELECTED="No categories selected." JLIB_HTML_ACCESS_SUMMARY_DESC="Shown below is an overview of the permission settings for this category. Select the tabs above to customise these settings by action." -JLIB_RULES_SETTING_NOTES_ITEM="1. Changes apply to this category and all child categories.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES_ITEM="Changes apply to this category and all child categories.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." diff --git a/administrator/language/en-GB/en-GB.com_checkin.ini b/administrator/language/en-GB/en-GB.com_checkin.ini index 84788908b1ccb..0713ee6b0f5b3 100644 --- a/administrator/language/en-GB/en-GB.com_checkin.ini +++ b/administrator/language/en-GB/en-GB.com_checkin.ini @@ -20,4 +20,4 @@ COM_CHECKIN_N_ITEMS_CHECKED_IN_MORE="%s items checked in." COM_CHECKIN_NO_ITEMS="There are no tables with checked out items or there are no tables with checked out items that match your search." COM_CHECKIN_TABLE="%s table" COM_CHECKIN_XML_DESCRIPTION="Check-in Component." -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." \ No newline at end of file diff --git a/administrator/language/en-GB/en-GB.com_config.ini b/administrator/language/en-GB/en-GB.com_config.ini index 91c51b5a33599..6c8a60c7a2d58 100644 --- a/administrator/language/en-GB/en-GB.com_config.ini +++ b/administrator/language/en-GB/en-GB.com_config.ini @@ -251,4 +251,4 @@ COM_CONFIG_TEXT_FILTER_SETTINGS="Text Filter Settings" COM_CONFIG_TEXT_FILTERS="Text Filters" COM_CONFIG_TEXT_FILTERS_DESC="These text filter settings will be applied to all text editor fields submitted by users in the selected groups.
These filtering options give more control over the HTML your content providers submit. You can be as strict or as liberal as you require to suit your site needs. The filtering is opt-in and the default settings provide good protection against markup commonly associated with website attacks." COM_CONFIG_XML_DESCRIPTION="Configuration Manager" -JLIB_RULES_SETTING_NOTES="1. If you change the setting, it will apply to this and all child groups, components and content. Note that:
Inherited means that the permissions from the parent group will be used.
Denied means that no matter what the parent group's setting is, the group being edited can't take this action.
Allowed means that the group being edited will be able to take this action (but if this is in conflict with the parent group it will have no impact; a conflict will be indicated by Not Allowed (Locked) under Calculated Settings).
Not Set is used only for the Public group in global configuration. The Public group is the parent of all other groups. If a permission is not set, it is treated as deny but can be changed for child groups, components, categories and items.
2. If you select a new setting, select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES="If you change the setting, it will apply to this and all child groups, components and content. Note that:
Inherited means that the permissions from the parent group will be used.
Denied means that no matter what the parent group's setting is, the group being edited can't take this action.
Allowed means that the group being edited will be able to take this action (but if this is in conflict with the parent group it will have no impact; a conflict will be indicated by Not Allowed (Locked) under Calculated Settings).
Not Set is used only for the Public group in global configuration. The Public group is the parent of all other groups. If a permission is not set, it is treated as deny but can be changed for child groups, components, categories and items." diff --git a/administrator/language/en-GB/en-GB.com_contact.ini b/administrator/language/en-GB/en-GB.com_contact.ini index ff043147796f5..7f92c0a5d82c2 100644 --- a/administrator/language/en-GB/en-GB.com_contact.ini +++ b/administrator/language/en-GB/en-GB.com_contact.ini @@ -294,4 +294,4 @@ COM_CONTACT_XML_DESCRIPTION="This component shows a listing of contact informati JGLOBAL_FIELDSET_MISCELLANEOUS="Miscellaneous Information" JGLOBAL_NEWITEMSLAST_DESC="New Contacts default to the last position. Ordering can be changed after this Contact is saved." JLIB_HTML_BATCH_USER_LABEL="Set Linked User" -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." diff --git a/administrator/language/en-GB/en-GB.com_content.ini b/administrator/language/en-GB/en-GB.com_content.ini index cc47c769492dd..0609253f0b751 100644 --- a/administrator/language/en-GB/en-GB.com_content.ini +++ b/administrator/language/en-GB/en-GB.com_content.ini @@ -179,5 +179,5 @@ COM_CONTENT_XML_DESCRIPTION="Article management component." JGLOBAL_NO_ITEM_SELECTED="No articles selected" JLIB_APPLICATION_ERROR_BATCH_CANNOT_CREATE="You are not allowed to create new articles in this category." JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT="You are not allowed to edit one or more of these articles." -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." -JLIB_RULES_SETTING_NOTES_ITEM="1. Changes apply to this article only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." +JLIB_RULES_SETTING_NOTES_ITEM="Changes apply to this article only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." diff --git a/administrator/language/en-GB/en-GB.com_installer.ini b/administrator/language/en-GB/en-GB.com_installer.ini index a4b982bdc7c59..3412a518f5ef6 100644 --- a/administrator/language/en-GB/en-GB.com_installer.ini +++ b/administrator/language/en-GB/en-GB.com_installer.ini @@ -262,4 +262,4 @@ COM_INSTALLER_WEBINSTALLER_INSTALL_WEB_LOADING="Loading ..." COM_INSTALLER_WEBINSTALLER_INSTALL_WEB_LOADING_ERROR="Can't connect to the Joomla! server. Please try again later." COM_INSTALLER_WEBINSTALLER_LOAD_APPS="Select to load extensions browser" COM_INSTALLER_XML_DESCRIPTION="Installer component for adding, removing and upgrading extensions" -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." diff --git a/administrator/language/en-GB/en-GB.com_languages.ini b/administrator/language/en-GB/en-GB.com_languages.ini index c044e470a5258..c7ff29c010079 100644 --- a/administrator/language/en-GB/en-GB.com_languages.ini +++ b/administrator/language/en-GB/en-GB.com_languages.ini @@ -150,4 +150,4 @@ COM_LANGUAGES_VIEW_OVERRIDES_PURGE_SUCCESS="Overrider cache table successfully c COM_LANGUAGES_VIEW_OVERRIDES_TEXT="Text" COM_LANGUAGES_VIEW_OVERRIDES_TITLE="Languages: Overrides" COM_LANGUAGES_XML_DESCRIPTION="Component for language management" -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." diff --git a/administrator/language/en-GB/en-GB.com_media.ini b/administrator/language/en-GB/en-GB.com_media.ini index f111be394d71a..dea460eac939e 100644 --- a/administrator/language/en-GB/en-GB.com_media.ini +++ b/administrator/language/en-GB/en-GB.com_media.ini @@ -98,4 +98,4 @@ COM_MEDIA_UPLOAD_SUCCESSFUL="Upload Successful" COM_MEDIA_UPLOAD="Upload" COM_MEDIA_UP="Up" COM_MEDIA_XML_DESCRIPTION="Component for managing site media" -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." diff --git a/administrator/language/en-GB/en-GB.com_menus.ini b/administrator/language/en-GB/en-GB.com_menus.ini index eef3f030929a1..f241d10363b6d 100644 --- a/administrator/language/en-GB/en-GB.com_menus.ini +++ b/administrator/language/en-GB/en-GB.com_menus.ini @@ -202,4 +202,4 @@ COM_MENUS_VIEW_MENUS_TITLE="Menus" COM_MENUS_VIEW_NEW_ITEM_TITLE="Menus: New Item" COM_MENUS_VIEW_NEW_MENU_TITLE="Menus: Add" COM_MENUS_XML_DESCRIPTION="Component for creating menus." -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." diff --git a/administrator/language/en-GB/en-GB.com_messages.ini b/administrator/language/en-GB/en-GB.com_messages.ini index 7383799358646..83a367ad7538e 100644 --- a/administrator/language/en-GB/en-GB.com_messages.ini +++ b/administrator/language/en-GB/en-GB.com_messages.ini @@ -70,4 +70,4 @@ COM_MESSAGES_VIEW_PRIVATE_MESSAGE="Private Messages: View" COM_MESSAGES_WRITE_PRIVATE_MESSAGE="Private Messages: Write" COM_MESSAGES_XML_DESCRIPTION="Component for private messaging support in Backend." JLIB_APPLICATION_SAVE_SUCCESS="Message successfully sent." -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." diff --git a/administrator/language/en-GB/en-GB.com_modules.ini b/administrator/language/en-GB/en-GB.com_modules.ini index 568f11fc213c9..43ed668a74796 100644 --- a/administrator/language/en-GB/en-GB.com_modules.ini +++ b/administrator/language/en-GB/en-GB.com_modules.ini @@ -189,4 +189,4 @@ COM_MODULES_DESELECT="Deselect" COM_MODULES_EXPAND="Expand" COM_MODULES_COLLAPSE="Collapse" COM_MODULES_SUBITEMS="Sub-items:" -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." diff --git a/administrator/language/en-GB/en-GB.com_newsfeeds.ini b/administrator/language/en-GB/en-GB.com_newsfeeds.ini index 71ab9319a4def..31d002c1a052d 100644 --- a/administrator/language/en-GB/en-GB.com_newsfeeds.ini +++ b/administrator/language/en-GB/en-GB.com_newsfeeds.ini @@ -129,4 +129,4 @@ COM_NEWSFEEDS_UNPUBLISH_ITEM="Unpublish News Feed" COM_NEWSFEEDS_WARNING_PROVIDE_VALID_NAME="Please provide a valid name." COM_NEWSFEEDS_XML_DESCRIPTION="This component manages RSS and Atom news feeds." JGLOBAL_NEWITEMSLAST_DESC="New news feeds default to the last position. The ordering can be changed after this news feed has been saved." -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." \ No newline at end of file +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." \ No newline at end of file diff --git a/administrator/language/en-GB/en-GB.com_plugins.ini b/administrator/language/en-GB/en-GB.com_plugins.ini index 80741ea8738c1..0f6bb627acbc5 100644 --- a/administrator/language/en-GB/en-GB.com_plugins.ini +++ b/administrator/language/en-GB/en-GB.com_plugins.ini @@ -43,4 +43,4 @@ COM_PLUGINS_XML_DESCRIPTION="This component manages Joomla plugins." COM_PLUGINS_XML_ERR="Plugins XML data not available." JLIB_HTML_PUBLISH_ITEM="Enable plugin" JLIB_HTML_UNPUBLISH_ITEM="Disable plugin" -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." diff --git a/administrator/language/en-GB/en-GB.com_redirect.ini b/administrator/language/en-GB/en-GB.com_redirect.ini index 690dd42c22547..65de6c099b4da 100644 --- a/administrator/language/en-GB/en-GB.com_redirect.ini +++ b/administrator/language/en-GB/en-GB.com_redirect.ini @@ -80,4 +80,4 @@ COM_REDIRECT_SAVE_SUCCESS="Link successfully saved." COM_REDIRECT_SEARCH_LINKS="Search in link fields." COM_REDIRECT_TOOLBAR_PURGE="Purge Unpublished" COM_REDIRECT_XML_DESCRIPTION="This component implements link redirection." -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." diff --git a/administrator/language/en-GB/en-GB.com_templates.ini b/administrator/language/en-GB/en-GB.com_templates.ini index 647a23956ed4d..9c68bfb3e07fe 100644 --- a/administrator/language/en-GB/en-GB.com_templates.ini +++ b/administrator/language/en-GB/en-GB.com_templates.ini @@ -241,4 +241,4 @@ COM_TEMPLATES_TOGGLE_FULL_SCREEN="Press Ctrl-Q to toggle Full Screen editing." COM_TEMPLATES_TOOLBAR_SET_HOME="Default" COM_TEMPLATES_WARNING_FORMAT_WILL_NOT_BE_VISIBLE="You have created a new file with the extension '%s'. This is supported but as you did not have that file extension in the list of supported formats this can't be displayed. Please double check the options for Templates and add the format if needed." COM_TEMPLATES_XML_DESCRIPTION="This component manages templates" -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." diff --git a/administrator/language/en-GB/en-GB.com_users.ini b/administrator/language/en-GB/en-GB.com_users.ini index 3407e33d72009..311bad365f1f5 100644 --- a/administrator/language/en-GB/en-GB.com_users.ini +++ b/administrator/language/en-GB/en-GB.com_users.ini @@ -361,4 +361,4 @@ COM_USERS_VIEW_NEW_USER_TITLE="Users: New" COM_USERS_VIEW_NOTES_TITLE="User Notes" COM_USERS_VIEW_USERS_TITLE="Users" COM_USERS_XML_DESCRIPTION="Component for managing users" -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." diff --git a/administrator/language/en-GB/en-GB.com_weblinks.ini b/administrator/language/en-GB/en-GB.com_weblinks.ini index f872874ff8e61..350509585567d 100644 --- a/administrator/language/en-GB/en-GB.com_weblinks.ini +++ b/administrator/language/en-GB/en-GB.com_weblinks.ini @@ -120,4 +120,4 @@ JGLOBAL_NO_ITEM_SELECTED="No web links selected" JGLOBAL_NEWITEMSLAST_DESC="New Web links default to the last position. Ordering can be changed after this Web link is saved." JLIB_APPLICATION_ERROR_BATCH_CANNOT_CREATE="You are not allowed to create new web links in this category." JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT="You are not allowed to edit one or more of these web links." -JLIB_RULES_SETTING_NOTES="1. Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting.

2. Select Save to refresh the calculated settings." \ No newline at end of file +JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting." \ No newline at end of file diff --git a/administrator/language/en-GB/en-GB.lib_joomla.ini b/administrator/language/en-GB/en-GB.lib_joomla.ini index 6c24c2ffb3175..1525ff14599a1 100644 --- a/administrator/language/en-GB/en-GB.lib_joomla.ini +++ b/administrator/language/en-GB/en-GB.lib_joomla.ini @@ -649,7 +649,7 @@ JLIB_REGISTRY_EXCEPTION_LOAD_FORMAT_CLASS="Unable to load format class." JLIB_RULES_ACTION="Action" JLIB_RULES_ALLOWED="Allowed" JLIB_RULES_ALLOWED_ADMIN="Allowed (Super User)" -JLIB_RULES_CALCULATED_SETTING="Calculated Setting 2" +JLIB_RULES_CALCULATED_SETTING="Calculated Setting" JLIB_RULES_CONFLICT="Conflict" JLIB_RULES_DATABASE_FAILURE="Failed storing the data to the database." JLIB_RULES_DENIED="Denied" @@ -664,9 +664,9 @@ JLIB_RULES_NOT_SET="Not Set" JLIB_RULES_REQUEST_FAILURE="Failed sending the data to server." JLIB_RULES_SAVE_BEFORE_CHANGE_PERMISSIONS="Please save before changing permissions." JLIB_RULES_SELECT_ALLOW_DENY_GROUP="Allow or deny %s for users in the %s group." -JLIB_RULES_SELECT_SETTING="Select New Setting 1" -JLIB_RULES_SETTING_NOTES="1. If you change the setting, it will apply to this and all child groups, components and content. Note that Denied will overrule any inherited setting and also the setting in any child group, component or content. In the case of a setting conflict, Deny will take precedence. Not Set is equivalent to Denied but can be changed in child groups, components and content.
2. If you select a new setting, select Save to refresh the calculated settings." -JLIB_RULES_SETTING_NOTES_ITEM="1. If you change the setting, it will apply to this item. Note that:
Inherited means that the permissions from global configuration, parent group and category will be used.
Denied means that no matter what the global configuration, parent group or category settings are, the group being edited can't take this action on this item.
Allowed means that the group being edited will be able to take this action for this item (but if this is in conflict with the global configuration, parent group or category it will have no impact; a conflict will be indicated by Not Allowed (Locked) under Calculated Settings).
2. If you select a new setting, select Save to refresh the calculated settings." +JLIB_RULES_SELECT_SETTING="Select New Setting" +JLIB_RULES_SETTING_NOTES="If you change the setting, it will apply to this and all child groups, components and content. Note that Denied will overrule any inherited setting and also the setting in any child group, component or content. In the case of a setting conflict, Deny will take precedence. Not Set is equivalent to Denied but can be changed in child groups, components and content." +JLIB_RULES_SETTING_NOTES_ITEM="If you change the setting, it will apply to this item. Note that:
Inherited means that the permissions from global configuration, parent group and category will be used.
Denied means that no matter what the global configuration, parent group or category settings are, the group being edited can't take this action on this item.
Allowed means that the group being edited will be able to take this action for this item (but if this is in conflict with the global configuration, parent group or category it will have no impact; a conflict will be indicated by Not Allowed (Locked) under Calculated Settings)." JLIB_RULES_SETTINGS_DESC="Manage the permission settings for the user groups below. See notes at the bottom." JLIB_UNKNOWN="Unknown" diff --git a/language/en-GB/en-GB.lib_joomla.ini b/language/en-GB/en-GB.lib_joomla.ini index 6c24c2ffb3175..315b5cddad66f 100644 --- a/language/en-GB/en-GB.lib_joomla.ini +++ b/language/en-GB/en-GB.lib_joomla.ini @@ -649,7 +649,7 @@ JLIB_REGISTRY_EXCEPTION_LOAD_FORMAT_CLASS="Unable to load format class." JLIB_RULES_ACTION="Action" JLIB_RULES_ALLOWED="Allowed" JLIB_RULES_ALLOWED_ADMIN="Allowed (Super User)" -JLIB_RULES_CALCULATED_SETTING="Calculated Setting 2" +JLIB_RULES_CALCULATED_SETTING="Calculated Setting" JLIB_RULES_CONFLICT="Conflict" JLIB_RULES_DATABASE_FAILURE="Failed storing the data to the database." JLIB_RULES_DENIED="Denied" @@ -664,9 +664,9 @@ JLIB_RULES_NOT_SET="Not Set" JLIB_RULES_REQUEST_FAILURE="Failed sending the data to server." JLIB_RULES_SAVE_BEFORE_CHANGE_PERMISSIONS="Please save before changing permissions." JLIB_RULES_SELECT_ALLOW_DENY_GROUP="Allow or deny %s for users in the %s group." -JLIB_RULES_SELECT_SETTING="Select New Setting 1" -JLIB_RULES_SETTING_NOTES="1. If you change the setting, it will apply to this and all child groups, components and content. Note that Denied will overrule any inherited setting and also the setting in any child group, component or content. In the case of a setting conflict, Deny will take precedence. Not Set is equivalent to Denied but can be changed in child groups, components and content.
2. If you select a new setting, select Save to refresh the calculated settings." -JLIB_RULES_SETTING_NOTES_ITEM="1. If you change the setting, it will apply to this item. Note that:
Inherited means that the permissions from global configuration, parent group and category will be used.
Denied means that no matter what the global configuration, parent group or category settings are, the group being edited can't take this action on this item.
Allowed means that the group being edited will be able to take this action for this item (but if this is in conflict with the global configuration, parent group or category it will have no impact; a conflict will be indicated by Not Allowed (Locked) under Calculated Settings).
2. If you select a new setting, select Save to refresh the calculated settings." +JLIB_RULES_SELECT_SETTING="Select New Setting" +JLIB_RULES_SETTING_NOTES="If you change the setting, it will apply to this and all child groups, components and content. Note that Denied will overrule any inherited setting and also the setting in any child group, component or content. In the case of a setting conflict, Deny will take precedence. Not Set is equivalent to Denied but can be changed in child groups, components and content." +JLIB_RULES_SETTING_NOTES_ITEM="If you change the setting, it will apply to this item. Note that:
Inherited means that the permissions from global configuration, parent group and category will be used.
Denied means that no matter what the global configuration, parent group or category settings are, the group being edited can't take this action on this item.
Allowed means that the group being edited will be able to take this action for this item (but if this is in conflict with the global configuration, parent group or category it will have no impact; a conflict will be indicated by Not Allowed (Locked) under Calculated Settings)." JLIB_RULES_SETTINGS_DESC="Manage the permission settings for the user groups below. See notes at the bottom." JLIB_UNKNOWN="Unknown" From 807961e3d665f14cfb69090559fef6e93c249659 Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Sun, 8 May 2016 07:05:41 +0100 Subject: [PATCH 03/22] not, 3.5, should be 3.6 (#10298) --- .../installer/packageinstaller/packageinstaller.php | 10 +++++----- .../urlfolderinstaller/urlfolderinstaller.php | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/plugins/installer/packageinstaller/packageinstaller.php b/plugins/installer/packageinstaller/packageinstaller.php index 0058adb7bb83e..ab8b8d3906f28 100644 --- a/plugins/installer/packageinstaller/packageinstaller.php +++ b/plugins/installer/packageinstaller/packageinstaller.php @@ -17,7 +17,7 @@ /** * PackageInstaller Plugin. * - * @since 3.5 + * @since 3.6.0 */ class PlgInstallerPackageInstaller extends JPlugin { @@ -25,7 +25,7 @@ class PlgInstallerPackageInstaller extends JPlugin * Affects constructor behavior. If true, language files will be loaded automatically. * * @var boolean - * @since 3.5 + * @since 3.6.0 */ protected $autoloadLanguage = true; @@ -34,7 +34,7 @@ class PlgInstallerPackageInstaller extends JPlugin * * @return void * - * @since 3.5 + * @since 3.6.0 */ public function onInstallerViewBeforeFirstTab() { @@ -50,7 +50,7 @@ public function onInstallerViewBeforeFirstTab() * * @return void * - * @since 3.5 + * @since 3.6.0 */ public function onInstallerViewAfterLastTab() { @@ -71,7 +71,7 @@ public function onInstallerViewAfterLastTab() * * @return void * - * @since 3.5 + * @since 3.6.0 */ private function getChanges() { diff --git a/plugins/installer/urlfolderinstaller/urlfolderinstaller.php b/plugins/installer/urlfolderinstaller/urlfolderinstaller.php index c8ee08cf847de..be2d086ff8290 100644 --- a/plugins/installer/urlfolderinstaller/urlfolderinstaller.php +++ b/plugins/installer/urlfolderinstaller/urlfolderinstaller.php @@ -16,7 +16,7 @@ /** * UrlFolderInstaller Plugin. * - * @since 3.5 + * @since 3.6.0 */ class PlgInstallerUrlFolderInstaller extends JPlugin { @@ -24,7 +24,7 @@ class PlgInstallerUrlFolderInstaller extends JPlugin * Affects constructor behavior. If true, language files will be loaded automatically. * * @var boolean - * @since 3.5 + * @since 3.6.0 */ protected $autoloadLanguage = true; @@ -33,7 +33,7 @@ class PlgInstallerUrlFolderInstaller extends JPlugin * * @return void * - * @since 3.5 + * @since 3.6.0 */ public function onInstallerViewBeforeFirstTab() { @@ -49,7 +49,7 @@ public function onInstallerViewBeforeFirstTab() * * @return void * - * @since 3.5 + * @since 3.6.0 */ public function onInstallerViewAfterLastTab() { @@ -70,7 +70,7 @@ public function onInstallerViewAfterLastTab() * * @return void * - * @since 3.5 + * @since 3.6.0 */ private function getChanges() { From 28ab50936f9559437d87fa3f9ca14d2db42fafd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Demis=20Palma=20=E3=83=84?= Date: Sun, 8 May 2016 08:50:42 +0100 Subject: [PATCH 04/22] Database connection problems on CLI * Database connection problems on CLI * Used JPATH_CONFIGURATION rather than JPATH_ROOT as per Michael's suggestion --- libraries/joomla/factory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/joomla/factory.php b/libraries/joomla/factory.php index ff906e61c4381..7ac9b6f9b4d9a 100644 --- a/libraries/joomla/factory.php +++ b/libraries/joomla/factory.php @@ -148,7 +148,7 @@ public static function getConfig($file = null, $type = 'PHP', $namespace = '') { if ($file === null) { - $file = JPATH_PLATFORM . '/config.php'; + $file = JPATH_CONFIGURATION . '/configuration.php'; } self::$config = self::createConfig($file, $type, $namespace); From d63561a1804aa23578f8d760c8d13117213116c6 Mon Sep 17 00:00:00 2001 From: infograf768 Date: Sun, 8 May 2016 10:58:46 +0200 Subject: [PATCH 05/22] Adding new plugin ini files to the install.xml (#10302) --- administrator/language/en-GB/install.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/administrator/language/en-GB/install.xml b/administrator/language/en-GB/install.xml index 18dafcf2a4146..5c7c4a68d10dc 100644 --- a/administrator/language/en-GB/install.xml +++ b/administrator/language/en-GB/install.xml @@ -161,6 +161,10 @@ en-GB.plg_finder_tags.sys.ini en-GB.plg_finder_weblinks.ini en-GB.plg_finder_weblinks.sys.ini + en-GB.plg_installer_packageinstaller.ini + en-GB.plg_installer_packageinstaller.sys.ini + en-GB.plg_installer_urlfolderinstaller.ini + en-GB.plg_installer_urlfolderinstaller.sys.ini en-GB.plg_installer_webinstaller.ini en-GB.plg_installer_webinstaller.sys.ini en-GB.plg_quickicon_extensionupdate.ini From 69d4a8ab2d3dd60af3e172270cc78e8889af09f1 Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Sun, 8 May 2016 10:11:09 +0100 Subject: [PATCH 06/22] New installer plugins: remove the dot in the plugin name and other language review (#10299) * remove the dot in the plugin name and add plugin name in the lang fle * alpha order * miss one --- .../language/en-GB/en-GB.plg_installer_packageinstaller.ini | 4 ++-- .../en-GB/en-GB.plg_installer_packageinstaller.sys.ini | 2 +- .../language/en-GB/en-GB.plg_installer_urlfolderinstaller.ini | 3 ++- .../en-GB/en-GB.plg_installer_urlfolderinstaller.sys.ini | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/administrator/language/en-GB/en-GB.plg_installer_packageinstaller.ini b/administrator/language/en-GB/en-GB.plg_installer_packageinstaller.ini index 6d57dcda33868..cc63c05ebe1e6 100644 --- a/administrator/language/en-GB/en-GB.plg_installer_packageinstaller.ini +++ b/administrator/language/en-GB/en-GB.plg_installer_packageinstaller.ini @@ -3,9 +3,9 @@ ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; Note : All ini files need to be saved as UTF-8 -PLG_INSTALLER_PACKAGEINSTALLER_PLUGIN_XML_DESCRIPTION="This plugin offers functionality for the 'Package (zip) Upload' tab." PLG_INSTALLER_PACKAGEINSTALLER="Installer - Upload from a Package Zip" +PLG_INSTALLER_PACKAGEINSTALLER_EXTENSION_PACKAGE_FILE="Extension package file" +PLG_INSTALLER_PACKAGEINSTALLER_PLUGIN_XML_DESCRIPTION="This plugin offers functionality for the 'Package (zip) Upload' tab." PLG_INSTALLER_PACKAGEINSTALLER_UPLOAD_INSTALL_JOOMLA_EXTENSION="Upload & Install Joomla Extension" PLG_INSTALLER_PACKAGEINSTALLER_UPLOAD_PACKAGE_FILE="Upload Package File" -PLG_INSTALLER_PACKAGEINSTALLER_EXTENSION_PACKAGE_FILE="Extension package file" PLG_INSTALLER_PACKAGEINSTALLER__UPLOAD_AND_INSTALL="Upload & Install" diff --git a/administrator/language/en-GB/en-GB.plg_installer_packageinstaller.sys.ini b/administrator/language/en-GB/en-GB.plg_installer_packageinstaller.sys.ini index e4e5f130f033c..4f63cab9e9ae1 100644 --- a/administrator/language/en-GB/en-GB.plg_installer_packageinstaller.sys.ini +++ b/administrator/language/en-GB/en-GB.plg_installer_packageinstaller.sys.ini @@ -3,5 +3,5 @@ ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; Note : All ini files need to be saved as UTF-8 -PLG_INSTALLER_PACKAGEINSTALLER_PLUGIN_XML_DESCRIPTION="This plugin offers functionality for the 'Package (zip) Upload' tab." PLG_INSTALLER_PACKAGEINSTALLER="Installer - Upload from a Package Zip" +PLG_INSTALLER_PACKAGEINSTALLER_PLUGIN_XML_DESCRIPTION="This plugin offers functionality for the 'Package (zip) Upload' tab." diff --git a/administrator/language/en-GB/en-GB.plg_installer_urlfolderinstaller.ini b/administrator/language/en-GB/en-GB.plg_installer_urlfolderinstaller.ini index 91417ef4f9a24..ec52714b58db3 100644 --- a/administrator/language/en-GB/en-GB.plg_installer_urlfolderinstaller.ini +++ b/administrator/language/en-GB/en-GB.plg_installer_urlfolderinstaller.ini @@ -3,8 +3,9 @@ ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; Note : All ini files need to be saved as UTF-8 -PLG_INSTALLER_URLFOLDERINSTALLER_PLUGIN_XML_DESCRIPTION="This plugin offers functionality for the 'Install from URL or Path Folder' tab." +PLG_INSTALLER_URLFOLDERINSTALLER="Installer - Install from URL or Path Folder" PLG_INSTALLER_URLFOLDERINSTALLER_INSTALLALL_TEXT="Install from URL or Path Folder" PLG_INSTALLER_URLFOLDERINSTALLER_INSTALLALL_BUTTON="Check and Install" PLG_INSTALLER_URLFOLDERINSTALLER_INSTALLALL_NO_INSTALL_PATH="Please enter a URL or Path Folder." PLG_INSTALLER_URLFOLDERINSTALLER_INSTALLER_URLFOLDERINSTALLER="Installer - Install from URL or Path Folder." +PLG_INSTALLER_URLFOLDERINSTALLER_PLUGIN_XML_DESCRIPTION="This plugin offers functionality for the 'Install from URL or Path Folder' tab." diff --git a/administrator/language/en-GB/en-GB.plg_installer_urlfolderinstaller.sys.ini b/administrator/language/en-GB/en-GB.plg_installer_urlfolderinstaller.sys.ini index 9fedc6ad4d0a2..38cd3056bbad7 100644 --- a/administrator/language/en-GB/en-GB.plg_installer_urlfolderinstaller.sys.ini +++ b/administrator/language/en-GB/en-GB.plg_installer_urlfolderinstaller.sys.ini @@ -3,5 +3,5 @@ ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; Note : All ini files need to be saved as UTF-8 +PLG_INSTALLER_URLFOLDERINSTALLER="Installer - Install from URL or Path Folder" PLG_INSTALLER_URLFOLDERINSTALLER_PLUGIN_XML_DESCRIPTION="This plugin offers functionality for the 'Install from URL or Path Folder' tab." -PLG_INSTALLER_URLFOLDERINSTALLER="Installer - Install from URL or Path Folder." From 0a5e19b4a9b37750a5d99ee8bed00ca6411f3a29 Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Sun, 8 May 2016 10:11:39 +0100 Subject: [PATCH 07/22] add edit tooltip to modules (#10295) --- .../components/com_modules/views/modules/tmpl/default.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/components/com_modules/views/modules/tmpl/default.php b/administrator/components/com_modules/views/modules/tmpl/default.php index 9c7192c18088d..433acbe99e9f2 100644 --- a/administrator/components/com_modules/views/modules/tmpl/default.php +++ b/administrator/components/com_modules/views/modules/tmpl/default.php @@ -147,7 +147,7 @@ editor, $item->checked_out_time, 'modules.', $canCheckin); ?> - + escape($item->title); ?> escape($item->title); ?> From fa07f786059d0091bb0200b30c506c01cc96e3dc Mon Sep 17 00:00:00 2001 From: Mathew Lenning Date: Sun, 8 May 2016 18:27:19 +0900 Subject: [PATCH 08/22] Removed the nested conditional switch construct (#6338) * Removed the nested conditional switch construct in the stream_seek method. * Adding space between if and ( * Adjusting implementation according to @nonumber and @Bakual suggestions. * Simplified link 214 * Trying to make TCI happy * Found it! $whence is a constant value not a string value. Unit testing once again saves the day =^P Common TCI lets be friends. --- libraries/joomla/utilities/buffer.php | 111 ++++++++++++++++---------- 1 file changed, 70 insertions(+), 41 deletions(-) diff --git a/libraries/joomla/utilities/buffer.php b/libraries/joomla/utilities/buffer.php index e0554060596a6..13c7cd992e2dc 100644 --- a/libraries/joomla/utilities/buffer.php +++ b/libraries/joomla/utilities/buffer.php @@ -149,48 +149,77 @@ public function stream_seek($offset, $whence) { switch ($whence) { - case SEEK_SET: - if ($offset < strlen($this->buffers[$this->name]) && $offset >= 0) - { - $this->position = $offset; - - return true; - } - else - { - return false; - } - break; - - case SEEK_CUR: - if ($offset >= 0) - { - $this->position += $offset; - - return true; - } - else - { - return false; - } - break; - - case SEEK_END: - if (strlen($this->buffers[$this->name]) + $offset >= 0) - { - $this->position = strlen($this->buffers[$this->name]) + $offset; - - return true; - } - else - { - return false; - } - break; - - default: - return false; + case SEEK_SET : + return $this->seek_set($offset); + + case SEEK_CUR : + + return $this->seek_cur($offset); + + case SEEK_END : + + return $this->seek_end($offset); + } + + return false; + } + + /** + * Set the position to the offset + * + * @param integer $offset The offset in bytes + * + * @return bool + */ + protected function seek_set($offset) + { + if ($offset < 0 || $offset > strlen($this->buffers[$this->name])) + { + return false; + } + + $this->position = $offset; + + return true; + } + + /** + * Adds the offset to current position + * + * @param integer $offset The offset in bytes + * + * @return bool + */ + protected function seek_cur($offset) + { + if ($offset < 0) + { + return false; + } + + $this->position += $offset; + + return true; + } + + /** + * Sets the position to the end of the current buffer + offset + * + * @param integer $offset The offset in bytes + * + * @return bool + */ + protected function seek_end($offset) + { + $offset += strlen($this->buffers[$this->name]); + if ($offset < 0) + { + return false; } + + $this->position = $offset; + + return true; } } // Register the stream From 578799b1c56812c0dcba36973f69d656a23f5cfa Mon Sep 17 00:00:00 2001 From: Mathew Lenning Date: Sun, 8 May 2016 18:32:23 +0900 Subject: [PATCH 09/22] Cleaning up JArchiveBzip2 (#6495) * Cleaning up JArchiveBzip2. Isolated JError into temporary method and separated old extraction logic from streaming logic. * Fixing a few known styling issues and hopefully activating TCI * Fixing style errors --- libraries/joomla/archive/bzip2.php | 177 +++++++++++++---------------- 1 file changed, 80 insertions(+), 97 deletions(-) diff --git a/libraries/joomla/archive/bzip2.php b/libraries/joomla/archive/bzip2.php index 51591d5d47504..aca54e572b8d3 100644 --- a/libraries/joomla/archive/bzip2.php +++ b/libraries/joomla/archive/bzip2.php @@ -45,125 +45,108 @@ public function extract($archive, $destination, array $options = array ()) if (!extension_loaded('bz2')) { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'The bz2 extension is not available.'); - } - else - { - throw new RuntimeException('The bz2 extension is not available.'); - } + $this->raiseWarning(100, 'The bz2 extension is not available.'); } - if (!isset($options['use_streams']) || $options['use_streams'] == false) + if (isset($options['use_streams']) && $options['use_streams'] != false) { - // Old style: read the whole file and then parse it - $this->_data = file_get_contents($archive); + return $this->extractStream($archive, $destination, $options); + } - if (!$this->_data) - { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Unable to read archive'); - } - else - { - throw new RuntimeException('Unable to read archive'); - } - } + // Old style: read the whole file and then parse it + $this->_data = file_get_contents($archive); - $buffer = bzdecompress($this->_data); - unset($this->_data); + if (!$this->_data) + { + return $this->raiseWarning(100, 'Unable to read archive'); + } - if (empty($buffer)) - { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Unable to decompress data'); - } - else - { - throw new RuntimeException('Unable to decompress data'); - } - } + $buffer = bzdecompress($this->_data); + unset($this->_data); - if (JFile::write($destination, $buffer) === false) - { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Unable to write archive'); - } - else - { - throw new RuntimeException('Unable to write archive'); - } - } + if (empty($buffer)) + { + return $this->raiseWarning(100, 'Unable to decompress data'); } - else + + if (JFile::write($destination, $buffer) === false) { - // New style! streams! - $input = JFactory::getStream(); + return $this->raiseWarning(100, 'Unable to write archive'); + } - // Use bzip - $input->set('processingmethod', 'bz'); + return true; + } - if (!$input->open($archive)) - { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Unable to read archive (bz2)'); - } - else - { - throw new RuntimeException('Unable to read archive (bz2)'); - } - } + /** + * Method to extract archive using stream objects + * + * @param string $archive Path to Bzip2 archive to extract + * @param string $destination Path to extract archive to + * @param array $options Extraction options [unused] + * + * @return boolean True if successful + */ + protected function extractStream($archive, $destination, $options = array ()) + { + // New style! streams! + $input = JFactory::getStream(); + + // Use bzip + $input->set('processingmethod', 'bz'); + + if (!$input->open($archive)) + { + return $this->raiseWarning(100, 'Unable to read archive (bz2)'); + + } + + $output = JFactory::getStream(); - $output = JFactory::getStream(); + if (!$output->open($destination, 'w')) + { + $input->close(); + + return $this->raiseWarning(100, 'Unable to write archive (bz2)'); + + } + + do + { + $this->_data = $input->read($input->get('chunksize', 8196)); - if (!$output->open($destination, 'w')) + if ($this->_data && !$output->write($this->_data)) { $input->close(); - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Unable to write archive (bz2)'); - } - else - { - throw new RuntimeException('Unable to write archive (bz2)'); - } + return $this->raiseWarning(100, 'Unable to write archive (bz2)'); } + } - do - { - $this->_data = $input->read($input->get('chunksize', 8196)); - - if ($this->_data) - { - if (!$output->write($this->_data)) - { - $input->close(); - - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Unable to write archive (bz2)'); - } - else - { - throw new RuntimeException('Unable to write archive (bz2)'); - } - } - } - } + while ($this->_data); - while ($this->_data); + $output->close(); + $input->close(); - $output->close(); - $input->close(); + return true; + } + + /** + * Temporary private method to isolate JError from the extract method + * This code should be removed when JError is removed. + * + * @param int $code The application-internal error code for this error + * @param string $msg The error message, which may also be shown the user if need be. + * + * @return mixed JError object or Runtime Exception + */ + private function raiseWarning($code, $msg) + { + if (class_exists('JError')) + { + return JError::raiseWarning($code, $msg); } - return true; + throw new RuntimeException($msg); } /** From de647323335982a6131b0a4a55318e17d3a9ab50 Mon Sep 17 00:00:00 2001 From: Mathew Lenning Date: Sun, 8 May 2016 18:38:05 +0900 Subject: [PATCH 10/22] Same treatment as JArchiveBzip2 and JArchiveGzip (#6515) isolating JError into a temporary method. --- libraries/joomla/archive/zip.php | 219 ++++++++++--------------------- 1 file changed, 70 insertions(+), 149 deletions(-) diff --git a/libraries/joomla/archive/zip.php b/libraries/joomla/archive/zip.php index 7139701714e1e..f7c59987a1bb3 100644 --- a/libraries/joomla/archive/zip.php +++ b/libraries/joomla/archive/zip.php @@ -126,24 +126,34 @@ public function extract($archive, $destination, array $options = array()) { if (!is_file($archive)) { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Archive does not exist'); - } - else - { - throw new RuntimeException('Archive does not exist'); - } + return $this->raiseWarning(100, 'Archive does not exist'); } if ($this->hasNativeSupport()) { return $this->extractNative($archive, $destination); } - else + + return $this->extractCustom($archive, $destination); + } + + /** + * Temporary private method to isolate JError from the extract method + * This code should be removed when JError is removed. + * + * @param int $code The application-internal error code for this error + * @param string $msg The error message, which may also be shown the user if need be. + * + * @return mixed JError object or Runtime Exception + */ + private function raiseWarning($code, $msg) + { + if (class_exists('JError')) { - return $this->extractCustom($archive, $destination); + return JError::raiseWarning($code, $msg); } + + throw new RuntimeException($msg); } /** @@ -185,10 +195,8 @@ public function checkZipData(&$data) { return false; } - else - { - return true; - } + + return true; } /** @@ -209,40 +217,19 @@ protected function extractCustom($archive, $destination) if (!extension_loaded('zlib')) { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Zlib not supported'); - } - else - { - throw new RuntimeException('Zlib not supported'); - } + return $this->raiseWarning(100, 'Zlib not supported'); } $this->_data = file_get_contents($archive); if (!$this->_data) { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Unable to read archive (zip)'); - } - else - { - throw new RuntimeException('Unable to read archive (zip)'); - } + return $this->raiseWarning(100, 'Unable to read archive (zip)'); } if (!$this->_readZipInfo($this->_data)) { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Get ZIP Information failed'); - } - else - { - throw new RuntimeException('Get ZIP Information failed'); - } + return $this->raiseWarning(100, 'Get ZIP Information failed'); } for ($i = 0, $n = count($this->_metadata); $i < $n; $i++) @@ -257,26 +244,12 @@ protected function extractCustom($archive, $destination) // Make sure the destination folder exists if (!JFolder::create(dirname($path))) { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Unable to create destination'); - } - else - { - throw new RuntimeException('Unable to create destination'); - } + return $this->raiseWarning(100, 'Unable to create destination'); } if (JFile::write($path, $buffer) === false) { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Unable to write entry'); - } - else - { - throw new RuntimeException('Unable to write entry'); - } + return $this->raiseWarning(100, 'Unable to write entry'); } } } @@ -299,72 +272,40 @@ protected function extractNative($archive, $destination) { $zip = zip_open($archive); - if (is_resource($zip)) + if (!is_resource($zip)) { - // Make sure the destination folder exists - if (!JFolder::create($destination)) + return $this->raiseWarning(100, 'Unable to open archive'); + } + + // Make sure the destination folder exists + if (!JFolder::create($destination)) + { + return $this->raiseWarning(100, 'Unable to create destination'); + } + + // Read files in the archive + while ($file = @zip_read($zip)) + { + if (!zip_entry_open($zip, $file, "r")) { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Unable to create destination'); - } - else - { - throw new RuntimeException('Unable to create destination'); - } + return $this->raiseWarning(100, 'Unable to read entry'); } - // Read files in the archive - while ($file = @zip_read($zip)) + if (substr(zip_entry_name($file), strlen(zip_entry_name($file)) - 1) != "/") { - if (zip_entry_open($zip, $file, "r")) - { - if (substr(zip_entry_name($file), strlen(zip_entry_name($file)) - 1) != "/") - { - $buffer = zip_entry_read($file, zip_entry_filesize($file)); - - if (JFile::write($destination . '/' . zip_entry_name($file), $buffer) === false) - { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Unable to write entry'); - } - else - { - throw new RuntimeException('Unable to write entry'); - } - } - - zip_entry_close($file); - } - } - else + $buffer = zip_entry_read($file, zip_entry_filesize($file)); + + if (JFile::write($destination . '/' . zip_entry_name($file), $buffer) === false) { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Unable to read entry'); - } - else - { - throw new RuntimeException('Unable to read entry'); - } + return $this->raiseWarning(100, 'Unable to write entry'); } - } - @zip_close($zip); - } - else - { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Unable to open archive'); - } - else - { - throw new RuntimeException('Unable to open archive'); + zip_entry_close($file); } } + @zip_close($zip); + return true; } @@ -425,14 +366,7 @@ private function _readZipInfo(&$data) { if ($dataLength < $fhStart + 31) { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Invalid Zip Data'); - } - else - { - throw new RuntimeException('Invalid Zip Data'); - } + return $this->raiseWarning(100, 'Invalid Zip Data'); } $info = unpack('vMethod/VTime/VCRC32/VCompressed/VUncompressed/vLength', substr($data, $fhStart + 10, 20)); @@ -462,14 +396,7 @@ private function _readZipInfo(&$data) if ($dataLength < $fhStart + 43) { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Invalid ZIP data'); - } - else - { - throw new RuntimeException('Invalid ZIP data'); - } + return $this->raiseWarning(100, 'Invalid ZIP data'); } $info = unpack('vInternal/VExternal/VOffset', substr($data, $fhStart + 36, 10)); @@ -484,14 +411,7 @@ private function _readZipInfo(&$data) if ($dataLength < $lfhStart + 34) { - if (class_exists('JError')) - { - return JError::raiseWarning(100, 'Invalid Zip Data'); - } - else - { - throw new RuntimeException('Invalid Zip Data'); - } + return $this->raiseWarning(100, 'Invalid Zip Data'); } $info = unpack('vMethod/VTime/VCRC32/VCompressed/VUncompressed/vLength/vExtraLength', substr($data, $lfhStart + 8, 25)); @@ -520,22 +440,25 @@ private function _readZipInfo(&$data) */ private function _getFileData($key) { - if ($this->_metadata[$key]['_method'] == 0x8) - { - return gzinflate(substr($this->_data, $this->_metadata[$key]['_dataStart'], $this->_metadata[$key]['csize'])); - } - elseif ($this->_metadata[$key]['_method'] == 0x0) + $method = $this->_metadata[$key]['_method']; + + if ($method == 0x12 && !extension_loaded('bz2')) { - /* Files that aren't compressed. */ - return substr($this->_data, $this->_metadata[$key]['_dataStart'], $this->_metadata[$key]['csize']); + return ''; } - elseif ($this->_metadata[$key]['_method'] == 0x12) + + switch ($method) { - // If bz2 extension is loaded use it - if (extension_loaded('bz2')) - { + case 0x8: + return gzinflate(substr($this->_data, $this->_metadata[$key]['_dataStart'], $this->_metadata[$key]['csize'])); + + case 0x0: + // Files that aren't compressed. + return substr($this->_data, $this->_metadata[$key]['_dataStart'], $this->_metadata[$key]['csize']); + + case 0x12: + return bzdecompress(substr($this->_data, $this->_metadata[$key]['_dataStart'], $this->_metadata[$key]['csize'])); - } } return ''; @@ -710,9 +633,7 @@ private function _createZIPFile(array &$contents, array &$ctrlDir, $path) { return false; } - else - { - return true; - } + + return true; } } From 6fde982cf4db7c385a635af8d0eb2cebce591913 Mon Sep 17 00:00:00 2001 From: Mathew Lenning Date: Sun, 8 May 2016 18:46:05 +0900 Subject: [PATCH 11/22] CLEANING-JAdapter (#6679) * CLEANING-JAdapter Removed some nested conditionals and moved the getAdapter method above the setAdapter method because getAdapter uses setAdapter. * Making TCI happy --- libraries/joomla/base/adapter.php | 80 ++++++++++++++++--------------- 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/libraries/joomla/base/adapter.php b/libraries/joomla/base/adapter.php index 69e116a10b137..5d6552c04f21f 100644 --- a/libraries/joomla/base/adapter.php +++ b/libraries/joomla/base/adapter.php @@ -86,68 +86,70 @@ public function getDbo() } /** - * Set an adapter by name + * Return an adapter. * - * @param string $name Adapter name - * @param object &$adapter Adapter object - * @param array $options Adapter options + * @param string $name Name of adapter to return + * @param array $options Adapter options * - * @return boolean True if successful + * @return object Adapter of type 'name' or false * * @since 11.1 */ - public function setAdapter($name, &$adapter = null, $options = array()) + public function getAdapter($name, $options = array()) { - if (!is_object($adapter)) + if (array_key_exists($name, $this->_adapters)) { - $fullpath = $this->_basepath . '/' . $this->_adapterfolder . '/' . strtolower($name) . '.php'; - - if (!file_exists($fullpath)) - { - return false; - } - - // Try to load the adapter object - require_once $fullpath; - - $class = $this->_classprefix . ucfirst($name); - - if (!class_exists($class)) - { - return false; - } - - $adapter = new $class($this, $this->_db, $options); + return $this->_adapters[$name]; } - $this->_adapters[$name] = &$adapter; + if ($this->setAdapter($name, $options)) + { + return $this->_adapters[$name]; + } - return true; + return false; } /** - * Return an adapter. + * Set an adapter by name * - * @param string $name Name of adapter to return - * @param array $options Adapter options + * @param string $name Adapter name + * @param object &$adapter Adapter object + * @param array $options Adapter options * - * @return object Adapter of type 'name' or false + * @return boolean True if successful * * @since 11.1 */ - public function getAdapter($name, $options = array()) + public function setAdapter($name, &$adapter = null, $options = array()) { - if (!array_key_exists($name, $this->_adapters)) + if (is_object($adapter)) { - if (!$this->setAdapter($name, $options)) - { - $false = false; + $this->_adapters[$name] = &$adapter; - return $false; - } + return true; + } + + $fullpath = $this->_basepath . '/' . $this->_adapterfolder . '/' . strtolower($name) . '.php'; + + if (!file_exists($fullpath)) + { + return false; + } + + // Try to load the adapter object + require_once $fullpath; + + $class = $this->_classprefix . ucfirst($name); + + if (!class_exists($class)) + { + return false; } - return $this->_adapters[$name]; + $this->_adapters[$name] = new $class($this, $this->_db, $options); + + return true; } /** From df1f5b3bb6f6ab651d167447686d56902ba2c4fd Mon Sep 17 00:00:00 2001 From: Mathew Lenning Date: Sun, 8 May 2016 18:48:07 +0900 Subject: [PATCH 12/22] CLEANING-JDataSet (#7947) * Removed redundant Else clauses and simplified some of the logic * Simple CS for travis --- libraries/joomla/data/set.php | 55 +++++++++++++++-------------------- 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/libraries/joomla/data/set.php b/libraries/joomla/data/set.php index eef78689255ba..44e98d2766e07 100644 --- a/libraries/joomla/data/set.php +++ b/libraries/joomla/data/set.php @@ -341,24 +341,24 @@ public function next() { // This is a special case where offsetUnset was used in a foreach loop and the first element was unset. $this->_current = $keys[0]; + + return; } - else + + // Get the current key. + $position = array_search($this->_current, $keys); + + // Check if there is an object after the current object. + if ($position !== false && isset($keys[$position + 1])) { - // Get the current key. - $position = array_search($this->_current, $keys); + // Get the next id. + $this->_current = $keys[$position + 1]; - // Check if there is an object after the current object. - if ($position !== false && isset($keys[$position + 1])) - { - // Get the next id. - $this->_current = $keys[$position + 1]; - } - else - { - // That was the last object or the internal properties have become corrupted. - $this->_current = null; - } + return; } + + // That was the last object or the internal properties have become corrupted. + $this->_current = null; } /** @@ -436,17 +436,16 @@ public function offsetUnset($offset) $keys = $this->keys(); $position = array_search($this->_current, $keys); + $current = false; + // Check if there is an object before the current object. if ($position > 0) { // Move the current position back one. - $this->_current = $keys[$position - 1]; - } - else - { - // We are at the start of the keys AND let's assume we are in a foreach loop and `next` is going to be called. - $this->_current = false; + $current = $keys[$position - 1]; } + + $this->_current = $current; } unset($this->_objects[$offset]); @@ -465,12 +464,11 @@ public function rewind() if (empty($this->_objects)) { $this->_current = false; + return; } - else - { - $keys = $this->keys(); - $this->_current = array_shift($keys); - } + + $keys = $this->keys(); + $this->_current = array_shift($keys); } /** @@ -483,12 +481,7 @@ public function rewind() public function valid() { // Check the current position. - if (!is_scalar($this->_current) || !isset($this->_objects[$this->_current])) - { - return false; - } - - return true; + return (is_scalar($this->_current) && isset($this->_objects[$this->_current])); } /** From 8823cb5ef4adad66c60d8724ee9561726ebbff74 Mon Sep 17 00:00:00 2001 From: Mathew Lenning Date: Sun, 8 May 2016 18:50:17 +0900 Subject: [PATCH 13/22] Removed an redundant else clause from JFeedParser::processElement (#7961) --- libraries/joomla/feed/parser.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/libraries/joomla/feed/parser.php b/libraries/joomla/feed/parser.php index b4b4e442289a6..9acd497e87a96 100644 --- a/libraries/joomla/feed/parser.php +++ b/libraries/joomla/feed/parser.php @@ -169,22 +169,22 @@ protected function processElement(JFeed $feed, SimpleXMLElement $el, array $name // Add the new entry to the feed. $feed->addEntry($entry); + + return; } // Otherwise we treat it like any other element. - else + + // First call the internal method. + if (is_callable(array($this, $method))) { - // First call the internal method. - if (is_callable(array($this, $method))) - { - $this->$method($feed, $el); - } + $this->$method($feed, $el); + } - foreach ($namespaces as $namespace) + foreach ($namespaces as $namespace) + { + if ($namespace instanceof JFeedParserNamespace) { - if ($namespace instanceof JFeedParserNamespace) - { - $namespace->processElementForFeed($feed, $el); - } + $namespace->processElementForFeed($feed, $el); } } } From a0acdd7875f05207484c4dc7c93e7b87f3f5f933 Mon Sep 17 00:00:00 2001 From: Chris Davenport Date: Sun, 8 May 2016 10:56:44 +0100 Subject: [PATCH 14/22] Smart Search: utf8_strpos: Offset must be an integer (#10303) --- components/com_finder/views/search/tmpl/default_result.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/com_finder/views/search/tmpl/default_result.php b/components/com_finder/views/search/tmpl/default_result.php index 3d7134afda069..6893e9114841b 100644 --- a/components/com_finder/views/search/tmpl/default_result.php +++ b/components/com_finder/views/search/tmpl/default_result.php @@ -19,7 +19,7 @@ // Calculate number of characters to display around the result $term_length = JString::strlen($this->query->input); $desc_length = $this->params->get('description_length', 255); - $pad_length = $term_length < $desc_length ? floor(($desc_length - $term_length) / 2) : 0; + $pad_length = $term_length < $desc_length ? (int) floor(($desc_length - $term_length) / 2) : 0; // Find the position of the search term $pos = $term_length ? JString::strpos(JString::strtolower($this->result->description), JString::strtolower($this->query->input)) : false; From f145e600ba6ed09e80f511bfc510f81d6a7e5650 Mon Sep 17 00:00:00 2001 From: Mathew Lenning Date: Sun, 8 May 2016 19:31:49 +0900 Subject: [PATCH 15/22] Removed redundant else statemetn from JFormHelper::loadType (#7979) From 6279e479832cdf6135a7a7c377b543001b1ed374 Mon Sep 17 00:00:00 2001 From: George Wilson Date: Sun, 8 May 2016 11:52:36 +0100 Subject: [PATCH 16/22] Add missing slash --- administrator/components/com_admin/script.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index 422b8d91a00ab..8a8a551ad4415 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -1410,14 +1410,14 @@ public function deleteUnexistingFiles() '/administrator/components/com_installer/views/languages/tmpl/default_filter.php', '/administrator/components/com_joomlaupdate/helpers/download.php', // Joomla 3.6.0 - 'libraries/simplepie/README.txt', - 'libraries/simplepie/simplepie.php', - 'libraries/simplepie/LICENSE.txt', - 'libraries/simplepie/idn/LICENCE', - 'libraries/simplepie/idn/ReadMe.txt', - 'libraries/simplepie/idn/idna_convert.class.php', - 'libraries/simplepie/idn/npdata.ser', - 'administrator/manifests/libraries/simplepie.xml', + '/libraries/simplepie/README.txt', + '/libraries/simplepie/simplepie.php', + '/libraries/simplepie/LICENSE.txt', + '/libraries/simplepie/idn/LICENCE', + '/libraries/simplepie/idn/ReadMe.txt', + '/libraries/simplepie/idn/idna_convert.class.php', + '/libraries/simplepie/idn/npdata.ser', + '/administrator/manifests/libraries/simplepie.xml', ); // TODO There is an issue while deleting folders using the ftp mode @@ -1512,8 +1512,8 @@ public function deleteUnexistingFiles() '/libraries/joomla/document/raw', '/libraries/joomla/document/xml', // Joomla 3.6 - 'libraries/simplepie/idn', - 'libraries/simplepie', + '/libraries/simplepie/idn', + '/libraries/simplepie', ); jimport('joomla.filesystem.file'); From 5318a16825914eb4bd81cb067d629ac1b1c3864b Mon Sep 17 00:00:00 2001 From: andrepereiradasilva Date: Sun, 8 May 2016 12:00:34 +0100 Subject: [PATCH 17/22] Add missing com_finder to com_admin script php (#10300) * Add missing com_finder to com_admin script php * add com_joomlaupdate to --- administrator/components/com_admin/script.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index 8a8a551ad4415..6564a626bc43d 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -235,9 +235,11 @@ protected function updateManifestCaches() array('component', 'com_config', '', 1), array('component', 'com_redirect', '', 1), array('component', 'com_users', '', 1), + array('component', 'com_finder', '', 1), array('component', 'com_tags', '', 1), array('component', 'com_contenthistory', '', 1), array('component', 'com_postinstall', '', 1), + array('component', 'com_joomlaupdate', '', 1), // Libraries array('library', 'phputf8', '', 0), From 618c5c590d762df778d40caf5335ffb918a6fc1e Mon Sep 17 00:00:00 2001 From: Brian Teeman Date: Sun, 8 May 2016 12:10:32 +0100 Subject: [PATCH 18/22] Isis pagination (#10240) * fix isis pagination * add the {} to the if * Update pagination.php --- administrator/templates/isis/html/pagination.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/administrator/templates/isis/html/pagination.php b/administrator/templates/isis/html/pagination.php index c3d6c66cba274..b4996077cad06 100644 --- a/administrator/templates/isis/html/pagination.php +++ b/administrator/templates/isis/html/pagination.php @@ -118,14 +118,6 @@ function pagination_list_render($list) foreach ($list['pages'] as $k => $page) { - if (in_array($k, range($range * $step - ($step + 1), $range * $step))) - { - if (($k % $step == 0 || $k == $range * $step - ($step + 1)) && $k != $currentPage && $k != $range * $step - $step) - { - $page['data'] = preg_replace('#().*?()#', '$1...$2', $page['data']); - } - } - $html .= $page['data']; } From a50cb9fb84fbb16aca98c4849c0137aa5e920900 Mon Sep 17 00:00:00 2001 From: Viktor Vogel Date: Sun, 8 May 2016 13:13:36 +0200 Subject: [PATCH 19/22] Dgt41 Password strength indication - Fixes #8513 (#10307) * Password strength Use jQuery Password Strength Meter for Twitter Bootstrap instead of own Mootols script Affects the field password * some css * strings * username, minlength * get the min chars form com_users params, CMS installation uses an override to get the value from the form xml * Move code around * incorporate changes in com_users * map * cannot ->should not * Thanks @Bakual * remove the map //# sourceMappingURL=pwstrength-bootstrap-1.2.9.min.map * not necsessary * These strings also need translation --- .../com_users/models/forms/user.xml | 2 + administrator/language/en-GB/en-GB.ini | 11 + .../templates/hathor/css/template.css | 4 + .../templates/hathor/less/template.less | 6 + .../templates/isis/css/template-rtl.css | 7 + administrator/templates/isis/css/template.css | 4 + .../templates/isis/less/template.less | 7 + installation/form/field/password.php | 38 + installation/language/en-GB/en-GB.ini | 14 + installation/model/forms/site.xml | 6 +- installation/template/css/template.css | 19 +- language/en-GB/en-GB.ini | 11 + libraries/joomla/form/fields/password.php | 87 ++- media/jui/js/pwstrength-bootstrap-1.2.9.js | 708 ++++++++++++++++++ .../jui/js/pwstrength-bootstrap-1.2.9.min.js | 3 + 15 files changed, 902 insertions(+), 25 deletions(-) create mode 100644 installation/form/field/password.php create mode 100755 media/jui/js/pwstrength-bootstrap-1.2.9.js create mode 100755 media/jui/js/pwstrength-bootstrap-1.2.9.min.js diff --git a/administrator/components/com_users/models/forms/user.xml b/administrator/components/com_users/models/forms/user.xml index 61cbbcf5dd7a0..a6364e6cd7059 100644 --- a/administrator/components/com_users/models/forms/user.xml +++ b/administrator/components/com_users/models/forms/user.xml @@ -23,6 +23,8 @@ validate="password" label="JGLOBAL_PASSWORD" size="30" + strengthmeter="true" + username="username" /> minLength = 4; + $return = parent::getInput(); + + return $return; + } +} diff --git a/installation/language/en-GB/en-GB.ini b/installation/language/en-GB/en-GB.ini index 6d406a05aea39..05f0c9d895307 100644 --- a/installation/language/en-GB/en-GB.ini +++ b/installation/language/en-GB/en-GB.ini @@ -323,3 +323,17 @@ POSTGRESQL="PostgreSQL" SQLAZURE="Microsoft SQL Azure" SQLITE="SQLite" SQLSRV="Microsoft SQL Server" + + +; Password strength +JFIELD_PASSWORD_INDICATE_CHARCLASS="Use different character classes" +JFIELD_PASSWORD_INDICATE_LENGTH="Your password is too short" +JFIELD_PASSWORD_INDICATE_NOEMAIL="Do not use your email as your password" +JFIELD_PASSWORD_INDICATE_NORMAL="Normal" +JFIELD_PASSWORD_INDICATE_MEDIUM="Medium" +JFIELD_PASSWORD_INDICATE_STRONG="Strong" +JFIELD_PASSWORD_INDICATE_VSTRONG="Very strong" +JFIELD_PASSWORD_INDICATE_USERNAME="Your password should not contain your username" +JFIELD_PASSWORD_INDICATE_WEAK="Weak" +JFIELD_PASSWORD_INDICATE_WORDREP="Too many repetitions" +JFIELD_PASSWORD_INDICATE_WORDSEQ="Your password contains sequences" \ No newline at end of file diff --git a/installation/model/forms/site.xml b/installation/model/forms/site.xml index 7bc292699bb98..f6e904f7c7a9a 100644 --- a/installation/model/forms/site.xml +++ b/installation/model/forms/site.xml @@ -24,14 +24,16 @@ required="true" /> - - $name; } @@ -91,6 +109,7 @@ public function __set($name, $value) { case 'maxLength': case 'threshold': + case 'username': $this->$name = $value; break; @@ -125,9 +144,8 @@ public function setup(SimpleXMLElement $element, $value, $group = null) { $this->maxLength = $this->element['maxlength'] ? (int) $this->element['maxlength'] : 99; $this->threshold = $this->element['threshold'] ? (int) $this->element['threshold'] : 66; - - $meter = (string) $this->element['strengthmeter']; - $this->meter = ($meter == 'true' || $meter == 'on' || $meter == '1'); + $meter = (string) $this->element['strengthmeter']; + $this->meter = ($meter == 'true' || $meter == 'on' || $meter == '1'); } return $return; @@ -146,31 +164,56 @@ protected function getInput() $hint = $this->translateHint ? JText::_($this->hint) : $this->hint; // Initialize some field attributes. - $size = !empty($this->size) ? ' size="' . $this->size . '"' : ''; - $maxLength = !empty($this->maxLength) ? ' maxlength="' . $this->maxLength . '"' : ''; - $class = !empty($this->class) ? ' class="' . $this->class . '"' : ''; - $readonly = $this->readonly ? ' readonly' : ''; - $disabled = $this->disabled ? ' disabled' : ''; - $required = $this->required ? ' required aria-required="true"' : ''; - $hint = $hint ? ' placeholder="' . $hint . '"' : ''; - $autocomplete = !$this->autocomplete ? ' autocomplete="off"' : ''; - $autofocus = $this->autofocus ? ' autofocus' : ''; + $size = !empty($this->size) ? ' size="' . $this->size . '"' : ''; + $maxLength = !empty($this->maxLength) ? ' maxlength="' . $this->maxLength . '"' : ''; + $class = !empty($this->class) ? ' class="' . $this->class . '"' : ''; + $readonly = $this->readonly ? ' readonly' : ''; + $disabled = $this->disabled ? ' disabled' : ''; + $required = $this->required ? ' required aria-required="true"' : ''; + $hint = $hint ? ' placeholder="' . $hint . '"' : ''; + $autocomplete = !$this->autocomplete ? ' autocomplete="off"' : ''; + $autofocus = $this->autofocus ? ' autofocus' : ''; + $this->username = $this->element['username'] ? 'options.common.usernameField = "#jform_' . $this->element['username'] . '";' : ''; + + if (!$this->minLength) + { + $this->minLength = (int) JComponentHelper::getParams('com_users')->get('minimum_length', 4); + } if ($this->meter) { - JHtml::_('script', 'system/passwordstrength.js', true, true); - $script = 'new Form.PasswordStrength("' . $this->id . '", - { - threshold: ' . $this->threshold . ', - onUpdate: function(element, strength, threshold) { - element.set("data-passwordstrength", strength); - } - } - );'; + JHtml::_('script', 'jui/pwstrength-bootstrap-1.2.9.min.js', false, true, false, false, true); // Load script on document load. JFactory::getDocument()->addScriptDeclaration( - "jQuery(document).ready(function(){" . $script . "});" + " + jQuery(document).ready(function($){ + 'use strict'; + var options = {}; + options.common = {}; + " . $this->username . " + options.common.minChar = " . $this->minLength . " + options.ui = { + bootstrap2: true, + showErrors: true, + }; + options.ui.verdicts = [ + '" . JText::_('JFIELD_PASSWORD_INDICATE_WEAK') . "', + '" . JText::_('JFIELD_PASSWORD_INDICATE_NORMAL') . "', + '" . JText::_('JFIELD_PASSWORD_INDICATE_MEDIUM') . "', + '" . JText::_('JFIELD_PASSWORD_INDICATE_STRONG') . "', + '" . JText::_('JFIELD_PASSWORD_INDICATE_VSTRONG') . "']; + options.ui.errorMessages = { + wordLength: '" . JText::_('JFIELD_PASSWORD_INDICATE_LENGTH') . "', + wordNotEmail: '" . JText::_('JFIELD_PASSWORD_INDICATE_NOEMAIL') . "', + wordSimilarToUsername: '" . JText::_('JFIELD_PASSWORD_INDICATE_USERNAME') . "', + wordTwoCharacterClasses: '" . JText::_('JFIELD_PASSWORD_INDICATE_CHARCLASS') . "', + wordRepetitions: '" . JText::_('JFIELD_PASSWORD_INDICATE_WORDREP') . "', + wordSequences: '" . JText::_('JFIELD_PASSWORD_INDICATE_WORDSEQ') . "' + }; + jQuery('#" . $this->id . "').pwstrength(options); + }); + " ); } diff --git a/media/jui/js/pwstrength-bootstrap-1.2.9.js b/media/jui/js/pwstrength-bootstrap-1.2.9.js new file mode 100755 index 0000000000000..1fb2b9b60f3ce --- /dev/null +++ b/media/jui/js/pwstrength-bootstrap-1.2.9.js @@ -0,0 +1,708 @@ +/*! +* jQuery Password Strength plugin for Twitter Bootstrap +* +* Copyright (c) 2008-2013 Tane Piper +* Copyright (c) 2013 Alejandro Blanco +* Dual licensed under the MIT and GPL licenses. +*/ + +(function (jQuery) { +// Source: src/rules.js + + + + +var rulesEngine = {}; + +try { + if (!jQuery && module && module.exports) { + var jQuery = require("jquery"), + jsdom = require("jsdom").jsdom; + jQuery = jQuery(jsdom().parentWindow); + } +} catch (ignore) {} + +(function ($, rulesEngine) { + "use strict"; + var validation = {}; + + rulesEngine.forbiddenSequences = [ + "0123456789", "abcdefghijklmnopqrstuvwxyz", "qwertyuiop", "asdfghjkl", + "zxcvbnm", "!@#$%^&*()_+" + ]; + + validation.wordNotEmail = function (options, word, score) { + if (word.match(/^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i)) { + return score; + } + return 0; + }; + + validation.wordLength = function (options, word, score) { + var wordlen = word.length, + lenScore = Math.pow(wordlen, options.rules.raisePower); + if (wordlen < options.common.minChar) { + lenScore = (lenScore + score); + } + return lenScore; + }; + + validation.wordSimilarToUsername = function (options, word, score) { + var username = $(options.common.usernameField).val(); + if (username && word.toLowerCase().match(username.replace(/[\-\[\]\/\{\}\(\)\*\+\=\?\:\.\\\^\$\|\!\,]/g, "\\$&").toLowerCase())) { + return score; + } + return 0; + }; + + validation.wordTwoCharacterClasses = function (options, word, score) { + if (word.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/) || + (word.match(/([a-zA-Z])/) && word.match(/([0-9])/)) || + (word.match(/(.[!,@,#,$,%,\^,&,*,?,_,~])/) && word.match(/[a-zA-Z0-9_]/))) { + return score; + } + return 0; + }; + + validation.wordRepetitions = function (options, word, score) { + if (word.match(/(.)\1\1/)) { return score; } + return 0; + }; + + validation.wordSequences = function (options, word, score) { + var found = false, + j; + if (word.length > 2) { + $.each(rulesEngine.forbiddenSequences, function (idx, seq) { + if (found) { return; } + var sequences = [seq, seq.split('').reverse().join('')]; + $.each(sequences, function (idx, sequence) { + for (j = 0; j < (word.length - 2); j += 1) { // iterate the word trough a sliding window of size 3: + if (sequence.indexOf(word.toLowerCase().substring(j, j + 3)) > -1) { + found = true; + } + } + }); + }); + if (found) { return score; } + } + return 0; + }; + + validation.wordLowercase = function (options, word, score) { + return word.match(/[a-z]/) && score; + }; + + validation.wordUppercase = function (options, word, score) { + return word.match(/[A-Z]/) && score; + }; + + validation.wordOneNumber = function (options, word, score) { + return word.match(/\d+/) && score; + }; + + validation.wordThreeNumbers = function (options, word, score) { + return word.match(/(.*[0-9].*[0-9].*[0-9])/) && score; + }; + + validation.wordOneSpecialChar = function (options, word, score) { + return word.match(/[!,@,#,$,%,\^,&,*,?,_,~]/) && score; + }; + + validation.wordTwoSpecialChar = function (options, word, score) { + return word.match(/(.*[!,@,#,$,%,\^,&,*,?,_,~].*[!,@,#,$,%,\^,&,*,?,_,~])/) && score; + }; + + validation.wordUpperLowerCombo = function (options, word, score) { + return word.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/) && score; + }; + + validation.wordLetterNumberCombo = function (options, word, score) { + return word.match(/([a-zA-Z])/) && word.match(/([0-9])/) && score; + }; + + validation.wordLetterNumberCharCombo = function (options, word, score) { + return word.match(/([a-zA-Z0-9].*[!,@,#,$,%,\^,&,*,?,_,~])|([!,@,#,$,%,\^,&,*,?,_,~].*[a-zA-Z0-9])/) && score; + }; + + rulesEngine.validation = validation; + + rulesEngine.executeRules = function (options, word) { + var totalScore = 0; + + $.each(options.rules.activated, function (rule, active) { + if (active) { + var score = options.rules.scores[rule], + funct = rulesEngine.validation[rule], + result, + errorMessage; + + if (!$.isFunction(funct)) { + funct = options.rules.extra[rule]; + } + + if ($.isFunction(funct)) { + result = funct(options, word, score); + if (result) { + totalScore += result; + } + if (result < 0 || (!$.isNumeric(result) && !result)) { + errorMessage = options.ui.spanError(options, rule); + if (errorMessage.length > 0) { + options.instances.errors.push(errorMessage); + } + } + } + } + }); + + return totalScore; + }; +}(jQuery, rulesEngine)); + +try { + if (module && module.exports) { + module.exports = rulesEngine; + } +} catch (ignore) {} + +// Source: src/options.js + + + + +var defaultOptions = {}; + +defaultOptions.common = {}; +defaultOptions.common.minChar = 6; +defaultOptions.common.usernameField = "#username"; +defaultOptions.common.userInputs = [ + // Selectors for input fields with user input +]; +defaultOptions.common.onLoad = undefined; +defaultOptions.common.onKeyUp = undefined; +defaultOptions.common.zxcvbn = false; +defaultOptions.common.zxcvbnTerms = [ + // List of disrecommended words +]; +defaultOptions.common.debug = false; + +defaultOptions.rules = {}; +defaultOptions.rules.extra = {}; +defaultOptions.rules.scores = { + wordNotEmail: -100, + wordLength: -50, + wordSimilarToUsername: -100, + wordSequences: -20, + wordTwoCharacterClasses: 2, + wordRepetitions: -25, + wordLowercase: 1, + wordUppercase: 3, + wordOneNumber: 3, + wordThreeNumbers: 5, + wordOneSpecialChar: 3, + wordTwoSpecialChar: 5, + wordUpperLowerCombo: 2, + wordLetterNumberCombo: 2, + wordLetterNumberCharCombo: 2 +}; +defaultOptions.rules.activated = { + wordNotEmail: true, + wordLength: true, + wordSimilarToUsername: true, + wordSequences: true, + wordTwoCharacterClasses: false, + wordRepetitions: false, + wordLowercase: true, + wordUppercase: true, + wordOneNumber: true, + wordThreeNumbers: true, + wordOneSpecialChar: true, + wordTwoSpecialChar: true, + wordUpperLowerCombo: true, + wordLetterNumberCombo: true, + wordLetterNumberCharCombo: true +}; +defaultOptions.rules.raisePower = 1.4; + +defaultOptions.ui = {}; +defaultOptions.ui.bootstrap2 = false; +defaultOptions.ui.bootstrap4 = false; +defaultOptions.ui.colorClasses = ["danger", "warning", "success"]; +defaultOptions.ui.showProgressBar = true; +defaultOptions.ui.showPopover = false; +defaultOptions.ui.popoverPlacement = "bottom"; +defaultOptions.ui.showStatus = false; +defaultOptions.ui.spanError = function (options, key) { + "use strict"; + var text = options.ui.errorMessages[key]; + if (!text) { return ''; } + return '' + text + ''; +}; +defaultOptions.ui.popoverError = function (errors) { + "use strict"; + var message = "
Errors:
    "; + + jQuery.each(errors, function (idx, err) { + message += "
  • " + err + "
  • "; + }); + message += "
"; + return message; +}; +defaultOptions.ui.errorMessages = { + wordLength: "Your password is too short", + wordNotEmail: "Do not use your email as your password", + wordSimilarToUsername: "Your password cannot contain your username", + wordTwoCharacterClasses: "Use different character classes", + wordRepetitions: "Too many repetitions", + wordSequences: "Your password contains sequences" +}; +defaultOptions.ui.verdicts = ["Weak", "Normal", "Medium", "Strong", "Very Strong"]; +defaultOptions.ui.showVerdicts = true; +defaultOptions.ui.showVerdictsInsideProgressBar = false; +defaultOptions.ui.useVerdictCssClass = false; +defaultOptions.ui.showErrors = false; +defaultOptions.ui.container = undefined; +defaultOptions.ui.viewports = { + progress: undefined, + verdict: undefined, + errors: undefined +}; +defaultOptions.ui.scores = [14, 26, 38, 50]; + +// Source: src/ui.js + + + + +var ui = {}; + +(function ($, ui) { + "use strict"; + + var statusClasses = ["error", "warning", "success"]; + + ui.getContainer = function (options, $el) { + var $container; + + $container = $(options.ui.container); + if (!($container && $container.length === 1)) { + $container = $el.parent(); + } + return $container; + }; + + ui.findElement = function ($container, viewport, cssSelector) { + if (viewport) { + return $container.find(viewport).find(cssSelector); + } + return $container.find(cssSelector); + }; + + ui.getUIElements = function (options, $el) { + var $container, selector, result; + + if (options.instances.viewports) { + return options.instances.viewports; + } + + $container = ui.getContainer(options, $el); + + result = {}; + if (options.ui.bootstrap4) { + selector = "progress.progress"; + } else { + selector = "div.progress"; + } + result.$progressbar = ui.findElement($container, options.ui.viewports.progress, selector); + if (options.ui.showVerdictsInsideProgressBar) { + result.$verdict = result.$progressbar.find("span.password-verdict"); + } + + if (!options.ui.showPopover) { + if (!options.ui.showVerdictsInsideProgressBar) { + result.$verdict = ui.findElement($container, options.ui.viewports.verdict, "span.password-verdict"); + } + result.$errors = ui.findElement($container, options.ui.viewports.errors, "ul.error-list"); + } + + options.instances.viewports = result; + return result; + }; + + ui.initProgressBar = function (options, $el) { + var $container = ui.getContainer(options, $el), + progressbar = "
"; + if (options.ui.bootstrap4) { + // Boostrap 4 + progressbar = ""; + } + if (options.ui.showVerdictsInsideProgressBar) { + progressbar += ""; + } + if (options.ui.bootstrap4) { + progressbar += ""; + } else { + progressbar += "
"; + } + + if (options.ui.viewports.progress) { + $container.find(options.ui.viewports.progress).append(progressbar); + } else { + $(progressbar).insertAfter($el); + } + }; + + ui.initHelper = function (options, $el, html, viewport) { + var $container = ui.getContainer(options, $el); + if (viewport) { + $container.find(viewport).append(html); + } else { + $(html).insertAfter($el); + } + }; + + ui.initVerdict = function (options, $el) { + ui.initHelper(options, $el, "", + options.ui.viewports.verdict); + }; + + ui.initErrorList = function (options, $el) { + ui.initHelper(options, $el, "
    ", + options.ui.viewports.errors); + }; + + ui.initPopover = function (options, $el) { + $el.popover("destroy"); + $el.popover({ + html: true, + placement: options.ui.popoverPlacement, + trigger: "manual", + content: " " + }); + }; + + ui.initUI = function (options, $el) { + if (options.ui.showPopover) { + ui.initPopover(options, $el); + } else { + if (options.ui.showErrors) { ui.initErrorList(options, $el); } + if (options.ui.showVerdicts && !options.ui.showVerdictsInsideProgressBar) { + ui.initVerdict(options, $el); + } + } + if (options.ui.showProgressBar) { + ui.initProgressBar(options, $el); + } + }; + + ui.updateProgressBar = function (options, $el, cssClass, percentage) { + var $progressbar = ui.getUIElements(options, $el).$progressbar, + $bar = $progressbar.find(".progress-bar"), + cssPrefix = "progress-"; + + if (options.ui.bootstrap2) { + $bar = $progressbar.find(".bar"); + cssPrefix = ""; + } + + $.each(options.ui.colorClasses, function (idx, value) { + if (options.ui.bootstrap4) { + $progressbar.removeClass(cssPrefix + value); + } else { + $bar.removeClass(cssPrefix + "bar-" + value); + } + }); + if (options.ui.bootstrap4) { + $progressbar.addClass(cssPrefix + options.ui.colorClasses[cssClass]); + $progressbar.val(percentage); + } else { + $bar.addClass(cssPrefix + "bar-" + options.ui.colorClasses[cssClass]); + $bar.css("width", percentage + '%'); + } + }; + + ui.updateVerdict = function (options, $el, cssClass, text) { + var $verdict = ui.getUIElements(options, $el).$verdict; + $verdict.removeClass(options.ui.colorClasses.join(' ')); + if (cssClass > -1) { + $verdict.addClass(options.ui.colorClasses[cssClass]); + } + $verdict.html(text); + }; + + ui.updateErrors = function (options, $el) { + var $errors = ui.getUIElements(options, $el).$errors, + html = ""; + $.each(options.instances.errors, function (idx, err) { + html += "
  • " + err + "
  • "; + }); + $errors.html(html); + }; + + ui.updatePopover = function (options, $el, verdictText) { + var popover = $el.data("bs.popover"), + html = "", + hide = true; + + if (options.ui.showVerdicts && + !options.ui.showVerdictsInsideProgressBar && + verdictText.length > 0) { + html = "
    " + verdictText + + "
    "; + hide = false; + } + if (options.ui.showErrors) { + if (options.instances.errors.length > 0) { + hide = false; + } + html += options.ui.popoverError(options.instances.errors); + } + + if (hide) { + $el.popover("hide"); + return; + } + + if (options.ui.bootstrap2) { popover = $el.data("popover"); } + + if (popover.$arrow && popover.$arrow.parents("body").length > 0) { + $el.find("+ .popover .popover-content").html(html); + } else { + // It's hidden + popover.options.content = html; + $el.popover("show"); + } + }; + + ui.updateFieldStatus = function (options, $el, cssClass) { + var targetClass = options.ui.bootstrap2 ? ".control-group" : ".form-group", + $container = $el.parents(targetClass).first(); + + $.each(statusClasses, function (idx, css) { + if (!options.ui.bootstrap2) { css = "has-" + css; } + $container.removeClass(css); + }); + + cssClass = statusClasses[cssClass]; + if (!options.ui.bootstrap2) { cssClass = "has-" + cssClass; } + $container.addClass(cssClass); + }; + + ui.percentage = function (score, maximun) { + var result = Math.floor(100 * score / maximun); + result = result <= 0 ? 1 : result; // Don't show the progress bar empty + result = result > 100 ? 100 : result; + return result; + }; + + ui.getVerdictAndCssClass = function (options, score) { + var cssClass, verdictText, level; + + if (score <= 0) { + cssClass = 0; + level = -1; + verdictText = options.ui.verdicts[0]; + } else if (score < options.ui.scores[0]) { + cssClass = 0; + level = 0; + verdictText = options.ui.verdicts[0]; + } else if (score < options.ui.scores[1]) { + cssClass = 0; + level = 1; + verdictText = options.ui.verdicts[1]; + } else if (score < options.ui.scores[2]) { + cssClass = 1; + level = 2; + verdictText = options.ui.verdicts[2]; + } else if (score < options.ui.scores[3]) { + cssClass = 1; + level = 3; + verdictText = options.ui.verdicts[3]; + } else { + cssClass = 2; + level = 4; + verdictText = options.ui.verdicts[4]; + } + + return [verdictText, cssClass, level]; + }; + + ui.updateUI = function (options, $el, score) { + var cssClass, barPercentage, verdictText, verdictCssClass; + + cssClass = ui.getVerdictAndCssClass(options, score); + verdictText = score === 0 ? '' : cssClass[0]; + cssClass = cssClass[1]; + verdictCssClass = options.ui.useVerdictCssClass ? cssClass : -1; + + if (options.ui.showProgressBar) { + barPercentage = ui.percentage(score, options.ui.scores[3]); + ui.updateProgressBar(options, $el, cssClass, barPercentage); + if (options.ui.showVerdictsInsideProgressBar) { + ui.updateVerdict(options, $el, verdictCssClass, verdictText); + } + } + + if (options.ui.showStatus) { + ui.updateFieldStatus(options, $el, cssClass); + } + + if (options.ui.showPopover) { + ui.updatePopover(options, $el, verdictText); + } else { + if (options.ui.showVerdicts && !options.ui.showVerdictsInsideProgressBar) { + ui.updateVerdict(options, $el, verdictCssClass, verdictText); + } + if (options.ui.showErrors) { + ui.updateErrors(options, $el); + } + } + }; +}(jQuery, ui)); + +// Source: src/methods.js + + + + +var methods = {}; + +(function ($, methods) { + "use strict"; + var onKeyUp, applyToAll; + + onKeyUp = function (event) { + var $el = $(event.target), + options = $el.data("pwstrength-bootstrap"), + word = $el.val(), + userInputs, + verdictText, + verdictLevel, + score; + + if (options === undefined) { return; } + + options.instances.errors = []; + if (word.length === 0) { + score = 0; + } else { + if (options.common.zxcvbn) { + userInputs = []; + $.each(options.common.userInputs.concat([options.common.usernameField]), function (idx, selector) { + var value = $(selector).val(); + if (value) { userInputs.push(value); } + }); + userInputs = userInputs.concat(options.common.zxcvbnTerms); + score = zxcvbn(word, userInputs).entropy; + } else { + score = rulesEngine.executeRules(options, word); + } + } + ui.updateUI(options, $el, score); + verdictText = ui.getVerdictAndCssClass(options, score); + verdictLevel = verdictText[2]; + verdictText = verdictText[0]; + + if (options.common.debug) { console.log(score + ' - ' + verdictText); } + + if ($.isFunction(options.common.onKeyUp)) { + options.common.onKeyUp(event, { + score: score, + verdictText: verdictText, + verdictLevel: verdictLevel + }); + } + }; + + methods.init = function (settings) { + this.each(function (idx, el) { + // Make it deep extend (first param) so it extends too the + // rules and other inside objects + var clonedDefaults = $.extend(true, {}, defaultOptions), + localOptions = $.extend(true, clonedDefaults, settings), + $el = $(el); + + localOptions.instances = {}; + $el.data("pwstrength-bootstrap", localOptions); + $el.on("keyup", onKeyUp); + $el.on("change", onKeyUp); + $el.on("paste", onKeyUp); + + ui.initUI(localOptions, $el); + if ($.trim($el.val())) { // Not empty, calculate the strength + $el.trigger("keyup"); + } + + if ($.isFunction(localOptions.common.onLoad)) { + localOptions.common.onLoad(); + } + }); + + return this; + }; + + methods.destroy = function () { + this.each(function (idx, el) { + var $el = $(el), + options = $el.data("pwstrength-bootstrap"), + elements = ui.getUIElements(options, $el); + elements.$progressbar.remove(); + elements.$verdict.remove(); + elements.$errors.remove(); + $el.removeData("pwstrength-bootstrap"); + }); + }; + + methods.forceUpdate = function () { + this.each(function (idx, el) { + var event = { target: el }; + onKeyUp(event); + }); + }; + + methods.addRule = function (name, method, score, active) { + this.each(function (idx, el) { + var options = $(el).data("pwstrength-bootstrap"); + + options.rules.activated[name] = active; + options.rules.scores[name] = score; + options.rules.extra[name] = method; + }); + }; + + applyToAll = function (rule, prop, value) { + this.each(function (idx, el) { + $(el).data("pwstrength-bootstrap").rules[prop][rule] = value; + }); + }; + + methods.changeScore = function (rule, score) { + applyToAll.call(this, rule, "scores", score); + }; + + methods.ruleActive = function (rule, active) { + applyToAll.call(this, rule, "activated", active); + }; + + $.fn.pwstrength = function (method) { + var result; + + if (methods[method]) { + result = methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); + } else if (typeof method === "object" || !method) { + result = methods.init.apply(this, arguments); + } else { + $.error("Method " + method + " does not exist on jQuery.pwstrength-bootstrap"); + } + + return result; + }; +}(jQuery, methods)); +}(jQuery)); \ No newline at end of file diff --git a/media/jui/js/pwstrength-bootstrap-1.2.9.min.js b/media/jui/js/pwstrength-bootstrap-1.2.9.min.js new file mode 100755 index 0000000000000..f4f67019df021 --- /dev/null +++ b/media/jui/js/pwstrength-bootstrap-1.2.9.min.js @@ -0,0 +1,3 @@ +/* pwstrength-bootstrap 2015-10-27 - GPLv3 & MIT License */ + +!function(a){var b={};try{if(!a&&module&&module.exports){var a=require("jquery"),c=require("jsdom").jsdom;a=a(c().parentWindow)}}catch(d){}!function(a,b){"use strict";var c={};b.forbiddenSequences=["0123456789","abcdefghijklmnopqrstuvwxyz","qwertyuiop","asdfghjkl","zxcvbnm","!@#$%^&*()_+"],c.wordNotEmail=function(a,b,c){return b.match(/^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i)?c:0},c.wordLength=function(a,b,c){var d=b.length,e=Math.pow(d,a.rules.raisePower);return d2&&(a.each(b.forbiddenSequences,function(b,c){if(!g){var e=[c,c.split("").reverse().join("")];a.each(e,function(a,b){for(f=0;f-1&&(g=!0)})}}),g)?e:0},c.wordLowercase=function(a,b,c){return b.match(/[a-z]/)&&c},c.wordUppercase=function(a,b,c){return b.match(/[A-Z]/)&&c},c.wordOneNumber=function(a,b,c){return b.match(/\d+/)&&c},c.wordThreeNumbers=function(a,b,c){return b.match(/(.*[0-9].*[0-9].*[0-9])/)&&c},c.wordOneSpecialChar=function(a,b,c){return b.match(/[!,@,#,$,%,\^,&,*,?,_,~]/)&&c},c.wordTwoSpecialChar=function(a,b,c){return b.match(/(.*[!,@,#,$,%,\^,&,*,?,_,~].*[!,@,#,$,%,\^,&,*,?,_,~])/)&&c},c.wordUpperLowerCombo=function(a,b,c){return b.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)&&c},c.wordLetterNumberCombo=function(a,b,c){return b.match(/([a-zA-Z])/)&&b.match(/([0-9])/)&&c},c.wordLetterNumberCharCombo=function(a,b,c){return b.match(/([a-zA-Z0-9].*[!,@,#,$,%,\^,&,*,?,_,~])|([!,@,#,$,%,\^,&,*,?,_,~].*[a-zA-Z0-9])/)&&c},b.validation=c,b.executeRules=function(c,d){var e=0;return a.each(c.rules.activated,function(f,g){if(g){var h,i,j=c.rules.scores[f],k=b.validation[f];a.isFunction(k)||(k=c.rules.extra[f]),a.isFunction(k)&&(h=k(c,d,j),h&&(e+=h),(0>h||!a.isNumeric(h)&&!h)&&(i=c.ui.spanError(c,f),i.length>0&&c.instances.errors.push(i)))}}),e}}(a,b);try{module&&module.exports&&(module.exports=b)}catch(d){}var e={};e.common={},e.common.minChar=6,e.common.usernameField="#username",e.common.userInputs=[],e.common.onLoad=void 0,e.common.onKeyUp=void 0,e.common.zxcvbn=!1,e.common.zxcvbnTerms=[],e.common.debug=!1,e.rules={},e.rules.extra={},e.rules.scores={wordNotEmail:-100,wordLength:-50,wordSimilarToUsername:-100,wordSequences:-20,wordTwoCharacterClasses:2,wordRepetitions:-25,wordLowercase:1,wordUppercase:3,wordOneNumber:3,wordThreeNumbers:5,wordOneSpecialChar:3,wordTwoSpecialChar:5,wordUpperLowerCombo:2,wordLetterNumberCombo:2,wordLetterNumberCharCombo:2},e.rules.activated={wordNotEmail:!0,wordLength:!0,wordSimilarToUsername:!0,wordSequences:!0,wordTwoCharacterClasses:!1,wordRepetitions:!1,wordLowercase:!0,wordUppercase:!0,wordOneNumber:!0,wordThreeNumbers:!0,wordOneSpecialChar:!0,wordTwoSpecialChar:!0,wordUpperLowerCombo:!0,wordLetterNumberCombo:!0,wordLetterNumberCharCombo:!0},e.rules.raisePower=1.4,e.ui={},e.ui.bootstrap2=!1,e.ui.bootstrap4=!1,e.ui.colorClasses=["danger","warning","success"],e.ui.showProgressBar=!0,e.ui.showPopover=!1,e.ui.popoverPlacement="bottom",e.ui.showStatus=!1,e.ui.spanError=function(a,b){"use strict";var c=a.ui.errorMessages[b];return c?''+c+"":""},e.ui.popoverError=function(b){"use strict";var c="
    Errors:
      ";return a.each(b,function(a,b){c+="
    • "+b+"
    • "}),c+="
    "},e.ui.errorMessages={wordLength:"Your password is too short",wordNotEmail:"Do not use your email as your password",wordSimilarToUsername:"Your password cannot contain your username",wordTwoCharacterClasses:"Use different character classes",wordRepetitions:"Too many repetitions",wordSequences:"Your password contains sequences"},e.ui.verdicts=["Weak","Normal","Medium","Strong","Very Strong"],e.ui.showVerdicts=!0,e.ui.showVerdictsInsideProgressBar=!1,e.ui.useVerdictCssClass=!1,e.ui.showErrors=!1,e.ui.container=void 0,e.ui.viewports={progress:void 0,verdict:void 0,errors:void 0},e.ui.scores=[14,26,38,50];var f={};!function(a,b){"use strict";var c=["error","warning","success"];b.getContainer=function(b,c){var d;return d=a(b.ui.container),d&&1===d.length||(d=c.parent()),d},b.findElement=function(a,b,c){return b?a.find(b).find(c):a.find(c)},b.getUIElements=function(a,c){var d,e,f;return a.instances.viewports?a.instances.viewports:(d=b.getContainer(a,c),f={},e=a.ui.bootstrap4?"progress.progress":"div.progress",f.$progressbar=b.findElement(d,a.ui.viewports.progress,e),a.ui.showVerdictsInsideProgressBar&&(f.$verdict=f.$progressbar.find("span.password-verdict")),a.ui.showPopover||(a.ui.showVerdictsInsideProgressBar||(f.$verdict=b.findElement(d,a.ui.viewports.verdict,"span.password-verdict")),f.$errors=b.findElement(d,a.ui.viewports.errors,"ul.error-list")),a.instances.viewports=f,f)},b.initProgressBar=function(c,d){var e=b.getContainer(c,d),f="
    ",c.ui.bootstrap4&&(f=""),c.ui.showVerdictsInsideProgressBar&&(f+=""),f+=c.ui.bootstrap4?"":"
    ",c.ui.viewports.progress?e.find(c.ui.viewports.progress).append(f):a(f).insertAfter(d)},b.initHelper=function(c,d,e,f){var g=b.getContainer(c,d);f?g.find(f).append(e):a(e).insertAfter(d)},b.initVerdict=function(a,c){b.initHelper(a,c,"",a.ui.viewports.verdict)},b.initErrorList=function(a,c){b.initHelper(a,c,"
      ",a.ui.viewports.errors)},b.initPopover=function(a,b){b.popover("destroy"),b.popover({html:!0,placement:a.ui.popoverPlacement,trigger:"manual",content:" "})},b.initUI=function(a,c){a.ui.showPopover?b.initPopover(a,c):(a.ui.showErrors&&b.initErrorList(a,c),a.ui.showVerdicts&&!a.ui.showVerdictsInsideProgressBar&&b.initVerdict(a,c)),a.ui.showProgressBar&&b.initProgressBar(a,c)},b.updateProgressBar=function(c,d,e,f){var g=b.getUIElements(c,d).$progressbar,h=g.find(".progress-bar"),i="progress-";c.ui.bootstrap2&&(h=g.find(".bar"),i=""),a.each(c.ui.colorClasses,function(a,b){c.ui.bootstrap4?g.removeClass(i+b):h.removeClass(i+"bar-"+b)}),c.ui.bootstrap4?(g.addClass(i+c.ui.colorClasses[e]),g.val(f)):(h.addClass(i+"bar-"+c.ui.colorClasses[e]),h.css("width",f+"%"))},b.updateVerdict=function(a,c,d,e){var f=b.getUIElements(a,c).$verdict;f.removeClass(a.ui.colorClasses.join(" ")),d>-1&&f.addClass(a.ui.colorClasses[d]),f.html(e)},b.updateErrors=function(c,d){var e=b.getUIElements(c,d).$errors,f="";a.each(c.instances.errors,function(a,b){f+="
    • "+b+"
    • "}),e.html(f)},b.updatePopover=function(a,b,c){var d=b.data("bs.popover"),e="",f=!0;return a.ui.showVerdicts&&!a.ui.showVerdictsInsideProgressBar&&c.length>0&&(e="
      "+c+"
      ",f=!1),a.ui.showErrors&&(a.instances.errors.length>0&&(f=!1),e+=a.ui.popoverError(a.instances.errors)),f?void b.popover("hide"):(a.ui.bootstrap2&&(d=b.data("popover")),void(d.$arrow&&d.$arrow.parents("body").length>0?b.find("+ .popover .popover-content").html(e):(d.options.content=e,b.popover("show"))))},b.updateFieldStatus=function(b,d,e){var f=b.ui.bootstrap2?".control-group":".form-group",g=d.parents(f).first();a.each(c,function(a,c){b.ui.bootstrap2||(c="has-"+c),g.removeClass(c)}),e=c[e],b.ui.bootstrap2||(e="has-"+e),g.addClass(e)},b.percentage=function(a,b){var c=Math.floor(100*a/b);return c=0>=c?1:c,c=c>100?100:c},b.getVerdictAndCssClass=function(a,b){var c,d,e;return 0>=b?(c=0,e=-1,d=a.ui.verdicts[0]):b Date: Sun, 8 May 2016 13:34:09 +0200 Subject: [PATCH 20/22] Updated installation language files. --- installation/language/tr-TR/tr-TR.ini | 17 ++++++++++------- installation/language/tr-TR/tr-TR.xml | 4 ++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/installation/language/tr-TR/tr-TR.ini b/installation/language/tr-TR/tr-TR.ini index 628aed1207bd6..010fc90e37ec5 100644 --- a/installation/language/tr-TR/tr-TR.ini +++ b/installation/language/tr-TR/tr-TR.ini @@ -30,16 +30,16 @@ INSTL_PRECHECK_ACTUAL="Durum" INSTL_DATABASE="Veritabanı Yapılandırması" INSTL_DATABASE_HOST_DESC="Genelde "localhost"" INSTL_DATABASE_HOST_LABEL="Sunucu Adı" -INSTL_DATABASE_NAME_DESC="Bazı sağlayıcılar her site için sadece belirli bir veritabanı adı kulanılmasına izin verir. Bu durumda farklı Joomla! siteleri için tablo ön eki kullanılır." +INSTL_DATABASE_NAME_DESC="Bazı sağlayıcılar her site için sadece belirli bir veritabanı adı kulanılmasına izin verir. Bu durumda farklı Joomla! siteleri için tablo öneki kullanılır." INSTL_DATABASE_NAME_LABEL="Veritabanı Adı" INSTL_DATABASE_NO_SCHEMA="Bu veritabanı türü için hiçbir veritabanı şeması bulunmuyor." -INSTL_DATABASE_OLD_PROCESS_DESC="Önceki Joomla! kurulumundan kalan yedek tablolar değiştirilecek." +INSTL_DATABASE_OLD_PROCESS_DESC="Aynı "Tablo Öneki"ne sahip önceki Joomla! kurulumuna ait tabloları "Yedekle" ya da "Kaldır"" INSTL_DATABASE_OLD_PROCESS_LABEL="Eski Veritabanı İşlemi" INSTL_DATABASE_PASSWORD_DESC="Site güvenliği için mysql hesabınızla bir parola kullanımı gerekmektedir." INSTL_DATABASE_PASSWORD_LABEL="Parola" -INSTL_DATABASE_PREFIX_DESC="Bir tablo ön ekini seçin ya da rasgele oluşturmayı kullanın. İdeali üç ya da dört karakter uzunluğundadır, yalnızca alfanümerik (a-z, 0-9) karakterler içerir ve MUTLAKA alt çizgi ile bitmelidir." -INSTL_DATABASE_PREFIX_LABEL="Tablo Ön Eki" -INSTL_DATABASE_PREFIX_MSG="Tablo ön eki bir harf ile başlamalı, tercihe bağlı alfanümerik karakterlerle devam edip alt çizgi ile bitmelidir. Bu ön ek seçiminin diğer tablolarda kullanılmadığından emin olun." +INSTL_DATABASE_PREFIX_DESC="Bir tablo önekini seçin ya da rasgele oluşturmayı kullanın. İdeali üç ya da dört karakter uzunluğundadır, yalnızca alfanümerik (a-z, 0-9) karakterler içerir ve MUTLAKA alt çizgi ile bitmelidir." +INSTL_DATABASE_PREFIX_LABEL="Tablo Öneki" +INSTL_DATABASE_PREFIX_MSG="Tablo öneki bir harf ile başlamalı, tercihe bağlı alfanümerik karakterlerle devam edip alt çizgi ile bitmelidir. Bu önek seçiminin diğer tablolarda kullanılmadığından emin olun." INSTL_DATABASE_TYPE_DESC="Muhtemelen "MySQLi"" INSTL_DATABASE_TYPE_LABEL="Veritabanı Türü" INSTL_DATABASE_USER_DESC="Bazen "_QQ_"root"_QQ_" ya da sağlayıcınız tarafından verilen bir kullanıcı adı olabilir." @@ -136,6 +136,7 @@ INSTL_COMPLETE_INSTALL_LANGUAGES="Ek Adımlar: Dilleri Kur" ;Dil görünümü INSTL_LANGUAGES="Dil Paketlerini Kur" INSTL_LANGUAGES_COLUMN_HEADER_LANGUAGE="Dil" +INSTL_LANGUAGES_COLUMN_HEADER_LANGUAGE_TAG="Dil Etiketi" INSTL_LANGUAGES_COLUMN_HEADER_VERSION="Sürüm" INSTL_LANGUAGES_DESC="Joomla arayüzü birkaç farklı dil imkanı sunmaktadır. Kutucukları tıklatarak tercih ettiğiniz dilleri seçiniz ve Sonraki düğmesine tıklatarak kurunuz.
      Not: bu işlemde her bir dil için yaklaşık 5 saniye indirme ve kurma süresi vardır. Lütfen zaman aşımı olmaması için üç dilden fazla seçim yapmayınız." INSTL_LANGUAGES_MESSAGE_PLEASE_WAIT="Bu işlemde her bir dilin kurulumu için yaklaşık on saniye süre gerekir.
      Lütfen biz dilleri indirip kurarken bekleyiniz..." @@ -192,8 +193,8 @@ INSTL_DATABASE_ERROR_CREATE="%s veritabanı oluşturulmaya çalışılırken bir INSTL_DATABASE_ERROR_DELETE="Veritabanı silinirken bazı hatalar meydana geldi." INSTL_DATABASE_FIELD_VALUE_REMOVE="Kaldır" INSTL_DATABASE_FIELD_VALUE_BACKUP="Yedekle" -INSTL_DATABASE_FIX_LOWERCASE="PostgreSQL için tablo ön eki küçük harflerden oluşmalıdır." -INSTL_DATABASE_FIX_TOO_LONG="MySQL tablo ön eki en fazla 15 karakter olabilir." +INSTL_DATABASE_FIX_LOWERCASE="PostgreSQL için tablo öneki küçük harflerden oluşmalıdır." +INSTL_DATABASE_FIX_TOO_LONG="MySQL tablo öneki en fazla 15 karakter olabilir." INSTL_DATABASE_INVALID_DB_DETAILS="Girilen veritabanı ayrıntıları hatalı ve/veya boş." INSTL_DATABASE_INVALID_MYSQL_VERSION="Kuruluma devam etmek için MySQL 5.0.4 veya daha üstü bir sürüme ihtiyacınız var. Sizin sürümünüz: %s" INSTL_DATABASE_INVALID_MYSQLI_VERSION="Kuruluma devam etmek için MySQL 5.0.4 veya daha üstü bir sürüme ihtiyacınız var. Sizin sürümünüz: %s" @@ -249,8 +250,10 @@ INSTL_MAGIC_QUOTES_GPC="Sihirli Tırnaklar GPC" INSTL_MAGIC_QUOTES_RUNTIME="Sihirli Tırnaklar Çalışma Anı" INSTL_MB_LANGUAGE_IS_DEFAULT="MB Dili Varsayılan" INSTL_MB_STRING_OVERLOAD_OFF="MB Dizisi Aşırı Yükleme Kapalı" +INSTL_MCRYPT_SUPPORT_AVAILABLE="Mcrypt Desteği" INSTL_NOTICEMBLANGNOTDEFAULT="PHP mbstring dili nötr ayarlanmamış. Bu, yerel .htaccess dosyasında php_value mbstring.language neutral girilerek ayarlanabilir." INSTL_NOTICEMBSTRINGOVERLOAD="PHP mbstring özelliği aşırı yükleme ayarlı. Bu, yerel .htaccess dosyasında php_value mbstring.func_overload 0 girilerek kapatılabilir." +INSTL_NOTICEMCRYPTNOTAVAILABLE="Uyarı! PHP mcrypt eklentisi kurulmuş ya da etkinleştirilmiş olmalıdır. Bu olmadan, bazı Joomla özellikleri uygun olmaz." INSTL_NOTICEYOUCANSTILLINSTALL="
      Aşağıda görüntülenen yapılandırma ayarları ile kurulumu tamamlayabilirsiniz. Kodları elle yükleyeceksiniz. Metin alanına tıklayarak tüm kodları seçin ve yeni bir metin belgesinin içine yapıştırın. Dosya adını 'configuration.php' yaparak sitenin kök dizinine yükleyin." INSTL_OUTPUT_BUFFERING="Çıktı Tamponlama" INSTL_PARSE_INI_FILE_AVAILABLE="INI İnceleyici Desteği" diff --git a/installation/language/tr-TR/tr-TR.xml b/installation/language/tr-TR/tr-TR.xml index 5da577d5f1f39..8597fb590c821 100644 --- a/installation/language/tr-TR/tr-TR.xml +++ b/installation/language/tr-TR/tr-TR.xml @@ -3,8 +3,8 @@ version="3.6" client="installation"> Türkçe (Türkiye) - 3.5.0 - March 2016 + 3.6.0 + May 2016 Ümit Kenan Gönüllü Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt From 9e71b85a1347b1d9dea84d5e5d77511b3033a5ab Mon Sep 17 00:00:00 2001 From: RolandD Date: Sun, 8 May 2016 12:37:03 +0100 Subject: [PATCH 21/22] Prevent captcha field from setup in Joomla Admin (#8657) * Prevent captcha field from setup in Joomla Admin * Fixed error notice in backend on loading recaptcha * Clean up notices * Remove obsolete check. * Check if we are in administrator side, test is not needed there * Make the test work --- libraries/cms/form/field/captcha.php | 9 ++++++++- libraries/cms/form/rule/captcha.php | 8 +++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/libraries/cms/form/field/captcha.php b/libraries/cms/form/field/captcha.php index 04a0ce55c89f7..2f54c7a2820e9 100644 --- a/libraries/cms/form/field/captcha.php +++ b/libraries/cms/form/field/captcha.php @@ -86,9 +86,16 @@ public function setup(SimpleXMLElement $element, $value, $group = null) { $result = parent::setup($element, $value, $group); + $default = JFactory::getConfig()->get('captcha'); + + if (JFactory::getApplication()->isSite()) + { + $default = JFactory::getApplication()->getParams()->get('captcha', JFactory::getConfig()->get('captcha')); + } + $plugin = $this->element['plugin'] ? (string) $this->element['plugin'] : - JFactory::getApplication()->getParams()->get('captcha', JFactory::getConfig()->get('captcha')); + $default; $this->plugin = $plugin; diff --git a/libraries/cms/form/rule/captcha.php b/libraries/cms/form/rule/captcha.php index 32b9b00c3510d..6a0d09992bacc 100644 --- a/libraries/cms/form/rule/captcha.php +++ b/libraries/cms/form/rule/captcha.php @@ -35,7 +35,13 @@ class JFormRuleCaptcha extends JFormRule */ public function test(SimpleXMLElement $element, $value, $group = null, Registry $input = null, JForm $form = null) { - $plugin = $element['plugin'] ?: JFactory::getApplication()->getParams()->get('captcha', JFactory::getConfig()->get('captcha', 0)); + $plugin = JFactory::getConfig()->get('captcha'); + + if (JFactory::getApplication()->isSite()) + { + $plugin = JFactory::getApplication()->getParams()->get('captcha', JFactory::getConfig()->get('captcha')); + } + $namespace = $element['namespace'] ?: $form->getName(); // Use 0 for none From c14cd557b6c1ea3c1c8afe1690b5a8332b375338 Mon Sep 17 00:00:00 2001 From: George Wilson Date: Sun, 8 May 2016 12:42:38 +0100 Subject: [PATCH 22/22] Revert "Dgt41 Password strength indication - Fixes #8513" (#10310) --- .../com_users/models/forms/user.xml | 2 - administrator/language/en-GB/en-GB.ini | 11 - .../templates/hathor/css/template.css | 4 - .../templates/hathor/less/template.less | 6 - .../templates/isis/css/template-rtl.css | 7 - administrator/templates/isis/css/template.css | 4 - .../templates/isis/less/template.less | 7 - installation/form/field/password.php | 38 - installation/language/en-GB/en-GB.ini | 14 - installation/model/forms/site.xml | 6 +- installation/template/css/template.css | 19 +- language/en-GB/en-GB.ini | 11 - libraries/joomla/form/fields/password.php | 87 +-- media/jui/js/pwstrength-bootstrap-1.2.9.js | 708 ------------------ .../jui/js/pwstrength-bootstrap-1.2.9.min.js | 3 - 15 files changed, 25 insertions(+), 902 deletions(-) delete mode 100644 installation/form/field/password.php delete mode 100755 media/jui/js/pwstrength-bootstrap-1.2.9.js delete mode 100755 media/jui/js/pwstrength-bootstrap-1.2.9.min.js diff --git a/administrator/components/com_users/models/forms/user.xml b/administrator/components/com_users/models/forms/user.xml index a6364e6cd7059..61cbbcf5dd7a0 100644 --- a/administrator/components/com_users/models/forms/user.xml +++ b/administrator/components/com_users/models/forms/user.xml @@ -23,8 +23,6 @@ validate="password" label="JGLOBAL_PASSWORD" size="30" - strengthmeter="true" - username="username" /> minLength = 4; - $return = parent::getInput(); - - return $return; - } -} diff --git a/installation/language/en-GB/en-GB.ini b/installation/language/en-GB/en-GB.ini index 05f0c9d895307..6d406a05aea39 100644 --- a/installation/language/en-GB/en-GB.ini +++ b/installation/language/en-GB/en-GB.ini @@ -323,17 +323,3 @@ POSTGRESQL="PostgreSQL" SQLAZURE="Microsoft SQL Azure" SQLITE="SQLite" SQLSRV="Microsoft SQL Server" - - -; Password strength -JFIELD_PASSWORD_INDICATE_CHARCLASS="Use different character classes" -JFIELD_PASSWORD_INDICATE_LENGTH="Your password is too short" -JFIELD_PASSWORD_INDICATE_NOEMAIL="Do not use your email as your password" -JFIELD_PASSWORD_INDICATE_NORMAL="Normal" -JFIELD_PASSWORD_INDICATE_MEDIUM="Medium" -JFIELD_PASSWORD_INDICATE_STRONG="Strong" -JFIELD_PASSWORD_INDICATE_VSTRONG="Very strong" -JFIELD_PASSWORD_INDICATE_USERNAME="Your password should not contain your username" -JFIELD_PASSWORD_INDICATE_WEAK="Weak" -JFIELD_PASSWORD_INDICATE_WORDREP="Too many repetitions" -JFIELD_PASSWORD_INDICATE_WORDSEQ="Your password contains sequences" \ No newline at end of file diff --git a/installation/model/forms/site.xml b/installation/model/forms/site.xml index f6e904f7c7a9a..7bc292699bb98 100644 --- a/installation/model/forms/site.xml +++ b/installation/model/forms/site.xml @@ -24,16 +24,14 @@ required="true" /> - - $name; } @@ -109,7 +91,6 @@ public function __set($name, $value) { case 'maxLength': case 'threshold': - case 'username': $this->$name = $value; break; @@ -144,8 +125,9 @@ public function setup(SimpleXMLElement $element, $value, $group = null) { $this->maxLength = $this->element['maxlength'] ? (int) $this->element['maxlength'] : 99; $this->threshold = $this->element['threshold'] ? (int) $this->element['threshold'] : 66; - $meter = (string) $this->element['strengthmeter']; - $this->meter = ($meter == 'true' || $meter == 'on' || $meter == '1'); + + $meter = (string) $this->element['strengthmeter']; + $this->meter = ($meter == 'true' || $meter == 'on' || $meter == '1'); } return $return; @@ -164,56 +146,31 @@ protected function getInput() $hint = $this->translateHint ? JText::_($this->hint) : $this->hint; // Initialize some field attributes. - $size = !empty($this->size) ? ' size="' . $this->size . '"' : ''; - $maxLength = !empty($this->maxLength) ? ' maxlength="' . $this->maxLength . '"' : ''; - $class = !empty($this->class) ? ' class="' . $this->class . '"' : ''; - $readonly = $this->readonly ? ' readonly' : ''; - $disabled = $this->disabled ? ' disabled' : ''; - $required = $this->required ? ' required aria-required="true"' : ''; - $hint = $hint ? ' placeholder="' . $hint . '"' : ''; - $autocomplete = !$this->autocomplete ? ' autocomplete="off"' : ''; - $autofocus = $this->autofocus ? ' autofocus' : ''; - $this->username = $this->element['username'] ? 'options.common.usernameField = "#jform_' . $this->element['username'] . '";' : ''; - - if (!$this->minLength) - { - $this->minLength = (int) JComponentHelper::getParams('com_users')->get('minimum_length', 4); - } + $size = !empty($this->size) ? ' size="' . $this->size . '"' : ''; + $maxLength = !empty($this->maxLength) ? ' maxlength="' . $this->maxLength . '"' : ''; + $class = !empty($this->class) ? ' class="' . $this->class . '"' : ''; + $readonly = $this->readonly ? ' readonly' : ''; + $disabled = $this->disabled ? ' disabled' : ''; + $required = $this->required ? ' required aria-required="true"' : ''; + $hint = $hint ? ' placeholder="' . $hint . '"' : ''; + $autocomplete = !$this->autocomplete ? ' autocomplete="off"' : ''; + $autofocus = $this->autofocus ? ' autofocus' : ''; if ($this->meter) { - JHtml::_('script', 'jui/pwstrength-bootstrap-1.2.9.min.js', false, true, false, false, true); + JHtml::_('script', 'system/passwordstrength.js', true, true); + $script = 'new Form.PasswordStrength("' . $this->id . '", + { + threshold: ' . $this->threshold . ', + onUpdate: function(element, strength, threshold) { + element.set("data-passwordstrength", strength); + } + } + );'; // Load script on document load. JFactory::getDocument()->addScriptDeclaration( - " - jQuery(document).ready(function($){ - 'use strict'; - var options = {}; - options.common = {}; - " . $this->username . " - options.common.minChar = " . $this->minLength . " - options.ui = { - bootstrap2: true, - showErrors: true, - }; - options.ui.verdicts = [ - '" . JText::_('JFIELD_PASSWORD_INDICATE_WEAK') . "', - '" . JText::_('JFIELD_PASSWORD_INDICATE_NORMAL') . "', - '" . JText::_('JFIELD_PASSWORD_INDICATE_MEDIUM') . "', - '" . JText::_('JFIELD_PASSWORD_INDICATE_STRONG') . "', - '" . JText::_('JFIELD_PASSWORD_INDICATE_VSTRONG') . "']; - options.ui.errorMessages = { - wordLength: '" . JText::_('JFIELD_PASSWORD_INDICATE_LENGTH') . "', - wordNotEmail: '" . JText::_('JFIELD_PASSWORD_INDICATE_NOEMAIL') . "', - wordSimilarToUsername: '" . JText::_('JFIELD_PASSWORD_INDICATE_USERNAME') . "', - wordTwoCharacterClasses: '" . JText::_('JFIELD_PASSWORD_INDICATE_CHARCLASS') . "', - wordRepetitions: '" . JText::_('JFIELD_PASSWORD_INDICATE_WORDREP') . "', - wordSequences: '" . JText::_('JFIELD_PASSWORD_INDICATE_WORDSEQ') . "' - }; - jQuery('#" . $this->id . "').pwstrength(options); - }); - " + "jQuery(document).ready(function(){" . $script . "});" ); } diff --git a/media/jui/js/pwstrength-bootstrap-1.2.9.js b/media/jui/js/pwstrength-bootstrap-1.2.9.js deleted file mode 100755 index 1fb2b9b60f3ce..0000000000000 --- a/media/jui/js/pwstrength-bootstrap-1.2.9.js +++ /dev/null @@ -1,708 +0,0 @@ -/*! -* jQuery Password Strength plugin for Twitter Bootstrap -* -* Copyright (c) 2008-2013 Tane Piper -* Copyright (c) 2013 Alejandro Blanco -* Dual licensed under the MIT and GPL licenses. -*/ - -(function (jQuery) { -// Source: src/rules.js - - - - -var rulesEngine = {}; - -try { - if (!jQuery && module && module.exports) { - var jQuery = require("jquery"), - jsdom = require("jsdom").jsdom; - jQuery = jQuery(jsdom().parentWindow); - } -} catch (ignore) {} - -(function ($, rulesEngine) { - "use strict"; - var validation = {}; - - rulesEngine.forbiddenSequences = [ - "0123456789", "abcdefghijklmnopqrstuvwxyz", "qwertyuiop", "asdfghjkl", - "zxcvbnm", "!@#$%^&*()_+" - ]; - - validation.wordNotEmail = function (options, word, score) { - if (word.match(/^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i)) { - return score; - } - return 0; - }; - - validation.wordLength = function (options, word, score) { - var wordlen = word.length, - lenScore = Math.pow(wordlen, options.rules.raisePower); - if (wordlen < options.common.minChar) { - lenScore = (lenScore + score); - } - return lenScore; - }; - - validation.wordSimilarToUsername = function (options, word, score) { - var username = $(options.common.usernameField).val(); - if (username && word.toLowerCase().match(username.replace(/[\-\[\]\/\{\}\(\)\*\+\=\?\:\.\\\^\$\|\!\,]/g, "\\$&").toLowerCase())) { - return score; - } - return 0; - }; - - validation.wordTwoCharacterClasses = function (options, word, score) { - if (word.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/) || - (word.match(/([a-zA-Z])/) && word.match(/([0-9])/)) || - (word.match(/(.[!,@,#,$,%,\^,&,*,?,_,~])/) && word.match(/[a-zA-Z0-9_]/))) { - return score; - } - return 0; - }; - - validation.wordRepetitions = function (options, word, score) { - if (word.match(/(.)\1\1/)) { return score; } - return 0; - }; - - validation.wordSequences = function (options, word, score) { - var found = false, - j; - if (word.length > 2) { - $.each(rulesEngine.forbiddenSequences, function (idx, seq) { - if (found) { return; } - var sequences = [seq, seq.split('').reverse().join('')]; - $.each(sequences, function (idx, sequence) { - for (j = 0; j < (word.length - 2); j += 1) { // iterate the word trough a sliding window of size 3: - if (sequence.indexOf(word.toLowerCase().substring(j, j + 3)) > -1) { - found = true; - } - } - }); - }); - if (found) { return score; } - } - return 0; - }; - - validation.wordLowercase = function (options, word, score) { - return word.match(/[a-z]/) && score; - }; - - validation.wordUppercase = function (options, word, score) { - return word.match(/[A-Z]/) && score; - }; - - validation.wordOneNumber = function (options, word, score) { - return word.match(/\d+/) && score; - }; - - validation.wordThreeNumbers = function (options, word, score) { - return word.match(/(.*[0-9].*[0-9].*[0-9])/) && score; - }; - - validation.wordOneSpecialChar = function (options, word, score) { - return word.match(/[!,@,#,$,%,\^,&,*,?,_,~]/) && score; - }; - - validation.wordTwoSpecialChar = function (options, word, score) { - return word.match(/(.*[!,@,#,$,%,\^,&,*,?,_,~].*[!,@,#,$,%,\^,&,*,?,_,~])/) && score; - }; - - validation.wordUpperLowerCombo = function (options, word, score) { - return word.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/) && score; - }; - - validation.wordLetterNumberCombo = function (options, word, score) { - return word.match(/([a-zA-Z])/) && word.match(/([0-9])/) && score; - }; - - validation.wordLetterNumberCharCombo = function (options, word, score) { - return word.match(/([a-zA-Z0-9].*[!,@,#,$,%,\^,&,*,?,_,~])|([!,@,#,$,%,\^,&,*,?,_,~].*[a-zA-Z0-9])/) && score; - }; - - rulesEngine.validation = validation; - - rulesEngine.executeRules = function (options, word) { - var totalScore = 0; - - $.each(options.rules.activated, function (rule, active) { - if (active) { - var score = options.rules.scores[rule], - funct = rulesEngine.validation[rule], - result, - errorMessage; - - if (!$.isFunction(funct)) { - funct = options.rules.extra[rule]; - } - - if ($.isFunction(funct)) { - result = funct(options, word, score); - if (result) { - totalScore += result; - } - if (result < 0 || (!$.isNumeric(result) && !result)) { - errorMessage = options.ui.spanError(options, rule); - if (errorMessage.length > 0) { - options.instances.errors.push(errorMessage); - } - } - } - } - }); - - return totalScore; - }; -}(jQuery, rulesEngine)); - -try { - if (module && module.exports) { - module.exports = rulesEngine; - } -} catch (ignore) {} - -// Source: src/options.js - - - - -var defaultOptions = {}; - -defaultOptions.common = {}; -defaultOptions.common.minChar = 6; -defaultOptions.common.usernameField = "#username"; -defaultOptions.common.userInputs = [ - // Selectors for input fields with user input -]; -defaultOptions.common.onLoad = undefined; -defaultOptions.common.onKeyUp = undefined; -defaultOptions.common.zxcvbn = false; -defaultOptions.common.zxcvbnTerms = [ - // List of disrecommended words -]; -defaultOptions.common.debug = false; - -defaultOptions.rules = {}; -defaultOptions.rules.extra = {}; -defaultOptions.rules.scores = { - wordNotEmail: -100, - wordLength: -50, - wordSimilarToUsername: -100, - wordSequences: -20, - wordTwoCharacterClasses: 2, - wordRepetitions: -25, - wordLowercase: 1, - wordUppercase: 3, - wordOneNumber: 3, - wordThreeNumbers: 5, - wordOneSpecialChar: 3, - wordTwoSpecialChar: 5, - wordUpperLowerCombo: 2, - wordLetterNumberCombo: 2, - wordLetterNumberCharCombo: 2 -}; -defaultOptions.rules.activated = { - wordNotEmail: true, - wordLength: true, - wordSimilarToUsername: true, - wordSequences: true, - wordTwoCharacterClasses: false, - wordRepetitions: false, - wordLowercase: true, - wordUppercase: true, - wordOneNumber: true, - wordThreeNumbers: true, - wordOneSpecialChar: true, - wordTwoSpecialChar: true, - wordUpperLowerCombo: true, - wordLetterNumberCombo: true, - wordLetterNumberCharCombo: true -}; -defaultOptions.rules.raisePower = 1.4; - -defaultOptions.ui = {}; -defaultOptions.ui.bootstrap2 = false; -defaultOptions.ui.bootstrap4 = false; -defaultOptions.ui.colorClasses = ["danger", "warning", "success"]; -defaultOptions.ui.showProgressBar = true; -defaultOptions.ui.showPopover = false; -defaultOptions.ui.popoverPlacement = "bottom"; -defaultOptions.ui.showStatus = false; -defaultOptions.ui.spanError = function (options, key) { - "use strict"; - var text = options.ui.errorMessages[key]; - if (!text) { return ''; } - return '' + text + ''; -}; -defaultOptions.ui.popoverError = function (errors) { - "use strict"; - var message = "
      Errors:
        "; - - jQuery.each(errors, function (idx, err) { - message += "
      • " + err + "
      • "; - }); - message += "
      "; - return message; -}; -defaultOptions.ui.errorMessages = { - wordLength: "Your password is too short", - wordNotEmail: "Do not use your email as your password", - wordSimilarToUsername: "Your password cannot contain your username", - wordTwoCharacterClasses: "Use different character classes", - wordRepetitions: "Too many repetitions", - wordSequences: "Your password contains sequences" -}; -defaultOptions.ui.verdicts = ["Weak", "Normal", "Medium", "Strong", "Very Strong"]; -defaultOptions.ui.showVerdicts = true; -defaultOptions.ui.showVerdictsInsideProgressBar = false; -defaultOptions.ui.useVerdictCssClass = false; -defaultOptions.ui.showErrors = false; -defaultOptions.ui.container = undefined; -defaultOptions.ui.viewports = { - progress: undefined, - verdict: undefined, - errors: undefined -}; -defaultOptions.ui.scores = [14, 26, 38, 50]; - -// Source: src/ui.js - - - - -var ui = {}; - -(function ($, ui) { - "use strict"; - - var statusClasses = ["error", "warning", "success"]; - - ui.getContainer = function (options, $el) { - var $container; - - $container = $(options.ui.container); - if (!($container && $container.length === 1)) { - $container = $el.parent(); - } - return $container; - }; - - ui.findElement = function ($container, viewport, cssSelector) { - if (viewport) { - return $container.find(viewport).find(cssSelector); - } - return $container.find(cssSelector); - }; - - ui.getUIElements = function (options, $el) { - var $container, selector, result; - - if (options.instances.viewports) { - return options.instances.viewports; - } - - $container = ui.getContainer(options, $el); - - result = {}; - if (options.ui.bootstrap4) { - selector = "progress.progress"; - } else { - selector = "div.progress"; - } - result.$progressbar = ui.findElement($container, options.ui.viewports.progress, selector); - if (options.ui.showVerdictsInsideProgressBar) { - result.$verdict = result.$progressbar.find("span.password-verdict"); - } - - if (!options.ui.showPopover) { - if (!options.ui.showVerdictsInsideProgressBar) { - result.$verdict = ui.findElement($container, options.ui.viewports.verdict, "span.password-verdict"); - } - result.$errors = ui.findElement($container, options.ui.viewports.errors, "ul.error-list"); - } - - options.instances.viewports = result; - return result; - }; - - ui.initProgressBar = function (options, $el) { - var $container = ui.getContainer(options, $el), - progressbar = "
      "; - if (options.ui.bootstrap4) { - // Boostrap 4 - progressbar = ""; - } - if (options.ui.showVerdictsInsideProgressBar) { - progressbar += ""; - } - if (options.ui.bootstrap4) { - progressbar += ""; - } else { - progressbar += "
      "; - } - - if (options.ui.viewports.progress) { - $container.find(options.ui.viewports.progress).append(progressbar); - } else { - $(progressbar).insertAfter($el); - } - }; - - ui.initHelper = function (options, $el, html, viewport) { - var $container = ui.getContainer(options, $el); - if (viewport) { - $container.find(viewport).append(html); - } else { - $(html).insertAfter($el); - } - }; - - ui.initVerdict = function (options, $el) { - ui.initHelper(options, $el, "", - options.ui.viewports.verdict); - }; - - ui.initErrorList = function (options, $el) { - ui.initHelper(options, $el, "
        ", - options.ui.viewports.errors); - }; - - ui.initPopover = function (options, $el) { - $el.popover("destroy"); - $el.popover({ - html: true, - placement: options.ui.popoverPlacement, - trigger: "manual", - content: " " - }); - }; - - ui.initUI = function (options, $el) { - if (options.ui.showPopover) { - ui.initPopover(options, $el); - } else { - if (options.ui.showErrors) { ui.initErrorList(options, $el); } - if (options.ui.showVerdicts && !options.ui.showVerdictsInsideProgressBar) { - ui.initVerdict(options, $el); - } - } - if (options.ui.showProgressBar) { - ui.initProgressBar(options, $el); - } - }; - - ui.updateProgressBar = function (options, $el, cssClass, percentage) { - var $progressbar = ui.getUIElements(options, $el).$progressbar, - $bar = $progressbar.find(".progress-bar"), - cssPrefix = "progress-"; - - if (options.ui.bootstrap2) { - $bar = $progressbar.find(".bar"); - cssPrefix = ""; - } - - $.each(options.ui.colorClasses, function (idx, value) { - if (options.ui.bootstrap4) { - $progressbar.removeClass(cssPrefix + value); - } else { - $bar.removeClass(cssPrefix + "bar-" + value); - } - }); - if (options.ui.bootstrap4) { - $progressbar.addClass(cssPrefix + options.ui.colorClasses[cssClass]); - $progressbar.val(percentage); - } else { - $bar.addClass(cssPrefix + "bar-" + options.ui.colorClasses[cssClass]); - $bar.css("width", percentage + '%'); - } - }; - - ui.updateVerdict = function (options, $el, cssClass, text) { - var $verdict = ui.getUIElements(options, $el).$verdict; - $verdict.removeClass(options.ui.colorClasses.join(' ')); - if (cssClass > -1) { - $verdict.addClass(options.ui.colorClasses[cssClass]); - } - $verdict.html(text); - }; - - ui.updateErrors = function (options, $el) { - var $errors = ui.getUIElements(options, $el).$errors, - html = ""; - $.each(options.instances.errors, function (idx, err) { - html += "
      • " + err + "
      • "; - }); - $errors.html(html); - }; - - ui.updatePopover = function (options, $el, verdictText) { - var popover = $el.data("bs.popover"), - html = "", - hide = true; - - if (options.ui.showVerdicts && - !options.ui.showVerdictsInsideProgressBar && - verdictText.length > 0) { - html = "
        " + verdictText + - "
        "; - hide = false; - } - if (options.ui.showErrors) { - if (options.instances.errors.length > 0) { - hide = false; - } - html += options.ui.popoverError(options.instances.errors); - } - - if (hide) { - $el.popover("hide"); - return; - } - - if (options.ui.bootstrap2) { popover = $el.data("popover"); } - - if (popover.$arrow && popover.$arrow.parents("body").length > 0) { - $el.find("+ .popover .popover-content").html(html); - } else { - // It's hidden - popover.options.content = html; - $el.popover("show"); - } - }; - - ui.updateFieldStatus = function (options, $el, cssClass) { - var targetClass = options.ui.bootstrap2 ? ".control-group" : ".form-group", - $container = $el.parents(targetClass).first(); - - $.each(statusClasses, function (idx, css) { - if (!options.ui.bootstrap2) { css = "has-" + css; } - $container.removeClass(css); - }); - - cssClass = statusClasses[cssClass]; - if (!options.ui.bootstrap2) { cssClass = "has-" + cssClass; } - $container.addClass(cssClass); - }; - - ui.percentage = function (score, maximun) { - var result = Math.floor(100 * score / maximun); - result = result <= 0 ? 1 : result; // Don't show the progress bar empty - result = result > 100 ? 100 : result; - return result; - }; - - ui.getVerdictAndCssClass = function (options, score) { - var cssClass, verdictText, level; - - if (score <= 0) { - cssClass = 0; - level = -1; - verdictText = options.ui.verdicts[0]; - } else if (score < options.ui.scores[0]) { - cssClass = 0; - level = 0; - verdictText = options.ui.verdicts[0]; - } else if (score < options.ui.scores[1]) { - cssClass = 0; - level = 1; - verdictText = options.ui.verdicts[1]; - } else if (score < options.ui.scores[2]) { - cssClass = 1; - level = 2; - verdictText = options.ui.verdicts[2]; - } else if (score < options.ui.scores[3]) { - cssClass = 1; - level = 3; - verdictText = options.ui.verdicts[3]; - } else { - cssClass = 2; - level = 4; - verdictText = options.ui.verdicts[4]; - } - - return [verdictText, cssClass, level]; - }; - - ui.updateUI = function (options, $el, score) { - var cssClass, barPercentage, verdictText, verdictCssClass; - - cssClass = ui.getVerdictAndCssClass(options, score); - verdictText = score === 0 ? '' : cssClass[0]; - cssClass = cssClass[1]; - verdictCssClass = options.ui.useVerdictCssClass ? cssClass : -1; - - if (options.ui.showProgressBar) { - barPercentage = ui.percentage(score, options.ui.scores[3]); - ui.updateProgressBar(options, $el, cssClass, barPercentage); - if (options.ui.showVerdictsInsideProgressBar) { - ui.updateVerdict(options, $el, verdictCssClass, verdictText); - } - } - - if (options.ui.showStatus) { - ui.updateFieldStatus(options, $el, cssClass); - } - - if (options.ui.showPopover) { - ui.updatePopover(options, $el, verdictText); - } else { - if (options.ui.showVerdicts && !options.ui.showVerdictsInsideProgressBar) { - ui.updateVerdict(options, $el, verdictCssClass, verdictText); - } - if (options.ui.showErrors) { - ui.updateErrors(options, $el); - } - } - }; -}(jQuery, ui)); - -// Source: src/methods.js - - - - -var methods = {}; - -(function ($, methods) { - "use strict"; - var onKeyUp, applyToAll; - - onKeyUp = function (event) { - var $el = $(event.target), - options = $el.data("pwstrength-bootstrap"), - word = $el.val(), - userInputs, - verdictText, - verdictLevel, - score; - - if (options === undefined) { return; } - - options.instances.errors = []; - if (word.length === 0) { - score = 0; - } else { - if (options.common.zxcvbn) { - userInputs = []; - $.each(options.common.userInputs.concat([options.common.usernameField]), function (idx, selector) { - var value = $(selector).val(); - if (value) { userInputs.push(value); } - }); - userInputs = userInputs.concat(options.common.zxcvbnTerms); - score = zxcvbn(word, userInputs).entropy; - } else { - score = rulesEngine.executeRules(options, word); - } - } - ui.updateUI(options, $el, score); - verdictText = ui.getVerdictAndCssClass(options, score); - verdictLevel = verdictText[2]; - verdictText = verdictText[0]; - - if (options.common.debug) { console.log(score + ' - ' + verdictText); } - - if ($.isFunction(options.common.onKeyUp)) { - options.common.onKeyUp(event, { - score: score, - verdictText: verdictText, - verdictLevel: verdictLevel - }); - } - }; - - methods.init = function (settings) { - this.each(function (idx, el) { - // Make it deep extend (first param) so it extends too the - // rules and other inside objects - var clonedDefaults = $.extend(true, {}, defaultOptions), - localOptions = $.extend(true, clonedDefaults, settings), - $el = $(el); - - localOptions.instances = {}; - $el.data("pwstrength-bootstrap", localOptions); - $el.on("keyup", onKeyUp); - $el.on("change", onKeyUp); - $el.on("paste", onKeyUp); - - ui.initUI(localOptions, $el); - if ($.trim($el.val())) { // Not empty, calculate the strength - $el.trigger("keyup"); - } - - if ($.isFunction(localOptions.common.onLoad)) { - localOptions.common.onLoad(); - } - }); - - return this; - }; - - methods.destroy = function () { - this.each(function (idx, el) { - var $el = $(el), - options = $el.data("pwstrength-bootstrap"), - elements = ui.getUIElements(options, $el); - elements.$progressbar.remove(); - elements.$verdict.remove(); - elements.$errors.remove(); - $el.removeData("pwstrength-bootstrap"); - }); - }; - - methods.forceUpdate = function () { - this.each(function (idx, el) { - var event = { target: el }; - onKeyUp(event); - }); - }; - - methods.addRule = function (name, method, score, active) { - this.each(function (idx, el) { - var options = $(el).data("pwstrength-bootstrap"); - - options.rules.activated[name] = active; - options.rules.scores[name] = score; - options.rules.extra[name] = method; - }); - }; - - applyToAll = function (rule, prop, value) { - this.each(function (idx, el) { - $(el).data("pwstrength-bootstrap").rules[prop][rule] = value; - }); - }; - - methods.changeScore = function (rule, score) { - applyToAll.call(this, rule, "scores", score); - }; - - methods.ruleActive = function (rule, active) { - applyToAll.call(this, rule, "activated", active); - }; - - $.fn.pwstrength = function (method) { - var result; - - if (methods[method]) { - result = methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); - } else if (typeof method === "object" || !method) { - result = methods.init.apply(this, arguments); - } else { - $.error("Method " + method + " does not exist on jQuery.pwstrength-bootstrap"); - } - - return result; - }; -}(jQuery, methods)); -}(jQuery)); \ No newline at end of file diff --git a/media/jui/js/pwstrength-bootstrap-1.2.9.min.js b/media/jui/js/pwstrength-bootstrap-1.2.9.min.js deleted file mode 100755 index f4f67019df021..0000000000000 --- a/media/jui/js/pwstrength-bootstrap-1.2.9.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* pwstrength-bootstrap 2015-10-27 - GPLv3 & MIT License */ - -!function(a){var b={};try{if(!a&&module&&module.exports){var a=require("jquery"),c=require("jsdom").jsdom;a=a(c().parentWindow)}}catch(d){}!function(a,b){"use strict";var c={};b.forbiddenSequences=["0123456789","abcdefghijklmnopqrstuvwxyz","qwertyuiop","asdfghjkl","zxcvbnm","!@#$%^&*()_+"],c.wordNotEmail=function(a,b,c){return b.match(/^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i)?c:0},c.wordLength=function(a,b,c){var d=b.length,e=Math.pow(d,a.rules.raisePower);return d2&&(a.each(b.forbiddenSequences,function(b,c){if(!g){var e=[c,c.split("").reverse().join("")];a.each(e,function(a,b){for(f=0;f-1&&(g=!0)})}}),g)?e:0},c.wordLowercase=function(a,b,c){return b.match(/[a-z]/)&&c},c.wordUppercase=function(a,b,c){return b.match(/[A-Z]/)&&c},c.wordOneNumber=function(a,b,c){return b.match(/\d+/)&&c},c.wordThreeNumbers=function(a,b,c){return b.match(/(.*[0-9].*[0-9].*[0-9])/)&&c},c.wordOneSpecialChar=function(a,b,c){return b.match(/[!,@,#,$,%,\^,&,*,?,_,~]/)&&c},c.wordTwoSpecialChar=function(a,b,c){return b.match(/(.*[!,@,#,$,%,\^,&,*,?,_,~].*[!,@,#,$,%,\^,&,*,?,_,~])/)&&c},c.wordUpperLowerCombo=function(a,b,c){return b.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)&&c},c.wordLetterNumberCombo=function(a,b,c){return b.match(/([a-zA-Z])/)&&b.match(/([0-9])/)&&c},c.wordLetterNumberCharCombo=function(a,b,c){return b.match(/([a-zA-Z0-9].*[!,@,#,$,%,\^,&,*,?,_,~])|([!,@,#,$,%,\^,&,*,?,_,~].*[a-zA-Z0-9])/)&&c},b.validation=c,b.executeRules=function(c,d){var e=0;return a.each(c.rules.activated,function(f,g){if(g){var h,i,j=c.rules.scores[f],k=b.validation[f];a.isFunction(k)||(k=c.rules.extra[f]),a.isFunction(k)&&(h=k(c,d,j),h&&(e+=h),(0>h||!a.isNumeric(h)&&!h)&&(i=c.ui.spanError(c,f),i.length>0&&c.instances.errors.push(i)))}}),e}}(a,b);try{module&&module.exports&&(module.exports=b)}catch(d){}var e={};e.common={},e.common.minChar=6,e.common.usernameField="#username",e.common.userInputs=[],e.common.onLoad=void 0,e.common.onKeyUp=void 0,e.common.zxcvbn=!1,e.common.zxcvbnTerms=[],e.common.debug=!1,e.rules={},e.rules.extra={},e.rules.scores={wordNotEmail:-100,wordLength:-50,wordSimilarToUsername:-100,wordSequences:-20,wordTwoCharacterClasses:2,wordRepetitions:-25,wordLowercase:1,wordUppercase:3,wordOneNumber:3,wordThreeNumbers:5,wordOneSpecialChar:3,wordTwoSpecialChar:5,wordUpperLowerCombo:2,wordLetterNumberCombo:2,wordLetterNumberCharCombo:2},e.rules.activated={wordNotEmail:!0,wordLength:!0,wordSimilarToUsername:!0,wordSequences:!0,wordTwoCharacterClasses:!1,wordRepetitions:!1,wordLowercase:!0,wordUppercase:!0,wordOneNumber:!0,wordThreeNumbers:!0,wordOneSpecialChar:!0,wordTwoSpecialChar:!0,wordUpperLowerCombo:!0,wordLetterNumberCombo:!0,wordLetterNumberCharCombo:!0},e.rules.raisePower=1.4,e.ui={},e.ui.bootstrap2=!1,e.ui.bootstrap4=!1,e.ui.colorClasses=["danger","warning","success"],e.ui.showProgressBar=!0,e.ui.showPopover=!1,e.ui.popoverPlacement="bottom",e.ui.showStatus=!1,e.ui.spanError=function(a,b){"use strict";var c=a.ui.errorMessages[b];return c?''+c+"":""},e.ui.popoverError=function(b){"use strict";var c="
        Errors:
          ";return a.each(b,function(a,b){c+="
        • "+b+"
        • "}),c+="
        "},e.ui.errorMessages={wordLength:"Your password is too short",wordNotEmail:"Do not use your email as your password",wordSimilarToUsername:"Your password cannot contain your username",wordTwoCharacterClasses:"Use different character classes",wordRepetitions:"Too many repetitions",wordSequences:"Your password contains sequences"},e.ui.verdicts=["Weak","Normal","Medium","Strong","Very Strong"],e.ui.showVerdicts=!0,e.ui.showVerdictsInsideProgressBar=!1,e.ui.useVerdictCssClass=!1,e.ui.showErrors=!1,e.ui.container=void 0,e.ui.viewports={progress:void 0,verdict:void 0,errors:void 0},e.ui.scores=[14,26,38,50];var f={};!function(a,b){"use strict";var c=["error","warning","success"];b.getContainer=function(b,c){var d;return d=a(b.ui.container),d&&1===d.length||(d=c.parent()),d},b.findElement=function(a,b,c){return b?a.find(b).find(c):a.find(c)},b.getUIElements=function(a,c){var d,e,f;return a.instances.viewports?a.instances.viewports:(d=b.getContainer(a,c),f={},e=a.ui.bootstrap4?"progress.progress":"div.progress",f.$progressbar=b.findElement(d,a.ui.viewports.progress,e),a.ui.showVerdictsInsideProgressBar&&(f.$verdict=f.$progressbar.find("span.password-verdict")),a.ui.showPopover||(a.ui.showVerdictsInsideProgressBar||(f.$verdict=b.findElement(d,a.ui.viewports.verdict,"span.password-verdict")),f.$errors=b.findElement(d,a.ui.viewports.errors,"ul.error-list")),a.instances.viewports=f,f)},b.initProgressBar=function(c,d){var e=b.getContainer(c,d),f="
        ",c.ui.bootstrap4&&(f=""),c.ui.showVerdictsInsideProgressBar&&(f+=""),f+=c.ui.bootstrap4?"":"
        ",c.ui.viewports.progress?e.find(c.ui.viewports.progress).append(f):a(f).insertAfter(d)},b.initHelper=function(c,d,e,f){var g=b.getContainer(c,d);f?g.find(f).append(e):a(e).insertAfter(d)},b.initVerdict=function(a,c){b.initHelper(a,c,"",a.ui.viewports.verdict)},b.initErrorList=function(a,c){b.initHelper(a,c,"
          ",a.ui.viewports.errors)},b.initPopover=function(a,b){b.popover("destroy"),b.popover({html:!0,placement:a.ui.popoverPlacement,trigger:"manual",content:" "})},b.initUI=function(a,c){a.ui.showPopover?b.initPopover(a,c):(a.ui.showErrors&&b.initErrorList(a,c),a.ui.showVerdicts&&!a.ui.showVerdictsInsideProgressBar&&b.initVerdict(a,c)),a.ui.showProgressBar&&b.initProgressBar(a,c)},b.updateProgressBar=function(c,d,e,f){var g=b.getUIElements(c,d).$progressbar,h=g.find(".progress-bar"),i="progress-";c.ui.bootstrap2&&(h=g.find(".bar"),i=""),a.each(c.ui.colorClasses,function(a,b){c.ui.bootstrap4?g.removeClass(i+b):h.removeClass(i+"bar-"+b)}),c.ui.bootstrap4?(g.addClass(i+c.ui.colorClasses[e]),g.val(f)):(h.addClass(i+"bar-"+c.ui.colorClasses[e]),h.css("width",f+"%"))},b.updateVerdict=function(a,c,d,e){var f=b.getUIElements(a,c).$verdict;f.removeClass(a.ui.colorClasses.join(" ")),d>-1&&f.addClass(a.ui.colorClasses[d]),f.html(e)},b.updateErrors=function(c,d){var e=b.getUIElements(c,d).$errors,f="";a.each(c.instances.errors,function(a,b){f+="
        • "+b+"
        • "}),e.html(f)},b.updatePopover=function(a,b,c){var d=b.data("bs.popover"),e="",f=!0;return a.ui.showVerdicts&&!a.ui.showVerdictsInsideProgressBar&&c.length>0&&(e="
          "+c+"
          ",f=!1),a.ui.showErrors&&(a.instances.errors.length>0&&(f=!1),e+=a.ui.popoverError(a.instances.errors)),f?void b.popover("hide"):(a.ui.bootstrap2&&(d=b.data("popover")),void(d.$arrow&&d.$arrow.parents("body").length>0?b.find("+ .popover .popover-content").html(e):(d.options.content=e,b.popover("show"))))},b.updateFieldStatus=function(b,d,e){var f=b.ui.bootstrap2?".control-group":".form-group",g=d.parents(f).first();a.each(c,function(a,c){b.ui.bootstrap2||(c="has-"+c),g.removeClass(c)}),e=c[e],b.ui.bootstrap2||(e="has-"+e),g.addClass(e)},b.percentage=function(a,b){var c=Math.floor(100*a/b);return c=0>=c?1:c,c=c>100?100:c},b.getVerdictAndCssClass=function(a,b){var c,d,e;return 0>=b?(c=0,e=-1,d=a.ui.verdicts[0]):b