Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISPConfig
ISPConfig 3
Commits
86e6990d
Commit
86e6990d
authored
May 22, 2015
by
Marius Cramer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- checked and fixed usage of empty()
parent
7de1b7b5
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
14 additions
and
13 deletions
+14
-13
install/dist/lib/centos52.lib.php
install/dist/lib/centos52.lib.php
+2
-1
install/dist/lib/centos53.lib.php
install/dist/lib/centos53.lib.php
+2
-2
install/dist/lib/centos70.lib.php
install/dist/lib/centos70.lib.php
+1
-1
install/dist/lib/fedora.lib.php
install/dist/lib/fedora.lib.php
+1
-1
install/dist/lib/opensuse.lib.php
install/dist/lib/opensuse.lib.php
+1
-1
install/lib/installer_base.lib.php
install/lib/installer_base.lib.php
+1
-1
interface/lib/app.inc.php
interface/lib/app.inc.php
+1
-1
interface/lib/classes/tform_base.inc.php
interface/lib/classes/tform_base.inc.php
+2
-2
server/lib/classes/file.inc.php
server/lib/classes/file.inc.php
+1
-1
server/plugins-available/mailman_plugin.inc.php
server/plugins-available/mailman_plugin.inc.php
+2
-2
No files found.
install/dist/lib/centos52.lib.php
View file @
86e6990d
...
...
@@ -51,7 +51,7 @@ class installer extends installer_dist {
if
(
trim
(
$line
)
!=
''
&&
substr
(
$line
,
0
,
1
)
!=
'#'
)
{
@
list
(
$key
,
$value
)
=
@
explode
(
"="
,
$line
);
if
(
!
empty
(
$value
))
if
(
isset
(
$value
)
&&
$value
!==
''
)
{
$key
=
rtrim
(
$key
);
$old_options
[
$key
]
=
trim
(
$value
);
...
...
@@ -112,6 +112,7 @@ class installer extends installer_dist {
// amavisd user config file
$configfile
=
'fedora_amavisd_conf'
;
if
(
!
is_dir
(
$conf
[
"amavis"
][
"config_dir"
]))
mkdir
(
$conf
[
"amavis"
][
"config_dir"
]);
if
(
is_file
(
$conf
[
"amavis"
][
"config_dir"
]
.
'/amavisd.conf'
))
copy
(
$conf
[
"amavis"
][
"config_dir"
]
.
'/amavisd.conf'
,
$conf
[
"amavis"
][
"config_dir"
]
.
'/amavisd.conf~'
);
if
(
is_file
(
$conf
[
"amavis"
][
"config_dir"
]
.
'/amavisd.conf~'
))
exec
(
'chmod 400 '
.
$conf
[
"amavis"
][
"config_dir"
]
.
'/amavisd.conf~'
);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/'
.
$configfile
.
'.master'
,
"tpl/"
.
$configfile
.
".master"
);
...
...
install/dist/lib/centos53.lib.php
View file @
86e6990d
...
...
@@ -51,7 +51,7 @@ class installer extends installer_dist {
if
(
trim
(
$line
)
!=
''
&&
substr
(
$line
,
0
,
1
)
!=
'#'
)
{
@
list
(
$key
,
$value
)
=
@
explode
(
"="
,
$line
);
if
(
!
empty
(
$value
))
if
(
isset
(
$value
)
&&
$value
!==
''
)
{
$key
=
rtrim
(
$key
);
$old_options
[
$key
]
=
trim
(
$value
);
...
...
@@ -112,9 +112,9 @@ class installer extends installer_dist {
// amavisd user config file
$configfile
=
'fedora_amavisd_conf'
;
if
(
!
is_dir
(
$conf
[
"amavis"
][
"config_dir"
]))
mkdir
(
$conf
[
"amavis"
][
"config_dir"
]);
if
(
is_file
(
$conf
[
"amavis"
][
"config_dir"
]
.
'/amavisd.conf'
))
copy
(
$conf
[
"amavis"
][
"config_dir"
]
.
'/amavisd.conf'
,
$conf
[
"amavis"
][
"config_dir"
]
.
'/amavisd.conf~'
);
if
(
is_file
(
$conf
[
"amavis"
][
"config_dir"
]
.
'/amavisd.conf~'
))
exec
(
'chmod 400 '
.
$conf
[
"amavis"
][
"config_dir"
]
.
'/amavisd.conf~'
);
if
(
!
is_dir
(
$conf
[
"amavis"
][
"config_dir"
]))
mkdir
(
$conf
[
"amavis"
][
"config_dir"
]);
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/'
.
$configfile
.
'.master'
,
"tpl/"
.
$configfile
.
".master"
);
$content
=
str_replace
(
'{mysql_server_ispconfig_user}'
,
$conf
[
'mysql'
][
'ispconfig_user'
],
$content
);
$content
=
str_replace
(
'{mysql_server_ispconfig_password}'
,
$conf
[
'mysql'
][
'ispconfig_password'
],
$content
);
...
...
install/dist/lib/centos70.lib.php
View file @
86e6990d
...
...
@@ -51,7 +51,7 @@ class installer extends installer_dist {
if
(
trim
(
$line
)
!=
''
&&
substr
(
$line
,
0
,
1
)
!=
'#'
)
{
@
list
(
$key
,
$value
)
=
@
explode
(
"="
,
$line
);
if
(
!
empty
(
$value
))
if
(
isset
(
$value
)
&&
$value
!==
''
)
{
$key
=
rtrim
(
$key
);
$old_options
[
$key
]
=
trim
(
$value
);
...
...
install/dist/lib/fedora.lib.php
View file @
86e6990d
...
...
@@ -51,7 +51,7 @@ class installer_dist extends installer_base {
if
(
trim
(
$line
)
!=
''
&&
substr
(
$line
,
0
,
1
)
!=
'#'
)
{
@
list
(
$key
,
$value
)
=
@
explode
(
"="
,
$line
);
if
(
!
empty
(
$value
))
if
(
isset
(
$value
)
&&
$value
!==
''
)
{
$key
=
rtrim
(
$key
);
$old_options
[
$key
]
=
trim
(
$value
);
...
...
install/dist/lib/opensuse.lib.php
View file @
86e6990d
...
...
@@ -67,7 +67,7 @@ class installer_dist extends installer_base {
if
(
trim
(
$line
)
!=
''
&&
substr
(
$line
,
0
,
1
)
!=
'#'
)
{
@
list
(
$key
,
$value
)
=
@
explode
(
"="
,
$line
);
if
(
!
empty
(
$value
))
if
(
isset
(
$value
)
&&
$value
!==
''
)
{
$key
=
rtrim
(
$key
);
$old_options
[
$key
]
=
trim
(
$value
);
...
...
install/lib/installer_base.lib.php
View file @
86e6990d
...
...
@@ -616,7 +616,7 @@ class installer_base {
if
(
trim
(
$line
)
!=
''
&&
substr
(
$line
,
0
,
1
)
!=
'#'
)
{
@
list
(
$key
,
$value
)
=
@
explode
(
"="
,
$line
);
if
(
!
empty
(
$value
))
if
(
isset
(
$value
)
&&
$value
!==
''
)
{
$key
=
rtrim
(
$key
);
$old_options
[
$key
]
=
trim
(
$value
);
...
...
interface/lib/app.inc.php
View file @
86e6990d
...
...
@@ -240,7 +240,7 @@ class app {
}
$this
->
_language_inc
=
1
;
}
if
(
!
empty
(
$this
->
_wb
[
$text
]))
{
if
(
isset
(
$this
->
_wb
[
$text
])
&&
$this
->
wb
[
$text
]
!==
''
)
{
$text
=
$this
->
_wb
[
$text
];
}
else
{
if
(
$this
->
_conf
[
'debug_language'
])
{
...
...
interface/lib/classes/tform_base.inc.php
View file @
86e6990d
...
...
@@ -447,7 +447,7 @@ class tform_base {
if
(
is_array
(
$field
[
'value'
]))
{
foreach
(
$field
[
'value'
]
as
$k
=>
$v
)
{
$selected
=
(
$k
==
$val
)
?
' SELECTED'
:
''
;
if
(
!
empty
(
$this
->
wordbook
[
$v
]))
if
(
isset
(
$this
->
wordbook
[
$v
]))
$v
=
$this
->
wordbook
[
$v
];
$out
.
=
"<option value='
$k
'
$selected
>"
.
$this
->
lng
(
$v
)
.
"</option>
\r\n
"
;
}
...
...
@@ -881,7 +881,7 @@ class tform_base {
}
break
;
case
'NOTEMPTY'
:
if
(
empty
(
$field_value
))
{
if
(
!
isset
(
$field_value
)
||
$field_value
===
''
)
{
$errmsg
=
$validator
[
'errmsg'
];
if
(
isset
(
$this
->
wordbook
[
$errmsg
]))
{
$this
->
errorMessage
.
=
$this
->
wordbook
[
$errmsg
]
.
"<br />
\r\n
"
;
...
...
server/lib/classes/file.inc.php
View file @
86e6990d
...
...
@@ -190,7 +190,7 @@ class file{
// @ext_save : 1 for YES, 0 for NO - meaning it will filter out system files or not (such as .htaccess)
$dirname
=
realpath
(
$dirname
);
if
(
!
$exts
||
empty
(
$exts
)
||
$exts
==
''
)
{
if
(
empty
(
$exts
))
{
$exts
=
array
(
'jpg'
,
'gif'
,
'jpeg'
,
'png'
);
}
if
(
$handle
=
opendir
(
$dirname
))
{
...
...
server/plugins-available/mailman_plugin.inc.php
View file @
86e6990d
...
...
@@ -115,7 +115,7 @@ class mailman_plugin {
function
update_config
()
{
global
$app
,
$conf
;
copy
(
$this
->
mailman_config_dir
.
'mm_cfg.py'
,
$this
->
mailman_config_dir
.
'mm_cfg.py'
);
copy
(
$this
->
mailman_config_dir
.
'mm_cfg.py'
,
$this
->
mailman_config_dir
.
'mm_cfg.py
~
'
);
// load the server configuration options
$app
->
uses
(
'getconf'
);
...
...
@@ -136,7 +136,7 @@ class mailman_plugin {
if
(
strlen
(
$line
)
&&
substr
(
$line
,
0
,
1
)
!=
'#'
)
{
list
(
$key
,
$value
)
=
explode
(
"="
,
$line
);
if
(
!
empty
(
$value
)
)
if
(
$value
&&
$value
!==
''
)
{
$key
=
rtrim
(
$key
);
$old_options
[
$key
]
=
trim
(
$value
);
...
...
Write
Preview
Markdown
is supported
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