Commit graph

28 commits

Author SHA1 Message Date
Justin Kromlinger
537349e124 Add modified packages RSS feed to frontend 2021-06-12 19:14:43 -07:00
Mark Weiman
608c483090 Add user set timezones
Currently, aurweb displays all dates and times in UTC time. This patch
adds a capability for each logged in user to set their preferred
timezone.

Implements FS#48729.

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-20 23:20:40 +01:00
Lukas Fleischer
761952d424 Fix l10n of "more"
Use __() instead of _() to make the string translatable.

Fixes FS#48529.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-03-13 09:14:57 +01:00
Marcel Korpel
1664a24198 Remove 'new' tag from updates table
It was hard to make it consistent with the other new icons from Open
Iconic and it hadn't much use after all.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-01-31 20:12:56 +01:00
Marcel Korpel
73364ad724 Correctly encode ampersand in query string within HTML attribute
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-01-31 20:03:49 +01:00
Lukas Fleischer
9abd44671d Add a "more" link to the recent updates box
Implements FS#46924.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 18:28:06 +01:00
Lukas Fleischer
9c98523494 Replace new package icon
Use a flat icon from the Open Iconic collection to mark new packages.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 10:22:59 +01:00
Lukas Fleischer
a35dc4022a Replace RSS feed icon
Use a flat icon from the Open Iconic collection for the RSS feed.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 10:22:59 +01:00
Marcel Korpel
57250a1641 updates_table.php: Fix identification of new packages
Currently, package creation has to be done separately from first
submission, so ModifiedTS will never be the same as SubmittedTS.
Consider all packages that are submitted within an hour from package
creation as new.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-19 09:49:28 +02:00
Lukas Fleischer
d962d66d63 Add title attribute to links in updates table
As of commit ea25f98 (Avoid overflow in updates table, 2014-05-22), long
package names in the updates statistics are chopped off. Add a title
attribute so that users at least get a tooltip with the full package
name and version.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-05-22 20:47:32 +02:00
Lukas Fleischer
ea25f982dc Avoid overflow in updates table
Fixes FS#40206.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-05-22 16:01:16 +02:00
Lukas Fleischer
6102759b7c Use echo shortcut syntax
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-24 12:23:04 +02:00
Lukas Fleischer
7c004693f7 Wrap long lines in the "Recent Updates" sidebar
* Sync the sidebar layout with archweb, use the "pkg-name" class to wrap
  long package names.

* Move the "New!" logo to a separate column to make sure it isn't
  wrapped to a new line on its own.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-19 01:17:32 +02:00
canyonknight
36abb9efb9 Use the "new" icon from archweb for the recent updates table
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18 00:59:00 +02:00
canyonknight
66fe10df63 Add the new package icon back to the front page
This regression was introduced with d2480e8b9d.
Re-implement the functionality in a cleaner way.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18 00:58:58 +02:00
canyonknight
49073b1e82 Fix broken RSS feed link on front page
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-08-23 22:47:50 +02:00
Lukas Fleischer
03486c3b6f Use virtual paths for package details
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-15 22:48:32 +02:00
Lukas Fleischer
2425f963f8 Use virtual path feature for links
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-15 22:44:51 +02:00
canyonknight
d2480e8b9d Overhaul to stat tables to match archweb
* Move stat tables into widget boxes to match archweb
* Remove old span styles
* Clean-up XHTML formatting
* Minor whitespace fix

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06 11:26:25 +02:00
Lukas Fleischer
4a4f26cda6 Use sane date format strings everywhere
We fixed this for the fields displayed on the package details page in
commit b5fffe9a02cd4fd3b7da66e403f02eea89c8fcad. This should fix the
remaining ones.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: canyonknight <canyonknight@gmail.com>
2012-07-06 11:25:50 +02:00
Lukas Fleischer
6f6904db3f Fix some more XSS vulnerabilities
Escape strings properly using htmlspecialchars(). Seems like we missed
these in former cleanups. Fixes FS#28515.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-02-19 04:48:31 +01:00
Dan McGee
1f252eba64 Always set ModifiedTS including new packages
Set it equal to the SubmittedTS field, which will be our indication the
package is new when we show the logo on the front page of the AUR.

This results in the ability to remove the use of the unindexable
GREATEST() function from the AUR code everywhere we had to use it before
to handle the 0 timestamp case.

Note that there is no race condition here in calling UNIX_TIMESTAMP()
twice- it always returns the time at the beginning of statment
execution:

    mysql> select unix_timestamp(), sleep(2), unix_timestamp();
    +------------------+----------+------------------+
    | unix_timestamp() | sleep(2) | unix_timestamp() |
    +------------------+----------+------------------+
    |       1300851746 |        0 |       1300851746 |
    +------------------+----------+------------------+
    1 row in set (2.00 sec)

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-03 22:59:31 +02:00
Loui Chang
cf49644f4e Change rss2.php references to rss.php
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-09-28 16:23:35 -04:00
Loui Chang
31ce2fc277 xhtml validation fix. 2009-02-09 00:14:51 -05:00
Loui Chang
54aca06d00 Validation fixes.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-24 01:31:04 -05:00
Loui Chang
844de1f25b Replace RSS icon with feed icon.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-14 22:09:26 -05:00
Dan McGee
5d6f465170 Cache all front page stats in APC if available
Use the APC cache to store all of the counts and the recently updated
package list in a cache, which cuts down on the number of database queries
needed. If the data isn't perfectly up to date we will survive.

This version of the patch will also cache the relevant counts for individual
logged-in users and is more careful about checking whether the value
actually exists in the cache by using the status reference to apc_fetch().

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-08 11:48:58 -05:00
Loui Chang
36ee556103 Move code out of index.php
Move database queries to functions and html to templates.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-07-07 11:41:39 -04:00