From: henoheno Date: Sun, 11 Feb 2007 05:53:31 +0000 (+0900) Subject: BugTrack2/62: X-Git-Tag: r1_5_end-eucjp~36 X-Git-Url: http://git.osdn.net/view?p=pukiwiki%2Fpukiwiki.git;a=commitdiff_plain;h=ecc731cea27fc56d0cfa047deadca5ddbf6c46c8 BugTrack2/62: TrackBack implimentation had been removed entirely due to extremely strong suspicion of violating copyright. 'referer' function (that use the implimentation), also removed. --- diff --git a/INSTALL.txt b/INSTALL.txt index c994902..9290d0a 100755 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -7,7 +7,7 @@ 2001-2002 yu-ji (Based on PukiWiki 1.3 by yu-ji) License: GPL version 2 or (at your option) any later version - $Id: INSTALL.txt,v 1.8 2005/12/06 14:59:29 henoheno Exp $ + $Id: INSTALL.txt,v 1.9 2007/02/11 05:53:30 henoheno Exp $ ¥¤¥ó¥¹¥È¡¼¥ë PukiWiki¤ÏPHP¥¹¥¯¥ê¥×¥È¤Ç¤¢¤ë¤¿¤á¡¢(Î㤨¤ÐPerl¤Î¤è¤¦¤Ë)¥¹¥¯¥ê¥×¥È¤Ë¼Â¹Ô¸¢ @@ -77,7 +77,6 @@ lib 755 ¥é¥¤¥Ö¥é¥ê plugin 755 ¥×¥é¥°¥¤¥ó skin 755 ¥¹¥­¥ó¡¢CSS¡¢JavaScirpt¥Õ¥¡¥¤¥ë - trackback 777 TrackBack¥Õ¥¡¥¤¥ë³ÊǼ¥Ç¥£¥ì¥¯¥È¥ê wiki 777 ¥Ç¡¼¥¿¤Î³ÊǼ¥Ç¥£¥ì¥¯¥È¥ê ¥Õ¥¡¥¤¥ë ¥Ñ¡¼¥ß¥Ã¥·¥ç¥ó ¥Ç¡¼¥¿¤Î¼ïÎà(»²¹Í) @@ -178,7 +177,7 @@ ¥Ð¥Ã¥¯¥¢¥Ã¥×¤È¥ê¥¹¥È¥¢ ¥Ú¡¼¥¸¤ÎºÇ¿·¥Ç¡¼¥¿¤ò¼ý¤á¤Æ¤¤¤ë¥Ç¥£¥ì¥¯¥È¥ê(¥Ç¥Õ¥©¥ë¥È¤Î̾Á°¤Ï wiki)°Ê²¼ ¤ò¡¢¤Þ¤¿É¬Íפ˱þ¤¸¤Æ¾¤Î¥Ç¡¼¥¿¤ò¼ý¤á¤Æ¤¤¤ë¥Ç¥£¥ì¥¯¥È¥ê°Ê²¼¤ò¥Ð¥Ã¥¯¥¢¥Ã¥×¤· - ¤Æ²¼¤µ¤¤¡£(Ʊ attach, backup, cache, counter, diff, trackback) + ¤Æ²¼¤µ¤¤¡£(Ʊ attach, backup, cache, counter, diff) cache¥Ç¥£¥ì¥¯¥È¥ê¤â¥Ð¥Ã¥¯¥¢¥Ã¥×¤¹¤ë¤³¤È¤ò¤ªÁ¦¤á¤·¤Þ¤¹¡£ 1. cache/*.rel ¥Õ¥¡¥¤¥ë¤È cache/*.ref ¥Õ¥¡¥¤¥ë¤Ï links¥×¥é¥°¥¤¥ó ¤ÇºÆÀ¸ diff --git a/README.en.txt b/README.en.txt index d99e705..0b96bb0 100644 --- a/README.en.txt +++ b/README.en.txt @@ -67,7 +67,6 @@ HOW TO MAKE SITE image 755 705 plugin 755 705 skin 755 705 - trackback 777 707 wiki 777 707 File attach/* 666 606 @@ -78,7 +77,6 @@ HOW TO MAKE SITE image/* 644 604 plugin/* 644 604 skin/* 644 604 - trackback/* 666 606 wiki/* 666 606 *.php 644 604 *.lng 644 604 @@ -93,7 +91,7 @@ HOW TO MAKE A BACKUP OF DATA The document data is stored in the "wiki" directory. (default setting) Please make a backup of your "wiki" directory. And, if necessary, also make backups of the other directories - namely, - "attach" , "backup", "counter", "cache", "diff" and "trackback" with default setting. + "attach" , "backup", "counter", "cache", and "diff" with default setting. HOW TO CREATE PAGE diff --git a/UPDATING.en.txt b/UPDATING.en.txt index 70c3eda..fb77e5c 100644 --- a/UPDATING.en.txt +++ b/UPDATING.en.txt @@ -1,10 +1,26 @@ PukiWiki UPDATING -$Id: UPDATING.en.txt,v 1.3 2006/06/11 15:24:35 henoheno Exp $ +$Id: UPDATING.en.txt,v 1.6 2007/02/11 05:53:29 henoheno Exp $ + + +CHANGES +======= + +See description at PukiWiki-official +http://pukiwiki.sourceforge.jp/?PukiWiki/Download + INCOMPATIBILITY INFORMATION BETWEEN RELEASES ============================================ +PukiWiki 1.4.8: Incompatibility from PukiWiki 1.4.7 + + 1. TrackBack implimentation had been removed entirely due to extremely + strong suspicion of violating copyright. 'referer' function (that use + the implimentation), also removed. + (See BugTrack2/62) + + PukiWiki 1.4.7: Incompatibility from PukiWiki 1.4.6 1. Default value of administrator's password ($adminpass) had been changed diff --git a/UPDATING.txt b/UPDATING.txt index e523452..12a3820 100644 --- a/UPDATING.txt +++ b/UPDATING.txt @@ -1,10 +1,28 @@ PukiWiki UPDATING -$Id: UPDATING.txt,v 1.38 2006/06/11 15:35:52 henoheno Exp $ +$Id: UPDATING.txt,v 1.41 2007/02/11 05:53:29 henoheno Exp $ + + +¹¹¿·ÍúÎò +======== + +¢¨¾ÜºÙ¤Ï¸ø¼°Web¥µ¥¤¥È¤ò»²¾È¤·¤Æ²¼¤µ¤¤ + +http://pukiwiki.sourceforge.jp/?PukiWiki/Download + ¥ê¥ê¡¼¥¹´Ö¤Î¸ß´¹À­¤Ë´Ø¤¹¤ëµ­½Ò ============================== +PukiWiki 1.4.8: PukiWiki 1.4.7 ¤È¤ÎÈó¸ß´¹ÅÀ + + 1. ¤³¤ì¤Þ¤Ç¤ÎTrackBack¼ÂÁõ¤Ï¡¢Ãøºî(ÁϺî)¤Î¼ê½ç¤¬ÉÔŬÀڤǤ¢¤ëµ¿¤¤¤¬¶¯¤¯¤Ê¤Ã + ¤¿¤¿¤á¡¢´°Á´¤Ëºï½ü¤µ¤ì¤Þ¤·¤¿¡£Æ±Íͤˤ³¤Î¼ÂÁõ¤Ë°Í¸¤·¤Æ¤¤¤¿ referer µ¡Ç½ + ¤âºï½ü¤µ¤ì¤Þ¤·¤¿¡£ + (See BugTrack2/62) + + + PukiWiki 1.4.7: PukiWiki 1.4.6 ¤È¤ÎÈó¸ß´¹ÅÀ 1. ´ÉÍý¼Ô¥Ñ¥¹¥ï¡¼¥É($adminpass)¤Î¥Ç¥Õ¥©¥ë¥ÈÃͤ¬ "pass" ¤«¤é¡¢"(ȽÄê¤ËÀäÂÐ diff --git a/cache/3A636F6E6669672F5061676552656164696E67.rel b/cache/3A636F6E6669672F5061676552656164696E67.rel index d2e1eb2..25090b8 100644 --- a/cache/3A636F6E6669672F5061676552656164696E67.rel +++ b/cache/3A636F6E6669672F5061676552656164696E67.rel @@ -1 +1 @@ -PageReading :config/PageReading/dict :config/plugin/attach/mime-type :config/plugin/referer/config :config/plugin/tracker/default :config/plugin/tracker/default/form :config/plugin/tracker/default/list :config/plugin/tracker/default/page BracketName FormattingRules FrontPage Help InterWiki InterWikiName InterWikiSandBox MenuBar PHP PukiWiki RecentChanges SandBox WikiEngines WikiName WikiWikiWeb YukiWiki \ No newline at end of file +PageReading :config/PageReading/dict :config/plugin/attach/mime-type :config/plugin/tracker/default :config/plugin/tracker/default/form :config/plugin/tracker/default/list :config/plugin/tracker/default/page BracketName FormattingRules FrontPage Help InterWiki InterWikiName InterWikiSandBox MenuBar PHP PukiWiki RecentChanges SandBox WikiEngines WikiName WikiWikiWeb YukiWiki \ No newline at end of file diff --git a/cache/50756B6957696B692F312E342F4D616E75616C2F506C7567696E2F4F2D52.rel b/cache/50756B6957696B692F312E342F4D616E75616C2F506C7567696E2F4F2D52.rel index e529a87..36fbd34 100644 --- a/cache/50756B6957696B692F312E342F4D616E75616C2F506C7567696E2F4F2D52.rel +++ b/cache/50756B6957696B692F312E342F4D616E75616C2F506C7567696E2F4F2D52.rel @@ -1 +1 @@ -PukiWiki MenuBar FrontPage PukiWiki/1.4/Manual/Plugin/A-D InterWiki RecentChanges WikiName BracketName RenameLog TrackBack \ No newline at end of file +PukiWiki MenuBar FrontPage PukiWiki/1.4/Manual/Plugin/A-D InterWiki RecentChanges WikiName BracketName RenameLog \ No newline at end of file diff --git a/cache/50756B6957696B692F312E342F4D616E75616C2F506C7567696E2F532D55.rel b/cache/50756B6957696B692F312E342F4D616E75616C2F506C7567696E2F532D55.rel index 00727c8..90f363a 100644 --- a/cache/50756B6957696B692F312E342F4D616E75616C2F506C7567696E2F532D55.rel +++ b/cache/50756B6957696B692F312E342F4D616E75616C2F506C7567696E2F532D55.rel @@ -1 +1 @@ -PukiWiki PukiWiki/1.4/Manual/Plugin/A-D MenuBar TrackBack \ No newline at end of file +PukiWiki PukiWiki/1.4/Manual/Plugin/A-D MenuBar \ No newline at end of file diff --git a/en.lng.php b/en.lng.php index 8c2a4d7..3f1607d 100644 --- a/en.lng.php +++ b/en.lng.php @@ -1,6 +1,6 @@ recent(%d)
%s
'; /////////////////////////////////////// -// referer.inc.php -$_referer_msg = array( - 'msg_H0_Refer' => 'Referer', - 'msg_Hed_LastUpdate' => 'LastUpdate', - 'msg_Hed_1stDate' => 'First Register', - 'msg_Hed_RefCounter' => 'RefCounter', - 'msg_Hed_Referer' => 'Referer', - 'msg_Fmt_Date' => 'F j, Y, g:i A', - 'msg_Chr_uarr' => '⇑', - 'msg_Chr_darr' => '⇓', -); - -/////////////////////////////////////// // rename.inc.php $_rename_messages = array( 'err' => '

