Project

General

Profile

Feature #1744

Cleaning if() conditions

Added by Ivan Tcholakov over 9 years ago. Updated over 9 years ago.

Status:
Feature implemented
Priority:
Normal
Category:
-
Target version:
Start date:
18/07/2010
Due date:
% Done:

100%

Estimated time:
Complexity:
Easy
SCRUM pts - complexity:
?

Description

Examples:

if ($_configuration['multiple_access_urls'] == true) { // should be if ($_configuration['multiple_access_urls']) {
...
}

if ($visual_code_is_used == true) { // should be if ($visual_code_is_used) {
...
}

if (api_is_session_admin() == true) { // should be if (api_is_session_admin()) {
...
}

if ($export == true && $name != false) { // should be if ($export && $name) {
...
}

etc. There are many similar statements within the source.

Conditions like these may be simplified as it was shown in the examples, for all the source.

History

#1

Updated by Ivan Tcholakov over 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Ivan Tcholakov
  • Target version set to 1.8.8 stable

Ivan Tcholakov wrote:

Examples:

[...]

etc. There are many similar statements within the source.

Conditions like these may be simplified as it was shown in the examples, for all the source.

#2

Updated by Ivan Tcholakov over 9 years ago

  • Target version changed from 1.8.8 stable to 1.8.7.1
#3

Updated by Ivan Tcholakov over 9 years ago

12182:15d63bdede83 Feature #1744 - Cleaning logical conditions: if ($_configuration['multiple_access_urls'] == true) ------> if ($_configuration['multiple_access_urls'])
http://code.google.com/p/chamilo/source/detail?r=15d63bdede836cf460eb779f58ed642e17e561ab&repo=classic

#4

Updated by Ivan Tcholakov over 9 years ago

  • % Done changed from 0 to 80
#5

Updated by Ivan Tcholakov over 9 years ago

  • Status changed from Assigned to Feature implemented
  • % Done changed from 80 to 100

12186:360bed6ce667 Feature #1744 - Online editor, YouTube plugin: Correction of the returned results of a javascript function.
http://code.google.com/p/chamilo/source/detail?r=360bed6ce667dd4c7b3ac0e04b35937b5a08567c&repo=classic

Also available in: Atom PDF