http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88535
Revision: 88535
Author: jeroendedauw
Date: 2011-05-21 19:32:28 +0000 (Sat, 21 May 2011)
Log Message:
-----------
revert some changes I made yesterday after discussion with Markus
Modified Paths:
--------------
trunk/extensions/SemanticMediaWiki/includes/SMW_SemanticData.php
Modified: trunk/extensions/SemanticMediaWiki/includes/SMW_SemanticData.php
===================================================================
--- trunk/extensions/SemanticMediaWiki/includes/SMW_SemanticData.php
2011-05-21 19:31:16 UTC (rev 88534)
+++ trunk/extensions/SemanticMediaWiki/includes/SMW_SemanticData.php
2011-05-21 19:32:28 UTC (rev 88535)
@@ -198,8 +198,7 @@
*
* @return boolean
*/
- public function hasVisibleProperties( $refresh = false ) {
- if ( $refresh ) $this->findVisibleProperties();
+ public function hasVisibleProperties() {
return $this->mHasVisibleProps;
}
@@ -213,8 +212,7 @@
*
* @return boolean
*/
- public function hasVisibleSpecialProperties( $refresh = false ) {
- if ( $refresh ) $this->findVisibleProperties();
+ public function hasVisibleSpecialProperties() {
return $this->mHasVisibleSpecs;
}
@@ -286,47 +284,6 @@
}
/**
- * Removes all DIs for the specified property.
- * NOTE: calling this method can lead to false positive
mHasVisibleProps and mHasVisibleSpecs.
- * Call findVisibleProperties to fix this if needed.
- *
- * @since 1.6
- *
- * @param SMWDIProperty $property
- */
- public function removeDataForProperty( SMWDIProperty $property ) {
- var_dump($property);exit;
- if ( array_key_exists( $property->getKey(), $this->mPropVals )
) {
- unset( $this->mPropVals[$property->getKey()] );
- }
- if ( array_key_exists( $property->getKey(), $this->mProperties
) ) {
- unset( $this->mProperties[$property->getKey()] );
- }
- }
-
- /**
- * Determine if there are visible properties and special properties.
- *
- * @since 1.6
- */
- public function findVisibleProperties() {
- $this->mHasVisibleSpecs = false;
- $this->mHasVisibleProps = false;
-
- foreach ( $this->mProperties as /* SMWDIProperty */ $property )
{
- if ( !$property->isUserDefined() ) {
- if ( $property->isShown() ) {
- $this->mHasVisibleSpecs = true;
- $this->mHasVisibleProps = true;
- break;
- }
- } else {
- $this->mHasVisibleProps = true;
- }
- }
- }
-
- /**
* Delete all data other than the subject.
*/
public function clear() {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs