aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/check_integrity.class.php
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2010-12-14 13:47:24 +0000
committerpatdenice <patdenice@piwigo.org>2010-12-14 13:47:24 +0000
commit731f8888a45d4b48e94bff05187e0e2ca40d4ef5 (patch)
tree1fc44a3a59beafe636b74127498d0ed62decdc76 /admin/include/check_integrity.class.php
parentbf1aa6fcf1f6d9038a0723e4f0213e416ec5ee62 (diff)
feature 2060: Remove adviser mode.
First commit: only php files. git-svn-id: http://piwigo.org/svn/trunk@8126 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/check_integrity.class.php117
1 files changed, 57 insertions, 60 deletions
diff --git a/admin/include/check_integrity.class.php b/admin/include/check_integrity.class.php
index 70c8d73ac..da86761c7 100644
--- a/admin/include/check_integrity.class.php
+++ b/admin/include/check_integrity.class.php
@@ -77,80 +77,77 @@ class check_integrity
}
// Treatments
- if (!is_adviser())
+ if (isset($_POST['c13y_submit_correction']) and isset($_POST['c13y_selection']))
{
- if (isset($_POST['c13y_submit_correction']) and isset($_POST['c13y_selection']))
- {
- $corrected_count = 0;
- $not_corrected_count = 0;
+ $corrected_count = 0;
+ $not_corrected_count = 0;
- foreach ($this->retrieve_list as $i => $c13y)
+ foreach ($this->retrieve_list as $i => $c13y)
+ {
+ if (!empty($c13y['correction_fct']) and
+ $c13y['is_callable'] and
+ in_array($c13y['id'], $_POST['c13y_selection']))
{
- if (!empty($c13y['correction_fct']) and
- $c13y['is_callable'] and
- in_array($c13y['id'], $_POST['c13y_selection']))
+ if (is_array($c13y['correction_fct_args']))
{
- if (is_array($c13y['correction_fct_args']))
- {
- $args = $c13y['correction_fct_args'];
- }
- else
- if (!is_null($c13y['correction_fct_args']))
- {
- $args = array($c13y['correction_fct_args']);
- }
- else
- {
- $args = array();
- }
- $this->retrieve_list[$i]['corrected'] = call_user_func_array($c13y['correction_fct'], $args);
+ $args = $c13y['correction_fct_args'];
+ }
+ else
+ if (!is_null($c13y['correction_fct_args']))
+ {
+ $args = array($c13y['correction_fct_args']);
+ }
+ else
+ {
+ $args = array();
+ }
+ $this->retrieve_list[$i]['corrected'] = call_user_func_array($c13y['correction_fct'], $args);
- if ($this->retrieve_list[$i]['corrected'])
- {
- $corrected_count += 1;
- }
- else
- {
- $not_corrected_count += 1;
- }
+ if ($this->retrieve_list[$i]['corrected'])
+ {
+ $corrected_count += 1;
+ }
+ else
+ {
+ $not_corrected_count += 1;
}
}
+ }
- if ($corrected_count > 0)
- {
- $page['infos'][] =
- l10n_dec('%d anomaly has been corrected.', '%d anomalies have been detected corrected.',
- $corrected_count);
- }
- if ($not_corrected_count > 0)
- {
- $page['errors'][] =
- l10n_dec('%d anomaly has not been corrected.', '%d anomalies have not been corrected.',
- $not_corrected_count);
- }
+ if ($corrected_count > 0)
+ {
+ $page['infos'][] =
+ l10n_dec('%d anomaly has been corrected.', '%d anomalies have been detected corrected.',
+ $corrected_count);
}
- else
+ if ($not_corrected_count > 0)
{
- if (isset($_POST['c13y_submit_ignore']) and isset($_POST['c13y_selection']))
- {
- $ignored_count = 0;
+ $page['errors'][] =
+ l10n_dec('%d anomaly has not been corrected.', '%d anomalies have not been corrected.',
+ $not_corrected_count);
+ }
+ }
+ else
+ {
+ if (isset($_POST['c13y_submit_ignore']) and isset($_POST['c13y_selection']))
+ {
+ $ignored_count = 0;
- foreach ($this->retrieve_list as $i => $c13y)
+ foreach ($this->retrieve_list as $i => $c13y)
+ {
+ if (in_array($c13y['id'], $_POST['c13y_selection']))
{
- if (in_array($c13y['id'], $_POST['c13y_selection']))
- {
- $this->build_ignore_list[] = $c13y['id'];
- $this->retrieve_list[$i]['ignored'] = true;
- $ignored_count += 1;
- }
+ $this->build_ignore_list[] = $c13y['id'];
+ $this->retrieve_list[$i]['ignored'] = true;
+ $ignored_count += 1;
}
+ }
- if ($ignored_count > 0)
- {
- $page['infos'][] =
- l10n_dec('%d anomaly has been ignored.', '%d anomalies have been ignored.',
- $ignored_count);
- }
+ if ($ignored_count > 0)
+ {
+ $page['infos'][] =
+ l10n_dec('%d anomaly has been ignored.', '%d anomalies have been ignored.',
+ $ignored_count);
}
}
}