function weight_enable_page in Weight 5
1 string reference to 'weight_enable_page'
- weight_menu in ./
weight.module - Implementation of hook_menu().
File
- ./
weight.module, line 228
Code
function weight_enable_page() {
if ($_POST['op'] == t('Setup Database')) {
weight_old_nodes();
drupal_goto('admin/settings/weight');
}
$count = db_num_rows(db_query('SELECT DISTINCT nid FROM {node} WHERE sticky IN (0,1)'));
$output = t('<p>The weight module uses the node table\'s "sticky" column to
store weight information for each node. New and updated nodes will
automatically have their sticky and weight information remapped. However if
you have pre-existing nodes, you will need to update your database so that
these nodes sort correctly with new nodes.</p> <p>%count nodes need to be
updated.</p>', array(
'%count' => $count,
));
$output .= drupal_get_form('weight_setup_form');
return $output;
}