Author: jablko
Date: Sun Oct 31 20:03:13 2010
New Revision: 8727
Log:
Deny reflexive relationships, fixes issue 1855
Modified:
trunk/apps/qubit/modules/actor/templates/listSuccess.php
trunk/apps/qubit/modules/function/templates/listSuccess.php
trunk/apps/qubit/modules/relation/actions/editComponent.class.php
Modified: trunk/apps/qubit/modules/actor/templates/listSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/actor/templates/listSuccess.php Sun Oct 31
19:56:08 2010 (r8726)
+++ trunk/apps/qubit/modules/actor/templates/listSuccess.php Sun Oct 31
20:03:13 2010 (r8727)
@@ -24,7 +24,7 @@
<?php foreach ($actors as $item): ?>
<tr class="<?php echo 0 == ++$row % 2 ? 'even' : 'odd' ?>">
<td>
- <?php echo link_to(render_title($item), array($item, 'module' =>
'actor')) ?>
+ <?php echo link_to(render_title($item), $item) ?>
</td><td>
<?php echo $item->entityType ?>
</td>
Modified: trunk/apps/qubit/modules/function/templates/listSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/function/templates/listSuccess.php Sun Oct 31
19:56:08 2010 (r8726)
+++ trunk/apps/qubit/modules/function/templates/listSuccess.php Sun Oct 31
20:03:13 2010 (r8727)
@@ -15,7 +15,7 @@
<?php foreach ($pager->getResults() as $item): ?>
<tr>
<td>
- <?php echo
link_to(render_title($item->getAuthorizedFormOfName(array('cultureFallback' =>
true))), array($item, 'module' => 'function')) ?>
+ <?php echo
link_to(render_title($item->getAuthorizedFormOfName(array('cultureFallback' =>
true))), $item) ?>
</td><td>
<?php echo format_date($item->updatedAt, 'f') ?>
</td>
Modified: trunk/apps/qubit/modules/relation/actions/editComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/relation/actions/editComponent.class.php Sun Oct
31 19:56:08 2010 (r8726)
+++ trunk/apps/qubit/modules/relation/actions/editComponent.class.php Sun Oct
31 20:03:13 2010 (r8727)
@@ -58,7 +58,8 @@
break;
case 'resource':
- $this->form->setValidator('resource', new sfValidatorString);
+ $this->form->setValidator('resource', new sfValidatorBlacklist(array(
+ 'forbidden_values' => array($this->context->routing->generate(null,
$this->resource)))));
$this->form->setWidget('resource', new
sfWidgetFormSelect(array('choices' => array())));
break;
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" 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/qubit-commits?hl=en.