Remove TODO
This commit is contained in:
parent
0bf850c1ea
commit
887a40cf1d
@ -105,7 +105,7 @@ print '<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print "<tr class=\"liste_titre\"><td colspan=\"2\">".$langs->trans("Browser")."</td></tr>\n";
|
||||
print "<tr $bc[0]><td width=\"280\">".$langs->trans("UserAgent")."</td><td>" .$_SERVER["HTTP_USER_AGENT"]."</td></tr>\n";
|
||||
print "<tr $bc[1]><td width=\"280\">".$langs->trans("Smartphone")."</td><td>".(empty($conf->browser->phone)?$langs->trans("No"):$conf->browser->phone)."</td></tr>\n";
|
||||
print "<tr $bc[1]><td width=\"280\">".$langs->trans("Smartphone")."</td><td>".(($conf->browser->layout != 'phone')?$langs->trans("No"):$langs->trans("Yes"))."</td></tr>\n";
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -51,12 +51,12 @@ class Form
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
public $db;
|
||||
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error='';
|
||||
|
||||
|
||||
var $num;
|
||||
|
||||
// Cache arrays
|
||||
@ -4957,7 +4957,6 @@ class Form
|
||||
if (! empty($conf->use_javascript_ajax) && (empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR != "none")) {
|
||||
$usecalendar = ((empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR == 'eldy')?'jquery':$conf->global->MAIN_POPUP_CALENDAR);
|
||||
}
|
||||
//if (! empty($conf->browser->phone)) $usecalendar='combo';
|
||||
|
||||
if ($d)
|
||||
{
|
||||
|
||||
@ -40,7 +40,7 @@ class FormFile
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error;
|
||||
|
||||
|
||||
public $numoffiles;
|
||||
public $infofiles; // Used to return informations by function getDocumentsLink
|
||||
|
||||
@ -678,7 +678,7 @@ class FormFile
|
||||
$formadmin=new FormAdmin($this->db);
|
||||
$defaultlang=$codelang?$codelang:$langs->getDefaultLang();
|
||||
$morecss='maxwidth150';
|
||||
if (! empty($conf->browser->phone)) $morecss='maxwidth100';
|
||||
if ($conf->browser->layout == 'phone') $morecss='maxwidth100';
|
||||
$out.= $formadmin->select_language($defaultlang, 'lang_id', 0, 0, 0, 0, 0, $morecss);
|
||||
}
|
||||
else
|
||||
@ -1318,7 +1318,7 @@ class FormFile
|
||||
|
||||
if (empty($disablemove))
|
||||
{
|
||||
if ($nboffiles > 1 && empty($conf->browser->phone)) {
|
||||
if ($nboffiles > 1 && $conf->browser->layout != 'phone') {
|
||||
print '<td align="center" class="linecolmove tdlineupdown">';
|
||||
if ($i > 0) {
|
||||
print '<a class="lineupdown" href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&action=up&rowid='.$line->id.'">'.img_up('default',0,'imgupforline').'</a>';
|
||||
@ -1329,7 +1329,7 @@ class FormFile
|
||||
print '</td>';
|
||||
}
|
||||
else {
|
||||
print '<td align="center"'.((empty($conf->browser->phone) && empty($disablemove)) ?' class="linecolmove tdlineupdown"':' class="linecolmove"').'>';
|
||||
print '<td align="center"'.($conf->browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown"':' class="linecolmove"').'>';
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
class FormOther
|
||||
{
|
||||
private $db;
|
||||
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
@ -1029,7 +1029,7 @@ class FormOther
|
||||
if (! empty($boxidactivatedforuser[$box->id])) continue; // Already visible for user
|
||||
$label=$langs->transnoentitiesnoconv($box->boxlabel);
|
||||
//if (preg_match('/graph/',$box->class)) $label.=' ('.$langs->trans("Graph").')';
|
||||
if (preg_match('/graph/',$box->class) && empty($conf->browser->phone))
|
||||
if (preg_match('/graph/',$box->class) && $conf->browser->layout != 'phone')
|
||||
{
|
||||
$label=$label.' <span class="fa fa-bar-chart"></span>';
|
||||
}
|
||||
@ -1163,7 +1163,7 @@ class FormOther
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($conf->browser->phone))
|
||||
if ($conf->browser->layout != 'phone')
|
||||
{
|
||||
$emptybox->box_id='A';
|
||||
$emptybox->info_box_head=array();
|
||||
@ -1190,7 +1190,7 @@ class FormOther
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($conf->browser->phone))
|
||||
if ($conf->browser->layout != 'phone')
|
||||
{
|
||||
$emptybox->box_id='B';
|
||||
$emptybox->info_box_head=array();
|
||||
|
||||
@ -134,7 +134,7 @@ if (! empty($conf->modulebuilder->enabled))
|
||||
|
||||
// Link to print main content area
|
||||
/*
|
||||
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && empty($conf->browser->phone))
|
||||
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $conf->browser->layout != 'phone')
|
||||
{
|
||||
$qs=dol_escape_htmltag($_SERVER["QUERY_STRING"]);
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
if (! empty($conf->browser->phone)) print '<div class="fichehalfleft">';
|
||||
if ($conf->browser->layout == 'phone') print '<div class="fichehalfleft">';
|
||||
else print '<table class="nobordernopadding" width="100%"><tr><td class="borderright">';
|
||||
|
||||
print '<table class="nobordernopadding centpercent">';
|
||||
@ -180,10 +180,10 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
|
||||
print '</table>';
|
||||
|
||||
if (! empty($conf->browser->phone)) print '</div>';
|
||||
if ($conf->browser->layout == 'phone') print '</div>';
|
||||
else print '</td>';
|
||||
|
||||
if (! empty($conf->browser->phone)) print '<div class="fichehalfright">';
|
||||
if ($conf->browser->layout == 'phone') print '<div class="fichehalfright">';
|
||||
else print '<td align="center" valign="middle" class="nowrap">';
|
||||
|
||||
print '<table class="centpercent"><tr><td align="center">';
|
||||
@ -193,7 +193,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
if (! empty($conf->browser->phone)) print '</div>';
|
||||
if ($conf->browser->layout == 'phone') print '</div>';
|
||||
else print '</td></tr></table>';
|
||||
|
||||
print '</div>'; // Close fichecenter
|
||||
|
||||
@ -377,7 +377,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $
|
||||
|
||||
// select2 disabled for smartphones with standard browser.
|
||||
// TODO With select2 v4, it seems ok, except that responsive style on table become crazy when scrolling at end of array)
|
||||
if (! empty($conf->browser->phone)) return '';
|
||||
if ($conf->browser->layout == 'phone') return '';
|
||||
|
||||
if (! empty($conf->global->MAIN_DISABLE_AJAX_COMBOX)) return '';
|
||||
if (empty($conf->use_javascript_ajax)) return '';
|
||||
|
||||
@ -1353,7 +1353,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
$width=80; $cssclass='photoref';
|
||||
$showimage=$object->is_photo_available($conf->product->multidir_output[$entity]);
|
||||
$maxvisiblephotos=(isset($conf->global->PRODUCT_MAX_VISIBLE_PHOTO)?$conf->global->PRODUCT_MAX_VISIBLE_PHOTO:5);
|
||||
if ($conf->browser->phone) $maxvisiblephotos=1;
|
||||
if ($conf->browser->layout == 'phone') $maxvisiblephotos=1;
|
||||
if ($showimage) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$object->show_photos('product', $conf->product->multidir_output[$entity],'small',$maxvisiblephotos,0,0,0,$width,0).'</div>';
|
||||
else
|
||||
{
|
||||
@ -1372,7 +1372,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
$width=80; $cssclass='photoref';
|
||||
$showimage=$object->is_photo_available($conf->ticket->multidir_output[$entity].'/'.$object->track_id);
|
||||
$maxvisiblephotos=(isset($conf->global->TICKETSUP_MAX_VISIBLE_PHOTO)?$conf->global->TICKETSUP_MAX_VISIBLE_PHOTO:2);
|
||||
if ($conf->browser->phone) $maxvisiblephotos=1;
|
||||
if ($conf->browser->layout == 'phone') $maxvisiblephotos=1;
|
||||
if ($showimage) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$object->show_photos('ticket', $conf->ticket->multidir_output[$entity],'small',$maxvisiblephotos,0,0,0,$width,0).'</div>';
|
||||
else
|
||||
{
|
||||
@ -2549,7 +2549,7 @@ function dol_print_phone($phone,$countrycode='',$cid=0,$socid=0,$addlink='',$sep
|
||||
}
|
||||
if (! empty($addlink)) // Link on phone number (+ link to add action if conf->global->AGENDA_ADDACTIONFORPHONE set)
|
||||
{
|
||||
if (! empty($conf->browser->phone) || (! empty($conf->clicktodial->enabled) && ! empty($conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS))) // If phone or option for, we use link of phone
|
||||
if ($conf->browser->layout == 'phone' || (! empty($conf->clicktodial->enabled) && ! empty($conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS))) // If phone or option for, we use link of phone
|
||||
{
|
||||
$newphone ='<a href="tel:'.$phone.'"';
|
||||
$newphone.='>'.$phone.'</a>';
|
||||
|
||||
@ -292,7 +292,7 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
||||
</td>
|
||||
|
||||
<?php
|
||||
if ($num > 1 && empty($conf->browser->phone) && ($this->situation_counter == 1 || !$this->situation_cycle_ref) && empty($disablemove)) { ?>
|
||||
if ($num > 1 && $conf->browser->layout != 'phone' && ($this->situation_counter == 1 || !$this->situation_cycle_ref) && empty($disablemove)) { ?>
|
||||
<td align="center" class="linecolmove tdlineupdown"><?php $coldisplay++; ?>
|
||||
<?php if ($i > 0) { ?>
|
||||
<a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=up&rowid='.$line->id; ?>">
|
||||
@ -306,7 +306,7 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
||||
<?php } ?>
|
||||
</td>
|
||||
<?php } else { ?>
|
||||
<td align="center"<?php echo ((empty($conf->browser->phone) && empty($disablemove)) ?' class="linecolmove tdlineupdown"':' class="linecolmove"'); ?>><?php $coldisplay++; ?></td>
|
||||
<td align="center"<?php echo (($conf->browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown"':' class="linecolmove"'); ?>><?php $coldisplay++; ?></td>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<td colspan="3"><?php $coldisplay=$coldisplay+3; ?></td>
|
||||
|
||||
@ -256,8 +256,6 @@ if (isset($_SERVER["HTTP_USER_AGENT"]))
|
||||
$conf->browser->os=$tmp['browseros'];
|
||||
$conf->browser->version=$tmp['browserversion'];
|
||||
$conf->browser->layout=$tmp['layout']; // 'classic', 'phone', 'tablet'
|
||||
$conf->browser->phone=$tmp['phone']; // TODO deprecated, use ->layout
|
||||
$conf->browser->tablet=$tmp['tablet']; // TODO deprecated, use ->layout
|
||||
//var_dump($conf->browser);
|
||||
|
||||
if ($conf->browser->layout == 'phone') $conf->dol_no_mouse_hover=1;
|
||||
@ -486,17 +484,6 @@ if (! defined('NOLOGIN'))
|
||||
$_SESSION["dol_loginmesg"]=$langs->trans("ErrorBadValueForCode");
|
||||
$test=false;
|
||||
|
||||
// TODO @deprecated Remove this. Hook must be used, not this trigger.
|
||||
$user->trigger_mesg='ErrorBadValueForCode - login='.GETPOST("username","alpha",2);
|
||||
// Call of 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 of triggers
|
||||
|
||||
// Hooks on failed login
|
||||
$action='';
|
||||
$hookmanager->initHooks(array('login'));
|
||||
@ -565,17 +552,6 @@ if (! defined('NOLOGIN'))
|
||||
// We set a generic message if not defined inside function checkLoginPassEntity or subfunctions
|
||||
if (empty($_SESSION["dol_loginmesg"])) $_SESSION["dol_loginmesg"]=$langs->trans("ErrorBadLoginPassword");
|
||||
|
||||
// TODO @deprecated Remove this. Hook must be used, not this trigger.
|
||||
$user->trigger_mesg=$langs->trans("ErrorBadLoginPassword").' - login='.GETPOST("username","alpha",2);
|
||||
// Call of 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,GETPOST("username","alpha",2));
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
// End Call of triggers
|
||||
|
||||
// Hooks on failed login
|
||||
$action='';
|
||||
$hookmanager->initHooks(array('login'));
|
||||
@ -612,27 +588,12 @@ if (! defined('NOLOGIN'))
|
||||
$langs->loadLangs(array('main', 'errors'));
|
||||
|
||||
$_SESSION["dol_loginmesg"]=$langs->trans("ErrorCantLoadUserFromDolibarrDatabase",$login);
|
||||
|
||||
// TODO @deprecated Remove this. Hook must be used, not this trigger.
|
||||
$user->trigger_mesg='ErrorCantLoadUserFromDolibarrDatabase - login='.$login;
|
||||
}
|
||||
if ($resultFetchUser < 0)
|
||||
{
|
||||
$_SESSION["dol_loginmesg"]=$user->error;
|
||||
|
||||
// TODO @deprecated Remove this. Hook must be used, not this trigger.
|
||||
$user->trigger_mesg=$user->error;
|
||||
}
|
||||
|
||||
// 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'));
|
||||
@ -671,16 +632,10 @@ if (! defined('NOLOGIN'))
|
||||
$langs->loadLangs(array('main', 'errors'));
|
||||
|
||||
$_SESSION["dol_loginmesg"]=$langs->trans("ErrorCantLoadUserFromDolibarrDatabase",$login);
|
||||
|
||||
// TODO @deprecated Remove this. Hook must be used, not this trigger.
|
||||
$user->trigger_mesg='ErrorCantLoadUserFromDolibarrDatabase - login='.$login;
|
||||
}
|
||||
if ($resultFetchUser < 0)
|
||||
{
|
||||
$_SESSION["dol_loginmesg"]=$user->error;
|
||||
|
||||
// TODO @deprecated Remove this. Hook must be used, not this trigger.
|
||||
$user->trigger_mesg=$user->error;
|
||||
}
|
||||
|
||||
// TODO @deprecated Remove this. Hook must be used, not this trigger.
|
||||
@ -900,7 +855,6 @@ if (! empty($conf->dol_use_jmobile) && in_array($conf->theme,array('bureau2crea'
|
||||
$conf->theme='eldy';
|
||||
$conf->css = "/theme/".$conf->theme."/style.css.php";
|
||||
}
|
||||
//var_dump($conf->browser->phone);
|
||||
|
||||
if (! defined('NOREQUIRETRAN'))
|
||||
{
|
||||
@ -1574,7 +1528,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
||||
}
|
||||
|
||||
// Link to print main content area
|
||||
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && empty($conf->browser->phone))
|
||||
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $conf->browser->layout != 'phone')
|
||||
{
|
||||
$qs=dol_escape_htmltag($_SERVER["QUERY_STRING"]);
|
||||
|
||||
|
||||
@ -1184,7 +1184,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
||||
$formadmin=new FormAdmin($db);
|
||||
$defaultlang=$codelang?$codelang:$langs->getDefaultLang();
|
||||
$morecss='maxwidth150';
|
||||
if (! empty($conf->browser->phone)) $morecss='maxwidth100';
|
||||
if ($conf->browser->layout == 'phone') $morecss='maxwidth100';
|
||||
$out.= $formadmin->select_language($defaultlang, 'lang_idrib'.$rib->id, 0, 0, 0, 0, 0, $morecss);
|
||||
}
|
||||
// Button
|
||||
|
||||
@ -2232,7 +2232,7 @@ class User extends CommonObject
|
||||
$label.= '<br><b>'.$langs->trans("Browser").':</b> '.$conf->browser->name.($conf->browser->version?' '.$conf->browser->version:'').' ('.$_SERVER['HTTP_USER_AGENT'].')';
|
||||
$label.= '<br><b>'.$langs->trans("Layout").':</b> '.$conf->browser->layout;
|
||||
$label.= '<br><b>'.$langs->trans("Screen").':</b> '.$_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight'];
|
||||
if (! empty($conf->browser->phone)) $label.= '<br><b>'.$langs->trans("Phone").':</b> '.$conf->browser->phone;
|
||||
if ($conf->browser->layout == 'phone') $label.= '<br><b>'.$langs->trans("Phone").':</b> '.$langs->trans("Yes");;
|
||||
if (! empty($_SESSION["disablemodules"])) $label.= '<br><b>'.$langs->trans("DisabledModules").':</b> <br>'.join(', ',explode(',',$_SESSION["disablemodules"]));
|
||||
}
|
||||
if ($infologin < 0) $label='';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user