I am trying to create a module that will be used to manage a listing of stores. Currently, I am able to add and list the stores out just fine. When the stores are listed out, the necessary information is displayed with an edit link. When I click on the edit link, I am taken back to the add stores form, instead of seeing the text 'Edit Stores Here'. Anybody see what it is I'm doing wrong. Any help would be greatly appreciated.
<?php
// $Id: stores.module,v 1.0 2006/11/16 15:59:37 Alan Exp $
function stores_help($section) {
switch ($section) {
case 'admin/modules#description':
return t('Manage Stores');
case 'admin/settings/stores':
return t('Gives administrators the ability to manage store listings');
}
}
function stores_access($op, $node) {
if ($op == 'view' && ( user_access('view Stores') || user_access('administer Stores') ) )
return TRUE;
}
function stores_perm() {
return array('administer Stores', 'view Stores');
}
function stores_menu($may_cache){
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'admin/stores',
'title' => t('Stores'),
'callback' => 'stores_administration',
'access' => user_access('administer Stores')
);
$items[] = array(
'path' => 'admin/stores/add',
'title' => t('add stores'),
'callback' => 'stores_administration',
'access' => user_access('administer Stores'),