Fixes for KH 3.3 - to do with case file names
This commit is contained in:
parent
fc2ffd7bad
commit
ea1346447f
@ -25,7 +25,7 @@ class Auth_TSM extends Auth_ORM {
|
|||||||
$username = $user;
|
$username = $user;
|
||||||
|
|
||||||
// Load the user
|
// Load the user
|
||||||
$user = ORM::factory('admin')
|
$user = ORM::factory('ADMIN')
|
||||||
->where('ADMIN_NAME','=',strtoupper($username))
|
->where('ADMIN_NAME','=',strtoupper($username))
|
||||||
->cached(0)
|
->cached(0)
|
||||||
->find();
|
->find();
|
@ -10,12 +10,12 @@
|
|||||||
* @copyright (c) 2010 phpTSMadmin Development Team
|
* @copyright (c) 2010 phpTSMadmin Development Team
|
||||||
* @license http://phptsmadmin.sf.net/license.html
|
* @license http://phptsmadmin.sf.net/license.html
|
||||||
*/
|
*/
|
||||||
class Controller_DOMAIN extends Controller_TemplateDefault {
|
class Controller_Domain extends Controller_TemplateDefault {
|
||||||
/**
|
/**
|
||||||
* Default Index for Controller
|
* Default Index for Controller
|
||||||
*/
|
*/
|
||||||
public function action_index() {
|
public function action_index() {
|
||||||
$do = ORM::factory('domain');
|
$do = ORM::factory('DOMAIN');
|
||||||
$output = '';
|
$output = '';
|
||||||
|
|
||||||
$output .= sprintf(_('This server has <b>%s</b> domains.'),$do->count_all());
|
$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');
|
HTTP::redirect('domain');
|
||||||
}
|
}
|
||||||
|
|
||||||
$do = ORM::factory('domain',$domain_name);
|
$do = ORM::factory('DOMAIN',$domain_name);
|
||||||
if (! $do->loaded()) {
|
if (! $do->loaded()) {
|
||||||
SystemMessage::add(array(
|
SystemMessage::add(array(
|
||||||
'title'=>_('Unknown DOMAIN_NAME'),
|
'title'=>_('Unknown DOMAIN_NAME'),
|
@ -10,12 +10,12 @@
|
|||||||
* @copyright (c) 2010 phpTSMadmin Development Team
|
* @copyright (c) 2010 phpTSMadmin Development Team
|
||||||
* @license http://phptsmadmin.sf.net/license.html
|
* @license http://phptsmadmin.sf.net/license.html
|
||||||
*/
|
*/
|
||||||
class Controller_LIBRARY extends Controller_TemplateDefault {
|
class Controller_Library extends Controller_TemplateDefault {
|
||||||
/**
|
/**
|
||||||
* Default Index for Controller
|
* Default Index for Controller
|
||||||
*/
|
*/
|
||||||
public function action_index() {
|
public function action_index() {
|
||||||
$lo = ORM::factory('library');
|
$lo = ORM::factory('LIBRARY');
|
||||||
$output = '';
|
$output = '';
|
||||||
|
|
||||||
$output .= sprintf(_('This server has <b>%s</b> libraries.'),$lo->count_all());
|
$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');
|
HTTP::redirect('library');
|
||||||
}
|
}
|
||||||
|
|
||||||
$lo = ORM::factory('library',$library);
|
$lo = ORM::factory('LIBRARY',$library);
|
||||||
if (! $lo->loaded()) {
|
if (! $lo->loaded()) {
|
||||||
SystemMessage::add(array(
|
SystemMessage::add(array(
|
||||||
'title'=>_('Unknown LIBRARY_NAME'),
|
'title'=>_('Unknown LIBRARY_NAME'),
|
@ -10,12 +10,12 @@
|
|||||||
* @copyright (c) 2010 phpTSMadmin Development Team
|
* @copyright (c) 2010 phpTSMadmin Development Team
|
||||||
* @license http://phptsmadmin.sf.net/license.html
|
* @license http://phptsmadmin.sf.net/license.html
|
||||||
*/
|
*/
|
||||||
class Controller_NODE extends Controller_TemplateDefault {
|
class Controller_Node extends Controller_TemplateDefault {
|
||||||
/**
|
/**
|
||||||
* Default Index for Controller
|
* Default Index for Controller
|
||||||
*/
|
*/
|
||||||
public function action_index() {
|
public function action_index() {
|
||||||
$no = ORM::factory('node');
|
$no = ORM::factory('NODE');
|
||||||
$output = '';
|
$output = '';
|
||||||
|
|
||||||
$output .= sprintf(_('This server has <b>%s</b> defined nodes.'),$no->count_all());
|
$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');
|
HTTP::redirect('node');
|
||||||
}
|
}
|
||||||
|
|
||||||
$no = ORM::factory('node',$node_name);
|
$no = ORM::factory('NODE',$node_name);
|
||||||
if (! $no->loaded()) {
|
if (! $no->loaded()) {
|
||||||
SystemMessage::add(array(
|
SystemMessage::add(array(
|
||||||
'title'=>_('Unknown NODE_NAME'),
|
'title'=>_('Unknown NODE_NAME'),
|
@ -10,7 +10,7 @@
|
|||||||
* @copyright (c) 2010 phpTSMadmin Development Team
|
* @copyright (c) 2010 phpTSMadmin Development Team
|
||||||
* @license http://phptsmadmin.sf.net/license.html
|
* @license http://phptsmadmin.sf.net/license.html
|
||||||
*/
|
*/
|
||||||
class Controller_SERVER extends Controller_TemplateDefault {
|
class Controller_Server extends Controller_TemplateDefault {
|
||||||
/**
|
/**
|
||||||
* Default Index for Controller
|
* Default Index for Controller
|
||||||
*/
|
*/
|
@ -10,12 +10,12 @@
|
|||||||
* @copyright (c) 2010 phpTSMadmin Development Team
|
* @copyright (c) 2010 phpTSMadmin Development Team
|
||||||
* @license http://phptsmadmin.sf.net/license.html
|
* @license http://phptsmadmin.sf.net/license.html
|
||||||
*/
|
*/
|
||||||
class Controller_STGPOOL extends Controller_TemplateDefault {
|
class Controller_Stgpool extends Controller_TemplateDefault {
|
||||||
/**
|
/**
|
||||||
* Default Index for Controller
|
* Default Index for Controller
|
||||||
*/
|
*/
|
||||||
public function action_index() {
|
public function action_index() {
|
||||||
$so = ORM::factory('stgpool');
|
$so = ORM::factory('STGPOOL');
|
||||||
$output = '';
|
$output = '';
|
||||||
|
|
||||||
$output .= sprintf(_('This server has <b>%s</b> stgpool pools.'),$so->count_all());
|
$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');
|
HTTP::redirect('stgpool');
|
||||||
}
|
}
|
||||||
|
|
||||||
$so = ORM::factory('stgpool',$stgpool);
|
$so = ORM::factory('STGPOOL',$stgpool);
|
||||||
if (! $so->loaded()) {
|
if (! $so->loaded()) {
|
||||||
SystemMessage::add(array(
|
SystemMessage::add(array(
|
||||||
'title'=>_('Unknown STGPOOL_NAME'),
|
'title'=>_('Unknown STGPOOL_NAME'),
|
@ -48,6 +48,7 @@ class Database_TSM_DB2 extends Database_TSM {
|
|||||||
$database,$hostname,$port,'TCPIP',$username,$password);
|
$database,$hostname,$port,'TCPIP',$username,$password);
|
||||||
|
|
||||||
$this->_connection = db2_connect($constring,NULL,NULL);
|
$this->_connection = db2_connect($constring,NULL,NULL);
|
||||||
|
echo debug::vars(array('s'=>$constring,'em'=>db2_conn_errormsg()));die();
|
||||||
|
|
||||||
if ($this->_connection) {
|
if ($this->_connection) {
|
||||||
$result = DB::query(Database::SET,'SET SCHEMA='.$database)->execute(Kohana::config('config.client_type'));
|
$result = DB::query(Database::SET,'SET SCHEMA='.$database)->execute(Kohana::config('config.client_type'));
|
@ -10,7 +10,7 @@
|
|||||||
* @copyright (c) 2010 phpTSMadmin Development Team
|
* @copyright (c) 2010 phpTSMadmin Development Team
|
||||||
* @license http://phptsmadmin.sf.net/license.html
|
* @license http://phptsmadmin.sf.net/license.html
|
||||||
*/
|
*/
|
||||||
class Database_TSM_DSMADMC extends Database_TSM {
|
class Database_Tsm_dsmadmc extends Database_TSM {
|
||||||
public function connect() {
|
public function connect() {
|
||||||
// Extract the connection parameters, adding required variabels
|
// Extract the connection parameters, adding required variabels
|
||||||
extract($this->_config['connection'] + array(
|
extract($this->_config['connection'] + array(
|
@ -29,7 +29,7 @@ class Model_LIBRARY extends TSM_ORM {
|
|||||||
);
|
);
|
||||||
|
|
||||||
public function slots() {
|
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
|
// Return a list of scratch volumes
|
||||||
@ -131,7 +131,7 @@ class Model_LIBRARY extends TSM_ORM {
|
|||||||
static $CACHE = array();
|
static $CACHE = array();
|
||||||
|
|
||||||
if (! isset($CACHE[__METHOD__]))
|
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;
|
$CACHE[__METHOD__][$vho->LIBVOLUME->LIBRARY_NAME ? 'IN' : 'OUT'][] = $vho;
|
||||||
|
|
||||||
return isset($CACHE[__METHOD__][$inout]) ? $CACHE[__METHOD__][$inout] : array();
|
return isset($CACHE[__METHOD__][$inout]) ? $CACHE[__METHOD__][$inout] : array();
|
@ -35,7 +35,7 @@ abstract class TSM_ORM extends ORM {
|
|||||||
*/
|
*/
|
||||||
protected function _initialize() {
|
protected function _initialize() {
|
||||||
// Set out DB connection configuration.
|
// 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
|
// Adjustments for DSMADMC or DB2 connections
|
||||||
if (array_key_exists($this->_db_group,$this->_tsm))
|
if (array_key_exists($this->_db_group,$this->_tsm))
|
||||||
|
@ -121,7 +121,7 @@ abstract class lnApp_Controller_TemplateDefault extends Controller_Template {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Bind our template meta variable
|
// Bind our template meta variable
|
||||||
$this->meta = new meta;
|
$this->meta = new Meta;
|
||||||
View::bind_global('meta',$this->meta);
|
View::bind_global('meta',$this->meta);
|
||||||
|
|
||||||
// Our default style sheet
|
// Our default style sheet
|
@ -67,7 +67,7 @@ class lnApp_JPGraph_Gantt extends JPGraph {
|
|||||||
// This will compile the gantt and output a URL that has the image
|
// This will compile the gantt and output a URL that has the image
|
||||||
public function draw($name) {
|
public function draw($name) {
|
||||||
// Sort our items by sort criteria.
|
// Sort our items by sort criteria.
|
||||||
sort::MAsort($this->_items,'sort,summary',0);
|
Sort::MAsort($this->_items,'sort,summary',0);
|
||||||
|
|
||||||
$c = 0;
|
$c = 0;
|
||||||
$ls = '';
|
$ls = '';
|
Reference in New Issue
Block a user