OSDN Git Service

Merge branch 'skinnable-master'
[nucleus-jp/nucleus-next.git] / nucleus / plugins / NP_Ping.php
index 0d3f06c..2be8b04 100644 (file)
@@ -90,28 +90,28 @@ class NP_Ping extends NucleusPlugin
        public function install()
        {
                // Default, http://pingomatic.com
-               $this->createOption('pingpong_pingomatic',  _PING_PINGOM,    'yesno', 'yes');
+               $this->createOption('pingpong_pingomatic',      '_PING_PINGOM',         'yesno', 'yes');
                // http://weblogs.com
-               $this->createOption('pingpong_weblogs',     _PING_WEBLOGS,   'yesno', 'no');
+               $this->createOption('pingpong_weblogs',         '_PING_WEBLOGS',        'yesno', 'no');
                // http://www.technorati.com
-               $this->createOption('pingpong_technorati',  _PING_TECHNOR,   'yesno', 'no');
+               $this->createOption('pingpong_technorati',      '_PING_TECHNOR',        'yesno', 'no');
                // http://www.blogrolling.com
-               $this->createOption('pingpong_blogrolling', _PING_BLOGR,     'yesno', 'no');
+               $this->createOption('pingpong_blogrolling',     '_PING_BLOGR',          'yesno', 'no');
                // http://blo.gs
-               $this->createOption('pingpong_blogs',       _PING_BLOGS,     'yesno', 'no');
+               $this->createOption('pingpong_blogs',           '_PING_BLOGS',          'yesno', 'no');
                // http://weblogues.com/
-               $this->createOption('pingpong_weblogues',   _PING_WEBLOGUES, 'yesno', 'no');
+               $this->createOption('pingpong_weblogues',       '_PING_WEBLOGUES',      'yesno', 'no');
                // http://blogg.de
-               $this->createOption('pingpong_bloggde',     _PING_BLOGGDE,   'yesno', 'no');
+               $this->createOption('pingpong_bloggde',         '_PING_BLOGGDE',        'yesno', 'no');
                // Pinging on background
-               $this->createOption('ping_background',      _PING_BG,        'yesno', 'no');
-
+               $this->createOption('ping_background',          '_PING_BG',                     'yesno', 'no');
+               
                // plugin weblog option
-               $this->createBlogOption('ping_sendping',    _PING_SENDPING,  'yesno', 'yes');
+               $this->createBlogOption('ping_sendping',        '_PING_SENDPING',       'yesno', 'yes');
                return;
        }
        
-       public function event_JustPosted($data)
+       public function event_JustPosted(&$data)
        {
                global $DIR_PLUGINS, $DIR_NUCLEUS;
                
@@ -138,13 +138,13 @@ class NP_Ping extends NucleusPlugin
                return;
        }
        
-       public function event_PostAddItem($data)
+       public function event_PostAddItem(&$data)
        {
                $this->_sendPingCheck($data['itemid']);
                return ;
        }
        
-       public function event_PostUpdateItem($data)
+       public function event_PostUpdateItem(&$data)
        {
                $this->_sendPingCheck($data['itemid']);
                return;
@@ -231,7 +231,9 @@ class NP_Ping extends NucleusPlugin
        
        public function pingPingomatic()
        {
-               $b = new Blog($this->myBlogId);
+               global $manager;
+               
+               $b =& $manager->getBlog($this->myBlogId);
                $message = new xmlrpcmsg(
                        'weblogUpdates.ping',
                        array(
@@ -248,7 +250,9 @@ class NP_Ping extends NucleusPlugin
        
        public function pingWeblogs()
        {
-               $b = new Blog($this->myBlogId);
+               global $manager;
+               
+               $b =& $manager->getBlog($this->myBlogId);
                $message = new xmlrpcmsg(
                        'weblogupdates.ping',
                        array(
@@ -265,7 +269,9 @@ class NP_Ping extends NucleusPlugin
        
        public function pingTechnorati()
        {
-               $b = new Blog($this->myBlogId);
+               global $manager;
+               
+               $b =& $manager->getBlog($this->myBlogId);
                $message = new xmlrpcmsg(
                        'weblogUpdates.ping',
                        array(
@@ -282,7 +288,9 @@ class NP_Ping extends NucleusPlugin
        
        public function pingBlogRollingDotCom()
        {
-               $b = new Blog($this->myBlogId);
+               global $manager;
+               
+               $b =& $manager->getBlog($this->myBlogId);
                $message = new xmlrpcmsg(
                        'weblogUpdates.ping',
                        array(
@@ -299,7 +307,9 @@ class NP_Ping extends NucleusPlugin
        
        public function pingBloGs()
        {
-               $b = new Blog($this->myBlogId);
+               global $manager;
+               
+               $b =& $manager->getBlog($this->myBlogId);
                $message = new xmlrpcmsg(
                        'weblogUpdates.extendedPing',
                        array(
@@ -316,7 +326,9 @@ class NP_Ping extends NucleusPlugin
        
        public function pingWebloguesDotCom()
        {
-               $b = new Blog($this->myBlogId);
+               global $manager;
+               
+               $b =& $manager->getBlog($this->myBlogId);
                $message = new xmlrpcmsg(
                        'weblogUpdates.extendedPing',
                        array(
@@ -333,7 +345,9 @@ class NP_Ping extends NucleusPlugin
        
        public function pingBloggDe()
        {
-               $b = new Blog($this->myBlogId);
+               global $manager;
+               
+               $b =& $manager->getBlog($this->myBlogId);
                $message = new xmlrpcmsg(
                        'bloggUpdates.ping',
                        array(