Skip to content

Commit

Permalink
Resolved issue 0000725: Check integrity
Browse files Browse the repository at this point in the history
Replace actual test (exif) by a new dynamic system of check integrity.
Anomalies are listed with automatic correction if it's possible.

It's a proposition of new feature!

git-svn-id: http://piwigo.org/svn/trunk@2065 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rub committed Jul 18, 2007
1 parent ec6395c commit b879e17
Show file tree
Hide file tree
Showing 7 changed files with 515 additions and 50 deletions.
13 changes: 7 additions & 6 deletions admin.php
Expand Up @@ -43,12 +43,6 @@

sync_users();

// +-----------------------------------------------------------------------+
// | Check configuration and add notes on problem |
// +-----------------------------------------------------------------------+

check_conf();

// +-----------------------------------------------------------------------+
// | variables init |
// +-----------------------------------------------------------------------+
Expand All @@ -67,6 +61,13 @@
$page['errors'] = array();
$page['infos'] = array();


if ($page['page'] == 'intro')
{
include_once(PHPWG_ROOT_PATH.'admin/include/functions_check_integrity.inc.php');
check_integrity();
}

$link_start = PHPWG_ROOT_PATH.'admin.php?page=';
$conf_link = $link_start.'configuration&section=';
//----------------------------------------------------- template initialization
Expand Down
36 changes: 0 additions & 36 deletions admin/include/functions.php
Expand Up @@ -1951,42 +1951,6 @@ function export_pwg_data($image_ids)
fclose($fp);
}

/**
* Check configuration and add notes on problem
*
* @param void
* @return void
*/
function check_conf()
{
global $conf, $header_notes;
$count = 0;

if (($conf['show_exif']) and (!function_exists('read_exif_data')))
{
$header_notes[] = sprintf(l10n('note_check_exif'), '$conf[\'show_exif\']');
$count++;
}

if (($conf['use_exif']) and (!function_exists('read_exif_data')))
{
$header_notes[] = sprintf(l10n('note_check_exif'), '$conf[\'use_exif\']');
$count++;
}

if ($count != 0)
{
$pwg_links = pwg_URL();
$link_fmt = '<a href="%s" onclick="window.open(this.href, \'\'); return false;">%s</a>';
$header_notes[] =
sprintf
(
l10n('note_check_more_info'),
sprintf($link_fmt, $pwg_links['FORUM'], l10n('note_check_more_info_forum')),
sprintf($link_fmt, $pwg_links['WIKI'], l10n('note_check_more_info_wiki'))
);
}
}
/**
* Refer main PhpWebGallery URLs (currently PHPWG_DOMAIN domain)
*
Expand Down

0 comments on commit b879e17

Please sign in to comment.