Tadashi Okoshi
slash****@users*****
2005年 12月 10日 (土) 11:14:12 JST
Index: affelio/lib/Affelio.pm
diff -u affelio/lib/Affelio.pm:1.29 affelio/lib/Affelio.pm:1.30
--- affelio/lib/Affelio.pm:1.29 Sat Dec 10 09:46:28 2005
+++ affelio/lib/Affelio.pm Sat Dec 10 11:14:11 2005
@@ -14,7 +14,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: Affelio.pm,v 1.29 2005/12/10 00:46:28 slash5234 Exp $
+# $Id: Affelio.pm,v 1.30 2005/12/10 02:14:11 slash5234 Exp $
package Affelio;
{
@@ -34,6 +34,7 @@
use Affelio::Managing::ApplicationManager;
use Affelio::Managing::AccessLogManager;
use Affelio::Managing::NewsAggregator;
+ use Affelio::Managing::MyNewsManager;
use Affelio::misc::Debug;
use Affelio::misc::L10N;
use Affelio::misc::WebInput;
@@ -110,6 +111,7 @@
my $am = "";
my $alm = "";
my $nghr_news = "";
+ my $my_news="";
my $farm_con = "";
@@ -128,6 +130,7 @@
am => $am,
alm => $alm,
nghr_news => $nghr_news,
+ my_news => $my_news,
mode => $mode,
guest_owner_switch => $guest_owner_switch,
caller => $caller,
@@ -379,6 +382,31 @@
}
######################################################################
+ #getMyNews
+ ######################################################################
+ sub getMyNews{
+ my $self=shift;
+
+ if(! ($self->{my_news}) ){
+ $self->load_MyNewsManager();
+ }
+ return($self->{my_news});
+ }
+
+ ######################################################################
+ #load_MyNewsManager
+ ######################################################################
+ sub load_MyNewsManager{
+ my $self = shift;
+ try{
+ $self->{my_news} = new Affelio::Managing::MyNewsManager($self);
+ }catch Error with {
+ my $ex = shift;
+ throw Affelio::exception::SystemException("Cannot load MyNewsManager: $ex");
+ };
+ }
+
+ ######################################################################
#getFM
######################################################################
sub getFM{
Index: affelio/lib/AffelioApp.pm
diff -u affelio/lib/AffelioApp.pm:1.15 affelio/lib/AffelioApp.pm:1.16
--- affelio/lib/AffelioApp.pm:1.15 Wed Nov 23 13:00:19 2005
+++ affelio/lib/AffelioApp.pm Sat Dec 10 11:14:11 2005
@@ -14,7 +14,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: AffelioApp.pm,v 1.15 2005/11/23 04:00:19 slash5234 Exp $
+# $Id: AffelioApp.pm,v 1.16 2005/12/10 02:14:11 slash5234 Exp $
package AffelioApp;
{
@@ -147,6 +147,25 @@
}
######################################################################
+ #post_news
+ ######################################################################
+ sub post_news{
+ my $self = shift;
+ my $title = shift;
+ my $desc = shift;
+ my $creator = shift;
+ my $URL = shift;
+
+ my $af = $self->{af};
+
+ $af->getMyNews()->post_news(app => $self->{install_title},
+ title => $title,
+ desc => $desc,
+ creator => $creator,
+ URL => $URL);
+ }
+
+ ######################################################################
#check_access
######################################################################
sub check_access{