X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=UpdateDatabase.php;h=2b2a03f012d439cce2dad89ef3f997114d4782fa;hb=403d1007772e7e24fc54bbb386911c22dbb5b47f;hp=5b9b6e618c0853f92b8b6f4abd47c6d56aaca138;hpb=77c1c98aef96aa92ce71319df0ff6150d8c57b55;p=Pman.Core diff --git a/UpdateDatabase.php b/UpdateDatabase.php index 5b9b6e61..2b2a03f0 100644 --- a/UpdateDatabase.php +++ b/UpdateDatabase.php @@ -90,7 +90,7 @@ class Pman_Core_UpdateDatabase extends Pman ), ); - + static function cli_opts() { @@ -132,8 +132,18 @@ class Pman_Core_UpdateDatabase extends Pman 'test_class' => 'Pman/Admin/Report/SendEventErrors', 'to_group' => 'Administrators', 'active' => 1, - 'description' => '9. System Error Messages', + 'description' => '9.2 System Error Messages', 'template_dir' => '/Pman/Admin/templates/mail/' + ), + 'ADMIN_PASSWORD_RESET' => array( + 'bcc_group' => 'Administrators', + 'test_class' => 'Pman/Core/DataObjects/Core_person', + 'to_group' => '', + 'active' => 1, + 'description' => '9.1 Management System Password Reset', + 'template_dir' => '/Pman/Core/templates/mail/' + + ) ); @@ -253,6 +263,12 @@ class Pman_Core_UpdateDatabase extends Pman $this->clearApacheDataobjectsCache(); $this->clearApacheAssetCache(); + + + + + + } function output() { @@ -847,15 +863,17 @@ class Pman_Core_UpdateDatabase extends Pman $c = DB_DataObject::Factory('core_company'); $c->selectAdd(); $c->selectAdd('distinct(comptype) as comptype'); - $c->whereAdd("comptype != ''"); + $c->whereAdd(" + comptype != '' + AND + comptype != 'undefined' + AND + comptype != 'undefine' + "); $ctb = array(); foreach($c->fetchAll('comptype') as $cts) { - if($cts == 'undefined' || $cts == 'undefine'){ - continue; - } - $ctb[]= array( 'etype'=>'COMPTYPE', 'name' => $cts, 'display_name' => ucfirst(strtolower($cts))); } @@ -1262,13 +1280,14 @@ class Pman_Core_UpdateDatabase extends Pman echo "Clearing Database Cache\n"; // this needs to clear it's own cache along with remote one.. - - $response = $this->curl("http://localhost{$this->local_base_url}/Core/RefreshDatabaseCache"); + $url = "http://localhost{$this->local_base_url}/Core/RefreshDatabaseCache"; + $response = $this->curl($url); $json = json_decode($response, true); if(empty($json['data']) || $json['data'] != 'DONE'){ - echo $response. "\n"; + echo "fetching $url\n"; + echo "GOT:" . $response. "\n"; echo "Clear DataObjects Cache failed\n"; exit; }