Skip to content

Commit

Permalink
Fix all TODO in main and master files
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 2, 2018
1 parent 887a40c commit edd55fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
26 changes: 2 additions & 24 deletions htdocs/main.inc.php
Expand Up @@ -638,16 +638,6 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type)
$_SESSION["dol_loginmesg"]=$user->error;
}

// TODO @deprecated Remove this. Hook must be used, not this trigger.
// Call triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf);
if ($result < 0) {
$error++;
}
// End call triggers

// Hooks on failed login
$action='';
$hookmanager->initHooks(array('login'));
Expand Down Expand Up @@ -735,17 +725,6 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type)

$loginfo = 'TZ='.$_SESSION["dol_tz"].';TZString='.$_SESSION["dol_tz_string"].';Screen='.$_SESSION["dol_screenwidth"].'x'.$_SESSION["dol_screenheight"];

// TODO @deprecated Remove this. Hook must be used, not this trigger.
$user->trigger_mesg = $loginfo;
// Call triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('USER_LOGIN',$user,$user,$langs,$conf);
if ($result < 0) {
$error++;
}
// End call triggers

// Hooks on successfull login
$action='';
$hookmanager->initHooks(array('login'));
Expand Down Expand Up @@ -1753,9 +1732,8 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra
$bugbaseurl.= '?title=';
$bugbaseurl.= urlencode("Bug: ");
$bugbaseurl.= '&body=';
// TODO use .github/ISSUE_TEMPLATE.md to generate?
$bugbaseurl .= urlencode("# Bug\n");
$bugbaseurl .= urlencode("\n");
$bugbaseurl.= urlencode("# Bug\n");
$bugbaseurl.= urlencode("\n");
$bugbaseurl.= urlencode("## Environment\n");
$bugbaseurl.= urlencode("- **Version**: " . DOL_VERSION . "\n");
$bugbaseurl.= urlencode("- **OS**: " . php_uname('s') . "\n");
Expand Down
2 changes: 1 addition & 1 deletion htdocs/master.inc.php
Expand Up @@ -80,7 +80,7 @@
{
if (preg_match('/^http(s)?:/',$value))
{
// TODO: Make this a warning rather than an error since the correct value can be derived in most cases
// Show error message
$correct_value = str_replace($dolibarr_main_url_root, '', $value);
print '<b>Error:</b><br>'."\n";
print 'Wrong <b>$dolibarr_main_url_root_alt</b> value in <b>conf.php</b> file.<br>'."\n";
Expand Down

0 comments on commit edd55fc

Please sign in to comment.