Development

Changeset 8928

You must first sign up to be able to contribute.

Changeset 8928

Show
Ignore:
Timestamp:
05/13/08 16:10:28 (2 months ago)
Author:
Sylvio
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfDynamicCMSPlugin/config/config.php

    r8672 r8928  
    22if (in_array('sfDynamicCMS', sfConfig::get('sf_enabled_modules'))) 
    33{ 
    4   if (sfConfig::get('app_sfDynamicCMS_routes_register')) sfDynamicCMSTools::addRoutes(); 
     4  if (sfConfig::get('app_sfDynamicCMS_routes_register',true)) sfDynamicCMSTools::addRoutes(); 
    55} 
  • plugins/sfDynamicCMSPlugin/lib/model/plugin/PluginsfDynamicCmsNode.php

    r8672 r8928  
    134134  public function getAbsoluteUrl($include_culture=false) 
    135135  { 
    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; 
    138138    else return $url; 
    139   } 
     139  }  
    140140 
    141141  public function getRouteName($get_default=false,$include_culture=false) 
  • plugins/sfDynamicCMSPlugin/modules/sfDynamicCMSAdmin/actions/components.class.php

    r8672 r8928  
    1 <? 
     1<?php 
    22class sfDynamicCMSAdminComponents extends sfComponents 
    33{ 
  • plugins/sfDynamicCMSPlugin/modules/sfDynamicCMSAdmin/lib/BasesfDynamicCMSAdminActions.class.php

    r8673 r8928  
    6464    { 
    6565      $this->updateSlotFromRequest($this->page_slots); 
    66       $this->clearCache(); 
     66      $this->clearCache('templates'); 
    6767      $this->setFlash('notice', 'Your modifications have been saved'); 
    6868      return $this->redirect('sfDynamicCMSAdmin/editPageContent?node_id='.$this->getNode()->getId()); 
     
    8080      $this->updatePageFromRequest(); 
    8181      $this->getPage()->save(); 
    82       $this->clearCache(); 
     82      $this->clearCache('templates'); 
    8383      $this->setFlash('notice', 'Your modifications have been saved'); 
    8484      return $this->redirect('sfDynamicCMSAdmin/editPageSettings?node_id='.$this->getNode()->getId()); 
     
    161161    { 
    162162      $this->saveNode(); 
     163      if($this->getRequestParameter('node[position_rel]')) sfDynamicCMSTools::generateRoutes($this->getNav()->getApplication()); 
     164      $this->clearCache(); 
    163165      $this->setFlash('notice', 'Your modifications have been saved'); 
    164166      if ($this->getRequestParameter('save_and_add')) return $this->redirect('sfDynamicCMSAdmin/createNode?nav_id='.$this->getNav()->getId()); 
     
    176178    { 
    177179      $this->saveNode(); 
     180      $this->clearCache('routing'); 
    178181      sfDynamicCMSTools::generateRoutes($this->getNav()->getApplication()); 
    179182      $this->setFlash('notice', 'Your modifications have been saved'); 
     
    242245    $this->updateNodeFromRequest(); 
    243246    $this->current_node->save(); 
    244     $this->clearCache(); 
    245247  } 
    246248 
     
    366368  } 
    367369 
    368   protected function clearCache(
     370  protected function clearCache($mode='all'
    369371  { 
    370372    //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'); 
    372374    //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'); 
    374376  } 
    375377   
  • plugins/sfDynamicCMSPlugin/modules/sfDynamicCMSAdmin/templates/_menu.php

    r8672 r8928  
    1 <? 
     1<?php 
    22$action = sfContext::getInstance()->getActionName(); 
    33 
  • plugins/sfDynamicCMSPlugin/modules/sfDynamicCMSAdmin/templates/_menuNav.php

    r8672 r8928  
    1 <? 
     1<?php 
    22$action = sfContext::getInstance()->getActionName(); 
    33if ($current_nav && $current_nav->getId()) $nav_id=$current_nav->getId(); 
  • plugins/sfDynamicCMSPlugin/modules/sfDynamicCMSAdmin/templates/_sidebar.php

    r8672 r8928  
    2727  <?php echo link_to($root_node->getMenuName(),'sfDynamicCMSAdmin/index?node_id='.$root_node->getId());  ?>  
    2828  <?php if($root_node->hasChildren()) include_partial('sfDynamicCMSAdmin/node_children', array('root_node' => $root_node,'current_node' => $current_node)); ?> 
    29 <? } ?> 
     29<?php } ?>