Author: jablko
Date: Sun Aug 23 13:32:50 2009
New Revision: 3056

Log:
Skip some intermediate variables

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

Modified: 
trunk/apps/qubit/modules/informationobject/actions/listAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/listAction.class.php     
Sun Aug 23 13:15:32 2009        (r3055)
+++ trunk/apps/qubit/modules/informationobject/actions/listAction.class.php     
Sun Aug 23 13:32:50 2009        (r3056)
@@ -104,15 +104,5 @@
 
     // Get QubitQuery collection of information objects (with pagination, 
fallback and sorting)
     $this->informationObjects = QubitInformationObject::getList($options);
-
-    //determine if user has edit priviliges
-    $this->editCredentials = false;
-    if (SecurityPriviliges::editCredentials($this->getUser(), 
'informationObject'))
-    {
-      $this->editCredentials = true;
-    }
-
-    // determine if system is set to "multi-repository"
-    $this->multiRepository = (sfConfig::get('app_multi_repository') !== '0');
   }
 }

Modified: trunk/apps/qubit/modules/informationobject/templates/listSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/listSuccess.php        
Sun Aug 23 13:15:32 2009        (r3055)
+++ trunk/apps/qubit/modules/informationobject/templates/listSuccess.php        
Sun Aug 23 13:32:50 2009        (r3056)
@@ -3,23 +3,23 @@
 <table class="list">
 <thead>
 <tr>
-  <th><?php if ($sort == 'titleUp'): ?>
+  <th><?php if ('titleUp' == $sf_request->sort): ?>
     <?php echo link_to(__('title'), array('sort' => 'titleDown') + 
$sf_request->getParameterHolder()->getAll()) ?>
     <?php echo image_tag('up.gif', 'style="padding-bottom: 3px;"', 'sort up') 
?>
   <?php else: ?>
     <?php echo link_to(__('title'), array('sort' => 'titleUp') + 
$sf_request->getParameterHolder()->getAll()) ?>
   <?php endif; ?>
 
-  <?php if ($sort == 'titleDown'): ?>
+  <?php if ('titleDown' == $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, 
'informationObject')): ?>
   <span class="th-link"><?php echo link_to(__('add new'), array('module' => 
'informationobject', 'action' => 'create')) ?></span>
   <?php endif; ?>
   </th>
 
-  <?php if($multiRepository): ?>
+  <?php if (sfConfig::get('app_multi_repository')): ?>
     <th>
     <?php if ($sort == 'repositoryUp'): ?>
       <?php echo link_to(__(sfConfig::get('app_ui_label_repository')), 
array('sort' => 'repositoryDown') + 
$sf_request->getParameterHolder()->getAll()) ?>
@@ -46,7 +46,7 @@
       <?php echo link_to(render_title($informationObject), array('module' => 
'informationobject', 'action' => 'show', 'id' => $informationObject->id)) ?>
       <?php echo get_partial('actions', array('informationObject' => 
$informationObject)) ?>
     </td>
-  <?php if($multiRepository): // multi-repository: show related repository ?>
+  <?php if (sfConfig::get('app_multi_repository')): // multi-repository: show 
related repository ?>
     <td>
       <?php if (isset($informationObject->repository)): ?>
         <?php echo render_title($informationObject->repository) ?>

--~--~---------~--~----~------------~-------~--~----~
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