projects
/
Pman.Core
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DataObjects/Core_person.php
[Pman.Core]
/
UpdateDatabase.php
diff --git
a/UpdateDatabase.php
b/UpdateDatabase.php
index
6ffa9ac
..
5b49922
100644
(file)
--- a/
UpdateDatabase.php
+++ b/
UpdateDatabase.php
@@
-90,7
+90,7
@@
class Pman_Core_UpdateDatabase extends Pman
),
);
),
);
-
+
static function cli_opts()
{
static function cli_opts()
{
@@
-134,9
+134,22
@@
class Pman_Core_UpdateDatabase extends Pman
'active' => 1,
'description' => '9. System Error Messages',
'template_dir' => '/Pman/Admin/templates/mail/'
'active' => 1,
'description' => '9. 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' => '99. Management System Password Reset'
+
)
);
)
);
+ var $required_extensions = array(
+ 'curl',
+ 'gd'
+ );
+
function getAuth() {
function getAuth() {
@@
-161,7
+174,7
@@
class Pman_Core_UpdateDatabase extends Pman
$this->checkSystem();
$this->checkSystem();
- $this->verifyExtensions(
array('curl')
);
+ $this->verifyExtensions(
$this->required_extensions
);
if (class_exists('PDO_DataObjects_Introspection')) {
PDO_DataObject_Introspection::$cache = array();
if (class_exists('PDO_DataObjects_Introspection')) {
PDO_DataObject_Introspection::$cache = array();
@@
-198,10
+211,10
@@
class Pman_Core_UpdateDatabase extends Pman
$response = $this->curl("http://localhost{$this->local_base_url}/Core/UpdateDatabase/VerifyExtensions");
$json = json_decode($response, true);
$response = $this->curl("http://localhost{$this->local_base_url}/Core/UpdateDatabase/VerifyExtensions");
$json = json_decode($response, true);
- print_R($response);exit;
+
if(empty($json['data']) || $json['data'] != 'DONE'){
echo "\nError: Missing php extensions:\n";
if(empty($json['data']) || $json['data'] != 'DONE'){
echo "\nError: Missing php extensions:\n";
- print_r($
json
);
+ print_r($
response
);
echo "Please install the above extensions and restart the apache.\n";
sleep(5);
echo "Please install the above extensions and restart the apache.\n";
sleep(5);
@@
-248,6
+261,12
@@
class Pman_Core_UpdateDatabase extends Pman
$this->clearApacheDataobjectsCache();
$this->clearApacheAssetCache();
$this->clearApacheDataobjectsCache();
$this->clearApacheAssetCache();
+
+
+
+
+
+
}
function output() {
}
function output() {
@@
-842,17
+861,21
@@
class Pman_Core_UpdateDatabase extends Pman
$c = DB_DataObject::Factory('core_company');
$c->selectAdd();
$c->selectAdd('distinct(comptype) as comptype');
$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();
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);
$c->initEnums($ctb);
//DB_DataObject::debugLevel(1);
@@
-1205,7
+1228,8
@@
class Pman_Core_UpdateDatabase extends Pman
'pdftoppm',
'rsvg-convert', //librsvg2-bin
'strings',
'pdftoppm',
'rsvg-convert', //librsvg2-bin
'strings',
- 'oathtool'
+ 'oathtool',
+ 'gifsicle', // used for gif conversions
);
);
@@
-1254,13
+1278,14
@@
class Pman_Core_UpdateDatabase extends Pman
echo "Clearing Database Cache\n";
// this needs to clear it's own cache along with remote one..
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'){
$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;
}
echo "Clear DataObjects Cache failed\n";
exit;
}