Author: jablko
Date: Wed Aug 26 14:13:11 2009
New Revision: 3078

Log:
Skip some intermediate variables

Modified:
   trunk/apps/qubit/modules/actor/actions/listAction.class.php
   trunk/apps/qubit/modules/actor/templates/listSuccess.php
   trunk/apps/qubit/modules/repository/actions/listAction.class.php
   trunk/apps/qubit/modules/repository/templates/listSuccess.php

Modified: trunk/apps/qubit/modules/actor/actions/listAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/actor/actions/listAction.class.php Wed Aug 26 
14:04:19 2009        (r3077)
+++ trunk/apps/qubit/modules/actor/actions/listAction.class.php Wed Aug 26 
14:13:11 2009        (r3078)
@@ -86,12 +86,5 @@
 
     // Get results
     $this->actors = QubitActor::getList($options);
-
-    //determine if user has edit priviliges
-    $this->editCredentials = false;
-    if (SecurityPriviliges::editCredentials($this->getUser(), 'actor'))
-    {
-      $this->editCredentials = true;
-    }
   }
 }

Modified: trunk/apps/qubit/modules/actor/templates/listSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/actor/templates/listSuccess.php    Wed Aug 26 
14:04:19 2009        (r3077)
+++ trunk/apps/qubit/modules/actor/templates/listSuccess.php    Wed Aug 26 
14:13:11 2009        (r3078)
@@ -2,26 +2,26 @@
 
 <table class="list"><thead><tr>
   <th>
-    <?php if ($sort == 'nameUp'): ?>
+    <?php if ('nameUp' == $sf_request->sort): ?>
       <?php echo link_to(__('name'), array('sort' => 'nameDown') + 
$sf_request->getParameterHolder()->getAll()) ?>
       <?php echo image_tag('up.gif', array('style' => 'padding-bottom: 3px'), 
'sort up') ?>
     <?php else: ?>
       <?php echo link_to(__('name'), array('sort' => 'nameUp') + 
$sf_request->getParameterHolder()->getAll()) ?>
     <?php endif; ?>
