Index: trunk/extensions/SemanticMediaWiki/includes/SMW_SemanticData.php |
— | — | @@ -198,8 +198,7 @@ |
199 | 199 | * |
200 | 200 | * @return boolean |
201 | 201 | */ |
202 | | - public function hasVisibleProperties( $refresh = false ) { |
203 | | - if ( $refresh ) $this->findVisibleProperties(); |
| 202 | + public function hasVisibleProperties() { |
204 | 203 | return $this->mHasVisibleProps; |
205 | 204 | } |
206 | 205 | |
— | — | @@ -213,8 +212,7 @@ |
214 | 213 | * |
215 | 214 | * @return boolean |
216 | 215 | */ |
217 | | - public function hasVisibleSpecialProperties( $refresh = false ) { |
218 | | - if ( $refresh ) $this->findVisibleProperties(); |
| 216 | + public function hasVisibleSpecialProperties() { |
219 | 217 | return $this->mHasVisibleSpecs; |
220 | 218 | } |
221 | 219 | |
— | — | @@ -286,47 +284,6 @@ |
287 | 285 | } |
288 | 286 | |
289 | 287 | /** |
290 | | - * Removes all DIs for the specified property. |
291 | | - * NOTE: calling this method can lead to false positive mHasVisibleProps and mHasVisibleSpecs. |
292 | | - * Call findVisibleProperties to fix this if needed. |
293 | | - * |
294 | | - * @since 1.6 |
295 | | - * |
296 | | - * @param SMWDIProperty $property |
297 | | - */ |
298 | | - public function removeDataForProperty( SMWDIProperty $property ) { |
299 | | - var_dump($property);exit; |
300 | | - if ( array_key_exists( $property->getKey(), $this->mPropVals ) ) { |
301 | | - unset( $this->mPropVals[$property->getKey()] ); |
302 | | - } |
303 | | - if ( array_key_exists( $property->getKey(), $this->mProperties ) ) { |
304 | | - unset( $this->mProperties[$property->getKey()] ); |
305 | | - } |
306 | | - } |
307 | | - |
308 | | - /** |
309 | | - * Determine if there are visible properties and special properties. |
310 | | - * |
311 | | - * @since 1.6 |
312 | | - */ |
313 | | - public function findVisibleProperties() { |
314 | | - $this->mHasVisibleSpecs = false; |
315 | | - $this->mHasVisibleProps = false; |
316 | | - |
317 | | - foreach ( $this->mProperties as /* SMWDIProperty */ $property ) { |
318 | | - if ( !$property->isUserDefined() ) { |
319 | | - if ( $property->isShown() ) { |
320 | | - $this->mHasVisibleSpecs = true; |
321 | | - $this->mHasVisibleProps = true; |
322 | | - break; |
323 | | - } |
324 | | - } else { |
325 | | - $this->mHasVisibleProps = true; |
326 | | - } |
327 | | - } |
328 | | - } |
329 | | - |
330 | | - /** |
331 | 288 | * Delete all data other than the subject. |
332 | 289 | */ |
333 | 290 | public function clear() { |