Author: garak
Date: 2010-01-20 11:11:58 +0100 (Wed, 20 Jan 2010)
New Revision: 26926

Modified:
   plugins/sfAssetsLibraryPlugin/branches/garak/README
   plugins/sfAssetsLibraryPlugin/branches/garak/lib/helper/sfAssetHelper.php
   plugins/sfAssetsLibraryPlugin/branches/garak/lib/sfAssetRouting.php
   
plugins/sfAssetsLibraryPlugin/branches/garak/lib/sfAssetsLibraryTools.class.php
   
plugins/sfAssetsLibraryPlugin/branches/garak/lib/widget/sfWidgetFormAssetInput.class.php
   
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/lib/BasesfAssetActions.class.php
   
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_asset.php
   
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_edit_form.php
   
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_list.php
   
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_sidebar_edit.php
   
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_sidebar_list.php
   
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_sidebar_search.php
   
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_sidebar_sort.php
   
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/createFolderSuccess.php
   
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/massUploadSuccess.php
   
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/moveFolderSuccess.php
   
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/renameFolderSuccess.php
   
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/searchSuccess.php
Log:
[sfAssetsLibraryPlugin] remove standard routes to fit symfony 1.4 default 
routing


Modified: plugins/sfAssetsLibraryPlugin/branches/garak/README
===================================================================
--- plugins/sfAssetsLibraryPlugin/branches/garak/README 2010-01-20 09:48:58 UTC 
(rev 26925)
+++ plugins/sfAssetsLibraryPlugin/branches/garak/README 2010-01-20 10:11:58 UTC 
(rev 26926)
@@ -96,7 +96,14 @@
       sfAssetsLibrary:
         upload_dir:       media                  # Asset library root, under 
the web/ dir
         check_type:       false                  # Set to true if you want to 
restrict the type of assets
-        types:            ['image', txt, archive, pdf, xls, doc, ppt]  # 
Accepted asset types if check_type is true
+        types:                                   # Accepted asset types if 
check_type is true
+          image:   image
+          txt:     txt
+          archive: archive
+          pdf:     pdf
+          xls:     xls
+          doc:     doc
+          ppt:     ppt
         thumbnail_dir:    thumbnail              # Where the image thumbnails 
are stored
         use_ImageMagick:  false                  # Set to true if you have the 
convert command
         thumbnails:                              # Name and size (in pixels) 
of the thumbnails created at upload

Modified: 
plugins/sfAssetsLibraryPlugin/branches/garak/lib/helper/sfAssetHelper.php
===================================================================
--- plugins/sfAssetsLibraryPlugin/branches/garak/lib/helper/sfAssetHelper.php   
2010-01-20 09:48:58 UTC (rev 26925)
+++ plugins/sfAssetsLibraryPlugin/branches/garak/lib/helper/sfAssetHelper.php   
2010-01-20 10:11:58 UTC (rev 26926)
@@ -13,8 +13,8 @@
  *
  * @param sfAsset $asset
  * @param string $thumbnail_type
- * @param bool $file_system
  * @param array $options
+ * @param  string  $relative_path
  * @return string
  */
 function asset_image_tag($asset, $thumbnail_type = 'full', $options = array(), 
$relative_path = null)
@@ -81,7 +81,7 @@
     {
       case 1:
         // popup called from a Rich Text Editor (ex: TinyMCE)
-        return link_to($text, "sfAsset/tinyConfigMedia?id=".$asset->getId(), 
'title='.$asset->getFilename());
+        return link_to($text, 
"@sf_asset_library_tiny_config?id=".$asset->getId(), 
'title='.$asset->getFilename());
       case 2:
         // popup called from a simple form input (or via input_sf_asset_tag)
         return link_to_function($text, 
"setImageField('".$asset->getUrl()."',".$asset->getId().")");
@@ -90,7 +90,7 @@
   else
   {
     // case : sf view (i.e. module sfAsset, view list)
-    return link_to($text, "sfAsset/edit?id=".$asset->getId(), 
'title='.$asset->getFilename());
+    return link_to($text, '@sf_asset_library_edit?id='.$asset->getId(), 
'title='.$asset->getFilename());
   }
 }
 
@@ -99,14 +99,14 @@
   use_helper('JavascriptBase');
   use_javascript('/sfAssetsLibraryPlugin/js/main', 'last');
 
-  echo 
javascript_tag('sfAssetsLibrary.init(\''.url_for('sfAsset/list?popup=2').'\')');
+  echo 
javascript_tag('sfAssetsLibrary.init(\''.url_for('@sf_asset_library_list?popup=2').'\')');
 }
 
 function init_assets_library_popup()
 {
   use_javascript('/sfAssetsLibraryPlugin/js/main', 'last');
 
-  return 
javascript_tag('sfAssetsLibrary.init(\''.url_for('sfAsset/list').'?popup=2'.'\')');
+  return 
javascript_tag('sfAssetsLibrary.init(\''.url_for('@sf_asset_library_list').'?popup=2'.'\')');
 }
 
 function assets_library_breadcrumb($path, $linkLast = false, $action = '')
@@ -130,7 +130,8 @@
     else
     {
       $current_dir .= $i ? '/' . $dir : $dir;
-      $html .= link_to_asset($dir, 'sfAsset/'.$action.'?dir='.$current_dir) 
.'<span class="crumb">/</span>';
+      // TODO check $action for camelCase
+      $html .= link_to_asset($dir, 
'@sf_asset_library_'.$action.'?dir='.$current_dir) .'<span 
class="crumb">/</span>';
     }
     $i++;
   }
