Skip to content

Commit 24da6f5

Browse files
authored
Merge pull request #180 from mambax7/master
updates
2 parents 96ac496 + dc439fa commit 24da6f5

37 files changed

Lines changed: 82 additions & 85 deletions

activate.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* @author Taiwen Jiang <phppp@users.sourceforge.net>
2020
*/
2121
$xoopsOption['pagetype'] = 'user';
22-
include __DIR__ . '/header.php';
22+
require __DIR__ . '/header.php';
2323
include $GLOBALS['xoops']->path('header.php');
2424
if (!empty($_GET['id']) && !empty($_GET['actkey'])) {
2525
$id = (int)$_GET['id'];
@@ -63,7 +63,7 @@
6363
} else {
6464
printf(_US_ACTVMAILOK, $thisuser->getVar('uname'));
6565
}
66-
include __DIR__ . '/footer.php';
66+
require __DIR__ . '/footer.php';
6767
} else {
6868
redirect_header(XOOPS_URL . '/user.php', 5, _US_ACTLOGIN, false);
6969
}
@@ -100,11 +100,11 @@
100100
echo _US_YOURREGISTERED;
101101
}
102102
} else {
103-
include_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
103+
require_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
104104
$form = new XoopsThemeForm('', 'form', 'activate.php');
105105
$form->addElement(new XoopsFormText(_US_EMAIL, 'email', 25, 255));
106106
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
107107
$form->display();
108108
}
109109
$xoBreadcrumbs[] = ['title' => _MD_SUICO_REGISTER];
110-
include __DIR__ . '/footer.php';
110+
require __DIR__ . '/footer.php';

admin/fieldscategory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
use Xmf\Request;
2424
use XoopsModules\Suico;
2525

26-
include_once __DIR__ . '/admin_header.php';
26+
require_once __DIR__ . '/admin_header.php';
2727
xoops_cp_header();
2828
$adminObject->addItemButton(_AM_SUICO_CATEGORY, 'fieldscategory.php?op=new', 'add');
2929
$adminObject->displayNavigation(basename(__FILE__));
@@ -97,4 +97,4 @@
9797
if (isset($template_main)) {
9898
$GLOBALS['xoopsTpl']->display("db:{$template_main}");
9999
}
100-
include_once __DIR__ . '/admin_footer.php';
100+
require_once __DIR__ . '/admin_footer.php';

admin/fieldslist.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
use XoopsModules\Suico;
2424
use XoopsModules\Suico\Form\FieldForm;
2525

26-
include_once __DIR__ . '/admin_header.php';
26+
require_once __DIR__ . '/admin_header.php';
2727
xoops_cp_header();
2828
$adminObject->addItemButton(_AM_SUICO_FIELD, 'fieldslist.php?op=new', 'add');
2929
$adminObject->displayNavigation(basename(__FILE__));
@@ -334,4 +334,4 @@ function suico_visible_toggle($field_id, $field_required, $helper)
334334
}
335335
}
336336

337-
include_once __DIR__ . '/admin_footer.php';
337+
require_once __DIR__ . '/admin_footer.php';

admin/fieldspermissions.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* @author Jan Pedersen
1919
* @author Taiwen Jiang <phppp@users.sourceforge.net>
2020
*/
21-
include_once __DIR__ . '/admin_header.php';
21+
require_once __DIR__ . '/admin_header.php';
2222
xoops_cp_header();
2323
$adminObject->displayNavigation(basename(__FILE__));
2424
$op = \Xmf\Request::getCmd('op', 'edit');
@@ -48,7 +48,7 @@
4848
$anonymous = true;
4949
break;
5050
}
51-
include_once $GLOBALS['xoops']->path('/class/xoopsformloader.php');
51+
require_once $GLOBALS['xoops']->path('/class/xoopsformloader.php');
5252
$opform = new XoopsSimpleForm('', 'opform', 'fieldspermissions.php', 'get');
5353
$op_select = new XoopsFormSelect('', 'op', $op);
5454
$op_select->setExtra('onchange="document.forms.opform.submit()"');
@@ -59,7 +59,7 @@
5959
$opform->addElement($op_select);
6060
$opform->display();
6161
$module_id = $GLOBALS['xoopsModule']->getVar('mid');
62-
include_once $GLOBALS['xoops']->path('/class/xoopsform/grouppermform.php');
62+
require_once $GLOBALS['xoops']->path('/class/xoopsform/grouppermform.php');
6363
$form = new XoopsGroupPermForm($title_of_form, $module_id, $perm_name, $perm_desc, 'admin/fieldspermissions.php?op=' . $op, $anonymous);
6464
if ('access' === $op) {
6565
/* @var XoopsMemberHandler $memberHandler */
@@ -98,5 +98,5 @@
9898
}
9999
}
100100
$form->display();
101-
include_once __DIR__ . '/admin_footer.php';
101+
require_once __DIR__ . '/admin_footer.php';
102102
//xoops_cp_footer();

