Commit 3aee06c5 authored by chealer's avatar chealer

[FIX]

[FIX] error_reporting overriding
[FIX] undefined notice
parent 9b1e4dac
......@@ -2818,6 +2818,7 @@ modules/mod-func-quick_edit.php -text
modules/mod-func-random_images.php -text
modules/mod-func-random_pages.php -text
modules/mod-func-register.php -text
modules/mod-func-semantic_links.php -text
modules/mod-func-switch_lang.php -text
modules/mod-func-switch_theme.php -text
modules/mod-func-terminology.php -text
......@@ -2846,7 +2847,6 @@ modules/mod-last_articles.php -text
modules/mod-last_submissions.php -text
modules/mod-last_visitors.php -text
modules/mod-months_links.php -text
modules/mod-semantic_links.php -text
modules/mod-shoutbox.php -text
modules/mod-since_last_visit.php -text
modules/mod-since_last_visit_new.php -text
......
<?php
//this script may only be included - so its better to die if called directly.
if ( basename($_SERVER['SCRIPT_NAME']) == basename(__FILE__) ) {
header("location: index.php");
exit;
}
function module_semantic_links_info() {
return array(
'name' => tra('Semantic links'),
'description' => tra('Lists the relationships known for the Wiki page displayed. For each relation type contained in the page, it lists all the pages it links to or gets linked from.'),
'prefs' => array( 'feature_semantic' ),
'params' => array()
);
}
function module_semantic_links( $mod_reference, $module_params ) {
global $page, $smarty;
$smarty->assign( 'show_semantic_links_module', false );
if( isset($page) && !empty($page) ) {
global $semanticlib;
require_once( 'lib/wiki/semanticlib.php' );
$smarty->assign( 'show_semantic_links_module', true );
$smarty->assign( 'msl_page', $msl_page = $page );
$smarty->assign( 'msl_relations', $semanticlib->getRelationList( $msl_page ) );
$smarty->clear_assign('tpl_module_title');
}
}
<?php
//this script may only be included - so its better to die if called directly.
if ( basename($_SERVER['SCRIPT_NAME']) == basename(__FILE__) ) {
header("location: index.php");
exit;
}
ini_set( 'display_errors', 'on' );
error_reporting(E_ALL);
if( isset($page) && !empty($page) ) {
global $smarty;
global $semanticlib;
require_once( 'lib/wiki/semanticlib.php' );
$smarty->assign( 'show_semantic_links_module', true );
$smarty->assign( 'msl_page', $msl_page = $page );
$smarty->assign( 'msl_relations', $semanticlib->getRelationList( $msl_page ) );
}
......@@ -4,7 +4,7 @@
{if !isset($tpl_module_title)}{assign var=tpl_module_title value="{tr}Page Relations{/tr}"}{/if}
{tikimodule error=$module_params.error title=$tpl_module_title name="semantic_links" flip=$module_params.flip decorations=$module_params.decorations nobox=$module_params.nobox notitle=$module_params.notitle}
{foreach from=$msl_relations key=msl_label item=msl_list}
<h3>{$msl_label}</h3>
<h3>{$msl_label|escape}</h3>
<ul>
{foreach from=$msl_list key=msl_item item=msl_url}
<li><a href="{$msl_url|escape}">{$msl_item|escape}</a></li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment