Ejemplo n.º 1
0
function generate_exif_entry($html)
{
    global $CONFIG;
    extractExifsAndImport($html);
    if ($CONFIG['plugin_flf_histotag_createonupload'] == '1') {
        // load the functions
        require_once './plugins/flf_histotag/include/histotag_histogram_support.php';
        // create the histogram
        makeHistogram('albums/' . $html['filepath'], $html['filename'], $html['pid']);
    }
}
function generateAllHistograms()
{
    // TODO: DO something about max execution time!
    global $CONFIG, $flf_lang_var;
    $insertedvalues = 0;
    set_time_limit(500);
    $result = cpg_db_query("SELECT t.pid, t.filepath, t.filename FROM {$CONFIG['TABLE_PICTURES']} t ");
    while ($row = mysql_fetch_assoc($result)) {
        $calldata['pid'] = $row['pid'];
        $calldata['filepath'] = $row['filepath'];
        $calldata['filename'] = $row['filename'];
        if (!file_exists('albums/' . $calldata['filepath'] . 'hist_' . $calldata['pid'] . '_' . $calldata['filename'])) {
            $success = makeHistogram('albums/' . $calldata['filepath'], $calldata['filename'], $calldata['pid']);
            if ($success) {
                $insertedvalues++;
            }
        }
    }
    return $insertedvalues;
}