@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $title = $langs->trans("Search"); |
| 71 | 71 | |
| 72 | 72 | // URL http://mydolibarr/core/search_page?dol_use_jmobile=1 can be used for tests |
| 73 | -$head = '<!-- Quick access -->'."\n"; // This is used by DoliDroid to know page is a search page |
|
| 73 | +$head = '<!-- Quick access -->'."\n"; // This is used by DoliDroid to know page is a search page |
|
| 74 | 74 | $arrayofjs = array(); |
| 75 | 75 | $arrayofcss = array(); |
| 76 | 76 | top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | $accesskey = ''; |
| 112 | 112 | if (empty($accesskeyalreadyassigned[$val['label'][0]])) { |
| 113 | - $accesskey = $val['label'][0]; // First char of string |
|
| 113 | + $accesskey = $val['label'][0]; // First char of string |
|
| 114 | 114 | $accesskeyalreadyassigned[$accesskey] = $accesskey; |
| 115 | 115 | } |
| 116 | 116 | |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | */ |
| 77 | 77 | function decodeHttpBasicAuth($value) |
| 78 | 78 | { |
| 79 | - $encoded_basic_auth = substr($value, 6); // Remove the "Basic " string |
|
| 79 | + $encoded_basic_auth = substr($value, 6); // Remove the "Basic " string |
|
| 80 | 80 | $decoded_basic_auth = base64_decode($encoded_basic_auth); |
| 81 | 81 | $credentials_basic_auth = explode(':', $decoded_basic_auth); |
| 82 | 82 | |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | print $langs->trans("Text"); |
| 289 | 289 | print '</td><td>'; |
| 290 | 290 | require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
| 291 | - $extendededitor = 0; // We force no WYSIWYG editor |
|
| 291 | + $extendededitor = 0; // We force no WYSIWYG editor |
|
| 292 | 292 | $doleditor = new DolEditor('USER_PUBLIC_MORE', getDolUserString('USER_PUBLIC_MORE', '', $object), '', 160, 'dolibarr_notes', '', false, false, $extendededitor, ROWS_5, '90%'); |
| 293 | 293 | $doleditor->Create(); |
| 294 | 294 | print "</td></tr>\n"; |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | |
| 303 | 303 | print '<br>'; |
| 304 | 304 | |
| 305 | - print '</div>'; // End hide/show |
|
| 305 | + print '</div>'; // End hide/show |
|
| 306 | 306 | |
| 307 | 307 | print '<br>'; |
| 308 | 308 | |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | */ |
| 19 | 19 | class Bbb |
| 20 | 20 | { |
| 21 | - const BBB='bbb'; |
|
| 21 | + const BBB = 'bbb'; |
|
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * do |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | { |
| 30 | 30 | global $globalaaa, $globalbbb; |
| 31 | 31 | echo 'dobbb'."\n"; |
| 32 | - $globalaaa.='+bbb'; |
|
| 33 | - $globalbbb.='+bbb'; |
|
| 32 | + $globalaaa .= '+bbb'; |
|
| 33 | + $globalbbb .= '+bbb'; |
|
| 34 | 34 | } |
| 35 | 35 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | class Aaa |
| 22 | 22 | { |
| 23 | - const AAA='aaa'; |
|
| 23 | + const AAA = 'aaa'; |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * do |
@@ -65,11 +65,11 @@ |
||
| 65 | 65 | - To convert pfx certificate to pem: openssl pkcs12 -in tcpdf.pfx -out tcpdf.crt -nodes |
| 66 | 66 | |
| 67 | 67 | */ |
| 68 | -$permissions=array('copy'); |
|
| 69 | -$user_pass='aaa'; |
|
| 70 | -$owner_pass=null; |
|
| 71 | -$mode=0; |
|
| 72 | -$pubkeys=null; |
|
| 68 | +$permissions = array('copy'); |
|
| 69 | +$user_pass = 'aaa'; |
|
| 70 | +$owner_pass = null; |
|
| 71 | +$mode = 0; |
|
| 72 | +$pubkeys = null; |
|
| 73 | 73 | $pdf->SetProtection($permissions, $user_pass, $owner_pass, $mode, $pubkeys); |
| 74 | 74 | |
| 75 | 75 | // Example with public-key |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | $sapi_type = php_sapi_name(); |
| 30 | 30 | $script_file = basename(__FILE__); |
| 31 | -$path=dirname(__FILE__).'/'; |
|
| 31 | +$path = dirname(__FILE__).'/'; |
|
| 32 | 32 | |
| 33 | 33 | // Test if batch mode |
| 34 | 34 | if (substr($sapi_type, 0, 3) == 'cgi') { |
@@ -45,17 +45,17 @@ discard block |
||
| 45 | 45 | $langs->load("main"); |
| 46 | 46 | |
| 47 | 47 | // Global variables |
| 48 | -$version='1.14'; |
|
| 49 | -$error=0; |
|
| 48 | +$version = '1.14'; |
|
| 49 | +$error = 0; |
|
| 50 | 50 | |
| 51 | 51 | |
| 52 | 52 | // -------------------- START OF YOUR CODE HERE -------------------- |
| 53 | 53 | @set_time_limit(0); |
| 54 | 54 | print "***** ".$script_file." (".$version.") *****\n"; |
| 55 | -$dir=DOL_DOCUMENT_ROOT."/langs"; |
|
| 55 | +$dir = DOL_DOCUMENT_ROOT."/langs"; |
|
| 56 | 56 | |
| 57 | 57 | // Check parameters |
| 58 | -if (! isset($argv[3])) { |
|
| 58 | +if (!isset($argv[3])) { |
|
| 59 | 59 | print "Usage: ".$script_file." lang_code_src lang_code_dest|all APIKEY [langfile.lang]\n"; |
| 60 | 60 | print "Example: ".$script_file." en_US pt_PT 123456\n"; |
| 61 | 61 | print "Rem: lang_code to use can be found on https://translate.google.com\n"; |
@@ -66,18 +66,18 @@ discard block |
||
| 66 | 66 | print 'Argument 1='.$argv[1]."\n"; |
| 67 | 67 | print 'Argument 2='.$argv[2]."\n"; |
| 68 | 68 | print 'Argument 3='.$argv[3]."\n"; |
| 69 | -$file=''; |
|
| 69 | +$file = ''; |
|
| 70 | 70 | if (isset($argv[4])) { |
| 71 | - $file=$argv[4]; |
|
| 71 | + $file = $argv[4]; |
|
| 72 | 72 | print 'Argument 4='.$argv[4]."\n"; |
| 73 | 73 | } |
| 74 | 74 | print 'Files will be generated/updated in directory '.$dir."\n"; |
| 75 | 75 | |
| 76 | 76 | if ($argv[2] != 'all') { |
| 77 | - if (! is_dir($dir.'/'.$argv[2])) { |
|
| 77 | + if (!is_dir($dir.'/'.$argv[2])) { |
|
| 78 | 78 | print 'Create directory '.$dir.'/'.$argv[2]."\n"; |
| 79 | - $result=mkdir($dir.'/'.$argv[2]); |
|
| 80 | - if (! $result) { |
|
| 79 | + $result = mkdir($dir.'/'.$argv[2]); |
|
| 80 | + if (!$result) { |
|
| 81 | 81 | $db->close(); |
| 82 | 82 | return -1; |
| 83 | 83 | } |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | } |
| 95 | 95 | $result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission |
| 96 | 96 | |
| 97 | -$permissiontoadd = $user->hasRight('societe', 'contact', 'creer'); // Used by the include of actions_dellink.inc.php |
|
| 97 | +$permissiontoadd = $user->hasRight('societe', 'contact', 'creer'); // Used by the include of actions_dellink.inc.php |
|
| 98 | 98 | |
| 99 | 99 | |
| 100 | 100 | /* |
@@ -134,15 +134,15 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | foreach ($object->multilangs as $key => $value) { // enregistrement des nouvelles valeurs dans l'objet |
| 136 | 136 | if ($key == $current_lang) { |
| 137 | - $object->label = GETPOST("libelle-" . $key); |
|
| 138 | - $object->description = dol_htmlcleanlastbr(GETPOST("desc-" . $key, 'restricthtml')); |
|
| 139 | - $object->other = dol_htmlcleanlastbr(GETPOST("other-" . $key, 'restricthtml')); |
|
| 137 | + $object->label = GETPOST("libelle-".$key); |
|
| 138 | + $object->description = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml')); |
|
| 139 | + $object->other = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml')); |
|
| 140 | 140 | |
| 141 | 141 | $object->update($object->id, $user); |
| 142 | 142 | } else { |
| 143 | - $object->multilangs[$key]["label"] = GETPOST("libelle-" . $key); |
|
| 144 | - $object->multilangs[$key]["description"] = dol_htmlcleanlastbr(GETPOST("desc-" . $key, 'restricthtml')); |
|
| 145 | - $object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-" . $key, 'restricthtml')); |
|
| 143 | + $object->multilangs[$key]["label"] = GETPOST("libelle-".$key); |
|
| 144 | + $object->multilangs[$key]["description"] = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml')); |
|
| 145 | + $object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml')); |
|
| 146 | 146 | } |
| 147 | 147 | } |
| 148 | 148 | |
@@ -235,9 +235,9 @@ discard block |
||
| 235 | 235 | if (empty($reshook)) { |
| 236 | 236 | if ($action == '') { |
| 237 | 237 | if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) { |
| 238 | - print '<a class="butAction" href="' . DOL_URL_ROOT . '/product/traduction.php?action=add&token='.newToken().'&id=' . $object->id . '">' . $langs->trans("Add") . '</a>'; |
|
| 238 | + print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/traduction.php?action=add&token='.newToken().'&id='.$object->id.'">'.$langs->trans("Add").'</a>'; |
|
| 239 | 239 | if ($cnt_trans > 0) { |
| 240 | - print '<a class="butAction" href="' . DOL_URL_ROOT . '/product/traduction.php?action=edit&token='.newToken().'&id=' . $object->id . '">' . $langs->trans("Modify") . '</a>'; |
|
| 240 | + print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/traduction.php?action=edit&token='.newToken().'&id='.$object->id.'">'.$langs->trans("Modify").'</a>'; |
|
| 241 | 241 | } |
| 242 | 242 | } |
| 243 | 243 | } |