Skip to content

Commit 6363cc4

Browse files
committed
4.34 RC1
1 parent 0f2e469 commit 6363cc4

9 files changed

Lines changed: 38 additions & 34 deletions

admin/admin_forum_manager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@
233233
default:
234234

235235
$categoryHandler = xoops_getModuleHandler('category', 'newbb');
236-
$criteriaCategory = new CriteriaCompo(new criteria('1', 1));
236+
$criteriaCategory = new CriteriaCompo(new Criteria('cat_id'));
237237
$criteriaCategory->setSort('cat_order');
238238
$categories = $categoryHandler->getList($criteriaCategory);
239239
if (0 === count($categories)) {
@@ -254,7 +254,7 @@
254254
$echo .= '</tr>';
255255

256256
$categoryHandler = xoops_getModuleHandler('category', 'newbb');
257-
$criteriaCategory = new CriteriaCompo(new criteria('1', 1));
257+
$criteriaCategory = new CriteriaCompo(new Criteria('cat_id'));
258258
$criteriaCategory->setSort('cat_order');
259259
$categories = $categoryHandler->getList($criteriaCategory);
260260
$forums = $forumHandler->getTree(array_keys($categories), 0, 'all');

admin/admin_forum_reorder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
$forumHandler = xoops_getModuleHandler('forum', 'newbb');
7777
$categoryHandler = xoops_getModuleHandler('category', 'newbb');
78-
$criteriaCategory = new CriteriaCompo(new criteria('1', 1));
78+
$criteriaCategory = new CriteriaCompo(new Criteria('cat_id'));
7979
$criteriaCategory->setSort('cat_order');
8080
$categories = $categoryHandler->getAll($criteriaCategory, array('cat_id', 'cat_order', 'cat_title'));
8181
$forums = $forumHandler->getTree(array_keys($categories), 0, 'all', '&nbsp;&nbsp;&nbsp;&nbsp;');

admin/admin_groupmod.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
echo "<br><br><table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
7171
echo "<form name='reorder' method='post'>";
7272
$categoryHandler = xoops_getModuleHandler('category', 'newbb');
73-
$criteriaCategory = new CriteriaCompo(new criteria('1', 1));
73+
$criteriaCategory = new CriteriaCompo(new Criteria('cat_id'));
7474
$criteriaCategory->setSort('cat_order');
7575
$categories = $categoryHandler->getAll($criteriaCategory, array('cat_id', 'cat_order', 'cat_title'));
7676
$forums = $forumHandler->getTree(array_keys($categories), 0, 'all', '&nbsp;&nbsp;&nbsp;&nbsp;');

admin/admin_permissions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array()
333333
$opform->display();
334334

335335
$categoryHandler = xoops_getModuleHandler('category', 'newbb');
336-
$criteriaCategory = new CriteriaCompo(new criteria('1', 1));
336+
$criteriaCategory = new CriteriaCompo(new Criteria('cat_id'));
337337
$criteriaCategory->setSort('cat_order');
338338
$categories = $categoryHandler->getList($criteriaCategory);
339339

@@ -379,7 +379,7 @@ public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array()
379379
xoops_cp_header();
380380

381381
$categoryHandler = xoops_getModuleHandler('category', 'newbb');
382-
$criteriaCategory = new CriteriaCompo(new criteria('1', 1));
382+
$criteriaCategory = new CriteriaCompo(new Criteria('cat_id'));
383383
$criteriaCategory->setSort('cat_order');
384384
$categories = $categoryHandler->getList($criteriaCategory);
385385

@@ -448,7 +448,7 @@ public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array()
448448
$form = new NewbbXoopsGroupPermForm($fm_options[$op]['title'], $module_id, $fm_options[$op]['item'], $fm_options[$op]['desc'], 'admin/admin_permissions.php', $fm_options[$op]['anonymous']);
449449

450450
$categoryHandler = xoops_getModuleHandler('category', 'newbb');
451-
$criteriaCategory = new CriteriaCompo(new criteria('1', 1));
451+
$criteriaCategory = new CriteriaCompo(new Criteria('cat_id'));
452452
$criteriaCategory->setSort('cat_order');
453453
$categories = $categoryHandler->getList($criteriaCategory);
454454
if ($op === 'category') {

admin/admin_type_manager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
}
185185

186186
$categoryHandler = xoops_getModuleHandler('category', 'newbb');
187-
$criteriaCategory = new CriteriaCompo(new criteria('1', 1));
187+
$criteriaCategory = new CriteriaCompo(new Criteria('cat_id'));
188188
$criteriaCategory->setSort('cat_order');
189189
$categories = $categoryHandler->getList($criteriaCategory);
190190
$forumHandler = xoops_getModuleHandler('forum', 'newbb');
@@ -274,7 +274,7 @@
274274

275275
case 'forum':
276276
$categoryHandler = xoops_getModuleHandler('category', 'newbb');
277-
$criteriaCategory = new CriteriaCompo(new criteria('1', 1));
277+
$criteriaCategory = new CriteriaCompo(new Criteria('cat_id'));
278278
$criteriaCategory->setSort('cat_order');
279279
$categories = $categoryHandler->getList($criteriaCategory);
280280
if (empty($categories)) {

class/tree.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,16 @@ protected function _makeTreeItems($key, &$ret, $prefix_orig, $prefix_curr = '',
6161
if ($key > 0) {
6262
if (count($tags) > 0) {
6363
foreach ($tags as $tag) {
64-
$ret[$key][$tag] = $this->_tree[$key]['obj']->getVar($tag);
64+
$ret[$key][$tag] = $this->tree[$key]['obj']->getVar($tag);
6565
}
6666
} else {
67-
$ret[$key]['forum_name'] = $this->_tree[$key]['obj']->getVar('forum_name');
67+
$ret[$key]['forum_name'] = $this->tree[$key]['obj']->getVar('forum_name');
6868
}
6969
$ret[$key]['prefix'] = $prefix_curr;
7070
$prefix_curr .= $prefix_orig;
7171
}
72-
if (isset($this->_tree[$key]['child']) && !empty($this->_tree[$key]['child'])) {
73-
foreach ($this->_tree[$key]['child'] as $childkey) {
72+
if (isset($this->tree[$key]['child']) && !empty($this->tree[$key]['child'])) {
73+
foreach ($this->tree[$key]['child'] as $childkey) {
7474
$this->_makeTreeItems($childkey, $ret, $prefix_orig, $prefix_curr, $tags);
7575
}
7676
}
@@ -148,10 +148,10 @@ public function getAllChild_object($key, &$ret, $depth = 0)
148148
return;
149149
}
150150

151-
if (isset($this->_tree[$key]['child'])) {
152-
foreach ($this->_tree[$key]['child'] as $childkey) {
153-
if (isset($this->_tree[$childkey]['obj'])) {
154-
$ret['child'][$childkey] = $this->_tree[$childkey]['obj'];
151+
if (isset($this->tree[$key]['child'])) {
152+
foreach ($this->tree[$key]['child'] as $childkey) {
153+
if (isset($this->tree[$childkey]['obj'])) {
154+
$ret['child'][$childkey] = $this->tree[$childkey]['obj'];
155155
}
156156
$this->getAllChild_object($childkey, $ret['child'][$childkey], $depth);
157157
}
@@ -192,15 +192,15 @@ public function getAllChild_array($key, &$ret, array $tags = array(), $depth = 0
192192
return;
193193
}
194194

195-
if (isset($this->_tree[$key]['child'])) {
196-
foreach ($this->_tree[$key]['child'] as $childkey) {
197-
if (isset($this->_tree[$childkey]['obj'])) {
195+
if (isset($this->tree[$key]['child'])) {
196+
foreach ($this->tree[$key]['child'] as $childkey) {
197+
if (isset($this->tree[$childkey]['obj'])) {
198198
if (count($tags) > 0) {
199199
foreach ($tags as $tag) {
200-
$ret['child'][$childkey][$tag] = $this->_tree[$childkey]['obj']->getVar($tag);
200+
$ret['child'][$childkey][$tag] = $this->tree[$childkey]['obj']->getVar($tag);
201201
}
202202
} else {
203-
$ret['child'][$childkey]['forum_name'] = $this->_tree[$childkey]['obj']->getVar('forum_name');
203+
$ret['child'][$childkey]['forum_name'] = $this->tree[$childkey]['obj']->getVar('forum_name');
204204
}
205205
}
206206

@@ -238,11 +238,11 @@ public function &makeArrayTree($key = 0, $tags = null, $depth = 0)
238238
*/
239239
public function &_getParentForums($key, array $ret = array(), $uplevel = 0)
240240
{
241-
if (isset($this->_tree[$key]['parent']) && isset($this->_tree[$this->_tree[$key]['parent']]['obj'])) {
242-
$ret[$uplevel] = $this->_tree[$this->_tree[$key]['parent']]['obj'];
243-
if ($this->_tree[$key]['parent'] !== $key) {
244-
//$parents = $this->getParentForums($this->_tree[$key]['parent'], $ret, $uplevel+1);
245-
$parents = $this->getParentForums($this->_tree[$key]['parent']);
241+
if (isset($this->tree[$key]['parent']) && isset($this->tree[$this->tree[$key]['parent']]['obj'])) {
242+
$ret[$uplevel] = $this->tree[$this->tree[$key]['parent']]['obj'];
243+
if ($this->tree[$key]['parent'] !== $key) {
244+
//$parents = $this->getParentForums($this->tree[$key]['parent'], $ret, $uplevel+1);
245+
$parents = $this->getParentForums($this->tree[$key]['parent']);
246246
foreach (array_keys($parents) as $newkey) {
247247
$ret[$newkey] = $parents[$newkey];
248248
}
@@ -261,9 +261,9 @@ public function &getParentForums($key, $reverse = true)
261261
{
262262
$ret = array();
263263
$pids = array();
264-
if (isset($this->_tree[$key]['parent']) && isset($this->_tree[$this->_tree[$key]['parent']]['obj'])) {
265-
$pids[] = $this->_tree[$this->_tree[$key]['parent']]['obj']->getVar($this->_myId);
266-
$parents = $this->_getParentForums($this->_tree[$key]['parent'], $ret);
264+
if (isset($this->tree[$key]['parent']) && isset($this->tree[$this->tree[$key]['parent']]['obj'])) {
265+
$pids[] = $this->tree[$this->tree[$key]['parent']]['obj']->getVar($this->_myId);
266+
$parents = $this->_getParentForums($this->tree[$key]['parent'], $ret);
267267
foreach (array_keys($parents) as $newkey) {
268268
if (!is_object($newkey)) {
269269
continue;

docs/changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
4.34 RC1 (XOOPS 2.5.10) 2019-02-09
2+
===========================================
3+
- fix for Criteria('1', 1) (geekwright/mamba)
4+
15
4.33 Final (XOOPS 2.5.8) 2016-11-27
26
===========================================
37
- few last minute cosmetics (mamba)

include/functions.forum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ function newbb_getParentForum($forum_id = 0, $refresh = false)
166166
function newbb_createParentForumList()
167167
{
168168
$forumHandler = xoops_getModuleHandler('forum', 'newbb');
169-
$criteria = new Criteria('1', 1);
169+
$criteria = new Criteria('forum_id');
170170
$criteria->setSort('parent_forum');
171171
$criteria->setOrder('ASC');
172172
$forums_obj = $forumHandler->getObjects($criteria);

xoops_version.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
* @package module::newbb
1010
*/
1111

12-
$modversion['version'] = 4.33;
13-
$modversion['module_status'] = 'Final';
14-
$modversion['release_date'] = '2018/03/24';
12+
$modversion['version'] = 4.34;
13+
$modversion['module_status'] = 'RC1';
14+
$modversion['release_date'] = '2019/02/09';
1515
$modversion['name'] = _MI_NEWBB_NAME;
1616
$modversion['description'] = _MI_NEWBB_DESC;
1717
$modversion['credits'] = 'NewBB 2 developed by Marko Schmuck (predator) / D.J. (phppp) / Alfred(dhcst)';

0 commit comments

Comments
 (0)