summaryrefslogtreecommitdiffstats
path: root/web/lib/pkgfuncs.inc
AgeCommit message (Collapse)AuthorFilesLines
2011-02-22Add ability to search for non-out-of-date packages (fixes FS#17896).Lukas Fleischer1-1/+6
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-21Fix typo in "web/lib/pkgfuncs.inc".Wieland Hoffmann1-2/+2
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-17pkg_search_results: rewrite of paginationPyroPeter1-0/+26
* 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-11Add a package name blacklist.Lukas Fleischer1-0/+23
Can be used to blacklist package names for normal users. TUs and developers are not affected. This is especially useful if used together with a cron job that updates the blacklist periodically, e.g. to reject packages which are available in the binary repos (FS#12902). Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-09Minor bugfix in pkg_change_category().Lukas Fleischer1-1/+1
This cleans up some broken MySQL query introduced by commit 57a5cbfd. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-01Drop PackageLocations table and referencesDan McGee1-65/+14
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>
2010-11-21Auto redirect from confirmation screens.Dan Vratil1-0/+86
Finally move comment deletion and category editing into functions and remove pkgedit.php Signed-off-by: Loui Chang <louipc.ist@gmail.com> -Fix indentation -Fix variable naming conflict $id vs $cid
2010-11-10Add timestamp when a package is flagged out-of-date (FS#20848).Lukas Fleischer1-4/+9
Signed-off-by: Loui Chang <louipc.ist@gmail.com> - resolve conflict and omit i18n changes.
2010-07-02Confirmation when deleting packagesLukas Fleischer1-1/+1
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-06-05Add sorting by "Voted" and "Notify" fieldsLukas Fleischer1-6/+20
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-04-15pkg_comments: Only display 10 comments by default.Loui Chang1-4/+25
Add a mechanism to view all comments. Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-04-15add search only by nameAndrea Scarpino1-2/+8
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-03-30remove empty To field (FS#17584)Andrea Scarpino1-2/+2
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-03-16Turn on package notification for adopted packagesAndrea Scarpino1-0/+1
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-03-11add link to account profile in out-of-date notificationAndrea Scarpino1-1/+1
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-06-18Specify explicit joins for package searchDan McGee1-6/+6
Refactor the query to use explicit LEFT JOINs, which appears to be handled by MySQL in a saner fashion than the previous implicit join syntax. This is part two in a slight fixup for observed slow queries in the production environment. With the new indexes and this fixup, a particular iteration of this query will examine only 13346 rows instead of 272060. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-04-13Don't hit the database twice per comment on packageDan McGee1-3/+15
It's performance improvement day today. For non-superusers, we were hitting the database twice per comment on a package- once to get the UID, and once to check the owner of the comment. The best part is we already knew the owner of the comment, and we only need to get our own UID once. For viewing a package like yaourt, this cuts a single pageview from over 700 queries to around 18, which is still not great but a pretty big improvement. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-03-03Fix search output if no results are found.Loui Chang1-1/+1
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-03-03Go to details page when a search returns one result.Loui Chang1-3/+9
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-03-03pkgfuncs.inc: Fix indentation.Loui Chang1-140/+146
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-03-03Update cleanup script to remove non-unsupported files.Loui Chang1-0/+15
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-21Fix the comment poop bug.Loui Chang1-4/+7
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-18Add 'Out of Date' detail in search formAndrea Scarpino1-0/+4
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-25Move package comment form into a new template.Loui Chang1-7/+10
Feature the form on the package details page. Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-24Add package details template (pkg_details.php)Loui Chang1-179/+3
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-24Move actions form into template.Loui Chang1-65/+1
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-19Use new conglomerated translation files.Loui Chang1-1/+0
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-05Move package comments to a template.Loui Chang1-58/+11
Change layout in the process. Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-04Minimize calls to uid_from_sid()Dan McGee1-4/+5
Just like the previous patch for account_from_sid() over-usage. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-04Store account type in local var when possibleDan McGee1-7/+6
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-39/+39
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-21Move package search results to a templateCallan Barrett1-210/+17
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>
2008-12-21Introduce function include_lang for translations.Loui Chang1-1/+1
This includes only the requested language for each page and makes top level language include files obsolete. Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-21Make all web paths relative.Loui Chang1-11/+11
The site no longer needs to be hosted from the root of a domain, or virtual host. Signed-off-by: Loui Chang <louipc.ist@gmail.com> Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-12-21Remove success messages after package functionsCallan Barrett1-7/+7
Just displays message at the top of the page of what happened (errors or not) and goes back to the same page Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-20Change behaviour of package functions to accept normal arraysCallan Barrett1-16/+11
Package functions use a normal array of pkgids now and packages.php has been changed to accomodate for it Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-20Rename 'Un-Vote' and 'Unflag' buttons.Nathan Jones1-2/+2
This is to be consistent with 'UnNotify'. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-11-26Remove remaining instances of do_DetailsLoui Chang1-2/+2
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-11-23Clean up packages.php and document new package functionsCallan Barrett1-0/+48
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-11-13Move package notification into a function.Loui Chang1-6/+66
Also modify the way notification is done. Instead of toggling notification, users can explicitly notify or unnotify. Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-10-30Convert package voting to a functionCallan Barrett1-0/+77
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-10-28Convert package adoption/disowning to a functionCallan Barrett1-0/+58
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-10-17Convert package deletion to a functionCallan Barrett1-0/+73
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-10-15Convert package flagging to a functionCallan Barrett1-1/+73
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-09-28Sort required by list in package details page.Callan Barrett1-0/+1
This closes FS#11420. Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-08-27doesn't show disown package when already disownedAndrea Scarpino1-6/+4
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-06-17Remove all vim mode lines. Add HACKING file.Loui Chang1-1/+0
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-06-07Don't show None on pacckage info pageCallan Barrett1-36/+45
Just cuts out the table of deps/sources if none exist instead of displaying "None" Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-06-05Fix CVS and package linksCallan Barrett1-4/+4
Patch by Andrea Scarpino <bash.lnx@gmail.com> Fixes up the links to the archlinux.org package search and to the CVS viewer Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-06-05Disable user package deletionCallan Barrett1-3/+4
Users can no longer delete packages if they own them, only TUs and devs Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>