X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=UpdateDatabase.php;h=2b2a03f012d439cce2dad89ef3f997114d4782fa;hb=403d1007772e7e24fc54bbb386911c22dbb5b47f;hp=6747621c34e4307b1ebebb31d582ee45e5a373d2;hpb=5d58a791cd4c0371459c0992b9878bca21d7829a;p=Pman.Core diff --git a/UpdateDatabase.php b/UpdateDatabase.php index 6747621c..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,17 +863,21 @@ 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) { - - - $ctb[]= array( 'etype'=>'COMPTYPE', 'name' => $cts, 'display_name' => ucfirst(strtolower($cts))); + $ctb[]= array( 'etype'=>'COMPTYPE', 'name' => $cts, 'display_name' => ucfirst(strtolower($cts))); } - $c = DB_DataObject::Factory('core_enum'); + $c = DB_DataObject::Factory('core_enum'); $c->initEnums($ctb); //DB_DataObject::debugLevel(1); @@ -1210,7 +1230,8 @@ class Pman_Core_UpdateDatabase extends Pman 'pdftoppm', 'rsvg-convert', //librsvg2-bin 'strings', - 'oathtool' + 'oathtool', + 'gifsicle', // used for gif conversions ); @@ -1259,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; }