예제 #1
0
function tfoafUninstall($self)
{
    $merger = tlocalmerger::i();
    $merger->deleteplugin(tplugins::getname(__FILE__));
    $actions = TXMLRPCAction::i();
    $actions->deleteclass(get_class($self));
    $urlmap = litepublisher::$urlmap;
    $urlmap->lock();
    turlmap::unsub($self);
    $classes = litepublisher::$classes;
    $classes->lock();
    $classes->delete('tfoafutil');
    $classes->delete('tprofile');
    $classes->delete('tfriendswidget');
    $classes->delete('tadminfoaf');
    $classes->unlock();
    $admin = tadminmenus::i();
    $admin->lock();
    $admin->deleteurl('/admin/foaf/profiletemplate/');
    $admin->deleteurl('/admin/foaf/profile/');
    $admin->deleteurl('/admin/foaf/');
    $admin->unlock();
    $urlmap->unlock();
    if ($self->dbversion) {
        $manager = tdbmanager::i();
        $manager->deletetable($self->table);
    }
    $template = ttemplate::i();
    $template->deletefromhead('	<link rel="meta" type="application/rdf+xml" title="FOAF" href="$site.url/foaf.xml" />');
    $meta = tmetawidget::i();
    $meta->lock();
    $meta->delete('foaf');
    $meta->delete('profile');
    $meta->unlock();
    ttheme::clearcache();
}
예제 #2
0
 public function rejectinvate($id)
 {
     if (!$this->itemexists($id)) {
         return false;
     }
     $item = $this->getitem($id);
     $this->setstatus($id, 'rejected');
     if ($ping = tpinger::Discover($item['url'])) {
         $actions = TXMLRPCAction::i();
         if ($actions->rejectfriend($ping, $this->profile)) {
             return true;
         }
     }
     return false;
 }