Fixes to OSB to work with KH 3.3
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
* @copyright (c) 2010 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Model_Domain_TLD extends ORM_OSB {
|
||||
class Model_Domain_Tld extends ORM_OSB {
|
||||
protected $_display_filters = array(
|
||||
'name'=>array(
|
||||
array('strtoupper',array(':value')),
|
@@ -10,7 +10,7 @@
|
||||
* @copyright (c) 2010 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Model_Product_Plugin_Domain extends Model_Product_Plugin {
|
||||
class Model_Product_Plugin_DOMAIN extends Model_Product_Plugin {
|
||||
// This model doesnt have a database table
|
||||
public function __construct() {
|
||||
}
|
||||
@@ -22,7 +22,7 @@ class Model_Product_Plugin_Domain extends Model_Product_Plugin {
|
||||
// @todo This is not used, but should be.
|
||||
public function order_features() {
|
||||
$output = '';
|
||||
$t = ORM::factory('domain_tld');
|
||||
$t = ORM::factory('Domain_TLD');
|
||||
|
||||
// @todo Change this to a view.
|
||||
$output = sprintf('<table class="box-full"><tr class="head"><td>%s</td></tr><tr><td>',_('Domains are available with the following suffixes'));
|
@@ -10,15 +10,15 @@
|
||||
* @copyright (c) 2010 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Model_Service_Plugin_Domain extends Model_Service_Plugin {
|
||||
class Model_Service_Plugin_DOMAIN extends Model_Service_Plugin {
|
||||
protected $_table_name = 'service__domain';
|
||||
protected $_updated_column = FALSE;
|
||||
|
||||
// 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'),
|
||||
'domain_registrar'=>array('foreign_key'=>'id','far_key'=>'domain_registrar_id'),
|
||||
'service_plugin_host'=>array('through'=>'service','far_key'=>'service_id','foreign_key'=>'service_id'),
|
||||
'service_plugin_HOST'=>array('through'=>'service','far_key'=>'service_id','foreign_key'=>'service_id'),
|
||||
);
|
||||
protected $_belongs_to = array(
|
||||
'service'=>array(),
|
||||
@@ -49,7 +49,7 @@ class Model_Service_Plugin_Domain 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_name() {
|
@@ -31,7 +31,7 @@ abstract class Service_Domain {
|
||||
* Setup this class. We need to get our supplier details out of the database.
|
||||
*/
|
||||
public function __construct($sid) {
|
||||
$this->so = ORM::factory('domain_registrar',$sid);
|
||||
$this->so = ORM::factory('Domain_Registrar',$sid);
|
||||
}
|
||||
|
||||
/**
|
@@ -16,7 +16,7 @@ class Service_Domain_Manual extends Service_Domain {
|
||||
private $login_pass_field = '';
|
||||
|
||||
// Our required abstract classes
|
||||
public function manage_button($u,$p,$d) {
|
||||
public function manage_button(Model_Service_Plugin_Domain $spdo,$t) {
|
||||
return _('Please contact us');
|
||||
}
|
||||
}
|
@@ -16,18 +16,18 @@ class Service_Domain_PlanetDomain extends Service_Domain {
|
||||
private $login_pass_field = 'login.password';
|
||||
|
||||
// Our required abstract classes
|
||||
public function manage_button($u,$p,$d) {
|
||||
public function manage_button(Model_Service_Plugin_Domain $spdo,$t) {
|
||||
$output = '';
|
||||
|
||||
$output .= Form::open(
|
||||
sprintf('%s/%s',$this->so->whitelabel_url,'newdnr/action/user/login.jsp'),
|
||||
array('target'=>'pd','method'=>'post')
|
||||
array('target'=>'pd','method'=>'post','id'=>sprintf('id_%s_%s',$spdo->service_id,$t))
|
||||
);
|
||||
$output .= Form::input($this->login_user_field,$u,array('type'=>'hidden'));
|
||||
$output .= Form::input($this->login_pass_field,$p,array('type'=>'hidden'));
|
||||
$output .= Form::input($this->login_user_field,$spdo->username_value(),array('type'=>'hidden','id'=>sprintf('u_%s_%s',$spdo->service_id,$t)));
|
||||
$output .= Form::input($this->login_pass_field,substr(md5($spdo->password_value()),0,8),array('type'=>'hidden','id'=>sprintf('p_%s_%s',$spdo->service_id,$t)));
|
||||
$output .= Form::input('page.next',sprintf('/newdnr/action/dns/getDNSDetails.jsp?domain.name=%s',$d),array('type'=>'hidden'));
|
||||
$output .= Form::button('submit',_('Manage'),array('class'=>'form_button'));
|
||||
$output .= Form::close();
|
||||
$output .= Form::button('submit',_('Manage'),array('class'=>'form_button','value'=>sprintf('%s:%s',$spdo->service_id,$t)));
|
||||
|
||||
return $output;
|
||||
}
|
Reference in New Issue
Block a user