6 * This function deletes all the contents of the temporary directory.
10 static function clearTempDir() {
12 self::deleteTree(SABRE_TEMPDIR,false);
17 static private function deleteTree($path,$deleteRoot = true) {
19 foreach(scandir($path) as $node) {
21 if ($node=='.' || $node=='..') continue;
22 $myPath = $path.'/'. $node;
23 if (is_file($myPath)) {
26 self::deleteTree($myPath);
36 static function getMySQLDB() {
39 $pdo = new PDO(SABRE_MYSQLDSN,SABRE_MYSQLUSER,SABRE_MYSQLPASS);
40 $pdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
42 } catch (PDOException $e) {