[kde-services-devel] r500 - trunk/commitfilter/web
josef at new.kstuff.org
josef at new.kstuff.org
Fri Feb 13 07:55:10 CET 2009
Author: josef
Date: 2009-02-13 07:55:10 +0100 (Fri, 13 Feb 2009)
New Revision: 500
Modified:
trunk/commitfilter/web/func.my.inc
trunk/commitfilter/web/index.php
trunk/commitfilter/web/my.inc
Log:
- delegate bounce reset from administrator to user - all power to the user! :)
Modified: trunk/commitfilter/web/func.my.inc
===================================================================
--- trunk/commitfilter/web/func.my.inc 2009-02-13 06:44:11 UTC (rev 499)
+++ trunk/commitfilter/web/func.my.inc 2009-02-13 06:55:10 UTC (rev 500)
@@ -73,6 +73,8 @@
$deleteauthor = $_GET['deleteauthor'];
$deleteregex = $_GET['deleteregex'];
+$reenable = $_GET['reenable'];
+
$submitmanual = $_POST['submitmanual'];
$manualadd_dir = $_POST['manualadd_dir'];
$submitauthor = $_POST['submitauthor'];
@@ -163,6 +165,14 @@
table_stop();
endif;
+if ($reenable) :
+ pg_exec($id, "UPDATE users SET disabled = 0, bounces = 0 WHERE username = '$username'");
+
+ table_start();
+ echo "Your bounce counter was reset. Mail delivery is enabled again.";
+ table_stop();
+endif;
+
if ($conf_email) :
if ($conf_news) :
$news = 1;
Modified: trunk/commitfilter/web/index.php
===================================================================
--- trunk/commitfilter/web/index.php 2009-02-13 06:44:11 UTC (rev 499)
+++ trunk/commitfilter/web/index.php 2009-02-13 06:55:10 UTC (rev 500)
@@ -83,6 +83,7 @@
$page = "my";
$email = pg_result($res, 0, "email");
$news = pg_result($res, 0, "news");
+ $disabled = pg_result($res, 0, "disabled");
else :
ob_start();
table_start();
Modified: trunk/commitfilter/web/my.inc
===================================================================
--- trunk/commitfilter/web/my.inc 2009-02-13 06:44:11 UTC (rev 499)
+++ trunk/commitfilter/web/my.inc 2009-02-13 06:55:10 UTC (rev 500)
@@ -11,7 +11,7 @@
<?php
if ($disabled) :
echo "Mail delivery to your account has been disabled due to bounces.\n";
- echo "Please contact the site administrator.\n";
+ echo "Make sure the reason for these bounces has been found, and click <a href='index.php?page=my&reenable=1'>here</a> to enable delivery again.\n";
echo "<br><br>\n";
endif;
if (!$email) :
More information about the kde-services-devel
mailing list