[svn r16130] Set different form action if out of newscorm context

skala
Yannick Warnier 16 years ago
parent 1a5734b81b
commit f341d45df0
  1. 17
      main/newscorm/lp_list_search.php
  2. 5
      main/search/index.php

@ -46,7 +46,7 @@ if (api_get_setting('search_enabled') !== 'true') {
}
else
{
search_widget_show();
search_widget_show(empty($search_action)?null:'index.php');
}
@ -158,15 +158,12 @@ if (count($blocks) < 1) {
}
else
{
?>
<?php
function to_img($i) {
return sprintf('<img src="%s"/>', $i);
}
function to_link($i) {
return sprintf('<a href="%s">%s</a>', $i, get_lang('ViewLearningPath'));
}
function to_img($i) {
return sprintf('<img src="%s"/>', $i);
}
function to_link($i) {
return sprintf('<a href="%s">%s</a>', $i, get_lang('ViewLearningPath'));
}
$s = new SortableTableFromArray($blocks);
$s->additional_parameters = array(

@ -3,7 +3,7 @@
* This file includes lp_list_search to avoid duplication of code, it
* bootstraps dokeos api enough to make lp_list_search work.
*/
include_once ('../main/inc/global.inc.php');
include_once ('../inc/global.inc.php');
include_once (api_get_path(LIBRARY_PATH).'course.lib.php');
include_once (api_get_path(LIBRARY_PATH).'debug.lib.inc.php');
include_once (api_get_path(LIBRARY_PATH).'system_announcements.lib.php');
@ -12,5 +12,6 @@ include_once (api_get_path(LIBRARY_PATH).'usermanager.lib.php');
api_block_anonymous_users(); // only users who are logged in can proceed
require '../main/newscorm/lp_list_search.php';
$search_action = 'index.php';
require '../newscorm/lp_list_search.php';
?>

Loading…
Cancel
Save