/** * Save Cat edit * * @uses wikigroup_check_for_save * @uses awcf_redirect * @since Version 2.5.8 */ function edit_cat_do() { global $wgRequest; $cat_name = $wgRequest->getVal('cat_name'); $cat_desc = $wgRequest->getVal('cat_desc'); $c_wiki_perm = parent::wikigroup_check_for_save('c_wiki_perm'); $cat_order = $wgRequest->getVal('cat_order'); $cID = $wgRequest->getVal('cID'); $dbw = wfGetDB(DB_MASTER); $dbw->update('awc_f_cats', array('cat_name' => $cat_name, 'cat_desc' => $cat_desc, 'cat_order' => $cat_order, 'c_wiki_perm' => $c_wiki_perm), array('cat_id' => $cID), ''); $info['msg'] = 'cat_edited'; $info['url'] = awc_url . 'admin/cat/get_cat_id_edit/' . $cID; return awcf_redirect($info); }
function edit_forum_do() { global $wgRequest; $f_name = $wgRequest->getVal('f_name'); $f_desc = $wgRequest->getVal('f_desc'); $parent_id = $wgRequest->getVal('parent_id'); $f_wiki_read_perm = parent::wikigroup_check_for_save('f_wiki_read_perm'); $f_wiki_write_perm = parent::wikigroup_check_for_save('f_wiki_write_perm'); $f_order = $wgRequest->getVal('f_order'); $f_passworded = $wgRequest->getVal('f_passworded'); $f_password = awcsf_encode_password($wgRequest->getVal('f_password')); $f_top_tmplt = $wgRequest->getVal('f_top_tmplt'); $f_posting_mesage_tmpt = $wgRequest->getVal('f_posting_mesage_tmpt'); $f_id = $wgRequest->getVal('f_id'); if (strlen($f_desc) == 0) { $f_desc = ' '; } if (strlen($f_name) == 0) { $f_name = 'Forum Name ???'; } if (strlen($f_top_tmplt) == 0) { $f_top_tmplt = ' '; } if (strlen($f_posting_mesage_tmpt) == 0) { $f_posting_mesage_tmpt = ' '; } $dbw = wfGetDB(DB_MASTER); $dbw->update('awc_f_forums', array('f_name' => $f_name, 'f_desc' => $f_desc, 'f_parentid' => $parent_id, 'f_wiki_read_perm' => $f_wiki_read_perm, 'f_wiki_write_perm' => $f_wiki_write_perm, 'f_order' => $f_order, 'f_passworded' => $f_passworded, 'f_password' => $f_password, 'f_top_tmplt' => $f_top_tmplt, 'f_posting_mesage_tmpt' => $f_posting_mesage_tmpt), array('f_id' => $f_id), ''); $info['msg'] = 'forum_edited'; $info['url'] = awc_url . 'sc/id' . $parent_id; return awcf_redirect($info); }