From 40decd8435d56a7e010077ac513fb0978d04dc45 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 22 Aug 2015 19:01:14 +0200 Subject: [PATCH] webbuild: redirect to site login page and cgi update --- cgi-bin/webbuild | 8 ++++---- webbuild-page.php | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/cgi-bin/webbuild b/cgi-bin/webbuild index 0929df6..5d74674 100755 --- a/cgi-bin/webbuild +++ b/cgi-bin/webbuild @@ -1200,7 +1200,7 @@ fi if [ "$PACKAGE" ]; then [ "$AUTODISTJOB" ] || AUTODISTJOB=${PACKAGE/\/*} - AUTODISTJOB="${AUTODISTJOB/-/_}" + AUTODISTJOB="${AUTODISTJOB//[-]/_}" PACKAGE=${PACKAGE/*\/} eval `$SUDO_WRAPPER specinfo $ENVIRONMENT "$USER" $PACKAGE ""` [ $? -eq 0 ] && SPECAVAILABLE=1 @@ -1341,10 +1341,10 @@ if [ "$MAINTAINERMODE" != "true" ]; then if [ "$AUTODISTJOB" -a "$AUTODISTJOB" = "$f" ]; then SELECTED="selected=\"selected\"" AUTODISTJOBSELECTED=1 - elif [ "$PACKAGE" = "$f" -a ! "$AUTODISTJOB" ]; then + elif [ "${PACKAGE}" = "$f" -a ! "$AUTODISTJOB" ]; then # elif [ "$PACKAGE" = "$f" -a ! "$AUTODISTJOBSELECTED" -a "$REQUEST" != "autodistjobchange" ]; then SELECTED="selected=\"selected\"" - AUTODISTJOB=$f + AUTODISTJOB=${f//[-]/_} AUTODISTJOBSELECTED=1 fi JOBENCODED=`cgi_encodevar $f` @@ -1356,7 +1356,7 @@ if [ "$MAINTAINERMODE" != "true" ]; then echo -n "" fi echo -n "" - if [ "$AUTODISTJOBSELECTED" -a "$AUTODISTJOB" = "${PACKAGE/-/_}" ]; then + if [ "$AUTODISTJOBSELECTED" -a "$AUTODISTJOB" = "${PACKAGE//[-]/_}" ]; then echo -n "
You should use autodist for this package!" fi if [ "$AUTODISTJOB" ]; then diff --git a/webbuild-page.php b/webbuild-page.php index d1db59f..b1db6cb 100644 --- a/webbuild-page.php +++ b/webbuild-page.php @@ -1,4 +1,9 @@