Skip to content

Commit

Permalink
Merge pull request #59 from mambax7/master
Browse files Browse the repository at this point in the history
4.34 RC1
  • Loading branch information
mambax7 authored Feb 9, 2019
2 parents e8fe308 + fd500f8 commit 51f7685
Show file tree
Hide file tree
Showing 55 changed files with 36 additions and 31 deletions.
4 changes: 2 additions & 2 deletions admin/admin_forum_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -254,7 +254,7 @@
$echo .= '</tr>';

$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');
Expand Down
2 changes: 1 addition & 1 deletion admin/admin_forum_reorder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', '&nbsp;&nbsp;&nbsp;&nbsp;');
Expand Down
2 changes: 1 addition & 1 deletion admin/admin_groupmod.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
echo "<br><br><table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
echo "<form name='reorder' method='post'>";
$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', '&nbsp;&nbsp;&nbsp;&nbsp;');
Expand Down
6 changes: 3 additions & 3 deletions admin/admin_permissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions admin/admin_type_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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)) {
Expand Down
Binary file modified assets/images/category/newbb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/category/topxoops.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/filetypes/html.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/filetypes/wav.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/logoModule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/menu/digest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/newbb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 17 additions & 17 deletions class/tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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');
}
}

Expand Down Expand Up @@ -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];
}
Expand All @@ -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;
Expand Down
7 changes: 6 additions & 1 deletion docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion include/functions.forum.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Binary file modified templates/images/icon/blank.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates/images/icon/googleplus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates/images/icon/minus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates/images/icon/new_forum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates/images/icon/plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates/images/language/english/new_forum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates/images/language/english/new_subforum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates/images/language/english/p_bann.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates/images/language/english/t_poll.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates/images/mime/html.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates/images/mime/wav.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates/images/rpg/orange.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates_fulldiv_opacity/images/icon/blank.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates_fulldiv_opacity/images/icon/googleplus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates_fulldiv_opacity/images/icon/minus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates_fulldiv_opacity/images/icon/new_forum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates_fulldiv_opacity/images/icon/plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates_fulldiv_opacity/images/language/english/new_forum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified templates_fulldiv_opacity/images/language/english/p_bann.png
Binary file modified templates_fulldiv_opacity/images/language/english/t_poll.png
Binary file modified templates_fulldiv_opacity/images/language/persian/new_forum.png
Binary file modified templates_fulldiv_opacity/images/language/persian/offline.png
Binary file modified templates_fulldiv_opacity/images/language/persian/online.png
Binary file modified templates_fulldiv_opacity/images/language/persian/p_bann.png
Binary file modified templates_fulldiv_opacity/images/language/persian/p_delete.png
Binary file modified templates_fulldiv_opacity/images/language/persian/p_edit.png
Binary file modified templates_fulldiv_opacity/images/language/persian/p_quote.png
Binary file modified templates_fulldiv_opacity/images/language/persian/p_reply.png
Binary file modified templates_fulldiv_opacity/images/language/persian/p_report.png
Binary file modified templates_fulldiv_opacity/images/language/persian/p_up.png
Binary file modified templates_fulldiv_opacity/images/language/persian/t_new.png
Binary file modified templates_fulldiv_opacity/images/language/persian/t_poll.png
Binary file modified templates_fulldiv_opacity/images/language/persian/t_qr.png
Binary file modified templates_fulldiv_opacity/images/language/persian/t_reply.png
Binary file modified templates_fulldiv_opacity/images/mime/html.gif
Binary file modified templates_fulldiv_opacity/images/mime/wav.gif
Binary file modified templates_fulldiv_opacity/images/rpg/orange.gif
6 changes: 3 additions & 3 deletions xoops_version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)';
Expand Down

0 comments on commit 51f7685

Please sign in to comment.