Completed
Push — master ( 711487...8f6bce )
by Seth
03:08
created
common.inc.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -13,39 +13,39 @@
 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
 
20 20
 /* identify the tool's Canvas instance URL */
21 21
 if (empty($_SESSION[CANVAS_INSTANCE_URL])) {
22
-    if (!empty($_SESSION[ToolProvider::class]['canvas']['api_domain'])) {
23
-        $_SESSION[CANVAS_INSTANCE_URL] =
24
-            'https://' . $_SESSION[ToolProvider::class]['canvas']['api_domain'];
25
-    } elseif (!empty($_SERVER['HTTP_REFERER'])) {
26
-        $_SESSION[CANVAS_INSTANCE_URL] =
27
-            'https://' . parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST);
28
-    } else {
29
-        $_SESSION[CANVAS_INSTANCE_URL] =
30
-            'https://' . parse_url($toolbox->config(Toolbox::TOOL_CANVAS_API)['url'], PHP_URL_HOST);
31
-    }
22
+	if (!empty($_SESSION[ToolProvider::class]['canvas']['api_domain'])) {
23
+		$_SESSION[CANVAS_INSTANCE_URL] =
24
+			'https://' . $_SESSION[ToolProvider::class]['canvas']['api_domain'];
25
+	} elseif (!empty($_SERVER['HTTP_REFERER'])) {
26
+		$_SESSION[CANVAS_INSTANCE_URL] =
27
+			'https://' . parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST);
28
+	} else {
29
+		$_SESSION[CANVAS_INSTANCE_URL] =
30
+			'https://' . parse_url($toolbox->config(Toolbox::TOOL_CANVAS_API)['url'], PHP_URL_HOST);
31
+	}
32 32
 }
33 33
 
34 34
 /* force API configuration based on detected CANVAS_INSTANCE_URL */
35 35
 $toolbox->setApi(new CanvasPest(
36
-    $_SESSION[CANVAS_INSTANCE_URL] . '/api/v1',
37
-    $toolbox->config(Toolbox::TOOL_CANVAS_API)['token']
36
+	$_SESSION[CANVAS_INSTANCE_URL] . '/api/v1',
37
+	$toolbox->config(Toolbox::TOOL_CANVAS_API)['token']
38 38
 ));
39 39
 
40 40
 /* configure templating engine, if we are not a CLI instance */
41 41
 if (php_sapi_name() !== 'cli') {
42
-    $toolbox->smarty_prependTemplateDir(__DIR__ . '/templates', basename(__DIR__));
43
-    $toolbox->smarty_assign([
44
-        'category' => DataUtilities::titleCase(preg_replace('/[\-_]+/', ' ', basename(__DIR__)))
45
-    ]);
42
+	$toolbox->smarty_prependTemplateDir(__DIR__ . '/templates', basename(__DIR__));
43
+	$toolbox->smarty_assign([
44
+		'category' => DataUtilities::titleCase(preg_replace('/[\-_]+/', ' ', basename(__DIR__)))
45
+	]);
46 46
 
47
-    // FIXME convenience variable
48
-    $smarty =& $toolbox->getSmarty();
47
+	// FIXME convenience variable
48
+	$smarty =& $toolbox->getSmarty();
49 49
 }
50 50
 
51 51
 // FIXME convience variables until plugins are all updated
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 if (empty($_SESSION[Toolbox::class])) {
16 16
     $_SESSION[Toolbox::class] = Toolbox::fromConfiguration(CONFIG_FILE);
17 17
 }
18
-$toolbox =& $_SESSION[Toolbox::class];
18
+$toolbox = & $_SESSION[Toolbox::class];
19 19
 
20 20
 /* identify the tool's Canvas instance URL */
21 21
 if (empty($_SESSION[CANVAS_INSTANCE_URL])) {
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
     ]);
46 46
 
47 47
     // FIXME convenience variable
48
-    $smarty =& $toolbox->getSmarty();
48
+    $smarty = & $toolbox->getSmarty();
49 49
 }
50 50
 
51 51
 // FIXME convience variables until plugins are all updated
52
-$api =& $toolbox->getAPI();
53
-$sql =& $toolbox->getMySQL();
54
-$customPrefs =& $toolbox->getCustomPrefs();
52
+$api = & $toolbox->getAPI();
53
+$sql = & $toolbox->getMySQL();
54
+$customPrefs = & $toolbox->getCustomPrefs();
Please login to merge, or discard this patch.