error:%s

', diff --git a/ja.lng.php b/ja.lng.php index 3b57ee8..21d001c 100644 --- a/ja.lng.php +++ b/ja.lng.php @@ -1,6 +1,6 @@
%s
'; /////////////////////////////////////// -// referer.inc.php -$_referer_msg = array( - 'msg_H0_Refer' => '¥ê¥ó¥¯¸µ¤Îɽ¼¨', - 'msg_Hed_LastUpdate' => 'ºÇ½ª¹¹¿·Æü»þ', - 'msg_Hed_1stDate' => '½é²óÅÐÏ¿Æü»þ', - 'msg_Hed_RefCounter' => '¥«¥¦¥ó¥¿', - 'msg_Hed_Referer' => 'Referer', - 'msg_Fmt_Date' => 'Yǯn·îjÆü H:i', - 'msg_Chr_uarr' => '¢¬', - 'msg_Chr_darr' => '¢­', -); - -/////////////////////////////////////// // rename.inc.php $_rename_messages = array( 'err' => '

¥¨¥é¡¼:%s

', diff --git a/lib/file.php b/lib/file.php index ea9cad3..8cfc357 100644 --- a/lib/file.php +++ b/lib/file.php @@ -62,8 +62,6 @@ function get_filename($page) // Put a data(wiki text) into a physical file(diff, backup, text) function page_write($page, $postdata, $notimestamp = FALSE) { - global $trackback; - if (PKWK_READONLY) return; // Do nothing $postdata = make_str_rules($postdata); @@ -79,14 +77,6 @@ function page_write($page, $postdata, $notimestamp = FALSE) // Create wiki text file_write(DATA_DIR, $page, $postdata, $notimestamp); - if ($trackback) { - // TrackBack Ping - $_diff = explode("\n", $diffdata); - $plus = join("\n", preg_replace('/^\+/', '', preg_grep('/^\+/', $_diff))); - $minus = join("\n", preg_replace('/^-/', '', preg_grep('/^-/', $_diff))); - tb_send($page, $plus, $minus); - } - links_update($page); } diff --git a/lib/html.php b/lib/html.php index c8e1039..ec2171f 100644 --- a/lib/html.php +++ b/lib/html.php @@ -14,7 +14,7 @@ function catbody($title, $page, $body) global $script, $vars, $arg, $defaultpage, $whatsnew, $help_page, $hr; global $attach_link, $related_link, $cantedit, $function_freeze; global $search_word_color, $_msg_word, $foot_explain, $note_hr, $head_tags; - global $trackback, $referer, $javascript, $nofollow; + global $javascript, $nofollow; global $_LANG, $_LINK, $_IMAGE; global $pkwk_dtd; // XHTML 1.1, XHTML1.0, HTML 4.01 Transitional... @@ -47,7 +47,6 @@ function catbody($title, $page, $body) $_LINK['new'] = "$script?plugin=newpage&refer=$r_page"; $_LINK['rdf'] = "$script?cmd=rss&ver=1.0"; $_LINK['recent'] = "$script?" . rawurlencode($whatsnew); - $_LINK['refer'] = "$script?plugin=referer&page=$r_page"; $_LINK['reload'] = "$script?$r_page"; $_LINK['rename'] = "$script?plugin=rename&refer=$r_page"; $_LINK['rss'] = "$script?cmd=rss"; @@ -55,10 +54,6 @@ function catbody($title, $page, $body) $_LINK['rss20'] = "$script?cmd=rss&ver=2.0"; $_LINK['search'] = "$script?cmd=search"; $_LINK['top'] = "$script?" . rawurlencode($defaultpage); - if ($trackback) { - $tb_id = tb_get_id($_page); - $_LINK['trackback'] = "$script?plugin=tb&__mode=view&tb_id=$tb_id"; - } $_LINK['unfreeze'] = "$script?cmd=unfreeze&page=$r_page"; $_LINK['upload'] = "$script?plugin=attach&pcmd=upload&page=$r_page"; @@ -74,7 +69,7 @@ function catbody($title, $page, $body) $link_whatsnew = & $_LINK['recent']; $link_backup = & $_LINK['backup']; $link_help = & $_LINK['help']; - $link_trackback = & $_LINK['trackback']; // New! + $link_trackback = ''; // Removed (compat) $link_rdf = & $_LINK['rdf']; // New! $link_rss = & $_LINK['rss']; $link_rss10 = & $_LINK['rss10']; // New! @@ -83,7 +78,7 @@ function catbody($title, $page, $body) $link_unfreeze = & $_LINK['unfreeze']; $link_upload = & $_LINK['upload']; $link_template = & $_LINK['copy']; - $link_refer = & $_LINK['refer']; // New! + $link_refer = ''; // Removed (compat) $link_rename = & $_LINK['rename']; // Init flags diff --git a/lib/init.php b/lib/init.php index bf631d0..ea6f4c4 100644 --- a/lib/init.php +++ b/lib/init.php @@ -351,11 +351,6 @@ if (isset($get['md5']) && $get['md5'] != '' && $get['cmd'] = $post['cmd'] = $vars['cmd'] = 'md5'; } -// TrackBack Ping -if (isset($vars['tb_id']) && $vars['tb_id'] != '') { - $get['cmd'] = $post['cmd'] = $vars['cmd'] = 'tb'; -} - // cmd¤âplugin¤â»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢QUERY_STRING¤ò¥Ú¡¼¥¸Ì¾¤«InterWikiName¤Ç¤¢¤ë¤È¤ß¤Ê¤¹ if (! isset($vars['cmd']) && ! isset($vars['plugin'])) { diff --git a/lib/pukiwiki.php b/lib/pukiwiki.php index d24a37c..5473195 100644 --- a/lib/pukiwiki.php +++ b/lib/pukiwiki.php @@ -53,7 +53,7 @@ if (! extension_loaded('mbstring')) { } // Defaults -$notify = $trackback = $referer = 0; +$notify = 0; // Load *.ini.php files and init PukiWiki require(LIB_DIR . 'init.php'); @@ -62,11 +62,6 @@ require(LIB_DIR . 'init.php'); if ($notify) { require(LIB_DIR . 'mail.php'); // Mail notification } -if ($trackback || $referer) { - // Referer functionality uses trackback functions - // without functional reason now - require(LIB_DIR . 'trackback.php'); // TrackBack -} ///////////////////////////////////////////////// // Main @@ -121,9 +116,6 @@ if (isset($retvars['body']) && $retvars['body'] != '') { $vars['page'] = & $base; $body = convert_html(get_source($base)); - - if ($trackback) $body .= tb_get_rdf($base); // Add TrackBack-Ping URI - if ($referer) ref_save($base); } // Output diff --git a/lib/trackback.php b/lib/trackback.php deleted file mode 100644 index ba470aa..0000000 --- a/lib/trackback.php +++ /dev/null @@ -1,304 +0,0 @@ - -// License: GPL v2 or (at your option) any later version -// -// PukiWiki/TrackBack - -/* - * NOTE: - * To get TrackBack ID correctly, specify URI clearly like: - * http://localhost/pukiwiki/pukiwiki.php?FrontPage - * - * tb_get_id($page) Get TrackBack ID from page name - * tb_id2page($tb_id) Get page name from TrackBack ID - * tb_get_filename($page) Get file name of TrackBack ping data - * tb_count($page) Count the number of TrackBack pings included for the page - * // pukiwiki.skin.php - * tb_send($page, $data) Send TrackBack ping(s) automatically // file.php - * tb_delete($page) Remove TrackBack ping data // edit.inc.php - * tb_get($file, $key = 1) Import TrackBack ping data from file - * tb_get_rdf($page) Get a RDF comment to bury TrackBack-ping-URI under HTML(XHTML) output - * // lib/pukiwiki.php - * tb_get_url($url) HTTP-GET from $uri, and reveal the TrackBack Ping URL - * class TrackBack_XML Parse and reveal the TrackBack Ping URL from RDF data - * - * == Referer related == - * ref_save($page) Save or update referer data // lib/pukiwiki.php - */ - -define('PLUGIN_TRACKBACK_VERSION', 'PukiWiki/TrackBack 0.3'); - -// Get TrackBack ID from page name -function tb_get_id($page) -{ - return md5($page); -} - -// Get page name from TrackBack ID -function tb_id2page($tb_id) -{ - static $pages, $cache = array(); - - if (isset($cache[$tb_id])) return $cache[$tb_id]; - - if (! isset($pages)) $pages = get_existpages(); - foreach ($pages as $page) { - $_tb_id = tb_get_id($page); - $cache[$_tb_id] = $page; - unset($pages[$page]); - if ($tb_id == $_tb_id) return $cache[$tb_id]; // Found - } - - $cache[$tb_id] = FALSE; - return $cache[$tb_id]; // Not found -} - -// Get file name of TrackBack ping data -function tb_get_filename($page, $ext = '.txt') -{ - return TRACKBACK_DIR . encode($page) . $ext; -} - -// Count the number of TrackBack pings included for the page -function tb_count($page, $ext = '.txt') -{ - $filename = tb_get_filename($page, $ext); - return file_exists($filename) ? count(file($filename)) : 0; -} - -// Send TrackBack ping(s) automatically -// $plus = Newly added lines may include URLs -// $minus = Removed lines may include URLs -function tb_send($page, $plus, $minus = '') -{ - global $page_title; - - $script = get_script_uri(); - - // Disable 'max execution time' (php.ini: max_execution_time) - if (ini_get('safe_mode') == '0') set_time_limit(0); - - // Get URLs from (anchor) tag from convert_html() - $links = array(); - $plus = convert_html($plus); // WARNING: heavy and may cause side-effect - preg_match_all('#href="(https?://[^"]+)"#', $plus, $links, PREG_PATTERN_ORDER); - $links = array_unique($links[1]); - - // Reject from minus list - if ($minus != '') { - $links_m = array(); - $minus = convert_html($minus); // WARNING: heavy and may cause side-effect - preg_match_all('#href="(https?://[^"]+)"#', $minus, $links_m, PREG_PATTERN_ORDER); - $links_m = array_unique($links_m[1]); - - $links = array_diff($links, $links_m); - } - - // Reject own URL (Pattern _NOT_ started with '$script' and '?') - $links = preg_grep('/^(?!' . preg_quote($script, '/') . '\?)./', $links); - - // No link, END - if (! is_array($links) || empty($links)) return; - - $r_page = rawurlencode($page); - $excerpt = strip_htmltag(convert_html(get_source($page))); - - // Sender's information - $putdata = array( - 'title' => $page, // Title = It's page name - 'url' => $script . '?' . $r_page, // will be rawurlencode() at send phase - 'excerpt' => mb_strimwidth(preg_replace("/[\r\n]/", ' ', $excerpt), 0, 255, '...'), - 'blog_name' => $page_title . ' (' . PLUGIN_TRACKBACK_VERSION . ')', - 'charset' => SOURCE_ENCODING // Ping text encoding (Not defined) - ); - - foreach ($links as $link) { - $tb_id = tb_get_url($link); // Get Trackback ID from the URL - if (empty($tb_id)) continue; // Trackback is not supported - - $result = http_request($tb_id, 'POST', '', $putdata, 2, CONTENT_CHARSET); - // FIXME: Create warning notification space at pukiwiki.skin! - } -} - -// Remove TrackBack ping data -function tb_delete($page) -{ - $filename = tb_get_filename($page); - if (file_exists($filename)) @unlink($filename); -} - -// Import TrackBack ping data from file -function tb_get($file, $key = 1) -{ - if (! file_exists($file)) return array(); - - $result = array(); - $fp = @fopen($file, 'r'); - set_file_buffer($fp, 0); - flock($fp, LOCK_EX); - rewind($fp); - while ($data = @fgetcsv($fp, 8192, ',')) { - // $data[$key] = URL - $result[rawurldecode($data[$key])] = $data; - } - flock($fp, LOCK_UN); - fclose ($fp); - - return $result; -} - -// Get a RDF comment to bury TrackBack-ping-URI under HTML(XHTML) output -function tb_get_rdf($page) -{ - $_script = get_script_uri(); // Get absolute path - $r_page = rawurlencode($page); - $tb_id = tb_get_id($page); - // $dcdate = substr_replace(get_date('Y-m-d\TH:i:sO', $time), ':', -2, 0); - // dc:date="$dcdate" - - return << - - ---> -EOD; -} - -// HTTP-GET from $uri, and reveal the TrackBack Ping URL -function tb_get_url($url) -{ - global $use_proxy, $no_proxy; - - // Don't go across HTTP-proxy server - $parse_url = parse_url($url); - if (empty($parse_url['host']) || - ($use_proxy && ! in_the_net($no_proxy, $parse_url['host']))) - return ''; - - $data = http_request($url); - if ($data['rc'] !== 200) return ''; - - $matches = array(); - if (! preg_match_all('#]*xmlns:trackback=[^>]*>(.*?)#si', $data['data'], - $matches, PREG_PATTERN_ORDER)) - return ''; - - $obj = new TrackBack_XML(); - foreach ($matches[1] as $body) { - $tb_url = $obj->parse($body, $url); - if ($tb_url !== FALSE) return $tb_url; - } - - return ''; -} - -// Parse and reveal the TrackBack Ping URL from RDF(XML) data -class TrackBack_XML -{ - var $url; - var $tb_url; - - function parse($buf, $url) - { - // Init - $this->url = $url; - $this->tb_url = FALSE; - - $xml_parser = xml_parser_create(); - if ($xml_parser === FALSE) return FALSE; - - xml_set_element_handler($xml_parser, array(& $this, 'start_element'), - array(& $this, 'end_element')); - - if (! xml_parse($xml_parser, $buf, TRUE)) { -/* die(sprintf('XML error: %s at line %d in %s', - xml_error_string(xml_get_error_code($xml_parser)), - xml_get_current_line_number($xml_parser), - $buf)); -*/ - return FALSE; - } - - return $this->tb_url; - } - - function start_element($parser, $name, $attrs) - { - if ($name !== 'RDF:DESCRIPTION') return; - - $about = $url = $tb_url = ''; - foreach ($attrs as $key=>$value) { - switch ($key) { - case 'RDF:ABOUT' : $about = $value; break; - case 'DC:IDENTIFER' : /*FALLTHROUGH*/ - case 'DC:IDENTIFIER' : $url = $value; break; - case 'TRACKBACK:PING': $tb_url = $value; break; - } - } - if ($about == $this->url || $url == $this->url) - $this->tb_url = $tb_url; - } - - function end_element($parser, $name) {} -} - -// Save or update referer data -function ref_save($page) -{ - global $referer; - - if (PKWK_READONLY || ! $referer || empty($_SERVER['HTTP_REFERER'])) return TRUE; - - $url = $_SERVER['HTTP_REFERER']; - - // Validate URI (Ignore own) - $parse_url = parse_url($url); - if (empty($parse_url['host']) || $parse_url['host'] == $_SERVER['HTTP_HOST']) - return TRUE; - - if (! is_dir(TRACKBACK_DIR)) die('No such directory: TRACKBACK_DIR'); - if (! is_writable(TRACKBACK_DIR)) die('Permission denied to write: TRACKBACK_DIR'); - - // Update referer data - if (ereg("[,\"\n\r]", $url)) - $url = '"' . str_replace('"', '""', $url) . '"'; - - $filename = tb_get_filename($page, '.ref'); - $data = tb_get($filename, 3); - $d_url = rawurldecode($url); - if (! isset($data[$d_url])) { - $data[$d_url] = array( - '', // [0]: Last update date - UTIME, // [1]: Creation date - 0, // [2]: Reference counter - $url, // [3]: Referer header - 1 // [4]: Enable / Disable flag (1 = enable) - ); - } - $data[$d_url][0] = UTIME; - $data[$d_url][2]++; - - $fp = fopen($filename, 'w'); - if ($fp === FALSE) return FALSE; - set_file_buffer($fp, 0); - flock($fp, LOCK_EX); - rewind($fp); - foreach ($data as $line) - fwrite($fp, join(',', $line) . "\n"); - flock($fp, LOCK_UN); - fclose($fp); - - return TRUE; -} -?> diff --git a/plugin/edit.inc.php b/plugin/edit.inc.php index b01e9e9..dda7ff6 100644 --- a/plugin/edit.inc.php +++ b/plugin/edit.inc.php @@ -174,7 +174,7 @@ function plugin_edit_inline() // Write, add, or insert new comment function plugin_edit_write() { - global $vars, $trackback; + global $vars; global $_title_collided, $_msg_collided_auto, $_msg_collided, $_title_deleted; global $notimeupdate, $_msg_invalidpass, $do_update_diff_table; @@ -221,9 +221,6 @@ function plugin_edit_write() page_write($page, $postdata); $retvars['msg' ] = $_title_deleted; $retvars['body'] = str_replace('$1', htmlsc($page), $_title_deleted); - - if ($trackback) tb_delete($page); - return $retvars; } diff --git a/plugin/referer.inc.php b/plugin/referer.inc.php deleted file mode 100644 index e7ba83a..0000000 --- a/plugin/referer.inc.php +++ /dev/null @@ -1,191 +0,0 @@ - - * License: GPL -*/ - -define('CONFIG_REFERER', 'plugin/referer/config'); - -function plugin_referer_action() -{ - global $vars, $referer; - global $_referer_msg; - - // Setting: Off - if (! $referer) return array('msg'=>'','body'=>''); - - if (isset($vars['page']) && is_page($vars['page'])) { - $sort = (empty($vars['sort'])) ? '0d' : $vars['sort']; - return array( - 'msg' => $_referer_msg['msg_H0_Refer'], - 'body' => plugin_referer_body($vars['page'], $sort)); - } - $pages = get_existpages(TRACKBACK_DIR, '.ref'); - - if (empty($pages)) { - return array('msg'=>'', 'body'=>''); - } else { - return array( - 'msg' => 'referer list', - 'body' => page_list($pages, 'referer', FALSE)); - } -} - -// Referer ÌÀºÙ¹ÔÊÔ½¸ -function plugin_referer_body($page, $sort) -{ - global $script, $_referer_msg; - - $data = tb_get(tb_get_filename($page, '.ref')); - if (empty($data)) return '

