aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2008-03-02 17:30:18 +0000
committerrub <rub@piwigo.org>2008-03-02 17:30:18 +0000
commitfab44f72a89396d624be49311fc0622635d44f8a (patch)
tree670bda7649296c1dbecb7c86608b59e8c4c232a3 /admin/include
parent6e932e8752faae824cdcb1073014771163a600a7 (diff)
0000810: Use of new template engine [smarty]
Migration of c13y template It's the first step with simple migration, on next step more display action on tpl. git-svn-id: http://piwigo.org/svn/trunk@2241 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/check_integrity.class.php58
1 files changed, 23 insertions, 35 deletions
diff --git a/admin/include/check_integrity.class.php b/admin/include/check_integrity.class.php
index eeeb6f7dd..298edb6e3 100644
--- a/admin/include/check_integrity.class.php
+++ b/admin/include/check_integrity.class.php
@@ -192,20 +192,23 @@ class check_integrity
foreach ($this->retrieve_list as $i => $c13y)
{
$can_select = false;
-
- $template->assign_block_vars('c13y',
- array(
- 'CLASS' => ($i % 2 == 1) ? 'row2' : 'row1',
+ $c13y_display = array(
'ID' => $c13y['id'],
- 'ANOMALY' => $c13y['anomaly']
- ));
-
+ 'ANOMALY' => $c13y['anomaly'],
+ 'show_ignore_msg' => false,
+ 'show_correction_success_fct' => false,
+ 'correction_error_fct' => '',
+ 'show_correction_fct' => false,
+ 'correction_error_fct' => '',
+ 'show_correction_bad_fct' => false,
+ 'correction_msg' => ''
+ );
if (isset($c13y['ignored']))
{
if ($c13y['ignored'])
{
- $template->assign_block_vars('c13y.ignore_msg', array());
+ $c13y_display['show_ignore_msg'] = true;
}
else
{
@@ -220,24 +223,23 @@ class check_integrity
{
if ($c13y['corrected'])
{
- $template->assign_block_vars('c13y.correction_success_fct', array());
+ $c13y_display['show_correction_success_fct'] = true;
}
else
{
- $template->assign_block_vars('c13y.correction_error_fct',
- array('WIKI_FOROM_LINKS' => $this->get_htlm_links_more_info()));
+ $c13y_display['correction_error_fct'] = $this->get_htlm_links_more_info();
}
}
else if ($c13y['is_callable'])
{
- $template->assign_block_vars('c13y.correction_fct', array());
- $template->assign_block_vars('c13y_link_check_automatic_correction.c13y_do_check', array('ID' => $c13y['id']));
+ $c13y_display['show_correction_fct'] = true;
+ $template->append('c13y_do_check', $c13y['id']);
$submit_automatic_correction = true;
$can_select = true;
}
else
{
- $template->assign_block_vars('c13y.correction_bad_fct', array());
+ $c13y_display['show_correction_bad_fct'] = true;
$can_select = true;
}
}
@@ -246,39 +248,25 @@ class check_integrity
$can_select = true;
}
- if (!empty($c13y['correction_fct']) and !empty($c13y['correction_msg']))
- {
- $template->assign_block_vars('c13y.br', array());
- }
-
if (!empty($c13y['correction_msg']) and !isset($c13y['corrected']))
{
- $template->assign_block_vars('c13y.correction_msg',
- array(
- 'DATA' => nl2br($c13y['correction_msg'])
- ));
+ $c13y_display['correction_msg'] = $c13y['correction_msg'];
}
}
+ $c13y_display['can_select'] = $can_select;
if ($can_select)
{
- $template->assign_block_vars('c13y.can_select', array());
$submit_ignore = true;
}
+
+ $template->append('c13y_list', $c13y_display);
}
- if ($submit_automatic_correction)
- {
- $template->assign_block_vars('c13y_submit_automatic_correction', array());
- }
-
- if ($submit_ignore)
- {
- $template->assign_block_vars('c13y_link_check_uncheck', array());
- $template->assign_block_vars('c13y_submit_ignore', array());
- }
+ $template->assign('c13y_show_submit_automatic_correction', $submit_automatic_correction);
+ $template->assign('c13y_show_submit_ignore', $submit_ignore);
- $template->concat_var('ADMIN_CONTENT', $template->parse('check_integrity', true) );
+ $template->assign_var_from_handle('ADMIN_CONTENT', 'check_integrity');
}
}