@@ -126,8 +126,8 @@ |
||
| 126 | 126 | public $usage_bill_time; // Is the time spent on project must be invoiced or not |
| 127 | 127 | |
| 128 | 128 | /** |
| 129 | - * @var integer Event organization: Use Event Organization |
|
| 130 | - */ |
|
| 129 | + * @var integer Event organization: Use Event Organization |
|
| 130 | + */ |
|
| 131 | 131 | public $usage_organize_event; |
| 132 | 132 | |
| 133 | 133 | /** |
@@ -916,7 +916,7 @@ |
||
| 916 | 916 | /** |
| 917 | 917 | * @var array $suffix2numAsked map HTTP query parameter suffixes (like '1_0') to line indices so that |
| 918 | 918 | * extrafields from HTTP query can be assigned to the correct dispatch line |
| 919 | - */ |
|
| 919 | + */ |
|
| 920 | 920 | $suffix2numAsked = array(); |
| 921 | 921 | $dispatchLines = array(); |
| 922 | 922 | |
@@ -156,7 +156,7 @@ |
||
| 156 | 156 | * $price Can be set to update AWP (Average Weighted Price) when you make a stock increase |
| 157 | 157 | * $dlc Eat-by date. Will be used if lot does not exists yet and will be created. |
| 158 | 158 | * $dluo Sell-by date. Will be used if lot does not exists yet and will be created. |
| 159 | - * |
|
| 159 | + * |
|
| 160 | 160 | * @param int $product_id Id product id {@min 1} {@from body} {@required true} |
| 161 | 161 | * @param int $warehouse_id Id warehouse {@min 1} {@from body} {@required true} |
| 162 | 162 | * @param float $qty Qty to add (Use negative value for a stock decrease) {@from body} {@required true} |
@@ -25,9 +25,11 @@ |
||
| 25 | 25 | * |
| 26 | 26 | * @return void |
| 27 | 27 | */ |
| 28 | - public function do() |
|
| 28 | + public function do { |
|
| 29 | + () |
|
| 29 | 30 | { |
| 30 | 31 | global $globalaaa, $globalbbb; |
| 32 | + } |
|
| 31 | 33 | echo 'dobbb'."\n"; |
| 32 | 34 | $globalaaa.='+bbb'; |
| 33 | 35 | $globalbbb.='+bbb'; |
@@ -27,8 +27,10 @@ |
||
| 27 | 27 | * |
| 28 | 28 | * @return void |
| 29 | 29 | */ |
| 30 | - public function do() |
|
| 30 | + public function do { |
|
| 31 | + () |
|
| 31 | 32 | { |
| 32 | 33 | echo 'doaaa'."\n"; |
| 33 | 34 | } |
| 35 | + } |
|
| 34 | 36 | } |
@@ -1,6 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // File generated to link to the master file - DO NOT MODIFY - It is just an include |
| 3 | 3 | if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { |
| 4 | - if (! defined('USEEXTERNALSERVER')) define('USEEXTERNALSERVER', 1); |
|
| 4 | + if (! defined('USEEXTERNALSERVER')) { |
|
| 5 | + define('USEEXTERNALSERVER', 1); |
|
| 6 | + } |
|
| 5 | 7 | require_once '/var/www/html/dolibarr_dev/htdocs/master.inc.php'; |
| 6 | 8 | } |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // File generated to link to the master file - DO NOT MODIFY - It is just an include |
| 3 | 3 | if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { |
| 4 | - if (! defined('USEEXTERNALSERVER')) define('USEEXTERNALSERVER', 1); |
|
| 5 | - require_once '/home/ldestailleur/git/dolibarr_dev/htdocs/master.inc.php'; |
|
| 4 | + if (! defined('USEEXTERNALSERVER')) define('USEEXTERNALSERVER', 1); |
|
| 5 | + require_once '/home/ldestailleur/git/dolibarr_dev/htdocs/master.inc.php'; |
|
| 6 | 6 | } |
| 7 | 7 | ?> |
@@ -1,7 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // File generated to link to the master file - DO NOT MODIFY - It is just an include |
| 3 | 3 | if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { |
| 4 | - if (! defined('USEEXTERNALSERVER')) define('USEEXTERNALSERVER', 1); |
|
| 4 | + if (! defined('USEEXTERNALSERVER')) { |
|
| 5 | + define('USEEXTERNALSERVER', 1); |
|
| 6 | + } |
|
| 5 | 7 | require_once '/home/ldestailleur/git/dolibarr_dev/htdocs/master.inc.php'; |
| 6 | 8 | } |
| 7 | 9 | ?> |
@@ -1,6 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // File generated to link to the master file - DO NOT MODIFY - It is just an include |
| 3 | 3 | if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { |
| 4 | - if (! defined('USEEXTERNALSERVER')) define('USEEXTERNALSERVER', 1); |
|
| 4 | + if (! defined('USEEXTERNALSERVER')) { |
|
| 5 | + define('USEEXTERNALSERVER', 1); |
|
| 6 | + } |
|
| 5 | 7 | require_once '/home/ldestailleur/git/dolibarr_dev/htdocs/master.inc.php'; |
| 6 | 8 | } |
@@ -1,7 +1,9 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | // BEGIN PHP File wrapper.php - DO NOT MODIFY - It is just a copy of file website/samples/wrapper.php |
| 3 | 3 | $websitekey = basename(__DIR__); |
| 4 | -if (strpos($_SERVER["PHP_SELF"], 'website/samples/wrapper.php')) die("Sample file for website module. Can be called directly."); |
|
| 4 | +if (strpos($_SERVER["PHP_SELF"], 'website/samples/wrapper.php')) { |
|
| 5 | + die("Sample file for website module. Can be called directly."); |
|
| 6 | +} |
|
| 5 | 7 | if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { require_once './master.inc.php'; } // Load master if not already loaded |
| 6 | 8 | include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; |
| 7 | 9 | |
@@ -17,7 +19,9 @@ discard block |
||
| 17 | 19 | |
| 18 | 20 | // Parameters for RSS |
| 19 | 21 | $rss = GETPOST('rss', 'aZ09'); |
| 20 | -if ($rss) $original_file = 'blog.rss'; |
|
| 22 | +if ($rss) { |
|
| 23 | + $original_file = 'blog.rss'; |
|
| 24 | +} |
|
| 21 | 25 | |
| 22 | 26 | // If we have a hash public (hashp), we guess the original_file. |
| 23 | 27 | if (!empty($hashp)) { |
@@ -52,14 +56,23 @@ discard block |
||
| 52 | 56 | |
| 53 | 57 | // Define attachment (attachment=true to force choice popup 'open'/'save as') |
| 54 | 58 | $attachment = true; |
| 55 | -if (preg_match('/\.(html|htm)$/i', $original_file)) $attachment = false; |
|
| 56 | -if (isset($_GET["attachment"])) $attachment = (GETPOST("attachment", 'alphanohtml') ? true : false); |
|
| 57 | -if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS_WEBSITE)) $attachment = false; |
|
| 59 | +if (preg_match('/\.(html|htm)$/i', $original_file)) { |
|
| 60 | + $attachment = false; |
|
| 61 | +} |
|
| 62 | +if (isset($_GET["attachment"])) { |
|
| 63 | + $attachment = (GETPOST("attachment", 'alphanohtml') ? true : false); |
|
| 64 | +} |
|
| 65 | +if (!empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS_WEBSITE)) { |
|
| 66 | + $attachment = false; |
|
| 67 | +} |
|
| 58 | 68 | |
| 59 | 69 | // Define mime type |
| 60 | 70 | $type = 'application/octet-stream'; |
| 61 | -if (GETPOSTISSET('type')) $type = GETPOST('type', 'alpha'); |
|
| 62 | -else $type = dol_mimetype($original_file); |
|
| 71 | +if (GETPOSTISSET('type')) { |
|
| 72 | + $type = GETPOST('type', 'alpha'); |
|
| 73 | +} else { |
|
| 74 | + $type = dol_mimetype($original_file); |
|
| 75 | +} |
|
| 63 | 76 | |
| 64 | 77 | // Security: Delete string ../ into $original_file |
| 65 | 78 | $original_file = str_replace("../", "/", $original_file); |
@@ -90,7 +103,9 @@ discard block |
||
| 90 | 103 | $website->fetch('', $websitekey); |
| 91 | 104 | |
| 92 | 105 | $filters = array('type_container'=>'blogpost'); |
| 93 | - if ($l) $filters['lang'] = $l; |
|
| 106 | + if ($l) { |
|
| 107 | + $filters['lang'] = $l; |
|
| 108 | + } |
|
| 94 | 109 | |
| 95 | 110 | $MAXNEWS = ($limit ? $limit : 20); |
| 96 | 111 | $arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', $MAXNEWS, 0, $filters); |
@@ -143,8 +158,9 @@ discard block |
||
| 143 | 158 | $result = build_rssfile($format, $title, $desc, $eventarray, $outputfiletmp, '', $website->virtualhost.'/wrapper.php?rss=1'.($l ? '&l='.$l : ''), $l); |
| 144 | 159 | |
| 145 | 160 | if ($result >= 0) { |
| 146 | - if (dol_move($outputfiletmp, $outputfile, 0, 1, 0, 0)) $result = 1; |
|
| 147 | - else { |
|
| 161 | + if (dol_move($outputfiletmp, $outputfile, 0, 1, 0, 0)) { |
|
| 162 | + $result = 1; |
|
| 163 | + } else { |
|
| 148 | 164 | $error = 'Failed to rename '.$outputfiletmp.' into '.$outputfile; |
| 149 | 165 | dol_syslog("build_exportfile ".$error, LOG_ERR); |
| 150 | 166 | dol_delete_file($outputfiletmp, 0, 1); |
@@ -162,26 +178,39 @@ discard block |
||
| 162 | 178 | |
| 163 | 179 | if ($result >= 0) { |
| 164 | 180 | $attachment = false; |
| 165 | - if (isset($_GET["attachment"])) $attachment = $_GET["attachment"]; |
|
| 181 | + if (isset($_GET["attachment"])) { |
|
| 182 | + $attachment = $_GET["attachment"]; |
|
| 183 | + } |
|
| 166 | 184 | //$attachment = false; |
| 167 | 185 | $contenttype = 'application/rss+xml'; |
| 168 | - if (isset($_GET["contenttype"])) $contenttype = $_GET["contenttype"]; |
|
| 186 | + if (isset($_GET["contenttype"])) { |
|
| 187 | + $contenttype = $_GET["contenttype"]; |
|
| 188 | + } |
|
| 169 | 189 | //$contenttype='text/plain'; |
| 170 | 190 | $outputencoding = 'UTF-8'; |
| 171 | 191 | |
| 172 | - if ($contenttype) header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); |
|
| 173 | - if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"'); |
|
| 192 | + if ($contenttype) { |
|
| 193 | + header('Content-Type: '.$contenttype.($outputencoding ? '; charset='.$outputencoding : '')); |
|
| 194 | + } |
|
| 195 | + if ($attachment) { |
|
| 196 | + header('Content-Disposition: attachment; filename="'.$filename.'"'); |
|
| 197 | + } |
|
| 174 | 198 | |
| 175 | 199 | // Ajout directives pour resoudre bug IE |
| 176 | 200 | //header('Cache-Control: Public, must-revalidate'); |
| 177 | 201 | //header('Pragma: public'); |
| 178 | - if ($cachedelay) header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); |
|
| 179 | - else header('Cache-Control: private, must-revalidate'); |
|
| 202 | + if ($cachedelay) { |
|
| 203 | + header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate'); |
|
| 204 | + } else { |
|
| 205 | + header('Cache-Control: private, must-revalidate'); |
|
| 206 | + } |
|
| 180 | 207 | |
| 181 | 208 | // Clean parameters |
| 182 | 209 | $outputfile = $dir_temp.'/'.$filename; |
| 183 | 210 | $result = readfile($outputfile); |
| 184 | - if (!$result) print 'File '.$outputfile.' was empty.'; |
|
| 211 | + if (!$result) { |
|
| 212 | + print 'File '.$outputfile.' was empty.'; |
|
| 213 | + } |
|
| 185 | 214 | |
| 186 | 215 | // header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename)); |
| 187 | 216 | exit; |
@@ -227,13 +256,20 @@ discard block |
||
| 227 | 256 | //top_httphead($type); |
| 228 | 257 | header('Content-Type: '.$type); |
| 229 | 258 | header('Content-Description: File Transfer'); |
| 230 | - if ($encoding) header('Content-Encoding: '.$encoding); |
|
| 259 | + if ($encoding) { |
|
| 260 | + header('Content-Encoding: '.$encoding); |
|
| 261 | + } |
|
| 231 | 262 | // Add MIME Content-Disposition from RFC 2183 (inline=automatically displayed, attachment=need user action to open) |
| 232 | - if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"'); |
|
| 233 | - else header('Content-Disposition: inline; filename="'.$filename.'"'); |
|
| 263 | + if ($attachment) { |
|
| 264 | + header('Content-Disposition: attachment; filename="'.$filename.'"'); |
|
| 265 | + } else { |
|
| 266 | + header('Content-Disposition: inline; filename="'.$filename.'"'); |
|
| 267 | + } |
|
| 234 | 268 | header('Content-Length: '.dol_filesize($fullpath_original_file)); |
| 235 | 269 | |
| 236 | 270 | readfile($fullpath_original_file_osencoded); |
| 237 | 271 | } |
| 238 | -if (is_object($db)) $db->close(); |
|
| 272 | +if (is_object($db)) { |
|
| 273 | + $db->close(); |
|
| 274 | +} |
|
| 239 | 275 | // END PHP |