package WebGUI::Wobject::SyndicatedContent; #------------------------------------------------------------------- # WebGUI is Copyright 2001-2002 Plain Black LLC. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using # this software. #------------------------------------------------------------------- # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- use strict; use Tie::CPHash; use WebGUI::DateTime; use WebGUI::HTMLForm; use WebGUI::Icon; use WebGUI::International; use WebGUI::Macro; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; use WebGUI::Wobject; our @ISA = qw(WebGUI::Wobject); our $namespace = "SyndicatedContent"; our $name = WebGUI::International::get(2,$namespace); #------------------------------------------------------------------- sub duplicate { my ($w); $w = $_[0]->SUPER::duplicate($_[1]); $w = WebGUI::Wobject::SyndicatedContent->new({wobjectId=>$w,namespace=>$namespace}); $w->set({ rssUrl=>$_[0]->get("rssUrl"), content=>$_[0]->get("content"), lastFetched=>$_[0]->get("lastFetched") }); } #------------------------------------------------------------------- sub new { my ($self, $class, $property); $class = shift; $property = shift; $self = WebGUI::Wobject->new($property); bless $self, $class; } #------------------------------------------------------------------- sub set { $_[0]->SUPER::set($_[1], [qw(rssUrl content lastFetched)]); } #------------------------------------------------------------------- sub www_copy { if (WebGUI::Privilege::canEditPage()) { $_[0]->duplicate; return ""; } else { return WebGUI::Privilege::insufficient(); } } #------------------------------------------------------------------- sub www_edit { my ($output, $f); if (WebGUI::Privilege::canEditPage()) { $output = helpIcon(1,$namespace); $output .= '