Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/gitdedalo/v6_developer' in…
Browse files Browse the repository at this point in the history
…to v6_developer
  • Loading branch information
alex-render committed Dec 9, 2024
2 parents 86ff8fd + 33d5f1f commit 5c601cc
Show file tree
Hide file tree
Showing 16 changed files with 280 additions and 109 deletions.
5 changes: 4 additions & 1 deletion core/api/v1/common/class.dd_utils_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,9 @@ public static function get_dedalo_files(object $rqo) : object {
public static function get_process_status(object $rqo) {
$start_time=start_time();

// max_execution_time
ini_set('max_execution_time', 36000); // seconds ( 3600 * 10 ) = 10 hours

// session unlock
session_write_close();

Expand All @@ -1376,7 +1379,7 @@ public static function get_process_status(object $rqo) {
header("Cache-Control: no-cache, must-revalidate");
header('Connection: keep-alive');
header("Access-Control-Allow-Origin: *");
header('X-Accel-Buffering: no'); // nginex buffer control
header('X-Accel-Buffering: no'); // nginx buffer control

// mandatory vars
if (empty($pfile) || empty($pid)) {
Expand Down
22 changes: 11 additions & 11 deletions core/area/class.area.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ protected static function get_ar_children_areas_recursive(string $terminoID) : a

// short vars
$RecordObj_dd = new RecordObj_dd($terminoID);
$ar_ts_childrens = $RecordObj_dd->get_ar_childrens_of_this();
$ar_ts_childrens_size = sizeof($ar_ts_childrens);
$ar_ts_children = $RecordObj_dd->get_ar_childrens_of_this();
$ar_ts_children_size = sizeof($ar_ts_children);

if ($ar_ts_childrens_size>0) {
if ($ar_ts_children_size>0) {

// foreach ($ar_ts_childrens as $children_terminoID) {
for ($i=0; $i < $ar_ts_childrens_size; $i++) {
// foreach ($ar_ts_children as $children_terminoID) {
for ($i=0; $i < $ar_ts_children_size; $i++) {

$children_terminoID = $ar_ts_childrens[$i];
$children_terminoID = $ar_ts_children[$i];

$RecordObj_dd = new RecordObj_dd($children_terminoID);
$model = RecordObj_dd::get_modelo_name_by_tipo($children_terminoID,true);
Expand All @@ -196,7 +196,7 @@ protected static function get_ar_children_areas_recursive(string $terminoID) : a
$ar_temp = self::get_ar_children_areas_recursive($children_terminoID);
$ar_children_areas_recursive = array_merge($ar_children_areas_recursive, $ar_temp);
}
}//end for ($i=0; $i < $ar_ts_childrens_size; $i++)
}//end for ($i=0; $i < $ar_ts_children_size; $i++)
}


Expand All @@ -214,19 +214,19 @@ protected static function get_ar_children_areas_recursive(string $terminoID) : a
public static function get_config_areas() : object {

// non existing config_areas.php file case
if( !include(DEDALO_CONFIG_PATH . '/config_areas.php') ) {
if( !include DEDALO_CONFIG_PATH . '/config_areas.php' ) {

debug_log(__METHOD__
." ERROR ON LOAD FILE config4_areas . Using empty values as default "
, logger::ERROR
);

if(SHOW_DEBUG===true) {
throw new Exception("Error Processing Request. config4_areas file not found", 1);;
throw new Exception("Error Processing Request. config4_areas file not found", 1);
}

$areas_deny = array();
$areas_allow = array();
$areas_deny = [];
$areas_allow = [];
}

// config_areas object
Expand Down
6 changes: 3 additions & 3 deletions core/area_graph/area_graph_json.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@
); // $this->get_data_items();

// typologies
$ar_tipologies_section_id = [];
$ar_typologies_section_id = [];
$ar_typologies = [];
foreach ($hierarchy_sections as $hierarchy_data) {
if (!in_array($hierarchy_data->typology_section_id, $ar_tipologies_section_id)) {
$ar_tipologies_section_id[] = $hierarchy_data->typology_section_id;
if (!in_array($hierarchy_data->typology_section_id, $ar_typologies_section_id)) {
$ar_typologies_section_id[] = $hierarchy_data->typology_section_id;
$typology = new stdClass();
$typology->section_id = $hierarchy_data->typology_section_id;
$typology->type = 'typology';
Expand Down
2 changes: 1 addition & 1 deletion core/area_graph/class.area_graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ public function search_thesaurus(object $search_query_object) : object {
// debug
if(SHOW_DEBUG===true) {
$response->strQuery = $search_result->strQuery;
$response->debug[] = exec_time_unit($start_time);
$response->debug = [exec_time_unit($start_time)];
}


Expand Down
8 changes: 3 additions & 5 deletions core/area_maintenance/class.area_maintenance.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class area_maintenance extends area_common {
public function item_make_backup() : object {

// short vars
$mysql_db = (defined('API_WEB_USER_CODE_MULTIPLE') ? API_WEB_USER_CODE_MULTIPLE : null);
$mysql_db = defined('API_WEB_USER_CODE_MULTIPLE') ? API_WEB_USER_CODE_MULTIPLE : null;

// item
$item = new stdClass();
Expand Down Expand Up @@ -737,7 +737,6 @@ public static function regenerate_relations(object $options) : object {
// response
$response->result = true;
$response->msg[0] = 'OK. All data is propagated successfully'; // Override first message
$response->msg = $response->msg; // array


return $response;
Expand Down Expand Up @@ -1327,8 +1326,8 @@ public static function update_code(object $options) : object {
: DEDALO_SOURCE_VERSION_LOCAL_DIR .'/'. pathinfo($file_name)['filename']; // like 'dedalo6_code' from 'dedalo6_code.zip'
$target = DEDALO_ROOT_PATH;
$exclude = ' --exclude="*/config*" --exclude="media" ';
$aditional = ''; // $is_preview===true ? ' --dry-run ' : '';
$command = 'rsync -avui --no-owner --no-group --no-perms --progress '. $exclude . $aditional . $source.'/ ' . $target.'/';
$additional = ''; // $is_preview===true ? ' --dry-run ' : '';
$command = 'rsync -avui --no-owner --no-group --no-perms --progress '. $exclude . $additional . $source.'/ ' . $target.'/';
$output = shell_exec($command);
if ($output===null) {
$response->msg = 'Error. Request failed ['.__FUNCTION__.']. Error executing rsync command. source: '.$source;
Expand Down Expand Up @@ -1572,7 +1571,6 @@ private static function set_congif_auto(object $options) {
default:
$response->msg = 'Error. Invalid name';
return $response;
break;
}

// write_value check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ const get_content_data = async function(self) {
body : {
dd_api : 'dd_utils_api',
action : 'get_process_status',
update_rate : 41, // int milliseconds
update_rate : 1000, // int milliseconds
options : {
pid : pid,
pfile : pfile
Expand Down
3 changes: 2 additions & 1 deletion core/base/update/updates.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
// fix rsc197 counter
$script_obj = new stdClass();
$script_obj->info = "Consolidate counter for People under study rsc197";
$script_obj->script_class = "area_maintenance";
$script_obj->script_class = "counter";
$script_obj->script_method = "modify_counter";
$script_obj->script_vars = [
'rsc197',
Expand All @@ -117,6 +117,7 @@
$updates->$v->run_scripts[] = $script_obj;



$v=629; #####################################################################################
$updates->$v = new stdClass();

Expand Down
Loading

0 comments on commit 5c601cc

Please sign in to comment.