Commits

Christoffer Niska committed d80c4f3

Improved the rewrite regex.

  • Participants
  • Parent commits df919b2

Comments (0)

Files changed (2)

File ImageModule.php

  * @author Christoffer Niska <ChristofferNiska@gmail.com>
  * @copyright Copyright &copy; Christoffer Niska 2011-
  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
- * @version 1.2.1
+ * @version 1.2.2
  */
 class ImageModule extends CWebModule
 {
 	 */
 	public function getVersion()
 	{
-		return '1.2.1';
+		return '1.2.2';
 	}
 }

File components/ImgInstaller.php

 		// Replace the placeholders in the template file.
 		$htaccess=strtr($htaccess,array(
 			'{baseUrl}'=>Yii::app()->getRequest()->getBaseUrl().'/',
-			'{sourceUrl}'=>'^versions/([^/]+)/.*[^/]+\-([0-9]+)\.(gif|jpg|png)$',
+			'{sourceUrl}'=>'^versions/([^/]+)/.*\-*(\d+)\.(gif|jpg|png)$',
 			'{targetUrl}'=>$targetUrl,
 		));