* adjust todo feature.

This commit is contained in:
wangchunsheng
2009-12-28 09:18:44 +00:00
parent 42ebd56829
commit 4d90f7892f
7 changed files with 35 additions and 10 deletions
+4 -1
View File
@@ -366,12 +366,15 @@ EOT;
/* 比较两个数组元素的不同,产生修改记录。*/
public static function createChanges($old, $new)
{
global $config;
$changes = array();
foreach($new as $key => $value)
{
if(strtolower($key) == 'lastediteddate') continue;
if(strtolower($key) == 'lasteditedby') continue;
if($new->$key != $old->$key)
if(isset($config->db->stripSlash) and $config->db->stripSlash) $value = stripslashes($value);
if($value != $old->$key)
{
$diff = '';
if(substr_count($value, "\n") > 1 or substr_count($old->$key, "\n") > 1) $diff = self::diff($old->$key, $value);