Skip to content

Commit eb04435

Browse files
committed
show failure message when settings not correctly set
1 parent 49e50ed commit eb04435

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Plugin.php

+10-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,16 @@ public function initialize()
2121
}
2222
}
2323

24-
// public function onStartup()
25-
// {
26-
// Translator::load($this->languageModel->getCurrentLanguage(), __DIR__ . '/Locale');
27-
// }
24+
public function onstartup()
25+
{
26+
//translator::load($this->languagemodel->getcurrentlanguage(), __dir__ . '/locale');
27+
if($this->dateParser->getUserDateFormat() != 'Y/m/d'){
28+
$this->flash->failure('Persian Board plugin Error - Date Format : ' . $this->dateParser->getUserDateFormat(). " please change it to: Y/m/d");
29+
}
30+
elseif($this->languageModel->getCurrentLanguage() != 'fa_IR'){
31+
$this->flash->failure('Persian Board plugin Error - to use this plugin you must change language to "فارسی"' );
32+
}
33+
}
2834

2935
public function getPluginName()
3036
{

0 commit comments

Comments
 (0)