Re: [aur-dev] [PATCH] Limit comment height to 15 lines

2016-03-14 Thread Marcel Korpel
* Lukas Fleischer (Sun, 13 Mar 2016 09:23:57 +0100): > The idea sounds good, however I am not 100% sure about the > implementation. We already do have JavaScript code for collapsing long > dependency lists (which we borrowed from archweb). Do we want to use > the same

Re: [aur-dev] [PATCH] Store last login address as plain text

2016-03-14 Thread Marcel Korpel
* Mark Weiman <mark.wei...@markzz.com> (Mon, 14 Mar 2016 13:09:09 -0400): > On Mon, 2016-03-14 at 10:12 +0100, Marcel Korpel wrote: >> VARCHAR(40) is too short, I think, see >> http://stackoverflow.com/q/166132/258127 >> >> According to Linux header files, the max

Re: [aur-dev] [PATCH] Store last login address as plain text

2016-03-14 Thread Marcel Korpel
* Lukas Fleischer (Sun, 13 Mar 2016 11:49:01 +0100): > - LastLoginIPAddress INTEGER UNSIGNED NOT NULL DEFAULT 0, > + LastLoginIPAddress VARCHAR(40) NULL DEFAULT NULL, VARCHAR(40) is too short, I think, see http://stackoverflow.com/q/166132/258127 According to

[aur-dev] [PATCH] Remove 'new' tag from updates table

2016-01-31 Thread Marcel Korpel
Signed-off-by: Marcel Korpel <marcel.kor...@gmail.com> --- web/html/css/aurweb.css | 8 web/lib/stats.inc.php| 2 +- web/template/stats/updates_table.php | 5 - 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/web/html/css/aurweb.css

[aur-dev] [PATCH] Remove 'new' tag from updates table

2016-01-31 Thread Marcel Korpel
It was hard to make it consistent with the other new icons from Open Iconic and it hadn't much use after all. Signed-off-by: Marcel Korpel <marcel.kor...@gmail.com> --- Changes since v1: * Removed icon web/html/images/new.svg * Elaborated in commit message web/html/css/aurw

[aur-dev] [PATCH v3] Add comment undeletion functionality

2016-01-19 Thread Marcel Korpel
Only Developers and Trusted Users can undelete comments. Signed-off-by: Marcel Korpel <marcel.kor...@gmail.com> --- Changes from v2: * Used icon instead of (textual) button web/html/css/aurweb.css | 6 +++--- web/html/images/action-undo.min.svg | 3 +++ web/html/images/

[aur-dev] [PATCH v2] Add comment undeletion functionality

2016-01-18 Thread Marcel Korpel
Only Developers and Trusted Users can undelete comments. Signed-off-by: Marcel Korpel <marcel.kor...@gmail.com> --- Changes from v1: * General clean-up of code * Placed button at the same position as the delete/edit/pin icons * Added missing PHPDoc for parameter web/html/css/aurw

[aur-dev] [PATCH] Add comment undeletion functionality

2016-01-17 Thread Marcel Korpel
Only Developers and Trusted Users can undelete comments. Signed-off-by: Marcel Korpel <marcel.kor...@gmail.com> --- web/html/css/aurweb.css | 9 + web/html/pkgbase.php | 5 + web/lib/credentials.inc.php | 2 ++ web/lib/pkgbasefuncs.inc.php

[aur-dev] [PATCH] Rename constructors to __construct

2016-01-17 Thread Marcel Korpel
In PHP 7, constructor methods that have the same name as the class they are defined in are deprecated. Use __construct instead. http://php.net/manual/en/migration70.deprecated.php --- web/lib/gettext.php | 2 +- web/lib/streams.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)

Re: [aur-dev] [PATCH v2] Add search for keywords only

2015-09-23 Thread Marcel Korpel
* Lukas Fleischer (Wed, 23 Sep 2015 06:06:50 +0200): > > * refactor sophiticated keyword search functionality to function I mistyped 'sophisticated' twice. At this place it doesn't matter, but in the PHPDoc of construct_keyword_search (in pkgfuncs.inc.php) it is not so

[aur-dev] [PATCH] Make it more clear that the bug tracker is for aurweb only

2015-09-23 Thread Marcel Korpel
Signed-off-by: Marcel Korpel <marcel.kor...@gmail.com> --- web/html/home.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/html/home.php b/web/html/home.php index 7e9a00f..475370b 100644 --- a/web/html/home.php +++ b/web/html/home.php @@ -112,7 +112,7 @@ html_

