webbuild: redirect to site login page and cgi update

This commit is contained in:
Silvan Calarco 2015-08-22 19:01:14 +02:00
parent fff6675ad3
commit 40decd8435
2 changed files with 9 additions and 4 deletions

View File

@ -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 "<option value=\"$PACKAGEENCODED\" $SELECTED>$PACKAGE (defaults)</option>"
fi
echo -n "</select>"
if [ "$AUTODISTJOBSELECTED" -a "$AUTODISTJOB" = "${PACKAGE/-/_}" ]; then
if [ "$AUTODISTJOBSELECTED" -a "$AUTODISTJOB" = "${PACKAGE//[-]/_}" ]; then
echo -n "<br><font color=red>You should use autodist for this package!</font>"
fi
if [ "$AUTODISTJOB" ]; then

View File

@ -1,4 +1,9 @@
<?php
if (!is_user_logged_in()) {
wp_redirect( wp_login_url( "http://".$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI] ));
}
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) {