<?php
/***************************************************************************
- * Copyright (C) 2003-2007 Polytechnique.org *
+ * Copyright (C) 2003-2010 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
class MMList extends XmlrpcClient
{
- public function __construct($uid, $pass, $fqdn = null)
+ public function __construct($user, $pass = null, $fqdn = null)
{
global $globals;
+ if ($user instanceof PlUser) {
+ $fqdn = $pass;
+ $uid = $user->id();
+ $pass = $user->password();
+ } else {
+ $uid = $user;
+ }
$dom = is_null($fqdn) ? $globals->mail->domain : $fqdn;
$url = "http://$uid:$pass@{$globals->lists->rpchost}:{$globals->lists->rpcport}/$dom";
$this->bt = new PlBacktrace('MMList');
}
}
-
- public function __call($method, $args)
- {
- return parent::__call($method, $args);
- }
}
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: