Completed
Branch master (303d1b)
by Stefan
02:18
created
i12n.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,8 +86,7 @@
 block discarded – undo
86 86
 
87 87
     if (locale_emulation()) {
88 88
         print "locale '$locale' is not supported on your system, using custom gettext implementation.\n";
89
-    }
90
-    else {
89
+    } else {
91 90
         print "locale '$locale' is supported on your system, using native gettext implementation.\n";
92 91
     }
93 92
 
Please login to merge, or discard this patch.
selectplace/learningcenter.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -60,25 +60,25 @@
 block discarded – undo
60 60
 </div>
61 61
 
62 62
 <?php
63
-     session_start();
64
-     session_destroy();
63
+        session_start();
64
+        session_destroy();
65 65
 
66
-  # TODO: User sessions should be authorized to one display only.
67
-  # If they select this page, they must not be allowed to select
68
-  # a new display without being logged out.
66
+    # TODO: User sessions should be authorized to one display only.
67
+    # If they select this page, they must not be allowed to select
68
+    # a new display without being logged out.
69 69
 
70
-  # Show authorized user name and allow logout.
71
-  $username = false;
72
-  if (isset($_SESSION['username'])) {
70
+    # Show authorized user name and allow logout.
71
+    $username = false;
72
+    if (isset($_SESSION['username'])) {
73 73
     # PHP session based authorization.
74 74
     $username = $_SESSION['username'];
75
-  } elseif (isset($_SERVER["PHP_AUTH_USER"])) {
75
+    } elseif (isset($_SERVER["PHP_AUTH_USER"])) {
76 76
     # .htaccess basic authorization.
77 77
     $username = $_SERVER["PHP_AUTH_USER"];
78
-  }
79
-  if ($username) {
78
+    }
79
+    if ($username) {
80 80
     echo("<p>$username <a href=\"logout.php\">abmelden</a></p>");
81
-  }
81
+    }
82 82
 ?>
83 83
 
84 84
 </body>
Please login to merge, or discard this patch.
login.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         return $device;
48 48
     }
49 49
 
50
-  function checkCredentials($username, $password) {
50
+    function checkCredentials($username, $password) {
51 51
     // Check username + password against fixed internal value and
52 52
     // external proxy with authentisation.
53 53
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         $errtext = __('Invalid credentials!');
105 105
     }
106 106
     return false;
107
-  }
107
+    }
108 108
 
109 109
     $username = '';
110 110
     $pin = '';
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $posted_pin = $_REQUEST['pin'];
114 114
     }
115 115
 
116
-  if ($_SERVER['REQUEST_METHOD'] == 'POST') {
116
+    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
117 117
     session_start();
118 118
     $username = escapeshellcmd($_POST['username']);
119 119
     $password = '';
@@ -141,20 +141,20 @@  discard block
 block discarded – undo
141 141
         $_SESSION['monitor'] = CONFIG_STATIONNAME;
142 142
         $dbcon->addUser($username, $dbcon->ipAddress(), getDevice());
143 143
 
144
-       // Weiterleitung zur geschützten Startseite
145
-       if ($_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.1') {
144
+        // Weiterleitung zur geschützten Startseite
145
+        if ($_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.1') {
146 146
         if (php_sapi_name() == 'cgi') {
147
-         header('Status: 303 See Other');
148
-         }
147
+            header('Status: 303 See Other');
148
+            }
149 149
         else {
150
-         header('HTTP/1.1 303 See Other');
151
-         }
150
+            header('HTTP/1.1 303 See Other');
151
+            }
152 152
         }
153 153
 
154 154
         header('Location: ' . CONFIG_START_URL);
155 155
         exit;
156 156
     }
157
-  }
157
+    }
158 158
 ?>
159 159
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
160 160
        "http://www.w3.org/TR/html4/strict.dtd">
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -145,8 +145,7 @@
 block discarded – undo
145 145
        if ($_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.1') {
146 146
         if (php_sapi_name() == 'cgi') {
147 147
          header('Status: 303 See Other');
148
-         }
149
-        else {
148
+         } else {
150 149
          header('HTTP/1.1 303 See Other');
151 150
          }
152 151
         }
Please login to merge, or discard this patch.
control.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 
349 349
             // trying mousemove and click for better vnc control
350 350
             displayCommand("xdotool mousemove --window $windowhex 100 100 " .
351
-                       "key $key");
351
+                        "key $key");
352 352
         }
353 353
 
354 354
         if ($windowname && array_key_exists('keydown', $_REQUEST)) {
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 
364 364
             // trying mousemove and click for better vnc control
365 365
             displayCommand("xdotool mousemove --window $windowhex 100 100 " .
366
-                       "key $key");
366
+                        "key $key");
367 367
             //~ displayCommand("xdotool windowfocus $windowhex keydown $key");
368 368
         }
369 369
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         $section = $w['section'];
193 193
         if ($section >= 1 && $section <= $maxSection && $enabled) {
194 194
             // Show window, set size and position.
195
-            $wi = $section - 1;
195
+            $wi = $section-1;
196 196
             $dx = $screenWidth / $dim[$wi][2];
197 197
             $dy = $screenHeight / $dim[$wi][3];
198 198
             $x = $dim[$wi][0] * $dx;
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
         if ($windownumber != 'vncwin') {
323 323
             // This is the normal case.
324 324
             // Special handling is needed when called with window=vncwin, see below.
325
-            $window = $windownumber - 1;
325
+            $window = $windownumber-1;
326 326
 
327 327
             // TODO: $win_id und $windowname können vermutlich zusammengefasst werden.
328 328
             $win_id = $db->getWindowIDBySection($windownumber);
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
                 trace("+++ DELETE VNC Client FROM DAEMON +++");
389 389
                 // call via daemon: ?window=vncwin&delete=VNC&vncid=123
390 390
                 trace("vnc delete in control");
391
-                $win_id = $_REQUEST['vncid'];   // = hexWindow in database, but not on screen
391
+                $win_id = $_REQUEST['vncid']; // = hexWindow in database, but not on screen
392 392
                 trace("VNC cia Daemon ... id=$win_id");
393 393
 
394 394
             } elseif (strstr($delete, "http")) {
Please login to merge, or discard this patch.