Skip to content

Commit 7533523

Browse files
committed
- implementation new xoops_confirm
- implemted rating system (stars, likes and numeric)
1 parent c143949 commit 7533523

File tree

84 files changed

+1499
-394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1499
-394
lines changed

_TODO.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@ I moved files, where I do not know whether they are still needed into folder _ar
99

1010
TODOs:
1111

12-
new xoops_confirm
1312

1413

15-
rate.php:
16-
this file currently is not rating
17-
1814

1915

2016
Permissions:

admin/addfiles.php

Lines changed: 0 additions & 144 deletions
This file was deleted.

admin/fields.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -221,19 +221,7 @@
221221
exit;
222222
break;
223223
case 'delete':
224-
$tablesObj = $helper->getHandler('Tables')->get($fieldTid);
225-
if (isset($_REQUEST['ok']) && 1 == $_REQUEST['ok']) {
226-
if (!$GLOBALS['xoopsSecurity']->check()) {
227-
redirect_header('fields.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
228-
}
229-
if ($helper->getHandler('Tables')->delete($tablesObj)) {
230-
redirect_header('fields.php', 3, _AM_MODULEBUILDER_FORMDELOK);
231-
} else {
232-
echo $tablesObj->getHtmlErrors();
233-
}
234-
} else {
235-
xoops_confirm(['ok' => 1, 'field_tid' => $fieldTid, 'op' => 'delete'], \Xmf\Request::getString('REQUEST_URI', '', 'SERVER'), sprintf(_AM_MODULEBUILDER_FORMSUREDEL, $tablesObj->getVar('table_name')));
236-
}
224+
//delete is not needed as deletion is done by deleting whole table
237225
break;
238226
case 'display':
239227
$fieldsArray = ['parent', 'inlist', 'inform', 'admin', 'user', 'block', 'main', 'search', 'required'];

admin/morefiles.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@
110110
$GLOBALS['xoopsTpl']->assign('form', $form->render());
111111
break;
112112
case 'edit':
113-
// Define main template
114-
// $templateMain = 'modulebuilder_morefiles.tpl';
115113
$GLOBALS['xoTheme']->addScript('modules/modulebuilder/assets/js/functions.js');
116114
$GLOBALS['xoopsTpl']->assign('navigation', $adminObject->displayNavigation('morefiles.php'));
117115
$adminObject->addItemButton(_AM_MODULEBUILDER_MODULES_ADD, 'morefiles.php?op=new', 'add');
@@ -134,7 +132,13 @@
134132
$GLOBALS['xoopsTpl']->assign('error', $morefilesObj->getHtmlErrors());
135133
}
136134
} else {
137-
xoops_confirm(['ok' => 1, 'file_id' => $fileId, 'op' => 'delete'], \Xmf\Request::getString('REQUEST_URI', '', 'SERVER'), sprintf(_AM_MODULEBUILDER_FORM_SURE_DELETE, $morefilesObj->getVar('file_name')));
135+
$xoopsconfirm = new \XoopsModules\Modulebuilder\Common\XoopsConfirm(
136+
['ok' => 1, 'file_id' => $fileId, 'op' => 'delete'],
137+
\Xmf\Request::getString('REQUEST_URI', '', 'SERVER'),
138+
$morefilesObj->getVar('file_name')
139+
);
140+
$form = $xoopsconfirm->getFormXoopsConfirm();
141+
$GLOBALS['xoopsTpl']->assign('form', $form->render());
138142
}
139143
break;
140144
}

admin/settings.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,13 @@
170170
$GLOBALS['xoopsTpl']->assign('error', $settingsObj->getHtmlErrors());
171171
}
172172
} else {
173-
xoops_confirm(['ok' => 1, 'set_id' => $setId, 'op' => 'delete'], \Xmf\Request::getString('REQUEST_URI', '', 'SERVER'), sprintf(_AM_MODULEBUILDER_FORMSUREDEL, $settingsObj->getVar('set_name')));
173+
$xoopsconfirm = new \XoopsModules\Modulebuilder\Common\XoopsConfirm(
174+
['ok' => 1, 'set_id' => $setId, 'op' => 'delete'],
175+
\Xmf\Request::getString('REQUEST_URI', '', 'SERVER'),
176+
$settingsObj->getVar('set_name')
177+
);
178+
$form = $xoopsconfirm->getFormXoopsConfirm();
179+
$GLOBALS['xoopsTpl']->assign('form', $form->render());
174180
}
175181
break;
176182
case 'display':

admin/tables.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,13 @@
259259
$GLOBALS['xoopsTpl']->assign('error', $tablesObj->getHtmlErrors());
260260
}
261261
} else {
262-
xoops_confirm(['ok' => 1, 'table_id' => $tableId, 'op' => 'delete'], \Xmf\Request::getString('REQUEST_URI', '', 'SERVER'), sprintf(_AM_MODULEBUILDER_FORMSUREDEL, $tablesObj->getVar('table_name')));
262+
$xoopsconfirm = new \XoopsModules\Modulebuilder\Common\XoopsConfirm(
263+
['ok' => 1, 'table_id' => $tableId, 'op' => 'delete'],
264+
\Xmf\Request::getString('REQUEST_URI', '', 'SERVER'),
265+
$tablesObj->getVar('table_name')
266+
);
267+
$form = $xoopsconfirm->getFormXoopsConfirm();
268+
$GLOBALS['xoopsTpl']->assign('form', $form->render());
263269
}
264270
break;
265271
case 'display':

0 commit comments

Comments
 (0)