Changeset 4888
- Timestamp:
- 08/22/07 21:44:26 (3 years ago)
- Files:
-
- plugins/sfSimpleCMSPlugin/README (modified) (2 diffs)
- plugins/sfSimpleCMSPlugin/config/config.php (modified) (1 diff)
- plugins/sfSimpleCMSPlugin/lib/helper/sfSimpleCMSHelper.php (modified) (1 diff)
- plugins/sfSimpleCMSPlugin/lib/sfSimpleCMSTools.class.php (modified) (1 diff)
- plugins/sfSimpleCMSPlugin/modules/sfSimpleCMS/lib/BasesfSimpleCMSActions.class.php (modified) (3 diffs)
- plugins/sfSimpleCMSPlugin/modules/sfSimpleCMS/lib/BasesfSimpleCMSComponents.class.php (modified) (2 diffs)
- plugins/sfSimpleCMSPlugin/modules/sfSimpleCMS/templates/_editorTools.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfSimpleCMSPlugin/README
r4875 r4888 261 261 * Optimize queries for breadcrumb and navigation to retrieve title in a single query 262 262 * Add a 'type' column to the Page object to deal with pages not handled by the CMS controller, but that must appear in the navigation (mostly internal and external links) 263 * Solve the orphan slots problem 263 264 * Change Image slot type to a list of images (cf. Modular slot type) 264 265 * Published status per localization … … 275 276 === Trunk === 276 277 278 * francois: Fixed non-working default page for `sfSimpleCMS` module 279 * francois: Fixed wrong token name for culture 277 280 * francois: Added handling of additional TinyMCE initialization options in `app.yml` 278 281 * francois: Fixed wrong handling of primary/foreign keys in schema plugins/sfSimpleCMSPlugin/config/config.php
r4679 r4888 5 5 $r = sfRouting::getInstance(); 6 6 // preprend our routes 7 $r->prependRoute('sf_cms_delete', '/cms_delete/:sf_ default_culture/:slug', array('module' => 'sfSimpleCMS', 'action' => 'delete'), array('slug' => '.*'));7 $r->prependRoute('sf_cms_delete', '/cms_delete/:sf_culture/:slug', array('module' => 'sfSimpleCMS', 'action' => 'delete'), array('slug' => '.*')); 8 8 $r->prependRoute('sf_cms_toggle_publish', '/cms_publish/:slug', array('module' => 'sfSimpleCMS', 'action' => 'togglePublish'), array('slug' => '.*')); 9 9 if(sfConfig::get('app_sfSimpleCMS_use_l10n', false)) 10 10 { 11 $r->prependRoute('sf_cms_show', '/cms/:sf_ default_culture/:slug', array('module' => 'sfSimpleCMS', 'action' => 'show'), array('slug' => '.*'));11 $r->prependRoute('sf_cms_show', '/cms/:sf_culture/:slug', array('module' => 'sfSimpleCMS', 'action' => 'show'), array('slug' => '.*')); 12 12 } 13 13 else plugins/sfSimpleCMSPlugin/lib/helper/sfSimpleCMSHelper.php
r4857 r4888 78 78 if(sfConfig::get('app_sfSimpleCMS_use_l10n', false)) 79 79 { 80 echo input_hidden_tag('sf_ default_culture', $slot_object->getCulture());80 echo input_hidden_tag('sf_culture', $slot_object->getCulture()); 81 81 } 82 82 plugins/sfSimpleCMSPlugin/lib/sfSimpleCMSTools.class.php
r4663 r4888 7 7 if(sfConfig::get('app_sfSimpleCMS_use_l10n', false)) 8 8 { 9 $culture_parameter = $culture ? $culture : sfContext::getInstance()->getRequest()->getParameter('sf_ default_culture');10 $culture_query = '&sf_ default_culture='.$culture_parameter;9 $culture_parameter = $culture ? $culture : sfContext::getInstance()->getRequest()->getParameter('sf_culture'); 10 $culture_query = '&sf_culture='.$culture_parameter; 11 11 } 12 12 else plugins/sfSimpleCMSPlugin/modules/sfSimpleCMS/lib/BasesfSimpleCMSActions.class.php
r4859 r4888 7 7 if(sfConfig::get('app_sfSimpleCMS_use_l10n', false)) 8 8 { 9 return $this->getRequestParameter('sf_ default_culture', sfConfig::get('app_sfSimpleCMS_default_culture', 'en'));9 return $this->getRequestParameter('sf_culture', sfConfig::get('app_sfSimpleCMS_default_culture', 'en')); 10 10 } 11 11 else … … 17 17 public function executeIndex() 18 18 { 19 $this->redirect(sfSimpleCMSTools::urlForPage(sfConfig::get('app_sfSimpleCMS_default_page', 'home') ));19 $this->redirect(sfSimpleCMSTools::urlForPage(sfConfig::get('app_sfSimpleCMS_default_page', 'home'), '', $this->getCulture())); 20 20 } 21 21 … … 127 127 128 128 $query_string = 'edit=true'.($this->getRequestParameter('preview', false) == 'true' ? '&preview=true' : ''); 129 $this->redirect(sfSimpleCMSTools::urlForPage($slug, $query_string, $this->getRequestParameter('sf_ default_culture')));129 $this->redirect(sfSimpleCMSTools::urlForPage($slug, $query_string, $this->getRequestParameter('sf_culture'))); 130 130 } 131 131 plugins/sfSimpleCMSPlugin/modules/sfSimpleCMS/lib/BasesfSimpleCMSComponents.class.php
r4872 r4888 7 7 $this->page_names = sfSimpleCMSPagePeer::getAllPagesWithLevel(); 8 8 $this->slug = $this->getRequestParameter('slug'); 9 $this->culture = $this->getRequestParameter('sf_ default_culture', sfConfig::get('app_sfSimpleCMS_default_culture', 'en'));9 $this->culture = $this->getRequestParameter('sf_culture', sfConfig::get('app_sfSimpleCMS_default_culture', 'en')); 10 10 $publisher_credentials = sfConfig::get('app_sfSimpleCMS_publisher_credential', false); 11 11 $this->is_publisher = (!$publisher_credentials || $this->getUser()->hasCredential($publisher_credentials)); … … 35 35 if(sfConfig::get('app_sfSimpleCMS_use_l10n', false)) 36 36 { 37 return $this->getRequestParameter('sf_ default_culture', sfConfig::get('app_sfSimpleCMS_default_culture', 'en'));37 return $this->getRequestParameter('sf_culture', sfConfig::get('app_sfSimpleCMS_default_culture', 'en')); 38 38 } 39 39 else plugins/sfSimpleCMSPlugin/modules/sfSimpleCMS/templates/_editorTools.php
r4857 r4888 26 26 <?php if ($page->getIsPublished()): ?> 27 27 <span class="published selected"><?php echo __('published') ?></span> 28 <span class="unpublished"><?php echo link_to(__('unpublish'), 'sfSimpleCMS/togglePublish?slug='.$slug, array('query_string' => $query_string.'&sf_ default_culture='.$culture)) ?></span>28 <span class="unpublished"><?php echo link_to(__('unpublish'), 'sfSimpleCMS/togglePublish?slug='.$slug, array('query_string' => $query_string.'&sf_culture='.$culture)) ?></span> 29 29 <?php else: ?> 30 <span class="published"><?php echo link_to( __('publish'), 'sfSimpleCMS/togglePublish?slug='.$slug, array('query_string' => $query_string.'&sf_ default_culture='.$culture)) ?></span>30 <span class="published"><?php echo link_to( __('publish'), 'sfSimpleCMS/togglePublish?slug='.$slug, array('query_string' => $query_string.'&sf_culture='.$culture)) ?></span> 31 31 <span class="unpublished selected"><?php echo __('unpublished') ?></span> 32 32 <?php endif; ?> … … 71 71 <label for="slug">Path:</label> 72 72 <?php echo input_tag('slug', $page->getSlug(), 'id=update_path class=wide') ?> 73 <?php echo input_hidden_tag('sf_ default_culture', $culture) ?>73 <?php echo input_hidden_tag('sf_culture', $culture) ?> 74 74 </div> 75 75 … … 97 97 98 98 <div class="form_submit"> 99 <?php echo button_to(__('delete'), 'sfSimpleCMS/delete?sf_ default_culture='.$culture.'&slug='.$slug, array(99 <?php echo button_to(__('delete'), 'sfSimpleCMS/delete?sf_culture='.$culture.'&slug='.$slug, array( 100 100 'confirm' => __('Are you sure you want to delete this page?') 101 101 )) ?> … … 110 110 <?php echo form_tag('sfSimpleCMS/edit', 'name=cms_tools_create_page id=cms_tools_create_page style=display:none') ?> 111 111 112 <?php echo input_hidden_tag('sf_ default_culture', $culture) ?>112 <?php echo input_hidden_tag('sf_culture', $culture) ?> 113 113 114 114 <div class="form_control">

