Esempio n. 1
0
    }
}
require_once 'modules/MySettings/StoreQuery.php';
$storeQuery = new StoreQuery();
if (!isset($_REQUEST['query']) && empty($_GET['favorite'])) {
    // when we click the 'My Favorate Reports', it should not populate the StoredQuery
    $storeQuery->loadQuery($currentModule);
    $storeQuery->populateRequest();
} else {
    $storeQuery->saveFromRequest($currentModule);
}
// setup for search form
$thisMod = 'Reports';
$searchForm = new SearchFormReports($thisMod, $savedReportsSeed);
$searchForm->tabs = array(array('title' => $app_strings['LNK_BASIC_SEARCH'], 'link' => $thisMod . '|basic_search', 'key' => $thisMod . '|basic_search'), array('title' => $app_strings['LNK_ADVANCED_SEARCH'], 'link' => $thisMod . '|advanced_search', 'key' => $thisMod . '|advanced_search'));
$searchForm->populateFromRequest();
$searchForm->searchFields['module'] = $searchForm->searchFields['report_module'];
unset($searchForm->searchFields['report_module']);
$where_clauses = $searchForm->generateSearchWhere();
include 'include/modules.php';
$ACLAllowedModules = getACLAllowedModules();
$ACLUnAllowedModules = getACLDisAllowedModules();
$ACLAllowedModulesKeys = array_keys($ACLAllowedModules);
$listViewDefsNewArray = array();
$listViewDefsNewArray = sugarArrayMerge($listViewDefsNewArray, $listViewDefs);
unset($listViewDefsNewArray['Reports']['IS_EDIT']);
unset($listViewDefsNewArray['Reports']['LAST_RUN_DATE']);
foreach ($ACLUnAllowedModules as $module => $class_name) {
    array_push($where_clauses, "saved_reports.module != '{$module}'");
}
$reportModules = array();