Skip to content

Commit

Permalink
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
eldy committed Dec 9, 2019
2 parents 89c5407 + ee5cac3 commit 8190a68
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
8 changes: 4 additions & 4 deletions htdocs/comm/remx.php
Expand Up @@ -539,7 +539,7 @@
else
{
$colspan = 8;
if (!empty($conf->multicurrency->enabled)) $colspan+=2;
if (!empty($conf->multicurrency->enabled)) $colspan += 2;
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
}
$db->free($resql);
Expand Down Expand Up @@ -695,7 +695,7 @@
else
{
$colspan = 8;
if (!empty($conf->multicurrency->enabled)) $colspan+=2;
if (!empty($conf->multicurrency->enabled)) $colspan += 2;
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
}
$db->free($resql);
Expand Down Expand Up @@ -897,7 +897,7 @@
else
{
$colspan = 8;
if (!empty($conf->multicurrency->enabled)) $colspan+=2;
if (!empty($conf->multicurrency->enabled)) $colspan += 2;
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
}

Expand Down Expand Up @@ -1073,7 +1073,7 @@
else
{
$colspan = 8;
if (!empty($conf->multicurrency->enabled)) $colspan+=2;
if (!empty($conf->multicurrency->enabled)) $colspan += 2;
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
}

Expand Down
34 changes: 17 additions & 17 deletions htdocs/core/website.inc.php
Expand Up @@ -28,31 +28,31 @@
include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php';

// Define $website
if (! is_object($website))
if (!is_object($website))
{
$website=new Website($db);
$website = new Website($db);
$website->fetch(0, $websitekey);
}
// Define $weblangs
if (! is_object($weblangs))
if (!is_object($weblangs))
{
$weblangs = dol_clone($langs); // TODO Use an object lang from a language set into $website object instead of backoffice
$weblangs = dol_clone($langs); // TODO Use an object lang from a language set into $website object instead of backoffice
}
// Define $websitepage if we have $websitepagefile defined
if (! $pageid && ! empty($websitepagefile))
if (!$pageid && !empty($websitepagefile))
{
$pageid = str_replace(array('.tpl.php', 'page'), array('', ''), basename($websitepagefile));
if ($pageid == 'index.php') $pageid = $website->fk_default_home;
}
if (! is_object($websitepage))
if (!is_object($websitepage))
{
$websitepage=new WebsitePage($db);
$websitepage = new WebsitePage($db);
}
if ($pageid > 0)
{
$websitepage->fetch($pageid);

if (! defined('USEDOLIBARREDITOR') && in_array($websitepage->type_container, array('menu', 'other')))
if (!defined('USEDOLIBARREDITOR') && in_array($websitepage->type_container, array('menu', 'other')))
{
$weblangs->load("website");
http_response_code(404);
Expand All @@ -61,7 +61,7 @@
}
}

if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {
if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) {
header("X-Content-Type-Options: nosniff");
/* TODO Manage allow_frames flag on websitepage.
if (empty($websitepage->allow_frames) && empty($conf->global->WEBSITE_ALLOW_FRAMES_ON_ALL_PAGES)) {
Expand All @@ -78,13 +78,13 @@
//print_r(get_defined_constants(true));exit;
if (GETPOST('l', 'aZ09'))
{
$sql ="SELECT wp.rowid, wp.lang, wp.pageurl, wp.fk_page";
$sql.=" FROM ".MAIN_DB_PREFIX."website_page as wp";
$sql.=" WHERE wp.fk_website = ".$website->id;
$sql.=" AND (wp.fk_page = ".$pageid." OR wp.rowid = ".$pageid;
if (is_object($websitepage) && $websitepage->fk_page > 0) $sql.=" OR wp.fk_page = ".$websitepage->fk_page." OR wp.rowid = ".$websitepage->fk_page;
$sql.=")";
$sql.= " AND wp.lang = '".$db->escape(GETPOST('l', 'aZ09'))."'";
$sql = "SELECT wp.rowid, wp.lang, wp.pageurl, wp.fk_page";
$sql .= " FROM ".MAIN_DB_PREFIX."website_page as wp";
$sql .= " WHERE wp.fk_website = ".$website->id;
$sql .= " AND (wp.fk_page = ".$pageid." OR wp.rowid = ".$pageid;
if (is_object($websitepage) && $websitepage->fk_page > 0) $sql .= " OR wp.fk_page = ".$websitepage->fk_page." OR wp.rowid = ".$websitepage->fk_page;
$sql .= ")";
$sql .= " AND wp.lang = '".$db->escape(GETPOST('l', 'aZ09'))."'";

$resql = $db->query($sql);
if ($resql)
Expand Down Expand Up @@ -112,7 +112,7 @@
}

// Show off line message
if (! defined('USEDOLIBARREDITOR') && empty($website->status))
if (!defined('USEDOLIBARREDITOR') && empty($website->status))
{
$weblangs->load("website");
http_response_code(503);
Expand Down

0 comments on commit 8190a68

Please sign in to comment.