Esempio n. 1
0
 public static function send($module, $handler, $data = array())
 {
     if (empty(static::$config)) {
         static::$config = Config::load('mail');
     }
     Place::init();
     static::clear();
     $path = Module::path($module);
     if (empty($path)) {
         return;
     }
     $path .= '/emails/' . $handler;
     static::run($path, $data);
     return static::mail();
 }
Esempio n. 2
0
function smarty_block_ifpermitted($params, $content, &$view, &$repeat)
{
    if (empty($content)) {
        return "";
    }
    $action = '';
    if (!isset($params['get'])) {
        return '';
    }
    if (!Module::isActive($params['get'])) {
        return '';
    }
    if (!Module::isPermitted($params['get'])) {
        return '';
    }
    return $content;
}