diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-25 15:57:29 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-25 15:57:29 +0000 |
commit | 15b91c7e661d928d8b125ec9cfbda1702319c8b4 (patch) | |
tree | 092d474c05e414bb04a8c428b8ff6cb9ccab765d /search.inc.php | |
parent | 9aafe7551eb5a73739709e72465031db7a1531b4 (diff) | |
download | semanticscuttle-15b91c7e661d928d8b125ec9cfbda1702319c8b4.tar.gz semanticscuttle-15b91c7e661d928d8b125ec9cfbda1702319c8b4.tar.bz2 |
Major refactoring: transform user into object, define parameters used into each file, ...
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@173 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'search.inc.php')
-rw-r--r-- | search.inc.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/search.inc.php b/search.inc.php index 832a70c..d3ebe4c 100644 --- a/search.inc.php +++ b/search.inc.php @@ -1,5 +1,7 @@ <?php -/* Manage input */ + + +/* Managing all possible inputs */ $select_watchlist = isset($select_watchlist)?$select_watchlist:''; $select_all = isset($select_all)?$select_all:''; ?> @@ -9,13 +11,11 @@ $select_all = isset($select_all)?$select_all:''; <table> <tr> <?php - $logged_on = false; if ($userservice->isLoggedOn()) { - $currentUser = $userservice->getCurrentUser(); - $currentUsername = $currentUser[$userservice->getFieldName('username')]; - $logged_on = true; + $currentUser = $userservice->getCurrentObjectUser(); + $currentUsername = $currentUser->getUsername(); } - if ($logged_on || isset($user)) { + if ($userservice->isLoggedOn() || isset($user)) { ?> <td><?php echo T_('Search' /* Search ... for */); ?></td> <td> @@ -26,7 +26,7 @@ $select_all = isset($select_all)?$select_all:''; <option value="<?php echo $user ?>"<?php //echo $selectUser; ?>><?php echo T_("this user's bookmarks"); ?></option> <?php } - if ($logged_on) { + if ($userservice->isLoggedOn()) { ?> <option value="<?php echo $currentUsername; ?>"<?php //echo $selectMy; ?>><?php echo T_('my bookmarks'); ?></option> <option value="watchlist"<?php echo $select_watchlist; ?>><?php echo T_('my watchlist'); ?></option> |