Remove unused functions

1.10.x
Julio Montoya 10 years ago
parent 709aa53ff9
commit 37fa195521
  1. 31
      main/inc/introductionSection.inc.php
  2. 9
      main/inc/lib/message.lib.php
  3. 17
      tests/main/inc/lib/main_api.lib.test.php

@ -56,36 +56,9 @@ $toolbar_set = 'IntroductionTool';
$width = '100%';
$height = '300';
// The global variable $fck_attribute has been deprecated. It stays here for supporting old external code.
global $fck_attribute;
$editor_config = array('ToolbarSet' => $toolbar_set, 'Width' => $width, 'Height' => $height);
if (is_array($fck_attribute)) {
if (isset($fck_attribute['ToolbarSet'])) {
$toolbar_set = $fck_attribute['ToolbarSet'];
}
if (isset($fck_attribute['Width'])) {
$toolbar_set = $fck_attribute['Width'];
}
if (isset($fck_attribute['Height'])) {
$toolbar_set = $fck_attribute['Height'];
}
}
if (is_array($editor_config)) {
if (!isset($editor_config['ToolbarSet'])) {
$editor_config['ToolbarSet'] = $toolbar_set;
}
if (!isset($editor_config['Width'])) {
$editor_config['Width'] = $width;
}
if (!isset($editor_config['Height'])) {
$editor_config['Height'] = $height;
}
} else {
$editor_config = array('ToolbarSet' => $toolbar_set, 'Width' => $width, 'Height' => $height);
}
$form->add_html_editor('intro_content', null, null, false, $editor_config);
$form->addHtmlEditor('intro_content', null, null, false, $editor_config);
$form->addElement('style_submit_button', 'intro_cmdUpdate', get_lang('SaveIntroText'), 'class="save"');
/* INTRODUCTION MICRO MODULE - COMMANDS SECTION (IF ALLOWED) */

@ -56,15 +56,6 @@ class MessageManager
return Display::return_message(api_xml_http_response_encode($success), 'confirmation', false);
}
/**
* Displays the wysiwyg html editor.
* @deprecated
*/
public static function display_html_editor_area($name, $resp)
{
api_disp_html_area($name, get_lang('TypeYourMessage'), '', '', null, array('ToolbarSet' => 'Messages', 'Width' => '95%', 'Height' => '250'));
}
/**
* Get the new messages for the current user from the database.
*/

@ -494,23 +494,6 @@ class TestMainApi extends UnitTestCase {
$this->assertTrue($cssdir);
}
function testApiDispHtmlArea(){
$name = 'name';
global $_configuration, $_course, $fck_attribute;
ob_start();
api_disp_html_area($name, $content ='', $height='', $width='100%', $optAttrib='');
$res = ob_get_contents();
$this->assertNotEqual($res,'');
ob_end_clean();
}
function testApiReturnHtmlArea(){
$name = true;
global $_configuration, $_course, $fck_attribute;
$res=api_return_html_area($name, $content='', $height='', $width='100%', $optAttrib='');
$this->assertTrue($res);
}
function testApiSendMail(){
$to= 'chamilotest@beeznest.com';
$subject='Hello';

Loading…
Cancel
Save