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