From 4a60b5bab4a61e0053ef8dbd47d93bb7ee49e2ce Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 13 Jan 2008 12:43:26 -0800 Subject: [PATCH] Removing a lot of old system variables from BSApp * App.php: Removed BSApp->application, BSApp->appPath, BSApp->appVersion, BSApp->webPath (BSApp::set_application): Removed (BSApp::get_application): Removed (BSApp::set_app_path): Removed (BSApp::get_app_path): Removed (BSApp::set_app_version): Removed (BSApp::get_app_version): Removed (BSApp::set_web_path): Removed (BSApp::get_web_path): Removed * Printer.php: Add BSPrinter->copyright to store copyright information for the footer of pages (BSPrinter::get_copyright): New method (BSPrinter::set_copyright): New method * PrinterNavigation.php: BSPrinter->realm is now the only component used for titles (BSPrinterNavigation::constructHeaderHtml): Now uses only the realm * PrinterRootElementPage.php: Again, only use BSPrinter->realm (BSPrinterRootElementPage::paint): Switch to using only the realm in the title and using BSPrinter->copyright in the footer --- App.php | 113 ------------------------------------- Printer.php | 26 +++++++++ PrinterNavigation.php | 2 +- PrinterRootElementPage.php | 4 +- 4 files changed, 29 insertions(+), 116 deletions(-) diff --git a/App.php b/App.php index 5869303..f117566 100644 --- a/App.php +++ b/App.php @@ -74,30 +74,6 @@ class BSApp */ private static $instance; - /** - * Application name - * @var string - */ - private $application = 'Unknown ISSO Project'; - - /** - * Application path - * @var string - */ - private $appPath; - - /** - * Application version - * @var string - */ - private $appVersion; - - /** - * Web path - * @var string - */ - private $webPath; - /** * Debug mode? * @var bool @@ -142,95 +118,6 @@ class BSApp return self::$instance; } - // ################################################################### - /** - * Sets the application name - * - * @param string Application name - */ - public static function set_application($name) - { - self::_instance()->application = $name; - } - - // ################################################################### - /** - * Gets the application name - * - * @return string Application name - */ - public static function get_application() - { - return self::_instance()->application; - } - - // ################################################################### - /** - * Sets the application's working path - * - * @param string Path - */ - public static function set_app_path($path) - { - self::_instance()->appPath = BSFunctions::fetch_source_path($path); - } - - // ################################################################### - /** - * Returns the path to the application - * - * @return string Application path - */ - public static function get_app_path() - { - return self::_instance()->appPath; - } - - // ################################################################### - /** - * Sets the application version - * - * @param string Application version - */ - public static function set_app_version($vers) - { - self::_instance()->appVersion = $vers; - } - - // ################################################################### - /** - * Gets the application version - * - * @return string Application version - */ - public static function get_app_version() - { - return self::_instance()->appVersion; - } - - // ################################################################### - /** - * Sets the application's web path, which is the full path from the - * server's web root - * - * @param string Path - */ - public static function set_web_path($path) - { - self::_instance()->webPath = BSFunctions::fetch_source_path($path); - } - - // ################################################################### - /** - * Returns the web path to the application - * - * @return string Application's web path - */ - public static function get_web_path() - { - return self::_instance()->webPath; - } - // ################################################################### /** * Sets the debug state diff --git a/Printer.php b/Printer.php index 38ab1a2..aaffea8 100644 --- a/Printer.php +++ b/Printer.php @@ -72,6 +72,12 @@ class BSPrinter */ private $realm = 'BSPrinterOutput'; + /** + * The copyright string used in the footer + * @var string + */ + private $copyright; + // ################################################################### /** * Constructor (private) @@ -93,6 +99,26 @@ class BSPrinter return self::$instance; } + /** + * Returns the copyright string + * + * @return string + */ + public static function get_copyright() + { + self::_instance()->copyright; + } + + /** + * Sets the copyright string + * + * @param string The copyright string + */ + public static function set_copyright($copyright) + { + self::_instance()->copyright = $copyright; + } + // ################################################################### /** * Returns the realm diff --git a/PrinterNavigation.php b/PrinterNavigation.php index a22d8b2..e5dae90 100644 --- a/PrinterNavigation.php +++ b/PrinterNavigation.php @@ -177,7 +177,7 @@ class BSPrinterNavigation } $output .= "\n" . ''; diff --git a/PrinterRootElementPage.php b/PrinterRootElementPage.php index 4231c4e..d75676b 100644 --- a/PrinterRootElementPage.php +++ b/PrinterRootElementPage.php @@ -260,7 +260,7 @@ class BSPrinterRootElementPage extends BSPrinterRootElement echo "\n"; echo "\n"; - echo "\n\t" . sprintf(_('%1$s - %2$s - %3$s'), BSApp::get_application(), BSPrinter::get_realm(), $this->title) . ""; + echo "\n\t" . BSPrinter::get_realm() . " - " $this->title . ""; echo "\n\t"; echo "\n\t"; echo "\n\n\n"; @@ -277,7 +277,7 @@ class BSPrinterRootElementPage extends BSPrinterRootElement echo BSApp::GetType('PrinterNavigation')->constructFooterHtml(); } - $copyright = "\n
\n

\n\t" . BSApp::get_application() . ' ' . BSApp::get_app_version() . ", ©2002 - " . gmdate('Y') . " Blue Static\n

"; + $copyright = "\n
\n

\n\t" . BSPrinter::get_copyright() . "\n

"; if (!defined('ISSO_PRINTER_HIDE_SETUP')) { -- 2.22.5