瀏覽代碼

Fix Group error

causefx 8 年之前
父節點
當前提交
13eec96c8b
共有 4 個文件被更改,包括 19 次插入19 次删除
  1. 12 12
      css/style.css
  2. 1 0
      homepage.php
  3. 4 6
      index.php
  4. 2 1
      settings.php

+ 12 - 12
css/style.css

@@ -749,7 +749,7 @@ a.text-info:hover {
   font-size: 19px;
   text-align: center;
   text-align: -webkit-center;
-    
+
 }
 
 .gn-menu .label {
@@ -958,7 +958,7 @@ button::-moz-focus-inner {
 html, body {
   height: 100%;
 }
-::-webkit-scrollbar { 
+::-webkit-scrollbar {
    display: none;
 }
 
@@ -971,10 +971,10 @@ body {
   position: relative;
   background: #F1F4F5;
   overflow-x: hidden;
-  overflow-x:hidden; 
+  overflow-x:hidden;
   /*MS Edge */
   -ms-overflow-style: -ms-autohiding-scrollbar;
-  -ms-overflow-style: none; 
+  -ms-overflow-style: none;
 }
 
 .main-wrapper {
@@ -1167,7 +1167,7 @@ body {
 }
 
 .small-box {
-  padding: 20px 5px;
+  padding: 20px 8px;
 }
 
 .small-box .info {
@@ -2218,7 +2218,7 @@ table.dataTable.no-footer, table.dataTable thead th, table.dataTable thead td {
     .fc-title {
      text-overflow: ellipsis;
      white-space: nowrap;
-     overflow: hidden;   
+     overflow: hidden;
     }
 }
 
@@ -3530,7 +3530,7 @@ ul.inbox-pagination li {
 
 .ns-effect-bouncyflip p {
   padding: 0.5em 0.8em 0.8em 3.5em;
-  padding-left: 0px !important;    
+  padding-left: 0px !important;
 }
 
 .ns-effect-bouncyflip .ns-close::after,
@@ -5964,17 +5964,17 @@ label {
   z-index: 1;
   /*right: -425px;*/
   right: calc(-105%);
-  right: -webkit-calc(-105%);    
+  right: -webkit-calc(-105%);
   -webkit-box-shadow: -1px 1px 5px 0px rgba(0, 0, 0, 0.13);
           box-shadow: -1px 1px 5px 0px rgba(0, 0, 0, 0.13);
-  
+
 }
 
 .mini-nav .members-sidebar {
   width: calc(100% - 50px);
   width: -webkit-calc(100% - 50px);
   right: calc(-100%);
-  right: -webkit-calc(-100%); 
+  right: -webkit-calc(-100%);
 }
 
 .members-sidebar .messages {
@@ -6195,7 +6195,7 @@ label {
 }
 
 .content-tools a {
-  color: #76828E; 
+  color: #76828E;
 }
 
 .flot-tooltip {
@@ -6214,7 +6214,7 @@ label {
   }
   .mdi-window-restore {
     display: none !important;
-  }    
+  }
   /*Remove margins from content block*/
   .content {
     margin: 0;

+ 1 - 0
homepage.php

@@ -8,6 +8,7 @@ ini_set("error_reporting", E_ALL | E_STRICT);
 require_once("user.php");
 require_once("functions.php");
 $USER = new User("registration_callback");
+$group = $USER->role;
 
 // Check if connection to homepage is allowed
 qualifyUser(HOMEPAGEAUTHNEEDED, true);

+ 4 - 6
index.php

@@ -28,7 +28,6 @@ $loadingIcon = "images/organizr-load-w-thick.gif";
 $baseURL = "";
 $dbcreated = false;
 $splash = false;
-$group = (isset($group) ? $group : "guest");
 
 // Get Action
 if(isset($_POST['action'])) {
@@ -67,6 +66,7 @@ if (file_exists('config/config.php')) {
 	$configReady = "Yes";
 	require_once("user.php");
 	$USER = new User("registration_callback");
+	$group = $USER->role;
 
 	$dbfile = DATABASE_LOCATION  . constant('User::DATABASE_NAME') . ".db";
 	$database = new PDO("sqlite:" . $dbfile);
@@ -185,16 +185,14 @@ if(!defined('AUTOHIDE')) : define('AUTOHIDE', 'false'); endif;
 if(!defined('ENABLEMAIL')) : define('ENABLEMAIL', 'false'); endif;
 if(!defined('CUSTOMCSS')) : define('CUSTOMCSS', 'false'); endif;
 if(!defined('LOADINGSCREEN')) : define('LOADINGSCREEN', 'true'); endif;
-if(!isset($notifyExplode)) :
-
-	$notifyExplode = array("bar","slidetop");
-
-endif;
+if(!isset($notifyExplode)) : $notifyExplode = array("bar","slidetop"); endif;
 
 if(SLIMBAR == "true") : $slimBar = "30"; $userSize = "25"; $chatSize = "142px"; else : $slimBar = "56"; $userSize = "40"; $chatSize = "171px";endif;
 
 if(file_exists("images/settings2.png")) : $iconRotate = "false"; $settingsIcon = "settings2.png"; else: $iconRotate = "true"; $settingsIcon = "settings.png"; endif;
 
+$group = (isset($group) ? $group : "guest");
+
 ?>
 <!--
 

+ 2 - 1
settings.php

@@ -11,6 +11,7 @@ $databaseConfig = configLazy('config/config.php');
 // Load USER
 require_once("user.php");
 $USER = new User("registration_callback");
+$group = $USER->role;
 
 // Create Database Connection
 $file_db = new PDO('sqlite:'.DATABASE_LOCATION.'users.db');
@@ -3686,7 +3687,7 @@ echo buildSettings(
                         }else{
                             console.log("something went wrong");
                         }
-                        $(infoTabVersion).html("<strong><?php echo $language->translate("INSTALLED_VERSION");?>: </strong>" + currentVersion + " <strong><?php echo $language->translate("CURRENT_VERSION");?>: </strong>" + githubVersion + " <strong><?php echo $language->translate("DATABASE_PATH");?>:  </strong> <?php echo htmlentities(DATABASE_LOCATION);?>");
+                        $(infoTabVersion).html("<strong><?php echo $language->translate("INSTALLED_VERSION");?>: </strong>" + currentVersion + " <strong><?php echo $language->translate("CURRENT_VERSION");?>: </strong>" + githubVersion + " <strong><?php echo $language->translate("DATABASE_PATH");?>:  </strong> <?php echo htmlentities(DATABASE_LOCATION);?> <strong><?php echo $language->translate("DOMAIN");?>:  </strong> <?php echo substr(getServerPath(), 0, -1);?>");
                     }
                 });
             }