Merge branch 'master' of github.com:colosa/processmaker
This commit is contained in:
@@ -5222,6 +5222,14 @@ class G
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
public function isUserFunction($functionName) {
|
||||
$allFunctions = get_defined_functions();
|
||||
if (!isset($allFunctions['user'])) {
|
||||
$allFunctions['user'] = array();
|
||||
}
|
||||
return in_array(strtolower($functionName), $allFunctions['user']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -412,6 +412,9 @@ class AdditionalTables extends BaseAdditionalTables
|
||||
}
|
||||
$stringOr .= ');';
|
||||
eval($stringOr);
|
||||
|
||||
$oCriteriaCount = clone $oCriteria;
|
||||
eval('$count = ' . $sClassPeerName . '::doCount($oCriteria);');
|
||||
}
|
||||
|
||||
if (isset($_POST['sort'])) {
|
||||
|
||||
@@ -422,7 +422,7 @@ class pmTablesProxy extends HttpProxyController
|
||||
$table = $additionalTables->load( $httpData->id, true );
|
||||
|
||||
if ($filter != '') {
|
||||
$result = $additionalTables::getAllData( $httpData->id, $start, $limit, true, $filter);
|
||||
$result = $additionalTables->getAllData( $httpData->id, $start, $limit, true, $filter);
|
||||
} else {
|
||||
$result = $additionalTables->getAllData( $httpData->id, $start, $limit );
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ if (! isset ($_REQUEST ['action'])) {
|
||||
print G::json_encode ($res);
|
||||
die ();
|
||||
}
|
||||
if (! function_exists ($_REQUEST ['action'])) {
|
||||
if (! function_exists ($_REQUEST['action']) || !G::isUserFunction($_REQUEST['action'])) {
|
||||
$res ['success'] = false;
|
||||
$res ['message'] = 'The requested action does not exist';
|
||||
print G::json_encode ($res);
|
||||
|
||||
@@ -5,7 +5,7 @@ if (! isset( $_REQUEST['action'] )) {
|
||||
print G::json_encode( $res );
|
||||
die();
|
||||
}
|
||||
if (! function_exists( $_REQUEST['action'] )) {
|
||||
if (! function_exists( $_REQUEST['action'] ) || !G::isUserFunction($_REQUEST['action'])) {
|
||||
$res['success'] = 'failure';
|
||||
$res['message'] = 'The requested action does not exist';
|
||||
header( "Content-Type: application/json" );
|
||||
|
||||
@@ -13,7 +13,7 @@ if (! isset( $_REQUEST['action'] )) {
|
||||
print G::json_encode( $res );
|
||||
die();
|
||||
}
|
||||
if (! function_exists( $_REQUEST['action'] )) {
|
||||
if (! function_exists( $_REQUEST['action'] ) || !G::isUserFunction($_REQUEST['action'])) {
|
||||
$res['success'] = 'failure';
|
||||
$res['message'] = G::LoadTranslation( 'ID_REQUEST_ACTION_NOT_EXIST' );
|
||||
print G::json_encode( $res );
|
||||
|
||||
@@ -6,7 +6,7 @@ if (! isset( $_REQUEST['action'] )) {
|
||||
print G::json_encode( $return );
|
||||
die();
|
||||
}
|
||||
if (! function_exists( $_REQUEST['action'] )) {
|
||||
if (! function_exists( $_REQUEST['action'] ) || !G::isUserFunction($_REQUEST['action'])) {
|
||||
$return['success'] = 'failure';
|
||||
$return['message'] = 'The requested action doesn\'t exists';
|
||||
print G::json_encode( $return );
|
||||
|
||||
@@ -463,14 +463,15 @@ onMessageContextMenu = function (grid, rowIndex, e) {
|
||||
/////JS FUNCTIONS
|
||||
|
||||
//Do Search Function
|
||||
|
||||
DoSearch = function(){
|
||||
infoGrid.store.load({params: {textFilter: searchText.getValue()}});
|
||||
infoGrid.store.setBaseParam('textFilter', searchText.getValue());
|
||||
infoGrid.store.load({params: {start : 0 , limit : pageSize }});
|
||||
};
|
||||
|
||||
//Load Grid By Default
|
||||
GridByDefault = function(){
|
||||
searchText.reset();
|
||||
infoGrid.store.setBaseParam('textFilter', searchText.getValue());
|
||||
infoGrid.store.load();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user