AntonLV před 9 roky
rodič
revize
bc07aa44de

+ 5 - 5
inc/classes/BxDolModuleTemplate.php

@@ -33,12 +33,12 @@ class BxDolModuleTemplate extends BxDolTemplate
 
 
     function addCss($mixedFiles, $bDynamic = false)
     function addCss($mixedFiles, $bDynamic = false)
     {
     {
-        return $this->_addFiles(BxDolTemplate::getInstance(), 'addCss', 'addLocation', 'removeLocation', '', $mixedFiles, $bDynamic, true);
+        return $this->_addFiles(BxDolTemplate::getInstance(), 'addCss', 'addDynamicLocation', 'removeLocation', '', $mixedFiles, $bDynamic, true);
     }
     }
 
 
     function addJs($mixedFiles, $bDynamic = false)
     function addJs($mixedFiles, $bDynamic = false)
     {
     {
-        return $this->_addFiles(BxDolTemplate::getInstance(), 'addJs', 'addLocationJs', 'removeLocationJs', 'js/', $mixedFiles, $bDynamic, true);
+        return $this->_addFiles(BxDolTemplate::getInstance(), 'addJs', 'addDynamicLocationJs', 'removeLocationJs', 'js/', $mixedFiles, $bDynamic, true);
     }
     }
 
 
     function addJsTranslation($mixedKey)
     function addJsTranslation($mixedKey)
@@ -48,17 +48,17 @@ class BxDolModuleTemplate extends BxDolTemplate
 
 
     function addStudioCss($mixedFiles, $bDynamic = false, $bSearchInModule = true)
     function addStudioCss($mixedFiles, $bDynamic = false, $bSearchInModule = true)
     {
     {
-        return $this->_addFiles(BxDolStudioTemplate::getInstance(), 'addCss', 'addLocation', 'removeLocation', '', $mixedFiles, $bDynamic, $bSearchInModule);
+        return $this->_addFiles(BxDolStudioTemplate::getInstance(), 'addCss', 'addDynamicLocation', 'removeLocation', '', $mixedFiles, $bDynamic, $bSearchInModule);
     }
     }
 
 
     function addStudioJs($mixedFiles, $bDynamic = false, $bSearchInModule = true)
     function addStudioJs($mixedFiles, $bDynamic = false, $bSearchInModule = true)
     {
     {
-        return $this->_addFiles(BxDolStudioTemplate::getInstance(), 'addJs', 'addLocationJs', 'removeLocationJs', 'js/', $mixedFiles, $bDynamic, $bSearchInModule);
+        return $this->_addFiles(BxDolStudioTemplate::getInstance(), 'addJs', 'addDynamicLocationJs', 'removeLocationJs', 'js/', $mixedFiles, $bDynamic, $bSearchInModule);
     }
     }
 
 
     function _addFiles($oTemplate, $sFuncAddFiles, $sFuncAddLocation, $sFuncRemoveLocation, $sPath, $mixedFiles, $bDynamic = false, $bSearchInModule = true)
     function _addFiles($oTemplate, $sFuncAddFiles, $sFuncAddLocation, $sFuncRemoveLocation, $sPath, $mixedFiles, $bDynamic = false, $bSearchInModule = true)
     {
     {
-        $sLocationKey = $bSearchInModule ? $oTemplate->$sFuncAddLocation($this->_oConfig->getName(), $this->_oConfig->getHomePath() . $sPath, $this->_oConfig->getHomeUrl() . $sPath) : '';
+        $sLocationKey = $bSearchInModule ? $oTemplate->$sFuncAddLocation($this->_oConfig->getHomePath() . $sPath, $this->_oConfig->getHomeUrl() . $sPath) : '';
         $mixedResult = $oTemplate->$sFuncAddFiles($mixedFiles, $bDynamic);
         $mixedResult = $oTemplate->$sFuncAddFiles($mixedFiles, $bDynamic);
         if($sLocationKey != '')
         if($sLocationKey != '')
             $oTemplate->$sFuncRemoveLocation($sLocationKey);
             $oTemplate->$sFuncRemoveLocation($sLocationKey);

+ 2 - 2
inc/classes/BxDolTemplate.php

@@ -619,7 +619,7 @@ class BxDolTemplate extends BxDolFactory implements iBxDolSingleton
      */
      */
     function addDynamicLocation($sLocationPath, $sLocationUrl)
     function addDynamicLocation($sLocationPath, $sLocationUrl)
     {
     {
-        $sLocationKey = time();
+        $sLocationKey = time() . mt_rand();
         $this->addLocation($sLocationKey, $sLocationPath, $sLocationUrl);
         $this->addLocation($sLocationKey, $sLocationPath, $sLocationUrl);
 
 
         return $sLocationKey;
         return $sLocationKey;
@@ -659,7 +659,7 @@ class BxDolTemplate extends BxDolFactory implements iBxDolSingleton
      */
      */
     function addDynamicLocationJs($sLocationPath, $sLocationUrl)
     function addDynamicLocationJs($sLocationPath, $sLocationUrl)
     {
     {
-        $sLocationKey = time();
+        $sLocationKey = time() . mt_rand();
         $this->addLocationJs($sLocationKey, $sLocationPath, $sLocationUrl);
         $this->addLocationJs($sLocationKey, $sLocationPath, $sLocationUrl);
 
 
         return $sLocationKey;
         return $sLocationKey;