Changeset 8928
- Timestamp:
- 05/13/08 16:10:28 (2 months ago)
- Files:
-
- plugins/sfDynamicCMSPlugin/config/config.php (modified) (1 diff)
- plugins/sfDynamicCMSPlugin/lib/model/plugin/PluginsfDynamicCmsNode.php (modified) (1 diff)
- plugins/sfDynamicCMSPlugin/modules/sfDynamicCMSAdmin/actions/components.class.php (modified) (1 diff)
- plugins/sfDynamicCMSPlugin/modules/sfDynamicCMSAdmin/lib/BasesfDynamicCMSAdminActions.class.php (modified) (6 diffs)
- plugins/sfDynamicCMSPlugin/modules/sfDynamicCMSAdmin/templates/_menu.php (modified) (1 diff)
- plugins/sfDynamicCMSPlugin/modules/sfDynamicCMSAdmin/templates/_menuNav.php (modified) (1 diff)
- plugins/sfDynamicCMSPlugin/modules/sfDynamicCMSAdmin/templates/_sidebar.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfDynamicCMSPlugin/config/config.php
r8672 r8928 2 2 if (in_array('sfDynamicCMS', sfConfig::get('sf_enabled_modules'))) 3 3 { 4 if (sfConfig::get('app_sfDynamicCMS_routes_register' )) sfDynamicCMSTools::addRoutes();4 if (sfConfig::get('app_sfDynamicCMS_routes_register',true)) sfDynamicCMSTools::addRoutes(); 5 5 } plugins/sfDynamicCMSPlugin/lib/model/plugin/PluginsfDynamicCmsNode.php
r8672 r8928 134 134 public function getAbsoluteUrl($include_culture=false) 135 135 { 136 $url= parent::getAbsoluteUrl();137 if ($include_culture ) return $this->getSfDynamicCmsNav()->getCulture().'/'.$url;136 $url= parent::getAbsoluteUrl(); 137 if ($include_culture && sfDynamicCMSTools::isMultiLingual()) return $this->getSfDynamicCmsNav()->getCulture().'/'.$url; 138 138 else return $url; 139 } 139 } 140 140 141 141 public function getRouteName($get_default=false,$include_culture=false) plugins/sfDynamicCMSPlugin/modules/sfDynamicCMSAdmin/actions/components.class.php
r8672 r8928 1 <? 1 <?php 2 2 class sfDynamicCMSAdminComponents extends sfComponents 3 3 { plugins/sfDynamicCMSPlugin/modules/sfDynamicCMSAdmin/lib/BasesfDynamicCMSAdminActions.class.php
r8673 r8928 64 64 { 65 65 $this->updateSlotFromRequest($this->page_slots); 66 $this->clearCache( );66 $this->clearCache('templates'); 67 67 $this->setFlash('notice', 'Your modifications have been saved'); 68 68 return $this->redirect('sfDynamicCMSAdmin/editPageContent?node_id='.$this->getNode()->getId()); … … 80 80 $this->updatePageFromRequest(); 81 81 $this->getPage()->save(); 82 $this->clearCache( );82 $this->clearCache('templates'); 83 83 $this->setFlash('notice', 'Your modifications have been saved'); 84 84 return $this->redirect('sfDynamicCMSAdmin/editPageSettings?node_id='.$this->getNode()->getId()); … … 161 161 { 162 162 $this->saveNode(); 163 if($this->getRequestParameter('node[position_rel]')) sfDynamicCMSTools::generateRoutes($this->getNav()->getApplication()); 164 $this->clearCache(); 163 165 $this->setFlash('notice', 'Your modifications have been saved'); 164 166 if ($this->getRequestParameter('save_and_add')) return $this->redirect('sfDynamicCMSAdmin/createNode?nav_id='.$this->getNav()->getId()); … … 176 178 { 177 179 $this->saveNode(); 180 $this->clearCache('routing'); 178 181 sfDynamicCMSTools::generateRoutes($this->getNav()->getApplication()); 179 182 $this->setFlash('notice', 'Your modifications have been saved'); … … 242 245 $this->updateNodeFromRequest(); 243 246 $this->current_node->save(); 244 $this->clearCache();245 247 } 246 248 … … 366 368 } 367 369 368 protected function clearCache( )370 protected function clearCache($mode='all') 369 371 { 370 372 //clear routing cache of current application 371 sfToolkit::clearGlob(sfConfig::get('sf_root_cache_dir').'/'.$this->getNav()->getApplication().'/*/config/config_routing.yml.php');373 if($mode=='all' || $mode='routing') sfToolkit::clearGlob(sfConfig::get('sf_root_cache_dir').'/'.$this->getNav()->getApplication().'/*/config/config_routing.yml.php'); 372 374 //clear templates cache of current application 373 sfToolkit::clearGlob(sfConfig::get('sf_root_cache_dir').'/'.$this->getNav()->getApplication().'/*/template/*/all');375 if($mode=='all' || $mode='templates') sfToolkit::clearGlob(sfConfig::get('sf_root_cache_dir').'/'.$this->getNav()->getApplication().'/*/template/*/all'); 374 376 } 375 377 plugins/sfDynamicCMSPlugin/modules/sfDynamicCMSAdmin/templates/_menu.php
r8672 r8928 1 <? 1 <?php 2 2 $action = sfContext::getInstance()->getActionName(); 3 3 plugins/sfDynamicCMSPlugin/modules/sfDynamicCMSAdmin/templates/_menuNav.php
r8672 r8928 1 <? 1 <?php 2 2 $action = sfContext::getInstance()->getActionName(); 3 3 if ($current_nav && $current_nav->getId()) $nav_id=$current_nav->getId(); plugins/sfDynamicCMSPlugin/modules/sfDynamicCMSAdmin/templates/_sidebar.php
r8672 r8928 27 27 <?php echo link_to($root_node->getMenuName(),'sfDynamicCMSAdmin/index?node_id='.$root_node->getId()); ?> 28 28 <?php if($root_node->hasChildren()) include_partial('sfDynamicCMSAdmin/node_children', array('root_node' => $root_node,'current_node' => $current_node)); ?> 29 <? } ?>29 <?php } ?>