Skip to content
This repository was archived by the owner on Mar 8, 2021. It is now read-only.

Commit 41267f9

Browse files
authored
Merge pull request #1103 from modxcms/develop
1.2.1
2 parents d3ee7a5 + 252e3dd commit 41267f9

File tree

135 files changed

+9730
-7686
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+9730
-7686
lines changed

assets/cache/images/.htaccess

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,2 @@
1-
<IfModule !mod_authz_core.c>
2-
Order allow,deny
3-
Allow from all
4-
</IfModule>
5-
6-
<IfModule mod_authz_core.c>
7-
## configuration for Apache 2.4
8-
Require all granted
9-
</IfModule>
1+
order deny,allow
2+
allow from all

assets/docs/changelog.txt

Lines changed: 213 additions & 20 deletions
Large diffs are not rendered by default.

assets/images/logo.png

-2.74 KB
Binary file not shown.

assets/js/jquery.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/jquery/jquery.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/lib/MODxAPI/modResource.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,11 +552,11 @@ public function save($fire_events = false, $clearCache = false)
552552
$this->field[$key] = $value;
553553
}
554554
switch (true) {
555-
case $key == 'parent' || (!$this->newDoc && $this->isChanged($key)):
555+
case $key == 'parent':
556556
$parent = (int)$this->get($key);
557557
$q = $this->query("SELECT count(`id`) FROM {$this->makeTable('site_content')} WHERE `id`='{$parent}'");
558558
if ($this->modx->db->getValue($q) != 1) {
559-
$parent = $value;
559+
$parent = 0;
560560
}
561561
$this->field[$key] = $parent;
562562
$this->Uset($key);

assets/lib/SimpleTab/controller.abstract.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function __construct(\DocumentParser $modx)
5252
$this->FS = \Helpers\FS::getInstance();
5353
$this->modx = $modx;
5454
$this->params = $modx->event->params;
55-
$this->rid = isset($_POST[$this->rfName]) ? (int)$_POST[$this->rfName] : 0;
55+
$this->rid = isset($_REQUEST[$this->rfName]) ? (int)$_REQUEST[$this->rfName] : 0;
5656
}
5757

5858
public function callExit()

assets/lib/class.modxRTEbridge.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -573,10 +573,10 @@ public function getModxSettings()
573573
$row['default'] = isset($this->gSettingsDefaultValues[$name]) ? '<span class="default-val" style="margin:0.5em 0;float:left;">' . $this->lang('default') . '<i>' . $this->gSettingsDefaultValues[$name] . '</i></span>' : '';
574574

575575
// Simple nested parsing
576-
$output = $modx->parseText($settingsRowTpl, $row); // Replace general translations
577-
$output = $modx->parseText($output, $ph); // Replace values / settings
578-
$output = $modx->parseText($output, $row); // Replace new PHs from values / settings
579-
$output = $modx->parseText($output, $ph); // Replace last values / settings
576+
$output = $this->parsePlaceholders($settingsRowTpl, $row); // Replace general translations
577+
$output = $this->parsePlaceholders($output, $ph); // Replace values / settings
578+
$output = $this->parsePlaceholders($output, $row); // Replace new PHs from values / settings
579+
$output = $this->parsePlaceholders($output, $ph); // Replace last values / settings
580580

581581
$ph['rows'] .= $output . "\n";
582582
};
@@ -585,12 +585,17 @@ public function getModxSettings()
585585

586586
$ph['editorLogo'] = !empty($this->pluginParams['editorLogo']) ? '<img src="' . $this->pluginParams['base_url'] . $this->pluginParams['editorLogo'] . '" style="max-height:50px;width:auto;margin-right:50px;" />' : '';
587587

588-
$settingsBody = $modx->parseText($settingsBody, $ph);
588+
$settingsBody = $this->parsePlaceholders($settingsBody, $ph);
589589
$settingsBody = $this->replaceTranslations($settingsBody);
590590

591591
return $settingsBody;
592592
}
593593

594+
public function parsePlaceholders($content, $ph) {
595+
foreach($ph as $key=>$value) $content = str_replace('[+'.$key.'+]', $value, $content);
596+
return $content;
597+
}
598+
594599
// Replace all translation-placeholders
595600
public function replaceTranslations($output)
596601
{

assets/modules/docmanager/classes/docmanager.class.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,19 @@ function getFileContents($file) {
7272
function loadTemplates() {
7373
$this->fileGetContents('main.tpl');
7474
}
75-
75+
7676
function parseTemplate($tpl, $values = array()) {
7777
$tpl = array_key_exists($tpl, $this->fileRegister) ? $this->fileRegister[$tpl] : $this->getFileContents($tpl);
7878
if($tpl) {
7979
if(strpos($tpl,'</body>')!==false) {
8080
if(!isset($this->modx->config['mgr_date_picker_path'])) $this->modx->config['mgr_date_picker_path'] = 'media/script/air-datepicker/datepicker.inc.php';
8181
$dp = $this->modx->manager->loadDatePicker($this->modx->config['mgr_date_picker_path']);
8282
$tpl = str_replace('</body>',$dp.'</body>',$tpl);
83-
}
83+
global $modx;
84+
$evtOut = $modx->invokeEvent('OnManagerMainFrameHeaderHTMLBlock');
85+
$onManagerMainFrameHeaderHTMLBlock = is_array($evtOut) ? implode("\n", $evtOut) : '';
86+
$tpl = str_replace('[+onManagerMainFrameHeaderHTMLBlock+]',$onManagerMainFrameHeaderHTMLBlock,$tpl);
87+
}
8488
if(!isset($this->modx->config['mgr_jquery_path'])) $this->modx->config['mgr_jquery_path'] = 'media/script/jquery/jquery.min.js';
8589
$tpl = $this->modx->mergeSettingsContent($tpl);
8690
foreach ($values as $key => $value) {

assets/modules/docmanager/templates/changeauthors.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<br /><h3>[+lang.DM_adjust_authors_header+]</h3><br />
1+
<br /><h3><i class="fa fa-user" aria-hidden="true"></i> [+lang.DM_adjust_authors_header+]</h3><br />
22
<p>[+lang.DM_adjust_authors_desc+]</p><br />
33

4-
<form style="margin-left:50px;" name="authors" method="post" action="">
4+
<form name="authors" method="post" action="">
55
<label for="author_createdby">[+lang.DM_adjust_authors_createdby+]</label>
66
<select name="author_createdby" style="width:50%">
77
<option value="0">[+lang.DM_adjust_authors_noselection+]</option>

0 commit comments

Comments
 (0)