projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7cbab9e
)
UpdateDatabase.php
author
Edward
<edward@roojs.com>
Wed, 22 May 2013 10:38:45 +0000
(18:38 +0800)
committer
Edward
<edward@roojs.com>
Wed, 22 May 2013 10:38:45 +0000
(18:38 +0800)
UpdateDatabase.php
patch
|
blob
|
history
diff --git
a/UpdateDatabase.php
b/UpdateDatabase.php
index
5b0b7b0
..
b9c5bae
100644
(file)
--- a/
UpdateDatabase.php
+++ b/
UpdateDatabase.php
@@
-75,6
+75,12
@@
class Pman_Core_UpdateDatabase extends Pman
die("Missing Source directory for account json files! Try -f [JSON file path] \n");
}
+ if (!file_exists($opt['source'])) {
+ die("can not found account json file : {$opt['source']} \n");
+ }
+
+ $accounts = json_decode(file_get_contents($source),true);
+
DB_DataObject::factory('accnt')->importFromJson($opt['source']);
die("DONE! \n");
}