diff --git a/main/admin/configure_extensions.php b/main/admin/configure_extensions.php
index 80b1a414ee..a84e759a5f 100755
--- a/main/admin/configure_extensions.php
+++ b/main/admin/configure_extensions.php
@@ -314,7 +314,7 @@ Display::display_header($nameTool);
//$form -> addElement('html','
');
$form -> addElement('text', 'path_to_lzx', get_lang('PathToLzx'));
//$form -> addElement('html','
');
- $options = apiGetDocumentConversionSizes();
+ $options = api_get_document_conversion_sizes();
$form -> addElement('select', 'size', get_lang('SlideSize'), $options);
@@ -351,7 +351,7 @@ Display::display_header($nameTool);
-
+
diff --git a/main/forum/index.php b/main/forum/index.php
index 322eb226e9..e1172ecb53 100755
--- a/main/forum/index.php
+++ b/main/forum/index.php
@@ -499,7 +499,7 @@ if (is_array($forumCategories)) {
);
if (!empty($forum['start_time']) && !empty($forum['end_time'])) {
- $res = apiIsDateInDateRange($forum['start_time'], $forum['end_time']);
+ $res = api_is_date_in_date_range($forum['start_time'], $forum['end_time']);
if (!$res) {
$linkForum = $forum['forum_title'];
}
diff --git a/main/forum/viewforum.php b/main/forum/viewforum.php
index 0bf71bfb85..4fadaaca46 100755
--- a/main/forum/viewforum.php
+++ b/main/forum/viewforum.php
@@ -60,7 +60,7 @@ $isTutor = GroupManager::is_tutor_of_group($userId, $groupId, $courseId);
$my_forum = isset($_GET['forum']) ? $_GET['forum'] : '';
// Note: This has to be validated that it is an existing forum.
$current_forum = get_forum_information($my_forum);
-$isForumOpenByDateAccess = apiIsDateInDateRange($current_forum['start_time'], $current_forum['end_time']);
+$isForumOpenByDateAccess = api_is_date_in_date_range($current_forum['start_time'], $current_forum['end_time']);
if (!$isForumOpenByDateAccess) {
if ($origin) {
diff --git a/main/inc/lib/api.lib.php b/main/inc/lib/api.lib.php
index 93fc3aa668..6d14d3be04 100644
--- a/main/inc/lib/api.lib.php
+++ b/main/inc/lib/api.lib.php
@@ -1977,35 +1977,6 @@ function get_status_from_code($status_code) {
}
}
-/* FAILURE MANAGEMENT */
-
-/**
- * The Failure Management module is here to compensate
- * the absence of an 'exception' device in PHP 4.
- */
-
-/**
- * $api_failureList - array containing all the failure recorded in order of arrival.
- */
-$api_failureList = array();
-
-/**
- * Fills a global array called $api_failureList
- * This array collects all the failure occuring during the script runs
- * The main purpose is allowing to manage the display messages externaly
- * from the functions or objects. This strengthens encupsalation principle
- *
- * @author Hugues Peeters
- * @param string $failure_type - the type of failure
- * global: array $api_failureList
- * @return boolean false to stay consistent with the main script
- */
-function api_set_failure($failure_type) {
- global $api_failureList;
- $api_failureList[] = $failure_type;
- return false;
-}
-
/**
* Sets the current user as anonymous if it hasn't been identified yet. This
* function should be used inside a tool only. The function api_clear_anonymous()
@@ -2031,67 +2002,6 @@ function api_set_anonymous() {
return true;
}
-/**
- * Gets the last failure stored in $api_failureList;
- *
- * @author Hugues Peeters
- * @param void
- * @return string - the last failure stored
- */
-function api_get_last_failure() {
- global $api_failureList;
- return $api_failureList[count($api_failureList) - 1];
-}
-
-/**
- * Collects and manages failures occurring during script execution
- * The main purpose is allowing to manage the display messages externally
- * from functions or objects. This strengthens encapsulation principle
- *
- * @author Hugues Peeters
- * @package chamilo.library
- */
-class api_failure {
-
- // TODO: $api_failureList to be hidden from global scope and to be renamed according to our coding conventions.
- /**
- * IMPLEMENTATION NOTE : For now the $api_failureList list is set to the
- * global scope, as PHP 4 is unable to manage static variable in class. But
- * this feature is awaited in PHP 5. The class is already written to minize
- * the change when static class variable will be possible. And the API won't
- * change.
- */
- public $api_failureList = array();
-
- /**
- * Piles the last failure in the failure list
- *
- * @author Hugues Peeters
- * @param string $failure_type - the type of failure
- * @global array $api_failureList
- * @return boolean false to stay consistent with the main script
- */
- static function set_failure($failure_type) {
- global $api_failureList;
- $api_failureList[] = $failure_type;
- return false;
- }
-
- /**
- * Gets the last failure stored
- *
- * @author Hugues Peeters
- * @param void
- * @return string - the last failure stored
- */
- static function get_last_failure() {
- global $api_failureList;
- if (count($api_failureList) == 0) { return ''; }
- return $api_failureList[count($api_failureList) - 1];
- }
-}
-
-
/* CONFIGURATION SETTINGS */
/**
@@ -8035,7 +7945,7 @@ function api_protect_course_group($tool, $showHeader = true)
* @param datetime $currentDate
* @return bool true if date is in rage, false otherwise
*/
-function apiIsDateInDateRange ($startDate, $endDate, $currentDate = null)
+function api_is_date_in_date_range($startDate, $endDate, $currentDate = null)
{
$startDate = strtotime(api_get_local_time($startDate));
$endDate = strtotime(api_get_local_time($endDate));
@@ -8091,7 +8001,7 @@ function api_is_student_view_active() {
* Returns an array of resolutions that can be used for the conversion of documents to images
* @return array
*/
-function apiGetDocumentConversionSizes()
+function api_get_document_conversion_sizes()
{
return array(
'540x405'=>'540x405 (3/4)',
diff --git a/main/upload/upload_ppt.php b/main/upload/upload_ppt.php
index f470065534..01ccfaf98a 100755
--- a/main/upload/upload_ppt.php
+++ b/main/upload/upload_ppt.php
@@ -77,7 +77,7 @@ $form->addElement('header', get_lang("WelcomeOogieSubtitle"));
$form->addElement('html', Display::return_message($message, 'info', false));
$form->addElement('file', 'user_file', array(Display::return_icon('powerpoint_big.gif'), $div_upload_limit));
$form->addElement('checkbox', 'take_slide_name', '', get_lang('TakeSlideName'));
-$options = apiGetDocumentConversionSizes();
+$options = api_get_document_conversion_sizes();
$form->addElement('select', 'slide_size', get_lang('SlideSize'), $options);
if (api_get_setting('search_enabled') == 'true') {
require_once(api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php');