diff options
Diffstat (limited to 'app/helpers.php')
-rw-r--r-- | app/helpers.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/app/helpers.php b/app/helpers.php new file mode 100644 index 0000000..6ec55c1 --- /dev/null +++ b/app/helpers.php @@ -0,0 +1,33 @@ +<?php + +/** + * Path to the _custom_ directory. + * + * @param string $file Append this filename to the returned path. + * @return string + */ +function custom_path($file = '') +{ + return __DIR__.'/../custom' . (!empty($file) ? '/'.$file : ''); +} + +/** + * Is moonmoon installed? + * + * @return bool + */ +function is_installed() +{ + return file_exists(custom_path('config.yml')) && file_exists(custom_path('people.opml')); +} + +/** + * Shortcut to Simplel10n::getString(). + * + * @param string $str + * @param string $comment + * @return string + */ +function _g($str, $comment='') { + return Simplel10n::getString($str, $comment); +}
\ No newline at end of file |