Batch Upload: Following extension allowed but lists nothing Batch Upload: Following extension allowed but lists nothing
 

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]

Main Menu

Batch Upload: Following extension allowed but lists nothing

Started by MadVelvet, August 31, 2010, 02:52:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MadVelvet

I use cpg 1.5.8.
I designed the look off of the water-drop theme included.  I have updated database.  I can upload a single file.


When I go to batch I can't see the files to select that I want to upload.  All files and albums and directories permission are set to 777.  I tried switchign to another of the themes provided and get the same error. 

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fi36.tinypic.com%2Fsg3mhd.jpg&hash=7608ec64ee015a3d7ed43a5fa0d9f8ba9d34298a)

So I went to searchnew.php file and line and saw this:
Quotecpg_die(ERROR, sprintf($lang_db_input_php['err_invalid_fext'], $CONFIG['allowed_file_extensions']), __FILE__, __LINE__);
                  }

Then went to function.ini.php and found these two things:

function get_album_name($aid)
Quote{
    global $CONFIG;
    global $lang_errors;

    $result = cpg_db_query("SELECT title, keyword FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = $aid");

    $count = mysql_num_rows($result);

    if ($count > 0) {
        $row = mysql_fetch_assoc($result);
        mysql_free_result($result);
        return $row;
    } else {
        cpg_die(ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__);
    }
} // function get_album_name

Quotefunction cpg_get_type($filename,$filter=null)
{
    global $CONFIG;

    static $FILE_TYPES = array();

    if (!$FILE_TYPES) {

        // Map content types to corresponding user parameters
        $content_types_to_vars = array(
            'image'    => 'allowed_img_types',
            'audio'    => 'allowed_snd_types',
            'movie'    => 'allowed_mov_types',
            'document' => 'allowed_doc_types',
        );

        $result = cpg_db_query('SELECT extension, mime, content, player FROM ' . $CONFIG['TABLE_FILETYPES']);

        $CONFIG['allowed_file_extensions'] = '';

        while ( ($row = mysql_fetch_assoc($result)) ) {
            // Only add types that are in both the database and user defined parameter
            if ($CONFIG[$content_types_to_vars[$row['content']]] == 'ALL' || is_int(strpos('/' . $CONFIG[$content_types_to_vars[$row['content']]] . '/', '/' . $row['extension'] . '/'))) {
                $FILE_TYPES[$row['extension']]      = $row;
                $CONFIG['allowed_file_extensions'] .= '/' . $row['extension'];
            }
        }

        $CONFIG['allowed_file_extensions'] = substr($CONFIG['allowed_file_extensions'], 1);

        mysql_free_result($result);
    }

    if (!is_array($filename)) {
        $filename = explode('.', $filename);
    }

    $EOA            = count($filename) - 1;
    $filename[$EOA] = strtolower($filename[$EOA]);

    if (!is_null($filter) && array_key_exists($filename[$EOA], $FILE_TYPES) && ($FILE_TYPES[$filename[$EOA]]['content'] == $filter)) {
        return $FILE_TYPES[$filename[$EOA]];
    } elseif (is_null($filter) && array_key_exists($filename[$EOA], $FILE_TYPES)) {
        return $FILE_TYPES[$filename[$EOA]];
    } else {
        return null;
    }
}

gallery:  www.madsland.net/gallery
Test Account: usertest
password: password

I hope I have provided the information I need to provide.  My apologies if I missed info I am to provide.

Thanks.

MadVelvet

Oops my image with the error didn't load.

My debug says this:


MadVelvet