@@ -139,7 +140,7 @@
 
 function input_sf_asset_image_tag($name, $options = array())
 {
-  use_helper('Form', 'I18N');
+  use_helper('I18N');
   use_javascript('/sfAssetsLibraryPlugin/js/main', 'last');
   $options = _convert_options($options);
   $type = 'all';
@@ -172,7 +173,7 @@
         form_name: ".$form_name.",
         field_name: '".$name."',
         type: '".$type."',
-        url: 
'".url_for('sfAsset/list?dir=PLACEHOLDER')."?popup=2'.replace('PLACEHOLDER', 
initialDir),
+        url: 
'".url_for('@sf_asset_library_list?dir=PLACEHOLDER')."?popup=2'.replace('PLACEHOLDER',
 initialDir),
         scrollbars: 'yes'
       });"
   ));

Modified: plugins/sfAssetsLibraryPlugin/branches/garak/lib/sfAssetRouting.php
===================================================================
--- plugins/sfAssetsLibraryPlugin/branches/garak/lib/sfAssetRouting.php 
2010-01-20 09:48:58 UTC (rev 26925)
+++ plugins/sfAssetsLibraryPlugin/branches/garak/lib/sfAssetRouting.php 
2010-01-20 10:11:58 UTC (rev 26926)
@@ -27,5 +27,30 @@
       ),
       array('dir' => '.*?'))
     );
+
+    $actions = array(
+      'list'          => 'list',
+      'search'        => 'search',
+      'edit'          => 'edit',
+      'update'        => 'update',
+      'move_asset'    => 'moveAsset',
+      'rename_asset'  => 'renameAsset',
+      'replace_asset' => 'replaceAsset',
+      'delete_asset'  => 'deleteAsset',
+      'create_folder' => 'createFolder',
+      'move_folder'   => 'moveFolder',
+      'rename_folder' => 'renameFolder',
+      'delete_folder' => 'deleteFolder',
+      'mass_upload'   => 'massUpload',
+      'add_quick'     => 'addQuick',
+      'tiny_config'   => 'tinyConfigMedia',
+    );
+
+    foreach ($actions as $route => $action)
+    {
+      $r->prependRoute('sf_asset_library_' . $route, new sfRoute('/sfAsset/' . 
$action, array(
+        'module' => 'sfAsset', 'action' => $action,
+      )));
+    }
   }
 }

Modified: 
plugins/sfAssetsLibraryPlugin/branches/garak/lib/sfAssetsLibraryTools.class.php
===================================================================
--- 
plugins/sfAssetsLibraryPlugin/branches/garak/lib/sfAssetsLibraryTools.class.php 
    2010-01-20 09:48:58 UTC (rev 26925)
+++ 
plugins/sfAssetsLibraryPlugin/branches/garak/lib/sfAssetsLibraryTools.class.php 
    2010-01-20 10:11:58 UTC (rev 26926)
@@ -1,22 +1,23 @@
 <?php
 /*
  * This file is part of the sfAssetsLibrary package.
- * 
+ *
  * (c) 2007 William Garcia <[email protected]>
- * 
+ *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
  */
 
 /**
  * sfAssetsLibraryToolkit toolkit class
- * 
+ *
  * @author William Garcia
  */
 class sfAssetsLibraryTools
 {
- 
+
   /**
+   * @param  string $txt
    * @return string
    */
   public static function dot2slash($txt)
@@ -24,6 +25,10 @@
     return preg_replace('#[\+\s]+#', '/', $txt);
   }
 
+  /**
+   * @param  string  $filepath
+   * @return string
+   */
   public static function getType($filepath)
   {
     $suffix = substr($filepath, strrpos($filepath, '.') - strlen($filepath) + 
1);
@@ -44,22 +49,39 @@
       return $suffix;
     }
   }
-  
+
+  /**
+   * @param  string  $ext
+   * @return boolean
+   */
   public static function isImage($ext)
   {
     return in_array(strtolower($ext), array('png', 'jpg', 'jpeg', 'gif'));
   }
-  
+
+  /**
+   * @param  string  $ext
+   * @return boolean
+   */
   public static function isText($ext)
   {
     return in_array(strtolower($ext), array('txt', 'php', 'markdown'));
   }
 
+  /**
+   * @param  string  $ext
+   * @return boolean
+   */
   public static function isArchive($ext)
   {
     return in_array(strtolower($ext), array('zip', 'gz', 'tgz', 'rar'));
   }
-  
+
+  /**
+   * @param  string $dir
+   * @param  string $filename
+   * @return array
+   */
   public static function getInfo($dir, $filename)
   {
     $info = array();
@@ -90,16 +112,25 @@
 
     return $info;
   }
-  
+
+  /**
+   * @param  string  $file
+   * @return string
+   */
   public static function sanitizeName($file)
   {
     return preg_replace('/[^a-z0-9_\.-]/i', '_', $file);
   }
-  
+
+  /**
+   * @param  string  $dirName
+   * @param  string  $parentDirName
+   * @return boolean
+   */
   public static function mkdir($dirName, $parentDirName)
   {
     $dirName = rtrim($dirName, '/');
-    
+
     if (!is_dir(self::getMediaDir(true) . $parentDirName))
     {
       list($parent, $name) = self::splitPath($parentDirName);
@@ -112,7 +143,7 @@
         }
       }
     }
