Completed
Pull Request — master (#48)
by Philipp
02:05
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.
upload.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -81,14 +81,14 @@
 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
-  $handler = FileHandler::getFileHandler($targetFile);
84
+    // Get information of application for uploaded file.
85
+    require_once ('FileHandler.class.php');
86
+    $handler = FileHandler::getFileHandler($targetFile);
87 87
 
88
-  // create window object and send to nuc
88
+    // create window object and send to nuc
89 89
 
90
-  $dt = new DateTime();
91
-  $date = $dt->format('Y-m-d H:i:s');
90
+    $dt = new DateTime();
91
+    $date = $dt->format('Y-m-d H:i:s');
92 92
 
93 93
     $window = array(
94 94
         "id" => "",
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
     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
     function show($path)
70 70
     {
Please login to merge, or discard this patch.
index.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1038,12 +1038,12 @@  discard block
 block discarded – undo
1038 1038
 
1039 1039
 <div id="workbench_right">
1040 1040
     <?php
1041
-      # Show authorized user name (and address) and allow logout.
1042
-      if ($user) {
1041
+        # Show authorized user name (and address) and allow logout.
1042
+        if ($user) {
1043 1043
         echo("<p><a href=\"logout.php\" title=\"" .
1044 1044
             __('Disconnect the current user') .
1045 1045
             "\">$user<i class=\"fa fa-sign-out\"></i></a></p>");
1046
-      }
1046
+        }
1047 1047
     ?>
1048 1048
 
1049 1049
     <table class="userlist" summary="<?=__('User list')?>" title="<?=__('List of connected users')?>">
@@ -1087,9 +1087,9 @@  discard block
 block discarded – undo
1087 1087
                  src="theme/<?=CONFIG_THEME?>/palma-logo-49x18.png"
1088 1088
                  alt="PalMA"> <?=__('Team display')?>
1089 1089
         <?php
1090
-              if (isset($_SESSION['monitor'])) {
1091
-                  echo('(' . $_SESSION['monitor'] . ')');
1092
-              }
1090
+                if (isset($_SESSION['monitor'])) {
1091
+                    echo('(' . $_SESSION['monitor'] . ')');
1092
+                }
1093 1093
         ?>
1094 1094
         </caption>
1095 1095
         <tbody id='maindisplay'>
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 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.
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.