diff --git a/htdocs/boutique/client/class/boutiqueclient.class.php b/htdocs/boutique/client/class/boutiqueclient.class.php index 027a8bd4a67..3f7b7c67d05 100644 --- a/htdocs/boutique/client/class/boutiqueclient.class.php +++ b/htdocs/boutique/client/class/boutiqueclient.class.php @@ -49,7 +49,7 @@ class BoutiqueClient $sql = "SELECT customers_id, customers_lastname, customers_firstname FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."customers WHERE customers_id = ".$id; - $resql = $this->db->query($sql) ; + $resql = $this->db->query($sql); if ( $resql ) { $result = $this->db->fetch_array($resql); diff --git a/htdocs/boutique/commande/class/boutiquecommande.class.php b/htdocs/boutique/commande/class/boutiquecommande.class.php index 8ffedf25e59..25ee3b0fad1 100644 --- a/htdocs/boutique/commande/class/boutiquecommande.class.php +++ b/htdocs/boutique/commande/class/boutiquecommande.class.php @@ -63,7 +63,7 @@ class BoutiqueCommande $sql.= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders"; $sql.= " WHERE orders_id = ".$id; - $result = $this->db->query($sql) ; + $result = $this->db->query($sql); if ( $result ) { $array = $this->db->fetch_array($result); diff --git a/htdocs/boutique/critiques/class/critique.class.php b/htdocs/boutique/critiques/class/critique.class.php index c05e324003c..d15471de94e 100644 --- a/htdocs/boutique/critiques/class/critique.class.php +++ b/htdocs/boutique/critiques/class/critique.class.php @@ -53,7 +53,7 @@ class Critique { $sql .= " AND p.language_id = ".$conf->global->OSC_LANGUAGE_ID. " AND d.languages_id=".$conf->global->OSC_LANGUAGE_ID; $sql .= " AND r.reviews_id=$id"; - $result = $this->db->query($sql) ; + $result = $this->db->query($sql); if ( $result ) { diff --git a/htdocs/boutique/promotion/class/promotion.class.php b/htdocs/boutique/promotion/class/promotion.class.php index 42418586f64..6ec86cec1f6 100644 --- a/htdocs/boutique/promotion/class/promotion.class.php +++ b/htdocs/boutique/promotion/class/promotion.class.php @@ -139,7 +139,7 @@ class Promotion { $sql .= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."categories as c,".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."categories_description as cd"; $sql .= " WHERE c.categories_id = cd.categories_id AND cd.language_id = ".$conf->global->OSC_LANGUAGE_ID; $sql .= " AND c.categories_id = ".$id; - $result = $this->db->query($sql) ; + $result = $this->db->query($sql); if ( $result ) { $result = $this->db->fetch_array($result); diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index a5e14ba8d2f..57d7ece60ad 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -803,8 +803,8 @@ if ($_POST['action'] == 'updateligne' && $user->rights->propale->creer && $_POST $productid = $_POST['productid'] ; if ($productid) { - $product = new Product($db) ; - $res=$product->fetch($productid) ; + $product = new Product($db); + $res=$product->fetch($productid); $price_min = $product->price_min; if ($conf->global->PRODUIT_MULTIPRICES && $object->client->price_level) $price_min = $product->multiprices_min[$object->client->price_level]; } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 60882f16e6a..09ae19b4991 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1220,7 +1220,7 @@ class Commande extends CommonObject if ($ref_int) $sql.= " AND c.ref_int='".$this->db->escape($ref_int)."'"; dol_syslog("Commande::fetch sql=".$sql, LOG_DEBUG); - $result = $this->db->query($sql) ; + $result = $this->db->query($sql); if ($result) { $obj = $this->db->fetch_object($result); diff --git a/htdocs/compta/class/comptacompte.class.php b/htdocs/compta/class/comptacompte.class.php index c7da744673c..d0e55c29561 100644 --- a/htdocs/compta/class/comptacompte.class.php +++ b/htdocs/compta/class/comptacompte.class.php @@ -59,7 +59,7 @@ class ComptaCompte $sql .= " FROM ".MAIN_DB_PREFIX."compta_compte_generaux "; $sql .= " WHERE numero = '" .trim($this->numero)."'"; - $resql = $this->db->query($sql) ; + $resql = $this->db->query($sql); if ( $resql ) { diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 48d6ac4cc97..e2cbc28f14e 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -205,7 +205,7 @@ class Deplacement extends CommonObject $sql.= " WHERE rowid = ".$id; dol_syslog("Deplacement::fetch sql=".$sql, LOG_DEBUG); - $result = $this->db->query($sql) ; + $result = $this->db->query($sql); if ( $result ) { $obj = $this->db->fetch_object($result); @@ -341,7 +341,7 @@ class Deplacement extends CommonObject $sql.= " WHERE active = ".$active; dol_syslog("Deplacement::listOfTypes sql=".$sql, LOG_DEBUG); - $result = $this->db->query($sql) ; + $result = $this->db->query($sql); if ( $result ) { $num = $this->db->num_rows($result); diff --git a/htdocs/compta/dons/class/don.class.php b/htdocs/compta/dons/class/don.class.php index 1f4b626bc0b..a714a650585 100644 --- a/htdocs/compta/dons/class/don.class.php +++ b/htdocs/compta/dons/class/don.class.php @@ -237,7 +237,7 @@ class Don extends CommonObject $this->amount = trim($this->amount); $map = range(0,9); - for ($i = 0; $i < dol_strlen($this->amount) ; $i++) + for ($i = 0; $i < dol_strlen($this->amount); $i++) { if (!isset($map[substr($this->amount, $i, 1)] )) { diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 1fb029c61ee..da3f0c5adb8 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -972,7 +972,7 @@ if (($action == 'addline' || $action == 'addline_predef') && $user->rights->fact { if($price_min && (price2num($pu_ht)*(1-price2num($_POST['remise_percent'])/100) < price2num($price_min))) { - $object->error = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)) ; + $object->error = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)); $result = -1 ; } else diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index 38f2f8f4a3e..9b49f27c7e1 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -57,7 +57,7 @@ if ($_POST["action"] == "builddoc" && $user->rights->facture->lire) $factures = dol_dir_list($conf->facture->dir_output,'all',1,implode('|',$arrayofexclusion),'\.meta$|\.png','date',SORT_DESC); // liste les fichiers - $files = array() ; + $files = array(); $factures_bak = $factures ; foreach($_POST['toGenerate'] as $basename){ foreach($factures as $facture){ diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 55f3828167a..b5652adf2a9 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -746,7 +746,7 @@ if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->comman print ' '; print ''; $tot_ht=$tot_ttc=$tot_tobill=0; - $societestatic = new Societe($db) ; + $societestatic = new Societe($db); while ($i < $num) { $obj = $db->fetch_object($resql); @@ -845,7 +845,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire) print ''; if ($num) { - $societestatic = new Societe($db) ; + $societestatic = new Societe($db); $total_ttc = $totalam = $total = 0; while ($i < $num && $i < $conf->liste_limit) { @@ -877,7 +877,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire) $societestatic->id=$obj->socid; $societestatic->nom=$obj->nom; $societestatic->client=1; - print $societestatic->getNomUrl(1,'customer',44) ; + print $societestatic->getNomUrl(1,'customer',44); print ''; if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print ''.price($obj->total).''; print ''.price($obj->total_ttc).''; @@ -948,7 +948,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire) print ''.$langs->trans("Paid").''; print ' '; print "\n"; - $societestatic = new Societe($db) ; + $societestatic = new Societe($db); if ($num) { $i = 0; diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index 819fbb23397..f58d878c21b 100755 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -112,8 +112,8 @@ if ($result) $compta_prod = $obj->accountancy_code_buy; if (empty($compta_prod)) { - if($obj->product_type == 0) $compta_prod = (! empty($conf->global->COMPTA_PRODUCT_BUY_ACCOUNT))?$conf->global->COMPTA_PRODUCT_BUY_ACCOUNT:$langs->trans("CodeNotDef") ; - else $compta_prod = (! empty($conf->global->COMPTA_SERVICE_BUY_ACCOUNT))?$conf->global->COMPTA_SERVICE_BUY_ACCOUNT:$langs->trans("CodeNotDef") ; + if($obj->product_type == 0) $compta_prod = (! empty($conf->global->COMPTA_PRODUCT_BUY_ACCOUNT))?$conf->global->COMPTA_PRODUCT_BUY_ACCOUNT:$langs->trans("CodeNotDef"); + else $compta_prod = (! empty($conf->global->COMPTA_SERVICE_BUY_ACCOUNT))?$conf->global->COMPTA_SERVICE_BUY_ACCOUNT:$langs->trans("CodeNotDef"); } $compta_tva = (! empty($obj->accountancy_code))?$obj->accountancy_code:$cpttva; diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index 0ebf1f3d79a..1ca658c2b8f 100755 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -112,8 +112,8 @@ if ($result) $compta_prod = $obj->accountancy_code_sell; if (empty($compta_prod)) { - if($obj->product_type == 0) $compta_prod = (! empty($conf->global->COMPTA_PRODUCT_SOLD_ACCOUNT))?$conf->global->COMPTA_PRODUCT_SOLD_ACCOUNT:$langs->trans("CodeNotDef") ; - else $compta_prod = (! empty($conf->global->COMPTA_SERVICE_SOLD_ACCOUNT))?$conf->global->COMPTA_SERVICE_SOLD_ACCOUNT:$langs->trans("CodeNotDef") ; + if($obj->product_type == 0) $compta_prod = (! empty($conf->global->COMPTA_PRODUCT_SOLD_ACCOUNT))?$conf->global->COMPTA_PRODUCT_SOLD_ACCOUNT:$langs->trans("CodeNotDef"); + else $compta_prod = (! empty($conf->global->COMPTA_SERVICE_SOLD_ACCOUNT))?$conf->global->COMPTA_SERVICE_SOLD_ACCOUNT:$langs->trans("CodeNotDef"); } $cpttva = (! empty($conf->global->COMPTA_VAT_ACCOUNT))?$conf->global->COMPTA_VAT_ACCOUNT:$langs->trans("CodeNotDef"); $compta_tva = (! empty($obj->accountancy_code))?$obj->accountancy_code:$cpttva; diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index a5c852ea014..37151fa5302 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -654,7 +654,7 @@ class RemiseCheque extends CommonObject $sql.= " WHERE rowid < ".$this->id; $sql.= " AND entity = ".$conf->entity; - $result = $this->db->query($sql) ; + $result = $this->db->query($sql); if (! $result) { $this->errno = -1035; @@ -667,7 +667,7 @@ class RemiseCheque extends CommonObject $sql.= " WHERE rowid > ".$this->id; $sql.= " AND entity = ".$conf->entity; - $result = $this->db->query($sql) ; + $result = $this->db->query($sql); if (! $result) { $this->errno = -1035; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 264a18deb54..a7915ae9d8a 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -335,7 +335,7 @@ class Tva extends CommonObject $payee = $this->tva_sum_payee($year); $collectee = $this->tva_sum_collectee($year); - $solde = $reglee - ($collectee - $payee) ; + $solde = $reglee - ($collectee - $payee); return $solde; } diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index af2b1811616..4680d47cd51 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -203,7 +203,7 @@ class Contrat extends CommonObject $sql.= " commentaire = '".$this->db->escape($comment)."'"; $sql.= " WHERE rowid = ".$line_id . " AND statut = 4"; - $resql = $this->db->query($sql) ; + $resql = $this->db->query($sql); if ($resql) { // Appel des triggers @@ -287,7 +287,7 @@ class Contrat extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."contrat SET statut = 1"; $sql .= " WHERE rowid = ".$this->id . " AND statut = 0"; - $resql = $this->db->query($sql) ; + $resql = $this->db->query($sql); if ($resql) { $this->use_webcal=($conf->global->PHPWEBCALENDAR_CONTRACTSTATUS=='always'?1:0); @@ -327,7 +327,7 @@ class Contrat extends CommonObject else $sql.= " WHERE rowid=".$id; dol_syslog("Contrat::fetch sql=".$sql, LOG_DEBUG); - $resql = $this->db->query($sql) ; + $resql = $this->db->query($sql); if ($resql) { $result = $this->db->fetch_array($resql); diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 0680706e7d6..15e409863f7 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -290,7 +290,7 @@ if ($action == 'addline' && $user->rights->contrat->creer) if($price_min && (price2num($pu_ht)*(1-price2num($_POST['remise_percent'])/100) < price2num($price_min))) { - $object->error = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)) ; + $object->error = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').' '.$langs->trans("Currency".$conf->monnaie)); $result = -1 ; } else diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index cca3f159ccd..fad26472892 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -653,7 +653,7 @@ abstract class CommonObject if ($this->ismultientitymanaged == 1) $sql.= ' AND te.entity IN (0,'.(! empty($conf->entities[$this->element]) ? $conf->entities[$this->element] : $conf->entity).')'; //print $sql."
"; - $result = $this->db->query($sql) ; + $result = $this->db->query($sql); if (! $result) { $this->error=$this->db->error(); @@ -675,7 +675,7 @@ abstract class CommonObject // Rem: Bug in some mysql version: SELECT MIN(rowid) FROM llx_socpeople WHERE rowid > 1 when one row in database with rowid=1, returns 1 instead of null //print $sql."
"; - $result = $this->db->query($sql) ; + $result = $this->db->query($sql); if (! $result) { $this->error=$this->db->error(); diff --git a/htdocs/core/class/cookie.class.php b/htdocs/core/class/cookie.class.php index 098c52f118c..6082e4d0d99 100644 --- a/htdocs/core/class/cookie.class.php +++ b/htdocs/core/class/cookie.class.php @@ -88,7 +88,7 @@ class DolCookie $this->myValue .= strval(chr($this->cookiearray[$f]/$this->myKey)); } - return(base64_decode($this->myValue)) ; + return(base64_decode($this->myValue)); } else { diff --git a/htdocs/core/filemanagerdol/browser/default/browser.php b/htdocs/core/filemanagerdol/browser/default/browser.php index 68f9cdfc2a5..bd308aa4eda 100755 --- a/htdocs/core/filemanagerdol/browser/default/browser.php +++ b/htdocs/core/filemanagerdol/browser/default/browser.php @@ -46,7 +46,7 @@ require('../../../../main.inc.php'); {} // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... - d = d.replace( /.*?(?:\.|$)/, '' ) ; + d = d.replace( /.*?(?:\.|$)/, '' ); if ( d.length == 0 ) break ; // It was not able to detect the domain. @@ -60,36 +60,36 @@ require('../../../../main.inc.php'); break ; } } -})() ; +})(); function GetUrlParam( paramName ) { - var oRegex = new RegExp( '[\?&]' + paramName + '=([^&]+)', 'i' ) ; - var oMatch = oRegex.exec( window.top.location.search ) ; + var oRegex = new RegExp( '[\?&]' + paramName + '=([^&]+)', 'i' ); + var oMatch = oRegex.exec( window.top.location.search ); if ( oMatch && oMatch.length > 1 ) - return decodeURIComponent( oMatch[1] ) ; + return decodeURIComponent( oMatch[1] ); else return '' ; } -var oConnector = new Object() ; +var oConnector = new Object(); oConnector.CurrentFolder = '/' ; -var sConnUrl = GetUrlParam( 'Connector' ) ; +var sConnUrl = GetUrlParam( 'Connector' ); // Gecko has some problems when using relative URLs (not starting with slash). if ( sConnUrl.substr(0,1) != '/' && sConnUrl.indexOf( '://' ) < 0 ) sConnUrl = window.location.href.replace( /browser.php.*$/, '' ) + sConnUrl ; -oConnector.ConnectorUrl = sConnUrl + ( sConnUrl.indexOf('?') != -1 ? '&' : '?' ) ; +oConnector.ConnectorUrl = sConnUrl + ( sConnUrl.indexOf('?') != -1 ? '&' : '?' ); -var sServerPath = GetUrlParam( 'ServerPath' ) ; +var sServerPath = GetUrlParam( 'ServerPath' ); if ( sServerPath.length > 0 ) oConnector.ConnectorUrl += 'ServerPath=' + encodeURIComponent( sServerPath ) + '&' ; -oConnector.ResourceType = GetUrlParam( 'Type' ) ; -oConnector.ShowAllTypes = ( oConnector.ResourceType.length == 0 ) ; +oConnector.ResourceType = GetUrlParam( 'Type' ); +oConnector.ShowAllTypes = ( oConnector.ResourceType.length == 0 ); if ( oConnector.ShowAllTypes ) oConnector.ResourceType = 'File' ; @@ -98,19 +98,19 @@ oConnector.SendCommand = function( command, params, callBackFunction ) { var sUrl = this.ConnectorUrl + 'Command=' + command ; sUrl += '&Type=' + this.ResourceType ; - sUrl += '&CurrentFolder=' + encodeURIComponent( this.CurrentFolder ) ; + sUrl += '&CurrentFolder=' + encodeURIComponent( this.CurrentFolder ); if ( params ) sUrl += '&' + params ; // Add a random salt to avoid getting a cached version of the command execution - sUrl += '&uuid=' + new Date().getTime() ; + sUrl += '&uuid=' + new Date().getTime(); - var oXML = new FCKXml() ; + var oXML = new FCKXml(); if ( callBackFunction ) - oXML.LoadUrl( sUrl, callBackFunction ) ; // Asynchronous load. + oXML.LoadUrl( sUrl, callBackFunction ); // Asynchronous load. else - return oXML.LoadUrl( sUrl ) ; + return oXML.LoadUrl( sUrl ); return null ; } @@ -118,53 +118,53 @@ oConnector.SendCommand = function( command, params, callBackFunction ) oConnector.CheckError = function( responseXml ) { var iErrorNumber = 0 ; - var oErrorNode = responseXml.SelectSingleNode( 'Connector/Error' ) ; + var oErrorNode = responseXml.SelectSingleNode( 'Connector/Error' ); if ( oErrorNode ) { - iErrorNumber = parseInt( oErrorNode.attributes.getNamedItem('number').value, 10 ) ; + iErrorNumber = parseInt( oErrorNode.attributes.getNamedItem('number').value, 10 ); switch ( iErrorNumber ) { case 0 : break ; case 1 : // Custom error. Message placed in the "text" attribute. - alert( oErrorNode.attributes.getNamedItem('text').value ) ; + alert( oErrorNode.attributes.getNamedItem('text').value ); break ; case 101 : - alert( 'Folder already exists' ) ; + alert( 'Folder already exists' ); break ; case 102 : - alert( 'Invalid folder name' ) ; + alert( 'Invalid folder name' ); break ; case 103 : - alert( 'You have no permissions to create the folder' ) ; + alert( 'You have no permissions to create the folder' ); break ; case 110 : - alert( 'Unknown error creating folder' ) ; + alert( 'Unknown error creating folder' ); break ; default : - alert( 'Error on your request. Error number: ' + iErrorNumber ) ; + alert( 'Error on your request. Error number: ' + iErrorNumber ); break ; } } return iErrorNumber ; } -var oIcons = new Object() ; +var oIcons = new Object(); oIcons.AvailableIconsArray = [ 'ai','avi','bmp','cs','dll','doc','exe','fla','gif','htm','html','jpg','js', 'mdb','mp3','pdf','png','ppt','rdp','swf','swt','txt','vsd','xls','xml','zip' ] ; -oIcons.AvailableIcons = new Object() ; +oIcons.AvailableIcons = new Object(); for ( var i = 0 ; i < oIcons.AvailableIconsArray.length ; i++ ) oIcons.AvailableIcons[ oIcons.AvailableIconsArray[i] ] = true ; oIcons.GetIcon = function( fileName ) { - var sExtension = fileName.substr( fileName.lastIndexOf('.') + 1 ).toLowerCase() ; + var sExtension = fileName.substr( fileName.lastIndexOf('.') + 1 ).toLowerCase(); if ( this.AvailableIcons[ sExtension ] == true ) return sExtension ; @@ -175,9 +175,9 @@ oIcons.GetIcon = function( fileName ) function OnUploadCompleted( errorNumber, fileUrl, fileName, customMsg ) { if (errorNumber == "1") - window.frames['frmUpload'].OnUploadCompleted( errorNumber, customMsg ) ; + window.frames['frmUpload'].OnUploadCompleted( errorNumber, customMsg ); else - window.frames['frmUpload'].OnUploadCompleted( errorNumber, fileName ) ; + window.frames['frmUpload'].OnUploadCompleted( errorNumber, fileName ); } diff --git a/htdocs/core/filemanagerdol/browser/default/frmactualfolder.php b/htdocs/core/filemanagerdol/browser/default/frmactualfolder.php index 102a85a38b1..982143e0a28 100755 --- a/htdocs/core/filemanagerdol/browser/default/frmactualfolder.php +++ b/htdocs/core/filemanagerdol/browser/default/frmactualfolder.php @@ -66,7 +66,7 @@ require('../../../../main.inc.php'); ?> {} // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... - d = d.replace( /.*?(?:\.|$)/, '' ) ; + d = d.replace( /.*?(?:\.|$)/, '' ); if ( d.length == 0 ) break ; // It was not able to detect the domain. @@ -80,7 +80,7 @@ require('../../../../main.inc.php'); ?> break ; } } -})() ; +})(); function SetCurrentFolder( resourceType, folderPath ) { diff --git a/htdocs/core/filemanagerdol/browser/default/frmcreatefolder.php b/htdocs/core/filemanagerdol/browser/default/frmcreatefolder.php index e175fe4e47b..f90a81adc5b 100755 --- a/htdocs/core/filemanagerdol/browser/default/frmcreatefolder.php +++ b/htdocs/core/filemanagerdol/browser/default/frmcreatefolder.php @@ -63,48 +63,48 @@ function CreateFolder() while ( true ) { - sFolderName = prompt( 'Type the name of the new folder:', '' ) ; + sFolderName = prompt( 'Type the name of the new folder:', '' ); if ( sFolderName == null ) return ; else if ( sFolderName.length == 0 ) - alert( 'Please type the folder name' ) ; + alert( 'Please type the folder name' ); else break ; } - oConnector.SendCommand( 'CreateFolder', 'NewFolderName=' + encodeURIComponent( sFolderName) , CreateFolderCallBack ) ; + oConnector.SendCommand( 'CreateFolder', 'NewFolderName=' + encodeURIComponent( sFolderName) , CreateFolderCallBack ); } function CreateFolderCallBack( fckXml ) { if ( oConnector.CheckError( fckXml ) == 0 ) - window.parent.frames['frmResourcesList'].Refresh() ; + window.parent.frames['frmResourcesList'].Refresh(); /* // Get the current folder path. - var oNode = fckXml.SelectSingleNode( 'Connector/Error' ) ; - var iErrorNumber = parseInt( oNode.attributes.getNamedItem('number').value ) ; + var oNode = fckXml.SelectSingleNode( 'Connector/Error' ); + var iErrorNumber = parseInt( oNode.attributes.getNamedItem('number').value ); switch ( iErrorNumber ) { case 0 : - window.parent.frames['frmResourcesList'].Refresh() ; + window.parent.frames['frmResourcesList'].Refresh(); break ; case 101 : - alert( 'Folder already exists' ) ; + alert( 'Folder already exists' ); break ; case 102 : - alert( 'Invalid folder name' ) ; + alert( 'Invalid folder name' ); break ; case 103 : - alert( 'You have no permissions to create the folder' ) ; + alert( 'You have no permissions to create the folder' ); break ; case 110 : - alert( 'Unknown error creating folder' ) ; + alert( 'Unknown error creating folder' ); break ; default : - alert( 'Error creating folder. Error number: ' + iErrorNumber ) ; + alert( 'Error creating folder. Error number: ' + iErrorNumber ); break ; } */ diff --git a/htdocs/core/filemanagerdol/browser/default/frmfolders.php b/htdocs/core/filemanagerdol/browser/default/frmfolders.php index 0c384b5173c..3978fb2d1f3 100755 --- a/htdocs/core/filemanagerdol/browser/default/frmfolders.php +++ b/htdocs/core/filemanagerdol/browser/default/frmfolders.php @@ -61,42 +61,42 @@ var sActiveFolder ; var bIsLoaded = false ; var iIntervalId ; -var oListManager = new Object() ; +var oListManager = new Object(); oListManager.Init = function() { - this.Table = document.getElementById('tableFiles') ; - this.UpRow = document.getElementById('trUp') ; + this.Table = document.getElementById('tableFiles'); + this.UpRow = document.getElementById('trUp'); - this.TableRows = new Object() ; + this.TableRows = new Object(); } oListManager.Clear = function() { // Remove all other rows available. while ( this.Table.rows.length > 1 ) - this.Table.deleteRow(1) ; + this.Table.deleteRow(1); // Reset the TableRows collection. - this.TableRows = new Object() ; + this.TableRows = new Object(); } oListManager.AddItem = function( folderName, folderPath ) { // Create the new row. - var oRow = this.Table.insertRow(-1) ; + var oRow = this.Table.insertRow(-1); oRow.className = 'FolderListFolder' ; // Build the link to view the folder. var sLink = '' ; // Add the folder icon cell. - var oCell = oRow.insertCell(-1) ; + var oCell = oRow.insertCell(-1); oCell.width = 16 ; oCell.innerHTML = sLink + '<\/a>' ; // Add the folder name cell. - oCell = oRow.insertCell(-1) ; + oCell = oRow.insertCell(-1); oCell.noWrap = true ; oCell.innerHTML = ' ' + sLink + folderName + '<\/a>' ; @@ -105,13 +105,13 @@ oListManager.AddItem = function( folderName, folderPath ) oListManager.ShowUpFolder = function( upFolderPath ) { - this.UpRow.style.display = ( upFolderPath != null ? '' : 'none' ) ; + this.UpRow.style.display = ( upFolderPath != null ? '' : 'none' ); if ( upFolderPath != null ) { document.getElementById('linkUpIcon').onclick = document.getElementById('linkUp').onclick = function() { - LoadFolders( upFolderPath ) ; + LoadFolders( upFolderPath ); return false ; } } @@ -124,9 +124,9 @@ function CheckLoaded() && window.top.IsLoadedUpload && window.top.IsLoadedResourcesList ) { - window.clearInterval( iIntervalId ) ; + window.clearInterval( iIntervalId ); bIsLoaded = true ; - OpenFolder( sActiveFolder ) ; + OpenFolder( sActiveFolder ); } } @@ -137,7 +137,7 @@ function OpenFolder( folderPath ) if ( ! bIsLoaded ) { if ( ! iIntervalId ) - iIntervalId = window.setInterval( CheckLoaded, 100 ) ; + iIntervalId = window.setInterval( CheckLoaded, 100 ); return ; } @@ -145,39 +145,39 @@ function OpenFolder( folderPath ) for ( var sFolderPath in oListManager.TableRows ) { oListManager.TableRows[ sFolderPath ].className = - ( sFolderPath == folderPath ? 'FolderListCurrentFolder' : 'FolderListFolder' ) ; + ( sFolderPath == folderPath ? 'FolderListCurrentFolder' : 'FolderListFolder' ); } // Set the current folder in all frames. - window.parent.frames['frmActualFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ; - window.parent.frames['frmCreateFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ; - window.parent.frames['frmUpload'].SetCurrentFolder( oConnector.ResourceType, folderPath ) ; + window.parent.frames['frmActualFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ); + window.parent.frames['frmCreateFolder'].SetCurrentFolder( oConnector.ResourceType, folderPath ); + window.parent.frames['frmUpload'].SetCurrentFolder( oConnector.ResourceType, folderPath ); // Load the resources list for this folder. - window.parent.frames['frmResourcesList'].LoadResources( oConnector.ResourceType, folderPath ) ; + window.parent.frames['frmResourcesList'].LoadResources( oConnector.ResourceType, folderPath ); } function LoadFolders( folderPath ) { // Clear the folders list. - oListManager.Clear() ; + oListManager.Clear(); // Get the parent folder path. var sParentFolderPath ; if ( folderPath != '/' ) - sParentFolderPath = folderPath.substring( 0, folderPath.lastIndexOf( '/', folderPath.length - 2 ) + 1 ) ; + sParentFolderPath = folderPath.substring( 0, folderPath.lastIndexOf( '/', folderPath.length - 2 ) + 1 ); // Show/Hide the Up Folder. - oListManager.ShowUpFolder( sParentFolderPath ) ; + oListManager.ShowUpFolder( sParentFolderPath ); if ( folderPath != '/' ) { sActiveFolder = folderPath ; oConnector.CurrentFolder = sParentFolderPath ; - oConnector.SendCommand( 'GetFolders', null, GetFoldersCallBack ) ; + oConnector.SendCommand( 'GetFolders', null, GetFoldersCallBack ); } else - OpenFolder( '/' ) ; + OpenFolder( '/' ); } function GetFoldersCallBack( fckXml ) @@ -186,30 +186,30 @@ function GetFoldersCallBack( fckXml ) return ; // Get the current folder path. - var oNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ; + var oNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ); var sCurrentFolderPath = oNode.attributes.getNamedItem('path').value ; - var oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ; + var oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ); for ( var i = 0 ; i < oNodes.length ; i++ ) { var sFolderName = oNodes[i].attributes.getNamedItem('name').value ; - oListManager.AddItem( sFolderName, sCurrentFolderPath + sFolderName + '/' ) ; + oListManager.AddItem( sFolderName, sCurrentFolderPath + sFolderName + '/' ); } - OpenFolder( sActiveFolder ) ; + OpenFolder( sActiveFolder ); } function SetResourceType( type ) { oConnector.ResourceType = type ; - LoadFolders( '/' ) ; + LoadFolders( '/' ); } window.onload = function() { - oListManager.Init() ; - LoadFolders( '/' ) ; + oListManager.Init(); + LoadFolders( '/' ); } diff --git a/htdocs/core/filemanagerdol/browser/default/frmresourceslist.php b/htdocs/core/filemanagerdol/browser/default/frmresourceslist.php index 94b7982bc83..e065c4d7107 100755 --- a/htdocs/core/filemanagerdol/browser/default/frmresourceslist.php +++ b/htdocs/core/filemanagerdol/browser/default/frmresourceslist.php @@ -51,7 +51,7 @@ require('../../../../main.inc.php'); ?> ' ; exit ; } @@ -308,7 +308,7 @@ function SendCKEditorResults ($callback, $sFileUrl, $customMsg = '') { echo '