admin/fieldsvisibility.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* @author Jan Pedersen
1919
* @author Taiwen Jiang <phppp@users.sourceforge.net>
2020
*/
21-
include_once __DIR__ . '/admin_header.php';
21+
require_once __DIR__ . '/admin_header.php';
2222
//there is no way to override current tabs when using system menu
2323
//this dirty hack will have to do it
2424
$_SERVER['REQUEST_URI'] = 'admin/fieldspermissions.php';
@@ -42,7 +42,7 @@
4242
$visibilityHandler->deleteAll($criteria, true);
4343
redirect_header('fieldsvisibility.php', 2, sprintf(_AM_SUICO_DELETEDSUCCESS, _AM_SUICO_PROF_VISIBLE));
4444
}
45-
include_once $GLOBALS['xoops']->path('/class/xoopsformloader.php');
45+
require_once $GLOBALS['xoops']->path('/class/xoopsformloader.php');
4646
$opform = new XoopsSimpleForm('', 'opform', 'fieldspermissions.php', 'get');
4747
$op_select = new XoopsFormSelect('', 'op', $op);
4848
$op_select->setExtra('onchange="document.forms.opform.submit()"');
@@ -80,5 +80,5 @@
8080
$add_form->addElement(new XoopsFormButton('', 'submit', _ADD, 'submit'));
8181
$add_form->assign($GLOBALS['xoopsTpl']);
8282
$GLOBALS['xoopsTpl']->display('db:admin/suico_admin_fieldsvisibility.tpl');
83-
include_once __DIR__ . '/admin_footer.php';
83+
require_once __DIR__ . '/admin_footer.php';
8484
//xoops_cp_footer();

admin/registrationstep.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
use XoopsModules\Suico\Form\StepForm;
2424
use XoopsModules\Suico;
2525

26-
include_once __DIR__ . '/admin_header.php';
26+
require_once __DIR__ . '/admin_header.php';
2727
xoops_cp_header();
2828
$adminObject->addItemButton(_AM_SUICO_STEP, 'registrationstep.php?op=new', 'add');
2929
$adminObject->displayNavigation(basename(__FILE__));
@@ -113,4 +113,4 @@ function profile_stepsave_toggle($step_d, $step_save)
113113
}
114114
}
115115

116-
include_once __DIR__ . '/admin_footer.php';
116+
require_once __DIR__ . '/admin_footer.php';

admin/user.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
use XoopsModules\Suico;
2525
use XoopsModules\Suico\Form\UserForm;
2626

27-
include_once __DIR__ . '/admin_header.php';
27+
require_once __DIR__ . '/admin_header.php';
2828
xoops_cp_header();
2929
$adminObject->addItemButton(_AM_SUICO_ADDUSER, 'user.php?op=new', 'add');
3030
$adminObject->displayNavigation(basename(__FILE__));
@@ -38,7 +38,7 @@
3838
switch ($op) {
3939
default:
4040
case 'list':
41-
include_once $GLOBALS['xoops']->path('/class/xoopsformloader.php');
41+
require_once $GLOBALS['xoops']->path('/class/xoopsformloader.php');
4242
$form = new XoopsThemeForm(_AM_SUICO_EDITUSER, 'form', 'user.php');
4343
$lastUid = \Xmf\Request::getInt('lastuid', null, 'GET');
4444
$form->addElement(new XoopsFormSelectUser(_AM_SUICO_SELECTUSER, 'id', false, $lastUid));
@@ -146,7 +146,7 @@
146146
if ($handler->insertUser($user)) {
147147
$profile->setVar('profile_id', $user->getVar('uid'));
148148
$profileHandler->insert($profile);
149-
include_once $GLOBALS['xoops']->path('/modules/system/constants.php');
149+
require_once $GLOBALS['xoops']->path('/modules/system/constants.php');
150150
if ($grouppermHandler->checkRight('system_admin', XOOPS_SYSTEM_GROUP, $GLOBALS['xoopsUser']->getGroups(), 1)) {
151151
//Update group memberships
152152
$cur_groups = $user->getGroups();
@@ -218,5 +218,5 @@
218218
}
219219
break;
220220
}
221-
include_once __DIR__ . '/admin_footer.php';
221+
require_once __DIR__ . '/admin_footer.php';
222222
//xoops_cp_footer();

changemail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
}
3838
if (!isset($_POST['submit']) || !isset($_POST['passwd'])) {
3939
//show change password form
40-
include_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
40+
require_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
4141
$form = new XoopsThemeForm(_MD_SUICO_CHANGEMAIL, 'emailform', $_SERVER['REQUEST_URI'], 'post', true);
4242
$form->addElement(new XoopsFormPassword(_US_PASSWORD, 'passwd', 15, 50), true);
4343
$form->addElement(new XoopsFormText(_MD_SUICO_NEWMAIL, 'newmail', 15, 50), true);

changepass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
$xoopsOption['xoops_pagetitle'] = sprintf(_MD_SUICO_CHANGEPASSWORD, $xoopsModule->getVar('name'), $controller->nameOwner);
3737
if (!isset($_POST['submit'])) {
3838
//show change password form
39-
include_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
39+
require_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
4040
$form = new XoopsThemeForm(_MD_SUICO_CHANGEPASSWORD, 'form', $_SERVER['REQUEST_URI'], 'post', true);
4141
$form->addElement(new XoopsFormPassword(_MD_SUICO_OLDPASSWORD, 'oldpass', 15, 50), true);
4242
$form->addElement(new XoopsFormPassword(_MD_SUICO_NEWPASSWORD, 'newpass', 15, 50), true);

class/Category.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
* @author Jan Pedersen
2222
* @author Taiwen Jiang <phppp@users.sourceforge.net>
2323
*/
24-
// defined('XOOPS_ROOT_PATH') || exit("XOOPS root path not defined");
2524

2625
/**
2726
* @package kernel
@@ -50,7 +49,7 @@ public function getForm($action = false)
5049
$action = $_SERVER['REQUEST_URI'];
5150
}
5251
$title = $this->isNew() ? \sprintf(_AM_SUICO_ADD, _AM_SUICO_CATEGORY) : \sprintf(_AM_SUICO_EDIT, _AM_SUICO_CATEGORY);
53-
include_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
52+
require_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
5453
$form = new \XoopsThemeForm($title, 'form', $action, 'post', true);
5554
$form->addElement(new \XoopsFormText(_AM_SUICO_TITLE, 'cat_title', 35, 255, $this->getVar('cat_title')));
5655
if (!$this->isNew()) {

0 commit comments

Comments
 (0)