[geeklog-cvs] Geeklog-1.x/system lib-security.php,1.70,1.71

Dirk Haun dhaun at qs1489.pair.com
Fri Jun 20 10:32:54 EDT 2008


Update of /cvsroot/geeklog/Geeklog-1.x/system
In directory qs1489.pair.com:/tmp/cvs-serv48517/system

Modified Files:
	lib-security.php 
Log Message:
Changed SEC_createToken so that it will only return one token per page (effectively making it a singelton). This fixes the problem of not being able to delete comments when you also have trackbacks for the same article.


Index: lib-security.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/lib-security.php,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** lib-security.php	24 May 2008 16:16:14 -0000	1.70
--- lib-security.php	20 Jun 2008 14:32:51 -0000	1.71
***************
*** 1080,1083 ****
--- 1080,1089 ----
  {
      global $_USER, $_TABLES;
+ 
+     static $last_token;
+ 
+     if (isset($last_token)) {
+         return $last_token;
+     }
      
      /* Figure out the full url to the current page */
***************
*** 1104,1107 ****
--- 1110,1115 ----
      DB_Query($sql);
             
+     $last_token = $token;
+ 
      /* And return the token to the user */
      return $token;




More information about the geeklog-cvs mailing list