$row = pwg_db_fetch_assoc($result); $selected_category = array($row['category_id']); } } } // existing album $template->assign('selected_category', $selected_category); // image level options $selected_level = isset($_POST['level']) ? $_POST['level'] : 0; $template->assign(array('level_options' => get_privacy_level_options(), 'level_options_selected' => array($selected_level))); // +-----------------------------------------------------------------------+ // | Setup errors/warnings | // +-----------------------------------------------------------------------+ // Errors $setup_errors = array(); $error_message = ready_for_upload_message(); if (!empty($error_message)) { $setup_errors[] = $error_message; } if (!function_exists('gd_info')) { $setup_errors[] = l10n('GD library is missing'); } $template->assign(array('setup_errors' => $setup_errors, 'CACHE_KEYS' => get_admin_client_cache_keys(array('categories')))); // Warnings if (isset($_GET['hide_warnings'])) { $_SESSION['upload_hide_warnings'] = true; } if (!isset($_SESSION['upload_hide_warnings'])) { $setup_warnings = array(); if ($conf['use_exif'] and !function_exists('read_exif_data')) { $setup_warnings[] = l10n('Exif extension not available, admin should disable exif use');
/** * API method * Checks if Piwigo is ready for upload * @param mixed[] $params */ function ws_images_checkUpload($params, $service) { include_once PHPWG_ROOT_PATH . 'admin/include/functions_upload.inc.php'; $ret['message'] = ready_for_upload_message(); $ret['ready_for_upload'] = true; if (!empty($ret['message'])) { $ret['ready_for_upload'] = false; } return $ret; }