Completed
Branch master (f6660f)
by Stefan
02:22
created
DBConnector.class.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -387,7 +387,7 @@
 block discarded – undo
387 387
     // {AFTER | BEFORE} {DELETE | INSERT | UPDATE } ON table
388 388
     //~ $db->exec("CREATE TRIGGER dbchange AFTER UPDATE ON user
389 389
                 //~ BEGIN
390
-                  //~ dbModifiedCallback();
390
+                    //~ dbModifiedCallback();
391 391
                 //~ END");
392 392
     //~ $db = new DBConnector('palma.db');
393 393
     echo "Tables=" . $db->querySingle('SELECT count(*) FROM sqlite_master WHERE type="table"') . "\n";
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.
control.php 1 patch
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.
download.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     // file exists: return file for download
24 24
     header('Content-Type: application/octet-stream');
25 25
     header('Content-Disposition: attachment; filename="' .
26
-           addslashes($filename) . '"');
26
+            addslashes($filename) . '"');
27 27
     readfile($filepath);
28 28
 } else {
29 29
     // file does not exist: 404 Not Found
Please login to merge, or discard this patch.
login.php 1 patch
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.
upload.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -81,17 +81,17 @@
 block discarded – undo
81 81
     $targetFile = "file:///$targetFile";
82 82
 }
83 83
 
84
-  // Get information of application for uploaded file.
85
-  require_once ('FileHandler.class.php');
86
-  list ($returnedHandler, $returnedTargetFile) = FileHandler::getFileHandler($targetFile);
87
-  $handler = $returnedHandler;
88
-  $targetFile = $returnedTargetFile;
89
-  trace("file is now $targetFile, its handler is $handler");
84
+    // Get information of application for uploaded file.
85
+    require_once ('FileHandler.class.php');
86
+    list ($returnedHandler, $returnedTargetFile) = FileHandler::getFileHandler($targetFile);
87
+    $handler = $returnedHandler;
88
+    $targetFile = $returnedTargetFile;
89
+    trace("file is now $targetFile, its handler is $handler");
90 90
 
91
-  // create window object and send to nuc
91
+    // create window object and send to nuc
92 92
 
93
-  $dt = new DateTime();
94
-  $date = $dt->format('Y-m-d H:i:s');
93
+    $dt = new DateTime();
94
+    $date = $dt->format('Y-m-d H:i:s');
95 95
 
96 96
     $window = array(
97 97
         "id" => "",
Please login to merge, or discard this patch.
index.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1389,12 +1389,12 @@
 block discarded – undo
1389 1389
 
1390 1390
 <div id="footer">
1391 1391
     <?php
1392
-      # Show authorized user name (and address) and allow logout.
1393
-      if ($user) {
1392
+        # Show authorized user name (and address) and allow logout.
1393
+        if ($user) {
1394 1394
         echo("<a href=\"logout.php\" title=\"" .
1395 1395
             __('Disconnect the current user') .
1396 1396
             "\">" . __('Log out') . "<i class=\"fa fa-sign-out\"></i></a>");
1397
-      }
1397
+        }
1398 1398
     ?>
1399 1399
 </div> <!-- Footer -->
1400 1400
 
Please login to merge, or discard this patch.
db.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 $newJSON = '{}';
18 18
 $oldJSON = '';
19 19
 
20
- if (!empty($_REQUEST['json'])) {
20
+    if (!empty($_REQUEST['json'])) {
21 21
     $oldJSON = $_REQUEST['json'];
22 22
     $oldJSONarr = json_decode($oldJSON, true);
23 23
     array_walk_recursive($oldJSONarr, function(&$value, $key) {
Please login to merge, or discard this patch.
FileHandler.class.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,9 +62,9 @@
 block discarded – undo
62 62
     public function getControls()
63 63
     {
64 64
         return FileHandler::CURSOR | FileHandler::ZOOM |
65
-               FileHandler::HOME | FileHandler::END |
66
-               FileHandler::PRIOR | FileHandler::NEXT |
67
-               FileHandler::DOWNLOAD;
65
+                FileHandler::HOME | FileHandler::END |
66
+                FileHandler::PRIOR | FileHandler::NEXT |
67
+                FileHandler::DOWNLOAD;
68 68
     }
69 69
     public function show($path)
70 70
     {
Please login to merge, or discard this patch.