Commit graph

102 commits

Author SHA1 Message Date
Dan McGee
46f2798524 Use include_once where applicable
All of these are sourcing function libraries so we don't need to include
them more than once. Things that insert actual HTML into the output were
left calling include().

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-08-11 13:58:12 -04:00
Loui Chang
610733eafd Remove excess whitespace.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-06-25 00:05:44 -04:00
Callan Barrett
d25c177229 Turn on package notification by default for new packages
Version using package functions

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-06-18 02:05:02 -04:00
Gergely Imreh
0427eebaa4 fix FS#13122 (again): removing comment removal as early as possible
comments need to be removed before concatenating lines, otherwise
not matched brackets can cause problems on submit

Signed-off-by: Gergely Imreh <imrehg@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-06-18 01:54:44 -04:00
Loui Chang
74a75661d9 Tweak the bash parsing for package submission.
Better detection of the build function.
Better detection of variables.
Support for variables with underscores.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-04-01 11:55:59 -04:00
Gergely Imreh
f3a29356c5 Correct comment removal in pkgsubmit.php
This only neutralises bash parameter substitution, but doesn't perform
the proper replacement.

Closes FS#13122.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-16 11:56:23 -05:00
Gergely Imreh
efc1713787 Fix: FS#13189, infinite variable replacement cycle
Lines such as foo=$foo in the PKGBUILD would end up in a
infinite replacement cycle when uploaded, thus the upload
times out. In these kind of lines, $foo is replaced not by
"$foo" again, but deleted (missing value for foo).

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-15 15:12:28 -05:00
Gergely Imreh
2568851eac FS#2649, FS#12645: subsititution of all variables and "eval"
All custom variables are handled during subsitution, as well as
bash "eval" statements.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-28 03:26:23 -05:00
Loui Chang
2ee3276348 Use new conglomerated translation files.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-19 16:29:45 -05:00
Gergely Imreh
5b01327f57 Fix: FS#12698 - AUR does not ignore comment lines in PKGBUILD source field.
The web interface was handling comments in the PKGBUILD variable fields
(such as 'source','depends',etc...) differently from makepkg, because
makepkg ignores the rest of the current line if there is a # character,
while the web interface parsed that as well, and listed the words of the
comment as source files.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-14 21:52:37 -05:00
Loui Chang
92643bb827 Don't require source or md5sum arrays in PKGBUILDs.
Also fix a translation string.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-08 11:47:49 -05:00
Dan McGee
207b565f1c Minimize calls to uid_from_sid()
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-04 14:28:24 -05:00
Loui Chang
35cff75156 Correct undefined constant error in pkgsubmit.
Clean up a couple of notices.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-29 17:44:57 -05:00
Loui Chang
ae1c424c95 Really make all web paths relative.
I forgot about the forms.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-12-22 13:19:56 +09:00
Loui Chang
78c2b5c67f Introduce function include_lang for translations.
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-21 18:03:27 +09:00
Evangelos Foutras
fb1c41c6c6 Fix PKGBUILD source array parsing.
Fix for FS#11132 - AUR fails to parse multiline source array

Signed-off-by: Evangelos Foutras <foutrelis@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-20 13:25:44 -05:00
Callan Barrett
07a27f2f1d Add error checking to chmod on package submission
Try submitting an empty form to the aur

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-20 13:02:24 -05:00
Loui Chang
f12b11abc7 Give group writable permissions to uploaded files.
Add a new function chown_group to recursively change permissions.
Tweak some of the coding style.
Replace some of the redundant string concatenation with a variable.

Thanks to Dan McGee for chmod_group.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-11-13 15:19:26 -05:00
Loui Chang
a6147ab5ab Merge branch 'testing'
Conflicts:
	web/html/pkgsubmit.php

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-11-03 21:52:07 -05:00
Loui Chang
99881b31db Fix whitespace and indenting in pkgsubmit.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-09-13 15:35:32 -04:00
Simo Leone
c85dfacc74 Include File/Find.php PEAR module
Since this module requires root to install
system-wide, and is somewhat rare, it's better
to just include it in the AUR code itself.

Signed-off-by: Simo Leone <simo@archlinux.org>
2008-07-28 10:27:38 -05:00
Callan Barrett
5528501497 Redirect on package submission
On a successful package submit there will be a redirect to the package details
page of the packages, no more successful message

Also got rid of the $warning stuff, what the hell was that for?

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-07-09 14:26:13 -04:00
Loui Chang
3a42725601 Remove all vim mode lines. Add HACKING file.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-06-17 01:38:01 -04:00
Callan Barrett
dc5b3d674e Clean up of pkgsubmit.php
Moved some stuff around, rewrote some stuff although the functionality is
exactly the same as before

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-06-15 22:46:23 +08:00
Callan Barrett
604156950c Make use of PEAR packages in pkgsubmit.php
Uses File_Find and Archive_Tar in pkgsubmit.php
Removes references to PackageContents

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-06-12 02:30:17 +08:00
Callan Barrett
63d70dc84a Fix FS#8622
Previous fix for this was only half implemented, links now work with both
a new package and an updated one

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-06-09 19:51:25 +08:00
Callan Barrett
b2435996dd Fix FS#10016
Fix entry of URLPath and FSPath to be actual locations, fixes RPC results

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-06-09 19:49:07 +08:00
Callan Barrett
9dad329b6a Unmark out-of-date on update
What it says in the title

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-06-07 18:30:38 +08:00
Callan Barrett
4ac945a87e Support for uploading plain PKGBUILDs
Adds support for uploading plain PKGBUILDs to the AUR
Simply moves the PKGBUILD to a directory to be treated the same as if it were
in a tarball

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-06-07 17:52:07 +08:00
Callan Barrett
cad4689bc4 Don't reset category on update.
When updating a package and no category is selected the category will no
longer reset itself to "none", it will only update if something else is
chosen.

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-06-05 19:21:38 -04:00
Simo Leone
7bad8a8357 Removed QBUG and DBUG
It was broken and hardly used. It's just as easy
to add short print statements or logging if
some debugging output is needed.

