add condition in case the file of the page does not exist.

This commit is contained in:
Ruediger Marwein 2022-05-31 18:54:47 +02:00
parent adb7294323
commit f7fadb9b7e

@ -33,6 +33,7 @@ class action_plugin_usetheme extends DokuWiki_Action_Plugin {
public function _handleConf(Doku_Event $event, $param) { public function _handleConf(Doku_Event $event, $param) {
global $ID, $ACT, $conf; global $ID, $ACT, $conf;
$dataFile = wikiFN(cleanID($ID)); $dataFile = wikiFN(cleanID($ID));
if(is_file($dataFile)) {
$fp = fopen($dataFile,"r"); $fp = fopen($dataFile,"r");
$firstLine = fgets($fp,512); $firstLine = fgets($fp,512);
fclose($fp); fclose($fp);
@ -44,4 +45,6 @@ class action_plugin_usetheme extends DokuWiki_Action_Plugin {
} }
} }
}
// vim:ts=4:sw=4: // vim:ts=4:sw=4: