Ejemplo n.º 1
0
 /**
  * Formats the supplied text.
  *
  * @param string $text
  * @param bool $strip_html Disables HTML, making it safe.
  *
  * @return string
  */
 public static function text($text, $strip_html = true)
 {
     $text = $strip_html ? htmlspecialchars($text) : $text;
     Hook::run('function:Format::text', array(&$text, $strip_html));
     // Ticket links
     $text = static::ticketLinks($text);
     // Wiki links
     $text = static::wikiLinks($text);
     return $text;
 }
Ejemplo n.º 2
0
 /**
  * Returns an array of available ticket filters.
  *
  * @return array
  *
  * @author Jack P.
  * @copyright Copyright (c) Jack P.
  * @package Traq
  */
 public static function filters()
 {
     $filters = ['summary' => Language::translate('summary'), 'description' => Language::translate('description'), 'owner' => Language::translate('owner'), 'assigned_to' => Language::translate('assigned_to'), 'component' => Language::translate('component'), 'milestone' => Language::translate('milestone'), 'version' => Language::translate('version'), 'status' => Language::translate('status'), 'type' => Language::translate('type'), 'priority' => Language::translate('priority'), 'severity' => Language::translate('severity'), 'search' => Language::translate('search')];
     // Run plugin hook
     Hook::run('function:ticket_filters', array(&$filters));
     return $filters;
 }
Ejemplo n.º 3
0
 /**
  * Hook into `Format::text()`.
  */
 public static function enable()
 {
     Hook::add('function:Format::text', array('Markdown\\Markdown', 'format'));
 }