Hello,

While using the preferences extension option, i noticed that although i could change the default configurations, in the Administration tab of admin.cgi, the existing configuration would not show up.

I added a couple of lines to admin.cgi so that if no username was defined, which is the case, then, it would use the username "default" which is what one can use to list the default user prefs.

Also i apologise for sending the last message to the users list also, when it's clearly a -dev matter.


Regards,

Hugo Monteiro.


--- /var/www/dspam/admin.cgi    2008-04-20 21:53:28.000000000 +0100
+++ dspam/admin.cgi     2007-02-05 17:27:52.000000000 +0000
@@ -126,8 +121,13 @@
sub DisplayPreferences {
  my(%PREFS, $FILE, $USER);

-  $DATA{'USERNAME'} = $FORM{'username'};
-  $USER = $FORM{'username'};
+  if ($FORM{'username'} eq "") {
+    $USER = "default";
+  } else {
+    $USER = $FORM{'username'};
+  }
+
+  $DATA{'USERNAME'} = $USER;

  if ($FORM{'username'} eq "") {
    $FILE = "/etc/dspam/default.prefs";
@@ -704,6 +693,11 @@
  my($USER, $FILE) = @_;

  if ($CONFIG{'PREFERENCES_EXTENSION'} == 1) {
+
+    if ($USER eq "") {
+      $USER = "default";
+    }
+
open(PIPE, "$CONFIG{'DSPAM_BIN'}/dspam_admin agg pref ".quotemeta($USER)."|");
    while(<PIPE>) {
      chomp;

--
ci.fct.unl.pt:~# cat .signature

Hugo Monteiro
Email    : [EMAIL PROTECTED]
Telefone : +351 212948300 Ext.15307

Centro de Informática
Faculdade de Ciências e Tecnologia da
                   Universidade Nova de Lisboa
Quinta da Torre   2829-516 Caparica   Portugal
Telefone: +351 212948596   Fax: +351 212948548
www.ci.fct.unl.pt             [EMAIL PROTECTED]

ci.fct.unl.pt:~# _


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to