noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 10/11: Show template status : not existing ,


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 10/11: Show template status : not existing , nothing or invalid
Date: Thu, 05 Nov 2015 10:21:12 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit ebc99ce44d00f037ffde933c86e1448361e2a795
Author: Dany De Bontridder <address@hidden>
Date:   Thu Nov 5 10:22:59 2015 +0100

    Show template status : not existing , nothing or invalid
---
 include/modele.inc.php |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/include/modele.inc.php b/include/modele.inc.php
index 7740592..5e8bf18 100644
--- a/include/modele.inc.php
+++ b/include/modele.inc.php
@@ -304,10 +304,25 @@ if ($sa == 'list')
                        $mod = Database::fetch_array($Res, $i);
                        $class = ($i % 2 == 0) ? "odd" : "even";
                         $str_name=domaine.'mod'.$mod['mod_id'];
+                        $valid=true;
+                        $exist=true;
+                        $mod_status="";
+                        if ( $cn->exist_database($str_name) == 0 ) {
+                            $exist=false;
+                            $mod_status=_('Inexistant');
+                        }
+                        if ( $exist ) {
+                            $mod_cn=new Database($mod['mod_id'],'mod');
+                            if ( $mod_cn->exist_table("version")==0) {
+                                $valid=false;
+                                $mod_status=_('Invalide');
+                            }
+                        }
                        printf('<TR class="' . $class . '" 
style="vertical-align:top">' .
                                        '<TD>%d </td><td><b> %s</b> </TD>' .
                                        '<TD><I> %s </I></TD>' .
                                         '<td>'.$str_name.'</td>'.
+                                        td($mod_status).
                                        '<td> ' .
                                        HtmlInput::anchor(_('Effacer'), 
'?action=modele_mgt&sa=del&m=' . $mod['mod_id']," onclick = 
\"modele_drop('{$mod['mod_id']}') \"") . '</td>' .
                                        '</td>' .



reply via email to

[Prev in Thread] Current Thread [Next in Thread]