summaryrefslogtreecommitdiffstats
path: root/web/template/pkg_search_results.php
AgeCommit message (Collapse)AuthorFilesLines
2014-07-15Rework permission handlingLukas Fleischer1-8/+2
Add a new function has_credential() that checks whether the currently logged in user is allowed to perform a given action. Moving all permission handling to this central place makes adding new user groups and adjusting permissions much more convenient. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04Handle plurals in translationsLukas Fleischer1-2/+8
Use ngettext() to handle plurals properly. Also, split pagination captions into two strings. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05pkg_search_results.php: Link to account when logged inLukas Fleischer1-0/+4
Replace the maintainer package search links with links to the maintainer's account when browsing the search results as a logged-in user. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05Move package actions to package basesLukas Fleischer1-2/+2
Package actions now operate on package bases instead of packages. Move all actions to the correct locations. This also fixes some issues with comment notifications. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-14pkg_search_results.php: Mark out-of-date packagesLukas Fleischer1-1/+1
Highlight the version number of out-of-date packages on the package search results page using the "flagged" class from archweb. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-14pkg_search_results.php: Move version to a separate columnLukas Fleischer1-1/+3
Synchronize the column layout with archweb. This also allows for easily highlighting the version number of out-of-date packages. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-04pkg_search_results.php: Word-wrap package descriptionLukas Fleischer1-1/+1
Implements FS#31803. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-24Use echo shortcut syntaxLukas Fleischer1-40/+40
Replace all occurrences of "<?php echo" and "<?php print" by "<?=" to reduce noise in templates. Note that as of PHP 5.4.0, "<?=" is always available and no longer requires "short_open_tag" to be set. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-19Sync search result statistics with archwebLukas Fleischer1-5/+8
* Use archweb classes for search result statistics. * Add some space between page numbers. * Display current page number instead of current item range. * Hide page numbers if the result fits into a single page. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-15Use virtual paths for package detailsLukas Fleischer1-1/+1
Extend the routing front/back ends to allow for using "/package/$pkgname/" for individual packages. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-15Use virtual path feature for linksLukas Fleischer1-5/+5
Use virtual paths in links (e.g. link to "/packages/" instead of "/packages.php" etc.) if the virtual path feature is enabled. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-14Merge branch 'maint'Lukas Fleischer1-0/+1
Conflicts: web/html/account.php web/html/addvote.php web/html/pkgsubmit.php web/lib/acctfuncs.inc.php web/template/actions_form.php web/template/pkg_comment_form.php web/template/pkg_comments.php web/template/pkg_details.php web/template/pkg_search_results.php web/template/tu_details.php
2012-07-06pkg_search_results.php: Pull out DB codecanyonknight1-4/+3
* Move DB code from pkg_search_results.php to already existing function in pkgfuncs.inc.php * Centralization of DB code important in a future transition to PDO interface Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06pkg_search_results.php: Overhaul to match archwebcanyonknight1-126/+113
* Change search results table to use CSS from archweb with better alternating line contrast * Change table results header to match archweb * General clean-up of XHTML Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06Remove all traces of "pgboxtitle"Lukas Fleischer1-3/+1
Using a div container to format heading is ridiculous. Use "<h2></h2>" instead. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: canyonknight <canyonknight@gmail.com>
2012-06-24Implement token system to fix CSRF vulnerabilitiescanyonknight1-0/+1
Specially crafted pages can force authenticated users to unknowingly perform actions on the AUR website despite being on an attacker's website. This cross-site request forgery (CSRF) vulnerability applies to all POST data on the AUR. Implement a token system using a double submit cookie. Have a hidden form value on every page containing POST forms. Use the newly added check_token() to verify the token sent via POST matches the "AURSID" cookie value. Random nature of the token limits potential for CSRF. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-24Remove a boatload of inline table stylesDan McGee1-9/+9
Replacing with CSS styles where appropriate. A previously unused CSS style is tweaked in the stylesheet to match most of what was done via non-CSS styling. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-08-11Allow for merging deleted packages into existing onesLukas Fleischer1-0/+2
Merge all comments and votes of deleted packages into another package if the "Merge with" field is used. Duplicate votes (votes from a user who already voted on the target package or voted on more than one of the deleted packages) are discarded. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-11Fix XSS vulnerability in package search results and package details.Lukas Fleischer1-3/+3
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-11Fix broken XHTML.Lukas Fleischer1-5/+5
Fix a lot of invalid XHTML in the templates and actions. There might still be some legacy code left, but this should cover most of it. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-10More PHP Notice undefined fixupsDan McGee1-1/+5
Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-18pkg_search_results: replace blind-table with floating divsPyroPeter1-60/+56
* I tried to remove errors in the sgml-structure e.g.: <div> <?php if (foo) { ?> </div> <?php } ?> * I did not remove or add code (except the <table> and <div> stuff, of cause). I only changed the order of the html/php-tags. * The bottom and top of the script are now properly indented. I did not indent the middle part (table of search results) because that would render the diff completely useless. Signed-off-by: PyroPeter <abi1789@googlemail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-17pkg_search_results: rewrite of paginationPyroPeter1-63/+14
* Most of the PHP-code was moved to pkgfuncs.php to keep the template simple. Signed-off-by: PyroPeter <abi1789@googlemail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-01Drop PackageLocations table and referencesDan McGee1-4/+0
We don't need this anymore since all packages managed here are well...managed here. Rip out all of the places we were using this field, many of which depended on the magic value '2' anyway. On the display side of things, we had a column that was always showing 'unsupported' that is now gone, and you can no longer sort by this column. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-20Implemented "First" and "Last" link for search results (fixes FS#15690).Lukas Fleischer1-0/+2
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2010-11-10Add timestamp when a package is flagged out-of-date (FS#20848).Lukas Fleischer1-1/+1
Signed-off-by: Loui Chang <louipc.ist@gmail.com> - resolve conflict and omit i18n changes.
2010-10-03Fix columns headers visibilityManuel Tortosa1-2/+2
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-07-01Confirmation when deleting packagesLukas Fleischer1-0/+3
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-06-04Add sorting by "Voted" and "Notify" fieldsLukas Fleischer1-2/+6
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-11-24Change legend style and default font size.Loui Chang1-3/+2
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-10-26pkg_search_results: Translate special characters to html entities.Loui Chang1-1/+1
Reported-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-03-03Fix search output if no results are found.Loui Chang1-4/+3
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-18XHTML Validation fixes.Loui Chang1-1/+1
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-06Clean up some markup and styles in page navigation.Loui Chang1-8/+7
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-03Change pagination styleCallan Barrett1-16/+22
Looks different now, next and previous on their own sides and elips for both Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-24Indicate when there are more search result pages than numbered links show.Loui Chang1-24/+25
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-23Fix a few xhtml validation errors.Loui Chang1-2/+2
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-23Add Previous and Next links for search results.Loui Chang1-53/+56
Move things around at the bottom of the search results page. Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-23Remove urlencode('K') in pkg_search_results.Loui Chang1-4/+0
The urlencoded string should only be used for href, but it was being applied and used in printed output, like the keywords textbox. This fixes a problem that was reported in FS#12791 - Faster navigation withing package search listing by page numbers Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-22Only print links for up to five previous and next search results pages.Loui Chang1-2/+12
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-19Remove Less and More links from search results page.Loui Chang1-24/+30
Don't show extra search results link if there is only one page of results. Fix indenting and coding style. Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-19Change: Switching "Legend" and number of results on search pageGergely Imreh1-3/+3
This is to present things in a bit more logical manner with the search results page navigation. Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-19Add: page numbering of AUR search resultsGergely Imreh1-2/+14
On the search results page the number of pages is displayed and functions as a link, for faster navigation (not just the usual "Less/More" buttons. Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-04Store account type in local var when possibleDan McGee1-1/+2
No need to call this function way too often, especially when on the package list page where it could be called up to once per row. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-29Make search page use mkurl function, change variables aroundCallan Barrett1-12/+12
Changed all the normal variables to their $_GET counterparts so everything is destructively changing the original variables, there should be no issue with this. If there I guess we need to consider making mkurl use a custom array of variables rather than $_GET Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-22Don't require login to see out of date packages from package search.Loui Chang1-6/+9
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-22Encode search string for use in anchor tags.Loui Chang1-0/+4
Sorting, and viewing more results resets the search if you search for '#' in 1.5.3. This should fix that bug. Signed-off-by: Loui Chang <louipc.ist@gmail.com> Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-12-21Move package search results to a templateCallan Barrett1-0/+142
Logic is separated from html as much as possible, all html in a template Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Loui Chang <louipc.ist@gmail.com>