svn: /web/doc-editor/trunk/ install/doc-editor.sql php/RepositoryManager.php

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Thu, 25 Mar 2010 19:53:29 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=296806

Log:
Add a date field to static value for futur functionnality

Changed paths:
    U   web/doc-editor/trunk/install/doc-editor.sql
    U   web/doc-editor/trunk/php/RepositoryManager.php

Modified: web/doc-editor/trunk/install/doc-editor.sql
===================================================================
--- web/doc-editor/trunk/install/doc-editor.sql	2010-03-25 19:44:36 UTC (rev 296805)
+++ web/doc-editor/trunk/install/doc-editor.sql	2010-03-25 19:53:29 UTC (rev 296806)
@@ -32,6 +32,7 @@
   `type` varchar(50) NOT NULL,
   `field` varchar(50) NOT NULL,
   `value` text NOT NULL,
+  `date` datetime NOT NULL,
   KEY `id` (`id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


Modified: web/doc-editor/trunk/php/RepositoryManager.php
===================================================================
--- web/doc-editor/trunk/php/RepositoryManager.php	2010-03-25 19:44:36 UTC (rev 296805)
+++ web/doc-editor/trunk/php/RepositoryManager.php	2010-03-25 19:53:29 UTC (rev 296806)
@@ -1305,7 +1305,8 @@
         $s = "SELECT id FROM staticValue WHERE
               `project` = '".$project."' AND
               `type`    = '".$type."' AND
-              `field`   = '".$field."'
+              `field`   = '".$field."' AND
+              `date`    = now()
              ";
         $r = $db->query($s);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.