Advanced search  

News:

cpg1.5.48 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.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Batch add - no listing with no errors displayed  (Read 9898 times)

0 Members and 1 Guest are viewing this topic.

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Batch add - no listing with no errors displayed
« on: June 10, 2005, 05:54:15 am »

If you are trying to use the batch add function, but you don't get any directories listed, and you've verified all of your file permissions are correct, you can try this:

In seachnew.php, find

Code: [Select]
function display_dir_tree($folder, $ident)
below that, replace

Code: [Select]
if (!is_readable($dir_path)) return;
with
Code: [Select]
//if (!is_readable($dir_path)) return;
If that doesn't help, continue further down that function, and replace

Code: [Select]
        //if (is_dir($CONFIG['fullpath'] . $folder . $file) && $file != "." && $file != "..") { // removed by following line for 'do not show folders with dots': gaugau 03-11-02
        if (is_dir($CONFIG['fullpath'] . $folder . $file) && substr($file,0,1) != "." && strpos($file,"'") == FALSE && $file != substr($CONFIG['userpics'],0,strlen($CONFIG['userpics'])-1)  && $file != "edit" ) {

with

Code: [Select]
        if (is_dir($CONFIG['fullpath'] . $folder . $file) && $file != "." && $file != "..") { // removed by following line for 'do not show folders with dots': gaugau 03-11-02
        //if (is_dir($CONFIG['fullpath'] . $folder . $file) && substr($file,0,1) != "." && strpos($file,"'") == FALSE && $file != substr($CONFIG['userpics'],0,strlen($CONFIG['userpics'])-1)  && $file != "edit" ) {

is_readable may have trouble on some servers that have safe mode enabled in php.ini.
« Last Edit: June 11, 2005, 04:52:23 pm by kegobeer »
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Batch add - no listing with no errors displayed
« Reply #1 on: July 26, 2005, 08:34:50 am »

Warning: there appear to be some users who haven't understood the concept of batch-adding, so they apply this hack without knowing what batch-add is all about: you mustn't FTP-upload to the userpics folder, but to a custom folder you have to create first within the albums folder. The userpics folder is not meant to turn up when using batch-add: it's hidden on purpose. Coppermine uses the userpics folder for internal stuff (this is where the http uploads are stored), you mustn't use it for batch-adding. Before applying the hack posted by kegobeer, make sure you have read the docs, especially the batch-add section. Verify that you have set permissions as suggested. I repeat: don't FTP-upload to the userpics folder. Never ever!
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.