Commit bd294fdc authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Use require_once() not require() in more places where local/lib.php may have already included libs


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 95f8ff65
......@@ -41,7 +41,7 @@ else {
}
require_once('pieforms/pieform.php');
require(get_config('libroot') . 'upgrade.php');
require(get_config('libroot') . 'registration.php');
require_once(get_config('libroot') . 'registration.php');
$upgrades = check_upgrades();
......
......@@ -47,7 +47,7 @@ if ($action == 'suspend') {
}
if ($action == 'search') {
require('searchlib.php');
require_once('searchlib.php');
$params = new StdClass;
$params->query = trim(param_variable('query', ''));
......
......@@ -33,7 +33,7 @@ define('TITLE', get_string('usersearch', 'admin'));
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'usersearch');
require('searchlib.php');
require_once('searchlib.php');
$search = (object) array(
'query' => trim(param_variable('query', '')),
......
......@@ -29,7 +29,7 @@ define('INTERNAL', 1);
define('JSON', 1);
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
require('searchlib.php');
require_once('searchlib.php');
$params = new StdClass;
$params->query = trim(param_variable('query', ''));
......
......@@ -231,8 +231,8 @@ function user_authorise($token, $useragent) {
throw new XmlrpcServerException('Unable to get information for the specified user');
}
require(get_config('docroot') . 'artefact/lib.php');
require(get_config('docroot') . 'artefact/internal/lib.php');
require_once(get_config('docroot') . 'artefact/lib.php');
require_once(get_config('docroot') . 'artefact/internal/lib.php');
$element_list = call_static_method('ArtefactTypeProfile', 'get_all_fields');
$element_required = call_static_method('ArtefactTypeProfile', 'get_mandatory_fields');
......
......@@ -29,7 +29,7 @@ define('INTERNAL', 1);
define('MENUITEM', 'groups');
require(dirname(dirname(__FILE__)) . '/init.php');
require_once('pieforms/pieform.php');
require('group.php');
require_once('group.php');
$groupid = param_integer('id');
define('GROUP', $groupid);
......
......@@ -30,8 +30,8 @@ define('MENUITEM', 'groups/find');
require(dirname(dirname(__FILE__)) . '/init.php');
require_once('pieforms/pieform.php');
define('TITLE', get_string('findgroups'));
require('group.php');
require('searchlib.php');
require_once('group.php');
require_once('searchlib.php');
$filter = param_alpha('filter', 'notmember');
$offset = param_integer('offset', 0);
......
......@@ -29,7 +29,7 @@ define('INTERNAL', 1);
define('MENUITEM', 'groups');
require(dirname(dirname(__FILE__)) . '/init.php');
require_once('pieforms/pieform.php');
require('group.php');
require_once('group.php');
$groupid = param_integer('id');
$userid = param_integer('user');
......
......@@ -29,7 +29,7 @@ define('INTERNAL', 1);
define('MENUITEM', 'groups');
require(dirname(dirname(__FILE__)) . '/init.php');
require_once('pieforms/pieform.php');
require('group.php');
require_once('group.php');
$groupid = param_integer('id');
$returnto = param_alpha('returnto', 'mygroups');
......
......@@ -29,8 +29,8 @@ define('PUBLIC', 1);
define('INTERNAL', 1);
define('JSON', 1);
require(dirname(dirname(__FILE__)) . '/init.php');
require('group.php');
require('searchlib.php');
require_once('group.php');
require_once('searchlib.php');
$id = param_integer('id');
$query = trim(param_variable('query', ''));
......
......@@ -29,7 +29,7 @@ define('INTERNAL', 1);
define('MENUITEM', 'groups');
require(dirname(dirname(__FILE__)) . '/init.php');
require_once('pieforms/pieform.php');
require('group.php');
require_once('group.php');
$groupid = param_integer('id');
$returnto = param_alpha('returnto', 'mygroups');
......
......@@ -33,7 +33,7 @@ define('SECTION_PAGE', 'deletetopic');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
safe_require('interaction' ,'forum');
require('group.php');
require_once('group.php');
require_once('pieforms/pieform.php');
require_once(get_config('docroot') . 'interaction/lib.php');
......
......@@ -33,7 +33,7 @@ define('SECTION_PAGE', 'editpost');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
safe_require('interaction', 'forum');
require('group.php');
require_once('group.php');
require_once(get_config('docroot') . 'interaction/lib.php');
require_once('pieforms/pieform.php');
......
......@@ -29,8 +29,8 @@ define('INTERNAL', 1);
define('JSON', 1);
require(dirname(dirname(__FILE__)) . '/init.php');
require('pieforms/pieform.php');
require('searchlib.php');
require_once('pieforms/pieform.php');
require_once('searchlib.php');
$query = param_variable('query', '');
$offset = param_integer('offset', 0);
......
......@@ -29,7 +29,7 @@ define('INTERNAL', 1);
define('JSON', 1);
require(dirname(dirname(__FILE__)) . '/init.php');
require('searchlib.php');
require_once('searchlib.php');
safe_require('search', 'internal');
......
......@@ -29,7 +29,7 @@ define('INTERNAL', 1);
define('JSON', 1);
require(dirname(dirname(__FILE__)) . '/init.php');
require('searchlib.php');
require_once('searchlib.php');
try {
$query = param_variable('query');
......
......@@ -29,7 +29,7 @@ define('INTERNAL', 1);
define('JSON', 1);
require(dirname(dirname(__FILE__)) . '/init.php');
require('searchlib.php');
require_once('searchlib.php');
$tag = param_variable('tag', null);
$limit = param_integer('limit', 10);
......
......@@ -29,7 +29,7 @@ define('INTERNAL', 1);
define('JSON', 1);
require(dirname(dirname(__FILE__)) . '/init.php');
require('searchlib.php');
require_once('searchlib.php');
safe_require('search', 'internal');
......
......@@ -28,7 +28,7 @@
define('INTERNAL', 1);
define('MENUITEM', 'myportfolio');
require('init.php');
require('searchlib.php');
require_once('searchlib.php');
define('TITLE', get_string('mytags'));
......
......@@ -30,7 +30,7 @@ define('MENUITEM', 'groups/findfriends');
require(dirname(dirname(__FILE__)) . '/init.php');
require_once('pieforms/pieform.php');
define('TITLE', get_string('denyfriendrequest', 'group'));
require('searchlib.php');
require_once('searchlib.php');
safe_require('search', 'internal');
$id = param_integer('id');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment