Completed
Push — develop ( 48407c...953cbd )
by Seth
02:30
created
control-panel.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -7,40 +7,40 @@
 block discarded – undo
7 7
 use Battis\BootstrapSmarty\NotificationMessage;
8 8
 
9 9
 if (isset($_REQUEST['hack'])) {
10
-    while (list($id, $setting) = each($_REQUEST['hack'])) {
11
-        try {
12
-            $hack = CanvasHack::getCanvasHackById($toolbox->getMySQL(), $id);
13
-            if ($setting === 'enable') {
14
-                $hack->enable();
15
-            } else {
16
-                $hack->disable();
17
-            }
18
-        } catch (CanvasHack_Exception $e) {
19
-            $smarty->addMessage('Exception ' . $e->getCode(), $e->getMessage(), NotificationMessage::ERROR);
20
-        }
21
-    }
10
+	while (list($id, $setting) = each($_REQUEST['hack'])) {
11
+		try {
12
+			$hack = CanvasHack::getCanvasHackById($toolbox->getMySQL(), $id);
13
+			if ($setting === 'enable') {
14
+				$hack->enable();
15
+			} else {
16
+				$hack->disable();
17
+			}
18
+		} catch (CanvasHack_Exception $e) {
19
+			$smarty->addMessage('Exception ' . $e->getCode(), $e->getMessage(), NotificationMessage::ERROR);
20
+		}
21
+	}
22 22
 }
23 23
 
24 24
 $hacksContents = scandir(realpath(__DIR__ . '/hacks'), SCANDIR_SORT_ASCENDING);
25 25
 $hacks = array();
26 26
 foreach ($hacksContents as $item) {
27
-    if (is_dir($path = realpath(__DIR__ . "/hacks/$item")) && file_exists($manifest = "$path/manifest.xml")) {
28
-        try {
29
-            $hacks[$item] = new CanvasHack($toolbox->getMySQL(), $path);
30
-        } catch (CanvasHack_Exception $e) {
31
-            $smarty->addMessage(
32
-                'CanvasHack Manifest Error [' . $e->getCode() . ']',
33
-                $e->getMessage(),
34
-                NotificationMessage::ERROR
35
-            );
36
-        }
37
-    }
27
+	if (is_dir($path = realpath(__DIR__ . "/hacks/$item")) && file_exists($manifest = "$path/manifest.xml")) {
28
+		try {
29
+			$hacks[$item] = new CanvasHack($toolbox->getMySQL(), $path);
30
+		} catch (CanvasHack_Exception $e) {
31
+			$smarty->addMessage(
32
+				'CanvasHack Manifest Error [' . $e->getCode() . ']',
33
+				$e->getMessage(),
34
+				NotificationMessage::ERROR
35
+			);
36
+		}
37
+	}
38 38
 }
39 39
 
40 40
 $smarty->assign([
41
-    'appURL' => $toolbox->config('APP_URL'),
42
-    'hacks' => $hacks,
43
-    'name' => 'CanvasHack',
44
-    'category' => 'Control Panel'
41
+	'appURL' => $toolbox->config('APP_URL'),
42
+	'hacks' => $hacks,
43
+	'name' => 'CanvasHack',
44
+	'category' => 'Control Panel'
45 45
 ]);
46 46
 $smarty->display('control-panel.tpl');
Please login to merge, or discard this patch.