summaryrefslogtreecommitdiffstats
path: root/web/lib/pkgfuncs.inc
AgeCommit message (Collapse)AuthorFilesLines
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-01Confirmation when deleting packagesLukas Fleischer1-1/+1
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-06-04Add 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-29remove empty To field (FS#17584)Andrea Scarpino1-2/+2
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-03-15Turn on package notification for adopted packagesAndrea Scarpino1-0/+1
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-03-10add 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-20Fix 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-23Move 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-20Remove 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-19Rename '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-27Convert 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-16Convert 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-14Convert 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-06Fix 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-06Disable 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>
2008-04-25Move search form to web/template/pkg_search_form.phpLoui Chang1-118/+1
Nothing fancy here, just cut & paste Signed-off-by: Loui Chang <louipc.ist@gmail.com> Signed-off-by: Simo Leone <simo@archlinux.org>
2008-03-27Remove references to AURMaintainerUIDCallan Barrett1-1/+1
This (should) get rid of anything to do with the unused column AURMaintainerUID in the scripts and schema files Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Simo Leone <simo@archlinux.org>
2008-03-23Revamped pkg_search_page()Simo Leone1-542/+492
- Reduced database hits - Improved speed - Improved sanity (slightly) - Fixed searches,buttons,gizmos Signed-off-by: Simo Leone <simo@archlinux.org>
2008-03-23Fixed bug where search resets when browsing orphansLoui Chang1-2/+7
Signed-off-by: Loui Chang <louipc.ist@gmail.com> Signed-off-by: Simo Leone <simo@archlinux.org>
2008-03-23Fixed broken search resultsCallan Barrett1-3/+11
Quick fix for my friggin crazy more and less link patch that was swapping the search results order every click and not remembering how to sort, my bad This could probably use improvement but it means the search actually works now Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Simo Leone <simo@archlinux.org>
2008-02-18Turn more and less buttons into linksCallan Barrett1-16/+12
This is to (at least) fix the more and less buttons which weren't working because of the drop down menu for actions Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>