aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Tools.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/poche/Tools.class.php')
-rwxr-xr-xinc/poche/Tools.class.php26
1 files changed, 24 insertions, 2 deletions
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php
index d3dddd3b..15050aed 100755
--- a/inc/poche/Tools.class.php
+++ b/inc/poche/Tools.class.php
@@ -398,8 +398,11 @@ final class Tools
398 ); 398 );
399 399
400 foreach ($files as $fileInfo) { 400 foreach ($files as $fileInfo) {
401 $todo = ($fileInfo->isDir() ? 'rmdir' : 'unlink'); 401 $filename = $fileInfo->getFilename();
402 $todo($fileInfo->getRealPath()); 402 if (!$filename[0] == '.') {
403 $todo = ($fileInfo->isDir() ? 'rmdir' : 'unlink');
404 $todo($fileInfo->getRealPath());
405 }
403 } 406 }
404 407
405 Tools::logm('empty cache'); 408 Tools::logm('empty cache');
@@ -423,4 +426,23 @@ final class Tools
423 return str_replace('+', '', $token); 426 return str_replace('+', '', $token);
424 } 427 }
425 428
429 /**
430 *
431 * Returns the doctype for an HTML document (used for Mozilla Bookmarks)
432 * @param simple_html_dom $doc
433 * @return doctype $el
434 *
435 */
436
437 public static function get_doctype($doc)
438 {
439 $els = $doc->find('unknown');
440
441 foreach ($els as $e => $el)
442 if ($el->parent()->tag == 'root')
443 return $el;
444
445 return NULL;
446 }
447
426} 448}