Просмотр исходного кода

#103 - location block is blank when no location, it should be no block at all in such case

Alex Trofimov 11 лет назад
Родитель
Сommit
909b08034e
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      modules/base/general/classes/BxBaseModGeneralTemplate.php

+ 4 - 1
modules/base/general/classes/BxBaseModGeneralTemplate.php

@@ -50,10 +50,13 @@ class BxBaseModGeneralTemplate extends BxDolModuleTemplate
         if (empty($CNF['OBJECT_METATAGS']))
             return '';
 
+        if (!($sLocationString = $oMetatags->locationsString($iContentId)))
+            return '';
+
         bx_import('BxDolMetatags');
         $oMetatags = BxDolMetatags::getObjectInstance($CNF['OBJECT_METATAGS']);
         $aVars = array (
-            'location' => $oMetatags->locationsString($iContentId)
+            'location' => $sLocationString
         );
         return $this->parseHtmlByName('entry-location.html', $aVars);
     }