diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2013-01-25 19:20:47 -0500 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-01-25 19:20:47 -0500 |
commit | 0c66442b559a350527aa35155ec965a2901cafbc (patch) | |
tree | 338214a3abdf18d43f3df1e7a238eb49bc0fb0bc | |
parent | 9a83f50042925e0daa0aab1b44fcc8d39e79edf2 (diff) | |
download | ampache-0c66442b559a350527aa35155ec965a2901cafbc.tar.gz ampache-0c66442b559a350527aa35155ec965a2901cafbc.tar.bz2 ampache-0c66442b559a350527aa35155ec965a2901cafbc.zip |
require and require_once aren't functions
Since the parentheses are optional, we leave them off to remind ourselve
that PHP be crazy, yo.
-rw-r--r-- | admin/catalog.php | 8 | ||||
-rw-r--r-- | admin/flag.php | 6 | ||||
-rw-r--r-- | artists.php | 8 | ||||
-rw-r--r-- | flag.php | 2 | ||||
-rw-r--r-- | lib/class/localplay.class.php | 2 | ||||
-rw-r--r-- | server/browse.ajax.php | 2 |
6 files changed, 14 insertions, 14 deletions
diff --git a/admin/catalog.php b/admin/catalog.php index 3a4ea938..b8eac41b 100644 --- a/admin/catalog.php +++ b/admin/catalog.php @@ -35,7 +35,7 @@ switch ($_REQUEST['action']) { /* Does this use now? */ delete_flagged($flag); $type = 'show_flagged_songs'; - include(conf('prefix') . '/templates/flag.inc'); + require Config::get('prefix') . '/templates/flag.inc'; break; case 'add_to_all_catalogs': $catalog = new Catalog(); @@ -123,7 +123,7 @@ switch ($_REQUEST['action']) { show_confirmation(T_('Catalog Delete'), T_('Confirm Deletion Request'),$next_url,1,'delete_catalog'); break; case 'remove_disabled': - if (conf('demo_mode')) { break; } + if (Config::get('demo_mode')) { break; } $song = $_REQUEST['song']; @@ -272,11 +272,11 @@ switch ($_REQUEST['action']) { break; case 'show_disabled': /* Stop the demo hippies */ - if (conf('demo_mode')) { break; } + if (Config::get('demo_mode')) { break; } $songs = $catalog->get_disabled(); if (count($songs)) { - require (conf('prefix') . '/templates/show_disabled_songs.inc.php'); + require Config::get('prefix') . '/templates/show_disabled_songs.inc.php'; } else { echo "<div class=\"error\" align=\"center\">" . T_('No Disabled songs found') . "</div>"; diff --git a/admin/flag.php b/admin/flag.php index ffbc6655..9cce736d 100644 --- a/admin/flag.php +++ b/admin/flag.php @@ -85,7 +85,7 @@ switch ($_REQUEST['action']) { $album = new Album($_REQUEST['album_id']); - require_once(conf('prefix') . '/templates/show_edit_album.inc.php'); + require_once Config::get('prefix') . '/templates/show_edit_album.inc.php'; break; // Update all songs from this album @@ -128,7 +128,7 @@ switch ($_REQUEST['action']) { $artist = new Artist($_REQUEST['artist_id']); - require_once(conf('prefix') . '/templates/show_edit_artist.inc.php'); + require_once Config::get('prefix') . '/templates/show_edit_artist.inc.php'; break; // Update all songs by this artist @@ -255,7 +255,7 @@ switch ($_REQUEST['action']) { $song = new Song($_REQUEST['song']); $song->fill_ext_info(); $song->format_song(); - require_once (conf('prefix') . '/templates/show_edit_song.inc.php'); + require_once Config::get('prefix') . '/templates/show_edit_song.inc.php'; break; case 'disable': $song_obj = new Song(); diff --git a/artists.php b/artists.php index 8218964d..a47eb193 100644 --- a/artists.php +++ b/artists.php @@ -171,12 +171,12 @@ switch($_REQUEST['action']) { /* Else we've got an error! But be lenient, and just show the form again */ else { - require (conf('prefix') . '/templates/show_rename_artist.inc.php'); + require Config::get('prefix') . '/templates/show_rename_artist.inc.php'; } break; case 'show_rename': $artist = new Artist($_REQUEST['artist']); - require (conf('prefix') . '/templates/show_rename_artist.inc.php'); + require Config::get('prefix') . '/templates/show_rename_artist.inc.php'; break; case 'match': case 'Match': @@ -184,10 +184,10 @@ switch($_REQUEST['action']) { if ($match == "Browse" || $match == "Show_all") { $chr = ""; } else { $chr = $match; } /* Enclose this in the purty box! */ - require (conf('prefix') . '/templates/show_box_top.inc.php'); + require Config::get('prefix') . '/templates/show_box_top.inc.php'; show_alphabet_list('artists','artists.php',$match); show_alphabet_form($chr, T_('Show Artists starting with'),"artists.php?action=match"); - require (conf('prefix') . '/templates/show_box_bottom.inc.php'); + require Config::get('prefix') . '/templates/show_box_bottom.inc.php'; if ($match === "Browse") { show_artists(); @@ -25,7 +25,7 @@ * This is called for all of our flagging needs */ -require_once('lib/init.php'); +require_once 'lib/init.php'; show_template('header'); diff --git a/lib/class/localplay.class.php b/lib/class/localplay.class.php index bc92602c..28c8bed9 100644 --- a/lib/class/localplay.class.php +++ b/lib/class/localplay.class.php @@ -100,7 +100,7 @@ class Localplay { if (!$this->type) { return false; } $filename = Config::get('prefix') . '/modules/localplay/' . $this->type . '.controller.php'; - $include = require_once($filename); + $include = require_once $filename; if (!$include) { /* Throw Error Here */ diff --git a/server/browse.ajax.php b/server/browse.ajax.php index f9afb80b..b6f3e154 100644 --- a/server/browse.ajax.php +++ b/server/browse.ajax.php @@ -23,7 +23,7 @@ /** * Sub-Ajax page, requires AJAX_INCLUDE */ -require_once("../lib/init.php"); +require_once '../lib/init.php'; session_start(); if (!defined('AJAX_INCLUDE')) { exit; } |