This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project default="jar" xmlns:jacoco="antlib:org.jacoco.ant"> | |
<property name="build.sysclasspath" value="ignore"/> | |
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml"> | |
<classpath path="lib/jacoco/jacocoant.jar"/> | |
</taskdef> | |
<target name="clean"> | |
<delete dir="build"/> | |
</target> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getFilename($header) { | |
if (preg_match('/Content-Disposition:.*?filename="(.+?)"/', $header, $matches)) { | |
return $matches[1]; | |
} | |
if (preg_match('/Content-Disposition:.*?filename=([^; ]+)/', $header, $matches)) { | |
return rawurldecode($matches[1]); | |
} | |
throw new Exception(__FUNCTION__ .": Filename not found"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class LdapEntry { | |
function __construct(array $entry) { | |
$this->entry = $entry; | |
} | |
function getAttribute($attribute, $default="") { | |
if (empty($this->entry['samaccountname'][0])) { | |
return $default; |