Completed
Push — 14.2 ( 8c9613...467fce )
by Ralf
52:28 queued 16:14
created
phpgwapi/inc/class.groupdav_hooks.inc.php 1 patch
Spacing   +14 added lines, -15 removed lines patch added patch discarded remove patch
@@ -33,15 +33,15 @@  discard block
 block discarded – undo
33 33
 		if ($location == 'preferences')
34 34
 		{
35 35
 			$file = array(
36
-				'Preferences'     => egw::link('/index.php','menuaction=preferences.uisettings.index&appname='.$appname),
36
+				'Preferences'     => egw::link('/index.php', 'menuaction=preferences.uisettings.index&appname='.$appname),
37 37
 			);
38 38
 			if ($location == 'preferences')
39 39
 			{
40
-				display_section($appname,$file);
40
+				display_section($appname, $file);
41 41
 			}
42 42
 			else
43 43
 			{
44
-				display_sidebox($appname,lang('Preferences'),$file);
44
+				display_sidebox($appname, lang('Preferences'), $file);
45 45
 			}
46 46
 		}
47 47
 	}
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
 
59 59
 		if ($hook_data['setup'])
60 60
 		{
61
-			$apps = array('addressbook','calendar','infolog');
61
+			$apps = array('addressbook', 'calendar', 'infolog');
62 62
 		}
63 63
 		else
64 64
 		{
65 65
 			$apps = array_keys($GLOBALS['egw_info']['user']['apps']);
66 66
 		}
67
-		foreach($apps as $app)
67
+		foreach ($apps as $app)
68 68
 		{
69 69
 			$class_name = $app.'_groupdav';
70 70
 			if (class_exists($class_name, true))
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 					'type'  => 'section',
74 74
 					'title' => $app,
75 75
 				);
76
-				$settings += call_user_func(array($class_name,'get_settings'), $hook_data);
76
+				$settings += call_user_func(array($class_name, 'get_settings'), $hook_data);
77 77
 			}
78 78
 		}
79 79
 
@@ -101,21 +101,21 @@  discard block
 block discarded – undo
101 101
 			if ($GLOBALS['type'] === 'user')
102 102
 			{
103 103
 				$logs = array();
104
-				if (file_exists($log_dir=$GLOBALS['egw_info']['server']['files_dir'].'/groupdav') && ($files = scandir($log_dir)))
104
+				if (file_exists($log_dir = $GLOBALS['egw_info']['server']['files_dir'].'/groupdav') && ($files = scandir($log_dir)))
105 105
 				{
106 106
 					$account_lid = accounts::id2name($hook_data['account_id']);
107 107
 					$account_lid_len = strlen($account_lid);
108
-					foreach($files as $log)
108
+					foreach ($files as $log)
109 109
 					{
110
-						if (substr($log,0,$account_lid_len+1) == $account_lid.'-' &&
111
-							substr($log,-4) == '.log')
110
+						if (substr($log, 0, $account_lid_len + 1) == $account_lid.'-' &&
111
+							substr($log, -4) == '.log')
112 112
 						{
113 113
 							$logs['groupdav/'.$log] = egw_time::to(filemtime($log_dir.'/'.$log)).': '.
114
-								str_replace('!','/',substr($log,$account_lid_len+1,-4));
114
+								str_replace('!', '/', substr($log, $account_lid_len + 1, -4));
115 115
 						}
116 116
 					}
117 117
 				}
118
-				$link = egw::link('/index.php',array(
118
+				$link = egw::link('/index.php', array(
119 119
 					'menuaction' => 'groupdav.groupdav_hooks.log',
120 120
 					'filename' => '',
121 121
 				));
@@ -151,8 +151,7 @@  discard block
 block discarded – undo
151 151
 	{
152 152
 		$filename = $_GET['filename'];
153 153
 		$matches = null;
154
-		if (!preg_match('|^groupdav/'.($GLOBALS['egw_info']['user']['apps']['admin'] ? '[^-]+' :
155
-			preg_quote($GLOBALS['egw_info']['user']['account_lid'], '|')).'-(.*)\.log$|', $filename, $matches))
154
+		if (!preg_match('|^groupdav/'.($GLOBALS['egw_info']['user']['apps']['admin'] ? '[^-]+' : preg_quote($GLOBALS['egw_info']['user']['account_lid'], '|')).'-(.*)\.log$|', $filename, $matches))
156 155
 		{
157 156
 			throw new egw_exception_wrong_parameter("Access denied to file '$filename'!");
158 157
 		}
@@ -161,6 +160,6 @@  discard block
 block discarded – undo
161 160
 pre.tail { background-color: white; padding-left: 5px; margin-left: 5px; }
162 161
 ';
163 162
 		$tail = new egw_tail($filename);
164
-		$GLOBALS['egw']->framework->render($tail->show(str_replace('!', '/', $matches[1])),false,false);
163
+		$GLOBALS['egw']->framework->render($tail->show(str_replace('!', '/', $matches[1])), false, false);
165 164
 	}
166 165
 }
167 166
\ No newline at end of file
Please login to merge, or discard this patch.