Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Marcus Andersson
aurweb
Commits
63fe7bab
Commit
63fe7bab
authored
Sep 20, 2004
by
eric
Browse files
added upload comments/history, still need to finish the actual db calls
parent
cb820450
Changes
4
Hide whitespace changes
Inline
Side-by-side
support/schema/aur-schema.sql
View file @
63fe7bab
...
...
@@ -174,3 +174,16 @@ CREATE TABLE PackageContents (
FOREIGN
KEY
(
PackageID
)
REFERENCES
Packages
(
ID
)
ON
DELETE
CASCADE
);
-- Record comments for users submitting packages to AUR/unsupported
--
CREATE
TABLE
PackageUploadHistory
(
PackageID
INTEGER
UNSIGNED
NOT
NULL
,
UsersID
INTEGER
UNSIGNED
NOT
NULL
,
Comments
TEXT
NOT
NULl
DEFAULT
''
,
UploadTS
BIGINT
UNSIGNED
NOT
NULL
DEFAULT
0
,
INDEX
(
UsersID
),
INDEX
(
PackageID
),
FOREIGN
KEY
(
UsersID
)
REFERENCES
Users
(
ID
)
ON
DELETE
CASCADE
,
FOREIGN
KEY
(
PackageID
)
REFERENCES
Packages
(
ID
)
ON
DELETE
CASCADE
);
web/html/pkgsubmit.php
View file @
63fe7bab
...
...
@@ -32,6 +32,10 @@ if ($_COOKIE["AURSID"]) {
}
}
if
(
!
$_REQUEST
[
"comments"
]
&&
!
$error
)
{
$error
=
__
(
"You must supply a comment."
);
}
if
(
!
$error
)
{
# first, see if this package already exists, and if it can be overwritten
#
...
...
@@ -195,7 +199,8 @@ if ($_COOKIE["AURSID"]) {
# this is a variable/value pair, strip out
# array parens and any quoting
#
$pkgbuild
[
$lparts
[
0
]]
=
str_replace
(
array
(
"("
,
")"
,
"
\"
"
,
"'"
),
""
,
$lparts
[
1
]);
$pkgbuild
[
$lparts
[
0
]]
=
str_replace
(
array
(
"("
,
")"
,
"
\"
"
,
"'"
),
""
,
$lparts
[
1
]);
}
else
{
# either a comment, blank line, continued line, or build function
#
...
...
@@ -246,10 +251,6 @@ if ($_COOKIE["AURSID"]) {
$dbh
=
db_connect
();
if
(
$pkg_exists
)
{
# TODO add some kind of package history table - for who
# was the last person to upload, a timestamp, and maybe a
# comment about it too
# this is an overwrite of an existing package, the database ID
# needs to be preserved so that any votes are retained. However,
# PackageDepends, PackageSources, and PackageContents can be
...
...
@@ -272,6 +273,8 @@ if ($_COOKIE["AURSID"]) {
# TODO
# $q = "UPDATE Packages ..."
# $q = "INSERT INTO PackageUploadHistory ..."
}
else
{
# this is a brand new package
#
...
...
@@ -330,11 +333,20 @@ if ($_COOKIE["AURSID"]) {
print
__
(
"No"
);
print
" </td>
\n
"
;
print
"</tr>
\n
"
;
print
"<tr>
\n
"
;
print
" <td valign='top' span='f4' align='right'>"
;
print
__
(
"Comments"
)
.
":</td>
\n
"
;
print
" <td span='f4' align='left'>"
;
print
"<textarea rows='10' cols='50' name='comments'></textarea>"
;
print
" </td>
\n
"
;
print
"</tr>
\n
"
;
print
"<tr>
\n
"
;
print
" <td> </td>
\n
"
;
print
" <td align='left'>"
;
print
"<input class='button' type='submit' value='"
.
__
(
"Upload"
)
.
"' />
\n
"
;
print
" "
;
print
"<input class='button' type='reset' value='"
.
__
(
"Reset"
)
.
"' />
\n
"
;
print
"</td>
\n
"
;
print
"</tr>
\n
"
;
print
"</table>
\n
"
;
...
...
web/lang/submit_po.inc
View file @
63fe7bab
...
...
@@ -56,4 +56,119 @@ $_t["en"]["Overwrite existing package?"] = "Overwrite existing package?";
# $_t["fr"]["Overwrite existing package?"] = "--> Traduction franaise ici. <--";
# $_t["de"]["Overwrite existing package?"] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Missing build function in PKGBUILD."
]
=
"Missing build function in PKGBUILD."
;
# $_t["es"]["Missing build function in PKGBUILD."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Missing build function in PKGBUILD."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Missing build function in PKGBUILD."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Could not create incoming directory: %s."
]
=
"Could not create incoming directory: %s."
;
# $_t["es"]["Could not create incoming directory: %s."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Could not create incoming directory: %s."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Could not create incoming directory: %s."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Comments"
]
=
"Comments"
;
# $_t["es"]["Comments"] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Comments"] = "--> Traduction franaise ici. <--";
# $_t["de"]["Comments"] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Missing pkgdesc variable in PKGBUILD."
]
=
"Missing pkgdesc variable in PKGBUILD."
;
# $_t["es"]["Missing pkgdesc variable in PKGBUILD."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Missing pkgdesc variable in PKGBUILD."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Missing pkgdesc variable in PKGBUILD."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Error exec'ing the mv command."
]
=
"Error exec'ing the mv command."
;
# $_t["es"]["Error exec'ing the mv command."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Error exec'ing the mv command."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Error exec'ing the mv command."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"You did not specify a package name."
]
=
"You did not specify a package name."
;
# $_t["es"]["You did not specify a package name."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["You did not specify a package name."] = "--> Traduction franaise ici. <--";
# $_t["de"]["You did not specify a package name."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Error trying to unpack upload - PKGBUILD does not exist."
]
=
"Error trying to unpack upload - PKGBUILD does not exist."
;
# $_t["es"]["Error trying to unpack upload - PKGBUILD does not exist."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Error trying to unpack upload - PKGBUILD does not exist."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Error trying to unpack upload - PKGBUILD does not exist."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"You are not allowed to overwrite the %h%s%h package."
]
=
"You are not allowed to overwrite the %h%s%h package."
;
# $_t["es"]["You are not allowed to overwrite the %h%s%h package."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["You are not allowed to overwrite the %h%s%h package."] = "--> Traduction franaise ici. <--";
# $_t["de"]["You are not allowed to overwrite the %h%s%h package."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Upload package file"
]
=
"Upload package file"
;
# $_t["es"]["Upload package file"] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Upload package file"] = "--> Traduction franaise ici. <--";
# $_t["de"]["Upload package file"] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Missing url variable in PKGBUILD."
]
=
"Missing url variable in PKGBUILD."
;
# $_t["es"]["Missing url variable in PKGBUILD."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Missing url variable in PKGBUILD."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Missing url variable in PKGBUILD."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Missing pkgver variable in PKGBUILD."
]
=
"Missing pkgver variable in PKGBUILD."
;
# $_t["es"]["Missing pkgver variable in PKGBUILD."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Missing pkgver variable in PKGBUILD."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Missing pkgver variable in PKGBUILD."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Could not change to directory %s."
]
=
"Could not change to directory %s."
;
# $_t["es"]["Could not change to directory %s."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Could not change to directory %s."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Could not change to directory %s."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"You did not tag the 'overwrite' checkbox."
]
=
"You did not tag the 'overwrite' checkbox."
;
# $_t["es"]["You did not tag the 'overwrite' checkbox."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["You did not tag the 'overwrite' checkbox."] = "--> Traduction franaise ici. <--";
# $_t["de"]["You did not tag the 'overwrite' checkbox."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Could not change directory to %s."
]
=
"Could not change directory to %s."
;
# $_t["es"]["Could not change directory to %s."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Could not change directory to %s."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Could not change directory to %s."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Invalid name: only lowercase letters are allowed."
]
=
"Invalid name: only lowercase letters are allowed."
;
# $_t["es"]["Invalid name: only lowercase letters are allowed."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Invalid name: only lowercase letters are allowed."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Invalid name: only lowercase letters are allowed."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Package names do not match."
]
=
"Package names do not match."
;
# $_t["es"]["Package names do not match."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Package names do not match."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Package names do not match."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Package name"
]
=
"Package name"
;
# $_t["es"]["Package name"] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Package name"] = "--> Traduction franaise ici. <--";
# $_t["de"]["Package name"] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Missing md5sums variable in PKGBUILD."
]
=
"Missing md5sums variable in PKGBUILD."
;
# $_t["es"]["Missing md5sums variable in PKGBUILD."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Missing md5sums variable in PKGBUILD."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Missing md5sums variable in PKGBUILD."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Missing pkgrel variable in PKGBUILD."
]
=
"Missing pkgrel variable in PKGBUILD."
;
# $_t["es"]["Missing pkgrel variable in PKGBUILD."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Missing pkgrel variable in PKGBUILD."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Missing pkgrel variable in PKGBUILD."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Missing pkgname variable in PKGBUILD."
]
=
"Missing pkgname variable in PKGBUILD."
;
# $_t["es"]["Missing pkgname variable in PKGBUILD."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Missing pkgname variable in PKGBUILD."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Missing pkgname variable in PKGBUILD."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Could not create directory %s."
]
=
"Could not create directory %s."
;
# $_t["es"]["Could not create directory %s."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Could not create directory %s."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Could not create directory %s."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Unknown file format for uploaded file."
]
=
"Unknown file format for uploaded file."
;
# $_t["es"]["Unknown file format for uploaded file."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Unknown file format for uploaded file."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Unknown file format for uploaded file."] = "--> Deutsche bersetzung hier. <--";
$_t
[
"en"
][
"Missing source variable in PKGBUILD."
]
=
"Missing source variable in PKGBUILD."
;
# $_t["es"]["Missing source variable in PKGBUILD."] = "--> Traduccin espaola aqu. <--";
# $_t["fr"]["Missing source variable in PKGBUILD."] = "--> Traduction franaise ici. <--";
# $_t["de"]["Missing source variable in PKGBUILD."] = "--> Deutsche bersetzung hier. <--";
?>
\ No newline at end of file
web/lib/pkgfuncs.inc
View file @
63fe7bab
...
...
@@ -558,10 +558,11 @@ function pkg_search_page($SID="") {
print
" bottom'><span class='f2'>"
.
__
(
"Description"
)
.
"</span></th>
\n
"
;
print
" <th style='border-bottom: #666 1px solid; vertical-align:"
;
print
" bottom'><span class='f2'>"
.
__
(
"Maintainer"
)
.
"</span></th>
\n
"
;
if
(
$SID
)
{
print
" <th style='border-bottom: #666 1px solid; vertical-align:"
;
print
" bottom'><span class='f2'>"
.
__
(
"Manage"
)
.
"</span></th>
\n
"
;
}
# REMOVED LINK TO 'pkgmgmnt.php'
# if ($SID) {
# print " <th style='border-bottom: #666 1px solid; vertical-align:";
# print " bottom'><span class='f2'>".__("Manage")."</span></th>\n";
# }
print
"</tr>
\n
"
;
for
(
$i
=
0
;
$row
=
mysql_fetch_assoc
(
$result
);
$i
++
)
{
...
...
@@ -633,17 +634,18 @@ function pkg_search_page($SID="") {
}
print
"</span></span></td>
\n
"
;
# print the managed link if applicable
#
if
(
canManagePackage
(
$myuid
,
$row
[
"AURMaintainerUID"
],
$row
[
"MaintainerUID"
],
$row
[
"SubmitterUID"
],
$managed
))
{
$manage_url
=
"<a href='/pkgmgmnt.php?ID="
;
$manage_url
.
=
$row
[
"ID"
]
.
"'><span class='black'>Manage</span></a>"
;
print
" <td class='"
.
$c
.
"'><span class='f4'>"
;
print
$manage_url
.
"</span></td>
\n
"
;
}
else
{
print
"<td class='"
.
$c
.
"'><span class='f4'> </span></td>
\n
"
;
}
# REMOVED LINK TO 'pkgmgmnt.php'
# # print the managed link if applicable
# #
# if (canManagePackage($myuid, $row["AURMaintainerUID"],
# $row["MaintainerUID"], $row["SubmitterUID"], $managed)) {
# $manage_url = "<a href='/pkgmgmnt.php?ID=";
# $manage_url.= $row["ID"]."'><span class='black'>Manage</span></a>";
# print " <td class='".$c."'><span class='f4'>";
# print $manage_url."</span></td>\n";
# } else {
# print "<td class='".$c."'><span class='f4'> </span></td>\n";
# }
print
"</tr>
\n
"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment