================================================================================
+VERSION 1.0.1 XX XX XXXX
+
+
+================================================================================
VERSION 1.0.0 30 06 2010
New:
$it = XDB::Iterator('SELECT p.pid, p.hrpid, p.xorg_id, p.ax_id, p.birthdate, p.birthdate_ref,
p.next_birthday, p.deathdate, p.deathdate_rec, p.sex = \'female\' AS sex,
- p.cv, p.medals_pub, p.alias_pub, p.email_directory, p.last_change,
- p.nationality1, p.nationality2, p.nationality3,
+ IF ({?}, p.cv, NULL) AS cv, p.medals_pub, p.alias_pub, p.email_directory,
+ p.last_change, p.nationality1, p.nationality2, p.nationality3,
IF (p.freetext_pub IN {?}, p.freetext, NULL) AS freetext,
pe.entry_year, pe.grad_year,
IF ({?}, pse.text, NULL) AS section,
WHERE p.pid IN {?}
GROUP BY p.pid
' . $order,
- $visibility->levels(),
- $visibility->isVisible(ProfileVisibility::VIS_PRIVATE),
- $visibility->isVisible(ProfileVisibility::VIS_PRIVATE),
- $visibility->levels(),
- $visibility->levels(),
+ $visibility->isVisible(ProfileVisibility::VIS_PRIVATE), // CV
+ $visibility->levels(), // freetext
+ $visibility->isVisible(ProfileVisibility::VIS_PRIVATE), // section
+ $visibility->isVisible(ProfileVisibility::VIS_PRIVATE), // nickname
+ $visibility->levels(), // mobile
+ $visibility->levels(), // photo
$pids
);
return new ProfileIterator($it, $pids, $fields, $visibility);
-Subproject commit 786bffb570bfc2f5ff1dad386a9558501d4c16e8
+Subproject commit 92d96cb7270caff156df7785b800a7a3084e8a16
$this->$key = $val;
}
$this->company = CompanyList::get($this->jobid);
+ if (is_null($this->company)) {
+ require_once 'validations.inc.php';
+ $entreprise = ProfileValidate::get_typed_requests($this->pid, 'entreprise');
+ $this->company = new Company(array('name' => $entreprise[$this->id]->name));
+ }
}
public function phones()
public function id()
{
- if (!is_null($this->profile)) {
- return $this->profile->id() . '_' . $this->type . '_' . $this->stamp;
- } else {
- return $this->user->id() . '_' . $this->type . '_' . $this->stamp;
- }
+ return $this->profile->id() . '_' . $this->type . '_' . $this->stamp;
}
// }}}
$where .= "name LIKE '%" . $name_array[$i] . "%'";
}
}
- $res = XDB::iterator('SELECT name
- FROM profile_job_enum
- WHERE ' . $where);
- $this->suggestions = "| ";
- while ($sug = $res->next()) {
- $this->suggestions .= $sug['name'] . " | ";
+ if ($where != '') {
+ $res = XDB::iterator('SELECT name
+ FROM profile_job_enum
+ WHERE ' . $where);
+ $this->suggestions = "| ";
+ while ($sug = $res->next()) {
+ $this->suggestions .= $sug['name'] . " | ";
+ }
}
}
protected function handle_editor()
{
- if (Env::has('holdingid')) {
- $this->holdingid = Env::t('holdingid');
- }
if (Env::has('name')) {
$this->name = Env::t('name');
- if (Env::has('acronym')) {
- $this->acronym = Env::t('acronym');
- if (Env::has('url')) {
- $this->url = Env::t('url');
- if (Env::has('NAF_code')) {
- $this->NAF_code = Env::t('NAF_code');
- if (Env::has('AX_code')) {
- $this->AX_code = Env::t('AX_code');
- return true;
- }
- }
- }
- }
}
- return false;
+ if (Env::has('acronym')) {
+ $this->acronym = Env::t('acronym');
+ }
+ if (Env::has('url')) {
+ $this->url = Env::t('url');
+ }
+ if (Env::has('email')) {
+ $this->email = Env::t('email');
+ }
+ if (Env::has('holdingid')) {
+ $this->holdingid = Env::i('holdingid');
+ }
+ if (Env::has('NAF_code')) {
+ $this->NAF_code = Env::t('NAF_code');
+ }
+ if (Env::has('AX_code')) {
+ $this->AX_code = Env::i('AX_code');
+ }
+ if (Env::has('address')) {
+ $this->address['text'] = Env::t('address');
+ }
+ if (Env::has('tel')) {
+ $this->tel = Env::t('tel');
+ }
+ if (Env::has('fax')) {
+ $this->fax = Env::t('fax');
+ }
+ return true;
}
// }}}
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-// {{{ class NamesReq4
+// {{{ class NamesReq
class NamesReq extends ProfileValidate
{
$view = 'private';
}
+ // Display pending picture
+ if (S::logged() && Env::v('modif') == 'new') {
+ $page->assign('with_pending_pic', true);
+ }
+
// Fetches profile's and profile's owner information and redirects to
// marketing if the owner has not subscribed and the requirer has logged in.
$profile = Profile::get($pid, Profile::FETCH_ALL, $view);
$job['hq_email'], $job['hq_fixed'], $job['hq_fax'], $job['hq_address']);
$req->submit();
$job['jobid'] = null;
+ sleep(1);
} else {
$job['jobid'] = $res->fetchOneCell();
}
<strong>Site web :</strong>
<input type="text" name="url" size="25" maxlength="200" value="{$valid->url}" /><br />
<strong>Email :</strong>
-<input type="text" name="url" size="25" maxlength="200" value="{$valid->email}" /><br />
+<input type="text" name="email" size="25" maxlength="200" value="{$valid->email}" /><br />
<strong>Holding :</strong>
<input type="text" name="holdingid" size="25" maxlength="200" value="{$valid->holdingid}" /><br />
<strong>Code NAF :</strong>
<strong>Code AX :</strong>
<input type="text" name="AX_code" size="25" maxlength="200" value="{$valid->AX_code}" /><br />
<strong>Adresse :</strong>
-<textarea cols="30" rows="4" name="address">{$valid->address['text']}</textarea><br />
+<textarea cols="30" rows="4" name="address">{$valid->address.text}</textarea><br />
<strong>Téléphone :</strong>
<input type="text" name="tel" size="25" maxlength="200" value="{$valid->tel}" /><br />
<strong>Fax :</strong>
</tr>
<tr class="pair">
<td class="titre">Adresse :</td>
- <td>{$valid->address[text]}</td>
+ <td>{$valid->address.text}</td>
</tr>
<tr class="pair">
<td class="titre">Téléphone :</td>
<div id="fiche">
<div id="photo" class="part">
{assign var=photo value=$profile->getPhoto(false)}
- {if $photo}<img alt="Photo de {$profile->fullName()}" src="photo/{$profile->hrid()}" width="{$photo->width()}"/>{/if}
+ {if $photo}<img alt="Photo de {$profile->fullName()}" src="photo/{$profile->hrid()}{if $with_pending_pic}/req{/if}" width="{$photo->width()}"/>{/if}
{if $logged && $view eq 'private' && ( $profile->section|smarty:nodefaults || $profile->getBinets()|smarty:nodefaults || ($owner && $owner->groups()|smarty:nodefaults))}
<h2>À l'X…</h2>
--- /dev/null
+ALTER TABLE profile_job_enum MODIFY COLUMN acronym VARCHAR(255) DEFAULT NULL;
+ALTER TABLE profile_job_enum MODIFY COLUMN url VARCHAR(255) DEFAULT NULL;
+ALTER TABLE profile_job_enum MODIFY COLUMN email VARCHAR(255) DEFAULT NULL;
+ALTER TABLE profile_job_enum MODIFY COLUMN NAF_code CHAR(5) DEFAULT NULL;
+
+-- vim:set syntax=mysql:
--- /dev/null
+../../bin/connect.db.inc.php
\ No newline at end of file
--- /dev/null
+#!/usr/bin/php5
+<?php
+require_once 'connect.db.inc.php';
+
+$globals->debug = 0; //do not store backtraces
+
+$phones = array(
+ 'AF' => '93',
+ 'AN' => '599',
+ 'BY' => '375',
+ 'FM' => '691',
+ 'GE' => '995',
+ 'GL' => '299',
+ 'ID' => '62',
+ 'IL' => '972',
+ 'IN' => '91',
+ 'IQ' => '964',
+ 'IR' => '98',
+ 'JO' => '962',
+ 'JP' => '81',
+ 'KG' => '996',
+ 'KW' => '965',
+ 'KZ' => '7',
+ 'LA' => '856',
+ 'LB' => '961',
+ 'LK' => '94',
+ 'MM' => '95',
+ 'MN' => '976',
+ 'MV' => '960',
+ 'MY' => '60',
+ 'NP' => '977',
+ 'OM' => '968',
+ 'PH' => '63',
+ 'PK' => '92',
+ 'QA' => '974',
+ 'SA' => '966',
+ 'SG' => '65',
+ 'SY' => '963',
+ 'TH' => '66',
+ 'TJ' => '992',
+ 'TM' => '993',
+ 'TR' => '90',
+ 'TW' => '886',
+ 'UZ' => '998',
+ 'VG' => '1284',
+ 'VN' => '84',
+ 'YE' => '967',
+);
+
+foreach ($phones as $country => $phone) {
+ XDB::execute('UPDATE geoloc_countries
+ SET phonePrefix = {?}
+ WHERE iso_3166_1_a2 = {?}',
+ $phone, $country);
+}
+
+/* vim:set et sw=4 sts=4 ts=4: */
+?>