Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fusiondirectory
Commits
67664882
Commit
67664882
authored
Dec 17, 2013
by
Côme Bernigaud
Committed by
Benoit Mortier
Dec 17, 2013
Browse files
Fixes:
#2595
cleaning files in include folder
parent
2575c487
Changes
13
Hide whitespace changes
Inline
Side-by-side
include/class_CopyPasteHandler.inc
View file @
67664882
...
...
@@ -174,8 +174,7 @@ class CopyPasteHandler
*/
function
execute
(
$base
)
{
$ui
=
get_userinfo
();
$type
=
$this
->
current
[
'method'
];
$ui
=
get_userinfo
();
/* Check which entries can be pasted directly.
* Create a list of all entries that can be pasted directly.
...
...
include/class_SnapshotHandler.inc
View file @
67664882
...
...
@@ -130,9 +130,6 @@ class SnapshotHandler {
return
array
();
}
// Load user info
$ui
=
get_userinfo
();
list
(
$ldap
,
$snapshotLdap
)
=
$this
->
get_ldap_links
();
// Initialize base
...
...
@@ -144,7 +141,6 @@ class SnapshotHandler {
$snapshotLdap
->
ls
(
"(objectClass=gosaSnapshotObject)"
,
$base
,
array
(
"gosaSnapshotType"
,
"gosaSnapshotTimestamp"
,
"gosaSnapshotDN"
,
"description"
));
while
(
$entry
=
$snapshotLdap
->
fetch
())
{
$chk
=
str_replace
(
$base
,
""
,
$entry
[
'dn'
]);
if
(
preg_match
(
"/,ou=/"
,
$chk
))
{
continue
;
...
...
@@ -253,9 +249,6 @@ class SnapshotHandler {
$dns
=
array
(
$dn
);
}
/* Get configuration from fusiondirectory.conf */
$config
=
$this
->
config
;
list
(
$ldap
,
$ldap_to
)
=
$this
->
get_ldap_links
();
/* check if the dn exists */
...
...
@@ -309,7 +302,6 @@ class SnapshotHandler {
if
(
!
$ldap
->
success
())
{
msg_dialog
::
display
(
_
(
"LDAP error"
),
msgPool
::
ldaperror
(
$ldap
->
get_error
(),
$new_base
,
""
,
get_class
()));
}
}
}
...
...
@@ -389,7 +381,6 @@ class SnapshotHandler {
/* Prepare bases */
$new_base
=
$this
->
snapshot_dn
(
$base_of_object
);
/* Fetch all objects and check if they do not exist anymore */
$ui
=
get_userinfo
();
$tmp
=
array
();
$ldap_to
->
cd
(
$new_base
);
$ldap_to
->
ls
(
"(objectClass=gosaSnapshotObject)"
,
$new_base
,
array
(
"gosaSnapshotType"
,
"gosaSnapshotTimestamp"
,
"gosaSnapshotDN"
,
"description"
));
...
...
@@ -442,7 +433,7 @@ class SnapshotHandler {
/* Get the snapshot */
$ldap_to
->
cat
(
$dn
);
$restoreObject
=
$ldap_to
->
fetch
();
$ldap_to
->
fetch
();
/* Prepare import string */
$data
=
gzuncompress
(
$ldap_to
->
get_attribute
(
$dn
,
'gosaSnapshotData'
));
...
...
@@ -450,7 +441,7 @@ class SnapshotHandler {
/* Import the given data */
try
{
$ldap
->
import_complete_ldif
(
$data
,
FALSE
,
FALSE
);
}
catch
(
Exception
$e
)
{
}
catch
(
Exception
$e
)
{
msg_dialog
::
display
(
_
(
'LDAP error'
),
$e
->
getMessage
(),
ERROR_DIALOG
);
}
if
(
!
$ldap
->
success
())
{
...
...
include/class_config.inc
View file @
67664882
...
...
@@ -1072,8 +1072,8 @@ class config {
/* Check if we have a current value for $name */
if
(
isset
(
$this
->
current
[
$name
]))
{
$res
=
$this
->
current
[
$name
];
/* Check if we have a global value for $name */
}
elseif
(
isset
(
$this
->
data
[
"MAIN"
][
$name
]))
{
/* Check if we have a global value for $name */
$res
=
$this
->
data
[
"MAIN"
][
$name
];
}
...
...
@@ -1372,7 +1372,7 @@ class config {
foreach
(
$this
->
data
[
'CATEGORIES'
]
as
$name
=>
&
$infos
)
{
$infos
[
'classes'
]
=
array_unique
(
$infos
[
'classes'
]);
if
(
!
isset
(
$infos
[
'description'
]))
{
trigger_error
(
"ACL category '
$name
' for classes "
.
join
(
','
,
$infos
[
'classes'
])
.
" has no definition"
);
trigger_error
(
"ACL category '
$name
' for classes "
.
join
(
','
,
$infos
[
'classes'
])
.
" has no definition"
);
$infos
[
'description'
]
=
$name
;
$infos
[
'objectClass'
]
=
array
();
}
...
...
include/class_divSelectBox.inc
View file @
67664882
...
...
@@ -180,7 +180,7 @@ class divSelectBox
$cnt
=
0
;
$this
->
cols
=
count
(
$s_value
);
foreach
(
$s_value
as
$s_key2
=>
$s_value2
)
{
foreach
(
$s_value
as
$s_value2
)
{
$cnt
++
;
if
(
!
isset
(
$s_value2
[
'class'
]))
{
...
...
include/class_filterLDAP.inc
View file @
67664882
...
...
@@ -51,11 +51,8 @@ class filterLDAP {
*/
static
function
query
(
$parent
,
$base
,
$scope
,
$filter
,
$attributes
,
$category
,
$objectStorage
=
array
(
""
))
{
$config
=
session
::
global_get
(
'config'
);
$ldap
=
$config
->
get_ldap_link
(
TRUE
);
$flag
=
(
$scope
==
"sub"
?
GL_SUBSEARCH
:
0
);
$result
=
filterLDAP
::
get_list
(
$parent
,
$base
,
$filter
,
$attributes
,
$category
,
$objectStorage
,
$flag
|
GL_SIZELIMIT
);
return
$result
;
return
filterLDAP
::
get_list
(
$parent
,
$base
,
$filter
,
$attributes
,
$category
,
$objectStorage
,
$flag
|
GL_SIZELIMIT
);
}
/*!
...
...
@@ -152,7 +149,7 @@ class filterLDAP {
// In no-subsearch mode overwrite default method if
// current base equals the initial base
if
(
$base
==
$initial_base
&&
!
(
$flags
&
GL_SUBSEARCH
))
{
$method
=
"ls"
;
$method
=
"ls"
;
}
if
(
$method
==
"ls"
)
{
...
...
@@ -191,7 +188,7 @@ class filterLDAP {
$result
[]
=
$attrs
;
}
}
else
{
//trigger_error(
"Invalid objectType given, please check listing.xml
'{$dn}'!
");
@
DEBUG
(
DEBUG_TRACE
,
__LINE__
,
__FUNCTION__
,
__FILE__
,
$dn
,
"Invalid objectType given, please check listing.xml"
);
}
}
}
...
...
include/class_listing.inc
View file @
67664882
...
...
@@ -229,9 +229,6 @@ class listing {
'filter'
=>
ldapFilter
::
parse
(
$i
[
'filter'
]),
'nameAttr'
=>
$i
[
'nameAttr'
],
);
if
(
!
isset
(
$i
[
'nameAttr'
]))
{
print_r
(
$i
);
}
}
$this
->
categories
=
array
();
if
(
isset
(
$this
->
xmlData
[
'definition'
][
'objectType'
]))
{
...
...
@@ -1178,7 +1175,6 @@ class listing {
*/
function
getAction
()
{
global
$config
;
// Do not do anything if this is not our PID, or there's even no PID available...
if
(
!
isset
(
$_REQUEST
[
'dn'
])
&&
(
!
isset
(
$_REQUEST
[
'PID'
])
||
$_REQUEST
[
'PID'
]
!=
$this
->
pid
))
{
return
;
...
...
include/class_management.inc
View file @
67664882
...
...
@@ -394,7 +394,7 @@ class management
if
(
!
empty
(
$altTabType
))
$tabType
=
$altTabType
;
if
(
!
empty
(
$altAclCategory
))
$aclCategory
=
$altAclCategory
;
@
DEBUG
(
DEBUG_TRACE
,
__LINE__
,
__FUNCTION__
,
__FILE__
,
$target
,
"Entry remov
e
l confirmed!"
);
@
DEBUG
(
DEBUG_TRACE
,
__LINE__
,
__FUNCTION__
,
__FILE__
,
$target
,
"Entry remov
a
l confirmed!"
);
foreach
(
$this
->
dns
as
$dn
)
{
// Check permissions, are we allowed to remove this object?
...
...
include/class_msg_dialog.inc
View file @
67664882
...
...
@@ -206,13 +206,9 @@ class msg_dialog
$return
=
""
;
$dialog_ids
=
""
;
$seen
=
""
;
/*if (isset($_POST['closed_msg_dialogs'])) {
$seen = $_POST['closed_msg_dialogs'];
}*/
if
(
session
::
is_set
(
'msg_dialogs'
)
&&
is_array
(
session
::
get
(
'msg_dialogs'
))
&&
count
(
session
::
get
(
'msg_dialogs'
)))
{
if
(
session
::
is_set
(
'msg_dialogs'
)
&&
is_array
(
session
::
get
(
'msg_dialogs'
))
&&
count
(
session
::
get
(
'msg_dialogs'
)))
{
/* Get frame one */
$smarty
=
get_smarty
();
$smarty
->
assign
(
"frame"
,
TRUE
);
...
...
@@ -220,9 +216,7 @@ class msg_dialog
$msg_dialogs
=
session
::
get
(
'msg_dialogs'
);
foreach
(
$msg_dialogs
as
$key
=>
$dialog
)
{
if
(
preg_match
(
"/"
.
$dialog
->
get_ID
()
.
"/"
,
$seen
))
{
unset
(
$msg_dialogs
[
$key
]);
}
else
{
if
(
!
preg_match
(
"/"
.
$dialog
->
get_ID
()
.
"/"
,
""
))
{
$return
.
=
$dialog
->
execute
();
$dialog_ids
=
$dialog
->
get_ID
()
.
","
.
$dialog_ids
;
}
...
...
@@ -239,6 +233,5 @@ class msg_dialog
}
return
$return
;
}
}
?>
include/class_plugin.inc
View file @
67664882
...
...
@@ -1667,7 +1667,6 @@ class plugin
*/
function
get_allowed_bases
()
{
$ui
=
get_userinfo
();
$deps
=
array
();
/* Is this a new object ? Or just an edited existing object */
...
...
@@ -1688,9 +1687,7 @@ class plugin
/* Add current base */
if
(
isset
(
$this
->
base
)
&&
isset
(
$this
->
config
->
idepartments
[
$this
->
base
]))
{
$deps
[
$this
->
base
]
=
$this
->
config
->
idepartments
[
$this
->
base
];
}
elseif
(
strtolower
(
$this
->
dn
)
==
strtolower
(
$this
->
config
->
current
[
'BASE'
]))
{
}
else
{
}
elseif
(
strtolower
(
$this
->
dn
)
!=
strtolower
(
$this
->
config
->
current
[
'BASE'
]))
{
trigger_error
(
"Cannot return list of departments, no default base found in class "
.
get_class
(
$this
)
.
". (base is '"
.
$this
->
base
.
"')"
);
}
return
$deps
;
...
...
include/class_tabs.inc
View file @
67664882
...
...
@@ -222,9 +222,9 @@ class tabs
if
(
!
$disabled
)
{
$display
.
=
'<input type="hidden" name="arg" value=""/>'
;
}
$display
.
=
'<table class="tabs_header"><tbody><tr>'
;
$index
=
0
;
$style
=
array
(
"tab_left"
,
"tab_active"
,
"tab_near_active"
,
"tab_right"
);
$display
.
=
'<table class="tabs_header"><tbody><tr>'
;
$index
=
0
;
$style
=
array
(
"tab_left"
,
"tab_active"
,
"tab_near_active"
,
"tab_right"
);
foreach
(
$this
->
by_name
as
$class
=>
$name
)
{
/* Activate right tabs with style "tab_right"
...
...
@@ -270,8 +270,8 @@ class tabs
}
}
$display
.
=
"<td>
\n
"
;
$display
.
=
"<div class=
\"
tab_border
\"
> </div></td></tr></tbody></table>"
;
$display
.
=
"<td>
\n
"
;
$display
.
=
"<div class=
\"
tab_border
\"
> </div></td></tr></tbody></table>"
;
return
$display
;
}
...
...
include/class_tests.inc
View file @
67664882
...
...
@@ -374,13 +374,11 @@ class tests {
*/
public
static
function
is_date
(
$date
)
{
global
$lang
;
if
(
$date
==
""
)
{
return
TRUE
;
}
//TODO: use $lang to check date format
//TODO: use
global
$lang to check date format
if
(
!
preg_match
(
"/([0-9]
{
1,2})\.([0-9]{1,2})\.([0-9]{4
}
)/"
,
$date
,
$matches
))
{
return
FALSE
;
}
...
...
include/functions_debug.inc
View file @
67664882
...
...
@@ -183,7 +183,6 @@ class Print_a_class {
$this
->
output
.
=
'</td>'
;
$this
->
output
.
=
'<td nowrap="nowrap" style="background-color:#'
.
$this
->
value_bg_color
.
';font: '
.
$this
->
fontsize
.
' '
.
$this
->
fontfamily
.
'; color:black;">'
;
// value output
if
(
$type
==
'array'
)
{
if
(
count
(
$value
))
{
...
...
include/php_setup.inc
View file @
67664882
...
...
@@ -274,7 +274,6 @@ ini_set("include_path", ".:$BASE_DIR/include:".PHP_DIR.":".PEAR_DIR);
/* Do smarty setup */
require
(
SMARTY
);
/*require(SMARTY_PATH);*/
$smarty
=
new
Smarty
;
$smarty
->
template_dir
=
$BASE_DIR
.
'/ihtml/'
;
...
...
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