Revert changes in revision 14302. Revision 14302 should only have changed functions...
[squirrelmail.git] / plugins / calendar / setup.php
index 4b30c1b457d739b4ea5689ed521ed3f31c6368ba..69877c98397860841232477d538204c2328239c4 100644 (file)
@@ -1,33 +1,42 @@
 <?php
 
 /**
- * setup.php
+ * Calendar plugin activation script
  *
- * Copyright (c) 2002-2003 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
- * Originally contrubuted by Michal Szczotka <michal@tuxy.org>
- *
- * init plugin into squirrelmail
- *
- * $Id$ 
+ * @copyright 2002-2012 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
  * @package plugins
  * @subpackage calendar
  */
 
 /**
- * Initialize the plugin
- * @return void
- */
+  * Register this plugin with SquirrelMail
+  * 
+  * @return void
+  *
+  */
 function squirrelmail_plugin_init_calendar() {
+
     global $squirrelmail_plugin_hooks;
-    $squirrelmail_plugin_hooks['menuline']['calendar'] = 'calendar';
+
+    $squirrelmail_plugin_hooks['template_construct_page_header.tpl']['calendar'] 
+        = 'calendar';
+
 }
 
+
+/**
+  * Add link to menu at top of content pane
+  *
+  * @return void
+  *
+  */
 function calendar() {
-    /* Add Calendar link to upper menu */
-    displayInternalLink('plugins/calendar/calendar.php',_("Calendar"),'right');
-    echo "&nbsp;&nbsp;\n";
+
+    include_once(SM_PATH . 'plugins/calendar/functions.php');
+    return calendar_do();
+
 }
 
-?>
+