Advanced search  

News:

cpg1.5.36 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.34 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: BatchAdd tweak required  (Read 1584 times)

0 Members and 1 Guest are viewing this topic.

sjj1805

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
BatchAdd tweak required
« on: October 04, 2014, 06:35:36 PM »

Linkto my Albums:
http://stevejjones.co.uk/photo/index.php
I have spent several hours searching through these forums for the answer but alas I need to ask your help!
I know what needs to be done but I just dont know how to do it myself.
I have over 25,000 photographs stored on my hard drive and when I first began I created a directory structure where my photographs would be stored according to the date they were taken.
Under the built in Directory "Albums" in my coppermine installation
C:\inetpub\wwwroot\photo\albums
I then create sub-directoriesfor the year e.g.
C:\inetpub\wwwroot\photo\albums\2010
C:\inetpub\wwwroot\photo\albums\2011
C:\inetpub\wwwroot\photo\albums\2012
C:\inetpub\wwwroot\photo\albums\2013
C:\inetpub\wwwroot\photo\albums\2014

Below the 'year' Comes the month. eg.
C:\inetpub\wwwroot\photo\albums\2014\01Jan
C:\inetpub\wwwroot\photo\albums\2014\02feb
C:\inetpub\wwwroot\photo\albums\2014\02mar

Below this the actual album itself eg.
C:\inetpub\wwwroot\photo\albums\2014\02mar\Med_Cruise
C:\inetpub\wwwroot\photo\albums\2014\02mar\Someones_Party
C:\inetpub\wwwroot\photo\albums\2014\02mar\Stonehenge

The problem I have encountered with "Batch Add" is that If I later add new photographs to an existing album (on the harddrive) the batch add process is marking ALL of the photographs for upload and not just the new ones.

After several tests I discovered that the batch add process works correctly if a folder is under the actual root directory "Albums" and only marks new photographs for upload.
eg.
C:\inetpub\wwwroot\photo\albums\newDirectory

It seems that a tweak to "Searchnew.php" is required - I think probably to the variable $expic_array
But I do not know howto do so.

Any help appreciated. Thank you in advance.

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15039
Re: BatchAdd tweak required
« Reply #1 on: October 06, 2014, 10:44:09 AM »

After several tests I discovered that the batch add process works correctly if a folder is under the actual root directory "Albums" and only marks new photographs for upload.
eg.
C:\inetpub\wwwroot\photo\albums\newDirectory

Batch-add should only mark new files, regardless of the directory depth. I confirmed the issue on my test bed and try to fix it as soon as possible.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15039
Re: BatchAdd tweak required
« Reply #2 on: October 06, 2014, 10:56:00 AM »

Issue occurs on Windows driven systems, because of the directory separator "\" used in the parameter "startdir".

Please open searchnew.php, find
Code: [Select]
$startdir = $matches[0];and replace with
Code: [Select]
$startdir = str_replace('\\', '/', $matches[0]);
Logged

sjj1805

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: BatchAdd tweak required
« Reply #3 on: October 06, 2014, 01:24:27 PM »

Andre, Works perfectly. Thank you for doing this and so quickly.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15039
Re: BatchAdd tweak required
« Reply #4 on: October 06, 2014, 01:33:35 PM »

Committed fix in SVN revision 8740. Will be part of cpg1.5.32 and above.
Logged
Pages: [1]   Go Up
 

Page created in 0.068 seconds with 20 queries.