Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Sympa
Commits
fdb42a0a
Commit
fdb42a0a
authored
Apr 16, 2017
by
IKEDA Soji
Browse files
[-bug] List topic names cannot be "others" or "topicsless".
They in topics.conf would be ignored.
parent
84d89d34
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/Sympa/Robot.pm
View file @
fdb42a0a
...
...
@@ -172,8 +172,9 @@ sub update_email_netidmap_db {
return
1
;
}
## Loads the list of topics if updated
## FIXME: This might be moved to Robot package.
# Loads the list of topics if updated.
# The topic names "others" and "topicsless" are reserved words therefore
# ignored. Note: "other" is not reserved and may be used.
sub
load_topics
{
my
$robot
=
shift
;
$log
->
syslog
('
debug2
',
'
(%s)
',
$robot
);
...
...
@@ -210,7 +211,10 @@ sub load_topics {
my
(
@rough_data
,
$topic
);
while
(
<
FILE
>
)
{
Encode::
from_to
(
$_
,
$
Conf::
Conf
{'
filesystem_encoding
'},
'
utf8
');
if
(
/^([\-\w\/]+)\s*$/
)
{
if
(
/\A(others|topicsless)\s*\z/
)
{
# "others" and "topicsless" are reserved words. Ignore.
next
;
}
elsif
(
/^([\-\w\/]+)\s*$/
)
{
$index
++
;
$topic
=
{
'
name
'
=>
$
1
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment