Completed
Push — master ( 7a90d2...3562e0 )
by Seth
02:15
created
common.inc.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -14,40 +14,40 @@
 block discarded – undo
14 14
 
15 15
 /* prepare the toolbox */
16 16
 if (empty($_SESSION[Toolbox::class])) {
17
-    $_SESSION[Toolbox::class] = Toolbox::fromConfiguration(CONFIG_FILE);
17
+	$_SESSION[Toolbox::class] = Toolbox::fromConfiguration(CONFIG_FILE);
18 18
 }
19 19
 $toolbox =& $_SESSION[Toolbox::class];
20 20
 
21 21
 /* identify the tool's Canvas instance URL */
22 22
 if (empty($_SESSION[CANVAS_INSTANCE_URL])) {
23
-    if (!empty($_SESSION[ToolProvider::class]['canvas']['api_domain'])) {
24
-        $_SESSION[CANVAS_INSTANCE_URL] =
25
-            'https://' . $_SESSION[ToolProvider::class]['canvas']['api_domain'];
26
-    } else {
27
-        /*
23
+	if (!empty($_SESSION[ToolProvider::class]['canvas']['api_domain'])) {
24
+		$_SESSION[CANVAS_INSTANCE_URL] =
25
+			'https://' . $_SESSION[ToolProvider::class]['canvas']['api_domain'];
26
+	} else {
27
+		/*
28 28
          * due the way that canvashack.css and canvashack.js are loaded, we
29 29
          * need to fall back to the configuration file
30 30
          */
31
-        $_SESSION[CANVAS_INSTANCE_URL] =
32
-            'https://' . parse_url($toolbox->config(Toolbox::TOOL_CANVAS_API)['url'], PHP_URL_HOST);
33
-    }
31
+		$_SESSION[CANVAS_INSTANCE_URL] =
32
+			'https://' . parse_url($toolbox->config(Toolbox::TOOL_CANVAS_API)['url'], PHP_URL_HOST);
33
+	}
34 34
 }
35 35
 
36 36
 /* force API configuration based on detected CANVAS_INSTANCE_URL */
37 37
 $toolbox->setApi(new CanvasPest(
38
-    $_SESSION[CANVAS_INSTANCE_URL] . '/api/v1',
39
-    $toolbox->config(Toolbox::TOOL_CANVAS_API)['token']
38
+	$_SESSION[CANVAS_INSTANCE_URL] . '/api/v1',
39
+	$toolbox->config(Toolbox::TOOL_CANVAS_API)['token']
40 40
 ));
41 41
 
42 42
 /* configure templating engine, if we are not a CLI instance */
43 43
 if (php_sapi_name() !== 'cli') {
44
-    $toolbox->smarty_prependTemplateDir(__DIR__ . '/templates', basename(__DIR__));
45
-    $toolbox->smarty_assign([
46
-        'category' => DataUtilities::titleCase(preg_replace('/[\-_]+/', ' ', basename(__DIR__)))
47
-    ]);
44
+	$toolbox->smarty_prependTemplateDir(__DIR__ . '/templates', basename(__DIR__));
45
+	$toolbox->smarty_assign([
46
+		'category' => DataUtilities::titleCase(preg_replace('/[\-_]+/', ' ', basename(__DIR__)))
47
+	]);
48 48
 
49
-    // FIXME convenience variable
50
-    $smarty =& $toolbox->getSmarty();
49
+	// FIXME convenience variable
50
+	$smarty =& $toolbox->getSmarty();
51 51
 }
52 52
 
53 53
 // FIXME convience variables until plugins are all updated
Please login to merge, or discard this patch.