• 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

修訂cc1367bac4deb8ea9dbd579403f5d86d86cf7679 (tree)
時間2007-10-01 23:29:01
作者henoheno <henoheno>
Commiterhenoheno

Log Message

Simplify: reset() returns the first value of the array()

Change Summary

差異

--- a/plugin/tracker.inc.php
+++ b/plugin/tracker.inc.php
@@ -1,6 +1,6 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone
3-// $Id: tracker.inc.php,v 1.98 2007/10/01 13:55:45 henoheno Exp $
3+// $Id: tracker.inc.php,v 1.99 2007/10/01 14:29:01 henoheno Exp $
44 // Copyright (C) 2003-2005, 2007 PukiWiki Developers Team
55 // License: GPL v2 or (at your option) any later version
66 //
@@ -363,6 +363,7 @@ class Tracker_form
363363 }
364364 }
365365
366+// TODO: Why a filter sometimes created so many?
366367 // Field classes within a form
367368 class Tracker_field
368369 {
@@ -608,10 +609,7 @@ class Tracker_field_radio extends Tracker_field_format
608609 $name = $this->name;
609610
610611 if (! isset($options[$name])) {
611- $values = array_map(
612- create_function('$array', 'return $array[0];'),
613- $this->config->get($name)
614- );
612+ $values = array_map('reset', $this->config->get($name));
615613 $options[$name] = array_flip($values); // array('value0' => 0, 'value1' => 1, ...)
616614 }
617615