refactoring
This commit is contained in:
		
							parent
							
								
									4128f703aa
								
							
						
					
					
						commit
						d2a07f697c
					
				|  | @ -2585,7 +2585,7 @@ class LAMCfgMain { | |||
| 	* @return boolean true if file was readable | ||||
| 	*/ | ||||
| 	private function reload() { | ||||
| 		if (is_file($this->conffile) == True) { | ||||
| 		if (is_file($this->conffile)) { | ||||
| 			$file = @fopen($this->conffile, "r"); | ||||
| 			if (!$file) { | ||||
| 				return false; // abort if file is not readable
 | ||||
|  |  | |||
|  | @ -1370,7 +1370,7 @@ class sambaSamAccount extends baseModule implements passwordService { | |||
| 			elseif ($hr >= 24*7) { | ||||
| 				$hr = $hr - 24*7; | ||||
| 			} | ||||
| 			$checkbox = new htmlInputCheckbox('lh_' . $hr, $hour[$hr] ? true : false); | ||||
| 			$checkbox = new htmlInputCheckbox('lh_' . $hr, $hour[$hr]); | ||||
| 			$checkbox->alignment = htmlTable::ALIGN_CENTER; | ||||
| 			$boxes[$i % 24][floor($i/24)] = $checkbox; | ||||
| 		} | ||||
|  |  | |||
|  | @ -261,7 +261,7 @@ class sambaMungedDial | |||
|     } | ||||
| 
 | ||||
|     $ctxField=""; | ||||
|     if($this->old_behavior==true) { | ||||
|     if($this->old_behavior) { | ||||
|   	  $ctxField= substr(base64_decode($munge), (strlen(SAMBA_MUNGEDDIAL_FILEHEADER_OLD)) / 2); | ||||
|     } else { | ||||
|   	  $ctxField= substr(base64_decode($munge), (strlen(SAMBA_MUNGEDDIAL_FILEHEADER)+4) / 2); | ||||
|  | @ -445,7 +445,7 @@ class sambaMungedDial | |||
|   */ | ||||
|   function getShadow () | ||||
|   { | ||||
|     if($this->old_behavior==true) { | ||||
|     if($this->old_behavior) { | ||||
|       $result= substr($this->ctx['CtxCfgFlags1'], 1, 1); | ||||
|     } else { | ||||
|     	$result= substr($this->ctx['CtxShadow'], 1, 1); | ||||
|  | @ -457,7 +457,7 @@ class sambaMungedDial | |||
|   function setShadow ($checked, $value) | ||||
|   { | ||||
|   	if ($checked) { | ||||
|       if($this->old_behavior==true) { | ||||
|       if($this->old_behavior) { | ||||
|         // We need to reset the old setting
 | ||||
|        	$this->ctx['CtxCfgFlags1'][1]= sprintf('%1X', $value); | ||||
|       } | ||||
|  |  | |||
|  | @ -329,7 +329,7 @@ function checkInput() { | |||
| 		} | ||||
| 		// check dependencies
 | ||||
| 		$depends = check_module_depends($selected, getModulesDependencies($scope)); | ||||
| 		if ($depends != false) { | ||||
| 		if ($depends !== false) { | ||||
| 			for ($i = 0; $i < sizeof($depends); $i++) { | ||||
| 				$errors[] = array('ERROR', $type->getAlias(), _("Unsolved dependency:") . ' ' . | ||||
| 					$depends[$i][0] . " (" . $depends[$i][1] . ")"); | ||||
|  | @ -337,7 +337,7 @@ function checkInput() { | |||
| 		} | ||||
| 		// check conflicts
 | ||||
| 		$conflicts = check_module_conflicts($selected, getModulesDependencies($scope)); | ||||
| 		if ($conflicts != false) { | ||||
| 		if ($conflicts !== false) { | ||||
| 			for ($i = 0; $i < sizeof($conflicts); $i++) { | ||||
| 				$errors[] = array('ERROR', $type->getAlias(), _("Conflicting module:") . ' ' . | ||||
| 					$conflicts[$i][0] . " (" . $conflicts[$i][1] . ")"); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue