[geeklog-cvs] geeklog: Implemented PLG_itemSaved and PLG_itemDeleted for the S...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Jan 25 05:10:36 EST 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/d7519b7d682a
changeset: 6721:d7519b7d682a
user: Dirk Haun <dirk at haun-online.de>
date: Sun Jan 25 10:29:26 2009 +0100
description:
Implemented PLG_itemSaved and PLG_itemDeleted for the Static Pages plugin
diffstat:
1 file changed, 10 insertions(+), 4 deletions(-)
plugins/staticpages/services.inc.php | 14 ++++++++++----
diffs (50 lines):
diff -r 0db6fc3bf268 -r d7519b7d682a plugins/staticpages/services.inc.php
--- a/plugins/staticpages/services.inc.php Sun Jan 25 10:14:11 2009 +0100
+++ b/plugins/staticpages/services.inc.php Sun Jan 25 10:29:26 2009 +0100
@@ -2,13 +2,13 @@
// Reminder: always indent with 4 spaces (no tabs).
// +---------------------------------------------------------------------------+
-// | Static Pages Plugin 1.5 |
+// | Static Pages Plugin 1.6 |
// +---------------------------------------------------------------------------+
// | services.inc.php |
// | |
// | This file implements the services provided by the 'Static Pages' plugin. |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2008 by the following authors: |
+// | Copyright (C) 2000-2009 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
// | Tom Willett - twillett AT users DOT sourceforge DOT net |
@@ -32,8 +32,6 @@
// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
// | |
// +---------------------------------------------------------------------------+
-//
-// $Id: services.inc.php,v 1.13 2008/07/28 19:35:46 dhaun Exp $
// this must be kept in synch with the actual size of 'sp_id' in the db ...
define('STATICPAGE_MAX_ID_LENGTH', 40);
@@ -374,6 +372,12 @@
DB_delete ($_TABLES['staticpage'], 'sp_id', $sp_old_id);
}
+ if (empty($sp_old_id) || ($sp_id == $sp_old_id)) {
+ PLG_itemSaved($sp_id, 'staticpages');
+ } else {
+ PLG_itemSaved($sp_id, 'staticpages', $sp_old_id);
+ }
+
$url = COM_buildURL($_CONF['site_url'] . '/staticpages/index.php?page='
. $sp_id);
$output .= PLG_afterSaveSwitch($_SP_CONF['aftersave'], $url,
@@ -435,6 +439,8 @@
}
DB_delete ($_TABLES['staticpage'], 'sp_id', $sp_id);
+
+ PLG_itemDeleted($sp_id, 'staticpages');
return PLG_RET_OK;
}
More information about the geeklog-cvs
mailing list