Develop/Modification1/51

  • 0.0.16同梱のプラグインと対応バージョンとの差は下記の通り、結構ボリュームあるなあ
    $ diff -w html/pukiowikio_edit/pkwk/plugin_default/pcomment_nospam.inc.php pcomment_nospam.inc.php
    3c3
    ---
    5c5
    < exist_plugin('pcomment');
    ---
    > require_once(PLUGIN_DIR . 'pcomment.inc.php');
    8c8,26
    ---
    > //define('SPAMLIST_PAGE', 'SpamList');
    >
    > define('NG_WORD', '[/url],<a href=,adult,casino,pharmacy,republika,sex,siski.net,insurance,cloud.prohosting.com,white.prohosting.com,pluto.no,narod.ru,loan,viagra,2www.org,cialis,gatech.edu,digmun.info,homepage,hamburg.de,mortgage,bitdom.com,ac.be,onenight-in-paris,diet,poker,naked,nude,ripway.com,planetsti.info,porn,ewqe-r.info,diazepam,buddyprofile.com,href,xyevdrom.org,nrg-search.net,blogspot.com,forumforfree.com,adsenseru.info');
    >
    > define('NOSPAM_MSG', 1);
    >
    > define('NOSPAM_NAME', 1);
    >
    > define('NOSPAM_URL', 0);
    >
    11c29
    ---
    14c32
    ---
    20a39
    >       static $filetime1, $filetime2;
    22a42,51
    >       if(SPAMLIST_PAGE && is_page(SPAMLIST_PAGE)){
    >               $filetime1 = get_filetime(SPAMLIST_PAGE);
    >       }
    >       else{
    >               $filetime1 = filemtime(PLUGIN_DIR . 'pcomment_nospam.inc.php') - LOCALZONE;
    >       }
    >
    25c54,55
    <       if(!isset($spamlist)) {
    ---
    >       if(!isset($spamlist) || $filetime1 != $filetime2){
    27c57
    <               if(NOSPAM_SPAMLIST_PAGE!='' && is_page(NOSPAM_SPAMLIST_PAGE)){
    ---
    >               if(SPAMLIST_PAGE!='' && is_page(SPAMLIST_PAGE)){
    29c59
    <                       foreach(get_source(NOSPAM_SPAMLIST_PAGE) as $line){
    ---
    >                       foreach(get_source(SPAMLIST_PAGE) as $line){
    35,36c65,68
    <  // by ioio           else{
    <               {               // always use by ioio
    ---
    >               else{
    >                       //foreach(split(',', NG_WORD) as $word)
    >
    38c70,71
    <                       foreach(split(',', NOSPAM_NG_WORD) as $word){
    ---
    >                       foreach(explode(',', NG_WORD) as $word)
    >                       {
    83,85d115
    <       global $editable_flag;
    <       $editable_flag = TRUE;
    87c117
    <       return plugin_pcomment_action('pcomment_nospam');
    ---
    >       return plugin_pcomment_action();
    92a123,127
    >       /*
    >         <input type="hidden" name="plugin" value="pcomment_nospam" />
    >       */
    94c129,132
    <       $vars['pluginname'] = 'pcomment_nospam';
    ---
    >       global $_pcmt_messages;
    >
    >       $ret = '';
    >
    101d138
    <               'nospam' =>FALSE,
    104,111d140
    <       foreach(func_get_args() as $arg)
    <               plugin_pcomment_check_arg($arg, $params);
    <       $noname = $params['noname'] ? 'noname' : '';
    <       $nodate = $params['nodate'] ? 'nodate' : '';
    <       $below = $params['below'] ? 'below' : '';
    <       $above = $params['above'] ? 'above' : '';
    <       $reply = $params['reply'] ? 'reply' : '';
    <       $nospam = $params['nospam'] ? 'nospam' : '';
    113c142,229
    <       return plugin_pcomment_convert($noname, $nodate, $below, $above, $reply, $nospam);
    ---
    >       // BugTrack2/106: Only variables can be passed by reference from PHP 5.0.5
    >       $args = func_get_args(); // with array_walk()
    >       array_walk($args, 'plugin_pcomment_check_arg', & $params);
    >
    >       $vars_page = isset($vars['page']) ? $vars['page'] : '';
    >       $page  = (isset($params['_args'][0]) && $params['_args'][0] != '') ? $params['_args'][0] :
    >               sprintf(PLUGIN_PCOMMENT_PAGE, strip_bracket($vars_page));
    >       $count = (isset($params['_args'][1]) && $params['_args'][1] != '') ? $params['_args'][1] : 0;
    >       if ($count == 0 && $count !== '0')
    >               $count = PLUGIN_PCOMMENT_NUM_COMMENTS;
    >
    >       $_page = get_fullname(strip_bracket($page), $vars_page);
    >       if (!is_pagename($_page))
    >               return sprintf($_pcmt_messages['err_pagename'], htmlspecialchars($_page));
    >
    >       $dir = PLUGIN_PCOMMENT_DIRECTION_DEFAULT;
    >       if ($params['below']) {
    >               $dir = 0;
    >       } elseif ($params['above']) {
    >               $dir = 1;
    >       }
    >
    >       list($comments, $digest) = plugin_pcomment_get_comments($_page, $count, $dir, $params['reply']);
    >
    >       if (PKWK_READONLY) {
    >               $form_start = $form = $form_end = '';
    >       } else {
    >               // Show a form
    >
    >               if ($params['noname']) {
    >                       $title = $_pcmt_messages['msg_comment'];
    >                       $name = '';
    >               } else {
    >                       $title = $_pcmt_messages['btn_name'];
    >                       $name = '<input type="text" name="name" size="' . PLUGIN_PCOMMENT_SIZE_NAME . '" />';
    >               }
    >
    >               $radio   = $params['reply'] ?
    >                       '<input type="radio" name="reply" value="0" tabindex="0" checked="checked" />' : '';
    >               $comment = '<input type="text" name="msg" size="' . PLUGIN_PCOMMENT_SIZE_MSG . '" />';
    >
    >               $s_page   = htmlspecialchars($page);
    >               $s_refer  = htmlspecialchars($vars_page);
    >               $s_nodate = htmlspecialchars($params['nodate']);
    >               $s_count  = htmlspecialchars($count);
    >
    >               $form_start = '<form action="' . get_script_uri() . '" method="post">' . "\n";
    >               $form = <<<EOD
    >   <div>
    >   <input type="hidden" name="digest" value="$digest" />
    >   <input type="hidden" name="plugin" value="pcomment_nospam" />
    >   <input type="hidden" name="refer"  value="$s_refer" />
    >   <input type="hidden" name="page"   value="$s_page" />
    >   <input type="hidden" name="nodate" value="$s_nodate" />
    >   <input type="hidden" name="dir"    value="$dir" />
    >   <input type="hidden" name="count"  value="$count" />
    >   $radio $title $name $comment
    >   <input type="submit" value="{$_pcmt_messages['btn_comment']}" />
    >   </div>
    > EOD;
    >               $form_end = '</form>' . "\n";
    >       }
    >
    >       if (! is_page($_page)) {
    >               $link   = make_pagelink($_page);
    >               $recent = $_pcmt_messages['msg_none'];
    >       } else {
    >               $msg    = ($_pcmt_messages['msg_all'] != '') ? $_pcmt_messages['msg_all'] : $_page;
    >               $link   = make_pagelink($_page, $msg);
    >               $recent = ! empty($count) ? sprintf($_pcmt_messages['msg_recent'], $count) : '';
    >       }
    >
    >       if ($dir) {
    >               return '<div>' .
    >                       '<p>' . $recent . ' ' . $link . '</p>' . "\n" .
    >                       $form_start .
    >                               $comments . "\n" .
    >                               $form .
    >                       $form_end .
    >                       '</div>' . "\n";
    >       } else {
    >               return '<div>' .
    >                       $form_start .
    >                               $form .
    >                               $comments. "\n" .
    >                       $form_end .
    >                       '<p>' . $recent . ' ' . $link . '</p>' . "\n" .
    >                       '</div>' . "\n";
    114a231,232
    > }
    >
    

トップ 編集凍結差分バックアップ添付複製名前変更リロード 新規一覧 単語検索 最終更新  ヘルプ  最終更新のRSS
Last-modified: 2010-09-12 (日) 11:57:26 (4154d)