Removing a lot of old system variables from BSApp
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 13 Jan 2008 20:43:26 +0000 (12:43 -0800)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 13 Jan 2008 20:43:26 +0000 (12:43 -0800)
* 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
Printer.php
PrinterNavigation.php
PrinterRootElementPage.php

diff --git a/App.php b/App.php
index 5869303709dc6168841456ee0eaa8860307d5ba3..f11756640c49d90b711e78fa949395ef40b32337 100644 (file)
--- 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
index 38ab1a202076f9a67ca86fdd1ca339aedc7718d9..aaffea8a19409abcbbe1aa2fe07e56fe36740d04 100644 (file)
@@ -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
index a22d8b229844fa20a260a495e2b4b934fd0e8a3a..e5dae90c9102cc643bfa45a9cf14a7fa79da67e8 100644 (file)
@@ -177,7 +177,7 @@ class BSPrinterNavigation
                }
                
                $output .= "\n" . '<div id="toplinks">';
-               $output .= "\n\t" . '<div>' . BSApp::get_application() . ' ' . BSPrinter::get_realm() . '</div>';
+               $output .= "\n\t" . '<div>' . BSPrinter::get_realm() . '</div>';
                $output .= "\n\t" . '<div id="toplinks-links">' . implode(' &bull; ', $output2) . '</div>';
                $output .= "\n" . '</div>';
                
index 4231c4e1982b5e708607f5f38bc2b75e5ec9732a..d75676b5808a4912ab495379c5b2cd9be8873a27 100644 (file)
@@ -260,7 +260,7 @@ class BSPrinterRootElementPage extends BSPrinterRootElement
                
                echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
                echo "<html xml:lang=\"" . $language['langcode'] . "\" lang=\"" . $language['langcode'] . "\" dir=\"" . $language['direction'] . "\">\n<head>";
-               echo "\n\t<title>" . sprintf(_('%1$s - %2$s - %3$s'), BSApp::get_application(), BSPrinter::get_realm(), $this->title) . "</title>";
+               echo "\n\t<title>" . BSPrinter::get_realm() . " - " $this->title . "</title>";
                echo "\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" . $language['charset'] . "\" />";
                echo "\n\t<link rel=\"stylesheet\" href=\"" . BSPrinter::get_stylesheet() . "\" />";
                echo "\n</head>\n<body>\n";
@@ -277,7 +277,7 @@ class BSPrinterRootElementPage extends BSPrinterRootElement
                        echo BSApp::GetType('PrinterNavigation')->constructFooterHtml();
                }
                
-               $copyright = "\n<br />\n<p align=\"center\" class=\"copyright\">\n\t<a href=\"http://www.bluestatic.org\" target=\"_blank\">" . BSApp::get_application() . ' ' . BSApp::get_app_version() . ", &copy;2002 - " . gmdate('Y') . " Blue Static</a>\n</p>";
+               $copyright = "\n<br />\n<p align=\"center\" class=\"copyright\">\n\t" . BSPrinter::get_copyright() . "\n</p>";
                                
                if (!defined('ISSO_PRINTER_HIDE_SETUP'))
                {