Exemplo n.º 1
0
 public static function onArticleSaveComplete(&$article, &$user, $text, $summary, $minoredit, $watchthis, $sectionanchor, &$flags, $revision, &$status, $baseRevId)
 {
     wfProfileIn(__METHOD__);
     wfDebug(__METHOD__ . "\n");
     // store queued model or clear data for the article (if no model was passed)
     $storage = PlaceStorage::newFromArticle($article);
     if (self::$modelToSave instanceof PlaceModel) {
         // use model from parser hook
         // self::$modelToSave is set in PlacesParserHookHandler::renderPlaceTag
         $storage->setModel(self::$modelToSave);
     } else {
         // no geo data fround - use an empty model
         $storage->setModel(new PlaceModel());
     }
     $storage->store();
     // purge autoplaceholdr position
     F::app()->sendRequest('Places', 'purgeGeoLocationButton');
     wfProfileOut(__METHOD__);
     return true;
 }