[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 142/151: Doc : complete documentation
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 142/151: Doc : complete documentation |
Date: |
Sat, 4 Feb 2017 17:14:35 +0000 (UTC) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 4c4128d619e06b53167f3052abdb47400862e3eb
Author: Dany De Bontridder <address@hidden>
Date: Sat Jan 28 09:40:12 2017 +0100
Doc : complete documentation
---
include/class/class_document.php | 37 ++++++++++++++++++++++---------------
1 file changed, 22 insertions(+), 15 deletions(-)
diff --git a/include/class/class_document.php b/include/class/class_document.php
index d3a544c..1ab9fee 100644
--- a/include/class/class_document.php
+++ b/include/class/class_document.php
@@ -63,25 +63,32 @@ class Document
$this->db->exec_sql($sql);
}
- function compute_filename($pj,$filename)
- {
- foreach (array('/','*','<','>',';',',','\\','.',':') as $i) {
- $pj= str_replace($i, "-",$pj);
- }
- // save the suffix
- $pos_prefix=strrpos($filename,".");
- if ($pos_prefix == 0) $pos_prefix=strlen($filename);
- $filename_no=substr($filename,0,$pos_prefix);
- $filename_suff=substr($filename,$pos_prefix,strlen($filename));
- $new_filename= strtolower($filename_no."-".$pj.$filename_suff);
- return $new_filename;
- }
+ /**
+ * Insert the receipt number into the filename , each generated file
+ * will have the name of the template (model) + receipt number)
+ * @param type $pj the receipt number
+ * @param type $filename the name of the file
+ * @return string
+ */
+ function compute_filename($pj,$filename)
+ {
+ foreach (array('/','*','<','>',';',',','\\','.',':','(',')','
','[',']') as $i) {
+ $pj= str_replace($i, "-",$pj);
+ }
+ // save the suffix
+ $pos_prefix=strrpos($filename,".");
+ if ($pos_prefix == 0) $pos_prefix=strlen($filename);
+ $filename_no=substr($filename,0,$pos_prefix);
+ $filename_suff=substr($filename,$pos_prefix,strlen($filename));
+ $new_filename= strtolower($filename_no."-".$pj.$filename_suff);
+ return $new_filename;
+ }
/*!
* \brief Generate the document, Call $this-\>Replace to replace
* tag by value
address@hidden p_array contains the data normally it is the $_POST
- address@hidden contains the new filename
- * \return an array : the url where the generated doc can be found, the
name
+ address@hidden $p_filename contains the new filename
+ * \return an string : the url where the generated doc can be found, the
name
* of the file and his mimetype
*/
function Generate($p_array,$p_filename="")
- [Noalyss-commit] [noalyss] 133/151: Correct Manage Table , finish implementing, (continued)
- [Noalyss-commit] [noalyss] 133/151: Correct Manage Table , finish implementing, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 03/151: CSS : Update style mobile, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 57/151: CSS : Update style mobile, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 117/151: Indent properly, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 89/151: remove debug info, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 114/151: Move class_table_sql to lib , since it is usable without Noalyss, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 127/151: Add the noalyss version in the info page, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 121/151: Fix several issue in JS, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 98/151: Correct simul.py remove old file, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 146/151: Merge branch 'master' of ns3:/srv/git/noalyss, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 142/151: Doc : complete documentation,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 119/151: correct syntax, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 151/151: Improve description, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 145/151: change name alternate_row_color, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 137/151: Remove console.log from JS Safer function for XML (problem with escaping), Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 122/151: Test ManageTable ; fix several bugs and add the ajax answer , it not yet finished, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 62/151: Experiment less, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 149/151: Correct doxygen, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 49/151: Remove unused documentation, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 100/151: Remove unused documentation, Dany De Bontridder, 2017/02/04