-    
+
     if (!$dirName)
     {
       throw new sfException('Trying to make a folder with no name');
@@ -142,94 +173,111 @@
     return $mkdir_success;
   }
 
-  public static function deleteTree($root) 
+  /**
+   * @param  string  $root
+   * @return boolean
+   */
+  public static function deleteTree($root)
   {
-    if (!is_dir($root)) 
+    if (!is_dir($root))
     {
       return false;
     }
-    foreach(glob($root.'/*', GLOB_ONLYDIR) as $dir) 
+    foreach(glob($root.'/*', GLOB_ONLYDIR) as $dir)
     {
-      if (!is_link($dir)) 
+      if (!is_link($dir))
       {
         self::deleteTree($dir);
       }
     }
-    
+
     return rmdir($root);
   }
 
-  public static function createAssetUrl($path, $filename, $thumbnail_type = 
'full', $file_system = true)
+  /**
+   * @param  string $path
+   * @param  string $filename
+   * @param  string $thumbnailType
+   * @param  string $fileSystem
+   * @return string
+   */
+  public static function createAssetUrl($path, $filename, $thumbnailType = 
'full', $fileSystem = true)
   {
-    if ($thumbnail_type == 'full')
+    if ($thumbnailType == 'full')
     {
-      return self::getMediaDir($file_system) . $path . DIRECTORY_SEPARATOR . 
$filename;    
+      return self::getMediaDir($fileSystem) . $path . DIRECTORY_SEPARATOR . 
$filename;
     }
     else
     {
-      return self::getMediaDir($file_system) . self::getThumbnailDir($path) . 
$thumbnail_type . '_' . $filename;
+      return self::getMediaDir($fileSystem) . self::getThumbnailDir($path) . 
$thumbnailType . '_' . $filename;
     }
   }
-  
+
   /**
    * Retrieves a sfMedia object from a relative URL like
    *    /medias/foo/bar.jpg
    * i.e. the kind of URL returned by getAssetUrl($sf_media, 'full', false)
+   * @param  string  $url
+   * @return sfMedia
    */
   public static function getAssetFromUrl($url)
