/[drupal]/contributions/modules/profile_pages/profile_pages.module
ViewVC logotype

Diff of /contributions/modules/profile_pages/profile_pages.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2, Thu Jan 5 20:42:47 2006 UTC revision 1.3, Thu Sep 14 09:09:56 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2    // $Id$
3  /**  /**
4   * @file   * @file
5   * Provides a callback URL that lists, on one page,   * Provides a callback URL that lists, on one page,
# Line 18  function profile_pages_menu($may_cache) Line 18  function profile_pages_menu($may_cache)
18      $result = db_query("SELECT fid,name,title,type from {profile_fields}");      $result = db_query("SELECT fid,name,title,type from {profile_fields}");
19      if ($may_cache)  {      if ($may_cache)  {
20        while ($field = db_fetch_object($result))  {        while ($field = db_fetch_object($result))  {
21              $items[] = array('path' => "profile_pages/".$field->name, 'title' => $field->title,              $items[] = array('path' => "profile_pages/". check_plain($field->name), 'title' => check_plain($field->title),
22                'access' => user_access('view profile pages'),                'access' => user_access('view profile pages'),
23                'callback' => 'profile_pages_view',                'callback' => 'profile_pages_view',
24                'callback arguments' => array($field->fid,$field->type),                'callback arguments' => array($field->fid, $field->type),
25                'type' => MENU_CALLBACK);                'type' => MENU_CALLBACK);
26  /*            $items[] = array('path' => "profile/".$field->name, 'title' => $field->title,  /*            $items[] = array('path' => "profile/".$field->name, 'title' => $field->title,
27                'access' => user_access('view profile pages'),                'access' => user_access('view profile pages'),
# Line 34  function profile_pages_menu($may_cache) Line 34  function profile_pages_menu($may_cache)
34  }  }
35    
36  function profile_pages_view($fid, $type)  {  function profile_pages_view($fid, $type)  {
37    if (!$fid || !is_numeric($fid) || !$type)  {    if (!$fid || !is_numeric($fid) || !$type || !user_access('view profile pages'))  {
38      drupal_not_found();      drupal_not_found();
39      return;      return;
40    }    }
# Line 68  function profile_pages_perm() { Line 68  function profile_pages_perm() {
68   * @return string   * @return string
69   */   */
70  function theme_profile_page_listing($user)  {  function theme_profile_page_listing($user)  {
71    return $user->name .': '. $user->value .'<br />';    return check_plain($user->name) .': '. check_plain($user->value) .'<br />';
72  }  }
73  ?>  ?>

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.2