Author: Jonathan.Wage
Date: 2010-01-14 01:04:00 +0100 (Thu, 14 Jan 2010)
New Revision: 26598
Modified:
plugins/sfSympalPlugin/trunk/lib/util/sfSympalToolkit.class.php
Log:
[1.4][sfSympalPlugin][1.0] Moving content type routes to top
Modified: plugins/sfSympalPlugin/trunk/lib/util/sfSympalToolkit.class.php
===================================================================
--- plugins/sfSympalPlugin/trunk/lib/util/sfSympalToolkit.class.php
2010-01-13 23:33:05 UTC (rev 26597)
+++ plugins/sfSympalPlugin/trunk/lib/util/sfSympalToolkit.class.php
2010-01-14 00:04:00 UTC (rev 26598)
@@ -167,6 +167,25 @@
sf_format: (%s)
';
+ $contentTypes = Doctrine::getTable('sfSympalContentType')
+ ->createQuery('t')
+ ->execute();
+
+ foreach ($contentTypes as $contentType)
+ {
+ $routes['content_type_'.$contentType->getId()] =
sprintf($routeTemplate,
+ substr($contentType->getRouteName(), 1),
+ $contentType->getRoutePath(),
+ $contentType->getModuleToRenderWith(),
+ $contentType->getActionToRenderWith(),
+ $contentType->name,
+ $contentType->id,
+ null,
+ implode('|', sfSympalConfig::get('language_codes')),
+ implode('|', sfSympalConfig::get('content_formats'))
+ );
+ }
+
$siteSlug = sfConfig::get('app_sympal_config_site_slug',
sfConfig::get('sf_app'));
$contents = Doctrine::getTable('sfSympalContent')
@@ -217,25 +236,6 @@
);
}
- $contentTypes = Doctrine::getTable('sfSympalContentType')
- ->createQuery('t')
- ->execute();
-
- foreach ($contentTypes as $contentType)
- {
- $routes['content_type_'.$contentType->getId()] =
sprintf($routeTemplate,
- substr($contentType->getRouteName(), 1),
- $contentType->getRoutePath(),
- $contentType->getModuleToRenderWith(),
- $contentType->getActionToRenderWith(),
- $contentType->name,
- $contentType->id,
- null,
- implode('|', sfSympalConfig::get('language_codes')),
- implode('|', sfSympalConfig::get('content_formats'))
- );
- }
-
$routes = implode("\n", $routes);
file_put_contents($cachePath, $routes);
return $routes;
--
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.