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

#10073 #130

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/plugins/qm/qm.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function Qm(&$modx, $jqpath='', $loadmanagerjq='', $loadfrontendjq='', $noconfli
$this->loadtb = $loadtb;
$this->tbwidth = $tbwidth;
$this->tbheight = $tbheight;
$this->usemm = $usemm;
$this->usemm = null;
$this->hidefields = $hidefields;
$this->hidetabs = $hidetabs;
$this->hidesections = $hidesections;
Expand Down
4 changes: 2 additions & 2 deletions manager/actions/messages.static.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<?php if(isset($_REQUEST['id']) && $_REQUEST['m']=='r') { ?>
<div class="sectionHeader"><?php echo $_lang['messages_read_message']; ?></div><div class="sectionBody" id="lyr3">
<?php
$sql = "SELECT * FROM $dbase.`".$table_prefix."user_messages` WHERE $dbase.`".$table_prefix."user_messages`.id=".$_REQUEST['id'];
$sql = "SELECT * FROM $dbase.`".$table_prefix."user_messages` WHERE $dbase.`".$table_prefix."user_messages`.id=".(int)$_REQUEST['id'];
$rs = mysql_query($sql);
$limit = mysql_num_rows($rs);
if($limit!=1) {
Expand Down Expand Up @@ -109,7 +109,7 @@
if( !isset( $_REQUEST['int_cur_position'] ) || $_REQUEST['int_cur_position'] == 0 ){
$int_cur_position = 0;
} else {
$int_cur_position = $_REQUEST['int_cur_position'];
$int_cur_position = (int)$_REQUEST['int_cur_position'];
}

// Number of result to display on the page, will be in the LIMIT of the sql query also
Expand Down
2 changes: 1 addition & 1 deletion manager/frames/1.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
if(!isset($modx->config['manager_tree_width'])) $modx->config['manager_tree_width'] = '260';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html <?php echo ($modx_textdir ? 'dir="rtl" lang="' : 'lang="').$mxla.'" xml:lang="'.$mxla.'"'; ?>>
<html <?php echo (isset($modx_textdir) && $modx_textdir ? 'dir="rtl" lang="' : 'lang="').$mxla.'" xml:lang="'.$mxla.'"'; ?>>
<head>
<title><?php echo $site_name?> - (MODX CMS Manager)</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $modx_manager_charset?>" />
Expand Down
1 change: 1 addition & 0 deletions manager/frames/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
if (!array_key_exists('mail_check_timeperiod', $modx->config) || !is_numeric($modx->config['mail_check_timeperiod'])) {
$modx->config['mail_check_timeperiod'] = 5;
}
$modx_textdir = isset($modx_textdir) ? $modx_textdir : null;
if ($manager_theme) $manager_theme .= '/';
$mxla = $modx_lang_attribute ? $modx_lang_attribute : 'en';
?>
Expand Down
348 changes: 174 additions & 174 deletions manager/frames/nodes.php

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions manager/frames/tree.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the MODx Content Manager instead of accessing this file directly.");

$theme = $manager_theme ? "$manager_theme/":"";

$modx_textdir = isset($modx_textdir) ? $modx_textdir : null;
function constructLink($action, $img, $text, $allowed) {
if($allowed==1) { ?>
<div class="menuLink" onclick="menuHandler(<?php echo $action ; ?>); hideMenu();">
Expand Down Expand Up @@ -33,15 +33,15 @@ function constructLink($action, $img, $text, $allowed) {
var i = new Image(18,18);
i.src="<?php echo $_style["tree_page"]?>";
i = new Image(18,18);
i.src="<?php echo $_style["tree_globe"]?>";
i.src="<?php echo isset($_style["tree_globe"]) ? $_style["tree_globe"] : $_style["tree_page"]; ?>";
i = new Image(18,18);
i.src="<?php echo $_style["tree_minusnode"]?>";
i.src="<?php echo $_style["tree_minusnode"] ?>";
i = new Image(18,18);
i.src="<?php echo $_style["tree_plusnode"]?>";
i.src="<?php echo $_style["tree_plusnode"] ?>";
i = new Image(18,18);
i.src="<?php echo $_style["tree_folderopen"]?>";
i.src="<?php echo isset($_style["tree_folderopen"]) ? $_style["tree_folderopen"] : $_style["tree_page"]; ?>";
i = new Image(18,18);
i.src="<?php echo $_style["tree_folder"]?>";
i.src="<?php echo isset($_style["tree_folder"]) ? $_style["tree_folder"] : $_style["tree_page"]; ?>";


var rpcNode = null;
Expand Down
66 changes: 33 additions & 33 deletions manager/includes/controls/contextmenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,50 @@
$ContextMenuCnt = 0;

class ContextMenu {
var $id;
function ContextMenu($id='',$width=120,$visible=false) {
global $ContextMenuCnt;
$ContextMenuCnt++;
$this->html = "";
$this->visible = $visible ? $visible:false;
$this->width = is_numeric($width) ? intval($width):120;
$this->id = $id ? $id:"cntxMnu".$ContextMenuCnt; // set id
}

function ContextMenu($id='',$width=120,$visible=false) {
global $ContextMenuCnt;
$ContextMenuCnt++;
$this->html = "";
$this->visible = $visible ? $visible:false;
$this->width = is_numeric($width) ? intval($width):120;
$this->id = id ? $id:"cntxMnu".$ContextMenuCnt; // set id
}

function addItem($text,$action="",$img="",$disabled=0){
global $base_url, $manager_theme;
if(!$img) $img = $base_url.$_style['tx'];
if(substr($action,0,3)=="js:") $action = substr($action,3);
else if(substr($action,0,3)=="hl:") $action = "window.location.href='".substr($action,3)."'";
else $action = "window.location.href='".$action."'";
$action=" onmouseover=\"this.className='cntxMnuItemOver';\" onmouseout=\"this.className='cntxMnuItem';\" onclick=\"$action; hideCntxMenu('".$this->id."');\"";
if ($disabled) $action="";
$this->html .= "
function addItem($text,$action="",$img="",$disabled=0){
global $base_url, $manager_theme;
if(!$img) $img = $base_url.$_style['tx'];
if(substr($action,0,3)=="js:") $action = substr($action,3);
else if(substr($action,0,3)=="hl:") $action = "window.location.href='".substr($action,3)."'";
else $action = "window.location.href='".$action."'";
$action=" onmouseover=\"this.className='cntxMnuItemOver';\" onmouseout=\"this.className='cntxMnuItem';\" onclick=\"$action; hideCntxMenu('".$this->id."');\"";
if ($disabled) $action="";
$this->html .= "
<div class='".($disabled ? "cntxMnuItemDisabled":"cntxMnuItem")."' $action>
<img src='$img' width='16' height='16' align='absmiddle' />&nbsp;$text
</div>
";
}
}

function addSeparator(){
$this->html .= "
function addSeparator(){
$this->html .= "
<div class='cntxMnuSeparator'></div>
";
}
}

function render() {
global $modx;
global $ContextMenuScript;
function render() {
global $modx;
global $ContextMenuScript;

$html = $ContextMenuScript.
"<div id='".$this->id."' class='contextMenu' style='width:".$this->width."px; visibility:".($this->visible ?'visible':'hidden')."'>".$this->html."</div>";
$ContextMenuScript = ""; // reset css
return $html;
}
$html = $ContextMenuScript.
"<div id='".$this->id."' class='contextMenu' style='width:".$this->width."px; visibility:".($this->visible ?'visible':'hidden')."'>".$this->html."</div>";
$ContextMenuScript = ""; // reset css
return $html;
}

function getClientScriptObject(){
return "getCntxMenu('".$this->id."')";
}
function getClientScriptObject(){
return "getCntxMenu('".$this->id."')";
}
}

$ContextMenuScript = <<<BLOCK
Expand Down
Loading