Commit 1bb6a6bb authored by Loïc DAYOT's avatar Loïc DAYOT Committed by Ploc
Browse files

style(): postalcode displayed in 5 digits

Force postal code format into 5 digits.

Good for french situation, but not for others countries like Belgium.
parent 3c32d757
......@@ -94,7 +94,7 @@ class event {
$this->end = strtotime($this->end_time);
$this->address = $record->address;
$this->place = $this->address;
$this->postalcode = $record->postalcode;
$this->postalcode = sprintf("%'.05d", $record->postalcode);
$this->city = $record->city;
$this->department = $record->department;
if ($this->department>0)
......
......@@ -86,7 +86,7 @@ class localgroup {
$this->address = $record->address;
$this->place = $this->address;
$this->postalcode = $record->postalcode;
$this->postalcode = sprintf("%'.05d", $record->postalcode);
$this->city = $record->city;
$this->department = floor($this->postalcode/1000);
if ($this->department==97)
......@@ -452,7 +452,7 @@ MCE;
/* text */
foreach (array('name', 'url', 'place',
'address', 'postalcode', 'city', 'country',
'address', /*'postalcode',*/ 'city', 'country',
'osmId', 'contact', 'phone', 'mail',
'reach', 'submitter') as $fieldName)
{
......@@ -461,6 +461,8 @@ MCE;
}
if (isset($_POST['lg']['lon'])) $this->longitude = $_POST['lg']['lon'];
if (isset($_POST['lg']['lat'])) $this->latitude = $_POST['lg']['lat'];
if (isset($_POST['lg']['postalcode']))
$this->postalcode = sprintf("%'.05d", $_POST['lg']['postalcode']);
/* html code */
$aFieldName = array('comment');
......@@ -1026,7 +1028,7 @@ class localgroups {
$query = $select. $where.
" ORDER BY ". ($this->moderated ? "region_id, department, name" : "region_id, submission_time").
($this->partOfName>"" ? " LIMIT 0,30" : " LIMIT 0,300");
($this->partOfName>"" ? " LIMIT 0,30" : " LIMIT 0,800");
$result = $this->db->query ($query);
while (($record = $this->db->fetchObject($result)))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment