function handler_bug(&$page)
{
global $globals;
+
+ if (empty($_SERVER['HTTP_REFERER'])) {
+ // We don't have a valid referer, we need to use the url
+ list($currentPage, $location) = explode('//', $_SERVER['REQUEST_URI'], 2);
+
+ $location = 'http'.(empty($_SERVER['HTTPS']) ? '' : 's').'://'.$_SERVER['SERVER_NAME'].'/'.$location;
+ } else {
+ $location = $_SERVER['HTTP_REFERER'];
+ }
+
$page->changeTpl('core/bug.tpl', SIMPLE);
+ $page->assign('location', $location);
$page->addJsLink('close_on_esc.js');
+
if (Env::has('send') && trim(Env::v('detailed_desc'))) {
S::assert_xsrf_token();
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-function smarty_modifier_miniwiki($string, $format = 'no_title')
+require_once 'platal.inc.php';
+
+function smarty_modifier_miniwiki($string, $format = 'no_title', $type = 'html')
{
- return MiniWiki::wikiToHTML($string, $format == 'title');
+ if ($type == 'html') {
+ return MiniWiki::wikiToHTML($string, $format == 'title');
+ } else {
+ return MiniWiki::wikiToText($string, false, 0, 80, $format == 'title');
+ }
}
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: