r88535 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88534‎ | r88535 | r88536 >
Date:19:32, 21 May 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
revert some changes I made yesterday after discussion with Markus
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_SemanticData.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_SemanticData.php
@@ -198,8 +198,7 @@
199199 *
200200 * @return boolean
201201 */
202 - public function hasVisibleProperties( $refresh = false ) {
203 - if ( $refresh ) $this->findVisibleProperties();
 202+ public function hasVisibleProperties() {
204203 return $this->mHasVisibleProps;
205204 }
206205
@@ -213,8 +212,7 @@
214213 *
215214 * @return boolean
216215 */
217 - public function hasVisibleSpecialProperties( $refresh = false ) {
218 - if ( $refresh ) $this->findVisibleProperties();
 216+ public function hasVisibleSpecialProperties() {
219217 return $this->mHasVisibleSpecs;
220218 }
221219
@@ -286,47 +284,6 @@
287285 }
288286
289287 /**
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 - /**
331288 * Delete all data other than the subject.
332289 */
333290 public function clear() {

Status & tagging log