/** * * Moves a forum downwards. * * @access private * @param Integer $forumUid The UID of the forum that is to be moved. * @return void|bool */ function moveForumDown($forumUid) { $forumData = $this->p->getBoardData($forumUid); if (!$this->checkActionAllowance($forumData['parentID'] == 0 ? 'category' : 'forum', 'order')) { $this->flashmessage = $this->l('access-error'); return FALSE; } $res = $this->databaseHandle->exec_SELECTquery('uid, sorting', 'tx_mmforum_forums', 'deleted=0 AND parentID=' . $forumData['parentID'] . ' AND sorting > ' . $forumData['sorting'], '', 'sorting ASC', 1); if ($this->databaseHandle->sql_num_rows($res) == 0) { return; } list($lowerUid, $lowerSorting) = $this->databaseHandle->sql_fetch_row($res); $this->databaseHandle->exec_UPDATEquery('tx_mmforum_forums', 'uid=' . $forumData['uid'], array('sorting' => $lowerSorting, 'tstamp' => $GLOBALS['EXEC_TIME'])); $this->databaseHandle->exec_UPDATEquery('tx_mmforum_forums', 'uid=' . $lowerUid, array('sorting' => $forumData['sorting'], 'tstamp' => $GLOBALS['EXEC_TIME'])); }