function setUp() { parent::setUp(); require_code('ecommerce'); $this->usr_grp_id = add_usergroup_subscription('test', 'test', '123', 12, 'y', 1, 1, 1, ' ', ' ', ' '); // Test the forum was actually created $this->assertTrue(12 == $GLOBALS['FORUM_DB']->query_value('f_usergroup_subs', 's_length', array('id' => $this->usr_grp_id))); }
/** * Standard aed_module add actualiser. * * @return array A pair: The entry added, Description about usage */ function add_actualisation() { if (has_actual_page_access(get_member(), 'admin_config')) { $_config_url = build_url(array('page' => 'admin_config', 'type' => 'category', 'id' => 'ECOMMERCE'), get_module_zone('admin_config')); $config_url = $_config_url->evaluate(); $config_url .= '#group_ECOMMERCE'; $text = do_lang_tempcode('ECOM_ADDED_SUBSCRIP', escape_html($config_url)); } else { $text = NULL; } $title = post_param('title'); // if ((strpos($title,';')!==false) || (strpos($title,',')!==false) || (strpos($title,'=')!==false)) // warn_exit(do_lang_tempcode('PRODUCT_NAME_SPECIAL_CHARS')); return array(strval(add_usergroup_subscription($title, post_param('description'), post_param('cost'), post_param_integer('length'), post_param('length_units'), post_param_integer('group_id'), post_param_integer('uses_primary', 0), post_param_integer('enabled', 0), post_param('mail_start'), post_param('mail_end'), post_param('mail_uhoh'))), $text); }