[wolfcms] r347 committed - Fix empty slug issue for Home page

0 views
Skip to first unread message

wol...@googlecode.com

unread,
Dec 4, 2010, 9:15:43 AM12/4/10
to wolfcms...@googlegroups.com
Revision: 347
Author: martij...@gmail.com
Date: Sat Dec 4 06:15:29 2010
Log: Fix empty slug issue for Home page
http://code.google.com/p/wolfcms/source/detail?r=347

Modified:
/trunk/wolf/app/controllers/PageController.php

=======================================
--- /trunk/wolf/app/controllers/PageController.php Thu Dec 2 12:03:29 2010
+++ /trunk/wolf/app/controllers/PageController.php Sat Dec 4 06:15:29 2010
@@ -374,7 +374,7 @@
if ($data['slug'] == ADMIN_DIR) {
$errors[] = __('You cannot have a slug named :slug!',
array(':slug' => ADMIN_DIR));
}
- if (!Validate::slug($data['slug'])) {
+ if (!Validate::slug($data['slug']) && (!empty($data['slug'])
&& $id == '1')) {
$errors[] = __('Illegal value for :fieldname field!',
array(':fieldname' => 'slug'));
}
}

Reply all
Reply to author
Forward
0 new messages