mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug module website
This commit is contained in:
parent
caa24e1a68
commit
5f5cbec1cf
|
|
@ -188,7 +188,7 @@ function dolIncludeHtmlContent($contentfile)
|
|||
* Generate a zip with all data of web site.
|
||||
*
|
||||
* @param Website $website Object website
|
||||
* @return void
|
||||
* @return string Path to file with zip
|
||||
*/
|
||||
function exportWebSite($website)
|
||||
{
|
||||
|
|
@ -278,6 +278,24 @@ function exportWebSite($website)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Open a zip with all data of web site and load it into database.
|
||||
*
|
||||
* @param string $filename Path of zip file
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function importWebSite($website)
|
||||
{
|
||||
$result = 0;
|
||||
|
||||
|
||||
//$sql = array("INSERT INTO ".MAIN_DB_PREFIX."website(ref, entity, description, status) values('sellyoursaas', '.$conf->entity.', Portal to sell your SaaS', 1)");
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Download all images found into page content $tmp.
|
||||
* If $modifylinks is set, links to images will be replace with a link to viewimage wrapper.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
|
|
@ -375,7 +375,7 @@ if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->read)
|
|||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
$board=new ActionComm($db);
|
||||
|
||||
|
||||
$dashboardlines[] = $board->load_board($user);
|
||||
}
|
||||
|
||||
|
|
@ -688,13 +688,13 @@ $db->close();
|
|||
function showWeather($totallate,$text,$options)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
$out='';
|
||||
$offset=0;
|
||||
$factor=10; // By default
|
||||
|
||||
$used_conf = !empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? 'MAIN_METEO_PERCENTAGE_LEVEL' : 'MAIN_METEO_LEVEL';
|
||||
|
||||
|
||||
$level0=$offset; if (! empty($conf->global->{$used_conf.'0'})) $level0=$conf->global->{$used_conf.'0'};
|
||||
$level1=$offset+1*$factor; if (! empty($conf->global->{$used_conf.'1'})) $level1=$conf->global->{$used_conf.'1'};
|
||||
$level2=$offset+2*$factor; if (! empty($conf->global->{$used_conf.'2'})) $level2=$conf->global->{$used_conf.'2'};
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ CREATE TABLE llx_website
|
|||
entity integer DEFAULT 1,
|
||||
ref varchar(128) NOT NULL,
|
||||
description varchar(255),
|
||||
status integer,
|
||||
status integer DEFAULT 1,
|
||||
fk_default_home integer,
|
||||
virtualhost varchar(255),
|
||||
fk_user_create integer,
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ class Website extends CommonObject
|
|||
$sql.= 'date_creation,';
|
||||
$sql.= 'tms';
|
||||
$sql .= ') VALUES (';
|
||||
$sql .= ' '.(! isset($this->entity)?'NULL':$this->entity).',';
|
||||
$sql .= ' '.((empty($this->entity) && $this->entity != '0')?'NULL':$this->entity).',';
|
||||
$sql .= ' '.(! isset($this->ref)?'NULL':"'".$this->db->escape($this->ref)."'").',';
|
||||
$sql .= ' '.(! isset($this->description)?'NULL':"'".$this->db->escape($this->description)."'").',';
|
||||
$sql .= ' '.(! isset($this->status)?'NULL':$this->status).',';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user