3 Commits 2925e1f10d ... 042d6442ce

Autore SHA1 Messaggio Data
  k4be 042d6442ce Ignore more non-image dirs 1 anno fa
  k4be 49750d45f2 Fix not changing image URLs 1 anno fa
  k4be 290cec1838 Add hidden dirs option 1 anno fa
3 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 1 1
      admin.php
  2. 1 0
      image.js
  3. 2 0
      include/db.php

+ 1 - 1
admin.php

@@ -28,7 +28,7 @@ function admin_dir_fill() {
 	$dirlist = [];
 	while ($file = readdir($dir_handle)) {
 		if(!is_dir($path.$file)) continue;
-		if (in_array($file, array('miniatury', '.', '..')))
+		if (in_array($file, array('miniatury', 'include', '.git', '.', '..')))
 			continue;
 		$dirlist[] = array('name' => $file, 'date' => filemtime($path.$file));
 	}

+ 1 - 0
image.js

@@ -9,6 +9,7 @@ function makeImageUrl(dir, file) {
 	if (mode && mode.length > 0) {
 		res += '&mode=' + mode;
 	}
+	return res;
 }
 
 function setLinks(e) {

+ 2 - 0
include/db.php

@@ -50,6 +50,8 @@ function get_dir_list() {
 		die();
 	}
 	while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+		if ($row['hidden'])
+			continue;
 		$dir[] = $row;
 
 	}