| 1 |
<?php |
<?php |
| 2 |
// $Id: stormperson.module,v 1.5 2008/06/18 15:25:08 robertogerola Exp $ |
// $Id: stormperson.module,v 1.6 2008/06/23 16:46:36 robertogerola Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 180 |
'#weight' => -50, |
'#weight' => -50, |
| 181 |
); |
); |
| 182 |
|
|
| 183 |
$s = "SELECT n.nid, n.title FROM {stormorganization} sor INNER JOIN {node} n ON sor.nid=n.nid WHERE n.status=1 AND n.type='stormorganization' ORDER BY n.title"; |
$s = "SELECT n.nid, n.title FROM {node} AS n INNER JOIN {stormorganization} AS sor ON sor.vid=n.vid WHERE n.status=1 AND n.type='stormorganization' ORDER BY n.title"; |
| 184 |
|
$s = db_rewrite_sql($s); |
| 185 |
$r = db_query(stormorganization_access_sql($s)); |
$r = db_query(stormorganization_access_sql($s)); |
| 186 |
$organizations = array(); |
$organizations = array(); |
| 187 |
while ($organization = db_fetch_object($r)) { |
while ($organization = db_fetch_object($r)) { |
| 306 |
'%s', '%s', %d |
'%s', '%s', %d |
| 307 |
)", |
)", |
| 308 |
$node->vid, $node->nid, $node->organization_nid, $node->organization_title, |
$node->vid, $node->nid, $node->organization_nid, $node->organization_title, |
| 309 |
$node->prefix, $node->fullname, $node->email, $node->www, |
$node->prefix, $node->fullname, $node->email, $node->www, |
| 310 |
$node->phone, $node->im, $node->user_uid); |
$node->phone, $node->im, $node->user_uid); |
| 311 |
} |
} |
| 312 |
|
|
| 325 |
WHERE vid = %d", |
WHERE vid = %d", |
| 326 |
$node->organization_nid, $node->organization_title, |
$node->organization_nid, $node->organization_title, |
| 327 |
$node->prefix, $node->fullname, $node->email, $node->www, |
$node->prefix, $node->fullname, $node->email, $node->www, |
| 328 |
$node->phone, $node->im, $node->user_uid, |
$node->phone, $node->im, $node->user_uid, |
| 329 |
$node->vid); |
$node->vid); |
| 330 |
if ($node->title != $node->title_old) { |
if ($node->title != $node->title_old) { |
| 331 |
module_invoke_all('stormperson_change', $node->nid, $node->stepno, $node->title); |
module_invoke_all('stormperson_change', $node->nid, $node->stepno, $node->title); |
| 341 |
} |
} |
| 342 |
|
|
| 343 |
$s = "SELECT n.title |
$s = "SELECT n.title |
| 344 |
FROM {node} n INNER JOIN {stormorganization} p ON n.nid=p.nid |
FROM {node} AS n INNER JOIN {stormorganization} AS p ON n.nid=p.nid |
| 345 |
WHERE type='stormorganization' AND n.nid=%d"; |
WHERE type='stormorganization' AND n.nid=%d"; |
| 346 |
$r = db_query($s, $node->organization_nid); |
$r = db_query($s, $node->organization_nid); |
| 347 |
$o = db_fetch_object($r); |
$o = db_fetch_object($r); |