Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Leif Andersson
ReglerAddress
Commits
31dfdf6c
Commit
31dfdf6c
authored
Sep 16, 2015
by
Leif Andersson
Browse files
Ändrade plats för listorna xxx.dis
parent
d1d5e3de
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/class.Group.php
View file @
31dfdf6c
...
@@ -175,9 +175,11 @@ EOS;
...
@@ -175,9 +175,11 @@ EOS;
public
static
function
setMailLists
()
{
public
static
function
setMailLists
()
{
global
$gCms
;
if
(
!
isset
(
$gCms
))
exit
;
global
$gCms
;
if
(
!
isset
(
$gCms
))
exit
;
$config
=&
$gCms
->
GetConfig
();
$maildir
=
$config
[
'root_path'
]
.
'/uploads/mailinglists'
;
$db
=
AddressDB
::
getDB
();
$db
=
AddressDB
::
getDB
();
$groups
=
self
::
getGroupList
();
$groups
=
self
::
getGroupList
();
if
(
!
is_dir
(
self
::
$maildir
))
mkdir
(
self
::
$maildir
,
'0755'
,
true
);
//
if(!is_dir(self::$maildir)) mkdir(self::$maildir,'0755',true);
foreach
(
$groups
as
$group
)
{
foreach
(
$groups
as
$group
)
{
$pos
=
strrpos
(
$group
->
Gruppnamn
,
'.dis'
);
$pos
=
strrpos
(
$group
->
Gruppnamn
,
'.dis'
);
if
(
$pos
===
false
)
continue
;
if
(
$pos
===
false
)
continue
;
...
@@ -191,7 +193,7 @@ EOS;
...
@@ -191,7 +193,7 @@ EOS;
}
}
if
(
count
(
$epost
)
>
0
)
{
if
(
count
(
$epost
)
>
0
)
{
// echo '<pre>'; print_r($epost); echo '</pre>';
// echo '<pre>'; print_r($epost); echo '</pre>';
$filename
=
self
::
$maildir
.
'/'
.
$group
->
Gruppnamn
;
$filename
=
$maildir
.
'/'
.
$group
->
Gruppnamn
;
$file
=
fopen
(
$filename
,
'w'
);
$file
=
fopen
(
$filename
,
'w'
);
if
(
$file
===
false
)
die
(
'Cannot write '
.
$filename
);
if
(
$file
===
false
)
die
(
'Cannot write '
.
$filename
);
foreach
(
$epost
as
$line
)
fwrite
(
$file
,
$line
.
PHP_EOL
);
foreach
(
$epost
as
$line
)
fwrite
(
$file
,
$line
.
PHP_EOL
);
...
...
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