-  { 
-    
+  {
+
     $url = str_replace(sfConfig::get('app_sfAssetsLibrary_upload_dir', 
'media'), '', $url);
     $url = rtrim($url, '/');
     $parts = explode('/', $url);
     $filename = array_pop($parts);
     $relPath = '/' . implode('/', $parts);
-    
+
     $c = new Criteria();
     $c->add(sfMediaPeer::FILENAME, $filename);
     $c->add(sfMediaPeer::REL_PATH, $relPath ?  $relPath : null);
-    
+
     return sfMediaPeer::doSelectOne($c);
   }
-  
-  public static function getMediaDir($file_system = false)
+
+  /**
+   * @param  boolean $fileSystem
+   * @return string
+   */
+  public static function getMediaDir($fileSystem = false)
   {
     $upload_dir = rtrim(sfConfig::get('app_sfAssetsLibrary_upload_dir', 
'media'), '/').'/';
-    if ($file_system)
-    {
-      return sfConfig::get('sf_web_dir') . DIRECTORY_SEPARATOR;
-    }
-    else
-    {
-      return '/';
-    }
+
+    return $fileSystem ? sfConfig::get('sf_web_dir') . DIRECTORY_SEPARATOR : 
'/';
   }
 
   /**
-   * Gives thumbnails folder for a folder 
+   * Gives thumbnails folder for a folder
    *
-   * @param string $path
+   * @param  string $path
    * @return string
    */
   public static function getThumbnailDir($path)
   {
     $thumb_dir = $path . '/' . 
sfConfig::get('app_sfAssetsLibrary_thumbnail_dir', 'thumbnail');
-    
+
     return rtrim($thumb_dir, '/').'/';
   }
-  
-  public static function getThumbnailPath($path, $filename, $thumbnail_type = 
'full')
+
+  /**
+   * @param  string $path
+   * @param  string $filename
+   * @param  string $thumbnailType
+   * @return string
+   */
+  public static function getThumbnailPath($path, $filename, $thumbnailType = 
'full')
   {
-    if ($thumbnail_type == 'full')
+    if ($thumbnailType == 'full')
     {
       return self::getMediaDir(true) . $path . '/' . $filename;
     }
     else
     {
-      return self::getMediaDir(true) . self::getThumbnailDir($path) . 
$thumbnail_type . '_' . $filename;
+      return self::getMediaDir(true) . self::getThumbnailDir($path) . 
$thumbnailType . '_' . $filename;
     }
   }
-  
+
   /**
    * Create the thumbnails for image assets
    * The numbe and size of thumbnails can be configured in the app.yml
@@ -253,17 +301,21 @@
       self::createThumbnail($source, self::getThumbnailPath($folder, 
$filename, $key), $width, $height, $shave);
     }
   }
-  
+
   /**
-   * Resize automatically an image 
-   * Options : shave_all
-   * Recommanded when  "image source HEIGHT" < "image source WIDTH"
+   * Resize automatically an image
+   * @param  string  $source
+   * @param  string  $dest
+   * @param  integer $width
+   * @param  integer $height
+   * @param  boolean $shave_all Recommanded when  "image source HEIGHT" < 
"image source WIDTH"
+   * @return boolean
    */
   public static function createThumbnail($source, $dest, $width, $height, 
$shave_all = false)
   {
-    if (class_exists('sfThumbnail') and file_exists($source))
+    if (class_exists('sfThumbnail') && file_exists($source))
     {
-      if(sfConfig::get('app_sfAssetsLibrary_use_ImageMagick', false))
+      if (sfConfig::get('app_sfAssetsLibrary_use_ImageMagick', false))
       {
         $adapter = 'sfImageMagickAdapter';
         $mime = 'image/jpg';
@@ -273,7 +325,7 @@
         $adapter = 'sfGDAdapter';
         $mime = 'image/jpeg';
       }
-      if($shave_all)
+      if ($shave_all)
       {
         $thumbnail  = new sfThumbnail($width, $height, false, true, 85, 
$adapter, array('method' => 'shave_all'));
         $thumbnail->loadFile($source);
@@ -292,34 +344,43 @@
     }
     return false;
   }
-  
+
+  /**
+   * @param  string $path
+   * @return string
+   */
   public static function getParent($path)
   {
     $dirs = explode('/', $path);
     array_pop($dirs);
-    
+
     return join('/', $dirs);
   }
 
   /**
    * Splits a path into a basepath and a name
    *
-   * @param string $path
-   * @return array $relative_path $name
+   * @param  string $path
+   * @param  string $separator
+   * @return array             relative path and name
    */
   public static function splitPath($path, $separator = DIRECTORY_SEPARATOR)
   {
     $path = rtrim($path, $separator);
     $dirs = preg_split('/' . preg_quote($separator, '/') . '+/', $path);
     $name = array_pop($dirs);
-    $relative_path =  implode($separator, $dirs);
-    
-    return array($relative_path, $name);
+    $relativePath =  implode($separator, $dirs);
+
+    return array($relativePath, $name);
   }
-  
+
+  /**
+   * @param string $message
+   * @param string $color   "green", "red", or "yellow"
+   */
   public static function log($message, $color = '')
   {
-    switch($color)
+    switch ($color)
     {
       case 'green':
         $message = "\033[32m".$message."\033[0m\n";
@@ -335,5 +396,5 @@
     }
     fwrite(STDOUT, $message);
   }
-  
+
 }
\ No newline at end of file

Modified: 
plugins/sfAssetsLibraryPlugin/branches/garak/lib/widget/sfWidgetFormAssetInput.class.php
===================================================================
--- 
plugins/sfAssetsLibraryPlugin/branches/garak/lib/widget/sfWidgetFormAssetInput.class.php
    2010-01-20 09:48:58 UTC (rev 26925)
+++ 
plugins/sfAssetsLibraryPlugin/branches/garak/lib/widget/sfWidgetFormAssetInput.class.php
    2010-01-20 10:11:58 UTC (rev 26926)
@@ -51,7 +51,7 @@
             form_name: ".$this->getOption('form_name').",
             field_name: '".$name."',
             type: '".$this->getOption('asset_type')."',
-            url: 
'".url_for('sfAsset/list?dir=PLACEHOLDER')."?popup=2'.replace('PLACEHOLDER', 
initialDir),
+            url: 
'".url_for('@sf_asset_library_list?dir=PLACEHOLDER')."?popup=2'.replace('PLACEHOLDER',
 initialDir),
             scrollbars: 'yes'
           });"
       ));

Modified: 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/lib/BasesfAssetActions.class.php
===================================================================
--- 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/lib/BasesfAssetActions.class.php
       2010-01-20 09:48:58 UTC (rev 26925)
+++ 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/lib/BasesfAssetActions.class.php
       2010-01-20 10:11:58 UTC (rev 26926)
@@ -5,7 +5,7 @@
   public function executeIndex()
   {
     $this->getUser()->getAttributeHolder()->remove('popup', null, 
'sf_admin/sf_asset/navigation');
-    $this->redirect('sfAsset/list');
+    $this->redirect('@sf_asset_library_list');
   }
 
   public function executeList(sfWebRequest $request)
@@ -24,7 +24,7 @@
           $this->getUser()->setAttribute('popup', $popup, 
'sf_admin/sf_asset/navigation');
         }
         $this->getUser()->setFlash('sfAsset_folder_not_found', true);
-        $this->redirect('sfAsset/list');
+        $this->redirect('@sf_asset_library_list');
       }
     }
     $this->filterform = new sfAssetFormFilter();
@@ -82,7 +82,6 @@
     $this->form->bind($request->getParameter($this->form->getName()));
     $this->filterform = new sfAssetFormFilter();
 
-
     // We keep the search params in the session for easier pagination
     if ($request->hasParameter('search_params'))
     {
@@ -106,6 +105,10 @@
     {
       $c = $this->processSearch($this->form->getValues(), $request);
     }
+    else
+    {
+      $c = new Criteria();
+    }
 
     $pager = new sfPropelPager('sfAsset', 
sfConfig::get('app_sfAssetsLibrary_search_pager_size', 20));
     $pager->setCriteria($c);
@@ -221,7 +224,7 @@
       $folder->setName($this->form->getValue('name'));
       $folder->insertAsLastChildOf($parentFolder);
       $folder->save();
-      $this->redirectToPath('sfAsset/list?dir='.$folder->getRelativePath());
+      
$this->redirectToPath('@sf_asset_library_list?dir='.$folder->getRelativePath());
     }
   }
 
