Ejemplo n.º 1
0
 private function _input_support4memo()
 {
     // タイトルを本文から補う処理
     $this->_input_support2supply_title();
     // タイトルよりカテゴリを抜きだす
     if ($this->input->post('title') && !$this->input->post('memo_category_id')) {
         list($title, $memo_category_id) = get_category_from_search_word($this->input->post('title'));
         if ($memo_category_id) {
             $this->input->set_post('title', $title);
             $this->input->set_post('memo_category_id', $memo_category_id);
         }
     }
     // タイトルを本文から補う処理(再確認)
     $this->_input_support2supply_title();
     // 本文よりURLのみ抜き出す
     if (!$this->input->post('explain')) {
         $explain = $this->site_util->get_url_from_body($this->input->post('body'));
         if ($explain) {
             $this->input->set_post('explain', $explain);
         }
     }
 }
Ejemplo n.º 2
0
 public function _format_search_param($urlencode = false)
 {
     if (!$this->search) {
         return;
     }
     $this->search = trim(preg_replace('/[  ]+/u', ' ', $this->search));
     list($this->search, $category_id) = get_category_from_search_word($this->search);
     if ($category_id) {
         $this->category_id = $category_id;
     }
     if ($category_id) {
         $this->search_option = true;
     }
     if ($urlencode) {
         $this->search = urlencode($this->search);
     }
 }