mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Use include_once where applicable
All of these are sourcing function libraries so we don't need to include them more than once. Things that insert actual HTML into the output were left calling include(). Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
parent
4af079a5bd
commit
46f2798524
11 changed files with 23 additions and 23 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
|
||||
|
||||
include('aur.inc'); # access AUR common functions
|
||||
include_once('aur.inc'); # access AUR common functions
|
||||
include_once('acctfuncs.inc'); # access Account specific functions
|
||||
|
||||
set_lang(); # this sets up the visitor's language
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
|
||||
|
||||
include("aur.inc");
|
||||
include_once("aur.inc");
|
||||
set_lang();
|
||||
check_sid();
|
||||
html_header();
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
|
||||
|
||||
include("aur.inc");
|
||||
include_once("aur.inc");
|
||||
set_lang();
|
||||
check_sid();
|
||||
|
||||
include('stats.inc');
|
||||
include_once('stats.inc');
|
||||
|
||||
html_header( __("Home") );
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
|
||||
|
||||
include("aur.inc"); # access AUR common functions
|
||||
include_once("aur.inc"); # access AUR common functions
|
||||
include_once("acctfuncs.inc"); # access AUR common functions
|
||||
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
|
||||
|
||||
include("aur.inc"); # access AUR common functions
|
||||
set_lang(); # this sets up the visitor's language
|
||||
include('pkgfuncs.inc'); # package specific functions
|
||||
check_sid(); # see if they're still logged in
|
||||
include_once("aur.inc"); # access AUR common functions
|
||||
set_lang(); # this sets up the visitor's language
|
||||
include_once('pkgfuncs.inc'); # package specific functions
|
||||
check_sid(); # see if they're still logged in
|
||||
|
||||
# Set the title to the current query if required
|
||||
if (isset($_GET['ID'])) {
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
|
||||
|
||||
include("aur.inc"); # access AUR common functions
|
||||
include("pkgfuncs.inc"); # use some form of this for i18n support
|
||||
include_once("aur.inc"); # access AUR common functions
|
||||
include_once("pkgfuncs.inc"); # use some form of this for i18n support
|
||||
set_lang(); # this sets up the visitor's language
|
||||
check_sid(); # see if they're still logged in
|
||||
html_header(); # print out the HTML header
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
|
||||
include("config.inc");
|
||||
include_once("config.inc");
|
||||
|
||||
require('Archive/Tar.php');
|
||||
require('Find.php');
|
||||
require_once('Archive/Tar.php');
|
||||
require_once('Find.php');
|
||||
|
||||
include("aur.inc"); # access AUR common functions
|
||||
include("pkgfuncs.inc"); # package functions
|
||||
include_once("aur.inc"); # access AUR common functions
|
||||
include_once("pkgfuncs.inc"); # package functions
|
||||
|
||||
set_lang(); # this sets up the visitor's language
|
||||
check_sid(); # see if they're still logged in
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
|
||||
|
||||
include("aur.inc");
|
||||
include("aurjson.class.php");
|
||||
include_once("aurjson.class.php");
|
||||
|
||||
if ( $_SERVER['REQUEST_METHOD'] == 'GET' ) {
|
||||
if ( isset($_GET['type']) ) {
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
|
||||
|
||||
include("aur.inc");
|
||||
include_once("aur.inc");
|
||||
|
||||
include("feedcreator.class.php");
|
||||
include_once("feedcreator.class.php");
|
||||
|
||||
#If there's a cached version <1hr old, won't regenerate now
|
||||
$rss = new UniversalFeedCreator();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
|
||||
|
||||
include("aur.inc");
|
||||
include_once("aur.inc");
|
||||
set_lang();
|
||||
check_sid();
|
||||
html_header();
|
||||
|
|
|
@ -4,11 +4,12 @@
|
|||
*
|
||||
* This file contains the AurRPC remote handling class
|
||||
**/
|
||||
if (!extension_loaded('json'))
|
||||
{
|
||||
if (!extension_loaded('json')) {
|
||||
dl('json.so');
|
||||
}
|
||||
|
||||
include_once("aur.inc");
|
||||
|
||||
/**
|
||||
* This class defines a remote interface for fetching data
|
||||
* from the AUR using JSON formatted elements.
|
||||
|
|
Loading…
Add table
Reference in a new issue