• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂2a9257ba23e5eabd369ea57f22835a31fb7c2125 (tree)
時間2007-10-06 22:20:59
作者henoheno <henoheno>
Commiterhenoheno

Log Message

BugTrack2/236: If you compare two numerical strings, they are compared as integers

Change Summary

差異

--- a/lib/file.php
+++ b/lib/file.php
@@ -1,6 +1,6 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
3-// $Id: file.php,v 1.87 2007/09/23 04:23:40 henoheno Exp $
3+// $Id: file.php,v 1.88 2007/10/06 13:20:48 henoheno Exp $
44 // Copyright (C)
55 // 2002-2007 PukiWiki Developers Team
66 // 2001-2002 Originally written by yu-ji
@@ -103,7 +103,7 @@ function page_write($page, $postdata, $notimestamp = FALSE)
103103 links_update($page);
104104
105105 // Update autoalias.dat (AutoAliasName)
106- if ($autoalias && $page == $aliaspage) {
106+ if ($autoalias && $page === $aliaspage) {
107107 $aliases = get_autoaliases();
108108 if (empty($aliases)) {
109109 // Remove
@@ -434,7 +434,7 @@ function put_lastmodified()
434434 // Check ALL filetime
435435 $recent_pages = array();
436436 foreach($pages as $page)
437- if ($page != $whatsnew && ! check_non_list($page))
437+ if ($page !== $whatsnew && ! check_non_list($page))
438438 $recent_pages[$page] = get_filetime($page);
439439
440440 // Sort decending order of last-modification date
@@ -735,7 +735,7 @@ function links_get_related($page)
735735 if (isset($links[$page])) return $links[$page];
736736
737737 // If possible, merge related pages generated by make_link()
738- $links[$page] = ($page == $vars['page']) ? $related : array();
738+ $links[$page] = ($page === $vars['page']) ? $related : array();
739739
740740 // Get repated pages from DB
741741 $links[$page] += links_get_related_db($vars['page']);
--- a/lib/link.php
+++ b/lib/link.php
@@ -1,6 +1,6 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone
3-// $Id: link.php,v 1.16 2007/07/28 17:13:30 henoheno Exp $
3+// $Id: link.php,v 1.17 2007/10/06 13:20:48 henoheno Exp $
44 // Copyright (C) 2003-2006, 2007 PukiWiki Developers Team
55 // License: GPL v2 or (at your option) any later version
66 //
@@ -67,7 +67,7 @@ function links_update($page)
6767 $links = links_get_objects($page, TRUE);
6868 foreach ($links as $_obj) {
6969 if (! isset($_obj->type) || $_obj->type != 'pagename' ||
70- $_obj->name == $page || $_obj->name == '')
70+ $_obj->name === $page || $_obj->name == '')
7171 continue;
7272
7373 if (is_a($_obj, 'Link_autolink')) { // 行儀が悪い
@@ -114,7 +114,7 @@ function links_update($page)
114114 $search_non_list = 1;
115115 $pages = do_search($page, 'AND', TRUE);
116116 foreach ($pages as $_page) {
117- if ($_page != $page)
117+ if ($_page !== $page)
118118 links_update($_page);
119119 }
120120 }
@@ -203,7 +203,7 @@ function links_add($page, $add, $rel_auto)
203203 foreach (file($ref_file) as $line) {
204204 list($ref_page, $ref_auto) = explode("\t", rtrim($line));
205205 if (! $ref_auto) $all_auto = FALSE;
206- if ($ref_page != $page) $ref .= $line;
206+ if ($ref_page !== $page) $ref .= $line;
207207 }
208208 unlink($ref_file);
209209 }
@@ -230,7 +230,7 @@ function links_delete($page, $del)
230230 $ref = '';
231231 foreach (file($ref_file) as $line) {
232232 list($ref_page, $ref_auto) = explode("\t", rtrim($line));
233- if ($ref_page != $page) {
233+ if ($ref_page !== $page) {
234234 if (! $ref_auto) $all_auto = FALSE;
235235 $ref .= $line;
236236 }
--- a/lib/make_link.php
+++ b/lib/make_link.php
@@ -1,8 +1,8 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
3-// $Id: make_link.php,v 1.35 2006/09/30 02:10:50 henoheno Exp $
3+// $Id: make_link.php,v 1.36 2007/10/06 13:20:48 henoheno Exp $
44 // Copyright (C)
5-// 2003-2005 PukiWiki Developers Team
5+// 2003-2005, 2007 PukiWiki Developers Team
66 // 2001-2002 Originally written by yu-ji
77 // License: GPL v2 or (at your option) any later version
88 //
@@ -784,7 +784,7 @@ function make_pagelink($page, $alias = '', $anchor = '', $refer = '', $isautolin
784784 $r_page = rawurlencode($page);
785785 $r_refer = ($refer == '') ? '' : '&amp;refer=' . rawurlencode($refer);
786786
787- if (! isset($related[$page]) && $page != $vars['page'] && is_page($page))
787+ if (! isset($related[$page]) && $page !== $vars['page'] && is_page($page))
788788 $related[$page] = get_filetime($page);
789789
790790 if ($isautolink || is_page($page)) {
--- a/plugin/edit.inc.php
+++ b/plugin/edit.inc.php
@@ -1,6 +1,6 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
3-// $Id: edit.inc.php,v 1.45 2007/08/19 14:20:58 henoheno Exp $
3+// $Id: edit.inc.php,v 1.46 2007/10/06 13:20:59 henoheno Exp $
44 // Copyright (C) 2001-2007 PukiWiki Developers Team
55 // License: GPL v2 or (at your option) any later version
66 //
@@ -93,7 +93,7 @@ function plugin_edit_inline()
9393 $s_label = strip_htmltag(array_pop($args), FALSE);
9494
9595 $page = array_shift($args);
96- if ($page == NULL) $page = '';
96+ if ($page === NULL) $page = '';
9797 $_noicon = $_nolabel = FALSE;
9898 foreach($args as $arg){
9999 switch(strtolower($arg)){
--- a/plugin/include.inc.php
+++ b/plugin/include.inc.php
@@ -1,6 +1,6 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
3-// $Id: include.inc.php,v 1.21 2004/12/30 13:26:43 henoheno Exp $
3+// $Id: include.inc.php,v 1.22 2007/10/06 13:20:59 henoheno Exp $
44 //
55 // Include-once plugin
66
@@ -108,7 +108,7 @@ function plugin_include_convert()
108108 if ($with_title) {
109109 $link = '<a href="' . $script . '?cmd=edit&amp;page=' . $r_page .
110110 '">' . $s_page . '</a>';
111- if ($page == $menubar) {
111+ if ($page === $menubar) {
112112 $body = '<span align="center"><h5 class="side_label">' .
113113 $link . '</h5></span><small>' . $body . '</small>';
114114 } else {
--- a/plugin/menu.inc.php
+++ b/plugin/menu.inc.php
@@ -2,7 +2,7 @@
22 /////////////////////////////////////////////////
33 // PukiWiki - Yet another WikiWikiWeb clone.
44 //
5-// $Id: menu.inc.php,v 1.8 2004/11/27 12:23:02 henoheno Exp $
5+// $Id: menu.inc.php,v 1.9 2007/10/06 13:20:59 henoheno Exp $
66 //
77
88 // サブメニューを使用する
@@ -47,7 +47,7 @@ function plugin_menu_convert()
4747
4848 if (! is_page($page)) {
4949 return '';
50- } else if ($vars['page'] == $page) {
50+ } else if ($vars['page'] === $page) {
5151 return '<!-- #menu(): You already view ' . htmlspecialchars($page) . ' -->';
5252 } else {
5353 // Cut fixed anchors
--- a/plugin/navi.inc.php
+++ b/plugin/navi.inc.php
@@ -1,6 +1,6 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
3-// $Id: navi.inc.php,v 1.22 2005/04/02 06:33:39 henoheno Exp $
3+// $Id: navi.inc.php,v 1.23 2007/10/06 13:20:59 henoheno Exp $
44 //
55 // Navi plugin: Show DocBook-like navigation bar and contents
66
@@ -100,7 +100,7 @@ function plugin_navi_convert()
100100
101101 $prev = $home;
102102 foreach ($pages as $page) {
103- if ($page == $current) break;
103+ if ($page === $current) break;
104104 $prev = $page;
105105 }
106106 $next = current($pages);
@@ -154,7 +154,7 @@ function plugin_navi_convert()
154154 } else {
155155 $ret .= '<ul>';
156156 foreach ($pages as $page)
157- if ($page != $home)
157+ if ($page !== $home)
158158 $ret .= ' <li>' . make_pagelink($page) . '</li>';
159159 $ret .= '</ul>';
160160 }
--- a/plugin/popular.inc.php
+++ b/plugin/popular.inc.php
@@ -1,6 +1,6 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone
3-// $Id: popular.inc.php,v 1.18 2007/07/28 17:12:42 henoheno Exp $
3+// $Id: popular.inc.php,v 1.19 2007/10/06 13:20:59 henoheno Exp $
44 // Copyright (C)
55 // 2003-2005, 2007 PukiWiki Developers Team
66 // 2002 Kazunori Mizushima <kazunori@uc.netyou.jp>
@@ -78,7 +78,7 @@ function plugin_popular_convert()
7878 $page = substr($page, 1);
7979
8080 $s_page = htmlspecialchars($page);
81- if ($page == $vars['page']) {
81+ if ($page === $vars['page']) {
8282 // No need to link itself, notifies where you just read
8383 $pg_passage = get_pg_passage($page,FALSE);
8484 $items .= ' <li><span title="' . $s_page . ' ' . $pg_passage . '">' .
--- a/plugin/rename.inc.php
+++ b/plugin/rename.inc.php
@@ -1,6 +1,6 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone
3-// $Id: rename.inc.php,v 1.35 2007/07/28 14:02:48 henoheno Exp $
3+// $Id: rename.inc.php,v 1.36 2007/10/06 13:20:59 henoheno Exp $
44 // Copyright (C) 2002-2005, 2007 PukiWiki Developers Team
55 // License: GPL v2 or (at your option) any later version
66 //
@@ -40,7 +40,7 @@ function plugin_rename_action()
4040 $page = plugin_rename_getvar('page');
4141 $refer = plugin_rename_getvar('refer');
4242
43- if ($refer === '') {
43+ if ($refer == '') {
4444 return plugin_rename_phase1();
4545
4646 } else if (! is_page($refer)) {
@@ -49,7 +49,7 @@ function plugin_rename_action()
4949 } else if (is_cantedit($refer)) {
5050 return plugin_rename_phase1('norename', $refer);
5151
52- } else if ($page === '' || $page === $refer) {
52+ } else if ($page == '' || $page === $refer) {
5353 return plugin_rename_phase2();
5454
5555 } else if (! is_pagename($page)) {