Completed
Push — master ( aa5bf7...91d4c5 )
by Justin
49:29 queued 45:20
created
system/packages/com.jukusoft.cms.admin/classes/settingspage.php 2 patches
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -27,57 +27,57 @@
 block discarded – undo
27 27
 
28 28
 class SettingsPage extends PageType {
29 29
 
30
-	public function getContent(): string {
31
-		$template = new DwooTemplate("pages/settings");
30
+    public function getContent(): string {
31
+        $template = new DwooTemplate("pages/settings");
32 32
 
33
-		$template->assign("form_action", DomainUtils::generateURL("admin/settings"));
34
-		$template->assign("content", "");
33
+        $template->assign("form_action", DomainUtils::generateURL("admin/settings"));
34
+        $template->assign("content", "");
35 35
 
36
-		$categories = array();
36
+        $categories = array();
37 37
 
38
-		$all_settings_by_category = Settings::listAllSettingsByCategory();
38
+        $all_settings_by_category = Settings::listAllSettingsByCategory();
39 39
 
40
-		foreach (SettingsCategory::listAllCategories() as $category) {
41
-			$category = SettingsCategory::cast($category);
40
+        foreach (SettingsCategory::listAllCategories() as $category) {
41
+            $category = SettingsCategory::cast($category);
42 42
 
43
-			$settings = array();
43
+            $settings = array();
44 44
 
45
-			if (isset($all_settings_by_category[$category->getCategory()])) {
46
-				//list settings
47
-				$rows = $all_settings_by_category[$category->getCategory()];
45
+            if (isset($all_settings_by_category[$category->getCategory()])) {
46
+                //list settings
47
+                $rows = $all_settings_by_category[$category->getCategory()];
48 48
 
49
-				foreach ($rows as $key=>$row) {
50
-					$datatype = $row['datatype'];
51
-					$datatype_params = unserialize($row['datatype_params']);
49
+                foreach ($rows as $key=>$row) {
50
+                    $datatype = $row['datatype'];
51
+                    $datatype_params = unserialize($row['datatype_params']);
52 52
 
53
-					$obj = new $datatype();
53
+                    $obj = new $datatype();
54 54
 
55
-					if (!($obj instanceof DataType_Base)) {
56
-						throw new IllegalArgumentException("obj of class name '" . $datatype . "' has to be an instance of DataType_Base.");
57
-					}
55
+                    if (!($obj instanceof DataType_Base)) {
56
+                        throw new IllegalArgumentException("obj of class name '" . $datatype . "' has to be an instance of DataType_Base.");
57
+                    }
58 58
 
59
-					$settings[] = array(
60
-						'title' => Translator::translateTitle($row['title']),#
61
-						'description' => Translator::translateTitle($row['description']),
62
-						'code' => $obj->getFormCode()
63
-					);
64
-				}
65
-			}
59
+                    $settings[] = array(
60
+                        'title' => Translator::translateTitle($row['title']),#
61
+                        'description' => Translator::translateTitle($row['description']),
62
+                        'code' => $obj->getFormCode()
63
+                    );
64
+                }
65
+            }
66 66
 
67
-			$categories[] = array(
68
-				'title' => $category->getTitle(),
69
-				'settings' => $settings
70
-			);
71
-		}
67
+            $categories[] = array(
68
+                'title' => $category->getTitle(),
69
+                'settings' => $settings
70
+            );
71
+        }
72 72
 
73
-		$template->assign("categories", $categories);
73
+        $template->assign("categories", $categories);
74 74
 
75
-		return $template->getCode();
76
-	}
75
+        return $template->getCode();
76
+    }
77 77
 
78
-	public function listRequiredPermissions(): array {
79
-		return array("can_see_global_settings", "can_edit_global_settings");
80
-	}
78
+    public function listRequiredPermissions(): array {
79
+        return array("can_see_global_settings", "can_edit_global_settings");
80
+    }
81 81
 
82 82
 }
83 83
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 					}
58 58
 
59 59
 					$settings[] = array(
60
-						'title' => Translator::translateTitle($row['title']),#
60
+						'title' => Translator::translateTitle($row['title']), #
61 61
 						'description' => Translator::translateTitle($row['description']),
62 62
 						'code' => $obj->getFormCode()
63 63
 					);
Please login to merge, or discard this patch.