Project

General

Profile

« Previous | Next » 

Revision e173dd74

Added by Phil Davis over 10 years ago

Code style for etc files

View differences:

etc/rc.initial.password
45 45

  
46 46
	if (strcasecmp(chop(fgets($fp)), "y") == 0) {
47 47
		if (isset($config['system']['webgui']['authmode']) &&
48
		    $config['system']['webgui']['authmode'] != "Local Database") {
48
			$config['system']['webgui']['authmode'] != "Local Database") {
49 49
			echo "\n" . gettext('
50 50
The User manager authentication server is set to "' . $config['system']['webgui']['authmode'] . '".') . "\n" .
51 51
			gettext('Do you want to set it back to Local Database [y|n]?');
52
			if (strcasecmp(chop(fgets($fp)), "y") == 0)
52
			if (strcasecmp(chop(fgets($fp)), "y") == 0) {
53 53
				$config['system']['webgui']['authmode'] = "Local Database";
54
			}
54 55
		}
55 56
		$admin_user =& getUserEntryByUID(0);
56 57
		if (!$admin_user) {
57 58
			echo "Failed to locate the admin user account! Attempting to restore access.\n";
58 59
			$admin_user = array();
59 60
			$admin_user['uid'] = 0;
60
			if (!is_array($config['system']['user']))
61
			if (!is_array($config['system']['user'])) {
61 62
				$config['system']['user'] = array();
63
			}
62 64
			$config['system']['user'][] = $admin_user;
63 65
		}
64 66

  
......
66 68
		$admin_user['scope'] = "system";
67 69
		$admin_user['priv'] = array("user-shell-access");
68 70

  
69
		if (isset($admin_user['disabled']))
71
		if (isset($admin_user['disabled'])) {
70 72
			unset($admin_user['disabled']);
73
		}
71 74

  
72 75
		local_user_set_password($admin_user, strtolower($g['product_name']));
73 76
		local_user_set($admin_user);

Also available in: Unified diff