]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x
authorEvan Prodromou <evan@status.net>
Tue, 23 Aug 2011 17:32:24 +0000 (13:32 -0400)
committerEvan Prodromou <evan@status.net>
Tue, 23 Aug 2011 17:32:24 +0000 (13:32 -0400)
PLUGINS [deleted file]
PLUGINS.txt [new file with mode: 0644]
classes/Notice.php

diff --git a/PLUGINS b/PLUGINS
deleted file mode 100644 (file)
index 79533b9..0000000
--- a/PLUGINS
+++ /dev/null
@@ -1,44 +0,0 @@
-Plugins
-=======
-
-Beginning with the 0.7.x branch, StatusNet has supported a simple but
-powerful plugin architecture. Important events in the code are named,
-like 'StartNoticeSave', and other software can register interest
-in those events. When the events happen, the other software is called
-and has a choice of accepting or rejecting the events.
-
-In the simplest case, you can add a function to config.php and use the
-Event::addHandler() function to hook an event:
-
-    function AddGoogleLink($action)
-    {
-        $action->menuItem('http://www.google.com/', _('Google'), _('Search engine'));
-        return true;
-    }
-
-    Event::addHandler('EndPrimaryNav', 'AddGoogleLink');
-
-This adds a menu item to the end of the main navigation menu. You can
-see the list of existing events, and parameters that handlers must
-implement, in EVENTS.txt.
-
-The Plugin class in lib/plugin.php makes it easier to write more
-complex plugins. Sub-classes can just create methods named
-'onEventName', where 'EventName' is the name of the event (case
-matters!). These methods will be automatically registered as event
-handlers by the Plugin constructor (which you must call from your own
-class's constructor).
-
-Several example plugins are included in the plugins/ directory. You
-can enable a plugin with the following line in config.php:
-
-    addPlugin('Example', array('param1' => 'value1',
-                               'param2' => 'value2'));
-
-This will look for and load files named 'ExamplePlugin.php' or
-'Example/ExamplePlugin.php' either in the plugins/ directory (for
-plugins that ship with StatusNet) or in the local/ directory (for
-plugins you write yourself or that you get from somewhere else) or
-local/plugins/.
-
-Plugins are documented in their own directories.
diff --git a/PLUGINS.txt b/PLUGINS.txt
new file mode 100644 (file)
index 0000000..79533b9
--- /dev/null
@@ -0,0 +1,44 @@
+Plugins
+=======
+
+Beginning with the 0.7.x branch, StatusNet has supported a simple but
+powerful plugin architecture. Important events in the code are named,
+like 'StartNoticeSave', and other software can register interest
+in those events. When the events happen, the other software is called
+and has a choice of accepting or rejecting the events.
+
+In the simplest case, you can add a function to config.php and use the
+Event::addHandler() function to hook an event:
+
+    function AddGoogleLink($action)
+    {
+        $action->menuItem('http://www.google.com/', _('Google'), _('Search engine'));
+        return true;
+    }
+
+    Event::addHandler('EndPrimaryNav', 'AddGoogleLink');
+
+This adds a menu item to the end of the main navigation menu. You can
+see the list of existing events, and parameters that handlers must
+implement, in EVENTS.txt.
+
+The Plugin class in lib/plugin.php makes it easier to write more
+complex plugins. Sub-classes can just create methods named
+'onEventName', where 'EventName' is the name of the event (case
+matters!). These methods will be automatically registered as event
+handlers by the Plugin constructor (which you must call from your own
+class's constructor).
+
+Several example plugins are included in the plugins/ directory. You
+can enable a plugin with the following line in config.php:
+
+    addPlugin('Example', array('param1' => 'value1',
+                               'param2' => 'value2'));
+
+This will look for and load files named 'ExamplePlugin.php' or
+'Example/ExamplePlugin.php' either in the plugins/ directory (for
+plugins that ship with StatusNet) or in the local/ directory (for
+plugins you write yourself or that you get from somewhere else) or
+local/plugins/.
+
+Plugins are documented in their own directories.
index 0298cfdda3e0205667125886fddd4a6abce86ad0..15696f6eefe420538c94658d8d5b2362320269bb 100644 (file)
@@ -2624,7 +2624,7 @@ class Notice extends Managed_DataObject
         return $this->_faves;
     }
 
-    function _setFaves(&$faves)
+    function _setFaves($faves)
     {
         $this->_faves = $faves;
     }
@@ -2643,7 +2643,7 @@ class Notice extends Managed_DataObject
         }
         foreach ($notices as $notice) {
                $faves = $faveMap[$notice->id];
-            $notice->_setFaves(&$faves);
+            $notice->_setFaves($faves);
         }
     }
 
@@ -2673,7 +2673,7 @@ class Notice extends Managed_DataObject
         return $this->_repeats;
     }
 
-    function _setRepeats(&$repeats)
+    function _setRepeats($repeats)
     {
         $this->_repeats = $repeats;
     }
@@ -2684,7 +2684,7 @@ class Notice extends Managed_DataObject
         $repeatMap = Memcached_DataObject::listGet('Notice', 'repeat_of', $ids);
         foreach ($notices as $notice) {
                $repeats = $repeatMap[$notice->id];
-            $notice->_setRepeats(&$repeats);
+            $notice->_setRepeats($repeats);
         }
     }
 }