Fixes to OSB to work with KH 3.3
This commit is contained in:
@@ -19,7 +19,7 @@ class Controller_Admin_Host extends Controller_TemplateDefault_Admin {
|
||||
public function action_ajaxmanage() {
|
||||
$this->auto_render = FALSE;
|
||||
|
||||
$hso = ORM::factory('host_server',$this->request->param('id'));
|
||||
$hso = ORM::factory('Host_Server',$this->request->param('id'));
|
||||
$k = Session::instance()->get_once('manage_button');
|
||||
|
||||
$o = array(
|
||||
@@ -38,7 +38,7 @@ class Controller_Admin_Host extends Controller_TemplateDefault_Admin {
|
||||
Block::add(array(
|
||||
'title'=>_('Customer Services'),
|
||||
'body'=>Table::display(
|
||||
ORM::factory('host_server')->find_all(),
|
||||
ORM::factory('Host_Server')->find_all(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>'admin/host/update/'),
|
||||
@@ -53,11 +53,11 @@ class Controller_Admin_Host extends Controller_TemplateDefault_Admin {
|
||||
}
|
||||
|
||||
public function action_update() {
|
||||
$hso = ORM::factory('host_server',$this->request->param('id'));
|
||||
$hso = ORM::factory('Host_Server',$this->request->param('id'));
|
||||
$output = '';
|
||||
|
||||
if (! $hso->loaded())
|
||||
Request::current()->redirect('welcome/index');
|
||||
HTTP::redirect('welcome/index');
|
||||
|
||||
if ($_POST) {
|
||||
$hso->values($_POST);
|
@@ -29,7 +29,7 @@ class Controller_Task_Host extends Controller_Task {
|
||||
case 'setdisablemail':
|
||||
case 'setexpire':
|
||||
case 'setpasswd':
|
||||
$this->so = ORM::factory('service',$this->request->param('id'));
|
||||
$this->so = ORM::factory('Service',$this->request->param('id'));
|
||||
|
||||
if (! $this->so->loaded())
|
||||
throw new Kohana_Exception('Unknown service :sid',array(':sid'=>$this->request->param('id')));
|
||||
@@ -138,7 +138,7 @@ class Controller_Task_Host extends Controller_Task {
|
||||
list($sid,$svrs) = preg_split('/:/',$ids,2);
|
||||
list($fsid,$tsid) = preg_split('/-/',$svrs,2);
|
||||
|
||||
$so = ORM::factory('service',$sid);
|
||||
$so = ORM::factory('Service',$sid);
|
||||
if (! $so->loaded())
|
||||
throw new Kohana_Exception('Service :sid doesnt exist?',array(':sid'=>$sid));
|
||||
|
||||
@@ -154,7 +154,7 @@ class Controller_Task_Host extends Controller_Task {
|
||||
throw new Kohana_Exception('Service :sid is not on server :tsid?',array(':sid'=>$sid,':tsid'=>$tsid));
|
||||
|
||||
// Temporarily set our host_server_id to $fsid
|
||||
$hpo = ORM::factory('host_server',$fsid);
|
||||
$hpo = ORM::factory('Host_Server',$fsid);
|
||||
if (! $hpo->loaded())
|
||||
throw new Kohana_Exception('Host server :fsid not defined?',array(':fsid'=>$fsid));
|
||||
|
||||
@@ -230,7 +230,7 @@ class Controller_Task_Host extends Controller_Task {
|
||||
$cats = array();
|
||||
|
||||
if ($mode)
|
||||
$cats = ORM::factory('product_category')->list_bylistgroup($mode);
|
||||
$cats = ORM::factory('Product_Category')->list_bylistgroup($mode);
|
||||
|
||||
foreach (ORM::Factory('service')->list_provision()->find_all() as $so) {
|
||||
$pc = array();
|
@@ -88,7 +88,7 @@ abstract class Host_Plugin_Plesk extends Host_Plugin {
|
||||
$request = Request::factory(sprintf('%s/%s',$this->hso->manage_url,$this->path))
|
||||
->method('POST');
|
||||
|
||||
$request->get_client()->options(Arr::merge($this->curlopts,array(
|
||||
$request->client()->options(Arr::merge($this->curlopts,array(
|
||||
CURLOPT_HTTPHEADER => array(
|
||||
'HTTP_AUTH_LOGIN: '.$this->hso->manage_username,
|
||||
'HTTP_AUTH_PASSWD: '.$this->hso->manage_password,
|
@@ -110,7 +110,7 @@ class Host_Plugin_Plesk_10 extends Host_Plugin_Plesk {
|
||||
$this->init();
|
||||
$items = array_keys($this->_template['reseller']);
|
||||
|
||||
$hsao = ORM::factory('host_server_affiliate',array('affiliate_id'=>$so->affiliate_id,'host_server_id'=>$so->plugin()->host_server_id))->find();
|
||||
$hsao = ORM::factory('Host_Server_Affiliate',array('affiliate_id'=>$so->affiliate_id,'host_server_id'=>$so->plugin()->host_server_id))->find();
|
||||
|
||||
if (! $hsao->loaded())
|
||||
return NULL;
|
@@ -10,7 +10,7 @@
|
||||
* @copyright (c) 2010 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Model_Product_Plugin_Host extends Model_Product_Plugin {
|
||||
class Model_Product_Plugin_HOST extends Model_Product_Plugin {
|
||||
// @todo This model doesnt have a database table
|
||||
public function __construct() {
|
||||
}
|
@@ -20,7 +20,7 @@ class Model_Service_Plugin_Host extends Model_Service_Plugin {
|
||||
|
||||
// Relationships
|
||||
protected $_has_one = array(
|
||||
'domain_tld'=>array('foreign_key'=>'id','far_key'=>'domain_tld_id'),
|
||||
'domain_TLD'=>array('foreign_key'=>'id','far_key'=>'domain_tld_id'),
|
||||
'host_server'=>array('far_key'=>'host_server_id','foreign_key'=>'id'),
|
||||
);
|
||||
protected $_belongs_to = array(
|
||||
@@ -46,7 +46,7 @@ class Model_Service_Plugin_Host extends Model_Service_Plugin {
|
||||
}
|
||||
|
||||
public function name() {
|
||||
return sprintf('%s.%s',$this->display('domain_name'),$this->domain_tld->display('name'));
|
||||
return sprintf('%s.%s',$this->display('domain_name'),$this->domain_TLD->display('name'));
|
||||
}
|
||||
|
||||
public function service_view() {
|
Reference in New Issue
Block a user