Fix: Bad test

This commit is contained in:
Laurent Destailleur 2012-02-29 20:58:05 +01:00
parent 57c94c6736
commit dd9e150743
5 changed files with 6 additions and 6 deletions

View File

@ -87,7 +87,7 @@ $var=!$var;
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentTheme").'</td><td colspan="2">'.$conf->theme.'</td></tr>'."\n";
$var=!$var;
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentMenuHandler").'</td><td colspan="2">';
if (preg_match('/^smartphone/',$conf->smart_menu) && isset($conf->browser->phone)) print $conf->smart_menu;
if (preg_match('/^smartphone/',$conf->smart_menu) && ! empty($conf->browser->phone)) print $conf->smart_menu;
else print $conf->top_menu;
print '</td></tr>'."\n";
print '</table>';

View File

@ -185,7 +185,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$conf->global->MAIN_APPLICATION_TITLE;
// Select templates
if (preg_match('/^smartphone/',$conf->smart_menu) && isset($conf->browser->phone))
if (preg_match('/^smartphone/',$conf->smart_menu) && ! empty($conf->browser->phone))
{
$template_dir = DOL_DOCUMENT_ROOT.'/theme/phones/smartphone/tpl/';
}

View File

@ -56,7 +56,7 @@ if (!isset($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_IN
*/
// If smartphone mode, we do not show main page, we show only menu
if (preg_match('/^smartphone/',$conf->smart_menu) && isset($conf->browser->phone))
if (preg_match('/^smartphone/',$conf->smart_menu) && ! empty($conf->browser->phone))
{
$limitmenuto=GETPOST('limitmenuto')?GETPOST('limitmenuto'):0;
$limitmenuto=1; // A virer

View File

@ -1503,7 +1503,7 @@ function main_area($title='')
print "\n";
print '<div class="fiche"> <!-- begin div class="fiche" -->'."\n";
if (preg_match('/^smartphone/',$conf->smart_menu) && isset($conf->browser->phone))
if (preg_match('/^smartphone/',$conf->smart_menu) && ! empty($conf->browser->phone))
{
print '<div data-role="page"> <!-- begin div data-role="page" -->';
@ -1628,7 +1628,7 @@ if (! function_exists("llxFooter"))
}
print "\n\n";
if (preg_match('/^smartphone/',$conf->smart_menu) && isset($conf->browser->phone))
if (preg_match('/^smartphone/',$conf->smart_menu) && ! empty($conf->browser->phone))
{
print '</div> <!-- end div data-role="content" -->'."\n";
print '</div> <!-- end div data-role="page" -->'."\n";

View File

@ -150,7 +150,7 @@ $title='Dolibarr '.DOL_VERSION;
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$conf->global->MAIN_APPLICATION_TITLE;
// Select templates
if (preg_match('/^smartphone/',$conf->smart_menu) && isset($conf->browser->phone))
if (preg_match('/^smartphone/',$conf->smart_menu) && ! empty($conf->browser->phone))
{
$template_dir = DOL_DOCUMENT_ROOT.'/theme/phones/smartphone/tpl/';
}