Skip to content
This repository was archived by the owner on Mar 8, 2021. It is now read-only.
Merged
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
1 change: 0 additions & 1 deletion assets/plugins/managermanager/modx.ddtools.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,6 @@ public static function getDocuments($ids = array(), $published = false, $deleted
if (count($ids) == 0){
return false;
}else{
$limit = ($limit != "") ? "LIMIT $limit" : ""; // LIMIT capabilities - rad14701
// modify field names to use sc. table reference
$fields = 'sc.' . implode(',sc.', preg_replace("/^\s/i", "", explode(',', $fields)));
$sort = ($sort == "") ? "" : 'sc.' . implode(',sc.', preg_replace("/^\s/i", "", explode(',', $sort)));
Expand Down
2 changes: 1 addition & 1 deletion manager/actions/mutate_module_resources.dynamic.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
break;
case 'del':
// convert ids to numbers
$opids = array_filter(array_map('intval', explode(',', $_REQUEST['depid']));
$opids = array_filter(array_map('intval', $_REQUEST['depid']));

// get resources that needs to be removed
$ds = $modx->db->select('*', $tbl_site_module_depobj, "id IN (".implode(",",$opids).")");
Expand Down
5 changes: 2 additions & 3 deletions manager/includes/document.parser.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2766,8 +2766,8 @@ function getTemplateVars($idnames = array(), $fields = '*', $docid = '', $publis
"{$fields}, IF(tvc.value != '', tvc.value, tv.default_text) as value",
$this->getFullTableName('site_tmplvars') . " tv
INNER JOIN " . $this->getFullTableName('site_tmplvar_templates') . " tvtpl ON tvtpl.tmplvarid = tv.id
LEFT JOIN " . $this->getFullTableName('site_tmplvar_contentvalues') . " tvc ON tvc.tmplvarid=tv.id AND tvc.contentid = '{$docid}'
{$query} AND tvtpl.templateid = '{$docRow['template']}'",
LEFT JOIN " . $this->getFullTableName('site_tmplvar_contentvalues') . " tvc ON tvc.tmplvarid=tv.id AND tvc.contentid = '{$docid}'",
"{$query} AND tvtpl.templateid = '{$docRow['template']}'",
($sort ? "{$sort} {$dir}" : "")
);

Expand Down Expand Up @@ -3041,7 +3041,6 @@ function getWebUserInfo($uid) {
INNER JOIN " . $this->getFullTableName("web_user_attributes") . " wua ON wua.internalkey=wu.id",
"wu.id='{$uid}'"
);
$rs= $this->db->query($sql);
if ($row = $this->db->getRow($rs)) {
if (!$row["usertype"])
$row["usertype"]= "web";
Expand Down
13 changes: 8 additions & 5 deletions manager/processors/delete_eventlog.processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
$modx->webAlertAndQuit($_lang["error_no_privileges"]);
}

$id = isset($_GET['id'])? intval($_GET['id']) : 0;
if($id==0) {
$modx->webAlertAndQuit($_lang["error_no_id"]);
if (isset($_GET['cls']) && $_GET['cls']==1) {
$where = '';
} else {
$id = isset($_GET['id'])? intval($_GET['id']) : 0;
if($id==0) {
$modx->webAlertAndQuit($_lang["error_no_id"]);
}
$where = "id='{$id}'";
}

$where = (isset($_GET['cls']) && $_GET['cls']==1) ? '' : "id='{$id}'";

// delete event log
$modx->db->delete($modx->getFullTableName('event_log'), $where);

Expand Down