From 61e474475b7813f187d41f712946823e0e58203f Mon Sep 17 00:00:00 2001 From: Dmi3yy Date: Fri, 14 Nov 2014 16:19:51 +0200 Subject: [PATCH] update to 1.0.15-d6.18 --- assets/plugins/tinymce/lang/czech.inc.php | 2 +- assets/plugins/tinymce/lang/english.inc.php | 2 +- assets/plugins/tinymce/lang/finnish.inc.php | 2 +- .../tinymce/lang/francais-utf8.inc.php | 2 +- assets/plugins/tinymce/lang/german.inc.php | 2 +- assets/plugins/tinymce/lang/italian.inc.php | 2 +- .../tinymce/lang/japanese-utf8.inc.php | 2 +- .../tinymce/lang/nederlands-utf8.inc.php | 2 +- assets/plugins/tinymce/lang/persian.inc.php | 2 +- .../plugins/tinymce/lang/polish-utf8.inc.php | 2 +- .../tinymce/lang/portuguese-br.inc.php | 2 +- .../plugins/tinymce/lang/portuguese.inc.php | 2 +- .../plugins/tinymce/lang/russian-UTF8.inc.php | 2 +- .../plugins/tinymce/lang/spanish-utf8.inc.php | 2 +- .../plugins/tinymce/lang/svenska-utf8.inc.php | 2 +- install/changelog.txt | 133 ++++++++++++++++++ install/instprocessor.php | 5 +- install/lang/bulgarian.inc.php | 2 +- install/lang/czech.inc.php | 2 +- install/lang/danish.inc.php | 2 +- install/lang/english.inc.php | 2 +- install/lang/finnish-utf8.inc.php | 2 +- install/lang/francais-utf8.inc.php | 2 +- install/lang/german.inc.php | 2 +- install/lang/hebrew.inc.php | 2 +- install/lang/italian.inc.php | 2 +- install/lang/japanese-utf8.inc.php | 2 +- install/lang/nederlands-utf8.inc.php | 2 +- install/lang/norwegian.inc.php | 2 +- install/lang/persian.inc.php | 2 +- install/lang/polish-utf8.inc.php | 2 +- install/lang/portuguese-br-utf8.inc.php | 2 +- install/lang/portuguese.inc.php | 2 +- install/lang/russian-UTF8.inc.php | 2 +- install/lang/spanish-utf8.inc.php | 2 +- install/lang/svenska.inc.php | 2 +- install/setup.sql | 1 + manager/actions/mutate_settings.dynamic.php | 2 +- manager/actions/resources.static.php | 8 +- manager/frames/nodes.php | 16 ++- .../includes/document.parser.class.inc.php | 106 ++++++++++---- .../extenders/manager.api.class.inc.php | 21 ++- manager/includes/lang/bulgarian.inc.php | 2 +- manager/includes/lang/chinese.inc.php | 2 +- .../lang/country/bulgarian_country.inc.php | 2 +- .../lang/country/danish_country.inc.php | 2 +- .../lang/country/english_country.inc.php | 2 +- .../lang/country/finnish_country.inc.php | 2 +- .../country/francais-utf8_country.inc.php | 2 +- .../lang/country/german_country.inc.php | 2 +- .../lang/country/italian_country.inc.php | 2 +- .../country/japanese-utf8_country.inc.php | 2 +- .../country/nederlands-utf8_country.inc.php | 2 +- .../lang/country/persian_country.inc.php | 2 +- .../lang/country/polish-utf8_country.inc.php | 2 +- .../portuguese-br-utf8_country.inc.php | 2 +- .../lang/country/portuguese_country.inc.php | 2 +- .../lang/country/russian-UTF8_country.inc.php | 2 +- .../lang/country/spanish-utf8_country.inc.php | 2 +- .../lang/country/svenska-utf8_country.inc.php | 2 +- manager/includes/lang/czech.inc.php | 2 +- manager/includes/lang/danish.inc.php | 2 +- manager/includes/lang/english-british.inc.php | 2 +- manager/includes/lang/english.inc.php | 3 +- .../includes/lang/errormsg/english.inc.php | 38 ----- manager/includes/lang/errormsg/german.inc.php | 38 ----- .../includes/lang/errormsg/italian.inc.php | 38 ----- .../lang/errormsg/japanese-utf8.inc.php | 38 ----- .../lang/errormsg/nederlands-utf8.inc.php | 38 ----- .../includes/lang/errormsg/nederlands.inc.php | 6 - .../lang/errormsg/russian-UTF8.inc.php | 38 ----- .../lang/errormsg/svenska-utf8.inc.php | 38 ----- manager/includes/lang/finnish.inc.php | 2 +- manager/includes/lang/francais-utf8.inc.php | 2 +- manager/includes/lang/german.inc.php | 2 +- manager/includes/lang/hebrew.inc.php | 18 +-- manager/includes/lang/italian.inc.php | 2 +- manager/includes/lang/japanese-utf8.inc.php | 2 +- manager/includes/lang/nederlands-utf8.inc.php | 2 +- manager/includes/lang/norsk.inc.php | 2 +- manager/includes/lang/persian.inc.php | 2 +- manager/includes/lang/polish-utf8.inc.php | 2 +- .../includes/lang/portuguese-br-utf8.inc.php | 2 +- manager/includes/lang/portuguese.inc.php | 2 +- manager/includes/lang/russian-UTF8.inc.php | 2 +- manager/includes/lang/spanish-utf8.inc.php | 2 +- manager/includes/lang/svenska-utf8.inc.php | 2 +- manager/includes/tmplvars.inc.php | 2 +- manager/includes/version.inc.php | 4 +- manager/media/browser/mcpuk/browser.php | 6 +- .../processors/cache_sync.class.processor.php | 37 ++--- manager/processors/purge_plugin.processor.php | 44 ++++++ .../processors/save_web_user.processor.php | 5 +- 93 files changed, 394 insertions(+), 427 deletions(-) mode change 100644 => 100755 install/lang/japanese-utf8.inc.php mode change 100644 => 100755 manager/includes/lang/country/japanese-utf8_country.inc.php mode change 100644 => 100755 manager/includes/lang/country/persian_country.inc.php mode change 100644 => 100755 manager/includes/lang/country/russian-UTF8_country.inc.php mode change 100644 => 100755 manager/includes/lang/country/svenska-utf8_country.inc.php delete mode 100644 manager/includes/lang/errormsg/english.inc.php delete mode 100644 manager/includes/lang/errormsg/german.inc.php delete mode 100644 manager/includes/lang/errormsg/italian.inc.php delete mode 100644 manager/includes/lang/errormsg/japanese-utf8.inc.php delete mode 100644 manager/includes/lang/errormsg/nederlands-utf8.inc.php delete mode 100644 manager/includes/lang/errormsg/nederlands.inc.php delete mode 100644 manager/includes/lang/errormsg/russian-UTF8.inc.php delete mode 100644 manager/includes/lang/errormsg/svenska-utf8.inc.php create mode 100644 manager/processors/purge_plugin.processor.php diff --git a/assets/plugins/tinymce/lang/czech.inc.php b/assets/plugins/tinymce/lang/czech.inc.php index b0665dfe..e39cf1c4 100644 --- a/assets/plugins/tinymce/lang/czech.inc.php +++ b/assets/plugins/tinymce/lang/czech.inc.php @@ -6,7 +6,7 @@ * Author: Hansek, COEX (hansek@coex.cz) * Date: 2014/02/01 * Version: 3.5.10 - * MODX version: 0.9.5-1.0.14 + * MODX version: 0.9.5-1.0.15 */ $_lang['mce_editor_theme_title'] = 'Téma'; diff --git a/assets/plugins/tinymce/lang/english.inc.php b/assets/plugins/tinymce/lang/english.inc.php index 1811e9dc..4875d145 100644 --- a/assets/plugins/tinymce/lang/english.inc.php +++ b/assets/plugins/tinymce/lang/english.inc.php @@ -6,7 +6,7 @@ * Author: Jeff Whitfield and yama * Date: 2014/02/01 * Version: 3.5.10 - * MODX version: 0.9.5-1.0.14 + * MODX version: 0.9.5-1.0.15 */ $_lang['mce_editor_theme_title'] = 'Theme'; diff --git a/assets/plugins/tinymce/lang/finnish.inc.php b/assets/plugins/tinymce/lang/finnish.inc.php index be0ec98b..ca540e18 100644 --- a/assets/plugins/tinymce/lang/finnish.inc.php +++ b/assets/plugins/tinymce/lang/finnish.inc.php @@ -6,7 +6,7 @@ * Author: Jeff Whitfield * Date: 2014/03/31 * Version: 3.5.10 - * MODX version: 0.9.5-1.0.14 + * MODX version: 0.9.5-1.0.15 */ $_lang['mce_editor_theme_title'] = 'Teema'; diff --git a/assets/plugins/tinymce/lang/francais-utf8.inc.php b/assets/plugins/tinymce/lang/francais-utf8.inc.php index c2857220..2b7ba7bf 100644 --- a/assets/plugins/tinymce/lang/francais-utf8.inc.php +++ b/assets/plugins/tinymce/lang/francais-utf8.inc.php @@ -6,7 +6,7 @@ * Author: French community * Date: 2014/02/01 * Version: 3.5.10 - * MODX version: 0.9.5-1.0.14 + * MODX version: 0.9.5-1.0.15 */ $_lang['mce_editor_theme_title'] = 'Thème'; diff --git a/assets/plugins/tinymce/lang/german.inc.php b/assets/plugins/tinymce/lang/german.inc.php index 8529aa15..98f7ac6c 100644 --- a/assets/plugins/tinymce/lang/german.inc.php +++ b/assets/plugins/tinymce/lang/german.inc.php @@ -6,7 +6,7 @@ * Author: Jeff Whitfield, Marc Hinse & Thomas Jakobi * Date: 2014/02/01 * Version: 3.5.10 - * MODX version: 0.9.5-1.0.14 + * MODX version: 0.9.5-1.0.15 */ $_lang['mce_editor_theme_title'] = 'Template'; diff --git a/assets/plugins/tinymce/lang/italian.inc.php b/assets/plugins/tinymce/lang/italian.inc.php index a7d8dcb0..26d845e4 100644 --- a/assets/plugins/tinymce/lang/italian.inc.php +++ b/assets/plugins/tinymce/lang/italian.inc.php @@ -6,7 +6,7 @@ * Author: luigif * Date: 2014/02/01 * Version: 3.5.10 - * MODX version: 0.9.5-1.0.14 + * MODX version: 0.9.5-1.0.15 */ $_lang['mce_editor_theme_title'] = 'Tema:'; diff --git a/assets/plugins/tinymce/lang/japanese-utf8.inc.php b/assets/plugins/tinymce/lang/japanese-utf8.inc.php index 94957aea..35409e3c 100644 --- a/assets/plugins/tinymce/lang/japanese-utf8.inc.php +++ b/assets/plugins/tinymce/lang/japanese-utf8.inc.php @@ -6,7 +6,7 @@ * Author: yama * Date: 2014/02/01 * Version: 3.5.10 - * MODX version: 0.9.5-1.0.14 + * MODX version: 0.9.5-1.0.15 */ $_lang['mce_editor_theme_title'] = 'テーマ'; diff --git a/assets/plugins/tinymce/lang/nederlands-utf8.inc.php b/assets/plugins/tinymce/lang/nederlands-utf8.inc.php index 3fd2cdb2..4b9cf8da 100644 --- a/assets/plugins/tinymce/lang/nederlands-utf8.inc.php +++ b/assets/plugins/tinymce/lang/nederlands-utf8.inc.php @@ -6,7 +6,7 @@ * Author: Jeff Whitfield and Stefan van Zanden (18-07-2009 Small changes to conform language used in the manager) * Date: 2014/02/01 * Version: 3.5.10 - * MODX version: 0.9.5-1.0.14 + * MODX version: 0.9.5-1.0.15 */ $_lang['mce_editor_theme_title'] = 'Thema'; diff --git a/assets/plugins/tinymce/lang/persian.inc.php b/assets/plugins/tinymce/lang/persian.inc.php index e8d8b3a8..460f8d23 100644 --- a/assets/plugins/tinymce/lang/persian.inc.php +++ b/assets/plugins/tinymce/lang/persian.inc.php @@ -6,7 +6,7 @@ * Author: Jeff Whitfield and Mohsen (MotSmart ~ www.modxcms.ir) * Date: 2014/02/01 * Version: 3.5.10 - * MODX version: 0.9.5-1.0.14 + * MODX version: 0.9.5-1.0.15 */ $_lang['mce_editor_theme_title'] = 'پوسته'; diff --git a/assets/plugins/tinymce/lang/polish-utf8.inc.php b/assets/plugins/tinymce/lang/polish-utf8.inc.php index 8406e2c8..42f00f62 100644 --- a/assets/plugins/tinymce/lang/polish-utf8.inc.php +++ b/assets/plugins/tinymce/lang/polish-utf8.inc.php @@ -6,7 +6,7 @@ * Author: Jeff Whitfield and Piotr Matysiak * Date: 2014/02/01 * Version: 3.5.10 - * MODX version: 0.9.5-1.0.14 + * MODX version: 0.9.5-1.0.15 */ $_lang['mce_editor_theme_title'] = 'Motyw'; diff --git a/assets/plugins/tinymce/lang/portuguese-br.inc.php b/assets/plugins/tinymce/lang/portuguese-br.inc.php index f1d15db9..e01b363b 100644 --- a/assets/plugins/tinymce/lang/portuguese-br.inc.php +++ b/assets/plugins/tinymce/lang/portuguese-br.inc.php @@ -6,7 +6,7 @@ * Author: Jeff Whitfield and João Peixoto (joeindio@gmail.com) * Date: 2014/02/01 * Version: 3.5.10 - * MODX version: 0.9.5-1.0.14 + * MODX version: 0.9.5-1.0.15 */ $_lang['mce_editor_theme_title'] = 'Tema'; diff --git a/assets/plugins/tinymce/lang/portuguese.inc.php b/assets/plugins/tinymce/lang/portuguese.inc.php index a3d4c5cc..269728de 100644 --- a/assets/plugins/tinymce/lang/portuguese.inc.php +++ b/assets/plugins/tinymce/lang/portuguese.inc.php @@ -6,7 +6,7 @@ * Author: Jeff Whitfield - translation João Peixoto (joeindio@gmail.com) * Date: 2014/02/01 * Version: 3.5.10 - * MODX version: 0.9.5-1.0.14 + * MODX version: 0.9.5-1.0.15 */ $_lang['mce_editor_theme_title'] = 'Tema'; diff --git a/assets/plugins/tinymce/lang/russian-UTF8.inc.php b/assets/plugins/tinymce/lang/russian-UTF8.inc.php index 4cce5d1e..a7714409 100644 --- a/assets/plugins/tinymce/lang/russian-UTF8.inc.php +++ b/assets/plugins/tinymce/lang/russian-UTF8.inc.php @@ -6,7 +6,7 @@ * Author: Jeff Whitfield and Victor Safronovich * Date: 2014/02/01 * Version: 3.5.10 - * MODX version: 0.9.5-1.0.14 + * MODX version: 0.9.5-1.0.15 */ $_lang['mce_editor_theme_title'] = 'Тема WYSIWYG-редактора'; diff --git a/assets/plugins/tinymce/lang/spanish-utf8.inc.php b/assets/plugins/tinymce/lang/spanish-utf8.inc.php index cd1a0b7a..a2bb5fb1 100644 --- a/assets/plugins/tinymce/lang/spanish-utf8.inc.php +++ b/assets/plugins/tinymce/lang/spanish-utf8.inc.php @@ -6,7 +6,7 @@ * Author: Jeff Whitfield and Luciano A. Ferrer * Date: 2014/02/01 * Version: 3.5.10 - * MODX version: 0.9.5-1.0.14 + * MODX version: 0.9.5-1.0.15 */ $_lang['mce_editor_theme_title'] = 'Tema'; diff --git a/assets/plugins/tinymce/lang/svenska-utf8.inc.php b/assets/plugins/tinymce/lang/svenska-utf8.inc.php index 3333f4cf..b5396022 100644 --- a/assets/plugins/tinymce/lang/svenska-utf8.inc.php +++ b/assets/plugins/tinymce/lang/svenska-utf8.inc.php @@ -6,7 +6,7 @@ * Author: Jeff Whitfield * Date: 2014/02/01 * Version: 3.5.10 - * MODX version: 0.9.5-1.0.14 + * MODX version: 0.9.5-1.0.15 */ $_lang['mce_editor_theme_title'] = 'Tema'; diff --git a/install/changelog.txt b/install/changelog.txt index ceb809b7..92216c70 100644 --- a/install/changelog.txt +++ b/install/changelog.txt @@ -1,6 +1,139 @@ This file shows the changes in recent releases of MODX. The most current release is usually the development release, and is only shown to give an idea of what's currently in the pipeline. +MODX Evolution 1.0.15 (Oct 31, 2014) +=================================== +-------------------------------------------- +Bugfixes: +-------------------------------------------- +* [GitHub:#8721e56] Typo +* [GitHub:#6dc47ed] Wrong indents +* [GitHub:#c9267a8] Bugfix for "Context menu don't show if node has quotes." +* [GitHub:#7b8ad03] Wrong indents +* [GitHub:#6805efa] Not only "listbox-multiple" send array to POST +* [GitHub:#21bf185] Fix MYSQLI->fieldName() +* [GitHub:#8926b25] Fixing Bug: Only variables should be passed by reference +* [GitHub:#ee6e7a0] Don't show set_time_limit warning on host that have changing the time limit disabled +* [GitHub:#c02f75c] Richtext widget "undefined" output #341 +* [GitHub:#3151a01] changeWebUserPassword doesn't use md5 for a new password #304 +* [GitHub:#b7e665f] Update web_user_management.static.php +* [GitHub:#5c4bda6] Patch https://github.com/modxcms/evolution/commit/98e68cbab53dd6523bb65243a9a654263cd8423d +* [GitHub:#56357ce] fix makeURL +* [GitHub:#1d2bfdb] Fix - Can't work manager except utf8 +* [GitHub:#2da96f6] Wayfinder, move levelClass from li to ul http://c2n.me/iA951g +* [GitHub:#31f6759] $modx to $this +* [GitHub:#c2775fd] Fixed CodeMirror syntax HTML entity highlighting +* [GitHub:#13d0d6d] fix makeFriendlyURL for site_start +* [GitHub:#0f4aba1] eForm - Fix Invalid address error +* [GitHub:#71492ad] Delete unnecessary evaluate PHP code +* [GitHub:#d8872e7] Update media.js +* [GitHub:#022b755] Fix PHP Notices from document.parser +* [GitHub:#04cdccc] Bugfix - $id could be an integer and not a string. +* [GitHub:#0448cf7] fix uploader +* [GitHub:#b49e81e] show only allowed images in their folder +* [GitHub:#f5629f3] Skip all fields without name attribute in eFormParseTemplate +* [GitHub:#27d7adf] Bugfix - wrong quotes +* [GitHub:#7781b65] Small fix - smtp password field in system settings +* [GitHub:#d2b7cb0] fix http://joxi.ru/Y_SlUxjKTJBBH38Lv8U +* [GitHub:#9a121bc] Fixing $modx->makeUrl($modx->config['site_start']) should return '/' or $modx->config['site_url'] #2 +* [GitHub:#5266730] Fixes for phpthumb snippet - added temp folder creation – for open_basedir issues - updated phpthumb +* [GitHub:#dfbd44e] Bugfix for hideMenu parameter +* [GitHub:#6a23f91] New Security Feed! -> english.inc.php +* [GitHub:#cb5b0e0] Removed unused variables +* [GitHub:#be143a1] Removed wrong array keys +* [GitHub:#987f8b8] Output Content-Type header at messageCount +* [GitHub:#f7aecc4] Tools/Backup/Restore #275 +* [GitHub:#dfe0020] Webusers Not Showing Private Resources #273 +* [GitHub:#766e662] Fix for CJK multi byte environment +* [GitHub:#39ee732] Fixing issue with accounts not getting unblocked automatically (#267) and added some language string +* [GitHub:#a245648] Rename function name +* [GitHub:#102fe60] Fixing Wayfinder problems after upgrading MODX from 1.0.10 to 1.0.13 #226 +* [GitHub:#744fdcc] Hide META tags content in Resource Overview when META Keywords tab is set to no #283 +* [GitHub:#ea9ccdf] Quickfix for Refused to set unsafe header "Connection" #227 - removed setHeader("Connection", "close +* [GitHub:#43bcf75] Fixed some style issues + +-------------------------------------------- +Refactor: +-------------------------------------------- +* [GitHub:#0b82d66] Use of $modx->htmlspecialchars instead of htmlspecialchars +* [GitHub:#ace7999] htmlspecialchars be called with ENT_QUOTES +* [GitHub:#9c4d6f5] Avoid tampering cache file by escaping all keys and values - changing all $modx->db->escape to $this +* [GitHub:#3cdcffd] add , to errorRequiredSeparator in eForm +* [GitHub:#d8ec4ce] Typo - When you need to get one field, need use the db->getValue() +* [GitHub:#b20c22b] Update style.css +* [GitHub:#db56a5f] insideManager is deprecated +* [GitHub:#8deface] Uniform style code for int of $_REQUEST['id'] +* [GitHub:#3eceb21] Uniform style code for int of $_REQUEST['id'] in mutate_* Remove unnecessary checks +* [GitHub:#92b0d75] Updated AjaxSearch - Documentation in markdown format - Changed module/snippet/plugin code from txt +* [GitHub:#1ea15af] Set default: Send mail on MODX errors = not notify #289 +* [GitHub:#645503e] Update modxmailer.class.inc.php +* [GitHub:#c7f6d34] Wayfinder, revert levelClass, add outerLevelClass +* [GitHub:#5c97732] Update uploader.php +* [GitHub:#51c473f] Update config.php +* [GitHub:#d9c3cda] Update mutate_user.dynamic.php +* [GitHub:#acbaf8b] Refactor - Calling method of deprecated-function +* [GitHub:#aef110e] Refactor - $modx->makeUrl() +* [GitHub:#3715940] typo fix +* [GitHub:#39a62fb] Replace insideManager() to isBackend() +* [GitHub:#855fc76] Refactor - $modx->isFrontend() +* [GitHub:#2d86096] Refactor - $modx->isBackend() +* [GitHub:#1849346] Refactor - File browser settings +* [GitHub:#6a87f51] Set $modx->config['server_offset_time'] +* [GitHub:#be2f392] + The “OnDocFormPrerender” and “OnDocFormRender” events now have the document template ID parameter. +* [GitHub:#caf0f98] Add placeholder for PHP version in language files +* [GitHub:#8752559] Add "level" to the "wrapperLevel" placeholders +* [GitHub:#1f76491] Refactoring #265 - new parameters: errorTpl, errorRequiredTpl, errorRequiredSeparator +* [GitHub:#eb3a458] Remove changes added during #90 - Hexadecimal entities not needed anymore for MODX tags +* [GitHub:#66255dc] Change DOCTYPE declaration(HTML5) +* [GitHub:#696a8d6] Remove semicoron +* [GitHub:#9ab2678] Added support for lastRowTpl that will apply to last row of a list +* [GitHub:#a98fe41] Update KCFinder Dutch language file +* [GitHub:#576e210] Remove "?>" from end of php file +* [GitHub:#0fc2ccb] Update tagging.extender.inc.php + +-------------------------------------------- +Additional Improvements & Updates: +-------------------------------------------- +* [GitHub:#b74b11b] update mm to 0.6.2 +* [GitHub:#1e22788] Update Wayfinder to 2.0.4 +* [GitHub:#e0c80f3] Update eForm to 1.4.6 +* [GitHub:#55b4471] Updated Languages from Transifex +* [GitHub:#2aad3e3] Updated languages from Transifex +* [GitHub:#f1f53d3] Updated languages from Transifex +* [GitHub:#6166167] Updated Dutch language +* [GitHub:#3dd0c82] Added Ukrainian Language to Transfix +* [GitHub:#6a97faa] Updated Languages from Transifex +* [GitHub:#9a0eb01] add ukranian lang for eFrom and AjaxSearch +* [GitHub:#d19102d] Update english-british.inc.php +* [GitHub:#ac38129] MYSQLI Extender +* [GitHub:#f53d739] New feature: Allow searching of resources by template ID used. Include language strings for English +* [GitHub:#0c98bec] update logo +* [GitHub:#ceee98f] add ssl to smtp mail setting add alias_listing in breadcrumbs plugin add one more type in Ditto filt +* [GitHub:#c264569] Support for encoding windows-1251 in the emails +* [GitHub:#98e68cb] Change publishedon, set value from current time to pub_date +* [GitHub:#a2a3a57] Fix save mutate_content form on press Enter in input field +* [GitHub:#41048c3] add .tpl, .less, .sass for View/Edit in FileManager +* [GitHub:#7f05792] Allow load any extension without changing the core code +* [GitHub:#45f08ec] datepicker localization +* [GitHub:#0c29ed0] select/deselect all templates for tv +* [GitHub:#6b468fb] French translation for 1.0.14 +* [GitHub:#f4a559b] Updated polish and brazilian portuguese languages from Transifex Thanks to Raphael Mendonça & Piotr +* [GitHub:#ad335ad] Re-Added Breadcrumbs snippet commented documentation #236 +* [GitHub:#6e0fd11] Updated swedish language +* [GitHub:#03a1e04] Première version complète de la traduction pour la 1.0.14 +* [GitHub:#45cb1ff] Début de traduction pour la 1.0.14 +* [GitHub:#a761a63] mise à jour des messages de gestionnaire de fichiers + +-------------------------------------------- +Security: +-------------------------------------------- +* [GitHub:#a293ec6] Set secure flag to prevent cookies to be leaked via non encrypted requests. +* [GitHub:#d798a2a] config.inc.php to have setcookie specify httponly +* [GitHub:#38cbdaa] Sameorigin header +* [GitHub:#e62d961] Prevent XSS +* [GitHub:#3e7f9bd] Avoid XSS - $modx->htmlspecialchars or explicit integer casting on $_GET/$_POST values +* [GitHub:#3373321] Close SQL Injection + MODX Evolution 1.0.14 (Jun 05, 2014) =================================== -------------------------------------------- diff --git a/install/instprocessor.php b/install/instprocessor.php index 4965c672..34b2df64 100644 --- a/install/instprocessor.php +++ b/install/instprocessor.php @@ -298,7 +298,7 @@ function parseProperties($propertyString) { // start cms session if(!function_exists(\'startCMSSession\')) { function startCMSSession(){ - global $site_sessionname; + global $site_sessionname, $https_port; session_name($site_sessionname); session_start(); $cookieExpiration= 0; @@ -314,7 +314,8 @@ function startCMSSession(){ $_SESSION[\'modx.session.created.time\'] = time(); } } - setcookie(session_name(), session_id(), $cookieExpiration, MODX_BASE_URL); + $secure = ((isset ($_SERVER[\'HTTPS\']) && strtolower($_SERVER[\'HTTPS\']) == \'on\') || $_SERVER[\'SERVER_PORT\'] == $https_port); + setcookie(session_name(), session_id(), $cookieExpiration, MODX_BASE_URL, null, $secure, true); } }'; $configString .= "\n?>"; diff --git a/install/lang/bulgarian.inc.php b/install/lang/bulgarian.inc.php index 8a4470bb..35892795 100644 --- a/install/lang/bulgarian.inc.php +++ b/install/lang/bulgarian.inc.php @@ -3,7 +3,7 @@ * MODX Installer language file * * @author MODX Team - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Bulgarian diff --git a/install/lang/czech.inc.php b/install/lang/czech.inc.php index 5d224632..cf0ac4d8 100644 --- a/install/lang/czech.inc.php +++ b/install/lang/czech.inc.php @@ -3,7 +3,7 @@ * MODX Installer language file * * @author modxcms.cz - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Czech diff --git a/install/lang/danish.inc.php b/install/lang/danish.inc.php index 6fc7d5de..0a23ef9f 100644 --- a/install/lang/danish.inc.php +++ b/install/lang/danish.inc.php @@ -4,7 +4,7 @@ * * @author Henrik Nielsen * @author Mads Vestmar - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Danish diff --git a/install/lang/english.inc.php b/install/lang/english.inc.php index aba62d80..0d49bb28 100644 --- a/install/lang/english.inc.php +++ b/install/lang/english.inc.php @@ -3,7 +3,7 @@ * MODX Installer language file * * @author davaeron - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language English diff --git a/install/lang/finnish-utf8.inc.php b/install/lang/finnish-utf8.inc.php index df4d8eff..739a0e25 100644 --- a/install/lang/finnish-utf8.inc.php +++ b/install/lang/finnish-utf8.inc.php @@ -3,7 +3,7 @@ * MODX Installer language file * * @author Anssi Rajakallio, Kari Söderholm - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Finnish diff --git a/install/lang/francais-utf8.inc.php b/install/lang/francais-utf8.inc.php index 16ac798f..8bdd1b10 100644 --- a/install/lang/francais-utf8.inc.php +++ b/install/lang/francais-utf8.inc.php @@ -5,7 +5,7 @@ * @author Grégory Pakosz (guardian) * @author Coroico * @author Jean-Christophe Brebion (Fairytree) - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language French diff --git a/install/lang/german.inc.php b/install/lang/german.inc.php index 489b7fca..41bebf45 100644 --- a/install/lang/german.inc.php +++ b/install/lang/german.inc.php @@ -4,7 +4,7 @@ * * @author Marc Hinse * @author Bogdan Günther - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language German diff --git a/install/lang/hebrew.inc.php b/install/lang/hebrew.inc.php index 76723846..e76c8993 100755 --- a/install/lang/hebrew.inc.php +++ b/install/lang/hebrew.inc.php @@ -3,7 +3,7 @@ * MODX Installer language file * * @author MODX Team - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Hebrew diff --git a/install/lang/italian.inc.php b/install/lang/italian.inc.php index 8e4721e9..39bcd0d9 100644 --- a/install/lang/italian.inc.php +++ b/install/lang/italian.inc.php @@ -3,7 +3,7 @@ * MODX Installer language file * * @author luigif - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Italian diff --git a/install/lang/japanese-utf8.inc.php b/install/lang/japanese-utf8.inc.php old mode 100644 new mode 100755 index f070f580..d6fcea6b --- a/install/lang/japanese-utf8.inc.php +++ b/install/lang/japanese-utf8.inc.php @@ -3,7 +3,7 @@ * MODX Installer language file * * @author MEGU, yamamoto, TxO - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Japanese diff --git a/install/lang/nederlands-utf8.inc.php b/install/lang/nederlands-utf8.inc.php index f462d05b..87e3f94b 100644 --- a/install/lang/nederlands-utf8.inc.php +++ b/install/lang/nederlands-utf8.inc.php @@ -3,7 +3,7 @@ * MODX Installer language file * * @author davaeron - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language English diff --git a/install/lang/norwegian.inc.php b/install/lang/norwegian.inc.php index 0c304439..9a0ef50a 100644 --- a/install/lang/norwegian.inc.php +++ b/install/lang/norwegian.inc.php @@ -3,7 +3,7 @@ * MODX Installer language file * * @author Bjørn Erik Sandbakk (Sylvaticus) - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Norsk diff --git a/install/lang/persian.inc.php b/install/lang/persian.inc.php index 59cf61d4..ea66ea21 100644 --- a/install/lang/persian.inc.php +++ b/install/lang/persian.inc.php @@ -4,7 +4,7 @@ * * @author Mohsen Zare (MotSmart), MotSmart@Gmail.com, www.modxcms.ir * @author AliAqua - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Persian diff --git a/install/lang/polish-utf8.inc.php b/install/lang/polish-utf8.inc.php index 372c86d9..092a53d9 100644 --- a/install/lang/polish-utf8.inc.php +++ b/install/lang/polish-utf8.inc.php @@ -5,7 +5,7 @@ * @author Radosław Włodkowski, radoslaw@wlodkowski.net * @author Natalia Łubniewska * @author Witek Galecki - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Polish diff --git a/install/lang/portuguese-br-utf8.inc.php b/install/lang/portuguese-br-utf8.inc.php index 1f62eabe..820a2fc1 100644 --- a/install/lang/portuguese-br-utf8.inc.php +++ b/install/lang/portuguese-br-utf8.inc.php @@ -3,7 +3,7 @@ * MODX Installer language file * * @author Daniel Miguel de Melo - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Português do Brasil diff --git a/install/lang/portuguese.inc.php b/install/lang/portuguese.inc.php index 6d381ed2..0759d5b3 100644 --- a/install/lang/portuguese.inc.php +++ b/install/lang/portuguese.inc.php @@ -3,7 +3,7 @@ * MODX Installer language file * * @author davaeron - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language English diff --git a/install/lang/russian-UTF8.inc.php b/install/lang/russian-UTF8.inc.php index 8402a6d3..003c5515 100644 --- a/install/lang/russian-UTF8.inc.php +++ b/install/lang/russian-UTF8.inc.php @@ -5,7 +5,7 @@ * @author Pertsev Dmitriy * @author Safronovich Victor * @author Russian MODX Community - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Russian diff --git a/install/lang/spanish-utf8.inc.php b/install/lang/spanish-utf8.inc.php index f7eeb0ae..61e39515 100644 --- a/install/lang/spanish-utf8.inc.php +++ b/install/lang/spanish-utf8.inc.php @@ -3,7 +3,7 @@ * MODX Installer language file * * @author MODX Team - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Spanish diff --git a/install/lang/svenska.inc.php b/install/lang/svenska.inc.php index 7b992d24..f50dca63 100644 --- a/install/lang/svenska.inc.php +++ b/install/lang/svenska.inc.php @@ -4,7 +4,7 @@ * * @author Pontus Ågren (Pont) * @author Thomas Djärv (Beryl) - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Svenska diff --git a/install/setup.sql b/install/setup.sql index cad7ecee..90f05abc 100644 --- a/install/setup.sql +++ b/install/setup.sql @@ -1021,6 +1021,7 @@ REPLACE INTO `{PREFIX}system_eventnames` ('98','OnEmptyTrash','1','Documents'), ('99','OnManagerLoginFormPrerender','2',''), ('100','OnStripAlias','1','Documents'), +('102','OnMakeDocUrl','5',''), ('200','OnCreateDocGroup','1','Documents'), ('201','OnManagerWelcomePrerender','2',''), ('202','OnManagerWelcomeHome','2',''), diff --git a/manager/actions/mutate_settings.dynamic.php b/manager/actions/mutate_settings.dynamic.php index 90333bb2..7c689e12 100644 --- a/manager/actions/mutate_settings.dynamic.php +++ b/manager/actions/mutate_settings.dynamic.php @@ -862,7 +862,7 @@ function confirmLangChange(el, lkey, elupd){
- + diff --git a/manager/actions/resources.static.php b/manager/actions/resources.static.php index d3b50a37..71a6d85e 100644 --- a/manager/actions/resources.static.php +++ b/manager/actions/resources.static.php @@ -137,8 +137,14 @@ function createResourceList($resourceTable,$action,$nameField = 'name') {

diff --git a/manager/frames/nodes.php b/manager/frames/nodes.php index 327a18e3..6ee25e7f 100644 --- a/manager/frames/nodes.php +++ b/manager/frames/nodes.php @@ -161,7 +161,8 @@ function makeHTML($indent,$parent,$expandAll,$theme) { default: $nodetitle = $pagetitle; } - $nodetitle = htmlspecialchars(str_replace(array("\r\n", "\n", "\r"), ' ', $nodetitle), ENT_NOQUOTES, $modx->config['modx_charset']); + $nodetitle = $modx->htmlspecialchars(str_replace(array("\r\n", "\n", "\r"), ' ', $nodetitle), ENT_COMPAT); + $nodetitle_esc = addslashes($nodetitle); $protectedClass = $hasAccess==0 ? ' protectedNode' : ''; $nodetitleDisplay = $published==0 ? "$nodetitle" : ($hidemenu==1 ? "$nodetitle":"$nodetitle"); $nodetitleDisplay = $deleted==1 ? "$nodetitle" : $nodetitleDisplay; @@ -174,6 +175,7 @@ function makeHTML($indent,$parent,$expandAll,$theme) { $alt.= " ".$_lang['resource_opt_show_menu'].": ".($hidemenu==1 ? $_lang['no']:$_lang['yes']); $alt.= " ".$_lang['page_data_web_access'].": ".($privateweb ? $_lang['private']:$_lang['public']); $alt.= " ".$_lang['page_data_mgr_access'].": ".($privatemgr ? $_lang['private']:$_lang['public']); + $alt = $modx->htmlspecialchars($alt); $data = array('id' => $id, 'pagetitle' => $pagetitle, 'menutitle' => $menutitle,'parent' =>$parent, 'isfolder' =>$isfolder,'published' =>$published,'deleted' =>$deleted,'type' =>$type,'menuindex' =>$menuindex, @@ -212,8 +214,8 @@ function makeHTML($indent,$parent,$expandAll,$theme) { elseif($id == $modx->config['error_page']) $icon = $_style["tree_page_404"]; elseif($id == $modx->config['site_unavailable_page']) $icon = $_style["tree_page_hourglass"]; elseif($id == $modx->config['unauthorized_page']) $icon = $_style["tree_page_info"]; - $node .= '
'.$spacer.$pad.' '; - $node .= ''.$nodetitleDisplay.$weblinkDisplay.' '.$pageIdDisplay.'
'; + $node .= '
'.$spacer.$pad.' '; + $node .= ''.$nodetitleDisplay.$weblinkDisplay.' '.$pageIdDisplay.'
'; } else { // expandAll: two type for partial expansion @@ -222,15 +224,15 @@ function makeHTML($indent,$parent,$expandAll,$theme) { if ($expandAll == 1) { array_push($opened2, $id); } - $node .= '
'.$spacer.'  '; - $node .= ''.$nodetitleDisplay.$weblinkDisplay.' '.$pageIdDisplay.'
'; + $node .= '
'.$spacer.'  '; + $node .= ''.$nodetitleDisplay.$weblinkDisplay.' '.$pageIdDisplay.'
'; $output .= $node; makeHTML($indent+1,$id,$expandAll,$theme); $node = '
'; } else { - $node .= '
'.$spacer.'  '; - $node .= ''.$nodetitleDisplay.$weblinkDisplay.' '.$pageIdDisplay.'
'; + $node .= '
'.$spacer.'  '; + $node .= ''.$nodetitleDisplay.$weblinkDisplay.' '.$pageIdDisplay.'
'; array_push($closed2, $id); } } diff --git a/manager/includes/document.parser.class.inc.php b/manager/includes/document.parser.class.inc.php index e095a859..c23cc1ec 100644 --- a/manager/includes/document.parser.class.inc.php +++ b/manager/includes/document.parser.class.inc.php @@ -92,12 +92,12 @@ function __call($method_name,$arguments) { if($error_type==1) { $title = 'Call deprecated method'; - $msg = htmlspecialchars("\$modx->{$method_name}() is deprecated function"); + $msg = $this->htmlspecialchars("\$modx->{$method_name}() is deprecated function"); } else { $title = 'Call undefined method'; - $msg = htmlspecialchars("\$modx->{$method_name}() is undefined function"); + $msg = $this->htmlspecialchars("\$modx->{$method_name}() is undefined function"); } $info = debug_backtrace(); $m[] = $msg; @@ -1221,15 +1221,43 @@ function toAlias($text) { return str_replace(array('.xml'.$suff,'.rss'.$suff,'.js'.$suff,'.css'.$suff),array('.xml','.rss','.js','.css'),$text); } + /** + * makeFriendlyURL + * + * @desc Create an URL. + * + * @param $pre {string} - Friendly URL Prefix. @required + * @param $suff {string} - Friendly URL Suffix. @required + * @param $alias {string} - Full document path. @required + * @param $isfolder {0; 1} - Is it a folder? Default: 0. + * @param $id {integer} - Document id. Default: 0. + * + * @return {string} - Result URL. + */ function makeFriendlyURL($pre, $suff, $alias, $isfolder=0, $id=0) { - - if ($id == $this->config['site_start'] && $this->config['seostrict']==='1') {return $this->config['base_url'];} + if ($id == $this->config['site_start'] && $this->config['seostrict'] === '1'){ + $url = $this->config['base_url']; + }else{ $Alias = explode('/',$alias); $alias = array_pop($Alias); $dir = implode('/', $Alias); unset($Alias); - if($this->config['make_folders']==='1' && $isfolder==1) $suff = '/'; - return ($dir != '' ? "$dir/" : '') . $pre . $alias . $suff; + + if($this->config['make_folders'] === '1' && $isfolder == 1){$suff = '/';} + + $url = ($dir != '' ? $dir.'/' : '').$pre.$alias.$suff; + } + + $evtOut = $this->invokeEvent('OnMakeDocUrl', array( + 'id' => $id, + 'url' => $url + )); + + if (is_array($evtOut) && count($evtOut) > 0){ + $url = array_pop($evtOut); + } + + return $url; } /** @@ -2275,49 +2303,59 @@ function clearCache($type='', $report=false) { } /** - * Create an URL for the given document identifier. The url prefix and - * postfix are used, when friendly_url is active. + * makeUrl * - * @param int $id The document identifier - * @param string $alias The alias name for the document - * Default: Empty string - * @param string $args The paramaters to add to the URL - * Default: Empty string - * @param string $scheme With full as valus, the site url configuration is - * used - * Default: Empty string - * @return string + * @desc Create an URL for the given document identifier. The url prefix and postfix are used, when “friendly_url” is active. + * + * @param $id {integer} - The document identifier. @required + * @param $alias {string} - The alias name for the document. Default: ''. + * @param $args {string} - The paramaters to add to the URL. Default: ''. + * @param $scheme {string} - With full as valus, the site url configuration is used. Default: ''. + * + * @return {string} - Result URL. */ function makeUrl($id, $alias= '', $args= '', $scheme= '') { $url= ''; $virtualDir= $this->config['virtual_dir']; $f_url_prefix = $this->config['friendly_url_prefix']; $f_url_suffix = $this->config['friendly_url_suffix']; + if (!is_numeric($id)) { $this->messageQuit("`{$id}` is not numeric and may not be passed to makeUrl()"); } + if ($args !== '') { // add ? or & to $args if missing $args= ltrim($args, '?&'); $_ = strpos($f_url_prefix, '?'); + if($this->config['friendly_urls'] === '1' && $_ === false) { $args= "?{$args}"; + }else{ + $args = "&{$args}"; } - else $args= "&{$args}"; } + if ($id != $this->config['site_start']) { if ($this->config['friendly_urls'] == 1 && $alias != '') { } elseif ($this->config['friendly_urls'] == 1 && $alias == '') { $alias = $id; $alPath = ''; + if ($this->config['friendly_alias_urls'] == 1) { $al = $this->aliasListing[$id]; - if ($al['isfolder'] === 1 && $this->config['make_folders'] === '1') + + if ($al['isfolder'] === 1 && $this->config['make_folders'] === '1'){ $f_url_suffix = '/'; + } + $alPath = !empty ($al['path']) ? $al['path'] . '/' : ''; - if ($al && $al['alias']) + + if ($al && $al['alias']){ $alias = $al['alias']; } + } + $alias = $alPath . $f_url_prefix . $alias . $f_url_suffix; $url = "{$alias}{$args}"; } else { @@ -2326,7 +2364,9 @@ function makeUrl($id, $alias= '', $args= '', $scheme= '') { } else { $url = $args; } + $host= $this->config['base_url']; + // check if scheme argument has been set if ($scheme != '') { // for backward compatibility - check if the desired scheme is different than the current scheme @@ -2334,7 +2374,7 @@ function makeUrl($id, $alias= '', $args= '', $scheme= '') { $scheme= ($_SERVER['HTTPS'] ? 'http' : 'https'); } - // to-do: check to make sure that $site_url incudes the url :port (e.g. :8080) + //TODO: check to make sure that $site_url incudes the url :port (e.g. :8080) $host= $scheme == 'full' ? $this->config['site_url'] : $scheme . '://' . $_SERVER['HTTP_HOST'] . $host; } @@ -2342,11 +2382,23 @@ function makeUrl($id, $alias= '', $args= '', $scheme= '') { if ($this->config['seostrict']=='1'){ $url = $this->toAlias($url); } + if ($this->config['xhtml_urls']) { - return preg_replace("/&(?!amp;)/","&", $host . $virtualDir . $url); + $url = preg_replace("/&(?!amp;)/","&", $host.$virtualDir.$url); } else { - return $host . $virtualDir . $url; + $url = $host.$virtualDir.$url; } + + $evtOut = $this->invokeEvent('OnMakeDocUrl', array( + 'id' => $id, + 'url' => $url + )); + + if (is_array($evtOut) && count($evtOut) > 0){ + $url = array_pop($evtOut); + } + + return $url; } /** @@ -3439,7 +3491,7 @@ function phpError($nr, $text, $file, $line) { } if (is_readable($file)) { $source= file($file); - $source= htmlspecialchars($source[$line -1]); + $source= $this->htmlspecialchars($source[$line -1]); } else { $source= ""; } //Error $nr in $file at $line:
$source
@@ -3451,9 +3503,9 @@ function messageQuit($msg= 'unspecified error', $query= '', $is_error= true, $nr $version= isset ($GLOBALS['modx_version']) ? $GLOBALS['modx_version'] : ''; $release_date= isset ($GLOBALS['release_date']) ? $GLOBALS['release_date'] : ''; $request_uri = "http://".$_SERVER['HTTP_HOST'].($_SERVER["SERVER_PORT"]==80?"":(":".$_SERVER["SERVER_PORT"])).$_SERVER['REQUEST_URI']; - $request_uri = htmlspecialchars($request_uri, ENT_QUOTES, $this->config['modx_charset']); - $ua = htmlspecialchars($_SERVER['HTTP_USER_AGENT'], ENT_QUOTES, $this->config['modx_charset']); - $referer = htmlspecialchars($_SERVER['HTTP_REFERER'], ENT_QUOTES, $this->config['modx_charset']); + $request_uri = $this->htmlspecialchars($request_uri, ENT_QUOTES, $this->config['modx_charset']); + $ua = $this->htmlspecialchars($_SERVER['HTTP_USER_AGENT'], ENT_QUOTES, $this->config['modx_charset']); + $referer = $this->htmlspecialchars($_SERVER['HTTP_REFERER'], ENT_QUOTES, $this->config['modx_charset']); if ($is_error) { $str = '

« MODX Parse Error »

diff --git a/manager/includes/extenders/manager.api.class.inc.php b/manager/includes/extenders/manager.api.class.inc.php index 9afe3f57..ae8bfea9 100644 --- a/manager/includes/extenders/manager.api.class.inc.php +++ b/manager/includes/extenders/manager.api.class.inc.php @@ -29,6 +29,7 @@ function initPageViewState($id=0){ // save page view state - not really necessary, function savePageViewState($id=0){ + global $_PAGE; $_SESSION["mgrPageViewSDATA"] = $_PAGE['vs']; $_SESSION["mgrPageViewSID"] = $id>0 ? $id:$this->action; } @@ -43,6 +44,7 @@ function hasFormValues() { $this->clearSavedFormValues(); } } + return false; } // saved form post from $_POST function saveFormValues($id=0){ @@ -120,8 +122,9 @@ function getUserHashAlgorithm($uid) function checkHashAlgorithm($algorithm='') { - if(empty($algorithm)) return; - + $result = false; + if (!empty($algorithm)) + { switch($algorithm) { case 'BLOWFISH_Y': @@ -140,22 +143,18 @@ function checkHashAlgorithm($algorithm='') if(defined('CRYPT_SHA256') && CRYPT_SHA256 == 1) $result = true; break; case 'MD5': - if(defined('CRYPT_MD5') && CRYPT_MD5 == 1 && PHP_VERSION != '5.3.7') - $result = true; + if (defined('CRYPT_MD5') && CRYPT_MD5 == 1 && PHP_VERSION != '5.3.7') $result = true; break; case 'UNCRYPT': $result = true; break; } - - if(!isset($result)) $result = false; - + } return $result; } function getSystemChecksum($check_files) { - global $modx; - + $_ = array(); $check_files = trim($check_files); $check_files = explode("\n", $check_files); foreach($check_files as $file) { @@ -180,12 +179,12 @@ function checkSystemChecksum() { if(!isset($modx->config['check_files_onlogin']) || empty($modx->config['check_files_onlogin'])) return '0'; $current = $this->getSystemChecksum($modx->config['check_files_onlogin']); - if(empty($current)) return; + if(empty($current)) return '0'; if(!isset($modx->config['sys_files_checksum']) || empty($modx->config['sys_files_checksum'])) { $this->setSystemChecksum($current); - return; + return '0'; } if($current===$modx->config['sys_files_checksum']) $result = '0'; else $result = 'modified'; diff --git a/manager/includes/lang/bulgarian.inc.php b/manager/includes/lang/bulgarian.inc.php index 720495e0..caf71e4c 100644 --- a/manager/includes/lang/bulgarian.inc.php +++ b/manager/includes/lang/bulgarian.inc.php @@ -2,7 +2,7 @@ /** * MODX Manager language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * @author The MODX Project Team * diff --git a/manager/includes/lang/chinese.inc.php b/manager/includes/lang/chinese.inc.php index ab879b67..49b1af33 100644 --- a/manager/includes/lang/chinese.inc.php +++ b/manager/includes/lang/chinese.inc.php @@ -2,7 +2,7 @@ /** * MODX Manager language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * @author changkong.org rerbin@gmail.com * @author modx.cn leepoooo@163.com diff --git a/manager/includes/lang/country/bulgarian_country.inc.php b/manager/includes/lang/country/bulgarian_country.inc.php index 2152727b..c3087dc3 100644 --- a/manager/includes/lang/country/bulgarian_country.inc.php +++ b/manager/includes/lang/country/bulgarian_country.inc.php @@ -2,7 +2,7 @@ /** * MODX Country list language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Bulgarian diff --git a/manager/includes/lang/country/danish_country.inc.php b/manager/includes/lang/country/danish_country.inc.php index 6fc62315..926f0fc8 100644 --- a/manager/includes/lang/country/danish_country.inc.php +++ b/manager/includes/lang/country/danish_country.inc.php @@ -2,7 +2,7 @@ /** * MODX Country list language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Danish diff --git a/manager/includes/lang/country/english_country.inc.php b/manager/includes/lang/country/english_country.inc.php index 6295b4a5..677c9f05 100644 --- a/manager/includes/lang/country/english_country.inc.php +++ b/manager/includes/lang/country/english_country.inc.php @@ -2,7 +2,7 @@ /** * MODX Country list language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language English diff --git a/manager/includes/lang/country/finnish_country.inc.php b/manager/includes/lang/country/finnish_country.inc.php index fe06dfae..7b345f19 100644 --- a/manager/includes/lang/country/finnish_country.inc.php +++ b/manager/includes/lang/country/finnish_country.inc.php @@ -2,7 +2,7 @@ /** * MODX Country list language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Finnish diff --git a/manager/includes/lang/country/francais-utf8_country.inc.php b/manager/includes/lang/country/francais-utf8_country.inc.php index cf652464..c3ed5e37 100644 --- a/manager/includes/lang/country/francais-utf8_country.inc.php +++ b/manager/includes/lang/country/francais-utf8_country.inc.php @@ -2,7 +2,7 @@ /** * MODX Country list language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language French diff --git a/manager/includes/lang/country/german_country.inc.php b/manager/includes/lang/country/german_country.inc.php index 7aacb2db..39690126 100644 --- a/manager/includes/lang/country/german_country.inc.php +++ b/manager/includes/lang/country/german_country.inc.php @@ -2,7 +2,7 @@ /** * MODX Country list language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language German diff --git a/manager/includes/lang/country/italian_country.inc.php b/manager/includes/lang/country/italian_country.inc.php index 56cf3aba..79d73c88 100644 --- a/manager/includes/lang/country/italian_country.inc.php +++ b/manager/includes/lang/country/italian_country.inc.php @@ -2,7 +2,7 @@ /** * MODX Country list language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * @author luigif * @author Diego Meozzi diff --git a/manager/includes/lang/country/japanese-utf8_country.inc.php b/manager/includes/lang/country/japanese-utf8_country.inc.php old mode 100644 new mode 100755 index 39d29165..a3a5c4df --- a/manager/includes/lang/country/japanese-utf8_country.inc.php +++ b/manager/includes/lang/country/japanese-utf8_country.inc.php @@ -2,7 +2,7 @@ /** * MODX Country list language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Japanese diff --git a/manager/includes/lang/country/nederlands-utf8_country.inc.php b/manager/includes/lang/country/nederlands-utf8_country.inc.php index 86566ff9..44c9d7ec 100644 --- a/manager/includes/lang/country/nederlands-utf8_country.inc.php +++ b/manager/includes/lang/country/nederlands-utf8_country.inc.php @@ -2,7 +2,7 @@ /** * MODX Country list language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Dutch diff --git a/manager/includes/lang/country/persian_country.inc.php b/manager/includes/lang/country/persian_country.inc.php old mode 100644 new mode 100755 index b75869c7..8081917b --- a/manager/includes/lang/country/persian_country.inc.php +++ b/manager/includes/lang/country/persian_country.inc.php @@ -2,7 +2,7 @@ /** * MODX Country list language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * @author Mohsen (MotSmart), www.modxcms.ir * diff --git a/manager/includes/lang/country/polish-utf8_country.inc.php b/manager/includes/lang/country/polish-utf8_country.inc.php index 1d1eb935..cc7bbf85 100644 --- a/manager/includes/lang/country/polish-utf8_country.inc.php +++ b/manager/includes/lang/country/polish-utf8_country.inc.php @@ -2,7 +2,7 @@ /** * MODX Country list language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Polish diff --git a/manager/includes/lang/country/portuguese-br-utf8_country.inc.php b/manager/includes/lang/country/portuguese-br-utf8_country.inc.php index 5530a14e..04e5faed 100644 --- a/manager/includes/lang/country/portuguese-br-utf8_country.inc.php +++ b/manager/includes/lang/country/portuguese-br-utf8_country.inc.php @@ -2,7 +2,7 @@ /** * MODX Country list language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Brazilian Portuguese diff --git a/manager/includes/lang/country/portuguese_country.inc.php b/manager/includes/lang/country/portuguese_country.inc.php index 5530a14e..04e5faed 100644 --- a/manager/includes/lang/country/portuguese_country.inc.php +++ b/manager/includes/lang/country/portuguese_country.inc.php @@ -2,7 +2,7 @@ /** * MODX Country list language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Brazilian Portuguese diff --git a/manager/includes/lang/country/russian-UTF8_country.inc.php b/manager/includes/lang/country/russian-UTF8_country.inc.php old mode 100644 new mode 100755 index 60d6d67c..283bb75b --- a/manager/includes/lang/country/russian-UTF8_country.inc.php +++ b/manager/includes/lang/country/russian-UTF8_country.inc.php @@ -2,7 +2,7 @@ /** * MODX Country list language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Russian diff --git a/manager/includes/lang/country/spanish-utf8_country.inc.php b/manager/includes/lang/country/spanish-utf8_country.inc.php index f57389fb..29af2969 100644 --- a/manager/includes/lang/country/spanish-utf8_country.inc.php +++ b/manager/includes/lang/country/spanish-utf8_country.inc.php @@ -2,7 +2,7 @@ /** * MODX Country list language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Spanish diff --git a/manager/includes/lang/country/svenska-utf8_country.inc.php b/manager/includes/lang/country/svenska-utf8_country.inc.php old mode 100644 new mode 100755 index 0ce278a5..a849e88a --- a/manager/includes/lang/country/svenska-utf8_country.inc.php +++ b/manager/includes/lang/country/svenska-utf8_country.inc.php @@ -2,7 +2,7 @@ /** * MODX Country list language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * * @language Swedish diff --git a/manager/includes/lang/czech.inc.php b/manager/includes/lang/czech.inc.php index a3520905..6c6500ab 100644 --- a/manager/includes/lang/czech.inc.php +++ b/manager/includes/lang/czech.inc.php @@ -2,7 +2,7 @@ /** * MODX Manager language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * @author modxcms.cz * diff --git a/manager/includes/lang/danish.inc.php b/manager/includes/lang/danish.inc.php index abaf8c4e..272851ec 100644 --- a/manager/includes/lang/danish.inc.php +++ b/manager/includes/lang/danish.inc.php @@ -2,7 +2,7 @@ /** * MODX Manager language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * @author Henrik Nielsen * @author Mads Vestmar diff --git a/manager/includes/lang/english-british.inc.php b/manager/includes/lang/english-british.inc.php index 089a7c03..c8a797e8 100755 --- a/manager/includes/lang/english-british.inc.php +++ b/manager/includes/lang/english-british.inc.php @@ -2,7 +2,7 @@ /** * MODX Manager language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * @author The MODX Project Team * diff --git a/manager/includes/lang/english.inc.php b/manager/includes/lang/english.inc.php index b0834947..922bdb01 100644 --- a/manager/includes/lang/english.inc.php +++ b/manager/includes/lang/english.inc.php @@ -2,7 +2,7 @@ /** * MODX Manager language file * - * @version 1.0.14 + * @version 1.0.15 * @date 2014/02/24 * @author The MODX Project Team * @@ -672,6 +672,7 @@ $_lang["plugin_priority"] = 'Edit Plugin Execution Order by Event'; $_lang["plugin_priority_instructions"] = 'Drag to reorder the Plugins under each Event header. The first plugin to execute should go at the top.'; $_lang["plugin_priority_title"] = 'Plugin Execution Order'; +$_lang["purge_plugin"] = 'Purge obsolete plugins'; $_lang["plugin_title"] = 'Create/edit Plugin'; $_lang["preview"] = 'Preview'; $_lang["preview_msg"] = 'This is a preview of your last saved changes. Click here to Save and Refresh your current changes'; diff --git a/manager/includes/lang/errormsg/english.inc.php b/manager/includes/lang/errormsg/english.inc.php deleted file mode 100644 index 5e9d7b58..00000000 --- a/manager/includes/lang/errormsg/english.inc.php +++ /dev/null @@ -1,38 +0,0 @@ -' . $contents); -?> \ No newline at end of file diff --git a/manager/includes/lang/errormsg/russian-UTF8.inc.php b/manager/includes/lang/errormsg/russian-UTF8.inc.php deleted file mode 100644 index 866f79e5..00000000 --- a/manager/includes/lang/errormsg/russian-UTF8.inc.php +++ /dev/null @@ -1,38 +0,0 @@ - window.location.href = "browse.php?"; diff --git a/manager/processors/cache_sync.class.processor.php b/manager/processors/cache_sync.class.processor.php index 2984bcbb..37ae88f3 100644 --- a/manager/processors/cache_sync.class.processor.php +++ b/manager/processors/cache_sync.class.processor.php @@ -147,7 +147,7 @@ function buildCache($modx) { $config = array(); $tmpPHP .= '$c=&$this->config;'."\n"; while(list($key,$value) = $modx->db->getRow($rs,'num')) { - $tmpPHP .= '$c[\''.$key.'\']'.' = "'.$this->escapeDoubleQuotes($value)."\";\n"; + $tmpPHP .= '$c[\'' . $this->escapeSingleQuotes($key) . '\']' . ' = "' . $this->escapeDoubleQuotes($value) . "\";\n"; $config[$key] = $value; } @@ -162,29 +162,26 @@ function buildCache($modx) { if ($config['friendly_urls'] == 1 && $config['use_alias_path'] == 1) { $tmpPath = $this->getParents($tmp1['parent']); $alias= (strlen($tmpPath) > 0 ? "$tmpPath/" : '').$tmp1['alias']; - $alias= $modx->db->escape($alias); - $tmpPHP .= '$d[\''.$alias.'\']'." = ".$tmp1['id'].";\n"; + $tmpPHP .= '$d[\'' . $this->escapeSingleQuotes($alias) . '\']' . " = " . $tmp1['id'] . ";\n"; + } else { + $tmpPHP .= '$d[\'' . $this->escapeSingleQuotes($tmp1['alias']) . '\']' . " = " . $tmp1['id'] . ";\n"; } - else { - $tmpPHP .= '$d[\''.$modx->db->escape($tmp1['alias']).'\']'." = ".$tmp1['id'].";\n"; - } - $tmpPHP .= '$a[' . $tmp1['id'] . ']'." = array('id' => ".$tmp1['id'].", 'alias' => '".$modx->db->escape($tmp1['alias'])."', 'path' => '" . $modx->db->escape($tmpPath)."', 'parent' => " . $tmp1['parent']. ", 'isfolder' => " . $modx->db->escape($tmp1['isfolder']) . ");\n"; + $tmpPHP .= '$a[' . $tmp1['id'] . ']' . " = array('id' => " . $tmp1['id'] . ", 'alias' => '" . $this->escapeSingleQuotes($tmp1['alias']) . "', 'path' => '" . $this->escapeSingleQuotes($tmpPath) . "', 'parent' => " . $tmp1['parent'] . ", 'isfolder' => " . $tmp1['isfolder'] . ");\n"; $tmpPHP .= '$m[]'." = array('".$tmp1['parent']."' => '".$tmp1['id']."');\n"; } - // get content types $rs = $modx->db->select('id, contentType', $modx->getFullTableName('site_content'), "contentType != 'text/html'"); $tmpPHP .= '$c = &$this->contentTypes;' . "\n"; while ($tmp1 = $modx->db->getRow($rs)) { - $tmpPHP .= '$c['.$tmp1['id'].']'." = '".$tmp1['contentType']."';\n"; + $tmpPHP .= '$c[' . $tmp1['id'] . ']' . " = '" . $this->escapeSingleQuotes($tmp1['contentType']) . "';\n"; } // WRITE Chunks to cache file $rs = $modx->db->select('*', $modx->getFullTableName('site_htmlsnippets')); $tmpPHP .= '$c = &$this->chunkCache;' . "\n"; while ($tmp1 = $modx->db->getRow($rs)) { - $tmpPHP .= '$c[\''.$modx->db->escape($tmp1['name']).'\']'." = '".$this->escapeSingleQuotes($tmp1['snippet'])."';\n"; + $tmpPHP .= '$c[\'' . $this->escapeSingleQuotes($tmp1['name']) . '\']' . " = '" . $this->escapeSingleQuotes($tmp1['snippet']) . "';\n"; } // WRITE snippets to cache file @@ -195,10 +192,10 @@ function buildCache($modx) { ); $tmpPHP .= '$s = &$this->snippetCache;' . "\n"; while ($tmp1 = $modx->db->getRow($rs)) { - $tmpPHP .= '$s[\''.$modx->db->escape($tmp1['name']).'\']'." = '".$this->escapeSingleQuotes($tmp1['snippet'])."';\n"; - // Raymond: save snippet properties to cache - if ($tmp1['properties']!=""||$tmp1['sharedproperties']!="") $tmpPHP .= '$s[\''.$tmp1['name'].'Props\']'." = '".$this->escapeSingleQuotes($tmp1['properties']." ".$tmp1['sharedproperties'])."';\n"; - // End mod + $tmpPHP .= '$s[\'' . $this->escapeSingleQuotes($tmp1['name']) . '\']' . " = '" . $this->escapeSingleQuotes($tmp1['snippet']) . "';\n"; + if ($tmp1['properties'] != '' || $tmp1['sharedproperties'] != '') { + $tmpPHP .= '$s[\'' . $this->escapeSingleQuotes($tmp1['name']) . 'Props\']' . " = '" . $this->escapeSingleQuotes($tmp1['properties'] . " " . $tmp1['sharedproperties']) . "';\n"; + } } // WRITE plugins to cache file @@ -209,8 +206,10 @@ function buildCache($modx) { 'sp.disabled=0'); $tmpPHP .= '$p = &$this->pluginCache;' . "\n"; while ($tmp1 = $modx->db->getRow($rs)) { - $tmpPHP .= '$p[\''.$modx->db->escape($tmp1['name']).'\']'." = '".$this->escapeSingleQuotes($tmp1['plugincode'])."';\n"; - if ($tmp1['properties']!=''||$tmp1['sharedproperties']!='') $tmpPHP .= '$p[\''.$tmp1['name'].'Props\']'." = '".$this->escapeSingleQuotes($tmp1['properties'].' '.$tmp1['sharedproperties'])."';\n"; + $tmpPHP .= '$p[\'' . $this->escapeSingleQuotes($tmp1['name']) . '\']' . " = '" . $this->escapeSingleQuotes($tmp1['plugincode']) . "';\n"; + if ($tmp1['properties'] != '' || $tmp1['sharedproperties'] != '') { + $tmpPHP .= '$p[\'' . $this->escapeSingleQuotes($tmp1['name']) . 'Props\']' . " = '" . $this->escapeSingleQuotes($tmp1['properties'] . ' ' . $tmp1['sharedproperties']) . "';\n"; + } } @@ -226,11 +225,13 @@ function buildCache($modx) { ); $tmpPHP .= '$e = &$this->pluginEvent;' . "\n"; while ($evt = $modx->db->getRow($rs)) { - if(!$events[$evt['evtname']]) $events[$evt['evtname']] = array(); + if (!$events[$evt['evtname']]) { + $events[$evt['evtname']] = array(); + } $events[$evt['evtname']][] = $evt['name']; } foreach($events as $evtname => $pluginnames) { - $tmpPHP .= '$e[\''.$evtname.'\'] = array(\''.implode("','",$this->escapeSingleQuotes($pluginnames))."');\n"; + $tmpPHP .= '$e[\'' . $this->escapeSingleQuotes($evtname) . '\'] = array(\'' . implode("','", $this->escapeSingleQuotes($pluginnames)) . "');\n"; } // close and write the file diff --git a/manager/processors/purge_plugin.processor.php b/manager/processors/purge_plugin.processor.php new file mode 100644 index 00000000..51e2bb2c --- /dev/null +++ b/manager/processors/purge_plugin.processor.php @@ -0,0 +1,44 @@ +hasPermission('delete_plugin')) { + $e->setError(3); + $e->dumpError(); +} + +$tbl_site_plugins = $modx->getFullTablename('site_plugins'); +$tbl_site_plugin_events = $modx->getFullTablename('site_plugin_events'); + +$rs = $modx->db->query("SELECT id FROM {$tbl_site_plugins} t1 WHERE disabled = 1 AND name IN (SELECT name FROM {$tbl_site_plugins} t2 WHERE t1.name = t2.name AND t1.id != t2.id)"); + +while($row = $modx->db->getRow($rs)) { + + $id = $row['id']; + + // invoke OnBeforePluginFormDelete event + $modx->invokeEvent('OnBeforePluginFormDelete', array('id'=> $id)); + + // delete the plugin. + if (!$modx->db->delete($tbl_site_plugins, "id={$id}")) { + echo "Something went wrong while trying to delete plugin {$id}"; + exit; + } else { + // delete the plugin events. + if (!$modx->db->delete($tbl_site_plugin_events, "pluginid={$id}")) { + echo "Something went wrong while trying to delete the plugin events for plugin {$id}"; + exit; + } else { + // invoke OnPluginFormDelete event + $modx->invokeEvent('OnPluginFormDelete', array('id'=>$id)); + } + } +} + +// empty cache +include_once "cache_sync.class.processor.php"; +$sync = new synccache(); +$sync->setCachepath("../assets/cache/"); +$sync->setReport(false); +$sync->emptyCache(); // first empty the cache + +header('Location: index.php?a=76'); diff --git a/manager/processors/save_web_user.processor.php b/manager/processors/save_web_user.processor.php index f11d99c6..d87635b5 100644 --- a/manager/processors/save_web_user.processor.php +++ b/manager/processors/save_web_user.processor.php @@ -347,8 +347,7 @@ function save_user_quoted_printable($string) { function sendMailMessage($email, $uid, $pwd, $ufn) { global $modx,$_lang,$websignupemail_message; global $emailsubject, $emailsender; - global $site_name; - $manager_url = MODX_MANAGER_URL; + global $site_name, $site_url; $message = sprintf($websignupemail_message, $uid, $pwd); // use old method // replace placeholders $message = str_replace("[+uid+]", $uid, $message); @@ -357,7 +356,7 @@ function sendMailMessage($email, $uid, $pwd, $ufn) { $message = str_replace("[+sname+]", $site_name, $message); $message = str_replace("[+saddr+]", $emailsender, $message); $message = str_replace("[+semail+]", $emailsender, $message); - $message = str_replace("[+surl+]", $manager_url, $message); + $message = str_replace("[+surl+]", $site_url, $message); $param = array(); $param['from'] = "{$site_name}<{$emailsender}>";