Completed
Push — develop ( 9d5b94...675582 )
by Seth
06:11
created
control-panel.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 if (isset($_REQUEST['hack'])) {
10 10
 	while (list($id, $setting) = each($_REQUEST['hack'])) {
11
-		try{
11
+		try {
12 12
 
13 13
 			$hack = CanvasHack::getCanvasHackById($sql, $id);
14 14
 			if ($setting === 'enable') {
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
 
25 25
 $hacksContents = scandir(realpath(__DIR__ . '/hacks'), SCANDIR_SORT_ASCENDING);
26 26
 $hacks = array();
27
-foreach($hacksContents as $item) {
27
+foreach ($hacksContents as $item) {
28 28
 	if (is_dir($path = realpath(__DIR__ . "/hacks/$item")) && file_exists($manifest = "$path/manifest.xml")) {
29 29
 		try {
30 30
 			$hacks[$item] = new CanvasHack($sql, $path);
31 31
 		} catch (CanvasHack_Exception $e) {
32 32
 			$smarty->addMessage(
33
-				'CanvasHack Manifest Error ['. $e->getCode() . ']',
33
+				'CanvasHack Manifest Error [' . $e->getCode() . ']',
34 34
 				$e->getMessage(),
35 35
 				NotificationMessage::ERROR
36 36
 			);
Please login to merge, or discard this patch.
common.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@  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
-$toolbox =& $_SESSION[Toolbox::class];
18
+$toolbox = & $_SESSION[Toolbox::class];
19 19
 $toolbox->smarty_prependTemplateDir(__DIR__ . '/templates', basename(__DIR__));
20 20
 $toolbox->smarty_assign([
21 21
     'category' => DataUtilities::titleCase(preg_replace('/[\-_]+/', ' ', basename(__DIR__)))
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 /*
25 25
  * FIXME convience variables until plugins are all updated
26 26
  */
27
- $api =& $toolbox->getAPI();
28
- $sql =& $toolbox->getMySQL();
29
- $smarty =& $toolbox->getSmarty();
27
+ $api = & $toolbox->getAPI();
28
+ $sql = & $toolbox->getMySQL();
29
+ $smarty = & $toolbox->getSmarty();
30 30
 
31 31
 /* set the Tool Consumer's instance URL, if present */
32 32
 if (empty($_SESSION[CANVAS_INSTANCE_URL]) &&
Please login to merge, or discard this patch.
src/CanvasHack.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -134,13 +134,11 @@
 block discarded – undo
134 134
         $_name = $this->sql->real_escape_string($this->name);
135 135
         $_abstract = (
136 136
             isset($this->abstract) ?
137
-                $this->sql->real_escape_string($this->abstract) :
138
-                $this->sql->real_escape_string($this->description)
137
+                $this->sql->real_escape_string($this->abstract) : $this->sql->real_escape_string($this->description)
139 138
         );
140 139
         $_description = (
141 140
             isset($this->description) ?
142
-                $this->sql->real_escape_string($this->description) :
143
-                $this->sql->real_escape_string($this->abstract)
141
+                $this->sql->real_escape_string($this->description) : $this->sql->real_escape_string($this->abstract)
144 142
         );
145 143
         $_path = $this->sql->real_escape_string($this->path);
146 144
 
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 /* store any requested actions for future handling */
15 15
 $action = (empty($_REQUEST['action']) ?
16
-    ACTION_UNSPECIFIED :
17
-    strtolower($_REQUEST['action'])
16
+    ACTION_UNSPECIFIED : strtolower($_REQUEST['action'])
18 17
 );
19 18
 
20 19
 /* action requests only come from outside the LTI! */
@@ -37,8 +36,7 @@  discard block
 block discarded – undo
37 36
 /* if not authenticated, default to showing credentials */
38 37
 } else {
39 38
     $action = (empty($action) ?
40
-        ACTION_CONFIG :
41
-        $action
39
+        ACTION_CONFIG : $action
42 40
     );
43 41
 }
44 42
 
@@ -47,7 +45,7 @@  discard block
 block discarded – undo
47 45
     /* reset cached install data from config file */
48 46
     case ACTION_INSTALL:
49 47
         $_SESSION['toolbox'] = Toolbox::fromConfiguration(CONFIG_FILE, true);
50
-        $toolbox =& $_SESSION['toolbox'];
48
+        $toolbox = & $_SESSION['toolbox'];
51 49
 
52 50
         /* test to see if we can connect to the API */
53 51
         try {
Please login to merge, or discard this patch.