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