aboutsummaryrefslogtreecommitdiff
path: root/services/commondescriptionservice.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-02-19 14:43:00 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-02-19 14:43:00 +0000
commit76ed2e494b220780d8e247f9348f8f09a9d5fee8 (patch)
treea885aed88431c63db1306cb36732f3828dd4f4da /services/commondescriptionservice.php
parent93da909d9cc514d50705d59ae95786e55b758958 (diff)
downloadsemanticscuttle-76ed2e494b220780d8e247f9348f8f09a9d5fee8.tar.gz
semanticscuttle-76ed2e494b220780d8e247f9348f8f09a9d5fee8.tar.bz2
Interface fix: add a link to last editor profile in common description. Don't count a change if a user saves with no modifications.
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@46 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'services/commondescriptionservice.php')
-rw-r--r--services/commondescriptionservice.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/services/commondescriptionservice.php b/services/commondescriptionservice.php
index 7e34219..6c591a9 100644
--- a/services/commondescriptionservice.php
+++ b/services/commondescriptionservice.php
@@ -16,6 +16,13 @@ class CommonDescriptionService {
}
function addTagDescription($tag, $desc, $uId, $time) {
+ // Check if no modification
+ $lastDesc = $this->getLastTagDescription($tag);
+ if($lastDesc['cdDescription'] == $desc) {
+ return true;
+ }
+
+ // If modification
$datetime = gmdate('Y-m-d H:i:s', $time);
$values = array('tag'=>$tag, 'cdDescription'=>$desc, 'uId'=>$uId, 'cdDatetime'=>$datetime);
$sql = 'INSERT INTO '. $this->getTableName() .' '. $this->db->sql_build_array('INSERT', $values);
@@ -81,6 +88,13 @@ class CommonDescriptionService {
}
function addBookmarkDescription($bHash, $title, $desc, $uId, $time) {
+ // Check if no modification
+ $lastDesc = $this->getLastBookmarkDescription($bHash);
+ if($lastDesc['cdTitle'] == $title && $lastDesc['cdDescription'] == $desc) {
+ return true;
+ }
+
+ // If modification
$datetime = gmdate('Y-m-d H:i:s', $time);
$values = array('bHash'=>$bHash, 'cdTitle'=>$title, 'cdDescription'=>$desc, 'uId'=>$uId, 'cdDatetime'=>$datetime);
$sql = 'INSERT INTO '. $this->getTableName() .' '. $this->db->sql_build_array('INSERT', $values);