ChangeSet ID: 31236 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner(a)winehq.org 2007/07/01 20:07:09 Modified files: include : objectManager.php Log message: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Display login link when processing queues. Display a login link when processing queues and the user isn't logged in, rather than saying that there are no entries. Patch: http://cvs.winehq.org/patch.py?id=31236 Old revision New revision Changes Path 1.34 1.35 +9 -0 appdb/include/objectManager.php Index: appdb/include/objectManager.php diff -u -p appdb/include/objectManager.php:1.34 appdb/include/objectManager.php:1.35 --- appdb/include/objectManager.php:1.34 2 Jul 2007 1: 7: 9 -0000 +++ appdb/include/objectManager.php 2 Jul 2007 1: 7: 9 -0000 @@ -84,6 +84,15 @@ class ObjectManager $this->checkMethods(array("ObjectGetEntries", "ObjectGetHeader", "objectGetTableRow", "objectGetId", "canEdit")); + /* We cannot process a queue if we are not logged in */ + if(!$_SESSION['current']->isLoggedIn()) + { + $sQueueText = $this->bIsRejected ? "rejected" : "queued"; + echo '<div align="center">You need to <a href="'.login_url().'">'; + echo "log in</a> in order to process $sQueueText entries</div>\n"; + return; + } + $oObject = new $this->sClass(); /* Display selectors for items per page and current page, if applicable. The function