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
1e3fa38d
Commit
1e3fa38d
authored
Feb 27, 2011
by
Lukas Fleischer
Browse files
Define "Packages.SubmitterUID" and "Packages.MaintainerUID" as "NULL".
Signed-off-by:
Lukas Fleischer
<
archlinux@cryptocrack.de
>
parent
84c2491e
Changes
8
Hide whitespace changes
Inline
Side-by-side
UPGRADING
View file @
1e3fa38d
...
...
@@ -28,6 +28,11 @@ ALTER TABLE TU_Votes
ALTER
TABLE
PackageComments
MODIFY
DelUsersID
INTEGER
UNSIGNED
NULL
DEFAULT
NULL
;
UPDATE
PackageComments
SET
DelUsersID
=
NULL
WHERE
DelUsersID
=
0
;
ALTER
TABLE
Packages
MODIFY
SubmitterUID
INTEGER
UNSIGNED
NULL
DEFAULT
NULL
,
MODIFY
MaintainerUID
INTEGER
UNSIGNED
NULL
DEFAULT
NULL
;
UPDATE
Packages
SET
SubmitterUID
=
NULL
WHERE
SubmitterUID
=
0
;
UPDATE
Packages
SET
MaintainerUID
=
NULL
WHERE
MaintainerUID
=
0
;
----
3.
(
optional
)
If
you
converted
your
database
from
MyISAM
to
InnoDB
during
the
...
...
support/schema/aur-schema.sql
View file @
1e3fa38d
...
...
@@ -104,8 +104,8 @@ CREATE TABLE Packages (
OutOfDateTS
BIGINT
UNSIGNED
NULL
DEFAULT
NULL
,
SubmittedTS
BIGINT
UNSIGNED
NOT
NULL
,
ModifiedTS
BIGINT
UNSIGNED
NOT
NULL
,
SubmitterUID
INTEGER
UNSIGNED
NOT
NULL
DEFAULT
0
,
-- who submitted it?
MaintainerUID
INTEGER
UNSIGNED
NOT
NULL
DEFAULT
0
,
-- User
SubmitterUID
INTEGER
UNSIGNED
NULL
DEFAULT
NULL
,
-- who submitted it?
MaintainerUID
INTEGER
UNSIGNED
NULL
DEFAULT
NULL
,
-- User
PRIMARY
KEY
(
ID
),
UNIQUE
(
Name
),
INDEX
(
CategoryID
),
...
...
support/schema/gendummydata.py
View file @
1e3fa38d
...
...
@@ -228,8 +228,13 @@ for p in seen_pkgs.keys():
uuid
=
genUID
()
# the submitter/user
s
=
"INSERT INTO Packages (ID, Name, Version, CategoryID, SubmittedTS, SubmitterUID, MaintainerUID) VALUES (%d, '%s', '%s', %d, %d, %d, %d);
\n
"
%
(
seen_pkgs
[
p
],
p
,
genVersion
(),
if
muid
==
0
:
s
=
"INSERT INTO Packages (ID, Name, Version, CategoryID, SubmittedTS, SubmitterUID, MaintainerUID) VALUES (%d, '%s', '%s', %d, %d, %d, NULL);
\n
"
%
(
seen_pkgs
[
p
],
p
,
genVersion
(),
genCategory
(),
NOW
,
uuid
)
else
:
s
=
"INSERT INTO Packages (ID, Name, Version, CategoryID, SubmittedTS, SubmitterUID, MaintainerUID) VALUES (%d, '%s', '%s', %d, %d, %d, %d);
\n
"
%
(
seen_pkgs
[
p
],
p
,
genVersion
(),
genCategory
(),
NOW
,
uuid
,
muid
)
out
.
write
(
s
)
if
count
%
100
==
0
:
if
DBUG
:
print
"."
,
...
...
web/README
View file @
1e3fa38d
...
...
@@ -152,7 +152,7 @@ Scripts:
can also set the account type to Dev. TUs and Devs are able to
delete accounts. If an account is deleted, all "Unsupported"
packages are orphaned (the MaintainerUID field in the Packages
table is set to N
ull
).
table is set to N
ULL
).
- html/packages.php
PHP script to search the package database. It should support
...
...
web/html/pkgsubmit.php
View file @
1e3fa38d
...
...
@@ -344,7 +344,7 @@ if ($_COOKIE["AURSID"]):
}
}
if (
!
$pdata["MaintainerUID"]) pkg_notify(account_from_sid($_COOKIE["AURSID"]), array($pdata["ID"]));
if ($pdata["MaintainerUID"]
=== NULL
) pkg_notify(account_from_sid($_COOKIE["AURSID"]), array($pdata["ID"]));
header('
Location
:
packages
.
php
?
ID
=
' . $pdata['
ID
']);
...
...
web/lib/aur.inc
View file @
1e3fa38d
...
...
@@ -339,7 +339,7 @@ function can_submit_pkg($name="", $sid="") {
if
(
$row
[
1
]
==
"1"
)
{
return
1
;
}
$my_uid
=
uid_from_sid
(
$sid
);
if
(
!
$row
[
0
]
||
$row
[
0
]
==
$my_uid
)
{
if
(
$row
[
0
]
===
NULL
||
$row
[
0
]
==
$my_uid
)
{
return
1
;
}
...
...
web/lib/pkgfuncs.inc
View file @
1e3fa38d
...
...
@@ -487,7 +487,7 @@ function pkg_search_page($SID="") {
}
if
(
$_GET
[
"do_Orphans"
])
{
$q
.
=
"AND MaintainerUID
= 0
"
;
$q
.
=
"AND MaintainerUID
IS NULL
"
;
}
if
(
isset
(
$_GET
[
'outdated'
]))
{
...
...
@@ -813,7 +813,7 @@ function pkg_adopt ($atype, $ids, $action = True) {
if
(
$action
)
{
$user
=
uid_from_sid
(
$_COOKIE
[
"AURSID"
]);
}
else
{
$user
=
0
;
$user
=
'NULL'
;
}
$q
.
=
"SET
$field
=
$user
"
;
...
...
@@ -821,7 +821,7 @@ function pkg_adopt ($atype, $ids, $action = True) {
if
(
$action
&&
$atype
==
"User"
)
{
# Regular users may only adopt orphan packages from unsupported
$q
.
=
"AND
$field
= 0
"
;
$q
.
=
"AND
$field
IS NULL
"
;
}
else
if
(
$atype
==
"User"
)
{
$q
.
=
"AND
$field
= "
.
uid_from_sid
(
$_COOKIE
[
"AURSID"
]);
}
...
...
web/template/actions_form.php
View file @
1e3fa38d
...
...
@@ -35,7 +35,7 @@ if ($row["OutOfDateTS"] === NULL) {
echo
" value='"
.
__
(
"UnFlag Out-of-date"
)
.
"'>
\n
"
;
}
if
(
$row
[
"MaintainerUID"
]
==
0
)
{
if
(
$row
[
"MaintainerUID"
]
==
=
NULL
)
{
echo
"<input type='submit' class='button' name='do_Adopt'"
;
echo
" value='"
.
__
(
"Adopt Packages"
)
.
"'>
\n
"
;
}
else
if
(
$uid
==
$row
[
"MaintainerUID"
]
||
...
...
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