Skip to content

Commit

Permalink
Qual: Clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 20, 2011
1 parent f8aae02 commit 1270d4e
Show file tree
Hide file tree
Showing 17 changed files with 291 additions and 351 deletions.
25 changes: 18 additions & 7 deletions htdocs/adherents/class/adherent.class.php
Expand Up @@ -24,7 +24,7 @@
* \file htdocs/adherents/class/adherent.class.php
* \ingroup member
* \brief File of class to manage members of a foundation
* \version $Id: adherent.class.php,v 1.49 2011/08/10 22:47:33 eldy Exp $
* \version $Id: adherent.class.php,v 1.50 2011/08/20 15:11:31 eldy Exp $
*/

require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
Expand Down Expand Up @@ -57,9 +57,15 @@ class Adherent extends CommonObject
var $pass;
var $societe;
var $adresse;
var $address;
var $cp;
var $zip;
var $ville;
var $town;

var $state_id;
var $state_code;
var $state;
var $fk_departement; // Id of department
var $departement_code; // Code of department
var $departement; // Label of department
Expand Down Expand Up @@ -950,12 +956,17 @@ function fetch($rowid,$ref='',$fk_soc='')
$this->ville = $obj->town; // TODO deprecated
$this->town = $obj->town;

$this->fk_departement = $obj->fk_departement;
$this->departement_code = $obj->fk_departement?$obj->departement_code:'';
$this->departement = $obj->fk_departement?$obj->departement:'';

$this->pays_id = $obj->pays_id;
$this->pays_code = $obj->pays_code;
$this->state_id = $obj->fk_departement;
$this->state_id = $obj->fk_departement?$obj->departement_code:'';
$this->state_id = $obj->fk_departement?$obj->departement:'';
$this->fk_departement = $obj->fk_departement; // TODO deprecated
$this->departement_code = $obj->fk_departement?$obj->departement_code:''; // TODO deprecated
$this->departement = $obj->fk_departement?$obj->departement:''; // TODO deprecated

$this->country_id = $obj->pays_id;
$this->country_code = $obj->pays_code;
$this->pays_id = $obj->pays_id; // TODO deprecated
$this->pays_code = $obj->pays_code; // TODO deprecated
if ($langs->trans("Country".$obj->pays_code) != "Country".$obj->pays_code) $this->pays = $langs->trans("Country".$obj->pays_code);
elseif ($obj->pays_lib) $this->pays=$obj->pays_lib;
else $this->pays=$obj->pays;
Expand Down
11 changes: 6 additions & 5 deletions htdocs/adherents/fiche.php
Expand Up @@ -22,7 +22,7 @@
* \file htdocs/adherents/fiche.php
* \ingroup member
* \brief Page of member
* \version $Id: fiche.php,v 1.241 2011/08/10 22:47:35 eldy Exp $
* \version $Id: fiche.php,v 1.242 2011/08/20 15:11:33 eldy Exp $
*/

require("../main.inc.php");
Expand Down Expand Up @@ -236,9 +236,10 @@
$object->zip = trim($_POST["zipcode"]);
$object->ville = trim($_POST["town"]); // deprecated
$object->town = trim($_POST["town"]);

$object->fk_departement = $_POST["departement_id"];
$object->pays_id = $_POST["pays_id"];
$object->state_id = $_POST["departement_id"];
$object->country_id = $_POST["pays_id"];
$object->fk_departement = $_POST["departement_id"]; // deprecated
$object->pays_id = $_POST["pays_id"]; // deprecated

$object->phone = trim($_POST["phone"]);
$object->phone_perso = trim($_POST["phone_perso"]);
Expand Down Expand Up @@ -1526,5 +1527,5 @@

$db->close();

llxFooter('$Date: 2011/08/10 22:47:35 $ - $Revision: 1.241 $');
llxFooter('$Date: 2011/08/20 15:11:33 $ - $Revision: 1.242 $');
?>
4 changes: 2 additions & 2 deletions htdocs/asterisk/wrapper.php
Expand Up @@ -18,7 +18,7 @@
/**
* \file htdocs/asterisk/wrapper.php
* \brief File that is entry point to call an Asterisk server
* \version $Id: wrapper.php,v 1.9 2011/08/03 00:45:45 eldy Exp $
* \version $Id: wrapper.php,v 1.10 2011/08/20 15:11:32 eldy Exp $
* \remarks To be used, an Asterisk user must be created by adding this
* in /etc/asterisk/manager.conf
* [dolibarr]
Expand Down Expand Up @@ -76,7 +76,7 @@ function llxFooter() {
$caller = $_GET['caller'];
$called = $_GET['called'];

# Adresse IP du serveur Asterisk
# IP address of Asterisk server
$strHost = $conf->global->ASTERISK_HOST;
#Spécifiez le type d'extension par laquelle vous poste est connecte.
#ex: SIP/, IAX2/, ZAP/, etc
Expand Down
8 changes: 4 additions & 4 deletions htdocs/boutique/commande/fiche.php
Expand Up @@ -16,14 +16,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* $Id: fiche.php,v 1.24 2011/08/03 00:45:44 eldy Exp $
* $Id: fiche.php,v 1.25 2011/08/20 15:11:33 eldy Exp $
*/

/**
\file htdocs/boutique/commande/fiche.php
\ingroup boutique
\brief Page fiche commande OSCommerce
\version $Revision: 1.24 $
\version $Revision: 1.25 $
*/

require("../../main.inc.php");
Expand Down Expand Up @@ -55,7 +55,7 @@

print '<td width="20%">Paiement</td><td width="80%" colspan="2">'.$commande->payment_method.'</td></tr>';

print "<tr><td>Adresses</td><td>Livraison</td><td>Facturation</td></tr>";
print "<tr><td>".$langs->trans("Address")."</td><td>".$langs->trans("Delivery")."</td><td>".$langs->trans("Invoice")."</td></tr>";

print "<td>&nbsp;</td><td>".$commande->delivery_adr->name."<br>".$commande->delivery_adr->street."<br>".$commande->delivery_adr->cp."<br>".$commande->delivery_adr->city."<br>".$commande->delivery_adr->country."</td>";
print "<td>".$commande->billing_adr->name."<br>".$commande->billing_adr->street."<br>".$commande->billing_adr->cp."<br>".$commande->billing_adr->city."<br>".$commande->billing_adr->country."</td>";
Expand Down Expand Up @@ -154,5 +154,5 @@

$dbosc->close();

llxFooter("<em>Derni&egrave;re modification $Date: 2011/08/03 00:45:44 $ r&eacute;vision $Revision: 1.24 $</em>");
llxFooter("<em>Derni&egrave;re modification $Date: 2011/08/20 15:11:33 $ r&eacute;vision $Revision: 1.25 $</em>");
?>
100 changes: 0 additions & 100 deletions htdocs/cashdesk/include/fonctions.php

This file was deleted.

4 changes: 2 additions & 2 deletions htdocs/cashdesk/tpl/ticket.tpl.php
Expand Up @@ -32,7 +32,7 @@
/* position: relative; */
}

.adresse {
.address {
/* float: left; */
font-size: 12px;
}
Expand Down Expand Up @@ -96,7 +96,7 @@
<?php print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_small).'">'; ?>
</div>
<div class="infos">
<p class="adresse"><?php echo $mysoc->name; ?><br>
<p class="address"><?php echo $mysoc->name; ?><br>
<?php echo $mysoc->address; ?><br>
<?php echo $mysoc->zip.' '.$mysoc->town; ?></p>

Expand Down

0 comments on commit 1270d4e

Please sign in to comment.