Esempio n. 1
0
if (!$fp->canAccessFileManager()) {
	die(t("Access Denied."));
}

if ($_POST['task'] == 'save_search') {
	Loader::model('file_set');
	Loader::model('file_list');
	$cnt = Loader::controller('/dashboard/files/search');
	$fileList = $cnt->getRequestedSearchResults();
	$req = $fileList->getSearchRequest();
	$colset = FileManagerColumnSet::getCurrent();
	
	if ($req['ccm_order_by'] != '' && $req['ccm_order_dir'] != '') {
		$colset->setDefaultSortColumn($colset->getColumnByKey($req['ccm_order_by']), $req['ccm_order_dir']);
	}
	$fsa = FileSetSavedSearch::add(Loader::helper('text')->entities($_POST['fsName']), $req, $colset);
	print $fsa->getFileSetID();
	exit;
}

?>

<div class="ccm-ui">

<h3><?php 
echo t('Save Search');
?>
</h3>

<form id="ccm-<?php 
echo $searchInstance;
Esempio n. 2
0
$vt = Loader::helper('validation/token');
$fp = FilePermissions::getGlobal();
if (!$fp->canAccessFileManager()) {
    die(_("Access Denied."));
}
if ($_POST['task'] == 'save_search') {
    Loader::model('file_set');
    Loader::model('file_list');
    $cnt = Loader::controller('/dashboard/files/search');
    $fileList = $cnt->getRequestedSearchResults();
    $req = $fileList->getSearchRequest();
    $colset = FileManagerColumnSet::getCurrent();
    if ($req['ccm_order_by'] != '' && $req['ccm_order_dir'] != '') {
        $colset->setDefaultSortColumn($colset->getColumnByKey($req['ccm_order_by']), $req['ccm_order_dir']);
    }
    $fsa = FileSetSavedSearch::add($_POST['fsName'], $req, $colset);
    print $fsa->getFileSetID();
    exit;
}
?>

<h1><?php 
echo t('Save Search');
?>
</h1>

<form id="ccm-<?php 
echo $searchInstance;
?>
-save-search-form" method="post" action="<?php 
echo REL_DIR_FILES_TOOLS_REQUIRED;