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

Diff of /contributions/modules/news/news.module

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

revision 1.14, Sun May 3 01:58:40 2009 UTC revision 1.15, Fri May 15 14:35:15 2009 UTC
# Line 10  Line 10 
10   * Implementation of hook_menu().   * Implementation of hook_menu().
11   */   */
12  function news_menu() {  function news_menu() {
13    return array(    module_load_include('menu.inc', 'news', 'includes/news');
14      'send/news' => array(    return news_menu_menu();
       'title'            => 'Send news',  
       'page callback'    => 'drupal_get_form',  
       'page arguments'   => array('news_form'),  
       'access arguments' => array('send news'),  
       'type'             => MENU_NORMAL_ITEM,  
       'file'             => 'news.form.inc',  
       'file path'        => drupal_get_path('module', 'news') .'/includes',  
     ),  
     'send/news/send' => array(  
       'title'            => 'Compose',  
       'page callback'    => 'drupal_get_form',  
       'page arguments'   => array('news_form'),  
       'access arguments' => array('send news'),  
       'type'             => MENU_DEFAULT_LOCAL_TASK,  
       'file'             => 'news.form.inc',  
       'file path'        => drupal_get_path('module', 'news') .'/includes',  
       'weight'           => -10,  
     ),  
     'send/news/list' => array(  
       'title'            => 'Lists',  
       'page callback'    => 'news_admin_lists',  
       'access arguments' => array('administer mailing lists'),  
       'type'             => MENU_LOCAL_TASK,  
       'file'             => 'news.admin.inc',  
       'file path'        => drupal_get_path('module', 'news') .'/includes',  
     ),  
     'send/news/%' => array(  
       'title'            => 'Send news',  
       'page callback'    => 'drupal_get_form',  
       'page arguments'   => array('news_form', 2),  
       'access arguments' => array('send news'),  
       'type'             => MENU_CALLBACK,  
       'file'             => 'news.form.inc',  
       'file path'        => drupal_get_path('module', 'news') .'/includes',  
     ),  
   );  
15  }  }
16    
17  /**  /**
# Line 59  function news_perm() { Line 23  function news_perm() {
23    
24  /**  /**
25   * Implementation of hook_elements().   * Implementation of hook_elements().
26   * Add a message element for the send form   * Add a message element for the send form.
27   */   */
28  function news_elements() {  function news_elements() {
29    return array(    return array(
# Line 68  function news_elements() { Line 32  function news_elements() {
32        '#process' => array('send_process'),        '#process' => array('send_process'),
33        '#after_build' => array('send_set_value'),        '#after_build' => array('send_set_value'),
34      ),      ),
     'news_contact' => array(  
       '#input' => TRUE,  
       '#process' => array('send_process'),  
       '#after_build' => array('send_set_value'),  
     ),  
35    );    );
36  }  }
37    

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.2