From f1a6c82cb183717eb1f427379504f91fda0d1e25 Mon Sep 17 00:00:00 2001 From: Edward Date: Wed, 11 Feb 2015 15:56:22 +0800 Subject: [PATCH] Import/Core_notify.php --- Import/Core_notify.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Import/Core_notify.php b/Import/Core_notify.php index 99ea3b70..a7797481 100644 --- a/Import/Core_notify.php +++ b/Import/Core_notify.php @@ -33,11 +33,27 @@ class Pman_Core_Import_Core_notify extends Pman_Roo $this->modules = $this->modulesList(); + $this->etype(); + $this->defaults(); - print_r($this->defaults);exit; + foreach ($this->defaults as $k => $v){ + $enum = DB_DataObject::factory('core_enum'); + $enum->setFrom(array( + 'etype' => $this->etype->name, + 'name' => $k, + 'active' => 1 + )); + + if($enum->find(true)){ + continue; + } + + $enum->display_name = $v; + $enum->insert(); + } + - $this->etype(); -- 2.39.2