Index: trunk/phase3/includes/api/ApiParamInfo.php |
— | — | @@ -93,7 +93,7 @@ |
94 | 94 | { |
95 | 95 | $result = $this->getResult(); |
96 | 96 | $retval['classname'] = get_class($obj); |
97 | | - $retval['description'] = (is_array($obj->getDescription()) ? implode("\n", $obj->getDescription()) : $obj->getDescription()); |
| 97 | + $retval['description'] = implode("\n", (array)$obj->getDescription()); |
98 | 98 | $retval['prefix'] = $obj->getModulePrefix(); |
99 | 99 | if($obj->isReadMode()) |
100 | 100 | $retval['readrights'] = ''; |
— | — | @@ -109,6 +109,8 @@ |
110 | 110 | foreach($allowedParams as $n => $p) |
111 | 111 | { |
112 | 112 | $a = array('name' => $n); |
| 113 | + if(isset($paramDesc[$n])) |
| 114 | + $a['description'] = implode("\n", (array)$paramDesc[$n]); |
113 | 115 | if(!is_array($p)) |
114 | 116 | { |
115 | 117 | if(is_bool($p)) |
— | — | @@ -116,8 +118,16 @@ |
117 | 119 | $a['type'] = 'bool'; |
118 | 120 | $a['default'] = ($p ? 'true' : 'false'); |
119 | 121 | } |
120 | | - if(is_string($p)) |
121 | | - $a['default'] = $p; |
| 122 | + else if(is_string($p) || is_null($p)) |
| 123 | + { |
| 124 | + $a['type'] = 'string'; |
| 125 | + $a['default'] = strval($p); |
| 126 | + } |
| 127 | + else if(is_int($p)) |
| 128 | + { |
| 129 | + $a['type'] = 'integer'; |
| 130 | + $a['default'] = intval($p); |
| 131 | + } |
122 | 132 | $retval['parameters'][] = $a; |
123 | 133 | continue; |
124 | 134 | } |
— | — | @@ -147,8 +157,6 @@ |
148 | 158 | $a['highmax'] = $p[ApiBase::PARAM_MAX2]; |
149 | 159 | if(isset($p[ApiBase::PARAM_MIN])) |
150 | 160 | $a['min'] = $p[ApiBase::PARAM_MIN]; |
151 | | - if(isset($paramDesc[$n])) |
152 | | - $a['description'] = (is_array($paramDesc[$n]) ? implode("\n", $paramDesc[$n]) : $paramDesc[$n]); |
153 | 161 | $retval['parameters'][] = $a; |
154 | 162 | } |
155 | 163 | $result->setIndexedTagName($retval['parameters'], 'param'); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -133,7 +133,9 @@ |
134 | 134 | * Added PHP and database version to meta=siteinfo output |
135 | 135 | * (bug 18533) Add readonly message to meta=siteinfo output |
136 | 136 | * (bug 18518) Add clprop=hidden to prop=categories |
137 | | -* (bug 18710) Fixed internal error with empty parameter in ApiParamInfo |
| 137 | +* (bug 18710) Fixed internal error with empty parameter in action=paraminfo |
| 138 | +* (bug 18709) Missing descriptions for some parameters in action=paraminfo |
| 139 | + output |
138 | 140 | |
139 | 141 | === Languages updated in 1.16 === |
140 | 142 | |