Skip to content

Commit

Permalink
Merge pull request #2 from junkfix/junkfix-patch-1
Browse files Browse the repository at this point in the history
fix custom folder thumb reset
  • Loading branch information
junkfix authored Apr 5, 2024
2 parents d70d001 + ea67a4e commit 72e35aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pictap.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/* Pictap Gallery https://github.com/junkfix/Pictap */

const PIC_VER = ['1.0.1','1,1']; //[main, [config,db]]
const PIC_VER = ['1.0.2','1,1']; //[main, [config,db]]

if(get('sf')){sfile(get('sf'));}

Expand Down Expand Up @@ -640,7 +640,7 @@ function scanFolder($dir,$force=0){

$did = $dirs['dirid'];

$dthm = null;
$dthm = $dirs['thm'];

$old=[];

Expand Down Expand Up @@ -736,7 +736,7 @@ function scanFolder($dir,$force=0){
logger('Missing thumb '.$tn);
updateFile($cfid, ['th'=>2]);
}
if($filename === PICTAP->folder_thumb){
if($filename === PICTAP->folder_thumb && !$dthm){
$dthm = $cfid;
}
}
Expand Down Expand Up @@ -777,7 +777,7 @@ function scanFolder($dir,$force=0){
if(!$ft){$c['tk']=$filemtime;}
$cfid = insertFile($c,$filename);
}
if($filename === PICTAP->folder_thumb){
if($filename === PICTAP->folder_thumb && !$dthm){
$dthm = $cfid;
}

Expand Down

0 comments on commit 72e35aa

Please sign in to comment.