Fixes for KH 3.3 - to do with case file names

This commit is contained in:
Deon George 2012-11-27 12:26:56 +11:00
parent fc2ffd7bad
commit ea1346447f
88 changed files with 21 additions and 20 deletions

View File

@ -25,7 +25,7 @@ class Auth_TSM extends Auth_ORM {
$username = $user;
// Load the user
$user = ORM::factory('admin')
$user = ORM::factory('ADMIN')
->where('ADMIN_NAME','=',strtoupper($username))
->cached(0)
->find();

View File

@ -10,12 +10,12 @@
* @copyright (c) 2010 phpTSMadmin Development Team
* @license http://phptsmadmin.sf.net/license.html
*/
class Controller_DOMAIN extends Controller_TemplateDefault {
class Controller_Domain extends Controller_TemplateDefault {
/**
* Default Index for Controller
*/
public function action_index() {
$do = ORM::factory('domain');
$do = ORM::factory('DOMAIN');
$output = '';
$output .= sprintf(_('This server has <b>%s</b> domains.'),$do->count_all());
@ -50,7 +50,7 @@ class Controller_DOMAIN extends Controller_TemplateDefault {
HTTP::redirect('domain');
}
$do = ORM::factory('domain',$domain_name);
$do = ORM::factory('DOMAIN',$domain_name);
if (! $do->loaded()) {
SystemMessage::add(array(
'title'=>_('Unknown DOMAIN_NAME'),

View File

@ -10,12 +10,12 @@
* @copyright (c) 2010 phpTSMadmin Development Team
* @license http://phptsmadmin.sf.net/license.html
*/
class Controller_LIBRARY extends Controller_TemplateDefault {
class Controller_Library extends Controller_TemplateDefault {
/**
* Default Index for Controller
*/
public function action_index() {
$lo = ORM::factory('library');
$lo = ORM::factory('LIBRARY');
$output = '';
$output .= sprintf(_('This server has <b>%s</b> libraries.'),$lo->count_all());
@ -50,7 +50,7 @@ class Controller_LIBRARY extends Controller_TemplateDefault {
HTTP::redirect('library');
}
$lo = ORM::factory('library',$library);
$lo = ORM::factory('LIBRARY',$library);
if (! $lo->loaded()) {
SystemMessage::add(array(
'title'=>_('Unknown LIBRARY_NAME'),

View File

@ -10,12 +10,12 @@
* @copyright (c) 2010 phpTSMadmin Development Team
* @license http://phptsmadmin.sf.net/license.html
*/
class Controller_NODE extends Controller_TemplateDefault {
class Controller_Node extends Controller_TemplateDefault {
/**
* Default Index for Controller
*/
public function action_index() {
$no = ORM::factory('node');
$no = ORM::factory('NODE');
$output = '';
$output .= sprintf(_('This server has <b>%s</b> defined nodes.'),$no->count_all());
@ -50,7 +50,7 @@ class Controller_NODE extends Controller_TemplateDefault {
HTTP::redirect('node');
}
$no = ORM::factory('node',$node_name);
$no = ORM::factory('NODE',$node_name);
if (! $no->loaded()) {
SystemMessage::add(array(
'title'=>_('Unknown NODE_NAME'),

View File

@ -10,7 +10,7 @@
* @copyright (c) 2010 phpTSMadmin Development Team
* @license http://phptsmadmin.sf.net/license.html
*/
class Controller_SERVER extends Controller_TemplateDefault {
class Controller_Server extends Controller_TemplateDefault {
/**
* Default Index for Controller
*/

View File

@ -10,12 +10,12 @@
* @copyright (c) 2010 phpTSMadmin Development Team
* @license http://phptsmadmin.sf.net/license.html
*/
class Controller_STGPOOL extends Controller_TemplateDefault {
class Controller_Stgpool extends Controller_TemplateDefault {
/**
* Default Index for Controller
*/
public function action_index() {
$so = ORM::factory('stgpool');
$so = ORM::factory('STGPOOL');
$output = '';
$output .= sprintf(_('This server has <b>%s</b> stgpool pools.'),$so->count_all());
@ -50,7 +50,7 @@ class Controller_STGPOOL extends Controller_TemplateDefault {
HTTP::redirect('stgpool');
}
$so = ORM::factory('stgpool',$stgpool);
$so = ORM::factory('STGPOOL',$stgpool);
if (! $so->loaded()) {
SystemMessage::add(array(
'title'=>_('Unknown STGPOOL_NAME'),

View File

@ -48,6 +48,7 @@ class Database_TSM_DB2 extends Database_TSM {
$database,$hostname,$port,'TCPIP',$username,$password);
$this->_connection = db2_connect($constring,NULL,NULL);
echo debug::vars(array('s'=>$constring,'em'=>db2_conn_errormsg()));die();
if ($this->_connection) {
$result = DB::query(Database::SET,'SET SCHEMA='.$database)->execute(Kohana::config('config.client_type'));

View File

@ -10,7 +10,7 @@
* @copyright (c) 2010 phpTSMadmin Development Team
* @license http://phptsmadmin.sf.net/license.html
*/
class Database_TSM_DSMADMC extends Database_TSM {
class Database_Tsm_dsmadmc extends Database_TSM {
public function connect() {
// Extract the connection parameters, adding required variabels
extract($this->_config['connection'] + array(

View File

@ -29,7 +29,7 @@ class Model_LIBRARY extends TSM_ORM {
);
public function slots() {
return $this->slots ? $this->slots : $this->slots = DB::query(Database::SHOW,'SHOW SLOTS '.$this)->execute();
return $this->slots ? $this->slots : $this->slots = DB::query(Database::SHOW,'SHOW SLOTS '.$this)->execute(Kohana::$config->load('config')->client_type);
}
// Return a list of scratch volumes
@ -131,7 +131,7 @@ class Model_LIBRARY extends TSM_ORM {
static $CACHE = array();
if (! isset($CACHE[__METHOD__]))
foreach (ORM::factory('volhistory')->where('TYPE','IN',Kohana::$config->load('config')->tsmdbtypes)->find_all() as $vho)
foreach (ORM::factory('VOLHISTORY')->where('TYPE','IN',Kohana::$config->load('config')->tsmdbtypes)->find_all() as $vho)
$CACHE[__METHOD__][$vho->LIBVOLUME->LIBRARY_NAME ? 'IN' : 'OUT'][] = $vho;
return isset($CACHE[__METHOD__][$inout]) ? $CACHE[__METHOD__][$inout] : array();

View File

@ -35,7 +35,7 @@ abstract class TSM_ORM extends ORM {
*/
protected function _initialize() {
// Set out DB connection configuration.
$this->_db_group = Kohana::$config->load('config.client_type');
$this->_db_group = Kohana::$config->load('config')->client_type;
// Adjustments for DSMADMC or DB2 connections
if (array_key_exists($this->_db_group,$this->_tsm))

View File

@ -121,7 +121,7 @@ abstract class lnApp_Controller_TemplateDefault extends Controller_Template {
}
// Bind our template meta variable
$this->meta = new meta;
$this->meta = new Meta;
View::bind_global('meta',$this->meta);
// Our default style sheet

View File

@ -67,7 +67,7 @@ class lnApp_JPGraph_Gantt extends JPGraph {
// This will compile the gantt and output a URL that has the image
public function draw($name) {
// Sort our items by sort criteria.
sort::MAsort($this->_items,'sort,summary',0);
Sort::MAsort($this->_items,'sort,summary',0);
$c = 0;
$ls = '';