]> git.p6c8.net - selfforum.git/blobdiff - selfforum-cgi/shared/Conf/Admin.pm
just a test
[selfforum.git] / selfforum-cgi / shared / Conf / Admin.pm
index 0a50ee8fe8a11a085fc88e679e260055da31f0a8..09bb103554fe2b211d11bd388b8f4130974bfe18 100644 (file)
@@ -60,8 +60,8 @@ sub read_admin_conf ($) {
                       countMessages => $thread_view -> getAttribute ('countMessages'),
                       sortThreads   => $thread_view -> getAttribute ('sortThreads'),
                       sortMessages  => $thread_view -> getAttribute ('sortMessages'),
                       countMessages => $thread_view -> getAttribute ('countMessages'),
                       sortThreads   => $thread_view -> getAttribute ('sortThreads'),
                       sortMessages  => $thread_view -> getAttribute ('sortMessages'),
-                      showThread    => (($how_name eq 'showAll')?undef:
-                                       (($how_name eq 'showNone')?1:
+                      showThread    => (($how_name eq 'ShowAll')?undef:
+                                       (($how_name eq 'ShowNone')?1:
                                        ($show_how -> getFirstChild -> getData))),
                       showPreview   => $message_view -> getAttribute ('previewON'),
                       showNA        => $flags -> getAttribute ('showNA'),
                                        ($show_how -> getFirstChild -> getData))),
                       showPreview   => $message_view -> getAttribute ('previewON'),
                       showNA        => $flags -> getAttribute ('showNA'),
@@ -69,6 +69,12 @@ sub read_admin_conf ($) {
                       quoting       => $quoting -> getAttribute ('quotingON'),
                       quoteChars    => $char?$char -> getFirstChild -> getData:undef};
 
                       quoting       => $quoting -> getAttribute ('quotingON'),
                       quoteChars    => $char?$char -> getFirstChild -> getData:undef};
 
+      my $voting = $forum -> getElementsByTagName ('Voting', 0) -> item (0);
+      $conf {Voting} = {
+        voteLock => $voting -> getAttribute ('voteLock'),
+        Limit    => $voting -> getAttribute ('Limit')
+      };
+
       # Severance
       $conf {Severance} = &get_severance ($forum -> getElementsByTagName ('Severance', 0) -> item (0));
 
       # Severance
       $conf {Severance} = &get_severance ($forum -> getElementsByTagName ('Severance', 0) -> item (0));
 
@@ -83,9 +89,9 @@ sub read_admin_conf ($) {
                            voting     => $messaging -> getAttribute ('callAdminVoting'),
                            archiving  => $messaging -> getAttribute ('callAdminArchiving'),
                            byUser     => $messaging -> getAttribute ('callUserAnswer'),
                            voting     => $messaging -> getAttribute ('callAdminVoting'),
                            archiving  => $messaging -> getAttribute ('callAdminArchiving'),
                            byUser     => $messaging -> getAttribute ('callUserAnswer'),
-                           callByName => [map {$_ -> getFirstChild -> getData} $call_by_user -> getElementsByTagName ('Name', 0)],
-                           callByMail => [map {$_ -> getFirstChild -> getData} $call_by_user -> getElementsByTagName ('Email', 0)],
-                           callByIP   => [map {$_ -> getFirstChild -> getData} $call_by_user -> getElementsByTagName ('IpAddress', 0)]};
+                           callByName => [$call_by_user?map {$_ -> getFirstChild -> getData} $call_by_user -> getElementsByTagName ('Name', 0):()],
+                           callByMail => [$call_by_user?map {$_ -> getFirstChild -> getData} $call_by_user -> getElementsByTagName ('Email', 0):()],
+                           callByIP   => [$call_by_user?map {$_ -> getFirstChild -> getData} $call_by_user -> getElementsByTagName ('IpAddress', 0):()]};
 
       # Instant
       my $instant    = $forum   -> getElementsByTagName ('InstantJob', 0) -> item (0);
 
       # Instant
       my $instant    = $forum   -> getElementsByTagName ('InstantJob', 0) -> item (0);

patrick-canterino.de