function fetch_image_categories_array($catid) { global $vbulletin, $cats; if (!is_array($cats)) { $categories = vB::get_db_assertor()->getRows('vBForum:imagecategory', array('imagetype' => $catid), array('field' => 'displayorder', 'direction' => vB_dB_Query::SORT_ASC)); $cats = array(); foreach ($categories as $category) { foreach ($categories as $category) { $cats[$category['imagecategoryid']] = $category['title']; } } } return $cats; }
/** * Retrieve Autoload Text * * @param int Node ID * @param int Parent ID * * @return array|false The autosave data array (row from the 'autosavetext' table) or false on failure */ public function fetchAutoLoadText($parentid, $nodeid) { $options = vB::getDatastore()->get_value('options'); if (!$options['autosave']) { return false; } if (!vB::getCurrentSession()->get('userid')) { return false; } $row = vB::get_db_assertor()->getRow('vBForum:autosavetext', array('nodeid' => intval($nodeid), 'parentid' => intval($parentid), 'userid' => vB::getCurrentSession()->get('userid'))); return $row; }