diff --git a/admin/admin_forum_manager.php b/admin/admin_forum_manager.php index fd4cb348..b43f03be 100644 --- a/admin/admin_forum_manager.php +++ b/admin/admin_forum_manager.php @@ -233,7 +233,7 @@ default: $categoryHandler = xoops_getModuleHandler('category', 'newbb'); - $criteriaCategory = new CriteriaCompo(new criteria('1', 1)); + $criteriaCategory = new CriteriaCompo(new Criteria('cat_id')); $criteriaCategory->setSort('cat_order'); $categories = $categoryHandler->getList($criteriaCategory); if (0 === count($categories)) { @@ -254,7 +254,7 @@ $echo .= ''; $categoryHandler = xoops_getModuleHandler('category', 'newbb'); - $criteriaCategory = new CriteriaCompo(new criteria('1', 1)); + $criteriaCategory = new CriteriaCompo(new Criteria('cat_id')); $criteriaCategory->setSort('cat_order'); $categories = $categoryHandler->getList($criteriaCategory); $forums = $forumHandler->getTree(array_keys($categories), 0, 'all'); diff --git a/admin/admin_forum_reorder.php b/admin/admin_forum_reorder.php index 7c6c06b6..4e82f779 100644 --- a/admin/admin_forum_reorder.php +++ b/admin/admin_forum_reorder.php @@ -75,7 +75,7 @@ $forumHandler = xoops_getModuleHandler('forum', 'newbb'); $categoryHandler = xoops_getModuleHandler('category', 'newbb'); - $criteriaCategory = new CriteriaCompo(new criteria('1', 1)); + $criteriaCategory = new CriteriaCompo(new Criteria('cat_id')); $criteriaCategory->setSort('cat_order'); $categories = $categoryHandler->getAll($criteriaCategory, ['cat_id', 'cat_order', 'cat_title']); $forums = $forumHandler->getTree(array_keys($categories), 0, 'all', '    '); diff --git a/admin/admin_groupmod.php b/admin/admin_groupmod.php index 1013d2fa..855fa15e 100644 --- a/admin/admin_groupmod.php +++ b/admin/admin_groupmod.php @@ -70,7 +70,7 @@ echo "

" . "
"; echo "
"; $categoryHandler = xoops_getModuleHandler('category', 'newbb'); -$criteriaCategory = new CriteriaCompo(new criteria('1', 1)); +$criteriaCategory = new CriteriaCompo(new Criteria('cat_id')); $criteriaCategory->setSort('cat_order'); $categories = $categoryHandler->getAll($criteriaCategory, ['cat_id', 'cat_order', 'cat_title']); $forums = $forumHandler->getTree(array_keys($categories), 0, 'all', '    '); diff --git a/admin/admin_permissions.php b/admin/admin_permissions.php index 371d4d9b..ac1b169d 100644 --- a/admin/admin_permissions.php +++ b/admin/admin_permissions.php @@ -333,7 +333,7 @@ public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = []) $opform->display(); $categoryHandler = xoops_getModuleHandler('category', 'newbb'); - $criteriaCategory = new CriteriaCompo(new criteria('1', 1)); + $criteriaCategory = new CriteriaCompo(new Criteria('cat_id')); $criteriaCategory->setSort('cat_order'); $categories = $categoryHandler->getList($criteriaCategory); @@ -379,7 +379,7 @@ public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = []) xoops_cp_header(); $categoryHandler = xoops_getModuleHandler('category', 'newbb'); - $criteriaCategory = new CriteriaCompo(new criteria('1', 1)); + $criteriaCategory = new CriteriaCompo(new Criteria('cat_id')); $criteriaCategory->setSort('cat_order'); $categories = $categoryHandler->getList($criteriaCategory); @@ -448,7 +448,7 @@ public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = []) $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']); $categoryHandler = xoops_getModuleHandler('category', 'newbb'); - $criteriaCategory = new CriteriaCompo(new criteria('1', 1)); + $criteriaCategory = new CriteriaCompo(new Criteria('cat_id')); $criteriaCategory->setSort('cat_order'); $categories = $categoryHandler->getList($criteriaCategory); if ('category' === $op) { diff --git a/admin/admin_type_manager.php b/admin/admin_type_manager.php index 31d757fe..caf5b07c 100644 --- a/admin/admin_type_manager.php +++ b/admin/admin_type_manager.php @@ -184,7 +184,7 @@ } $categoryHandler = xoops_getModuleHandler('category', 'newbb'); - $criteriaCategory = new CriteriaCompo(new criteria('1', 1)); + $criteriaCategory = new CriteriaCompo(new Criteria('cat_id')); $criteriaCategory->setSort('cat_order'); $categories = $categoryHandler->getList($criteriaCategory); $forumHandler = xoops_getModuleHandler('forum', 'newbb'); @@ -274,7 +274,7 @@ case 'forum': $categoryHandler = xoops_getModuleHandler('category', 'newbb'); - $criteriaCategory = new CriteriaCompo(new criteria('1', 1)); + $criteriaCategory = new CriteriaCompo(new Criteria('cat_id')); $criteriaCategory->setSort('cat_order'); $categories = $categoryHandler->getList($criteriaCategory); if (empty($categories)) { diff --git a/assets/images/category/newbb.png b/assets/images/category/newbb.png index 891a5728..7fd8e730 100644 Binary files a/assets/images/category/newbb.png and b/assets/images/category/newbb.png differ diff --git a/assets/images/category/topxoops.png b/assets/images/category/topxoops.png index b249156d..1a2f29ee 100644 Binary files a/assets/images/category/topxoops.png and b/assets/images/category/topxoops.png differ diff --git a/assets/images/filetypes/html.gif b/assets/images/filetypes/html.gif index eb948eae..a7aa7dc2 100644 Binary files a/assets/images/filetypes/html.gif and b/assets/images/filetypes/html.gif differ diff --git a/assets/images/filetypes/wav.gif b/assets/images/filetypes/wav.gif index 21195252..01fdedb0 100644 Binary files a/assets/images/filetypes/wav.gif and b/assets/images/filetypes/wav.gif differ diff --git a/assets/images/logoModule.png b/assets/images/logoModule.png index 371bc719..f720d494 100644 Binary files a/assets/images/logoModule.png and b/assets/images/logoModule.png differ diff --git a/assets/images/menu/digest.png b/assets/images/menu/digest.png index b1d2aaf9..760c603f 100644 Binary files a/assets/images/menu/digest.png and b/assets/images/menu/digest.png differ diff --git a/assets/images/newbb.png b/assets/images/newbb.png index 891a5728..7fd8e730 100644 Binary files a/assets/images/newbb.png and b/assets/images/newbb.png differ diff --git a/class/tree.php b/class/tree.php index 3b57e36c..2d11ca4b 100644 --- a/class/tree.php +++ b/class/tree.php @@ -148,10 +148,10 @@ public function getAllChild_object($key, &$ret, $depth = 0) return; } - if (isset($this->_tree[$key]['child'])) { - foreach ($this->_tree[$key]['child'] as $childkey) { - if (isset($this->_tree[$childkey]['obj'])) { - $ret['child'][$childkey] = $this->_tree[$childkey]['obj']; + if (isset($this->tree[$key]['child'])) { + foreach ($this->tree[$key]['child'] as $childkey) { + if (isset($this->tree[$childkey]['obj'])) { + $ret['child'][$childkey] = $this->tree[$childkey]['obj']; } $this->getAllChild_object($childkey, $ret['child'][$childkey], $depth); } @@ -192,15 +192,15 @@ public function getAllChild_array($key, &$ret, array $tags = [], $depth = 0) return; } - if (isset($this->_tree[$key]['child'])) { - foreach ($this->_tree[$key]['child'] as $childkey) { - if (isset($this->_tree[$childkey]['obj'])) { + if (isset($this->tree[$key]['child'])) { + foreach ($this->tree[$key]['child'] as $childkey) { + if (isset($this->tree[$childkey]['obj'])) { if (count($tags) > 0) { foreach ($tags as $tag) { - $ret['child'][$childkey][$tag] = $this->_tree[$childkey]['obj']->getVar($tag); + $ret['child'][$childkey][$tag] = $this->tree[$childkey]['obj']->getVar($tag); } } else { - $ret['child'][$childkey]['forum_name'] = $this->_tree[$childkey]['obj']->getVar('forum_name'); + $ret['child'][$childkey]['forum_name'] = $this->tree[$childkey]['obj']->getVar('forum_name'); } } @@ -238,11 +238,11 @@ public function &makeArrayTree($key = 0, $tags = null, $depth = 0) */ public function &_getParentForums($key, array $ret = [], $uplevel = 0) { - if (isset($this->_tree[$key]['parent']) && isset($this->_tree[$this->_tree[$key]['parent']]['obj'])) { - $ret[$uplevel] = $this->_tree[$this->_tree[$key]['parent']]['obj']; - if ($this->_tree[$key]['parent'] !== $key) { - //$parents = $this->getParentForums($this->_tree[$key]['parent'], $ret, $uplevel+1); - $parents = $this->getParentForums($this->_tree[$key]['parent']); + if (isset($this->tree[$key]['parent']) && isset($this->tree[$this->tree[$key]['parent']]['obj'])) { + $ret[$uplevel] = $this->tree[$this->tree[$key]['parent']]['obj']; + if ($this->tree[$key]['parent'] !== $key) { + //$parents = $this->getParentForums($this->tree[$key]['parent'], $ret, $uplevel+1); + $parents = $this->getParentForums($this->tree[$key]['parent']); foreach (array_keys($parents) as $newkey) { $ret[$newkey] = $parents[$newkey]; } @@ -261,9 +261,9 @@ public function &getParentForums($key, $reverse = true) { $ret = []; $pids = []; - if (isset($this->_tree[$key]['parent']) && isset($this->_tree[$this->_tree[$key]['parent']]['obj'])) { - $pids[] = $this->_tree[$this->_tree[$key]['parent']]['obj']->getVar($this->_myId); - $parents = $this->_getParentForums($this->_tree[$key]['parent'], $ret); + if (isset($this->tree[$key]['parent']) && isset($this->tree[$this->tree[$key]['parent']]['obj'])) { + $pids[] = $this->tree[$this->tree[$key]['parent']]['obj']->getVar($this->_myId); + $parents = $this->_getParentForums($this->tree[$key]['parent'], $ret); foreach (array_keys($parents) as $newkey) { if (!is_object($newkey)) { continue; diff --git a/docs/changelog.txt b/docs/changelog.txt index 0e835176..d48c3e21 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -1,4 +1,9 @@ -4.33 Final (XOOPS 2.5.8) 2018-03-24 +4.34 RC1 (XOOPS 2.5.10) 2019-02-09 +=========================================== +- fix for Criteria('1', 1) (geekwright/mamba) + + +4.33 Final (XOOPS 2.5.8) 2016-11-27 =========================================== - cosmetics (mamba) - array short syntax (mamba) diff --git a/include/functions.forum.php b/include/functions.forum.php index 01e0cc3d..d4f07d71 100644 --- a/include/functions.forum.php +++ b/include/functions.forum.php @@ -166,7 +166,7 @@ function newbb_getParentForum($forum_id = 0, $refresh = false) function newbb_createParentForumList() { $forumHandler = xoops_getModuleHandler('forum', 'newbb'); - $criteria = new Criteria('1', 1); + $criteria = new Criteria('forum_id'); $criteria->setSort('parent_forum'); $criteria->setOrder('ASC'); $forums_obj = $forumHandler->getObjects($criteria); diff --git a/templates/images/icon/blank.gif b/templates/images/icon/blank.gif index c0b332e4..c69139d2 100644 Binary files a/templates/images/icon/blank.gif and b/templates/images/icon/blank.gif differ diff --git a/templates/images/icon/googleplus.png b/templates/images/icon/googleplus.png index b2523479..ccc84007 100644 Binary files a/templates/images/icon/googleplus.png and b/templates/images/icon/googleplus.png differ diff --git a/templates/images/icon/minus.png b/templates/images/icon/minus.png index 60ea5f11..6cc43054 100644 Binary files a/templates/images/icon/minus.png and b/templates/images/icon/minus.png differ diff --git a/templates/images/icon/new_forum.png b/templates/images/icon/new_forum.png index a3adc281..8978773f 100644 Binary files a/templates/images/icon/new_forum.png and b/templates/images/icon/new_forum.png differ diff --git a/templates/images/icon/plus.png b/templates/images/icon/plus.png index 1921c0c2..1d5e879e 100644 Binary files a/templates/images/icon/plus.png and b/templates/images/icon/plus.png differ diff --git a/templates/images/language/english/new_forum.png b/templates/images/language/english/new_forum.png index 8cdb709a..a21b178e 100644 Binary files a/templates/images/language/english/new_forum.png and b/templates/images/language/english/new_forum.png differ diff --git a/templates/images/language/english/new_subforum.png b/templates/images/language/english/new_subforum.png index 1f4e86bf..afa8d062 100644 Binary files a/templates/images/language/english/new_subforum.png and b/templates/images/language/english/new_subforum.png differ diff --git a/templates/images/language/english/p_bann.png b/templates/images/language/english/p_bann.png index c32d148a..6d8abb74 100644 Binary files a/templates/images/language/english/p_bann.png and b/templates/images/language/english/p_bann.png differ diff --git a/templates/images/language/english/t_poll.png b/templates/images/language/english/t_poll.png index dd3cb370..99bd5985 100644 Binary files a/templates/images/language/english/t_poll.png and b/templates/images/language/english/t_poll.png differ diff --git a/templates/images/mime/html.gif b/templates/images/mime/html.gif index eb948eae..a7aa7dc2 100644 Binary files a/templates/images/mime/html.gif and b/templates/images/mime/html.gif differ diff --git a/templates/images/mime/wav.gif b/templates/images/mime/wav.gif index 21195252..01fdedb0 100644 Binary files a/templates/images/mime/wav.gif and b/templates/images/mime/wav.gif differ diff --git a/templates/images/rpg/orange.gif b/templates/images/rpg/orange.gif index df7f1074..8a8c442f 100644 Binary files a/templates/images/rpg/orange.gif and b/templates/images/rpg/orange.gif differ diff --git a/templates_fulldiv_opacity/images/icon/blank.gif b/templates_fulldiv_opacity/images/icon/blank.gif index c0b332e4..c69139d2 100644 Binary files a/templates_fulldiv_opacity/images/icon/blank.gif and b/templates_fulldiv_opacity/images/icon/blank.gif differ diff --git a/templates_fulldiv_opacity/images/icon/googleplus.png b/templates_fulldiv_opacity/images/icon/googleplus.png index b2523479..77adbe99 100644 Binary files a/templates_fulldiv_opacity/images/icon/googleplus.png and b/templates_fulldiv_opacity/images/icon/googleplus.png differ diff --git a/templates_fulldiv_opacity/images/icon/minus.png b/templates_fulldiv_opacity/images/icon/minus.png index 60ea5f11..d1cbaa3c 100644 Binary files a/templates_fulldiv_opacity/images/icon/minus.png and b/templates_fulldiv_opacity/images/icon/minus.png differ diff --git a/templates_fulldiv_opacity/images/icon/new_forum.png b/templates_fulldiv_opacity/images/icon/new_forum.png index a3adc281..2c41d881 100644 Binary files a/templates_fulldiv_opacity/images/icon/new_forum.png and b/templates_fulldiv_opacity/images/icon/new_forum.png differ diff --git a/templates_fulldiv_opacity/images/icon/plus.png b/templates_fulldiv_opacity/images/icon/plus.png index 1921c0c2..a878f792 100644 Binary files a/templates_fulldiv_opacity/images/icon/plus.png and b/templates_fulldiv_opacity/images/icon/plus.png differ diff --git a/templates_fulldiv_opacity/images/language/english/new_forum.png b/templates_fulldiv_opacity/images/language/english/new_forum.png index 8cdb709a..a60af0ec 100644 Binary files a/templates_fulldiv_opacity/images/language/english/new_forum.png and b/templates_fulldiv_opacity/images/language/english/new_forum.png differ diff --git a/templates_fulldiv_opacity/images/language/english/new_subforum.png b/templates_fulldiv_opacity/images/language/english/new_subforum.png index 1f4e86bf..bef95315 100644 Binary files a/templates_fulldiv_opacity/images/language/english/new_subforum.png and b/templates_fulldiv_opacity/images/language/english/new_subforum.png differ diff --git a/templates_fulldiv_opacity/images/language/english/p_bann.png b/templates_fulldiv_opacity/images/language/english/p_bann.png index c32d148a..3fbd7fb9 100644 Binary files a/templates_fulldiv_opacity/images/language/english/p_bann.png and b/templates_fulldiv_opacity/images/language/english/p_bann.png differ diff --git a/templates_fulldiv_opacity/images/language/english/t_poll.png b/templates_fulldiv_opacity/images/language/english/t_poll.png index dd3cb370..87f53bd6 100644 Binary files a/templates_fulldiv_opacity/images/language/english/t_poll.png and b/templates_fulldiv_opacity/images/language/english/t_poll.png differ diff --git a/templates_fulldiv_opacity/images/language/persian/new_forum.png b/templates_fulldiv_opacity/images/language/persian/new_forum.png index 8cdb709a..76d1755a 100644 Binary files a/templates_fulldiv_opacity/images/language/persian/new_forum.png and b/templates_fulldiv_opacity/images/language/persian/new_forum.png differ diff --git a/templates_fulldiv_opacity/images/language/persian/new_subforum.png b/templates_fulldiv_opacity/images/language/persian/new_subforum.png index 1f4e86bf..48167865 100644 Binary files a/templates_fulldiv_opacity/images/language/persian/new_subforum.png and b/templates_fulldiv_opacity/images/language/persian/new_subforum.png differ diff --git a/templates_fulldiv_opacity/images/language/persian/offline.png b/templates_fulldiv_opacity/images/language/persian/offline.png index 9f478386..8a2defa4 100644 Binary files a/templates_fulldiv_opacity/images/language/persian/offline.png and b/templates_fulldiv_opacity/images/language/persian/offline.png differ diff --git a/templates_fulldiv_opacity/images/language/persian/online.png b/templates_fulldiv_opacity/images/language/persian/online.png index 17e64a81..48931dd8 100644 Binary files a/templates_fulldiv_opacity/images/language/persian/online.png and b/templates_fulldiv_opacity/images/language/persian/online.png differ diff --git a/templates_fulldiv_opacity/images/language/persian/p_bann.png b/templates_fulldiv_opacity/images/language/persian/p_bann.png index c32d148a..3fbd7fb9 100644 Binary files a/templates_fulldiv_opacity/images/language/persian/p_bann.png and b/templates_fulldiv_opacity/images/language/persian/p_bann.png differ diff --git a/templates_fulldiv_opacity/images/language/persian/p_delete.png b/templates_fulldiv_opacity/images/language/persian/p_delete.png index 2884cbd9..2f290c52 100644 Binary files a/templates_fulldiv_opacity/images/language/persian/p_delete.png and b/templates_fulldiv_opacity/images/language/persian/p_delete.png differ diff --git a/templates_fulldiv_opacity/images/language/persian/p_edit.png b/templates_fulldiv_opacity/images/language/persian/p_edit.png index 56d1b75f..dae00f39 100644 Binary files a/templates_fulldiv_opacity/images/language/persian/p_edit.png and b/templates_fulldiv_opacity/images/language/persian/p_edit.png differ diff --git a/templates_fulldiv_opacity/images/language/persian/p_quote.png b/templates_fulldiv_opacity/images/language/persian/p_quote.png index 5167a2e4..112a83a4 100644 Binary files a/templates_fulldiv_opacity/images/language/persian/p_quote.png and b/templates_fulldiv_opacity/images/language/persian/p_quote.png differ diff --git a/templates_fulldiv_opacity/images/language/persian/p_reply.png b/templates_fulldiv_opacity/images/language/persian/p_reply.png index a3f7b21f..c6ce88ea 100644 Binary files a/templates_fulldiv_opacity/images/language/persian/p_reply.png and b/templates_fulldiv_opacity/images/language/persian/p_reply.png differ diff --git a/templates_fulldiv_opacity/images/language/persian/p_report.png b/templates_fulldiv_opacity/images/language/persian/p_report.png index d4fa6b75..d6a11c96 100644 Binary files a/templates_fulldiv_opacity/images/language/persian/p_report.png and b/templates_fulldiv_opacity/images/language/persian/p_report.png differ diff --git a/templates_fulldiv_opacity/images/language/persian/p_up.png b/templates_fulldiv_opacity/images/language/persian/p_up.png index a1ef659d..e85f1ac7 100644 Binary files a/templates_fulldiv_opacity/images/language/persian/p_up.png and b/templates_fulldiv_opacity/images/language/persian/p_up.png differ diff --git a/templates_fulldiv_opacity/images/language/persian/t_new.png b/templates_fulldiv_opacity/images/language/persian/t_new.png index c1347ff6..e298f3fd 100644 Binary files a/templates_fulldiv_opacity/images/language/persian/t_new.png and b/templates_fulldiv_opacity/images/language/persian/t_new.png differ diff --git a/templates_fulldiv_opacity/images/language/persian/t_poll.png b/templates_fulldiv_opacity/images/language/persian/t_poll.png index 9b089d99..200c47d3 100644 Binary files a/templates_fulldiv_opacity/images/language/persian/t_poll.png and b/templates_fulldiv_opacity/images/language/persian/t_poll.png differ diff --git a/templates_fulldiv_opacity/images/language/persian/t_qr.png b/templates_fulldiv_opacity/images/language/persian/t_qr.png index 35e0026f..80eb2c37 100644 Binary files a/templates_fulldiv_opacity/images/language/persian/t_qr.png and b/templates_fulldiv_opacity/images/language/persian/t_qr.png differ diff --git a/templates_fulldiv_opacity/images/language/persian/t_reply.png b/templates_fulldiv_opacity/images/language/persian/t_reply.png index 8f4a98f4..f3422678 100644 Binary files a/templates_fulldiv_opacity/images/language/persian/t_reply.png and b/templates_fulldiv_opacity/images/language/persian/t_reply.png differ diff --git a/templates_fulldiv_opacity/images/mime/html.gif b/templates_fulldiv_opacity/images/mime/html.gif index eb948eae..a7aa7dc2 100644 Binary files a/templates_fulldiv_opacity/images/mime/html.gif and b/templates_fulldiv_opacity/images/mime/html.gif differ diff --git a/templates_fulldiv_opacity/images/mime/wav.gif b/templates_fulldiv_opacity/images/mime/wav.gif index 21195252..01fdedb0 100644 Binary files a/templates_fulldiv_opacity/images/mime/wav.gif and b/templates_fulldiv_opacity/images/mime/wav.gif differ diff --git a/templates_fulldiv_opacity/images/rpg/orange.gif b/templates_fulldiv_opacity/images/rpg/orange.gif index df7f1074..8a8c442f 100644 Binary files a/templates_fulldiv_opacity/images/rpg/orange.gif and b/templates_fulldiv_opacity/images/rpg/orange.gif differ diff --git a/xoops_version.php b/xoops_version.php index 2be55ec4..1cdb13cd 100644 --- a/xoops_version.php +++ b/xoops_version.php @@ -9,9 +9,9 @@ * @package module::newbb */ -$modversion['version'] = 4.33; -$modversion['module_status'] = 'Final'; -$modversion['release_date'] = '2018/03/24'; +$modversion['version'] = 4.34; +$modversion['module_status'] = 'RC1'; +$modversion['release_date'] = '2019/02/09'; $modversion['name'] = _MI_NEWBB_NAME; $modversion['description'] = _MI_NEWBB_DESC; $modversion['credits'] = 'NewBB 2 developed by Marko Schmuck (predator) / D.J. (phppp) / Alfred(dhcst)';