summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-04-16rpc.php overhaulDan McGee1-69/+44
* Mark things static in the class rather than use a constructor every single invocation of the service. * Don't call mysql_real_escape_string() before we even have a database connection, and don't do work in the database if we don't need to. * Formatting consistency fixups in a few places. * Add new process_query() helper function; use this instead of copy-pasted code in all of the RPC method calls. * Remove the escaping code meant to fix FS#15526, introduced in commit 4d1eb4dd7ac631. It broke more than it solved, only fixed the output in one of three RPC calls (and who knows what the web interface then also does), and proper encoding should be done at the database level rather than up here. Lukas: Add special case for "info" queries to process_query() (return a single result instead of an array of results here). Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-13Don't allow dl() of json moduleDan McGee1-4/+0
You need this enabled for the AUR, period. No need for this BS. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-13Pass array_map() callback function properly.Lukas Fleischer1-1/+1
PHP requires callback functions to be passed as strings. Fix this to supress PHP notices. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-13Remove obsolete README file in "support/".Lukas Fleischer1-6/+0
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-13Remove "NewPkgNotify" column from "Users" table.Lukas Fleischer2-2/+6
We do not require this column anymore. New package notifications are no longer supported. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-13Remove new package notification script.Lukas Fleischer1-100/+0
We discussed this on aur-dev. Everything that depends on tupkgs should be removed. Those who still want to be notified should move on to the RSS feed. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-13Remove "New Package Notify" option from user account settings.Lukas Fleischer2-31/+10
Do this in preparation for the upcoming notification script removal. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-13Make "gendummydata.py" Python 3 compliant.Lukas Fleischer2-15/+15
* Transform into valid Python 3.x code using 2to3. * Change shebang from "/usr/bin/python2" to "/usr/bin/python3". * Invoke with "python3" instead of "python2" in "reloadtestdb.sh". Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-12Fix dependency generation in "gendummydata.py".Lukas Fleischer1-2/+2
Package dependencies are no longer stored as references to the "Packages" table but kept directly in "PackageDepends", so the dummy data generation script should be fixed to create package names instead of references, also. Regression introduced in commit 7c91c592458b7532806ef75fe09146f82f085f3b. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-12Fix syntax error in "CREATE TABLE" statement in the SQL schema.Lukas Fleischer1-1/+1
Regression introduced in commit 7c91c592458b7532806ef75fe09146f82f085f3b. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-12wrap long SQL commands to improve formatting and readabilityelij1-11/+23
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-12replace print statements with logging module in gendummydataelij1-40/+22
use the logging module instead of writing directly to stderr this makes the code cleaner as it removes the numerous tests for the value of DBUG, yet allows devs to control the level of output verbosity. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-12remove mysql dependency from gendummydataelij1-41/+3
- remove need to use mysql for escaping the sql -- removing single quote should be enough - instead of using sql to fetch categories from a live database, simply consider categories an integer range, specified to the size of that in the aur-schema. Lukas: Add "CATEGORIES_COUNT" initialization. Fix random number range used in genCategory() (AUTO_INCREMENT columns are 1-based by default, not 0-based). Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-11Add base transifex configDan McGee2-4/+10
This simplifies instructions for translators and allows them to have an out of the box working configuration. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-11Use HTTPS for transifex URLsDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Add ".mo" and ".po~" files to ".gitignore".Lukas Fleischer1-0/+2
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Update "TRANSLATING" with gettext and Transifex instructions.Lukas Fleischer1-58/+33
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Remove comment on translation helpers from "web/lib/translator.inc".Lukas Fleischer1-9/+0
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Supress rm(1) warnings showing up when running `make clean`.Lukas Fleischer1-1/+1
Use `rm -f` instead of just `rm` here to supress those annoying warnings about failed removal if either ".po~" backup files or compiled ".mo" files are missing. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Add "--check" to msgfmt(1) invocation in Makefile.Lukas Fleischer1-1/+1
We can add this as we finally have proper portable objects now. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Update portable object files using `make update-po`.Lukas Fleischer20-9428/+14665
This ensures we have proper native portable objects instead of those created by sed(1)'ing the former translation files. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Add "%.po-update" and "update-po" targets to Makefile.Lukas Fleischer1-2/+11
Those can be used as a shortcut to msgmerge(1) to update one ("$locale.po-update") or all ("update-po") portable object files with new strings from the message catalog ("aur.pot"). Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Add initial headers to portable object files.Lukas Fleischer20-0/+380
Those are just dummy headers created by ripping them off from "aur.pot" and changing the "Content-Type" charset to UTF-8. Needed to make msgmerge(1) operate on our converted ".po" files - otherwise it would fail to detect the files' encodings and do nothing but throw a pile of "invalid multibyte sequence" errors. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Create initial ".pot" file using `make update-pot`.Lukas Fleischer1-0/+827
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Add "update-pot" target to Makefile.Lukas Fleischer2-1/+37
Can be used to rebuild the message catalog from our source tree. "po/POTFILES" contains a list of source files to be scanned for translation strings. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Add note on gettext migration to "UPGRADING".Lukas Fleischer1-0/+6
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Add locale directories to ".gitignore".Lukas Fleischer1-0/+1
Ensure we never `git add` any of those by accident. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Remove "web/lang/".Lukas Fleischer22-10660/+0
Those legacy ".po" files and translation helpers are no longer needed as we moved to gettext compatible portable objects. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Replace translation engine with php-gettext.Lukas Fleischer2-14/+10
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Add php-gettext libraries to "web/lib/".Lukas Fleischer2-0/+599
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Add dummy "web/locale/" directory.Lukas Fleischer1-0/+6
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Add Makefile to compile ".po" files.Lukas Fleischer1-0/+44
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Remove duplicate message definitions from new portable object files.Lukas Fleischer10-711/+0
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Convert translation files to gettext compatible portable objects.Lukas Fleischer20-0/+15571
Put new gettext compatible files into "po/" while keeping old translations in "web/lang/". Conversion was done using following hacky shell script: ---- for f in *.po; do # Remove "<?php" shebang and "global" statements. sed -i '1d; /^global/d' "$f" # Convert former translation strings into real PO statements. sed -i 's/^$_t\[\(.*\)\] = \(.*\);.*/msgid \1\nmsgstr \2/' "$f" # Ensure there always is an empty line after each msgstr. sed -i '/^msgstr/!b; n; /^$/!i\ ' "$f" done ---- Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Remove newline in "web/lang/sr.po".Lukas Fleischer1-2/+1
Do this in preparation for converting exisiting translation files into gettext compatible ones. Newlines will he hard to match by a conversion script. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10Release 1.8.2.Lukas Fleischer2-2/+2
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-07Fix French translation.Cédric Girard2-43/+44
* Translation of "notify" has been changed to the literal translation "notifier" which seems more appropriate (cf. recent thread on AUR-general) * Uniformization of the translation of "flag" * Addition of "TU" besides the translation of Trusted User as user may not understand that Trusted User and "Utilisateur de confiance" are the same thing * Some capitalization correction (in French you don't put capital letters in the middle of a sentence as you do eg for title in English). * "unsupported" translation has been replaced by "unsupported" (with quotes) as it makes no sense to translate it * "Safe" translation has been replaced by "sûr" has it seems more appropriate than "sain" (sane) Lukas: Added translator to "AUTHORS". Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-06Merge branch 'wip'Lukas Fleischer2-1/+113
2011-04-06Update the german translationWieland Hoffmann2-1/+113
Lukas: Added missing translations strings. Added translator to "AUTHORS". Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-06Make "Exact name" search option translatable.Lukas Fleischer1-1/+1
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-06Add option to search for exact name matches only (fixes FS#23556).Lukas Fleischer2-2/+7
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-05Initialize "$name" in pkgname_from_id().Lukas Fleischer1-2/+1
Ensures "$name" is always initialized, even if the package doesn't exist. Fixes PHP warnings appearing when retrieving package details of a package with an invalid ID. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-05Remove File_Find PEAR module from code base.Lukas Fleischer4-490/+7
We removed the code depending on this a long time ago - drop it and add some note to "UPGRADING". Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-04Fix PHP warning when browsing a non-existent package.Lukas Fleischer1-4/+2
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-03Add more stats to the front page tableDan McGee2-4/+34
Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-03Add indentation to stats tableDan McGee1-30/+19
Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-03Remove Dummy Package conceptDan McGee10-84/+41
Instead, we just store dependencies directly in the PackageDepends table. Since we don't use this info anywhere besides the package details page, there is little value in precalculating what is in the AUR vs. what is not. An upgrade path is provided via several SQL statements in the UPGRADING document. There should be no user-visible change from this, but the DB schema gets a bit more sane and we no longer have loads of junk packages in our tables that are never shown to the end user. This should also help the MySQL query planner in several cases as we no longer have to be careful to exclude dummy packages on every query. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-03Always set ModifiedTS including new packagesDan McGee5-9/+13
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-03Submission process code refactorDan McGee1-61/+35
We had a ton of duplicate code shared between the insert and update cases. Do a refactor so we can pull this stuff out below the if/else block and only need it there once, saving some headaches. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-30Be more restrictive with source tarball contents.Lukas Fleischer1-2/+13
Reject tarballs containing more than one directory or files outside a directory. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>