Completed
Push — 16.1 ( 62d2b3...44c9ff )
by Ralf
15:58
created
api/src/Framework/Updates.php 1 patch
Braces   +16 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,11 +58,17 @@  discard block
 block discarded – undo
58 58
 			{
59 59
 				$all_versions = explode("\n", $remote);
60 60
 				$current = array_shift($all_versions);
61
-				if (empty($all_versions)) $all_versions = array($current);
61
+				if (empty($all_versions))
62
+				{
63
+					$all_versions = array($current);
64
+				}
62 65
 				// find latest security release for optional API version
63 66
 				foreach(array_reverse($all_versions) as $security)
64 67
 				{
65
-					if (isset($api) && $api === substr($security, 0, strlen($api))) break;
68
+					if (isset($api) && $api === substr($security, 0, strlen($api)))
69
+					{
70
+						break;
71
+					}
66 72
 				}
67 73
 				$versions = array(
68 74
 					'current'  => $current,		// last maintenance update
@@ -137,7 +143,10 @@  discard block
 block discarded – undo
137 143
 	protected static function update_older($version, $days)
138 144
 	{
139 145
 		list(,,$date) = explode('.', $version);
140
-		if ($date < 20140000) return false;
146
+		if ($date < 20140000)
147
+		{
148
+			return false;
149
+		}
141 150
 		$version_timestamp = mktime(0, 0, 0, (int)substr($date, 4, 2), (int)substr($date, -2), (int)substr($date, 0, 4));
142 151
 
143 152
 		return (time() - $version_timestamp) / 86400 > $days;
@@ -165,10 +174,13 @@  discard block
 block discarded – undo
165 174
 				unset($setup_info);
166 175
 			}
167 176
 			// hack to fix 16.1 wired api version of 16.9, which is bigger then maintenance_release 16.1
168
-			if (true)//version_compare($version, $GLOBALS['egw_info']['server']['versions']['maintenance_release'], '<'))
177
+			if (true)
178
+			{
179
+				//version_compare($version, $GLOBALS['egw_info']['server']['versions']['maintenance_release'], '<'))
169 180
 			{
170 181
 				$version = $GLOBALS['egw_info']['server']['versions']['maintenance_release'];
171 182
 			}
183
+			}
172 184
 			return $version;
173 185
 		}, array(), 300);
174 186
 	}
Please login to merge, or discard this patch.