Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Batch Upload: Following extension allowed but lists nothing  (Read 3309 times)

0 Members and 1 Guest are viewing this topic.

MadVelvet

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 15
    • Mystic Bliss
Batch Upload: Following extension allowed but lists nothing
« on: August 31, 2010, 02:52:06 am »

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. 

(http://i36.tinypic.com/sg3mhd.jpg)

So I went to searchnew.php file and line and saw this:
Quote
                      cpg_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

Quote
function 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.
Logged

MadVelvet

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 15
    • Mystic Bliss
Re: Batch Upload: Following extension allowed but lists nothing
« Reply #1 on: August 31, 2010, 02:53:53 am »

Oops my image with the error didn't load.

My debug says this:

Logged

MadVelvet

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 15
    • Mystic Bliss
Re: Batch Upload: Following extension allowed but lists nothing
« Reply #2 on: August 31, 2010, 08:33:32 pm »

Solved by re-installing cpg1.5.8
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.