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

Diff of /contributions/modules/autoassignrole/autoassignrole.module

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

revision 1.9.2.1 by cyberswat, Wed Sep 3 23:12:30 2008 UTC revision 1.9.2.2 by cyberswat, Mon Sep 29 16:24:13 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: autoassignrole.module,v 1.16 2008/09/03 22:12:03 cyberswat Exp $  // $Id: autoassignrole.module,v 1.9.2.1 2008/09/03 23:12:30 cyberswat Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 155  function _autoassignrole_settings($value Line 155  function _autoassignrole_settings($value
155          $return = $roles;          $return = $roles;
156          break;          break;
157        default:        default:
158          $return = $settings[$value];          if(isset($settings[$value])) {
159              $return = $settings[$value];
160            }
161            else {
162              $return = '';
163            }
164          break;          break;
165      }      }
166      return $return;      return $return;
167    }    }
168  }  }
169    
170    function _autoassignrole_path($rid, $value) {
171      static $pages = array();
172      if (count($pages) == 0) {
173        $result = db_query("SELECT rid, display, path, title, description from {autoassignrole_page}");
174        while ($s = db_fetch_object($result)) {
175          $pages[$s->rid] = array('path' => $s->path,
176            'display' => $s->display,
177            'title' => $s->title,
178            'description' => $s->description
179          );
180        }
181        return _autoassignrole_settings($rid, $value);
182      }
183      else {
184        if(isset($pages[$rid][$value])) {
185          $return = $pages[$rid][$value];
186        }
187        else {
188          $return = '';
189        }
190        return $return;
191      }
192    }
193    
194  function _autoassignrole_user_input($args) {  function _autoassignrole_user_input($args) {
195    switch ($args) {    switch ($args) {
196      case 'type':      case 'type':

Legend:
Removed from v.1.9.2.1  
changed lines
  Added in v.1.9.2.2

  ViewVC Help
Powered by ViewVC 1.1.3