Commit eb396d02 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1522659: Centeralising the require to pieform file



behatnotneeded - existing tests should suffice

Change-Id: I69a59b5f70bc6e5e3379106faf975f9c99af07b0
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 96c5d641
......@@ -16,7 +16,6 @@ define('SECTION_PLUGINNAME', 'account');
define('SECTION_PAGE', 'activity');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
require_once('pieforms/pieform.php');
define('TITLE', get_string('inbox'));
// Make sure the unread message count is up to date whenever the
......
......@@ -17,7 +17,6 @@ define('SECTION_PAGE', 'notifications');
require(dirname(dirname(dirname(dirname(__FILE__)))) . '/init.php');
define('TITLE', get_string('notifications'));
require_once('pieforms/pieform.php');
require_once(get_config('libroot') . 'activity.php');
$elements = get_notification_settings_elements($USER);
......
......@@ -14,7 +14,6 @@ define('MENUITEM', 'settings/preferences');
require(dirname(dirname(__FILE__)) . '/init.php');
define('TITLE', get_string('deleteaccount', 'account'));
require_once('pieforms/pieform.php');
if (!$USER->can_delete_self()) {
throw new AccessDeniedException(get_string('accessdenied', 'error'));
......
......@@ -17,7 +17,6 @@ define('SECTION_PAGE', 'preferences');
require(dirname(dirname(__FILE__)) . '/init.php');
define('TITLE', get_string('account'));
require_once('pieforms/pieform.php');
// load up user preferences
$prefs = (object) load_account_preferences($USER->id);
......
......@@ -16,7 +16,6 @@ define('SECTION_PLUGINNAME', 'account');
define('SECTION_PAGE', 'institutions');
require(dirname(dirname(__FILE__)) . '/init.php');
define('TITLE', get_string('institutionmembership'));
require_once('pieforms/pieform.php');
$institutions = get_records_assoc('institution', '', '', '', 'name,displayname,registerallowed');
......
......@@ -14,7 +14,6 @@ define('ADMIN', 1);
define('MENUITEM', 'configextensions/cleanurls');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
require_once('pieforms/pieform.php');
define('TITLE', get_string('cleanurls', 'admin'));
$regenerateform = pieform(array(
......
......@@ -14,7 +14,6 @@ define('ADMIN', 1);
define('MENUITEM', 'configextensions/filters');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
require_once('pieforms/pieform.php');
define('TITLE', get_string('htmlfilters', 'admin'));
if ($filters = get_config('filters')) {
......
......@@ -17,7 +17,6 @@ define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'iframesites');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
require_once('pieforms/pieform.php');
require_once('upgrade.php');
define('TITLE', get_string('allowediframesites', 'admin'));
......
......@@ -14,7 +14,6 @@ define('ADMIN', 1);
define('MENUITEM', 'configextensions/pluginadmin');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('pluginadmin', 'admin'));
require_once('pieforms/pieform.php');
$plugintype = param_alpha('plugintype');
$pluginname = param_variable('pluginname');
......
......@@ -14,8 +14,6 @@ define('ADMIN', 1);
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('MENUITEM', 'managegroups/groups');
require_once('pieforms/pieform.php');
$groupid = param_integer('id');
$group = get_record_sql("SELECT g.name FROM {group} g WHERE g.id = ? AND g.deleted = 0", array($groupid));
......
......@@ -14,8 +14,6 @@ define('ADMIN', 1);
define('MENUITEM', 'managegroups/groups');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
require_once('pieforms/pieform.php');
$group = get_record_select('group', 'id = ? AND deleted = 0', array(param_integer('id')));
define('TITLE', get_string('administergroups', 'admin'));
......
......@@ -14,7 +14,6 @@ define('INSTITUTIONALADMIN', 1);
define('MENUITEM', 'managegroups/uploadcsv');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('uploadgroupcsv', 'admin'));
require_once('pieforms/pieform.php');
require_once(get_config('libroot') . 'group.php');
require_once(get_config('libroot') . 'institution.php');
safe_require('artefact', 'internal');
......
......@@ -14,7 +14,6 @@ define('INSTITUTIONALADMIN', 1);
define('MENUITEM', 'managegroups/uploadmemberscsv');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('uploadgroupmemberscsv', 'admin'));
require_once('pieforms/pieform.php');
require_once(get_config('libroot') . 'group.php');
require_once(get_config('libroot') . 'institution.php');
safe_require('artefact', 'internal');
......
......@@ -25,7 +25,6 @@ if (get_config('installed')) {
else {
define('TITLE', get_string('installation', 'admin'));
}
require_once('pieforms/pieform.php');
require(get_config('libroot') . 'upgrade.php');
require_once(get_config('libroot') . 'registration.php');
......
......@@ -17,8 +17,6 @@ define('SECTION_PLUGINNAME', 'admin');
require(dirname(dirname(__FILE__)).'/init.php');
require_once('pieforms/pieform.php');
require(get_config('libroot') . 'registration.php');
define('TITLE', get_string('Register', 'admin'));
......
......@@ -18,7 +18,6 @@ define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'cookieconsent');
require(dirname(dirname(dirname(__FILE__))).'/init.php');
require_once('pieforms/pieform.php');
define('TITLE', get_string('cookieconsent', 'cookieconsent'));
define('DEFAULTPAGE', 'home');
......
......@@ -18,7 +18,6 @@ define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'cookieconsent2');
require(dirname(dirname(dirname(__FILE__))).'/init.php');
require_once('pieforms/pieform.php');
define('TITLE', get_string('cookieconsent2', 'cookieconsent'));
define('DEFAULTPAGE', 'home');
......
......@@ -18,7 +18,6 @@ define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'addfontvariant');
require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/init.php');
require_once('pieforms/pieform.php');
require_once(get_config('libroot') . 'skin.php');
define('TITLE', get_string('addfontvariant', 'skin'));
......
......@@ -18,7 +18,6 @@ define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'deletefont');
require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/init.php');
require_once('pieforms/pieform.php');
if (!get_config('skins')) {
throw new FeatureNotEnabledException();
......
......@@ -18,7 +18,6 @@ define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'editfont');
require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/init.php');
require_once('pieforms/pieform.php');
define('TITLE', get_string('editfont', 'skin'));
if (!get_config('skins')) {
......
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