idafx / IDA-Framework

Intelligence Data Analytics Framework
http://ida2.krimnet.com
11 stars 3 forks source link

ida2: consolidation for kedah not calculated for north peninsular malaysia #37

Closed rajaiskandar closed 14 years ago

rajaiskandar commented 14 years ago

when updating data entry for kedah, the consolidation for north peninsular malaysia is not automatically calculated http://124.82.208.25/ida2/dataentry/year/10365?y1=2000&y2=2010&val=actual&geo=2167&ver=actual&dec=3

towfx commented 14 years ago

consolidations - indeed, was turned off because the performance issues.

rajaiskandar commented 14 years ago

now that we are running on our own server, let's crash it ... muahahaha ... turn everything on ;-) . will need to start phasing out ida2.krimnet.com

towfx commented 14 years ago

uncomment these lines in /modules/query/models/data_year.php

    if ( IS_CLI ) {
        if($this->geography_parent_id > 0) {
            Data::save_parent_geography($this);
        }
        if($this->entity_parent_id > 0) {
            Data::save_parent_entity($this);
        }
    }
    else {
        if($this->geography_parent_id > 0) {
            register_shutdown_function(array('Data','save_parent_geography'), $this);
        }
        if($this->entity_parent_id > 0) {
            register_shutdown_function(array('Data','save_parent_entity'), $this);
        }
    }
rajaiskandar commented 14 years ago

ok done. checked consolidation is ok. http://124.82.208.25/ida2/dataentry/year/10462?y1=2000&y2=2010&val=actual&geo=1237&ver=actual&dec=3