-    <?php if ($sort == 'nameDown'): ?>
+    <?php if ('nameDown' == $sf_request->sort): ?>
       <?php echo image_tag('down.gif', array('style' => 'padding-bottom: 
3px'), 'sort down') ?>
     <?php endif; ?>
-    <?php if ($editCredentials): ?>
+    <?php if (SecurityPriviligest::editCredentials($sf_user, 'actor')): ?>
       <span class="th-link"><?php echo link_to(__('add new'), 'actor/create') 
?></span>
     <?php endif; ?>
   </th><th>
-    <?php if ($sort == 'typeDown'): ?>
+    <?php if ('typeDown' == $sf_request->sort): ?>
       <?php echo link_to(__('type'), array('sort' => 'typeUp') + 
$sf_request->getParameterHolder()->getAll()) ?>
       <?php echo image_tag('down.gif', array('style' => 'padding-bottom: 
3px'), 'sort down') ?>
     <?php else: ?>
       <?php echo link_to(__('type'), array('sort' => 'typeDown') + 
$sf_request->getParameterHolder()->getAll()) ?>
     <?php endif; ?>
-    <?php if ($sort == 'typeUp'): ?>
+    <?php if ('typeUp' == $sf_request->sort): ?>
       <?php echo image_tag('up.gif', array('style' => 'padding-bottom: 3px'), 
'sort up') ?>
     <?php endif; ?>
   </th>
@@ -29,7 +29,7 @@
   <td>
 
     <div>
-      <?php if ($editCredentials): ?>
+      <?php if (SecurityPriviliges::editCredentials($sf_user, 'actor')): ?>
         <?php echo 
link_to(render_title($actor->getAuthorizedFormOfName(array('cultureFallback' => 
true))), 'actor/show?id='.$actor->getId()) ?>
       <?php else: ?>
         <?php echo 
link_to(render_title($actor->getAuthorizedFormOfName(array('cultureFallback' => 
true))), 'actor/show?id='.$actor->getId()) ?>

Modified: trunk/apps/qubit/modules/repository/actions/listAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/repository/actions/listAction.class.php    Wed Aug 
26 14:04:19 2009        (r3077)
+++ trunk/apps/qubit/modules/repository/actions/listAction.class.php    Wed Aug 
26 14:13:11 2009        (r3078)
@@ -56,12 +56,5 @@
 
     // Get repository hitlist
     $this->repositories = QubitRepository::getList($options);
-
-    //determine if user has edit priviliges
-    $this->editCredentials = false;
-    if (SecurityPriviliges::editCredentials($this->getUser(), 'repository'))
-    {
-      $this->editCredentials = true;
-    }
   }
 }

Modified: trunk/apps/qubit/modules/repository/templates/listSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/repository/templates/listSuccess.php       Wed Aug 
26 14:04:19 2009        (r3077)
+++ trunk/apps/qubit/modules/repository/templates/listSuccess.php       Wed Aug 
26 14:13:11 2009        (r3078)
@@ -3,36 +3,36 @@
 <table class="list">
 <thead>
 <tr>
-  <th><?php if ($sort == 'nameUp'): ?>
+  <th><?php if ('nameUp' == $sf_request->sort): ?>
     <?php echo link_to(__('name'), array('sort' => 'nameDown') + 
$sf_request->getParameterHolder()->getAll()) ?>
     <?php echo image_tag('up.gif', 'style="padding-bottom: 3px;"', 'sort up') 
?>
   <?php else: ?>
     <?php echo link_to(__('name'), array('sort' => 'nameUp') + 
$sf_request->getParameterHolder()->getAll()) ?>
   <?php endif; ?>
 
-  <?php if ($sort == 'nameDown'): ?>
+  <?php if ('nameDown' == $sf_request->sort): ?>
     <?php echo image_tag('down.gif', 'style="padding-bottom: 3px;"', 'sort 
down') ?>
   <?php endif; ?>
 
-  <?php if ($editCredentials): ?>
+  <?php if (SecurityPriviliges::editCredentials($sf_user, 'repository')): ?>
   <span class="th-link"><?php echo link_to(__('add new'), 
'repository/create'); ?></span>
   <?php endif; ?>
   </th>
 
-  <th><?php if ($sort == 'typeUp'): ?>
+  <th><?php if ('typeUp' == $sf_request->sort): ?>
     <?php echo link_to(__('type'), array('sort' => 'typeDown') + 
$sf_request->getParameterHolder()->getAll()) ?>
     <?php echo image_tag('up.gif', 'style="padding-bottom: 3px;"', 'sort up') 
?>
   <?php else: ?>
     <?php echo link_to(__('type'), array('sort' => 'typeUp') + 
$sf_request->getParameterHolder()->getAll()) ?>
   <?php endif; ?>
 
-  <?php if ($sort == 'typeDown'): ?>
+  <?php if ('typeDown' == $sf_request->sort): ?>
     <?php echo image_tag('down.gif', 'style="padding-bottom: 3px;"', 'sort 
down') ?>
   <?php endif; ?>
   </th>
 
   <th>
-  <?php if ($sort == 'countryDown'): ?>
+  <?php if ('countryDown' == $sf_request->sort): ?>
     <?php echo __('country') ?>
 
     <!-- hide sort option until it is working...
@@ -46,7 +46,7 @@
     -->
   <?php endif; ?>
 
-  <?php if ($sort == 'countryUp'): ?>
+  <?php if ('countryUp' == $sf_request->sort): ?>
     <!-- hide sort option until it is working...
     <?php echo image_tag('up.gif', 'style="padding-bottom: 3px;"', 'sort up') 
?>
     -->
@@ -60,7 +60,7 @@
 <tr>
   <td>
   <?php $repositoryName = 
$repository->getAuthorizedFormOfName(array('cultureFallback' => true)); ?>
-  <?php if ($editCredentials): ?>
+  <?php if (SecurityPriviliges::editCredentials($sf_user, 'repository')): ?>
     <?php echo link_to(render_title($repositoryName), 
'repository/show?id='.$repository->getId()) ?>
   <?php else: ?>
     <?php echo link_to(render_title($repositoryName), 
'repository/show?id='.$repository->getId()) ?>

--~--~---------~--~----~------------~-------~--~----~
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.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to