no data.

'; - - $bg = plugin_referer_set_color(); - - $arrow_last = $arrow_1st = $arrow_ctr = ''; - $color_last = $color_1st = $color_ctr = $color_ref = $bg['etc']; - $sort_last = '0d'; - $sort_1st = '1d'; - $sort_ctr = '2d'; - - switch ($sort) { - case '0d': // 0d ºÇ½ª¹¹¿·Æü»þ(¿·Ãå½ç) - usort($data, create_function('$a,$b', 'return $b[0] - $a[0];')); - $color_last = $bg['cur']; - $arrow_last = $_referer_msg['msg_Chr_darr']; - $sort_last = '0a'; - break; - case '0a': // 0a ºÇ½ª¹¹¿·Æü»þ(ÆüÉÕ½ç) - usort($data, create_function('$a,$b', 'return $a[0] - $b[0];')); - $color_last = $bg['cur']; - $arrow_last = $_referer_msg['msg_Chr_uarr']; -// $sort_last = '0d'; - break; - case '1d': // 1d ½é²óÅÐÏ¿Æü»þ(¿·Ãå½ç) - usort($data, create_function('$a,$b', 'return $b[1] - $a[1];')); - $color_1st = $bg['cur']; - $arrow_1st = $_referer_msg['msg_Chr_darr']; - $sort_1st = '1a'; - break; - case '1a': // 1a ½é²óÅÐÏ¿Æü»þ(ÆüÉÕ½ç) - usort($data, create_function('$a,$b', 'return $a[1] - $b[1];')); - $color_1st = $bg['cur']; - $arrow_1st = $_referer_msg['msg_Chr_uarr']; -// $sort_1st = '1d'; - break; - case '2d': // 2d ¥«¥¦¥ó¥¿(Â礭¤¤½ç) - usort($data, create_function('$a,$b', 'return $b[2] - $a[2];')); - $color_ctr = $bg['cur']; - $arrow_ctr = $_referer_msg['msg_Chr_darr']; - $sort_ctr = '2a'; - break; - case '2a': // 2a ¥«¥¦¥ó¥¿(¾®¤µ¤¤½ç) - usort($data, create_function('$a,$b', 'return $a[2] - $b[2];')); - $color_ctr = $bg['cur']; - $arrow_ctr = $_referer_msg['msg_Chr_uarr']; -// $sort_ctr = '2d'; - break; - case '3': // 3 Referer - usort($data, create_function('$a,$b', - 'return ($a[3] == $b[3]) ? 0 : (($a[3] > $b[3]) ? 1 : -1);')); - $color_ref = $bg['cur']; - break; - } - - $body = ''; - foreach ($data as $arr) { - // 0:ºÇ½ª¹¹¿·Æü»þ, 1:½é²óÅÐÏ¿Æü»þ, 2:»²¾È¥«¥¦¥ó¥¿, 3:Referer ¥Ø¥Ã¥À, 4:ÍøÍѲÄÈݥե饰(1¤ÏÍ­¸ú) - list($ltime, $stime, $count, $url, $enable) = $arr; - - // ÈóASCII¥­¥ã¥é¥¯¥¿(¤À¤±)¤òURL¥¨¥ó¥³¡¼¥É¤·¤Æ¤ª¤¯ BugTrack/440 - $e_url = htmlsc(preg_replace('/([" \x80-\xff]+)/e', 'rawurlencode("$1")', $url)); - $s_url = htmlsc(mb_convert_encoding(rawurldecode($url), SOURCE_ENCODING, 'auto')); - - $lpass = get_passage($ltime, FALSE); // ºÇ½ª¹¹¿·Æü»þ¤«¤é¤Î·Ð²á»þ´Ö - $spass = get_passage($stime, FALSE); // ½é²óÅÐÏ¿Æü»þ¤«¤é¤Î·Ð²á»þ´Ö - $ldate = get_date($_referer_msg['msg_Fmt_Date'], $ltime); // ºÇ½ª¹¹¿·Æü»þʸ»úÎó - $sdate = get_date($_referer_msg['msg_Fmt_Date'], $stime); // ½é²óÅÐÏ¿Æü»þʸ»úÎó - - $body .= - ' ' . "\n" . - ' ' . $ldate . '' . "\n" . - ' ' . $lpass . '' . "\n"; - - $body .= ($count == 1) ? - ' N/A' . "\n" : - ' ' . $sdate . '' . "\n" . - ' ' . $spass . '' . "\n"; - - $body .= ' ' . $count . '' . "\n"; - - // ŬÍÑÉԲĥǡ¼¥¿¤Î¤È¤­¤Ï¥¢¥ó¥«¡¼¤ò¤Ä¤±¤Ê¤¤ - $body .= plugin_referer_ignore_check($url) ? - ' ' . $s_url . '' . "\n" : - '
' . $s_url . '' . "\n"; - - $body .= ' ' . "\n"; - } - $href = $script . '?plugin=referer&page=' . rawurlencode($page); - return << - - - {$_referer_msg['msg_Hed_LastUpdate']}$arrow_last - - - {$_referer_msg['msg_Hed_1stDate']}$arrow_1st - - - {$_referer_msg['msg_Hed_RefCounter']}$arrow_ctr - - - {$_referer_msg['msg_Hed_Referer']} - - - $body - -EOD; -} - -function plugin_referer_set_color() -{ - static $color; - - if (! isset($color)) { - // Default color - $color = array('cur' => '#88ff88', 'etc' => '#cccccc'); - - $config = new Config(CONFIG_REFERER); - $config->read(); - $pconfig_color = $config->get('COLOR'); - unset($config); - - // BGCOLOR(#88ff88) - $matches = array(); - foreach ($pconfig_color as $x) - $color[$x[0]] = htmlsc( - preg_match('/BGCOLOR\(([^)]+)\)/si', $x[1], $matches) ? - $matches[1] : $x[1]); - } - return $color; -} - -function plugin_referer_ignore_check($url) -{ - static $ignore_url; - - // config.php - if (! isset($ignore_url)) { - $config = new Config(CONFIG_REFERER); - $config->read(); - $ignore_url = $config->get('IGNORE'); - unset($config); - } - - foreach ($ignore_url as $x) - if (strpos($url, $x) !== FALSE) - return 1; - return 0; -} -?> diff --git a/plugin/rss.inc.php b/plugin/rss.inc.php index 8290897..e78f03d 100644 --- a/plugin/rss.inc.php +++ b/plugin/rss.inc.php @@ -1,6 +1,6 @@ ' . "\n"; $date = substr_replace(get_date('Y-m-d\TH:i:sO', $time), ':', -2, 0); - $trackback_ping = ''; - if ($trackback) { - $tb_id = md5($r_page); - $trackback_ping = ' ' . $self . - '?tb_id=' . $tb_id . ''; - } $items .= << $title $self?$r_page $date $self?$r_page -$trackback_ping EOD; @@ -112,12 +105,9 @@ EOD; break; case '1.0': - $xmlns_trackback = $trackback ? - ' xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"' : ''; print << diff --git a/pukiwiki.ini.php b/pukiwiki.ini.php index 952622c..6b6941e 100644 --- a/pukiwiki.ini.php +++ b/pukiwiki.ini.php @@ -1,6 +1,6 @@ | ] - -   - [ ] - -   - [ ] - diff --git a/skin/tdiary.skin.php b/skin/tdiary.skin.php index ef709f0..882ebec 100644 --- a/skin/tdiary.skin.php +++ b/skin/tdiary.skin.php @@ -649,13 +649,6 @@ function _navigator($key, $value = '', $javascript = ''){ - -   - - -   - - diff --git a/trackback/.cvsignore b/trackback/.cvsignore deleted file mode 100644 index a7518e1..0000000 --- a/trackback/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -*.ref -*.txt diff --git a/trackback/.htaccess b/trackback/.htaccess deleted file mode 100644 index cb24fd7..0000000 --- a/trackback/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Order allow,deny -Deny from all diff --git a/trackback/index.html b/trackback/index.html deleted file mode 100644 index cb1cad5..0000000 --- a/trackback/index.html +++ /dev/null @@ -1 +0,0 @@ -Place trackback cache files here diff --git a/wiki/3A636F6E6669672F5061676552656164696E67.txt b/wiki/3A636F6E6669672F5061676552656164696E67.txt index acbe625..e8a0677 100644 --- a/wiki/3A636F6E6669672F5061676552656164696E67.txt +++ b/wiki/3A636F6E6669672F5061676552656164696E67.txt @@ -1,7 +1,6 @@ -[[:config/PageReading]] :config/PageReading -[[:config/PageReading/dict]] :config/PageReading/dict -[[:config/plugin/attach/mime-type]] :config/plugin/attach/mime-type --[[:config/plugin/referer/config]] :config/plugin/referer/config -[[:config/plugin/tracker/default]] :config/plugin/tracker/default -[[:config/plugin/tracker/default/form]] :config/plugin/tracker/default/form -[[:config/plugin/tracker/default/list]] :config/plugin/tracker/default/list diff --git a/wiki/50756B6957696B692F312E342F4D616E75616C2F506C7567696E2F4F2D52.txt b/wiki/50756B6957696B692F312E342F4D616E75616C2F506C7567696E2F4F2D52.txt index 694c926..3ef6a52 100644 --- a/wiki/50756B6957696B692F312E342F4D616E75616C2F506C7567696E2F4F2D52.txt +++ b/wiki/50756B6957696B692F312E342F4D616E75616C2F506C7567696E2F4F2D52.txt @@ -278,39 +278,6 @@ (7) &ref(fuga.jpg); (7)¤Ï(6)¤È»÷¤¿µ­½Ò¤Ç¤¹¤¬¡¢ÅºÉÕ¥Õ¥¡¥¤¥ë̾¤Î¼¡¤Î°ú¿ô¤¬¾Êά¤µ¤ì¤Æ¤¤¤ë¤¿¤á¡¢¥¨¥é¡¼¤Ë¤Ï¤Ê¤ê¤Þ¤»¤ó¡£ - -**referer [#l8d62a01] -:¼ïÊÌ| -~¥³¥Þ¥ó¥É -:½ÅÍ×ÅÙ| -~¡ú¡ú¡ú¡ù¡ù -:½ñ¼°| -''?plugin=referer'' -[&color(blue){&page=¥Ú¡¼¥¸Ì¾};] -[&color(blue){&sort=}; -&color(blue){0d};|&color(blue){0a};| -&color(blue){1d};|&color(blue){1a};| -&color(blue){2d};|&color(blue){2a};| -&color(blue){3}; -] -:³µÍ×| -~¥Ú¡¼¥¸¤ò¾È²ñ¤·¤¿ÍøÍѼԤλ²¾È¸µURL(Referer)¤Î°ìÍ÷¤òɽ¼¨¤·¤Þ¤¹¡£ -:°ú¿ô| -~¥Ú¡¼¥¸Ì¾¤Ë¤ÏReferer¤òɽ¼¨¤¹¤ë¥Ú¡¼¥¸Ì¾¤ò»ØÄꤷ¤Þ¤¹¡£¥Ú¡¼¥¸Ì¾¤Ï¥¨¥ó¥³¡¼¥É¤µ¤ì¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¾Êά»þ¤ÏReferer¤¬µ­Ï¿¤µ¤ì¤Æ¤¤¤ë¥Ú¡¼¥¸¤Î°ìÍ÷¤òɽ¼¨¤·¤Þ¤¹¡£ -~sort¤ÇReferer°ìÍ÷¤Î¥½¡¼¥È½ç¤ò»ØÄꤷ¤Þ¤¹¡£ ---0d ¡Ý ºÇ½ª¹¹¿·Æü»þ(¿·Ãå½ç) ---0a ¡Ý ºÇ½ª¹¹¿·Æü»þ(ÆüÉÕ½ç) ---1d ¡Ý ½é²óÅÐÏ¿Æü»þ(¿·Ãå½ç) ---1a ¡Ý ½é²óÅÐÏ¿Æü»þ(ÆüÉÕ½ç) ---2d ¡Ý ¥«¥¦¥ó¥¿(Â礭¤¤½ç) ---2a ¡Ý ¥«¥¦¥ó¥¿(¾®¤µ¤¤½ç) ---3 ¡Ý Referer -:¥×¥é¥°¥¤¥óÆâÀßÄê|~ ---CONFIG_REFERER¡¡Ìµ»ë¤¹¤ëURI¤ò»ØÄꤷ¤¿¥Ú¡¼¥¸ -:È÷¹Í| -~pukiwiki.ini.php ¤Ç¡¢Referer¤ò»ÈÍѤ¹¤ëÀßÄê($referer = 1¤ò»ØÄê)¤¬¹Ô¤ï¤ì¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ - - **related [#v4da5475] :¼ïÊÌ| ~¥³¥Þ¥ó¥É @@ -346,7 +313,6 @@ --PLUGIN_RENAME_LOGPAGE¡¡¥Ú¡¼¥¸Ì¾¤ÎÊÑ´¹·ë²Ì¤ò½ÐÎϤ¹¤ë¥Ú¡¼¥¸Ì¾ :È÷¹Í| ~¥Ú¡¼¥¸Æâ¤Î¥ê¥ó¥¯¤Î½ñ¤­´¹¤¨¤Ï¹Ô¤Ê¤¤¤Þ¤»¤ó¡£yetlist¤Ê¤É¤ò¶î»È¤·¤ÆÂн褷¤Æ¤¯¤À¤µ¤¤¡£ -~TrackBack¤äReferer¤Î¾ðÊó¤Ï¹¹¿·¤µ¤ì¤Þ¤»¤ó¡£ ~¥ê¥Í¡¼¥àÂоݤΥڡ¼¥¸¤¬Åà·ë¤µ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«¤Ï¥Á¥§¥Ã¥¯¤·¤Æ¤¤¤Þ¤»¤ó¡£ ~´ØÏ¢¥Ú¡¼¥¸¤Ë¥ê¥Í¡¼¥àÂоݤÎʸ»úÎó¤¬Ê£¿ô´Þ¤Þ¤ì¤Æ¤¤¤ë¤È¤ª¤«¤·¤¯¤Ê¤ê¤Þ¤¹¡£ --¤¿¤È¤¨¤Ð¡¢hoge¤ª¤è¤Óhoge/hoge¤È¤¤¤¦Æó¤Ä¤Î¥Ú¡¼¥¸¤¬¤¢¤Ã¤¿¤È¤­¤Ë¡¢hoge¥Ú¡¼¥¸¤òfuga¤Ë(´ØÏ¢¥Ú¡¼¥¸¤ò´Þ¤ó¤Ç)¥ê¥Í¡¼¥à¤¹¤ë¤È¡¢hoge/hoge¥Ú¡¼¥¸¤Î̾Á°¤¬fuga/fuga¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¡£ diff --git a/wiki/50756B6957696B692F312E342F4D616E75616C2F506C7567696E2F532D55.txt b/wiki/50756B6957696B692F312E342F4D616E75616C2F506C7567696E2F532D55.txt index 68304b9..425ea1e 100644 --- a/wiki/50756B6957696B692F312E342F4D616E75616C2F506C7567696E2F532D55.txt +++ b/wiki/50756B6957696B692F312E342F4D616E75616C2F506C7567696E2F532D55.txt @@ -170,33 +170,6 @@ stationary ------------------------------ * T [#u58dc027] -**tb [#s5056787] -:¼ïÊÌ| -~¥³¥Þ¥ó¥É -:½ÅÍ×ÅÙ| -~¡ú¡ù¡ù¡ù¡ù -:½ñ¼°| -''?plugin=tb'' -&color(blue){&tb_id=TrackBackID}; -&color(blue){&__mode=}; -&color(blue){view};| -&color(blue){rss}; -:³µÍ×| -~TrackBack¤Î°ìÍ÷¤òɽ¼¨¤·¤Þ¤¹¡£ -~POST¤µ¤ì¤¿¾ì¹ç¤Ï¾¥µ¥¤¥È¤«¤é¤ÎTrackBack¤ËÈ¿±þ¤·¤Þ¤¹¡£ -:°ú¿ô| -~&tb_id¤Ë¤Ïɽ¼¨Âоݥڡ¼¥¸¤ÎTrackBackID¤ò»ØÄꤷ¤Þ¤¹¡£ -~&__mode¤Ë¤Ï°ìÍ÷ɽ¼¨ÊýË¡¤ò»ØÄꤷ¤Þ¤¹¡£ ---view ¡Ý ¿Í´Ö¤¬¸«¤ä¤¹¤¤·Á¼°¤Çɽ¼¨¤·¤Þ¤¹¡£ ---rss ¡Ý RSS·Á¼°¤Çɽ¼¨¤·¤Þ¤¹¡£ -:¥×¥é¥°¥¤¥óÆâÀßÄê|~ ---PLUGIN_TB_LANGUAGE¡¡TrackBack¤ÎRSS¤Ç½ÐÎϤ¹¤ë¸À¸ì ---PLUGIN_TB_ERROR¡¡¥¨¥é¡¼»þ¤ÎÊÖ¤êÃÍ ---PLUGIN_TB_NOERROR¡¡¥¨¥é¡¼¤Ê¤·»þ¤ÎÊÖ¤êÃÍ -:È÷¹Í| -~pukiwiki.ini.php ¤Ç¡¢TrackBack¤ò»ÈÍѤ¹¤ëÀßÄê($trackback = 1¤ò»ØÄê)¤¬¹Ô¤ï¤ì¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ - - **template [#j2adfc3d] :¼ïÊÌ| ~¥³¥Þ¥ó¥É