diff --git a/application/classes/Controller/Admin/Module/Method.php b/application/classes/Controller/Admin/Module/Method.php index 55a0a7a5..d62ae561 100644 --- a/application/classes/Controller/Admin/Module/Method.php +++ b/application/classes/Controller/Admin/Module/Method.php @@ -69,7 +69,7 @@ class Controller_Admin_Module_Method extends Controller_Admin_Module { foreach (ORM::factory('Group')->find_all() as $go) { // If the group was defined and no longer - if ($mmo->has('group',$go) AND (! $this->request->post('groups')) OR ! in_array($go->id,$this->request->post('groups'))) { + if ($mmo->has('group',$go) AND (! $this->request->post('groups') OR ! in_array($go->id,$this->request->post('groups')))) { $gmo = ORM::factory('Group_Method',array('method_id'=>$mmo->id,'group_id'=>$go->id)); if (! $gmo->delete()) diff --git a/application/classes/Controller/TemplateDefault.php b/application/classes/Controller/TemplateDefault.php index 144d30ad..c20ff51f 100644 --- a/application/classes/Controller/TemplateDefault.php +++ b/application/classes/Controller/TemplateDefault.php @@ -12,17 +12,6 @@ abstract class Controller_TemplateDefault extends lnApp_Controller_TemplateDefault { protected $auth_required = TRUE; - // @todo To rework - public function after() { - $dc = URL::link('user','welcome/index'); - $m = sprintf('%s/%s',Request::current()->directory(),Request::current()->controller()); - - BreadCrumb::URL(Request::current()->directory(),sprintf('%s/%s',Request::current()->directory(),$dc),FALSE); - BreadCrumb::URL($m,method_exists($this,'action_menu') ? $m.'/menu' : sprintf('%s/%s',Request::current()->directory(),$dc),FALSE); - - parent::after(); - } - protected function save(Model $o) { try { return $o->save(); @@ -48,7 +37,7 @@ abstract class Controller_TemplateDefault extends lnApp_Controller_TemplateDefau if ($config_items) { Block::factory() ->title('Update Module Configuration') - ->title_icon('icon-wrench') + ->title_icon('fa fa-wrench') ->type('form-horizontal') ->body(View::factory('setup/admin/module')->set('o',Company::instance()->so())->set('mid',$mo->id)); } diff --git a/application/classes/Model/Account.php b/application/classes/Model/Account.php index f20cfe18..3e3a252e 100644 --- a/application/classes/Model/Account.php +++ b/application/classes/Model/Account.php @@ -44,21 +44,7 @@ class Model_Account extends lnApp_Model_Account { /** REQUIRED ABSTRACT METHODS **/ - /** - * Returns the company name if it exists, otherwise the persons name - */ - public function name($variable=NULL) { - return $this->isCompany() ? $this->company : $this->namesub(); - } - - /* - * Returns the persons name - */ - public function namesub($variable=NULL) { - return trim(sprintf('%s %s',$this->first_name,$this->last_name)); - } - - /** OTHER METHODS **/ + /** LOCAL METHODS **/ public function activated() { return $this->has('group'); @@ -115,6 +101,20 @@ class Model_Account extends lnApp_Model_Account { return $this->RTM->loaded(); } + /** + * Returns the company name if it exists, otherwise the persons name + */ + public function name($variable=NULL) { + return $this->isCompany() ? $this->company : $this->namesub(); + } + + /* + * Returns the persons name + */ + public function namesub($variable=NULL) { + return trim(sprintf('%s %s',$this->first_name,$this->last_name)); + } + /** * The key we use to sort entries of this model type */ diff --git a/application/classes/Model/Account/Log.php b/application/classes/Model/Account/Log.php index a5aa201e..d68e8519 100644 --- a/application/classes/Model/Account/Log.php +++ b/application/classes/Model/Account/Log.php @@ -9,7 +9,7 @@ * @copyright (c) 2009-2013 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_Account_Log extends ORM_OSB { +class Model_Account_Log extends ORM { protected $_belongs_to = array( 'account'=>array(), ); diff --git a/application/classes/Model/Country.php b/application/classes/Model/Country.php index 5fa25e79..db19fc9a 100644 --- a/application/classes/Model/Country.php +++ b/application/classes/Model/Country.php @@ -9,7 +9,7 @@ * @copyright (c) 2009-2013 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_Country extends ORM_OSB { +class Model_Country extends ORM { protected $_has_one = array( 'currency'=>array('far_key'=>'id'), ); diff --git a/application/classes/Model/Currency.php b/application/classes/Model/Currency.php index 23943eb6..8f612986 100644 --- a/application/classes/Model/Currency.php +++ b/application/classes/Model/Currency.php @@ -9,7 +9,7 @@ * @copyright (c) 2009-2013 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_Currency extends ORM_OSB { +class Model_Currency extends ORM { protected $_sorting = array( 'name'=>'ASC', ); diff --git a/application/classes/Model/Group/Method.php b/application/classes/Model/Group/Method.php index 1db20700..1dc8fdea 100644 --- a/application/classes/Model/Group/Method.php +++ b/application/classes/Model/Group/Method.php @@ -9,7 +9,7 @@ * @copyright (c) 2009-2013 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_Group_Method extends ORM_OSB { +class Model_Group_Method extends ORM { // Relationships protected $_has_one = array( 'record_id'=>array(), diff --git a/application/classes/Model/Language.php b/application/classes/Model/Language.php index 212c178b..98f4d4d1 100644 --- a/application/classes/Model/Language.php +++ b/application/classes/Model/Language.php @@ -9,7 +9,7 @@ * @copyright (c) 2009-2013 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_Language extends ORM_OSB { +class Model_Language extends ORM { protected $_sorting = array( 'name'=>'ASC', ); diff --git a/application/classes/Model/Log/Error.php b/application/classes/Model/Log/Error.php index 357fb856..50f8cc9f 100644 --- a/application/classes/Model/Log/Error.php +++ b/application/classes/Model/Log/Error.php @@ -9,6 +9,6 @@ * @copyright (c) 2009-2013 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_Log_Error extends ORM_OSB { +class Model_Log_Error extends ORM { } ?> diff --git a/application/classes/Model/Module.php b/application/classes/Model/Module.php index 68e56310..ef49b929 100644 --- a/application/classes/Model/Module.php +++ b/application/classes/Model/Module.php @@ -12,7 +12,7 @@ * @copyright (c) 2009-2013 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_Module extends ORM_OSB { +class Model_Module extends ORM { // Relationships protected $_has_one = array( 'record_id'=>array('model'=>'Record_ID','far_key'=>'id'), diff --git a/application/classes/Model/Module/Method.php b/application/classes/Model/Module/Method.php index 14e617b7..b2a4ff69 100644 --- a/application/classes/Model/Module/Method.php +++ b/application/classes/Model/Module/Method.php @@ -9,7 +9,7 @@ * @copyright (c) 2009-2013 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_Module_Method extends ORM_OSB { +class Model_Module_Method extends ORM { // This module doesnt keep track of column updates automatically protected $_created_column = FALSE; protected $_updated_column = FALSE; diff --git a/application/classes/Model/Module/Method/Token.php b/application/classes/Model/Module/Method/Token.php index 02f17580..d2d9f849 100644 --- a/application/classes/Model/Module/Method/Token.php +++ b/application/classes/Model/Module/Method/Token.php @@ -9,7 +9,7 @@ * @copyright (c) 2009-2013 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_Module_Method_Token extends ORM_OSB { +class Model_Module_Method_Token extends ORM { // This module doesnt keep track of column updates automatically protected $_updated_column = FALSE; diff --git a/application/classes/Model/RTM.php b/application/classes/Model/RTM.php index fee28708..70a3ed15 100644 --- a/application/classes/Model/RTM.php +++ b/application/classes/Model/RTM.php @@ -9,7 +9,7 @@ * @copyright (c) 2009-2013 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_RTM extends ORM_OSB { +class Model_RTM extends ORM { protected $_belongs_to = array( 'account' => array(), ); diff --git a/application/classes/Model/Record/ID.php b/application/classes/Model/Record/ID.php index b6c19e38..8e1e6af3 100644 --- a/application/classes/Model/Record/ID.php +++ b/application/classes/Model/Record/ID.php @@ -8,7 +8,7 @@ * @copyright (c) 2009-2013 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_Record_ID extends ORM_OSB { +class Model_Record_ID extends ORM { protected $_primary_key = 'module_id'; // This module doesnt keep track of column updates automatically diff --git a/application/classes/Model/Setup.php b/application/classes/Model/Setup.php index 9c68c725..63679987 100644 --- a/application/classes/Model/Setup.php +++ b/application/classes/Model/Setup.php @@ -12,7 +12,7 @@ * @copyright (c) 2009-2013 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_Setup extends ORM_OSB { +class Model_Setup extends ORM { // Setup doesnt use the update column protected $_updated_column = FALSE; diff --git a/application/classes/ORM/OSB.php b/application/classes/ORM/OSB.php deleted file mode 100644 index 3316f44a..00000000 --- a/application/classes/ORM/OSB.php +++ /dev/null @@ -1,14 +0,0 @@ -data($apo->products()) ->columns(array( 'id'=>'ID', - 'title()'=>'Name', + 'name(Site::language())'=>'Name', 'status'=>'Active', )) ->prepend(array( diff --git a/modules/adsl/classes/Model/ADSL/Supplier.php b/modules/adsl/classes/Model/ADSL/Supplier.php index 269796d4..ecae14bf 100644 --- a/modules/adsl/classes/Model/ADSL/Supplier.php +++ b/modules/adsl/classes/Model/ADSL/Supplier.php @@ -9,7 +9,7 @@ * @copyright (c) 2009-2013 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_ADSL_Supplier extends ORM_OSB { +class Model_ADSL_Supplier extends ORM { protected $_updated_column = FALSE; // Relationships diff --git a/modules/adsl/classes/Model/ADSL/Supplier/Plan.php b/modules/adsl/classes/Model/ADSL/Supplier/Plan.php index 4353c548..2eb12fba 100644 --- a/modules/adsl/classes/Model/ADSL/Supplier/Plan.php +++ b/modules/adsl/classes/Model/ADSL/Supplier/Plan.php @@ -9,7 +9,7 @@ * @copyright (c) 2009-2013 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_ADSL_Supplier_Plan extends ORM_OSB { +class Model_ADSL_Supplier_Plan extends ORM { // Relationships protected $_belongs_to = array( 'supplier'=>array('model'=>'ADSL_Supplier'), diff --git a/modules/adsl/classes/Model/Service/Plugin/Adsl/Traffic.php b/modules/adsl/classes/Model/Service/Plugin/Adsl/Traffic.php index 59f0fdb1..0b5d6d7a 100644 --- a/modules/adsl/classes/Model/Service/Plugin/Adsl/Traffic.php +++ b/modules/adsl/classes/Model/Service/Plugin/Adsl/Traffic.php @@ -9,7 +9,7 @@ * @copyright (c) 2009-2013 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_Service_Plugin_Adsl_Traffic extends ORM_OSB { +class Model_Service_Plugin_Adsl_Traffic extends ORM { protected $_table_name = 'service__adsl_traffic'; protected $_primary_key = 'service'; protected $_disable_wild_select = TRUE; diff --git a/modules/adsl/views/product/category/list/adslcompare-large.php b/modules/adsl/views/product/category/list/adslcompare-large.php index 3d931742..a5709d12 100644 --- a/modules/adsl/views/product/category/list/adslcompare-large.php +++ b/modules/adsl/views/product/category/list/adslcompare-large.php @@ -1,5 +1,5 @@