reduced PHP notices
This commit is contained in:
parent
1d45216020
commit
160a5e3c40
|
@ -710,7 +710,7 @@ function parseHtml($module, $input, $values, $restricted, &$tabindex, &$tabindex
|
|||
if (isset($values[$input[$i][$j]['name']])) {
|
||||
if ($values[$input[$i][$j]['name']][0] == "true") $output .= ' checked';
|
||||
}
|
||||
elseif ($input[$i][$j]['checked']) $output .= ' checked';
|
||||
elseif (isset($input[$i][$j]['checked']) && ($input[$i][$j]['checked'])) $output .= ' checked';
|
||||
}
|
||||
// other input element
|
||||
else {
|
||||
|
|
|
@ -46,7 +46,7 @@ class account extends baseModule {
|
|||
* @see baseModule::get_metaData()
|
||||
*/
|
||||
function get_metaData() {
|
||||
if ($_SESSION['loggedIn']) {
|
||||
if (isset($_SESSION['loggedIn']) && ($_SESSION['loggedIn'] === true)) {
|
||||
$modules = $_SESSION['config']->get_AccountModules($this->get_scope());
|
||||
}
|
||||
$return = array();
|
||||
|
@ -74,7 +74,7 @@ class account extends baseModule {
|
|||
$return['PDF_fields'] = array(
|
||||
'description'
|
||||
);
|
||||
if ($_SESSION['loggedIn'] && !in_array('posixAccount', $modules)) {
|
||||
if (isset($_SESSION['loggedIn']) && ($_SESSION['loggedIn'] === true) && !in_array('posixAccount', $modules)) {
|
||||
$return['PDF_fields'][] = 'uid';
|
||||
}
|
||||
// help Entries
|
||||
|
@ -101,7 +101,7 @@ class account extends baseModule {
|
|||
)
|
||||
);
|
||||
// upload columns
|
||||
if ($_SESSION['loggedIn']) {
|
||||
if (isset($_SESSION['loggedIn']) && ($_SESSION['loggedIn'] === true)) {
|
||||
if ($this->get_scope() == 'user') {
|
||||
$return['upload_columns'][] = array(
|
||||
'name' => 'account_hosts',
|
||||
|
|
|
@ -142,7 +142,7 @@ class inetOrgPerson extends baseModule {
|
|||
'title', 'telephoneNumber', 'facsimileTelephoneNumber', 'street', 'postOfficeBox', 'postalCode', 'postalAddress',
|
||||
'sn', 'userPassword', 'description', 'homePhone', 'roomNumber', 'businessCategory', 'l', 'st', 'physicalDeliveryOfficeName',
|
||||
'carLicense');
|
||||
if (($_SESSION['loggedIn']) && $this->supportUnixHosts()) {
|
||||
if (isset($_SESSION['loggedIn']) && ($_SESSION['loggedIn'] === true) && $this->supportUnixHosts()) {
|
||||
$return['attributes'][] = 'host';
|
||||
}
|
||||
// self service search attributes
|
||||
|
@ -320,7 +320,7 @@ class inetOrgPerson extends baseModule {
|
|||
)
|
||||
);
|
||||
// cn and uid for upload (only if posixAccount is not loaded)
|
||||
if ($_SESSION['loggedIn']) {
|
||||
if (isset($_SESSION['loggedIn']) && ($_SESSION['loggedIn'] === true)) {
|
||||
$modules = $_SESSION['config']->get_AccountModules($this->get_scope());
|
||||
if (!in_array('posixAccount', $modules)) {
|
||||
$return['upload_columns'][] = array(
|
||||
|
@ -341,7 +341,7 @@ class inetOrgPerson extends baseModule {
|
|||
}
|
||||
}
|
||||
// Unix workstations for upload
|
||||
if ($_SESSION['loggedIn']) {
|
||||
if (isset($_SESSION['loggedIn']) && ($_SESSION['loggedIn'] === true)) {
|
||||
if ($this->supportUnixHosts()) {
|
||||
$return['upload_columns'][] = array(
|
||||
'name' => 'inetOrgPerson_hosts',
|
||||
|
@ -376,7 +376,7 @@ class inetOrgPerson extends baseModule {
|
|||
'carLicense',
|
||||
'officeName'
|
||||
);
|
||||
if ($_SESSION['loggedIn']) {
|
||||
if (isset($_SESSION['loggedIn']) && ($_SESSION['loggedIn'] === true)) {
|
||||
$modules = $_SESSION['config']->get_AccountModules($this->get_scope());
|
||||
if (!in_array('posixAccount', $modules)) {
|
||||
$return['PDF_fields'][] = 'uid';
|
||||
|
@ -1660,7 +1660,7 @@ class inetOrgPerson extends baseModule {
|
|||
fclose($handle);
|
||||
$return['add']['jpegPhoto'][0] = $data;
|
||||
}
|
||||
if ($_POST['removeReplacePhoto'] == 'on') {
|
||||
if (isset($_POST['removeReplacePhoto']) && ($_POST['removeReplacePhoto'] == 'on')) {
|
||||
if ($_FILES['replacePhotoFile'] && ($_FILES['replacePhotoFile']['size'] > 0)) {
|
||||
$handle = fopen($_FILES['replacePhotoFile']['tmp_name'], "r");
|
||||
$data = fread($handle, 1000000);
|
||||
|
|
|
@ -273,7 +273,7 @@ class sambaGroupMapping extends baseModule {
|
|||
);
|
||||
// upload fields
|
||||
// search existing Samba 3 domains
|
||||
if ($_SESSION['loggedIn']) {
|
||||
if (isset($_SESSION['loggedIn']) && ($_SESSION['loggedIn'] === true)) {
|
||||
$domains = search_domains();
|
||||
$domainNames = array();
|
||||
for ($i = 0; $i < sizeof($domains); $i++) $domainNames[] = $domains[$i]->name;
|
||||
|
|
|
@ -47,7 +47,7 @@ include_once('../../lib/modules.inc');
|
|||
startSecureSession();
|
||||
|
||||
// Redirect to startpage if user is not loged in
|
||||
if (!isset($_SESSION['loggedIn'])) {
|
||||
if (!isset($_SESSION['loggedIn']) || ($_SESSION['loggedIn'] !== true)) {
|
||||
metaRefresh("../login.php");
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ if (!checkIfWriteAccessIsAllowed()) {
|
|||
}
|
||||
|
||||
// Redirect to startpage if user is not loged in
|
||||
if (!isset($_SESSION['loggedIn'])) {
|
||||
if (!isset($_SESSION['loggedIn']) || ($_SESSION['loggedIn'] !== true)) {
|
||||
metaRefresh("login.php");
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -455,9 +455,7 @@ elseif(!empty($_POST['profileChange'])) {
|
|||
display_LoginPage($_SESSION['config']); // Load login page
|
||||
}
|
||||
// Load login page
|
||||
else
|
||||
{
|
||||
$_SESSION['loggedIn'] = false;
|
||||
else {
|
||||
$default_Config = new LAMCfgMain();
|
||||
$default_Profile = $default_Config->default;
|
||||
$_SESSION["config"] = new LAMConfig($default_Profile); // Create new Config object
|
||||
|
|
|
@ -45,7 +45,7 @@ startSecureSession();
|
|||
if (!checkIfWriteAccessIsAllowed()) die();
|
||||
|
||||
// Redirect to startpage if user is not loged in
|
||||
if (!isset($_SESSION['loggedIn'])) {
|
||||
if (!isset($_SESSION['loggedIn']) || ($_SESSION['loggedIn'] !== true)) {
|
||||
metaRefresh("login.php");
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ startSecureSession();
|
|||
if (!checkIfWriteAccessIsAllowed()) die();
|
||||
|
||||
// Redirect to startpage if user is not loged in
|
||||
if (!isset($_SESSION['loggedIn'])) {
|
||||
if (!isset($_SESSION['loggedIn']) || ($_SESSION['loggedIn'] !== true)) {
|
||||
metaRefresh("login.php");
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ startSecureSession();
|
|||
if (!checkIfWriteAccessIsAllowed()) die();
|
||||
|
||||
// Redirect to startpage if user is not loged in
|
||||
if (!isset($_SESSION['loggedIn'])) {
|
||||
if (!isset($_SESSION['loggedIn']) || ($_SESSION['loggedIn'] !== true)) {
|
||||
metaRefresh("login.php");
|
||||
exit;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue