Fix abstract passwords in host/domain manage planel logins

This commit is contained in:
Deon George
2012-06-22 15:12:59 +10:00
parent 0eecfe8abd
commit df82268405
12 changed files with 93 additions and 42 deletions

View File

@@ -49,14 +49,16 @@ class Model_Service extends ORMOSB {
/**
* Return the object of the product plugin
*/
public function plugin() {
public function plugin($type='') {
if (! $this->product->prod_plugin_file)
return NULL;
if (! is_numeric($this->product->prod_plugin_data))
throw new Kohana_Exception('Missing plugin_id for :product (:type)',array(':product'=>$this->product->id,':type'=>$this->product->prod_plugin_file));
return ORM::factory(sprintf('service_plugin_%s',$this->product->prod_plugin_file),array('service_id'=>$this->id));
$o = ORM::factory(sprintf('service_plugin_%s',$this->product->prod_plugin_file),array('service_id'=>$this->id));
return $type ? $o->$type : $o;
}
/**