]> jfr.im git - uguu.git/blobdiff - static/php/includes/Core.namespace.php
Anti-dupe and filter bugs fixed
[uguu.git] / static / php / includes / Core.namespace.php
index 1ad24521e9eb5eaf6f2d6126141ce1acd49968cf..bbb216b3c8101ec46b914b9529dc0e0c62c38c49 100644 (file)
@@ -51,7 +51,6 @@ namespace Core {
 
         public static int $NAME_LENGTH;
         public static string $ID_CHARSET;
-        public static array $DOUBLE_DOTS;
         public static array $BLOCKED_EXTENSIONS;
         public static array $BLOCKED_MIME;
 
@@ -61,12 +60,12 @@ namespace Core {
          */
         public static function loadConfig()
         {
-            if (!file_exists('/Users/go.johansson/PERSONAL_REPOS/Uguu/dist.json')) {
+            if (!file_exists('/var/www/uguu/dist.json')) {
                 throw new Exception('Cant read settings file.', 500);
             }
             try {
                 $settings_array = json_decode(
-                    file_get_contents('/Users/go.johansson/PERSONAL_REPOS/Uguu/dist.json'),
+                    file_get_contents('/var/www/uguu/dist.json'),
                     true
                 );
                 self::$DB_MODE = $settings_array['DB_MODE'];
@@ -85,7 +84,6 @@ namespace Core {
                 self::$ID_CHARSET = $settings_array['ID_CHARSET'];
                 self::$BLOCKED_EXTENSIONS = $settings_array['BLOCKED_EXTENSIONS'];
                 self::$BLOCKED_MIME = $settings_array['BLOCKED_MIME'];
-                self::$DOUBLE_DOTS = $settings_array['DOUBLE_DOTS'];
             } catch (Exception) {
                 throw new Exception('Cant populate settings.', 500);
             }
@@ -329,7 +327,7 @@ namespace Core {
                 $q->execute();
                 $result = $q->fetch();
                 if ($result['count'] > 0) {
-                    Upload::$NEW_NAME_FULL = $result['filename'];
+                    return $result['filename'];
                 }
             } catch (Exception) {
                 throw new Exception('Cant check for dupes in DB.', 500);
@@ -361,4 +359,3 @@ namespace Core {
 }
 
 
-