/**
  * Gets the properties pointing from the current page to this one.
  */
 static function getPagePropertiesOfPage($title)
 {
     if (self::$mLinkedPagesRetrieved) {
         return;
     }
     $store = SFUtils::getSMWStore();
     if (class_exists('SMWDataItem')) {
         $value = SMWDIWikiPage::newFromTitle($title);
     } else {
         $value = $title;
     }
     $data = $store->getSemanticData($value);
     foreach ($data->getProperties() as $property) {
         $propertyValues = $data->getPropertyValues($property);
         foreach ($propertyValues as $propertyValue) {
             $propertyName = null;
             $linkedPageName = null;
             if ($propertyValue instanceof SMWDIWikiPage) {
                 $propertyName = $property->getKey();
                 $linkedPageName = $propertyValue->getDBkey();
             } elseif ($propertyValue instanceof SMWWikiPageValue) {
                 $propertyName = $property->getWikiValue();
                 $linkedPageName = $propertyValue->getWikiValue();
             }
             // Needed for SMW 1.7 (?)
             $linkedPageName = str_replace('_', ' ', $linkedPageName);
             if (!is_null($linkedPageName)) {
                 if (array_key_exists($linkedPageName, self::$mLinkedPages)) {
                     self::$mLinkedPages[$linkedPageName][] = $propertyName;
                 } else {
                     self::$mLinkedPages[$linkedPageName] = array($propertyName);
                 }
             }
         }
     }
     self::$mLinkedPagesRetrieved = true;
 }