projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97b3cd1
)
DataObjects/Companies.php
author
Chris
<chris@roojs.com>
Fri, 10 Jan 2014 09:57:44 +0000
(17:57 +0800)
committer
Chris
<chris@roojs.com>
Fri, 10 Jan 2014 09:57:44 +0000
(17:57 +0800)
DataObjects/Companies.php
patch
|
blob
|
history
diff --git
a/DataObjects/Companies.php
b/DataObjects/Companies.php
index
ca34b09
..
2b2d279
100644
(file)
--- a/
DataObjects/Companies.php
+++ b/
DataObjects/Companies.php
@@
-243,7
+243,11
@@
class Pman_Core_DataObjects_Companies extends DB_DataObject
function beforeDelete()
{
// should check for members....
-
+ if(!empty($this->is_system) &&
+ ($old->code != $this->code || $old->name != $this->name)
+ ){
+ $roo->jerr('This company is not allow to delete');
+ }
$img = DB_DataObject::factory('Images');
$img->ontable = 'Companies';
$img->onid = $this->id;