Signed-off-by: Simo Leone <simo@archlinux.org>
2008-01-23 02:51:33 -06:00
Callan Barrett
2f56688b56 Prefill category upon upload error and fix bug in last patch
When a package upload fails the category value will be prefilled, fixes a bug
in the previous patch where the pkgbuild would not extract properly and splits
the html from php in the form so there are no more prints to output it

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-01-20 00:21:21 -06:00
Dan McGee
0eb2997a82 Allow pkgsubmit to accept any tar* file
Instead of restricting to gz and bz2, allow just plain tar and any other
format tar can understand to be uploaded. I make the mistake all the time of
forgetting to pass -z to tar when making something to upload, and there is
no real reason to exclude plain tar files.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-20 00:21:20 -06:00
Callan Barrett
379e16eebd Support for verbose page titles
Verbose page titles again

Adds support for more verbose page titles based on current
page and action by user and removes sort by options from
search form as they're obsolete by column links.

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-01-20 00:21:20 -06:00
Callan Barrett
d4b07f2b33 Tweaks of various page layouts and handling of data
This is a patch that fixes a lot of little things:
* We no longer have pkgsearch or pkgdetails link functions and all
references to them are gone, that's what a back button is for and if
we really need it we can come up with something better
* No longer have do_Details variable, this means links on the package
search are simply ?ID=foo
* On the pkgdetails pages when there are either no deps, deps by,
sources or comments for a package the list for each will display
"None" instead of nothing at all (ruining the layout)
* Fixed a bug where if a package had no sources or no deps
pkgsubmit.php would submit an empty one
* Translation of the word "Search'" has been changed to "Search"

Most of these relate to each other.

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-01-20 00:21:20 -06:00
Callan Barrett
dbbf50ac90 Removes need for name, overwrite and comment fields from pkgsubmit.php
This removes the name, overwrite and comment options from pkgsubmit.php
by moving when the tarball is extracted (and where) and when the pkgbuild
is parsed so pkgname is taken from the pkgbuild instead of user input

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-01-20 00:21:20 -06:00
Callan Barrett
ce225727f6 Bug in uploading PKGBUILDs and aur schema
This fixes a bug where TUs and devs couldn't upload packages because
the query would have an extra column in it to mark the pkgbuild safe
automatically, guessing it got missed when the safe flags were
removed. Also fixes a screw up I made with the schema file when I
added the tables for the voting app.

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-01-20 00:21:19 -06:00
eliott
a9837329d6 Hand diff of simo's patch to remove flag safe functionality.
Simo's original commit text:
 The idea of safe flagging is unclear, poorly named, misunderstood,
 and not even used. At the time this patch was created, less than
 a third of the packages in unsupported were flagged safe, and less
 than a tenth of users knew how to interpret it.

 The safe flag has been replaced by a disclaimer on the main page.
2008-01-20 00:21:18 -06:00
tardo
881b921eb3 Fixed version strings.
Added AUR_VERSION to config file, so now we should only need to
change one location. KISS ftw.

Signed-off-by: tardo <tardo@nagi-fanboi.net>
2007-10-02 07:29:27 -04:00
Loui Chang
d2134f7637 Merge commit 'origin/testing'
Yeah I actually want to work from testing.
Conflicts:

	web/lib/pkgfuncs.inc

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2007-09-27 00:06:56 -04:00
Loui Chang
c764f078f1 Made some things in config.inc.proto that should be constants constants
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2007-09-26 23:57:51 -04:00
eliott
aebdd21b58 More changes to page styles. 2007-09-24 07:57:35 -07:00
pjmattal
452d6b1245 patch from eliott to convert all <? to <?php 2007-09-20 21:46:43 +00:00
swiergot
0b92839bee - Applied a patch from Loui to fix session removal.
- Replaced all occurences of mysql_escape_string()
  with mysql_real_escape_string().
2007-09-20 15:33:04 +00:00
dsa
b728db0f62 Varios fixes:
Added validation for the arch e license fields, so we can
ensure that new submitted packages can be built using 
pacman3. 

Fixed some pkgsubmit problems.
2007-03-05 05:40:08 +00:00
dsa
18cfe569e0 Added support for uploading files with '+' characters. 2007-03-05 04:07:46 +00:00
dsa
06e4af2dbc Corrected a problem when submit a package, more details in file pkgsubmit.php 2006-12-14 00:44:17 +00:00
dsa
e17a4ceb6a Solved the #3939 bug and it will require a change in the PackageDepends table to add a DepCondition field with the type varchar(20). 2006-10-13 03:55:58 +00:00
swiergot
dce2f70443 Applied license patch from dsa (closes #4085). 2006-08-22 14:18:28 +00:00
pjmattal
6e7d75efad committed dsa's patch to allow periods in package names (closes #4758) 2006-08-08 01:28:26 +00:00