[aur-dev] [PATCH v2] Add search for keywords only

2015-09-22 Thread Marcel Korpel
Implements FS#45619. Signed-off-by: Marcel Korpel <marcel.kor...@gmail.com> --- Changes since v1: * refactor sophiticated keyword search functionality to function * use this function to search for package keywords * update PHPDoc web/lib/pkgfuncs.inc.php

Re: [aur-dev] [PATCH 2/2] Add search for keywords only

2015-09-20 Thread Marcel Korpel
* Lukas Fleischer (Sat, 19 Sep 2015 15:26:09 +0200): > I wonder whether, instead of doing this, we should enable the keyword > search mode when searching by keywords only, i.e. use the default > search and drop the Packages.Name and Description conditions... You mean

[aur-dev] [PATCH 1/2] Fix type of FlaggerUID in table PackageBases

2015-09-18 Thread Marcel Korpel
Signed-off-by: Marcel Korpel <marcel.kor...@gmail.com> --- schema/aur-schema.sql | 2 +- upgrading/4.1.0.txt | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql index ff137dc..2c45a97 100644 --- a/schema/aur-schema.sql

Re: [aur-dev] [PATCH] updates_table.php: Consider packages first submitted in the last hour as new

2015-08-19 Thread Marcel Korpel
* Lukas Fleischer lfleisc...@archlinux.org (Wed, 19 Aug 2015 09:14:24 +0200): Good catch but the commit message title is a bit inaccurate... Yeah, I realized that when reading my message now, I'll resubmit with a reworded commit message.

[aur-dev] [PATCH] updates_table.php: Fix identification of new packages

2015-08-19 Thread Marcel Korpel
Currently, package creation has to be done separately from first submission, so ModifiedTS will never be the same as SubmittedTS. Consider all packages that are submitted within an hour from package creation as new. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/template/stats

[aur-dev] [PATCH] account_edit_form.php: Warn users to correctly enter their email address

2015-08-18 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/template/account_edit_form.php | 4 1 file changed, 4 insertions(+) diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php index 0aadb9d..83aedb0 100644 --- a/web/template/account_edit_form.php +++ b

Re: [aur-dev] [PATCH] Let the user verify their email address

2015-08-17 Thread Marcel Korpel
* Lukas Fleischer lfleisc...@archlinux.org (Mon, 17 Aug 2015 04:12:32 +0200): On Mon, 17 Aug 2015 at 02:42:31, Loui Chang wrote: On Sun 16 Aug 2015 19:24 -0400, Eli Schwartz wrote: On Sun, Aug 16, 2015 at 7:04 PM, Marcel Korpel marcel.kor...@gmail.com wrote: [...] I completely

Re: [aur-dev] [PATCH] Let the user verify their email address

2015-08-16 Thread Marcel Korpel
* Patrick Burroughs (Celti) ce...@celti.name (Sun, 16 Aug 2015 15:59:38 -0700): On Mon, 17 Aug 2015 00:54:54 +0200 Marcel Korpel marcel.kor...@gmail.com wrote: On registering and updating an email address, the user has to type their email address twice. Do not allow autocomplete and pasting

[aur-dev] [PATCH] Let the user verify their email address

2015-08-16 Thread Marcel Korpel
On registering and updating an email address, the user has to type their email address twice. Do not allow autocomplete and pasting in the verification field. Fixes FS#45792. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/account.php | 17 + web

[aur-dev] [PATCH 1/2] Remove success message from comment form

2015-08-16 Thread Marcel Korpel
To be more flexible with messages, we shouldn't always output this message when a comment has been sent. Moreover, currently it is not displayed due to the POST-Redirect-GET pattern, where the comment parameter is lost after redirection. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com

[aur-dev] [PATCH 2/2] Do not allow empty comments

2015-08-16 Thread Marcel Korpel
Fixes FS#45870. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/pkgbase.php | 3 +-- web/lib/pkgbasefuncs.inc.php | 10 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php index 1581869..bc32e43 100644

Re: [aur-dev] [PATCH] FS#45834 - Remove trailing slash from git https://link.git/

