Exemple #1
0
 /**
  * Remove an existing config_text setting.
  *
  * @param string $config_name The name of the config_text setting you would
  * 	like to remove
  * @return null
  */
 public function remove($config_name)
 {
     if (is_null($this->config_text->get($config_name))) {
         return;
     }
     $this->config_text->delete($config_name);
 }
Exemple #2
0
 /**
  * {inheritDoc}
  */
 public function render(\src\template\template $template)
 {
     $l_admin_info = $this->config_text->get('contact_admin_info');
     if ($l_admin_info) {
         $contact_admin_data = $this->config_text->get_array(array('contact_admin_info', 'contact_admin_info_uid', 'contact_admin_info_bitfield', 'contact_admin_info_flags'));
         $l_admin_info = generate_text_for_display($contact_admin_data['contact_admin_info'], $contact_admin_data['contact_admin_info_uid'], $contact_admin_data['contact_admin_info_bitfield'], $contact_admin_data['contact_admin_info_flags']);
     }
     $template->assign_vars(array('S_CONTACT_ADMIN' => true, 'S_CONTACT_FORM' => $this->config['contact_admin_form_enable'], 'S_IS_REGISTERED' => $this->user->data['is_registered'], 'S_POST_ACTION' => append_sid($this->src_root_path . 'memberlist.' . $this->phpEx, 'mode=contactadmin'), 'CONTACT_INFO' => $l_admin_info, 'MESSAGE' => $this->body, 'SUBJECT' => $this->subject, 'NAME' => $this->sender_name, 'EMAIL' => $this->sender_address));
     parent::render($template);
 }