[geeklog-cvs] geeklog: Implemented PLG_itemSaved and PLG_itemDeleted for the L...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Jan 25 05:10:39 EST 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/952553d86ad1
changeset: 6724:952553d86ad1
user:      Dirk Haun <dirk at haun-online.de>
date:      Sun Jan 25 11:10:01 2009 +0100
description:
Implemented PLG_itemSaved and PLG_itemDeleted for the Links plugin

diffstat:

2 files changed, 14 insertions(+), 5 deletions(-)
plugins/links/functions.inc               |    4 +++-
public_html/admin/plugins/links/index.php |   15 +++++++++++----

diffs (72 lines):

diff -r f91c2eab2efa -r 952553d86ad1 plugins/links/functions.inc
--- a/plugins/links/functions.inc	Sun Jan 25 10:46:22 2009 +0100
+++ b/plugins/links/functions.inc	Sun Jan 25 11:10:01 2009 +0100
@@ -10,7 +10,7 @@
 // | API method and 2) implements all the common code needed by the Links      |
 // | Plugins' PHP files.                                                       |
 // +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2008 by the following authors:                         |
+// | Copyright (C) 2000-2009 by the following authors:                         |
 // |                                                                           |
 // | Authors: Tony Bibbs         - tony AT tonybibbs DOT com                   |
 // |          Mark Limburg       - mlimburg AT users.sourceforge DOT net       |
@@ -1037,6 +1037,8 @@
                     'lid,cid,url,description,title,date,owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon',
                     "{$A['lid']},'{$A['cid']}','{$A['url']}','{$A['description']}','{$A['title']}',NOW(),$owner_id,{$A['group_id']},{$A['perm_owner']},{$A['perm_group']},{$A['perm_members']},{$A['perm_anon']}");
 
+        PLG_itemSaved($A['lid'], 'links');
+
         if ($_LI_CONF['notification'] == 1) {
             LINKS_sendNotification($_TABLES['links'], $A);
         }
diff -r f91c2eab2efa -r 952553d86ad1 public_html/admin/plugins/links/index.php
--- a/public_html/admin/plugins/links/index.php	Sun Jan 25 10:46:22 2009 +0100
+++ b/public_html/admin/plugins/links/index.php	Sun Jan 25 11:10:01 2009 +0100
@@ -2,13 +2,13 @@
 
 // Reminder: always indent with 4 spaces (no tabs).
 // +---------------------------------------------------------------------------+
-// | Links Plugin 2.0                                                          |
+// | Links Plugin 2.1                                                          |
 // +---------------------------------------------------------------------------+
 // | index.php                                                                 |
 // |                                                                           |
 // | Geeklog Links Plugin administration page.                                 |
 // +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2008 by the following authors:                         |
+// | Copyright (C) 2000-2009 by the following authors:                         |
 // |                                                                           |
 // | Authors: Tony Bibbs        - tony AT tonybibbs DOT com                    |
 // |          Mark Limburg      - mlimburg AT users DOT sourceforge DOT net    |
@@ -31,8 +31,6 @@
 // | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           |
 // |                                                                           |
 // +---------------------------------------------------------------------------+
-//
-// $Id: index.php,v 1.61 2008/06/07 12:41:45 dhaun Exp $
 
 /**
  * Geeklog links administration page.
@@ -319,6 +317,13 @@
         DB_delete ($_TABLES['links'], 'lid', $old_lid);
 
         DB_save ($_TABLES['links'], 'lid,cid,url,description,title,date,hits,owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon', "'$lid','$cid','$url','$description','$title',NOW(),'$hits',$owner_id,$group_id,$perm_owner,$perm_group,$perm_members,$perm_anon");
+
+        if (empty($old_lid) || ($old_lid == $lid)) {
+            PLG_itemSaved($lid, 'links');
+        } else {
+            PLG_itemSaved($lid, 'links', $old_lid);
+        }
+
         // Get category for rdf check
         $category = DB_getItem ($_TABLES['linkcategories'],"category","cid='{$cid}'");
         COM_rdfUpToDateCheck ('links', $category, $lid);
@@ -461,6 +466,8 @@
 
         DB_delete($_TABLES['links'], 'lid', $lid);
 
+        PLG_itemDeleted($lid, 'links');
+
         return COM_refresh($_CONF['site_admin_url']
                            . '/plugins/links/index.php?msg=3');
     } elseif ($type == 'submission') {



More information about the geeklog-cvs mailing list