),
);
+ var $emailTemplates = array(
+ 'ADMIN_PASSWORD_RESET' => array(
+ 'bcc_group' => 'Administrators',
+ 'test_class' => 'Pman/Core/DataObjects/Core_person',
+ 'to_group' => '',
+ 'active' => 1,
+ 'description' => '99. Management System Password Reset'
+
+ )
+ );
static function cli_opts()
{
$this->clearApacheDataobjectsCache();
$this->clearApacheAssetCache();
+
+
+ $core_group = DB_DataObject::factory('core_group');
+ $core_group->get('name', 'Administrators');
+ if(!empty($core_group->memberCount())) {
+
+ $core_company = DB_DataObject::factory('core_company');
+ $core_company->get('comptype', 'OWNER');
+
+
+
+ foreach ($this->emailTemplates as $k => $mail) {
+ $mail_dir = $this->client_path.'/mail/';
+
+ if (!file_exists($mail_dir."{$k}.html")) {
+ $mail_dir = $ff->page->rootDir. '/Pman/Core/templates/mail/';
+ }
+
+ $this->initEmails(
+ $mail_dir,
+ array($k => $mail),
+ array()
+ );
+ }
+ }
+
+
+
}
function output() {
$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)));
}
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;
}