]> projects.mako.cc - scuttle/blobdiff - search.inc.php
added jQuery UI autocomplete to the tags field when editing a bookmark
[scuttle] / search.inc.php
index 1c2cbc33f2e84fd98a5a38b3578c750a9eb8e5c6..9feaf5cfe8c90386de3e3c5b556a91eb5d729076 100644 (file)
@@ -2,23 +2,21 @@
     <table>
     <tr>
         <?php
-        $logged_on = false;
+        $logged_on = FALSE;
         if ($userservice->isLoggedOn()) {
-            $currentUser = $userservice->getCurrentUser();
-            $currentUsername = $currentUser[$userservice->getFieldName('username')];
-            $logged_on = true;
+          $currentUser = $userservice->getCurrentUser();
+          $currentUsername = $currentUser[$userservice->getFieldName('username')];
+          $logged_on = TRUE;
         }
         if ($logged_on || isset($user)) {
         ?>
         <td><?php echo T_('Search' /* Search ... for */); ?></td>
         <td>
             <select name="range">
-                <?php
-                if (!in_array($range, array($currentUsername, 'all', 'watchlist'))) {
-                ?>
+                <?php if (!in_array($range, array($currentUsername, 'all', 'watchlist')) && $user != $currentUsername): ?>
                 <option value="<?php echo $user ?>"<?php echo $selectUser; ?>><?php echo T_("this user's bookmarks"); ?></option>
                 <?php
-                }
+                endif;
                 if ($logged_on) {
                 ?>
                 <option value="<?php echo $currentUsername; ?>"<?php echo $selectMy; ?>><?php echo T_('my bookmarks'); ?></option>

Benjamin Mako Hill || Want to submit a patch?