Created
July 14, 2010 00:15
-
-
Save balibali/474788 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/model/doctrine/PluginDiary.class.php b/lib/model/doctrine/PluginDiary.class.php | |
index 4928da5..6815b21 100644 | |
--- a/lib/model/doctrine/PluginDiary.class.php | |
+++ b/lib/model/doctrine/PluginDiary.class.php | |
@@ -128,4 +128,18 @@ abstract class PluginDiary extends BaseDiary | |
$image->delete(); | |
} | |
} | |
+ | |
+ public function postInsert($event) | |
+ { | |
+ if (Doctrine::getTable('SnsConfig')->get('op_diary_plugin_update_activity', true)) | |
+ { | |
+ $body = 'Posted "'.$this->title.'"'; | |
+ $options = array( | |
+ 'public_flag' => $this->is_open ? 0 : $this->public_flag, | |
+ 'uri' => '@diary_show?id='.$this->id, | |
+ 'source' => 'Diary', | |
+ ); | |
+ Doctrine::getTable('ActivityData')->updateActivity($this->member_id, $body, $options); | |
+ } | |
+ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment