diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2013-01-26 01:22:50 -0500 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-01-26 01:22:50 -0500 |
commit | 04aa79b53c38095d4727f4d850e191c64d99352f (patch) | |
tree | c6ac7dce0306a6f2fa8fd846b6f001c5fb35a943 | |
parent | eaa44dcd0938ad48f4a9f863b24ca5d3a318ae10 (diff) | |
download | ampache-04aa79b53c38095d4727f4d850e191c64d99352f.tar.gz ampache-04aa79b53c38095d4727f4d850e191c64d99352f.tar.bz2 ampache-04aa79b53c38095d4727f4d850e191c64d99352f.zip |
Move show_{footer,header}() from ui.lib.php to UI
-rw-r--r-- | admin/access.php | 4 | ||||
-rw-r--r-- | admin/catalog.php | 4 | ||||
-rw-r--r-- | admin/duplicates.php | 4 | ||||
-rw-r--r-- | admin/export.php | 4 | ||||
-rw-r--r-- | admin/flag.php | 4 | ||||
-rw-r--r-- | admin/index.php | 4 | ||||
-rw-r--r-- | admin/mail.php | 4 | ||||
-rw-r--r-- | admin/modules.php | 4 | ||||
-rw-r--r-- | admin/shout.php | 4 | ||||
-rw-r--r-- | admin/system.php | 4 | ||||
-rw-r--r-- | admin/users.php | 4 | ||||
-rw-r--r-- | albums.php | 2 | ||||
-rw-r--r-- | artists.php | 4 | ||||
-rw-r--r-- | browse.php | 4 | ||||
-rw-r--r-- | democratic.php | 4 | ||||
-rw-r--r-- | flag.php | 2 | ||||
-rw-r--r-- | index.php | 4 | ||||
-rw-r--r-- | lib/class/ui.class.php | 21 | ||||
-rw-r--r-- | lib/ui.lib.php | 24 | ||||
-rw-r--r-- | localplay.php | 4 | ||||
-rw-r--r-- | playlist.php | 4 | ||||
-rw-r--r-- | preferences.php | 4 | ||||
-rw-r--r-- | radio.php | 4 | ||||
-rw-r--r-- | random.php | 4 | ||||
-rw-r--r-- | search.php | 4 | ||||
-rw-r--r-- | shout.php | 4 | ||||
-rw-r--r-- | smartplaylist.php | 4 | ||||
-rw-r--r-- | song.php | 4 | ||||
-rw-r--r-- | stats.php | 4 | ||||
-rw-r--r-- | templates/show_login_form.inc.php | 2 | ||||
-rw-r--r-- | templates/show_user_registration.inc.php | 2 |
31 files changed, 75 insertions, 78 deletions
diff --git a/admin/access.php b/admin/access.php index a39d3691..60e86d62 100644 --- a/admin/access.php +++ b/admin/access.php @@ -27,7 +27,7 @@ if (!Access::check('interface','100')) { exit(); } -show_header(); +UI::show_header(); switch ($_REQUEST['action']) { case 'delete_record': @@ -109,5 +109,5 @@ switch ($_REQUEST['action']) { require_once Config::get('prefix') .'/templates/show_access_list.inc.php'; break; } // end switch on action -show_footer(); +UI::show_footer(); ?> diff --git a/admin/catalog.php b/admin/catalog.php index ba2c63aa..bc67c13f 100644 --- a/admin/catalog.php +++ b/admin/catalog.php @@ -27,7 +27,7 @@ if (!Access::check('interface','100')) { exit; } -show_header(); +UI::show_header(); /* Big switch statement to handle various actions */ switch ($_REQUEST['action']) { @@ -314,6 +314,6 @@ switch ($_REQUEST['action']) { } // end switch /* Show the Footer */ -show_footer(); +UI::show_footer(); ?> diff --git a/admin/duplicates.php b/admin/duplicates.php index f6100240..fe518bd5 100644 --- a/admin/duplicates.php +++ b/admin/duplicates.php @@ -27,7 +27,7 @@ if (!Access::check('interface','100')) { exit; } -show_header(); +UI::show_header(); /* Switch on Action */ switch ($_REQUEST['action']) { @@ -42,5 +42,5 @@ switch ($_REQUEST['action']) { break; } // end switch on action -show_footer(); +UI::show_footer(); ?> diff --git a/admin/export.php b/admin/export.php index 972d9211..5805a1fe 100644 --- a/admin/export.php +++ b/admin/export.php @@ -27,7 +27,7 @@ if (!Access::check('interface','100')) { exit; } -show_header(); +UI::show_header(); /* Switch on Action */ switch ($_REQUEST['action']) { @@ -73,5 +73,5 @@ switch ($_REQUEST['action']) { break; } // end switch on action -show_footer(); +UI::show_footer(); ?> diff --git a/admin/flag.php b/admin/flag.php index f7c8adf8..bb3e64aa 100644 --- a/admin/flag.php +++ b/admin/flag.php @@ -27,7 +27,7 @@ if (!Access::check('interface','100')) { exit(); } -show_header(); +UI::show_header(); switch ($_REQUEST['action']) { case 'edit_song': @@ -301,5 +301,5 @@ switch ($_REQUEST['action']) { break; } // end switch -show_footer(); +UI::show_footer(); ?> diff --git a/admin/index.php b/admin/index.php index 7bd5ea6d..e79e28ac 100644 --- a/admin/index.php +++ b/admin/index.php @@ -27,7 +27,7 @@ if (!Access::check('interface',100)) { exit(); } -show_header(); +UI::show_header(); switch ($_REQUEST['action']) { default: @@ -42,5 +42,5 @@ switch ($_REQUEST['action']) { break; } -show_footer(); +UI::show_footer(); ?> diff --git a/admin/mail.php b/admin/mail.php index 3db8f48c..6ed43fd8 100644 --- a/admin/mail.php +++ b/admin/mail.php @@ -27,7 +27,7 @@ if (!Access::check('interface','75')) { exit(); } -show_header(); +UI::show_header(); // Action switch switch ($_REQUEST['action']) { @@ -74,7 +74,7 @@ switch ($_REQUEST['action']) { break; } // end switch -show_footer(); +UI::show_footer(); ?> diff --git a/admin/modules.php b/admin/modules.php index e7c56b10..bf55578b 100644 --- a/admin/modules.php +++ b/admin/modules.php @@ -29,7 +29,7 @@ if (!$GLOBALS['user']->has_access(100)) { /* Always show the header */ -show_header(); +UI::show_header(); switch ($_REQUEST['action']) { case 'install_localplay': @@ -153,6 +153,6 @@ switch ($_REQUEST['action']) { break; } // end switch -show_footer(); +UI::show_footer(); ?> diff --git a/admin/shout.php b/admin/shout.php index 2a5bba04..ca6933ac 100644 --- a/admin/shout.php +++ b/admin/shout.php @@ -27,7 +27,7 @@ if (!Access::check('interface','100')) { exit; } -show_header(); +UI::show_header(); // Switch on the incomming action switch ($_REQUEST['action']) { @@ -58,5 +58,5 @@ switch ($_REQUEST['action']) { break; } // end switch on action -show_footer(); +UI::show_footer(); ?> diff --git a/admin/system.php b/admin/system.php index 7f7fe9de..e98f592d 100644 --- a/admin/system.php +++ b/admin/system.php @@ -27,7 +27,7 @@ if (!Access::check('interface',100) OR Config::get('demo_mode')) { exit(); } -show_header(); +UI::show_header(); /* Switch on action boys */ switch ($_REQUEST['action']) { @@ -56,6 +56,6 @@ switch ($_REQUEST['action']) { break; } // end switch -show_footer(); +UI::show_footer(); ?> diff --git a/admin/users.php b/admin/users.php index 50d7b20d..84d19938 100644 --- a/admin/users.php +++ b/admin/users.php @@ -27,7 +27,7 @@ if (!Access::check('interface','100')) { exit(); } -show_header(); +UI::show_header(); // Switch on the actions switch ($_REQUEST['action']) { @@ -205,6 +205,6 @@ switch ($_REQUEST['action']) { } // end switch on action /* Show the footer */ -show_footer(); +UI::show_footer(); ?> @@ -176,5 +176,5 @@ switch ($_REQUEST['action']) { break; } // switch on view -show_footer(); +UI::show_footer(); ?> diff --git a/artists.php b/artists.php index 880dc485..f893328a 100644 --- a/artists.php +++ b/artists.php @@ -22,7 +22,7 @@ require_once 'lib/init.php'; -show_header(); +UI::show_header(); /** * Display Switch @@ -207,5 +207,5 @@ switch($_REQUEST['action']) { break; } // end switch -show_footer(); +UI::show_footer(); ?> @@ -52,7 +52,7 @@ switch ($_REQUEST['action']) { break; } // end switch -show_header(); +UI::show_header(); switch($_REQUEST['action']) { case 'file': @@ -117,5 +117,5 @@ switch($_REQUEST['action']) { $browse->store(); /* Show the Footer */ -show_footer(); +UI::show_footer(); ?> diff --git a/democratic.php b/democratic.php index d6a061d9..a31aa0e7 100644 --- a/democratic.php +++ b/democratic.php @@ -28,7 +28,7 @@ if (!Config::get('allow_democratic_playback')) { exit; } -show_header(); +UI::show_header(); // Switch on their action switch ($_REQUEST['action']) { @@ -122,6 +122,6 @@ switch ($_REQUEST['action']) { break; } // end switch on action -show_footer(); +UI::show_footer(); ?> @@ -57,5 +57,5 @@ switch ($action) { break; } // end action switch -show_footer(); +UI::show_footer(); ?> @@ -22,7 +22,7 @@ require_once 'lib/init.php'; -show_header(); +UI::show_header(); $action = isset($_REQUEST['action']) ? scrub_in($_REQUEST['action']) : null; @@ -42,6 +42,6 @@ if (Config::get('refresh_limit') > 5) { require_once Config::get('prefix') . '/templates/show_index.inc.php'; -show_footer(); +UI::show_footer(); ?> diff --git a/lib/class/ui.class.php b/lib/class/ui.class.php index e47fe0d1..c4fd3d47 100644 --- a/lib/class/ui.class.php +++ b/lib/class/ui.class.php @@ -89,6 +89,27 @@ class UI { } /** + * show_header + * + * For now this just shows the header template + */ + public static function show_header() { + require_once Config::get('prefix') . '/templates/header.inc.php'; + } + + /** + * show_footer + * + * Shows the footer template and possibly profiling info. + */ + public static function show_footer() { + require_once Config::get('prefix') . '/templates/footer.inc.php'; + if (isset($_REQUEST['profiling'])) { + Dba::show_profile(); + } + } + + /** * truncate * * Limit text to a certain length; adds an ellipsis if truncation was diff --git a/lib/ui.lib.php b/lib/ui.lib.php index 72b87f45..00f7eb27 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -75,30 +75,6 @@ function return_referer() { } // return_referer /** - * show_header - * This shows the header.inc.php, it may do something - * more in the future - */ -function show_header() { - - require_once Config::get('prefix') . '/templates/header.inc.php'; - -} // show_header - -/** - * show_footer - * shows the footer of the page - */ -function show_footer() { - - require_once Config::get('prefix') . '/templates/footer.inc.php'; - if (isset($_REQUEST['profiling'])) { - Dba::show_profile(); - } - -} // show_footer - -/** * get_location * This function gets the information about a person's current location. * This is used for A) sidebar highlighting & submenu showing and B) titlebar diff --git a/localplay.php b/localplay.php index 18814a46..3e04a87a 100644 --- a/localplay.php +++ b/localplay.php @@ -22,7 +22,7 @@ require_once 'lib/init.php'; -show_header(); +UI::show_header(); // Check to see if we've got the rights to be here if (!Config::get('allow_localplay_playback') || !Access::check('interface','25')) { @@ -90,5 +90,5 @@ switch ($_REQUEST['action']) { break; } // end switch action -show_footer(); +UI::show_footer(); ?> diff --git a/playlist.php b/playlist.php index 2b6dba05..b91f0136 100644 --- a/playlist.php +++ b/playlist.php @@ -35,7 +35,7 @@ if ($_REQUEST['action'] == 'delete_playlist') { } } -show_header(); +UI::show_header(); /* Switch on the action passed in */ @@ -162,5 +162,5 @@ switch ($_REQUEST['action']) { break; } // switch on the action -show_footer(); +UI::show_footer(); ?> diff --git a/preferences.php b/preferences.php index ce25e39c..1b7e0f67 100644 --- a/preferences.php +++ b/preferences.php @@ -125,7 +125,7 @@ switch($_REQUEST['action']) { break; } // End Switch Action -show_header(); +UI::show_header(); /** * switch on the view @@ -140,5 +140,5 @@ switch ($_REQUEST['action']) { break; } // end switch on action -show_footer(); +UI::show_footer(); ?> @@ -22,7 +22,7 @@ require_once 'lib/init.php'; -show_header(); +UI::show_header(); // Switch on Action switch ($_REQUEST['action']) { @@ -60,6 +60,6 @@ switch ($_REQUEST['action']) { break; } // end data collection -show_footer(); +UI::show_footer(); ?> @@ -22,7 +22,7 @@ require_once 'lib/init.php'; -show_header(); +UI::show_header(); switch ($_REQUEST['action']) { case 'get_advanced': @@ -38,5 +38,5 @@ switch ($_REQUEST['action']) { break; } // end switch -show_footer(); +UI::show_footer(); ?> @@ -22,7 +22,7 @@ require_once 'lib/init.php'; -show_header(); +UI::show_header(); /** * action switch @@ -58,5 +58,5 @@ switch ($_REQUEST['action']) { } /* Show the Footer */ -show_footer(); +UI::show_footer(); ?> @@ -22,7 +22,7 @@ require_once 'lib/init.php'; -show_header(); +UI::show_header(); // Switch on the incomming action switch ($_REQUEST['action']) { @@ -59,5 +59,5 @@ switch ($_REQUEST['action']) { break; } // end switch on action -show_footer(); +UI::show_footer(); ?> diff --git a/smartplaylist.php b/smartplaylist.php index 9031c33d..ac4d5d46 100644 --- a/smartplaylist.php +++ b/smartplaylist.php @@ -33,7 +33,7 @@ if ($_REQUEST['action'] == 'delete_playlist') { } } -show_header(); +UI::show_header(); /* Switch on the action passed in */ switch ($_REQUEST['action']) { @@ -98,5 +98,5 @@ switch ($_REQUEST['action']) { break; } // switch on the action -show_footer(); +UI::show_footer(); ?> @@ -22,7 +22,7 @@ require_once 'lib/init.php'; -show_header(); +UI::show_header(); // Switch on Action switch ($_REQUEST['action']) { @@ -35,6 +35,6 @@ switch ($_REQUEST['action']) { break; } // end data collection -show_footer(); +UI::show_footer(); ?> @@ -22,7 +22,7 @@ require_once 'lib/init.php'; -show_header(); +UI::show_header(); /* Switch on the action to be performed */ switch ($_REQUEST['action']) { @@ -56,6 +56,6 @@ switch ($_REQUEST['action']) { break; } // end switch on action -show_footer(); +UI::show_footer(); ?> diff --git a/templates/show_login_form.inc.php b/templates/show_login_form.inc.php index ac6ed2b0..3ec408f6 100644 --- a/templates/show_login_form.inc.php +++ b/templates/show_login_form.inc.php @@ -95,5 +95,5 @@ if (@is_readable(Config::get('prefix') . '/config/motd.php')) { ?> <?php } -show_footer(); +UI::show_footer(); ?> diff --git a/templates/show_user_registration.inc.php b/templates/show_user_registration.inc.php index 7bc21083..be9e269e 100644 --- a/templates/show_user_registration.inc.php +++ b/templates/show_user_registration.inc.php @@ -110,5 +110,5 @@ if (Config::get('user_agreement')) { ?> </div> </form> <?php -show_footer(); +UI::show_footer(); ?> |