コード例 #1
0
ファイル: forum.php プロジェクト: erico-deh/ocPortal
 function testEditForum()
 {
     // Test the forum edits
     ocf_edit_forum($this->forum_id, 'TestEdit', 'Test', db_get_first_id(), db_get_first_id(), 1, 1, 0, '', '', '', 'last_post', 0, false);
     $this->assertTrue('TestEdit' == $GLOBALS['FORUM_DB']->query_value('f_forums', 'f_name', array('id' => $this->forum_id)));
 }
コード例 #2
0
 /**
  * Standard aed_module edit actualiser.
  *
  * @param  ID_TEXT		The entry being edited
  */
 function edit_actualisation($id)
 {
     ocf_edit_forum(intval($id), post_param('name'), post_param('description', STRING_MAGIC_NULL), post_param_integer('category_id', INTEGER_MAGIC_NULL), post_param_integer('parent_forum', INTEGER_MAGIC_NULL), post_param_integer('position', INTEGER_MAGIC_NULL), post_param_integer('post_count_increment', fractional_edit() ? INTEGER_MAGIC_NULL : 0), post_param_integer('order_sub_alpha', fractional_edit() ? INTEGER_MAGIC_NULL : 0), post_param('intro_question', STRING_MAGIC_NULL), post_param('intro_answer', STRING_MAGIC_NULL), post_param('redirection', STRING_MAGIC_NULL), post_param('order', STRING_MAGIC_NULL), post_param_integer('is_threaded', fractional_edit() ? INTEGER_MAGIC_NULL : 0), post_param_integer('reset_intro_acceptance', 0) == 1);
     if (!fractional_edit()) {
         require_code('ocf_groups2');
         $old_access_mapping = collapse_1d_complexity('group_id', $GLOBALS['FORUM_DB']->query_select('group_category_access', array('group_id'), array('module_the_name' => 'forums', 'category_name' => $id)));
         require_code('ocf_groups_action');
         require_code('ocf_groups_action2');
         $lost_groups = array();
         foreach ($old_access_mapping as $group_id) {
             if (post_param_integer('access_' . strval($group_id), 0) == 0) {
                 // Lost access
                 $lost_groups[] = $group_id;
             }
         }
         $this->set_permissions($id);
     }
 }