2015-08-12 Thread Marcel Korpel
* Marcel Korpel marcel.kor...@gmail.com (Wed, 12 Aug 2015 18:19:22 +0200): […] Like: Remove trailing slash from Git link Fixes FS#45834. The trailing slash made Git create directories with a .git suffix since Git 2.5.0. Scratch that. Messages should be in imperative mood. See http

[aur-dev] [PATCH v2 1/3] pkg_comment_form.php: Make printing of header conditional

2015-07-21 Thread Marcel Korpel
For use in the new RPC interface to edit comments, the form shouldn't always print a header. Make this conditional. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- Change since v1: * Include the form element in the markup when using the RPC interface. This is necessary to use normal

[aur-dev] [PATCH v2 0/3] Add JavaScript method to edit comments

2015-07-21 Thread Marcel Korpel
For a better user experience, enhance the comment edit form with a JavaScript method to edit comments on the same page, using a customized RPC interface. If JavaScript is not available, the page falls back to a standard web page, where a user can edit a comment. Marcel Korpel (3

[aur-dev] [PATCH v2 2/3] aurjson.class.php: Add method load_comment

2015-07-21 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- Changes since v1: * Drop any POST method. * Drop save_comment() method and use the normal web form for submission. web/lib/aurjson.class.php | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/web

[aur-dev] [PATCH v2 3/3] pkg_comments.php: Add JavaScript function to edit comments

2015-07-21 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- Changes since v1: * Drop the AJAX form submission, instead use a normal form. * Pass variables $base_id and $pkgbase_name that are now needed when rendering the form. * Add loading indicator. web/html/css/aurweb.css | 6

Re: [aur-dev] [PATCH v2 3/3] pkg_comments.php: Add JavaScript function to edit comments

2015-07-21 Thread Marcel Korpel
* Lukas Fleischer lfleisc...@archlinux.org (Tue, 21 Jul 2015 18:34:27 +0200): + _this = $(this); Do we need an extra variable here? Yes, we need to copy 'this' here to be able to use it within the callback function, where 'this' has a different meaning. +

[aur-dev] [PATCH v3 4/4] pkg_comments.php: Add JavaScript function to edit comments

2015-07-21 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- Changes since v2: * Improve formatting. * Properly encode JavaScript values. * Use improved error handling interface. web/html/css/aurweb.css | 6 ++ web/html/images/ajax-loader.gif | Bin 0 - 723 bytes web/html/index.php

[aur-dev] [PATCH v3 1/4] pkg_comments.php: Merge two DIVs with same ID

2015-07-21 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- Change since v1: * Always close outer div element. web/template/pkg_comments.php | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php index 26fddfd

[aur-dev] [PATCH v3 2/4] Split pkg_comment_form.php so the outer box is not always included

2015-07-21 Thread Marcel Korpel
For use in the new RPC interface to edit comments, the form shouldn't always print a header. Create a new template pkg_comment_box.php that prints form and box, change template pkg_comment_form.php to only print the form. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- Change since v2

[aur-dev] [PATCH v3 0/4] Add JavaScript method to edit comments

2015-07-21 Thread Marcel Korpel
For a better user experience, enhance the comment edit form with a JavaScript method to edit comments on the same page, using a customized RPC interface. If JavaScript is not available, the page falls back to a standard web page, where a user can edit a comment. Marcel Korpel (4

Re: [aur-dev] [PATCH v2 2/3] aurjson.class.php: Add method load_comment

2015-07-21 Thread Marcel Korpel
* Lukas Fleischer lfleisc...@archlinux.org (Tue, 21 Jul 2015 18:25:18 +0200): We can directly return here when adding early returns for the error cases. I wonder whether it is a good idea to provide different data types, depending on whether an error occurred or not. I don't think so, but at

[aur-dev] [PATCH] fixup! aurjson: Pass http_data array to all functions

2015-07-21 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/lib/aurjson.class.php | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php index 944362b..d255d45 100644 --- a/web/lib/aurjson.class.php +++ b/web/lib

[aur-dev] [PATCH v4 2/4] Split pkg_comment_form.php so the outer box is not always included

2015-07-21 Thread Marcel Korpel
For use in the new RPC interface to edit comments, the form shouldn't always print a header. Create a new template pkg_comment_box.php that prints form and box, change template pkg_comment_form.php to only print the form. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html

[aur-dev] [PATCH v4 4/4] pkg_comments.php: Add JavaScript function to edit comments

2015-07-21 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/css/aurweb.css | 6 ++ web/html/images/ajax-loader.gif | Bin 0 - 723 bytes web/html/index.php | 4 web/template/pkg_comments.php | 35 +++ 4 files changed, 45

[aur-dev] [PATCH v4 3/4] aurjson.class.php: Add method get_comment_form()

2015-07-21 Thread Marcel Korpel
This method will be used by the JavaScript comment editing and produces a form containing the comment. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- Changes since v3: * Update commit message. * Improve JSDoc to match the other ones in aurjson.class.php. * Correct check for existence

[aur-dev] [PATCH 3/5] pkg_comment_form.php: Make printing of header conditional

2015-07-20 Thread Marcel Korpel
For use in the new RPC interface to edit comments, the form shouldn't always print a header. Make this conditional. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/template/pkg_comment_form.php | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/template

[aur-dev] [PATCH 1/5] rpc.php: Allow POST method in RPC interface

2015-07-20 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/rpc.php | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/html/rpc.php b/web/html/rpc.php index 415dcb8..aa1a562 100644 --- a/web/html/rpc.php +++ b/web/html/rpc.php @@ -2,7 +2,7 @@ set_include_path

[aur-dev] [PATCH 2/5] Refactor pkgbase_edit_comment() to use parameter comment ID

2015-07-20 Thread Marcel Korpel
To use pkgbase_edit_comment() from within the RPC interface, no longer hardcode a specific POST variable, but use a parameter that defines the comment ID. Move the check for the existence of the POST variable to pkgbase.php. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html

[aur-dev] [PATCH v4 1/3] Use username from the database if one is provided by the user

2015-07-19 Thread Marcel Korpel
This fixes a bug where the new user name input by the user was invalid, causing the account deletion link and the form action to be wrong. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/account.php | 4 ++-- web/lib/acctfuncs.inc.php | 8 +--- web

[aur-dev] [PATCH v4 3/3] Set correct 'My Account' link after changing username

2015-07-19 Thread Marcel Korpel
from the database in the 'My Account' link. Clicking on it immediately after changing a username will no longer lead to a non-existing URL. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- Updates since v3: * Add explanation to commit message and in comment. * Show form again after updating

[aur-dev] [PATCH v4 2/3] Surround message with p tags

2015-07-19 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/register.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/html/register.php b/web/html/register.php index 014d802..cb3e8dd 100644 --- a/web/html/register.php +++ b/web/html/register.php @@ -25,7 +25,7

[aur-dev] [PATCH v3 3/3] Set correct 'My Account' link after changing username

2015-07-15 Thread Marcel Korpel
Don't print messages (and the account form) in process_account_form() anymore, but return them to the caller. When updating accounts, this function will be called before the headers are written. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- Change since v2: * Don't buffer output

[aur-dev] [PATCH v3 1/3] Use username from the database if one is provided by the user

2015-07-15 Thread Marcel Korpel
This fixes a bug where the new user name input by the user was invalid, causing the account deletion link and the form action to be wrong. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/account.php | 4 ++-- web/lib/acctfuncs.inc.php | 8 +--- web

Re: [aur-dev] [PATCH 1/3] Use username from the database if one is provided by the user

2015-07-13 Thread Marcel Korpel
* Lukas Fleischer lfleisc...@archlinux.org (Mon, 13 Jul 2015 09:13:24 +0200): Could you explain why this is needed? Doesn't $N always refer to the correct user name? Related comment below. […] I am confused. We only call display_account_form() here if an error occurs *before* updating the

[aur-dev] [PATCH v2 3/3] Set correct 'My Account' link after changing username

2015-07-13 Thread Marcel Korpel
This fix uses the POST-Redirect-GET pattern to reload the account update page. Output if buffered to be able to send the correct headers after the account has been successfully modified. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/account.php | 12 web/lib

[aur-dev] [PATCH v2 1/3] Use username from the database if one is provided by the user

2015-07-13 Thread Marcel Korpel
This fixes a bug where the new user name input by the user was invalid, causing the account deletion link and the form action to be wrong. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/account.php | 4 ++-- web/lib/acctfuncs.inc.php | 8 +--- web

[aur-dev] [PATCH v2 2/3] Surround message with p tags

2015-07-13 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/register.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/html/register.php b/web/html/register.php index 014d802..cb3e8dd 100644 --- a/web/html/register.php +++ b/web/html/register.php @@ -25,7 +25,7

Re: [aur-dev] [PATCH 3/3] Only output page header after account has been modified

2015-07-13 Thread Marcel Korpel
* Marcel Korpel marcel.kor...@gmail.com (Mon, 13 Jul 2015 16:22:43 +0200): Also a better solution! We will have to send error messages through, though, which is not trivial. Using a GET parameter? That doesn't feel like the best way. Looking better at it, it *seems* easier, as the only time we

[aur-dev] [PATCH] Don't change tables manually before deleting a user

2015-07-12 Thread Marcel Korpel
All this is correctly taken care of by the database. This fixes several bugs where records should be deleted instead of NULLified. For example, when a comment deleter's account was deleted, DelUsersID of the comment was (re)set to NULL, causing the comment to appear again. Signed-off-by: Marcel

[aur-dev] [PATCH 3/4] Add horizontal scrollbar to code blocks when necessary

2015-07-11 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/css/aurweb.css | 4 1 file changed, 4 insertions(+) diff --git a/web/html/css/aurweb.css b/web/html/css/aurweb.css index b33726c..6bd7eb3 100644 --- a/web/html/css/aurweb.css +++ b/web/html/css/aurweb.css @@ -124,6 +124,10

[aur-dev] [PATCH 4/4] Use a normal font size for code blocks

2015-07-11 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/css/aurweb.css | 1 + 1 file changed, 1 insertion(+) diff --git a/web/html/css/aurweb.css b/web/html/css/aurweb.css index 6bd7eb3..691a634 100644 --- a/web/html/css/aurweb.css +++ b/web/html/css/aurweb.css @@ -125,6 +125,7

[aur-dev] [PATCH 0/4] Add support for markdown code blocks and inline code

2015-07-11 Thread Marcel Korpel
Only a subset of markdown is support, i.e.: ``` code blocks ``` and `inline code`. Marcel Korpel (4): Convert markdown codeblocks to HTML code blocks Add support for markdown inline code Add horizontal scrollbar to code blocks when necessary Use a normal font size for code blocks web

[aur-dev] [PATCH 2/4] Add support for markdown inline code

2015-07-11 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/lib/aur.inc.php | 47 ++- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php index 4b1850f..d0c8c98 100644 --- a/web/lib/aur.inc.php +++ b

[aur-dev] [PATCH 2/3] Surround message within p tags

2015-07-11 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/register.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/html/register.php b/web/html/register.php index 014d802..cb3e8dd 100644 --- a/web/html/register.php +++ b/web/html/register.php @@ -25,7 +25,7

[aur-dev] [PATCH 3/3] Only output page header after account has been modified

2015-07-11 Thread Marcel Korpel
When a user account is modified, the 'My Account' link should contain the new username, otherwise clicking it directly after editing a username will result in a 404. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/account.php | 12 +--- web/html/register.php

[aur-dev] [PATCH 1/3] Use username from the database if one is provided by the user

2015-07-11 Thread Marcel Korpel
This fixes a bug where the new user name input by the user was invalid, causing the account deletion link and the form action to be wrong. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/account.php | 2 +- web/lib/acctfuncs.inc.php | 29

[aur-dev] [PATCH v2] Fix issue with ending delimiter of code block

2015-07-11 Thread Marcel Korpel
When a comment ends with ``` without a newline character, the delimiter is not correctly recognized. Fix by adding a newline character. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- Change since v1: * Fix commit message web/lib/aur.inc.php | 6 ++ 1 file changed, 6 insertions

[aur-dev] [PATCH v2 1/3] Add horizontal scrollbar to code blocks when necessary

2015-07-11 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/css/aurweb.css | 4 1 file changed, 4 insertions(+) diff --git a/web/html/css/aurweb.css b/web/html/css/aurweb.css index b33726c..6bd7eb3 100644 --- a/web/html/css/aurweb.css +++ b/web/html/css/aurweb.css @@ -124,6 +124,10

[aur-dev] [PATCH v2 3/3] Convert markdown codeblocks and inline code to HTML

2015-07-11 Thread Marcel Korpel
Only codeblocks delimited with ```newline are supported. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- Changes from v1: * Convert one line at a time * Use preg_replace_callback to convert inline code and URLs * Now URLs within inline code are also converted, unwanted behaviour

[aur-dev] [PATCH] Update PHPDoc description of parse_comment()

2015-07-11 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/lib/aur.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php index d370788..7e85959 100644 --- a/web/lib/aur.inc.php +++ b/web/lib/aur.inc.php @@ -596,7 +596,9

[aur-dev] [PATCH] Don't add br at the end of a comment

2015-07-11 Thread Marcel Korpel
If the comment ends with a newline, a superfluous br is inserted, resulting in extra whitespace at the end of the comment. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/lib/aur.inc.php | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/lib/aur.inc.php

Re: [aur-dev] [PATCH 4/6] Only autofocus search field on the package search page

2015-07-10 Thread Marcel Korpel
* Lukas Fleischer lfleisc...@archlinux.org (Fri, 10 Jul 2015 16:35:37 +0200): Huh? Doesn't this disable the autofocus on the package search page as well? No: $tokens[0] will contain 'packages' and $tokens[1] will be empty, even if there are query parameters specified, e.g.:

[aur-dev] [PATCH 1/6] Add comment edit icon and form

2015-07-10 Thread Marcel Korpel
Shows an icon next to the comment deletion icon, which leads to a comment edit form. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/commentedit.php | 21 +++ web/html/css/aurweb.css | 13 ++--- web/html/images/pencil.min.svg| 3 +++ web

[aur-dev] [PATCH 2/6] Edit a comment in the backend

2015-07-10 Thread Marcel Korpel
In the backend I created two new actions, do_AddComment and do_EditComment. When editing or deleting a comment, a timestamp is added. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- schema/aur-schema.sql| 2 ++ web/html/pkgbase.php | 2 ++ web/lib/pkgbasefuncs.inc.php

[aur-dev] [PATCH 6/6] Jump to comment after editing

2015-07-10 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/pkgbase.php | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php index 5886f71..36b2aa5 100644 --- a/web/html/pkgbase.php +++ b/web/html/pkgbase.php @@ -46,6 +46,7

[aur-dev] [PATCH 5/6] Add IDs to comments

2015-07-10 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/template/pkg_comments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php index 380c858..8d6675b 100644 --- a/web/template/pkg_comments.php +++ b/web

[aur-dev] [PATCH 0/6] Add comment edit functionality

2015-07-10 Thread Marcel Korpel
Implements FS#34690. Marcel Korpel (6): Add comment edit icon and form Edit a comment in the backend Show dateline when a comment is edited or deleted Only autofocus search field on the package search page Add IDs to comments Jump to comment after editing schema/aur-schema.sql

[aur-dev] [PATCH v2 6/6] Jump to comment after editing

2015-07-10 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/pkgbase.php | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php index 5886f71..65077b3 100644 --- a/web/html/pkgbase.php +++ b/web/html/pkgbase.php @@ -46,6

[aur-dev] [PATCH v4 0/6] Add comment edit functionality

2015-07-10 Thread Marcel Korpel
Implements FS#34690. Marcel Korpel (6): Add comment edit icon and form Edit a comment in the backend Show dateline when a comment is edited or deleted Only autofocus search field on the package search page Add IDs to comments Jump to comment after editing schema/aur-schema.sql

[aur-dev] [PATCH v4 6/6] Jump to comment after editing

2015-07-10 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/pkgbase.php | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php index 5886f71..65077b3 100644 --- a/web/html/pkgbase.php +++ b/web/html/pkgbase.php @@ -46,6

[aur-dev] [PATCH v4 4/6] Only autofocus search field on the package search page

2015-07-10 Thread Marcel Korpel
This needs to be disabled on package pages to be able to add a URL fragment after comment editing. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/template/pkg_search_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/template/pkg_search_form.php b/web

[aur-dev] [PATCH v4 5/6] Add IDs to comments

2015-07-10 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/template/pkg_comments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php index 91fdc26..e86db3b 100644 --- a/web/template/pkg_comments.php +++ b/web

[aur-dev] [PATCH v4 3/6] Show dateline when a comment is edited or deleted

2015-07-10 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- Change since v3: * Show edit info in h4 instead of on a separate line. web/html/css/aurweb.css | 5 + web/lib/pkgbasefuncs.inc.php | 9 ++--- web/template/pkg_comments.php | 14 ++ 3 files changed, 21

[aur-dev] [PATCH v2 2/6] Edit a comment in the backend

2015-07-10 Thread Marcel Korpel
Create two new actions, do_AddComment and do_EditComment. When editing or deleting a comment, a timestamp is added. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- schema/aur-schema.sql| 2 ++ web/html/pkgbase.php | 2 ++ web/lib/pkgbasefuncs.inc.php | 34

[aur-dev] [PATCH v2 1/6] Add comment edit icon and form

2015-07-10 Thread Marcel Korpel
Show an icon next to the comment deletion icon, which leads to a comment edit form. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/commentedit.php | 21 +++ web/html/css/aurweb.css | 13 ++--- web/html/images/pencil.min.svg| 3 +++ web

[aur-dev] [PATCH v2 0/6] Add comment edit functionality

2015-07-10 Thread Marcel Korpel
Implements FS#34690. Marcel Korpel (6): Add comment edit icon and form Edit a comment in the backend Show dateline when a comment is edited or deleted Only autofocus search field on the package search page Add IDs to comments Jump to comment after editing schema/aur-schema.sql

[aur-dev] [PATCH v2 3/6] Show dateline when a comment is edited or deleted

2015-07-10 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/css/aurweb.css | 6 ++ web/lib/pkgbasefuncs.inc.php | 9 ++--- web/template/pkg_comments.php | 17 ++--- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/web/html/css/aurweb.css b/web

[aur-dev] [PATCH v2 5/6] Add IDs to comments

2015-07-10 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/template/pkg_comments.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php index 33a71b4..a91ec28 100644 --- a/web/template/pkg_comments.php +++ b/web/template

[aur-dev] [PATCH v2 4/6] Only autofocus search field on the package search page

2015-07-10 Thread Marcel Korpel
This needs to be disabled on package pages to be able to add a URL fragment after comment editing. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/template/pkg_search_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/template/pkg_search_form.php b/web

[aur-dev] [PATCH v3 3/6] Show dateline when a comment is edited or deleted

2015-07-10 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- Change since v1: * Use html_format_username to format usernames. web/html/css/aurweb.css | 6 ++ web/lib/pkgbasefuncs.inc.php | 9 ++--- web/template/pkg_comments.php | 17 ++--- 3 files changed, 26 insertions

[aur-dev] [PATCH v3 2/6] Edit a comment in the backend

2015-07-10 Thread Marcel Korpel
Create two new actions, do_AddComment and do_EditComment. When editing or deleting a comment, a timestamp is added. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- schema/aur-schema.sql| 2 ++ web/html/pkgbase.php | 2 ++ web/lib/pkgbasefuncs.inc.php | 34

[aur-dev] [PATCH v3 1/6] Add comment edit icon and form

2015-07-10 Thread Marcel Korpel
Show an icon next to the comment deletion icon, which leads to a comment edit form. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- Changes since v1: * Renamed function pkgbase_get_comment to comment_by_id and put it in aur.inc.php. * Cast $comment_id explicitly. web/html

[aur-dev] [PATCH v3 4/6] Only autofocus search field on the package search page

2015-07-10 Thread Marcel Korpel
This needs to be disabled on package pages to be able to add a URL fragment after comment editing. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/template/pkg_search_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/template/pkg_search_form.php b/web

[aur-dev] [PATCH 1/2] Create missing foreign key for comments

2015-07-10 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- schema/aur-schema.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql index 3aef7a3..444cb5e 100644 --- a/schema/aur-schema.sql +++ b/schema/aur-schema.sql @@ -261,6 +261,7 @@ CREATE TABLE

[aur-dev] [PATCH 2/2] Add upgrade instructions for comment editing feature

2015-07-10 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- upgrading/4.1.0.txt | 9 + 1 file changed, 9 insertions(+) create mode 100644 upgrading/4.1.0.txt diff --git a/upgrading/4.1.0.txt b/upgrading/4.1.0.txt new file mode 100644 index 000..7862030 --- /dev/null +++ b/upgrading

[aur-dev] [PATCH] Write Anonymous comment if commenter is deleted

2015-07-10 Thread Marcel Korpel
Due to the use of html_format_username() the username was set to None if the user was deleted, causing the condition of an empty username never being met. Fixed with an extra variable that stores the formatted username. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/template

Re: [aur-dev] [PATCH] Use sans serif in textareas

2015-07-09 Thread Marcel Korpel
* Marcel Korpel marcel.kor...@gmail.com (Fri, 10 Jul 2015 03:04:42 +0200): * Hugo Osvaldo Barrera h...@barrera.io (Thu, 09 Jul 2015 21:23:22 -0300): I've seen lots of short code snippets pasted into the comments. I think keeping the monospaced font there makes sense too (I'd even argue

[aur-dev] [PATCH/RFC 2/3] Edit a comment in the backend

2015-07-08 Thread Marcel Korpel
In the backend I created two new actions, do_AddComment and do_EditComment. When editing or deleting a comment, a timestamp is added. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- schema/aur-schema.sql| 2 ++ web/html/pkgbase.php | 2 ++ web/lib/pkgbasefuncs.inc.php

[aur-dev] [PATCH/RFC 1/3] Add comment edit icon and form

2015-07-08 Thread Marcel Korpel
Shows a link next to the comment deletion icon, which leads to a comment edit form. Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/commentedit.php | 21 + web/html/css/aurweb.css | 4 web/html/images/pencil.png| Bin 0

[aur-dev] [RFC] Add comment edit icon and form

2015-07-07 Thread Marcel Korpel
Partly implements FS#34690. --- web/html/commentedit.php | 21 + web/html/css/aurweb.css | 4 web/html/images/pencil.png| Bin 0 - 429 bytes web/html/index.php| 4 web/lib/credentials.inc.php |

[aur-dev] [RFC] Edit a comment in the backend

2015-07-07 Thread Marcel Korpel
Implements FS#34690. Also, when deleting a comment, a timestamp is added (so, in the future, the page could display something like: Edited/Deleted TS by Name). --- schema/aur-schema.sql| 2 ++ web/html/pkgbase.php | 2 ++ web/lib/pkgbasefuncs.inc.php | 34

[aur-dev] [RFC] Show dateline when a comment is edited or deleted

2015-07-07 Thread Marcel Korpel
--- web/html/css/aurweb.css | 6 ++ web/lib/pkgbasefuncs.inc.php | 9 ++--- web/template/pkg_comments.php | 15 +++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/web/html/css/aurweb.css b/web/html/css/aurweb.css index 47166d3..a9f1514 100644 ---

[aur-dev] [PATCH] Remove superfluous close tags

2015-07-07 Thread Marcel Korpel
These are already output by html_action_link. --- web/template/pkgbase_actions.php | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/template/pkgbase_actions.php b/web/template/pkgbase_actions.php index 61ad18f..c7428ee 100644 --- a/web/template/pkgbase_actions.php

Re: [aur-dev] [PATCH] Show number of selected packages on search page

2015-06-30 Thread Marcel Korpel
* Johannes Löthberg johan...@kyriasis.com (Sun, 28 Jun 2015 21:22:05 +0200): +function checkboxes() { +document.getElementById(pkglist-checked-count).innerHTML = document.querySelectorAll('input[type=checkbox]:checked').length; +} + $(document).ready(function() {

Re: [aur-dev] [PATCH] Redirect at previous page after a successful login

2015-06-19 Thread Marcel Korpel
* Lukas Fleischer lfleisc...@archlinux.org (Fri, 19 Jun 2015 15:04:14 +0200): + input id=id_referer type=hidden name=referer value=?= !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/'; ? / Please use urlencode() to escape the value of

Re: [aur-dev] [PATCH] Redirect at previous page after a successful login

2015-06-19 Thread Marcel Korpel
* Gordian Edenhofer gordian.edenho...@gmail.com (Thu, 18 Jun 2015 21:28:17 +0200): After the user was authenticated a redirect to the site which linked the user to the login page is done. This fixes FS#32481. --- […] + input id=id_referer type=hidden name=referer

Re: [aur-dev] [PATCH v6] pkg_details.php: Show keywords

2015-06-18 Thread Marcel Korpel
* Lukas Fleischer lfleisc...@archlinux.org (Thu, 18 Jun 2015 09:14:23 +0200): +td#keywords { + white-space: normal; +} Is this needed? For one reason or another in archweb.css is (l. 246ff.): th, td { white-space: nowrap; text-align: left; } If we don't reset that for this

[aur-dev] [PATCH v2] pkg_details.php: Show keywords

2015-06-17 Thread Marcel Korpel
Signed-off-by: Marcel Korpel marcel.kor...@gmail.com --- web/html/css/aurweb.css | 13 + web/template/pkg_details.php | 14 -- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/web/html/css/aurweb.css b/web/html/css/aurweb.css index a3f43bd..dfa97bd

  1   2   >