@@ -247,7 +250,7 @@
         $this->getUser()->setFlash('warning_params', $e->getMessageParams());
       }
 
-      return $this->redirectToPath('sfAsset/list?dir=' . 
$folder->getRelativePath());
+      return $this->redirectToPath('@sf_asset_library_list?dir=' . 
$folder->getRelativePath());
     }
   }
 
@@ -272,7 +275,7 @@
         $this->getUser()->setFlash('warning_params', $e->getMessageParams());
       }
 
-      return $this->redirectToPath('sfAsset/list?dir=' . 
$folder->getRelativePath());
+      return $this->redirectToPath('@sf_asset_library_list?dir=' . 
$folder->getRelativePath());
     }
   }
 
@@ -292,7 +295,7 @@
       $this->getUser()->setFlash('warning_params', $e->getMessageParams());
     }
 
-    return $this->redirectToPath('sfAsset/list?dir=' . 
$folder->getParentPath());
+    return $this->redirectToPath('@sf_asset_library_list?dir=' . 
$folder->getParentPath());
   }
 
   public function executeAddQuick(sfWebRequest $request)
@@ -330,21 +333,21 @@
     {
       $this->getUser()->setFlash('warning_message', $e->getMessage());
       $this->getUser()->setFlash('warning_params', $e->getMessageParams());
-      $this->redirectToPath('sfAsset/list?dir='.$folder->getRelativePath());
+      
$this->redirectToPath('@sf_asset_library_list?dir='.$folder->getRelativePath());
     }
 
     if($this->getUser()->hasAttribute('popup', 'sf_admin/sf_asset/navigation'))
     {
       if($this->getUser()->getAttribute('popup', null, 
'sf_admin/sf_asset/navigation') == 1)
       {
-        $this->redirect('sfAsset/tinyConfigMedia?id='.$asset->getId());
+        $this->redirect('@sf_asset_library_tiny_config?id='.$asset->getId());
       }
       else
       {
-        $this->redirectToPath('sfAsset/list?dir='.$folder->getRelativePath());
+        
$this->redirectToPath('@sf_asset_library_list?dir='.$folder->getRelativePath());
       }
     }
-    $this->redirect('sfAsset/edit?id='.$asset->getId());
+    $this->redirect('@sf_asset_library_edit?id='.$asset->getId());
   }
 
   public function executeMassUpload(sfWebRequest $request)
@@ -387,10 +390,10 @@
         {
           $this->getUser()->setFlash('warning_message', $e->getMessage());
           $this->getUser()->setFlash('warning_params', $e->getMessageParams());
-          
$this->redirectToPath('sfAsset/list?dir='.$folder->getRelativePath());
+          
$this->redirectToPath('@sf_asset_library_list?dir='.$folder->getRelativePath());
         }
         $this->getUser()->setFlash('notice', 'Files successfully uploaded');
-        $this->redirectToPath('sfAsset/list?dir='.$folder->getRelativePath());
+        
$this->redirectToPath('@sf_asset_library_list?dir='.$folder->getRelativePath());
       }
     }
   }
@@ -410,7 +413,7 @@
       return $this->forward('sfAsset', 'edit');
     }
 
-    return $this->redirectToPath('sfAsset/list?dir='.$folderPath);
+    return $this->redirectToPath('@sf_asset_library_list?dir='.$folderPath);
   }
 
   public function executeCreate()
@@ -440,7 +443,7 @@
     if 
($this->form->bindAndSave($request->getParameter($this->form->getName())))
     {
       $this->getUser()->setFlash('notice', 'Your modifications have been 
saved');
-      return $this->redirect('sfAsset/edit?id='.$this->sf_asset->getId());
+      return 
$this->redirect('@sf_asset_library_edit?id='.$this->sf_asset->getId());
     }
     else
     {
@@ -478,12 +481,12 @@
       $this->getUser()->setFlash('warning', 'The asset has not been moved.');
     }
 
-    return $this->redirect('sfAsset/edit?id='.$sf_asset->getId());
+    return $this->redirect('@sf_asset_library_edit?id='.$sf_asset->getId());
   }
 
   public function executeRenameAsset(sfWebRequest $request)
   {
-    $this->forward404Unless($request->getMethod() == sfRequest::POST, 'method 
not allowed');  
+    $this->forward404Unless($request->getMethod() == sfRequest::POST, 'method 
not allowed');
     $sfAsset = $request->getParameter('sf_asset');
     $sf_asset = sfAssetPeer::retrieveByPK($sfAsset['id']);
     $this->forward404Unless($sf_asset, 'asset not found');
@@ -509,7 +512,7 @@
 
     }
 
-    return $this->redirect('sfAsset/edit?id='.$sf_asset->getId());
+    return $this->redirect('@sf_asset_library_edit?id='.$sf_asset->getId());
   }
 
   public function executeReplaceAsset(sfWebRequest $request)
@@ -530,7 +533,7 @@
 
     $this->getUser()->setFlash('notice', 'The file has been replaced');
 
-    return $this->redirect('sfAsset/edit?id='.$sf_asset->getId());
+    return $this->redirect('@sf_asset_library_edit?id='.$sf_asset->getId());
   }
 
   protected function removeLayoutIfPopup(sfWebRequest $request)

