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

Diff of /contributions/modules/valuelist/valuelist.module

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

revision 1.2, Tue Feb 26 15:39:56 2008 UTC revision 1.3, Wed Feb 27 15:58:10 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  //$Id$  //$Id: valuelist.module,v 1.2 2008/02/26 15:39:56 usonian Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 167  function valuelist_edit_form_submit($for Line 167  function valuelist_edit_form_submit($for
167   * Edit access is required.  Create/Delete access optional.   * Edit access is required.  Create/Delete access optional.
168   */   */
169  function valuelist_dashboard() {  function valuelist_dashboard() {
   if (!user_access('create value lists')) {  
     drupal_access_denied();  
   }  
170    
171    $content = '';    $content = '';
172    
173    /* Retrieve a list of all items in the variable table whose `name` begins with 'valuelist_': */    /* Retrieve a list of all items in the variable table whose `name` begins with 'valuelist_': */
174    $result = db_query("SELECT `name` FROM {variable} WHERE `name` like 'valuelist_%' ORDER BY `name` ASC");    $result = db_query("SELECT `name` FROM {variable} WHERE `name` like 'valuelist_%' ORDER BY `name` ASC");
   
   
175    
176    if (db_num_rows($result) == 0) {    if (db_num_rows($result) == 0) {
177      $content .= t("No value lists found.");      $content .= t("No value lists found.");
# Line 195  function valuelist_dashboard() { Line 190  function valuelist_dashboard() {
190      $header = array(      $header = array(
191        t('Name'),        t('Name'),
192        t('Value List'),        t('Value List'),
193        t('&nbsp')        t('&nbsp;')
194      );      );
195    
196      $content .= theme('table', $header, $rows);      $content .= theme('table', $header, $rows);

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

  ViewVC Help
Powered by ViewVC 1.1.2