summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authoreric <eric>2004-07-11 19:04:32 +0200
committereric <eric>2004-07-11 19:04:32 +0200
commit7b9956f225cd885c861db0cb145b16b3b8441ca7 (patch)
tree5edd915ae3ff7f148ba4d82238fea76d5ae69e13 /web
parentd17e406ac61094a0ad6d433c8e24be9b8b140959 (diff)
downloadaur-7b9956f225cd885c861db0cb145b16b3b8441ca7.tar.gz
aur-7b9956f225cd885c861db0cb145b16b3b8441ca7.tar.xz
cleaned up physical scripts
Diffstat (limited to 'web')
-rw-r--r--web/README.txt30
-rw-r--r--web/html/packages.php (renamed from web/html/pkgsearch.php)0
-rw-r--r--web/html/pkgvote.php16
-rw-r--r--web/lang/vote_po.inc19
-rw-r--r--web/lib/aur.inc16
-rw-r--r--web/lib/pkgfuncs.inc8
6 files changed, 18 insertions, 71 deletions
diff --git a/web/README.txt b/web/README.txt
index 5adbe474..dcebc40e 100644
--- a/web/README.txt
+++ b/web/README.txt
@@ -93,35 +93,21 @@ Scripts:
packages are orphaned (the Users.ID field in the UnsupportedPackages
table is set to Null).
-- html/pkgsearch.php
+- html/packages.php
PHP script to search the package database. It should support
searching by location ("unsupported", "AUR", "extra"), name,
category, maintainer, popularity, etc. It should resemble the
packages.php script on archlinux.org. A checkbox should be
included next to each package to allow users to flag a package
- out of date.
-
-- html/pkgvote.php
- The PHP script that handles voting for packages. It works like
- the search script above to provide a list of packages (maybe by
- location only?) with a checkbox for the user to register their
- 'yes' vote. It should probably only list 50-ish packages per page
- and allow the user to vote a page at a time. Each page contains a
- 'Continue' button to advance to the next list of packages. At the
- final page, a summary is presented with a 'Cast Vote' button. Once
- the vote is cast, the PackageVotes table is first cleared for that
- User and then all new entries are added for the new vote (this will
- be easier than trying to figure out if the vote has changed for a
- particular package).
+ out of date, adopt it, and vote for it (and reverse operations).
- html/pkgmgmnt.php
- The PHP script for managing packages. It provides a list of
- packages under the management of the logged in user (normal or
- TU). The user can edit the package information stored in the
- database such as the description, url, category, and location
- (a TU can move it to/from "unsupported" and the "AUR"). This
- is where TUs can adopt packages that are in the "unsupported"
- area.
+ This script is not accessed directly, but is invoked when a
+ visitor clicks the 'manage' link from the 'packages.php' script.
+ The user can edit the package information stored in the database
+ such as the description, url, category, and location (a TU can move
+ it to/from "unsupported" and the "AUR"). This is where TUs can
+ adopt packages that are in the "unsupported" area.
- html/pkgsubmit.php
This is the PHP script that allows users to upload a new package.
diff --git a/web/html/pkgsearch.php b/web/html/packages.php
index 546ed2b5..546ed2b5 100644
--- a/web/html/pkgsearch.php
+++ b/web/html/packages.php
diff --git a/web/html/pkgvote.php b/web/html/pkgvote.php
deleted file mode 100644
index eed4a357..00000000
--- a/web/html/pkgvote.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?
-include("aur.inc"); # access AUR common functions
-include("vote_po.inc"); # use some form of this for i18n support
-set_lang(); # this sets up the visitor's language
-check_sid(); # see if they're still logged in
-html_header(); # print out the HTML header
-
-
-# Any text you print out to the visitor, use the __() function
-# for i18n support. See 'testpo.php' for more details.
-#
-print __("Under construction...")."<br />\n";
-
-
-html_footer("\$Id$");
-?>
diff --git a/web/lang/vote_po.inc b/web/lang/vote_po.inc
deleted file mode 100644
index 438f50df..00000000
--- a/web/lang/vote_po.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-<?
-# INSTRUCTIONS TO TRANSLATORS
-#
-# This file contains the i18n translations for a subset of the
-# Arch Linux User-community Repository (AUR). This is a PHP
-# script, and as such, you MUST pay great attention to the syntax.
-# If your text contains any double-quotes ("), you MUST escape
-# them with the backslash character (\).
-#
-
-include_once("translator.inc");
-global $_t;
-
-$_t["en"]["Under construction..."] = "Under construction...";
-# $_t["es"]["Under construction..."] = "--> Traducción española aquí. <--";
-# $_t["fr"]["Under construction..."] = "--> Traduction française ici. <--";
-# $_t["de"]["Under construction..."] = "--> Deutsche Übersetzung hier. <--";
-
-?> \ No newline at end of file
diff --git a/web/lib/aur.inc b/web/lib/aur.inc
index 005c5642..7ea1e965 100644
--- a/web/lib/aur.inc
+++ b/web/lib/aur.inc
@@ -62,7 +62,7 @@ function check_sid() {
global $_COOKIE;
global $LOGIN_TIMEOUT;
- if (isset($_COOKIE["AURSID"])) {
+ if ($_COOKIE["AURSID"]) {
$failed = 0;
# the visitor is logged in, try and update the session
#
@@ -290,18 +290,18 @@ function set_lang() {
global $SUPPORTED_LANGS;
$update_cookie = 0;
- if (isset($_REQUEST['setlang'])) {
+ if ($_REQUEST['setlang']) {
# visitor is requesting a language change
#
$LANG = $_REQUEST['setlang'];
$update_cookie = 1;
- } elseif (isset($_COOKIE['AURLANG'])) {
+ } elseif ($_COOKIE['AURLANG']) {
# If a cookie is set, use that
#
$LANG = $_COOKIE['AURLANG'];
- } elseif (isset($_COOKIE["AURSID"])) {
+ } elseif ($_COOKIE["AURSID"]) {
$dbh = db_connect();
$q = "SELECT LangPreference FROM Users, Sessions ";
$q.= "WHERE Users.ID = Sessions.UsersID ";
@@ -392,17 +392,13 @@ function html_header() {
print " <span class='black'> - </span> ";
print " <a href='/account.php'>".__("Accounts")."</a> ";
print " <span class='black'> - </span> ";
- print " <a href='/pkgsearch.php'>".__("Packages")."</a> ";
- if (isset($_COOKIE["AURSID"])) {
+ print " <a href='/packages.php'>".__("Packages")."</a> ";
+ if ($_COOKIE["AURSID"]) {
# Only display these items if the visitor is logged in. This should
# be a safe check because check_sid() has been called prior to
# html_header().
#
print " <span class='black'> - </span> ";
- print " <a href='/pkgvote.php'>".__("Vote")."</a> ";
- print " <span class='black'> - </span> ";
- print " <a href='/pkgmgmnt.php'>".__("Manage")."</a> ";
- print " <span class='black'> - </span> ";
print " <a href='/pkgsubmit.php'>".__("Submit")."</a> ";
print " <span class='black'> - </span> ";
print " <a href='/logout.php'>".__("Logout")."</a> ";
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index 0b7a0003..658dfbaa 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -12,7 +12,7 @@ function pkgsearch_results_link() {
global $_REQUEST;
global $pkgsearch_vars;
- $url_data = "<a href='/pkgsearch.php?do_Search=1";
+ $url_data = "<a href='/packages.php?do_Search=1";
while (list($k, $var) = each($pkgsearch_vars)) {
if ($var == "do_MyPackages" && $_REQUEST[$var]) {
$url_data.="&".$var."=1";
@@ -218,7 +218,7 @@ function package_details($id=0) {
print "<tr><td class='boxSoft'>";
$deps = package_dependencies($row["ID"]); # $deps[0] = array('id','name');
while (list($k, $darr) = each($deps)) {
- $url = "<a href='/pkgsearch.php?do_Details=1&ID=".$darr[0];
+ $url = "<a href='/packages.php?do_Details=1&ID=".$darr[0];
while(list($k, $var) = each($pkgsearch_vars)) {
if ($var == "do_MyPackages" && $_REQUEST[$var]) {
$url .= "&".$var."=1";
@@ -305,7 +305,7 @@ function pkg_search_page($SID="") {
# The search form
#
- print "<form action='/pkgsearch.php' method='post'>\n";
+ print "<form action='/packages.php' method='post'>\n";
print "<input type='hidden' name='O' value='".$O."'>\n";
print "<center>\n";
@@ -588,7 +588,7 @@ function pkg_search_page($SID="") {
print " <td class='".$c."'><span class='f5'><span class='blue'>";
print $cats[$row["CategoryID"]]."</span></span></td>\n";
print " <td class='".$c."'><span class='f4'>";
- $url = "<a href='/pkgsearch.php?";
+ $url = "<a href='/packages.php?";
$url .= "do_Details=1&ID=";
$url .= $row["ID"];
while (list($k, $var) = each($pkgsearch_vars)) {