예제 #1
0
 /**
  * @covers common\lib\outlook\Outlook::authenticate
  */
 public function testAuthenticateFailrue()
 {
     $this->property = new \jarekkozak\sys\PropertiesFile(['filename' => 'a.txt']);
     $auth = new Outlook(['properties' => $this->property]);
     self::assertFalse($auth->authenticate());
 }
예제 #2
0
파일: carnet.php 프로젝트: Ekleog/platal
 function handler_csv(PlPage $page, PlUser $user)
 {
     $page->changeTpl('carnet/mescontacts.outlook.tpl', NO_SKIN);
     $pf = new ProfileFilter(new UFC_Contact($user));
     require_once 'carnet/outlook.inc.php';
     Outlook::output_profiles($pf->getProfiles(), 'fr');
 }
예제 #3
0
 public static function output_profiles($profiles, $lang)
 {
     pl_content_headers("text/plain", "iso8859-15");
     $fields =& Outlook::$contact_fields[$lang];
     foreach ($fields as $i => $k) {
         if ($i != 0) {
             echo ',';
         }
         echo Outlook::protect($k);
     }
     echo "\r\n";
     foreach ($profiles as &$p) {
         $values = Outlook::profile_to_contact($p);
         foreach ($fields as $i => $k) {
             if ($i != 0) {
                 echo ',';
                 echo Outlook::protect($values[$k]);
             } else {
                 // HACK to fix fullname
                 $fullname = $p->firstName() . " " . $p->lastName();
                 echo Outlook::protect($fullname);
             }
         }
         echo "\r\n";
     }
 }