Modified: 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_asset.php
===================================================================
--- 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_asset.php
   2010-01-20 09:48:58 UTC (rev 26925)
+++ 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_asset.php
   2010-01-20 10:11:58 UTC (rev 26926)
@@ -9,7 +9,7 @@
     <div class="details">
       <?php echo $sf_asset->getFilesize() ?> Ko
       <?php if (!$sf_user->hasAttribute('popup', 
'sf_admin/sf_asset/navigation')): ?>
-        <?php echo 
link_to(image_tag('/sfAssetsLibraryPlugin/images/delete.png', 'alt=delete 
class=deleteImage align=top'), 'sfAsset/deleteAsset?id='.$sf_asset->getId(), 
array('title' => __('Delete'), 'confirm' => __('Are you sure?'))); ?>
+        <?php echo 
link_to(image_tag('/sfAssetsLibraryPlugin/images/delete.png', 'alt=delete 
class=deleteImage align=top'), 
'@sf_asset_library_delete_asset?id='.$sf_asset->getId(), array('title' => 
__('Delete'), 'confirm' => __('Are you sure?'))); ?>
       <?php endif; ?>
     </div>
   </div>

Modified: 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_edit_form.php
===================================================================
--- 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_edit_form.php
       2010-01-20 09:48:58 UTC (rev 26925)
+++ 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_edit_form.php
       2010-01-20 10:11:58 UTC (rev 26926)
@@ -1,4 +1,4 @@
-<form action="<?php echo url_for('sfAsset/update') ?>" method="post">
+<form action="<?php echo url_for('@sf_asset_library_update') ?>" method="post">
 
 <fieldset id="sf_fieldset_none" class="">
 

Modified: 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_list.php
===================================================================
--- 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_list.php
    2010-01-20 09:48:58 UTC (rev 26925)
+++ 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_list.php
    2010-01-20 10:11:58 UTC (rev 26926)
@@ -6,7 +6,7 @@
 <?php if (!$folder->isRoot()): ?>
   <div class="assetImage">
     <div class="thumbnails">
-      <?php echo link_to_asset(image_tag('/sfAssetsLibraryPlugin/images/up', 
'size=64x64 alt=up title='.__('Parent directory', null, 'sfAsset')), 
'sfAsset/list?dir='. $folder->getParentPath()) ?>
+      <?php echo link_to_asset(image_tag('/sfAssetsLibraryPlugin/images/up', 
'size=64x64 alt=up title='.__('Parent directory', null, 'sfAsset')), 
'@sf_asset_library_list?dir='. $folder->getParentPath()) ?>
     </div>
     <div class="assetComment" id="ajax_dir_0">..</div>
   </div>
@@ -15,7 +15,7 @@
 <?php foreach ($dirs as $dir): ?>
   <div class="assetImage">
     <div class="thumbnails">
-      <?php echo 
link_to_asset(image_tag('/sfAssetsLibraryPlugin/images/folder', 'size=64x64 
alt=folder title='.$dir->getName()), 
'sfAsset/list?dir='.$dir->getRelativePath()) ?>
+      <?php echo 
link_to_asset(image_tag('/sfAssetsLibraryPlugin/images/folder', 'size=64x64 
alt=folder title='.$dir->getName()), 
'@sf_asset_library_list?dir='.$dir->getRelativePath()) ?>
     </div>
     <div class="assetComment"><?php echo auto_wrap_text($dir->getName()) ?>
     </div>

Modified: 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_sidebar_edit.php
===================================================================
--- 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_sidebar_edit.php
    2010-01-20 09:48:58 UTC (rev 26925)
+++ 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_sidebar_edit.php
    2010-01-20 10:11:58 UTC (rev 26926)
@@ -8,7 +8,7 @@
   <p><?php echo __('%weight% Kb', array('%weight%' => 
$sf_asset->getFilesize()), 'sfAsset') ?></p>
   <p><?php echo __('Created on %date%', array('%date%' => 
format_date($sf_asset->getCreatedAt('U'))), 'sfAsset') ?></p>
 
-  <form action="<?php echo url_for('sfAsset/renameAsset') ?>" method="post">
+  <form action="<?php echo url_for('@sf_asset_library_rename_asset') ?>" 
method="post">
   <?php echo $renameform['id'] ?>
   <div class="form-row">
     <label for="new_name">
@@ -23,7 +23,7 @@
   </div>
   </form>
 
-  <form action="<?php echo url_for('sfAsset/moveAsset') ?>" method="post">
+  <form action="<?php echo url_for('@sf_asset_library_move_asset') ?>" 
method="post">
   <?php echo $moveform['id'] ?>
   <div class="form-row">
     <label for="move_folder">
@@ -38,7 +38,7 @@
   </div>
   </form>
 
-  <form action="<?php echo url_for('sfAsset/replaceAsset') ?>" method="post" 
enctype="multipart/form-data">
+  <form action="<?php echo url_for('@sf_asset_library_replace_asset') ?>" 
method="post" enctype="multipart/form-data">
   <?php echo $replaceform['id'] ?>
   <div class="form-row">
     <label for="new_file">
@@ -55,7 +55,7 @@
 
   <div class="form-row">
     <?php echo image_tag('/sfAssetsLibraryPlugin/images/page_delete.png', 
'alt=delete align=top') ?>
-    <?php echo link_to(__('Delete', null, 'sfAsset'), 
'sfAsset/deleteAsset?id='.$sf_asset->getId(), array(
+    <?php echo link_to(__('Delete', null, 'sfAsset'), 
'@sf_asset_library_delete_asset?id='.$sf_asset->getId(), array(
       'post' => true,
       'confirm' => __('Are you sure?', null, 'sfAsset'),
     )) ?>

Modified: 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_sidebar_list.php
===================================================================
--- 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_sidebar_list.php
    2010-01-20 09:48:58 UTC (rev 26925)
+++ 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_sidebar_list.php
    2010-01-20 10:11:58 UTC (rev 26926)
@@ -3,11 +3,11 @@
 <?php if ($folder->isRoot()): ?>
 <div class="form-row">
   <?php echo image_tag('/sfAssetsLibraryPlugin/images/images.png', 'alt=images 
align=top') ?>
-  <?php echo link_to(__('Mass upload', null, 'sfAsset'), 'sfAsset/massUpload') 
?>
+  <?php echo link_to(__('Mass upload', null, 'sfAsset'), 
'@sf_asset_library_mass_upload') ?>
 </div>
 <?php endif ?>
 
-<form action="<?php echo url_for('sfAsset/addQuick') ?>" method="post" 
enctype="multipart/form-data">
+<form action="<?php echo url_for('@sf_asset_library_add_quick') ?>" 
method="post" enctype="multipart/form-data">
 <div class="form-row">
   <label for="new_file">
     <?php echo image_tag('/sfAssetsLibraryPlugin/images/image_add.png', 
'alt=add align=top') ?>
@@ -21,7 +21,7 @@
 <?php echo $fileform->renderHiddenFields() ?>
 </form>
 
-<form action="<?php echo url_for('sfAsset/createFolder') ?>" method="post">
+<form action="<?php echo url_for('@sf_asset_library_create_folder') ?>" 
method="post">
 <div class="form-row">
   <label for="new_directory">
     <?php echo image_tag('/sfAssetsLibraryPlugin/images/folder_add.png', 
'alt=add align=top') ?>
@@ -36,7 +36,7 @@
 </form>
 
 <?php if (!$folder->isRoot()): ?>
-<form action="<?php echo url_for('sfAsset/renameFolder') ?>" method="post">
+<form action="<?php echo url_for('@sf_asset_library_rename_folder') ?>" 
method="post">
 <?php echo $renameform['id'] ?>
 <div class="form-row">
   <label for="new_folder">
@@ -51,7 +51,7 @@
 <?php echo $renameform->renderHiddenFields() ?>
 </form>
 
-<form action="<?php echo url_for('sfAsset/moveFolder') ?>" method="post">
+<form action="<?php echo url_for('@sf_asset_library_move_folder') ?>" 
method="post">
 <?php echo $moveform['id'] ?>
 <div class="form-row">
   <label for="new_folder">
@@ -68,7 +68,7 @@
 
 <div class="form-row">
   <?php echo image_tag('/sfAssetsLibraryPlugin/images/folder_delete.png', 
'alt=delete align=top') ?>
-  <?php echo link_to(__('Delete folder', null, 'sfAsset'), 
'sfAsset/deleteFolder?id='.$folder->getId(), array(
+  <?php echo link_to(__('Delete folder', null, 'sfAsset'), 
'@sf_asset_library_delete_folder?id='.$folder->getId(), array(
     'post' => true,
     'confirm' => __('Are you sure?', null, 'sfAsset'),
   )) ?>

Modified: 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_sidebar_search.php
===================================================================
--- 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_sidebar_search.php
  2010-01-20 09:48:58 UTC (rev 26925)
+++ 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_sidebar_search.php
  2010-01-20 10:11:58 UTC (rev 26926)
@@ -7,7 +7,7 @@
   ) ?>
 </div>
 
-<form action="<?php echo url_for('sfAsset/search') ?>" method="get" 
id="sf_asset_search" style="display:none">
+<form action="<?php echo url_for('@sf_asset_library_search') ?>" method="get" 
id="sf_asset_search" style="display:none">
 
   <?php echo $form ?>
 

Modified: 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_sidebar_sort.php
===================================================================
--- 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_sidebar_sort.php
    2010-01-20 09:48:58 UTC (rev 26925)
+++ 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/_sidebar_sort.php
    2010-01-20 10:11:58 UTC (rev 26926)
@@ -5,10 +5,10 @@
     <?php echo image_tag('/sfAssetsLibraryPlugin/images/text_linespacing.png', 
'alt=sort align=top') ?>
     <?php if ($sort == 'name'): ?>
       <?php echo __('Sorted by name', null, 'sfAsset') ?>
-      <?php echo link_to_asset(__('Sort by date', null, 'sfAsset'), 
'sfAsset/'.$sf_params->get('action').'?dir='.$sf_params->get('dir'), 
array('query_string' => 'sort=date')) ?>
+      <?php /* TODO check action calmelCase */ echo link_to_asset(__('Sort by 
date', null, 'sfAsset'), 
'@sf_asset_library_'.$sf_params->get('action').'?dir='.$sf_params->get('dir'), 
array('query_string' => 'sort=date')) ?>
     <?php else: ?>
       <?php echo __('Sorted by date', null, 'sfAsset') ?>
-      <?php echo link_to_asset(__('Sort by name', null, 'sfAsset'), 
'sfAsset/'.$sf_params->get('action').'?dir='.$sf_params->get('dir'), 
array('query_string' => 'sort=name')) ?>
+      <?php echo link_to_asset(__('Sort by name', null, 'sfAsset'), 
'@sf_asset_library_'.$sf_params->get('action').'?dir='.$sf_params->get('dir'), 
array('query_string' => 'sort=name')) ?>
     <?php endif ?>
   </label>
 </div>
\ No newline at end of file

Modified: 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/createFolderSuccess.php
===================================================================
--- 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/createFolderSuccess.php
      2010-01-20 09:48:58 UTC (rev 26925)
+++ 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/createFolderSuccess.php
      2010-01-20 10:11:58 UTC (rev 26926)
@@ -4,7 +4,7 @@
 
 <?php include_partial('sfAsset/create_folder_header') ?>
 
-<form action="<?php echo url_for('sfAsset/createFolder') ?>" method="post">
+<form action="<?php echo url_for('@sf_asset_library_create_folder') ?>" 
method="post">
   <fieldset>
     <?php echo $form ?>
   </fieldset>

Modified: 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/massUploadSuccess.php
===================================================================
--- 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/massUploadSuccess.php
        2010-01-20 09:48:58 UTC (rev 26925)
+++ 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/massUploadSuccess.php
        2010-01-20 10:11:58 UTC (rev 26926)
@@ -4,7 +4,7 @@
 
 <?php include_partial('sfAsset/create_folder_header') ?>
 
-<form action="<?php echo url_for('sfAsset/massUpload') ?>" method="post" 
enctype="multipart/form-data">
+<form action="<?php echo url_for('@sf_asset_library_mass_upload') ?>" 
method="post" enctype="multipart/form-data">
 
   <?php echo $form->renderGlobalErrors() ?>
 

Modified: 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/moveFolderSuccess.php
===================================================================
--- 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/moveFolderSuccess.php
        2010-01-20 09:48:58 UTC (rev 26925)
+++ 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/moveFolderSuccess.php
        2010-01-20 10:11:58 UTC (rev 26926)
@@ -3,7 +3,7 @@
 
 <h1><?php echo __('Move folder', null, 'sfAsset') ?></h1>
 
-<form action="<?php echo url_for('sfAsset/moveFolder') ?>" method="post">
+<form action="<?php echo url_for('@sf_asset_library_move_folder') ?>" 
method="post">
 
   <fieldset id="sf_fieldset_none">
 

Modified: 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/renameFolderSuccess.php
===================================================================
--- 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/renameFolderSuccess.php
      2010-01-20 09:48:58 UTC (rev 26925)
+++ 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/renameFolderSuccess.php
      2010-01-20 10:11:58 UTC (rev 26926)
@@ -3,7 +3,7 @@
 
 <h1><?php echo __('Rename folder', null, 'sfAsset') ?></h1>
 
-<form action="<?php echo url_for('sfAsset/renameFolder') ?>" method="post">
+<form action="<?php echo url_for('@sf_asset_library_rename_folder') ?>" 
method="post">
 
   <fieldset id="sf_fieldset_none">
 

Modified: 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/searchSuccess.php
===================================================================
--- 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/searchSuccess.php
    2010-01-20 09:48:58 UTC (rev 26925)
+++ 
plugins/sfAssetsLibraryPlugin/branches/garak/modules/sfAsset/templates/searchSuccess.php
    2010-01-20 10:11:58 UTC (rev 26926)
@@ -7,7 +7,7 @@
 <?php endif; ?>
 
 <div id="sf_asset_bar">
-  <p><?php echo link_to(__('Back to the list', null, 'sfAsset'), 
'sfAsset/list') ?></p>
+  <p><?php echo link_to(__('Back to the list', null, 'sfAsset'), 
'@sf_asset_library_list') ?></p>
   <?php include_partial('sfAsset/sidebar_sort') ?>
   <?php include_partial('sfAsset/sidebar_search', array('form' => 
$filterform)) ?>
 </div>
@@ -36,11 +36,11 @@
 <div class="sf_asset_pager" style="clear: both">
 <?php if ($pager->haveToPaginate(ESC_RAW)): ?>
   <?php if ($pager->getPage(ESC_RAW) != 1): ?>
-    <?php echo link_to(__('< Previous page', null, 'sfAsset'), 
'sfAsset/search?page='.$pager->getPreviousPage()) ?>
+    <?php echo link_to(__('< Previous page', null, 'sfAsset'), 
'@sf_asset_library_search?page='.$pager->getPreviousPage()) ?>
   <?php endif; ?>
   <?php echo __('Page %number% on %total%', array('%number%' => 
$pager->getPage(), '%total%' => $pager->getLastPage()), 'sfAsset') ?>
   <?php if ($pager->getPage() != $pager->getLastPage()): ?>
-    <?php echo link_to(__('Next page >', null, 'sfAsset'), 
'sfAsset/search?page='.$pager->getNextPage()) ?>
+    <?php echo link_to(__('Next page >', null, 'sfAsset'), 
'@sf_asset_library_search?page='.$pager->getNextPage()) ?>
   <?php endif; ?>
 <?php endif ?>
 </div>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.


Reply via email to