projects
/
Pman.Core
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Process/Php7.php
[Pman.Core]
/
UpdateDatabase.php
diff --git
a/UpdateDatabase.php
b/UpdateDatabase.php
index
11f7fec
..
2385354
100644
(file)
--- a/
UpdateDatabase.php
+++ b/
UpdateDatabase.php
@@
-847,17
+847,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);
@@
-1260,13
+1264,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;
}