make factory(), getStyles() and exitError() static

This commit is contained in:
Uwe Steinmann 2013-02-27 17:09:26 +01:00
parent 7f2d7e3ebe
commit cfc301290e

View File

@ -44,7 +44,7 @@ class UI extends UI_Default {
* @param array $params parameter passed to constructor of view class * @param array $params parameter passed to constructor of view class
* @return object an object of a class implementing the view * @return object an object of a class implementing the view
*/ */
function factory($theme, $class, $params=array()) { /* {{{ */ static function factory($theme, $class, $params=array()) { /* {{{ */
global $settings, $session; global $settings, $session;
if(file_exists("../views/".$theme."/class.".$class.".php")) { if(file_exists("../views/".$theme."/class.".$class.".php")) {
require("../views/".$theme."/class.".$class.".php"); require("../views/".$theme."/class.".$class.".php");
@ -73,7 +73,7 @@ class UI extends UI_Default {
return null; return null;
} /* }}} */ } /* }}} */
function getStyles() { /* {{{ */ static function getStyles() { /* {{{ */
global $settings; global $settings;
$themes = array(); $themes = array();
@ -90,7 +90,7 @@ class UI extends UI_Default {
return $themes; return $themes;
} /* }}} */ } /* }}} */
function exitError($pagetitle, $error) { static function exitError($pagetitle, $error) {
global $theme; global $theme;
$tmp = 'ErrorDlg'; $tmp = 'ErrorDlg';
$view = UI::factory($theme, $tmp); $view = UI::factory($theme, $tmp);