fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [9090] registration


From: Sigurd Nes
Subject: [Fmsystem-commits] [9090] registration
Date: Tue, 03 Apr 2012 07:48:18 +0000

Revision: 9090
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9090
Author:   sigurdne
Date:     2012-04-03 07:48:18 +0000 (Tue, 03 Apr 2012)
Log Message:
-----------
registration

Modified Paths:
--------------
    trunk/messenger/setup/setup.inc.php

Added Paths:
-----------
    trunk/messenger/inc/class.hook_helper.inc.php

Removed Paths:
-------------
    trunk/messenger/inc/hook_registration.inc.php

Added: trunk/messenger/inc/class.hook_helper.inc.php
===================================================================
--- trunk/messenger/inc/class.hook_helper.inc.php                               
(rev 0)
+++ trunk/messenger/inc/class.hook_helper.inc.php       2012-04-03 07:48:18 UTC 
(rev 9090)
@@ -0,0 +1,50 @@
+<?php
+       /**
+        * messenger - Hook helper
+        *
+        * @author Dave Hall <address@hidden>
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2007,2008 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @package messenger
+        * @version $Id: class.hook_helper.inc.php 8281 2011-12-13 09:24:03Z 
sigurdne $
+        */
+
+       /*
+          This program is free software: you can redistribute it and/or modify
+          it under the terms of the GNU General Public License as published by
+          the Free Software Foundation, either version 2 of the License, or
+          (at your option) any later version.
+
+          This program is distributed in the hope that it will be useful,
+          but WITHOUT ANY WARRANTY; without even the implied warranty of
+          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+          GNU General Public License for more details.
+
+          You should have received a copy of the GNU General Public License
+          along with this program.  If not, see <http://www.gnu.org/licenses/>.
+        */
+
+
+       /**
+        * Hook helper
+        *
+        * @package messenger
+        */
+       class messenger_hook_helper
+       {
+               /**
+                * Add welkome message to new users
+                *
+                * @return void
+                */
+               public function add_welkome_message($data)
+               {
+                       $message['to']      = $data['account_lid'];
+                       $message['subject'] = lang('Welcome');
+                       $message['content'] = $data['message'];
+
+                       $so = createobject('messenger.somessenger');
+                       $so->send_message($message,True);
+               }
+       }

Deleted: trunk/messenger/inc/hook_registration.inc.php
===================================================================
--- trunk/messenger/inc/hook_registration.inc.php       2012-04-03 07:07:08 UTC 
(rev 9089)
+++ trunk/messenger/inc/hook_registration.inc.php       2012-04-03 07:48:18 UTC 
(rev 9090)
@@ -1,9 +0,0 @@
-<?php
-       // Note: This is temp sample data, I will make a config option for it 
soon.
-
-       $message['to']      = $account_lid;
-       $message['subject'] = lang('Welcome');
-       $message['content'] = $this->config['messenger_welcome_message'];
-
-       $so = createobject('messenger.somessenger');
-       $so->send_message($message,True);

Modified: trunk/messenger/setup/setup.inc.php
===================================================================
--- trunk/messenger/setup/setup.inc.php 2012-04-03 07:07:08 UTC (rev 9089)
+++ trunk/messenger/setup/setup.inc.php 2012-04-03 07:48:18 UTC (rev 9090)
@@ -34,7 +34,8 @@
                'home',
                'after_navbar',
                'config',
-               'menu'  => 'messenger.menu.get_menu'
+               'menu'  => 'messenger.menu.get_menu',
+               'registration'  => 'messenger.hook_helper.add_welkome_message'
        );
 
        /* Dependencies for this app to work */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]