Exemplo n.º 1
0
                }
            }
            foreach ($errors as $error) {
                $messages[] = array('text' => 'Fehlermeldung: ' . $error, 'color' => 'red');
            }
            break;
    }
}
/********************************************************************************
 *
 *   List broken filename footprints
 *
 *********************************************************************************/
if (!$fatal_error) {
    try {
        $broken_filename_footprints = Footprint::get_broken_filename_footprints($database, $current_user, $log);
        $broken_filename_loop = array();
        if (count($broken_filename_footprints) > 0) {
            // get all available files for the proposed footprint images
            $available_proposed_files = array_merge(find_all_files(BASE . '/img/', true), find_all_files(BASE . '/data/media/', true));
            // read the PHP constant "max_input_vars"
            $max_input_vars = ini_get('max_input_vars') !== false ? (int) ini_get('max_input_vars') : 999999;
            for ($i = 0; $i < count($broken_filename_footprints); $i++) {
                // avoid too many post variables
                if ($i * 10 >= $max_input_vars) {
                    break;
                }
                // avoid too long execution time and a huge HTML table
                if ($i >= 100) {
                    break;
                }
Exemplo n.º 2
0
        $html->set_variable('missing_storeloc', $missing_storelocation);
        $html->set_variable('missing_footprint', $missing_footprint);
        $html->set_variable('missing_supplier', $missing_supplier);
        $html->set_variable('display_warning', $display_warning, 'boolean');
    } catch (Exception $e) {
        $messages[] = array('text' => nl2br($e->getMessage()), 'strong' => true, 'color' => 'red');
    }
}
/********************************************************************************
 *
 *   Show a warning if there are footprints with broken filenames
 *
 *********************************************************************************/
if (!$fatal_error && !$database->is_update_required()) {
    try {
        if (count(Footprint::get_broken_filename_footprints($database, $current_user, $log)) > 0) {
            $html->set_variable('broken_filename_footprints', true);
        } else {
            $html->set_variable('broken_filename_footprints', false);
        }
    } catch (Exception $e) {
        $messages[] = array('text' => nl2br($e->getMessage()), 'strong' => true, 'color' => 'red');
    }
}
/********************************************************************************
 *
 *   Show Update List (RSS Feed from Google Code) if enabled
 *
 *********************************************************************************/
if (!$fatal_error && !$config['startup']['disable_update_list']) {
    $feed_link = 'https://github.com/sandboxgangster/Part-DB/releases.atom';