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
 public function test_delete_get()
 {
     $this->config_text->delete('foo');
     $this->assertNull($this->config_text->get('foo'));
     $this->assertSame('42', $this->config_text->get('bar'));
     $this->assertSame('string-de-ding', $this->config_text->get('meh'));
 }
Exemple #3
0
 public function core_acp_manage_forums_update_data_after($event)
 {
     $forum_data = $event['forum_data'];
     $forum_id = $forum_data['forum_id'];
     $postingtemplate = utf8_normalize_nfc($this->request->variable('forum_postingtemplate', '', true));
     if ($postingtemplate) {
         $this->config_text->set('marttiphpbb_postingtemplate_forum[' . $forum_id . ']', $postingtemplate);
     } else {
         $this->config_text->delete('marttiphpbb_postingtemplate_forum[' . $forum_id . ']');
     }
 }