Пример #1
0
 function testEditNewscategory()
 {
     // Test the forum edits
     edit_news_category($this->news_id, 'Politics', 'world.jpg', 'Around the world', NULL);
     // Test the forum was actually created
     $this->assertTrue('Politics' == get_translated_text($GLOBALS['SITE_DB']->query_value('news_categories', 'nc_title ', array('id' => $this->news_id))));
 }
Пример #2
0
 /**
  * Standard aed_module edit actualiser.
  *
  * @param  ID_TEXT		The entry being edited
  */
 function edit_actualisation($id)
 {
     require_code('themes2');
     $title = post_param('title');
     $img = get_theme_img_code('newscats', STRING_MAGIC_NULL);
     $notes = post_param('notes', STRING_MAGIC_NULL);
     $_owner = post_param('owner', fractional_edit() ? STRING_MAGIC_NULL : NULL);
     $owner = is_null($_owner) ? NULL : $GLOBALS['FORUM_DRIVER']->get_member_from_username($_owner);
     edit_news_category(intval($id), $title, $img, $notes, $owner);
     $this->set_permissions(intval($id));
 }