Completed
Push — develop ( 59d8ae...a4d624 )
by Seth
04:29
created
common.inc.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -13,15 +13,15 @@  discard block
 block discarded – undo
13 13
 
14 14
 /* prepare the toolbox */
15 15
 if (empty($_SESSION[Toolbox::class])) {
16
-    $_SESSION[Toolbox::class] =& Toolbox::fromConfiguration(CONFIG_FILE);
16
+	$_SESSION[Toolbox::class] =& Toolbox::fromConfiguration(CONFIG_FILE);
17 17
 }
18 18
 $toolbox =& $_SESSION[Toolbox::class];
19 19
 if (php_sapi_name() !== 'cli') {
20
-    $toolbox->smarty_prependTemplateDir(__DIR__ . '/templates', basename(__DIR__));
21
-    $toolbox->smarty_assign([
22
-        'category' => DataUtilities::titleCase(preg_replace('/[\-_]+/', ' ', basename(__DIR__)))
23
-    ]);
24
-     $smarty =& $toolbox->getSmarty(); // FIXME
20
+	$toolbox->smarty_prependTemplateDir(__DIR__ . '/templates', basename(__DIR__));
21
+	$toolbox->smarty_assign([
22
+		'category' => DataUtilities::titleCase(preg_replace('/[\-_]+/', ' ', basename(__DIR__)))
23
+	]);
24
+	 $smarty =& $toolbox->getSmarty(); // FIXME
25 25
 }
26 26
 
27 27
 /*
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
 /* set the Tool Consumer's instance URL, if present */
35 35
 if (empty($_SESSION[CANVAS_INSTANCE_URL]) &&
36
-    !empty($_SESSION[ToolProvider::class]['canvas']['api_domain'])
36
+	!empty($_SESSION[ToolProvider::class]['canvas']['api_domain'])
37 37
 ) {
38
-    $_SESSION[CANVAS_INSTANCE_URL] = 'https://' . $_SESSION[ToolProvider::class]['canvas']['api_domain'];
38
+	$_SESSION[CANVAS_INSTANCE_URL] = 'https://' . $_SESSION[ToolProvider::class]['canvas']['api_domain'];
39 39
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,23 +13,23 @@
 block discarded – undo
13 13
 
14 14
 /* prepare the toolbox */
15 15
 if (empty($_SESSION[Toolbox::class])) {
16
-    $_SESSION[Toolbox::class] =& Toolbox::fromConfiguration(CONFIG_FILE);
16
+    $_SESSION[Toolbox::class] = & Toolbox::fromConfiguration(CONFIG_FILE);
17 17
 }
18
-$toolbox =& $_SESSION[Toolbox::class];
18
+$toolbox = & $_SESSION[Toolbox::class];
19 19
 if (php_sapi_name() !== 'cli') {
20 20
     $toolbox->smarty_prependTemplateDir(__DIR__ . '/templates', basename(__DIR__));
21 21
     $toolbox->smarty_assign([
22 22
         'category' => DataUtilities::titleCase(preg_replace('/[\-_]+/', ' ', basename(__DIR__)))
23 23
     ]);
24
-     $smarty =& $toolbox->getSmarty(); // FIXME
24
+     $smarty = & $toolbox->getSmarty(); // FIXME
25 25
 }
26 26
 
27 27
 /*
28 28
  * FIXME convience variables until plugins are all updated
29 29
  */
30
-$api =& $toolbox->getAPI();
31
-$sql =& $toolbox->getMySQL();
32
-$customPrefs =& $toolbox->getCustomPrefs();
30
+$api = & $toolbox->getAPI();
31
+$sql = & $toolbox->getMySQL();
32
+$customPrefs = & $toolbox->getCustomPrefs();
33 33
 
34 34
 /* set the Tool Consumer's instance URL, if present */
35 35
 if (empty($_SESSION[CANVAS_INSTANCE_URL]) &&
Please login to merge, or discard this patch.
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.