Skip to content

Commit

Permalink
Add cache excel export on harddrive with
Browse files Browse the repository at this point in the history
MAIN_USE_FILECACHE_EXPORT_EXCEL_DIR const. It can avoid lot's of stack
overflow on large excel export
  • Loading branch information
FHenry committed Sep 29, 2014
2 parents 3bc227b + f233d4f commit ce145cc
Show file tree
Hide file tree
Showing 143 changed files with 1,168 additions and 724 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -110,6 +110,7 @@ For developers:
- New: Added hook "formConfirm" and "doActions" for supplier invoice card.
- New: [ task #1511, #1426 ] Added hook "doActions" for supplier card and supplier order card.
- New: renamed table llx_c_pays to llx_c_country & libelle field to label.
- New: Added hook "formConfirm" and "doActions" for fichinter card
- Qual: Renamed table llx_c_civilite into llx_c_civility,
field civilite into label in the same table,
and field civilite into civility in other table.
Expand Down
7 changes: 7 additions & 0 deletions build/debian/changelog
@@ -1,3 +1,10 @@
dolibarr (3.6.1-3) unstable; urgency=low

[ Laurent Destailleur (eldy) ]
* New upstream release.

-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 23 Sep 2014 12:00:00 +0100

dolibarr (3.6.0-3) unstable; urgency=low

[ Laurent Destailleur (eldy) ]
Expand Down
4 changes: 2 additions & 2 deletions build/exe/doliwamp/doliwamp.iss
Expand Up @@ -17,9 +17,9 @@
; ----- Change this -----
AppName=DoliWamp
; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
AppVerName=DoliWamp-3.6.0
AppVerName=DoliWamp-3.6.1
; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
OutputBaseFilename=DoliWamp-3.6.0
OutputBaseFilename=DoliWamp-3.6.1
; ----- End of change
;OutputManifestFile=build\doliwampbuild.log
; Define full path from which all relative path are defined
Expand Down
21 changes: 13 additions & 8 deletions build/makepack-dolibarr.pl
Expand Up @@ -460,8 +460,8 @@
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.33`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-20100919`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/savant`;
Expand Down Expand Up @@ -610,23 +610,20 @@

print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";

#print "Create directory $RPMDIR\n";
#$ret=`mkdir -p "$RPMDIR"`;

print "Remove target ".$FILENAMERPM."...\n";
unlink("$NEWDESTI/".$FILENAMERPM);
print "Remove target ".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm...\n";
unlink("$NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm");

print "Create directory $BUILDROOT/$FILENAMETGZ2\n";
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2`;

print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$FILENAMETGZ2\n";
$cmd="cp -pr '$BUILDROOT/$PROJECT' '$BUILDROOT/$FILENAMETGZ2'";
$ret=`$cmd`;

# Set owners
#print "Set owners on files/dir\n";
#$ret=`chown -R root.root $BUILDROOT/$FILENAMETGZ2`;
# Removed files we don't need
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/htdocs/includes/ckeditor/_source`;

print "Set permissions on files/dir\n";
$ret=`chmod -R 755 $BUILDROOT/$FILENAMETGZ2`;
Expand Down Expand Up @@ -747,10 +744,18 @@
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/rpm`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/zip`;
# Removed duplicate license files
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source/LICENSE.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source/plugins/scayt/LICENSE.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source/plugins/wsc/LICENSE.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/LICENSE.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/plugins/scayt/LICENSE.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/plugins/wsc/LICENSE.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/flot/LICENSE.txt`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.34/LICENSE`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tcpdf/fonts/freefont-20120503/COPYING`;
# Removed files we don't need
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source`;

# Rename upstream changelog to match debian rules
$ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`;

Expand Down
3 changes: 1 addition & 2 deletions build/makepack-howto.txt
Expand Up @@ -36,14 +36,13 @@ complete release of Dolibarr, step by step.
- Update version number with x.y.z in build/exe/doliwamp/doliwamp.iss
- Update version number with x.y.z in build/rpm/*.spec
- Commit all changes.
- Add a Tag (x.y.z)

- Build Dolibarr and DoliWamp packages with makepack-dolibarr.pl
- Check content of built packages.
- Move build files into www.dolibarr.org web site
(/home/dolibarr/wwwroot/files/stable).
- Run makepack-dolibarr.pl again with option to publish files on
sourceforge.
sourceforge. This will also add official tag.
- Edit symbolic links in directory "/home/dolibarr/wwwroot/files/stable/xxx"
on server to point to new files (used by some web sites).

Expand Down
3 changes: 3 additions & 0 deletions build/rpm/dolibarr_fedora.spec
Expand Up @@ -333,6 +333,9 @@ fi

# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
%changelog
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
- Upstream release

* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
- Upstream release

Expand Down
3 changes: 3 additions & 0 deletions build/rpm/dolibarr_generic.spec
Expand Up @@ -569,6 +569,9 @@ fi

# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
%changelog
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
- Upstream release

* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
- Upstream release

Expand Down
3 changes: 3 additions & 0 deletions build/rpm/dolibarr_mandriva.spec
Expand Up @@ -338,6 +338,9 @@ fi

# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
%changelog
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
- Upstream release

* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
- Upstream release

Expand Down
3 changes: 3 additions & 0 deletions build/rpm/dolibarr_opensuse.spec
Expand Up @@ -349,6 +349,9 @@ fi

# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
%changelog
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
- Upstream release

* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
- Upstream release

Expand Down
18 changes: 10 additions & 8 deletions dev/skeletons/skeleton_page.php
Expand Up @@ -114,8 +114,8 @@
}
{
// Creation KO
if (! empty($object->errors)) setEventMessage($object->errors, 'errors');
else setEventMessage($object->error, 'errors');
if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors');
else setEventMessages($object->error, null, 'errors');
$action='create';
}
}
Expand All @@ -139,7 +139,7 @@
if (empty($object->ref))
{
$error++;
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")),'errors');
setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")),null,'errors');
}

if (! $error)
Expand All @@ -152,8 +152,8 @@
else
{
// Creation KO
if (! empty($object->errors)) setEventMessage($object->errors, 'errors');
else setEventMessage($object->error, 'errors');
if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors');
else setEventMessages($object->error, null, 'errors');
$action='edit';
}
}
Expand All @@ -170,14 +170,14 @@
if ($result > 0)
{
// Delete OK
setEventMessage($langs->trans("RecordDeleted"));
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
header("Location: ".dol_buildpath('/buildingmanagement/list.php',1));
exit;
}
else
{
if (! empty($object->errors)) setEventMessage($object->errors,'errors');
else setEventMessage($object->error,'errors');
if (! empty($object->errors)) setEventMessages(null,$object->errors,'errors');
else setEventMessages($object->error,null,'errors');
}
}

Expand Down Expand Up @@ -327,6 +327,8 @@ function init_myfunc()
print '<div class="tabsAction">'."\n";
$parameters=array();
$reshook=$hookmanager->executeHooks('addMoreActionsButtons',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');

if (empty($reshook))
{
if ($user->rights->mymodule->write)
Expand Down
20 changes: 19 additions & 1 deletion htdocs/adherents/agenda.php
Expand Up @@ -44,6 +44,8 @@
$result=$object->fetch($id);
if ($result > 0)
{
$object->fetch_thirdparty();

$adht = new AdherentType($db);
$result=$adht->fetch($object->typeid);
}
Expand Down Expand Up @@ -146,7 +148,23 @@

print '<br>';

print load_fiche_titre($langs->trans("ActionsOnMember"),'','');
$out='';

/*$objthirdparty=$object->thirdparty;
$objcon=new stdClass();
$permok=$user->rights->agenda->myactions->create;
if ((! empty($objthirdparty->id) || ! empty($objcon->id)) && $permok)
{
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create';
if (get_class($objthirdparty) == 'Societe') $out.='&amp;socid='.$objthirdparty->id;
$out.=(! empty($objcon->id)?'&amp;contactid='.$objcon->id:'').'&amp;backtopage=1&amp;percentage=-1">';
$out.=$langs->trans("AddAnAction").' ';
$out.=img_picto($langs->trans("AddAnAction"),'filenew');
$out.="</a>";
}*/

print load_fiche_titre($langs->trans("ActionsOnMember"),$out,'');

// List of todo actions
show_actions_todo($conf,$langs,$db,$object);
Expand Down
4 changes: 2 additions & 2 deletions htdocs/adherents/canvas/actions_adherentcard_common.class.php
Expand Up @@ -94,7 +94,7 @@ function getObject($id)
/**
* Load data control
*
* @param string &$action Type of action
* @param string $action Type of action
* @param int $id Id of object
* @return void
*/
Expand Down Expand Up @@ -228,7 +228,7 @@ function doActions(&$action, $id)
/**
* Set content of ->tpl array, to use into template
*
* @param string &$action Type of action
* @param string $action Type of action
* @param int $id Id
* @return string HTML output
*/
Expand Down
Expand Up @@ -76,7 +76,7 @@ private function getTitle($action)
/**
* Assign custom values for canvas
*
* @param string &$action Type of action
* @param string $action Type of action
* @param int $id Id
* @return void
*/
Expand Down
1 change: 1 addition & 0 deletions htdocs/adherents/card.php
Expand Up @@ -117,6 +117,7 @@

$parameters=array('rowid'=>$rowid, 'objcanvas'=>$objcanvas);
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');

if ($action == 'setuserid' && ($user->rights->user->self->creer || $user->rights->user->user->creer))
{
Expand Down
39 changes: 30 additions & 9 deletions htdocs/admin/commande.php
Expand Up @@ -4,7 +4,7 @@
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
Expand Down Expand Up @@ -117,6 +117,35 @@
}
}

// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...)
if ($action == 'setModuleOptions')
{
$post_size=count($_POST);

$db->begin();

for($i=0;$i < $post_size;$i++)
{
if (array_key_exists('param'.$i,$_POST))
{
$param=GETPOST("param".$i,'alpha');
$value=GETPOST("value".$i,'alpha');
if ($param) $res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
}
}
if (! $error)
{
$db->commit();
setEventMessage($langs->trans("SetupSaved"));
}
else
{
$db->rollback();
setEventMessage($langs->trans("Error"),'errors');
}
}

// Activate a model
if ($action == 'set')
{
Expand Down Expand Up @@ -192,14 +221,6 @@
setEventMessage($langs->trans("Error"),'errors');
}
}
else if ($action=='setModuleOptions') {
if (dolibarr_set_const($db, "COMMANDE_ADDON_PDF_ODT_PATH",GETPOST('value1'),'chaine',0,'',$conf->entity))
{
// La constante qui a ete lue en avant du nouveau set
// on passe donc par une variable pour avoir un affichage coherent
$conf->global->COMMANDE_ADDON_PDF_ODT_PATH = GETPOST('value1');
}
}


/*
Expand Down
35 changes: 32 additions & 3 deletions htdocs/admin/contract.php
Expand Up @@ -35,8 +35,9 @@

$action = GETPOST('action','alpha');
$value = GETPOST('value','alpha');
$label = GETPOST('label','alpha');
$scandir = GETPOST('scandir','alpha');
$type='contrat';
$type='contract';

if (empty($conf->global->CONTRACT_ADDON))
{
Expand Down Expand Up @@ -111,6 +112,35 @@
}
}

// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...)
if ($action == 'setModuleOptions')
{
$post_size=count($_POST);

$db->begin();

for($i=0;$i < $post_size;$i++)
{
if (array_key_exists('param'.$i,$_POST))
{
$param=GETPOST("param".$i,'alpha');
$value=GETPOST("value".$i,'alpha');
if ($param) $res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
}
}
if (! $error)
{
$db->commit();
setEventMessage($langs->trans("SetupSaved"));
}
else
{
$db->rollback();
setEventMessage($langs->trans("Error"),'errors');
}
}

// Activate a model
else if ($action == 'set')
{
Expand Down Expand Up @@ -192,7 +222,7 @@
*/

$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);

llxHeader();

$form=new Form($db);
Expand Down Expand Up @@ -318,7 +348,6 @@
print_titre($langs->trans("TemplatePDFContracts"));

// Defini tableau def des modeles
$type='contrat';
$def = array();
$sql = "SELECT nom";
$sql.= " FROM ".MAIN_DB_PREFIX."document_model";
Expand Down

0 comments on commit ce145cc

Please sign in to comment.