Fixes for KH 3.3 - to do with case file names
This commit is contained in:
44
application/classes/TSM.php
Normal file
44
application/classes/TSM.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class contains our TSM information
|
||||
*
|
||||
* @package PTA
|
||||
* @subpackage Core
|
||||
* @category Helpers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2010 phpTSMadmin Development Team
|
||||
* @license http://phptsmadmin.sf.net/license.html
|
||||
*/
|
||||
class TSM {
|
||||
static $_online = FALSE;
|
||||
|
||||
public function set($username,$password,Database_TSM_Result $server) {
|
||||
// @todo Consider encrypting this
|
||||
Session::instance()->set(Kohana::$config->load('auth')->session_key,$username);
|
||||
Session::instance()->set('password',$password);
|
||||
Session::instance()->set('SERVER',$server);
|
||||
|
||||
return TSM::$_online = TRUE;
|
||||
}
|
||||
|
||||
public static function online() {
|
||||
return TSM::$_online;
|
||||
}
|
||||
|
||||
public static function instance() {
|
||||
return new TSM;
|
||||
}
|
||||
|
||||
public static function name() {
|
||||
return Session::instance()->get('SERVER')->get('SERVER_NAME');
|
||||
}
|
||||
|
||||
public static function version() {
|
||||
$s = Session::instance()->get('SERVER')->rewind()->as_array();
|
||||
$s = array_pop($s);
|
||||
|
||||
return sprintf('%s.%s.%s.%s',$s['VERSION'],$s['RELEASE'],$s['LEVEL'],$s['SUBLEVEL']);
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user