Qual: Removed deprecated functions

This commit is contained in:
Laurent Destailleur 2011-12-12 01:39:55 +01:00
parent 1fdbb6695a
commit 55bce13bfb
5 changed files with 11 additions and 61 deletions

View File

@ -755,7 +755,7 @@ else // View by day
if ($today) $style='cal_today';
$timestamp=dol_mktime(12,0,0,$month,$day,$year);
$arraytimestamp=adodb_getdate(dol_mktime(12,0,0,$month,$day,$year));
$arraytimestamp=dol_getdate($timestamp);
echo '<table width="100%" class="nocellnopadd">';
echo ' <tr class="liste_titre">';
echo ' <td align="center">'.$langs->trans("Day".$arraytimestamp['wday'])."</td>\n";

View File

@ -163,21 +163,6 @@ if ($socid) $sql.= " AND f.fk_soc = ".$socid;
$sql.= " GROUP BY s.nom, s.rowid";
$sql.= " ORDER BY s.nom";
/*
print dol_print_date($date_end,'dayhour',true).'<br>';
print $db->idate($date_end).'<br>';
print adodb_get_gmt_diff();
print adodb_date('Y-d-m H:i',$date_end,true).'<br>';
print adodb_date('Y-d-m H:i',$date_end,false).'<br>';
$date_end=0;
print dol_print_date($date_end,'dayhour',true).'<br>';
print $db->idate($date_end).'<br>';
print adodb_gmstrftime('%Y-%d-%m %H:%M',$date_end).'<br>';
print $sql;
*/
dol_syslog("get customer invoices sql=".$sql);
$result = $db->query($sql);
if ($result) {

View File

@ -22,7 +22,7 @@
/**
* \file htdocs/core/datepicker.php
* \brief Fichier de gestion de la popup de selection de date eldy
* \brief File to manage popup date selector
*/
if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
@ -124,7 +124,8 @@ function xyzToUnixTimestamp($mysqldate){
return $unixtimestamp;
}
function displayBox($selectedDate,$month,$year){
function displayBox($selectedDate,$month,$year)
{
global $langs,$conf;
//print "$selectedDate,$month,$year";
@ -135,7 +136,7 @@ function displayBox($selectedDate,$month,$year){
if($selectedDate != "00000000")
{
$selDate=xyzToUnixTimestamp($selectedDate);
$xyz=dol_date("Ymd",$selDate);
$xyz=dol_print_date($selDate,"%Y%m%d");
}
else
{
@ -148,7 +149,7 @@ function displayBox($selectedDate,$month,$year){
<td colspan="6" class="dpHead"><?php
$selectMonth = dol_print_date($thedate, '%m');
$selectYear = dol_print_date($thedate, '%Y');
echo $langs->trans($selectMonth).", ".$selectYear;
echo $langs->trans("Month".$selectMonth).", ".$selectYear;
?></td>
<td class="dpHead">
<button type="button" class="dpInvisibleButtons" id="DPCancel"
@ -161,7 +162,7 @@ function displayBox($selectedDate,$month,$year){
<td class="dpButtons"
onClick="loadMonth('<?php echo DOL_URL_ROOT.'/core/' ?>','<?php if($month==1) echo "12"; else echo $month-1?>','<?php if($month==1) echo $year-1; else echo $year?>','<?php echo $xyz ?>','<?php echo $langs->defaultlang ?>')">&lt;</td>
<td colspan="3" class="dpButtons"
onClick="loadMonth('<?php echo DOL_URL_ROOT.'/core/' ?>','<?php echo dol_date('m',$today)?>','<?php echo $todayArray["year"]?>','<?php echo $xyz ?>','<?php echo $langs->defaultlang ?>')"><?php echo '-' ?></td>
onClick="loadMonth('<?php echo DOL_URL_ROOT.'/core/' ?>','<?php echo (int) dol_print_date($today,'%m')?>','<?php echo $todayArray["year"]?>','<?php echo $xyz ?>','<?php echo $langs->defaultlang ?>')"><?php echo '-' ?></td>
<td class="dpButtons"
onClick="loadMonth('<?php echo DOL_URL_ROOT.'/core/' ?>','<?php if($month==12) echo "1"; else echo $month+1?>','<?php if($month==12) echo $year+1; else echo $year;?>','<?php echo $xyz ?>','<?php echo $langs->defaultlang ?>')">&gt;</td>
<td class="dpButtons"
@ -217,8 +218,8 @@ function displayBox($selectedDate,$month,$year){
// Sur click dans calendrier, appelle fonction dpClickDay
echo "<TD class=\"".$dayclass."\"";
echo " onMouseOver=\"dpHighlightDay(".$mydate["year"].",".dol_date("n",$thedate).",".$mydate["mday"].",tradMonths)\"";
echo " onClick=\"dpClickDay(".$mydate["year"].",".dol_date("n",$thedate).",".$mydate["mday"].",'".$langs->trans("FormatDateShortJava")."')\"";
echo " onMouseOver=\"dpHighlightDay(".$mydate["year"].",".dol_print_date($thedate,"%m").",".$mydate["mday"].",tradMonths)\"";
echo " onClick=\"dpClickDay(".$mydate["year"].",".dol_print_date($thedate,"%m").",".$mydate["mday"].",'".$langs->trans("FormatDateShortJava")."')\"";
echo ">".sprintf("%02s",$mydate["mday"])."</TD>";
$cols++;
@ -249,7 +250,7 @@ function displayBox($selectedDate,$month,$year){
if($selDate)
{
$tempDate=dol_getdate($selDate);
print $langs->trans($selectMonth)." ";
print $langs->trans("Month".$selectMonth)." ";
print sprintf("%02s",$tempDate["mday"]);
print ", ".$selectYear;
}

View File

@ -1085,41 +1085,6 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1,$
}
/* For backward compatibility */
function dolibarr_date($fmt, $timestamp, $gm=false)
{
return dol_date($fmt, $timestamp, $gm);
}
/**
* Returns formated date
*
* @param string $fmt Format (Exemple: 'Y-m-d H:i:s')
* @param timestamp $timestamp Date. Example: If timestamp=0 and gm=1, return 01/01/1970 00:00:00
* @param boolean $gm 1 if timestamp was built with gmmktime, 0 if timestamp was build with mktime
* @return string Formated date
*
* @deprecated Replaced by dol_print_date
*/
function dol_date($fmt, $timestamp, $gm=false)
{
$usealternatemethod=false;
if ($timestamp <= 0) $usealternatemethod=true;
if ($timestamp >= 2145913200) $usealternatemethod=true;
if ($usealternatemethod || $gm) // Si time gm, seule adodb peut convertir
{
$string=adodb_date($fmt,$timestamp,$gm);
}
else
{
$string=date($fmt,$timestamp);
}
return $string;
}
/**
* Return string with formated size
*

View File

@ -571,11 +571,10 @@ if ($user->admin && empty($conf->global->MAIN_REMOVE_INSTALL_WARNING))
}
}
llxFooter();
$db->close();
llxFooter();
/**
* Show weather logo. Logo to show depends on $totallate and values for