Index: contributions/modules/sections/sections.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/sections/sections.module,v
retrieving revision 1.16
diff -u -p -r1.16 sections.module
--- contributions/modules/sections/sections.module	8 Dec 2006 23:46:52 -0000	1.16
+++ contributions/modules/sections/sections.module	15 Mar 2007 18:26:00 -0000
@@ -57,11 +57,11 @@ function sections_settings_form($edit = 
   $form = array();
 
   $options = array(t('Show on every page except the listed pages.'), t('Show on only the listed pages.'));
-  $description = t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are '%blog' for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => theme('placeholder', 'blog'), '%blog-wildcard' =>  theme('placeholder', 'blog/*'), '%front' => theme('placeholder', '<front>')));
+  $description = t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>'));
 
   if ($access) {
     $options[] = t('Show if the following PHP code returns <code>TRUE</code> (PHP-mode, experts only).');
-    $description .= ' '. t('If the PHP-mode is chosen, enter PHP code between %php. Note that executing incorrect PHP-code can break your Drupal site.', array('%php' => theme('placeholder', '<?php ?>')));
+    $description .= ' '. t('If the PHP-mode is chosen, enter PHP code between %php. Note that executing incorrect PHP-code can break your Drupal site.', array('%php' => '<?php ?>'));
   }
 
   $form['section_settings'] = array(
@@ -125,11 +125,11 @@ function sections_settings_form($edit = 
     $form['submit'] = array('#type' => 'submit', '#value' => t('Add section'));
   }
 
-  print theme('page', drupal_get_form('section_settings', $form));
+  return $form;
 }
 
 
-function section_settings_submit($id, $edit) {
+function sections_settings_form_submit($id, $edit) {
   switch ($_POST['op']) {
     case t('Save section'):
       db_query("UPDATE {sections_data} SET name = '%s', status = '%d', visibility = '%d', template = '%s', path = '%s', weight = %d WHERE sid = '%d'", $edit['name'], $edit['status'], $edit['visibility'], $edit['template'], $edit['path'], $edit['weight'], $edit['sid']);
@@ -154,26 +154,31 @@ function _sections_delete($section) {
   switch ($op) {
     case t('Delete'):
       db_query('DELETE FROM {sections_data} WHERE sid = %d', $section->sid);
-      drupal_set_message(t('The section %name has been deleted.', array('%name' => '<em>'. $section->name .'</em>')));
+      drupal_set_message(t('The section %name has been deleted.', array('%name' => $section->name)));
       cache_clear_all();
       drupal_goto('admin/settings/sections');
       break;
 
     default:
-      $output = confirm_form(
-                    'comment_confirm_delete',
-                    array(),
-                    t('Are you sure you want to delete the section %name?', array('%name' => '<em>'. $section->name .'</em>')),
-                    'admin/settings/sections/',
-                    '',
-                    t('Delete'),
-                    t('Cancel'));
+      $output = drupal_get_form('_sections_delete_confirm', $section);
       break;
   }
 
-  print theme('page', $output);
+  return $output;
 }
 
+
+function _sections_delete_confirm($section) {
+  return confirm_form(
+    array(),
+    t('Delete section %name', array('%name' => $section->name)),
+    'admin/settings/sections/', 
+    t('<p>Are you sure you want to delete the section %name?</p>', array('%name' => $section->name)),
+    t('Delete'),
+    t('Cancel'));
+}
+
+
 /**
  * Implementation of hook_perm().
  *
@@ -204,26 +209,28 @@ function sections_menu($may_cache) {
     $access = user_access('adminster sections');
 
     // This is the minimum information you can provide for a menu item.
-    $items[] = array('path' => 'admin/settings/sections', 'title' => t('sections'),
+    $items[] = array('path' => 'admin/settings/sections', 'title' => t('Sections'),
+      'description' => t('Define sections of your site and apply themes to them.'),
       'callback' => 'sections_list',
       'access' => $access);
 
-    $items[] = array('path' => 'admin/settings/sections/list', 'title' => t('list'),
+    $items[] = array('path' => 'admin/settings/sections/list', 'title' => t('List'),
       'callback' => 'sections_list',
       'access' => $access,
       'type' => MENU_DEFAULT_LOCAL_TASK);
-    $items[] = array('path' => 'admin/settings/sections/add', 'title' => t('add'),
-      'callback' => 'sections_settings_form',
+    $items[] = array('path' => 'admin/settings/sections/add', 'title' => t('Add'),
+      'callback' => 'drupal_get_form',
+      'callback arguments' => array('sections_settings_form'),
       'access' => $access,
       'type' => MENU_LOCAL_TASK);
 
     foreach (_sections_load() as $section) {
-       $items[] = array('path' => 'admin/settings/sections/edit/'.$section->sid, 'title' => t('edit %name', array('%name'=>$section->name)),
-        'callback' => 'sections_settings_form',
-        'callback arguments' => array(NULL,$section),
+       $items[] = array('path' => 'admin/settings/sections/edit/'.$section->sid, 'title' => t('Edit %name', array('%name'=>$section->name)),
+        'callback' => 'drupal_get_form',
+        'callback arguments' => array('sections_settings_form', NULL, $section),
         'access' => $access,
         'type' => MENU_CALLBACK);
-       $items[] = array('path' => 'admin/settings/sections/delete/'.$section->sid, 'title' => t('edit %name', array('%name'=>$section->name)),
+       $items[] = array('path' => 'admin/settings/sections/delete/'.$section->sid, 'title' => t('Edit %name', array('%name'=>$section->name)),
         'callback' => '_sections_delete',
         'callback arguments' => array($section),
         'access' => $access,
