ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 2756


Ignore:
Timestamp:
May 10, 2007, 2:46:03 PM (16 years ago)
Author:
maruyama
Message:

#699:日記カテゴリでカテゴリ区切り文字の半角スペースを2つ以上続けるとカテゴリ数が多く計算されてしまう

Location:
OpenPNE/branches/2.6.x/webapp/modules/pc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/2.6.x/webapp/modules/pc/do/h_diary_add_insert_c_diary.php

    r1265 r2756  
    3030        $tmpfile_2 = $requests['tmpfile_2'];
    3131        $tmpfile_3 = $requests['tmpfile_3'];
    32         $category = explode(' ', trim($requests['category']));
     32        $category = preg_split('/[\s]+/', trim($requests['category']));
    3333        // ----------
    3434
  • OpenPNE/branches/2.6.x/webapp/modules/pc/do/h_diary_edit_insert_c_diary.php

    r952 r2756  
    3131        $tmpfile_2 = $requests['tmpfile_2'];
    3232        $tmpfile_3 = $requests['tmpfile_3'];
    33         $category = explode(' ', trim($requests['category']));
     33        $category = preg_split('/[\s]+/', trim($requests['category']));
    3434        // ----------
    3535
  • OpenPNE/branches/2.6.x/webapp/modules/pc/page/h_diary_add_confirm.php

    r2738 r2756  
    5252            }
    5353        }
    54 
    55         $category_list = array_unique(explode(" ", rtrim($category)));
     54       
     55        $category_list = array_unique(preg_split('/[\s]+/', rtrim($category)));
    5656        if (count($category_list) > 5) {
    5757            $_REQUEST['msg'] = 'カテゴリは5つまでしか指定できません';
  • OpenPNE/branches/2.6.x/webapp/modules/pc/page/h_diary_edit.php

    r2637 r2756  
    8181                if ($category) {
    8282                    $category_list = array();
    83                     foreach(explode(' ', $category) as $value) {
     83                    foreach(preg_split('/[\s]+/', $category) as $value) {
    8484                        if (empty($value)) {
    8585                            break;
  • OpenPNE/branches/2.6.x/webapp/modules/pc/page/h_diary_edit_confirm.php

    r2738 r2756  
    5252        }
    5353
    54         $category_list = array_unique(explode(" ", rtrim($category)));
     54        $category_list = array_unique(preg_split('/[\s]+/', rtrim($category)));
    5555        if (count($category_list) > 5) {
    5656            $_REQUEST['msg'] = 'カテゴリは5つまでしか指定できません';
Note: See TracChangeset for help on using the changeset viewer.