diff -ur copyright/copyright.info copyright-new/copyright.info --- copyright/copyright.info 2007-10-05 11:55:04.000000000 -0400 +++ copyright-new/copyright.info 2008-02-16 21:38:48.000000000 -0500 @@ -3,7 +3,8 @@ description = Site-wide and node-specific copyright management. ; Information added by drupal.org packaging script on 2007-10-05 -version = "5.x-1.6" +version = "6.x-1.x" +core = "6.x" project = "copyright" datestamp = "1191599704" diff -ur copyright/copyright.install copyright-new/copyright.install --- copyright/copyright.install 2007-10-05 11:47:40.000000000 -0400 +++ copyright-new/copyright.install 2008-02-16 21:45:32.000000000 -0500 @@ -173,7 +173,7 @@ ); foreach ($copyrights as $copyright) { - $cpyid = db_next_id("{copyrights}_cpyid"); + $cpyid = db_last_insert_id("{copyrights}_cpyid"); db_query("INSERT INTO {copyrights} (cpyid, name, description, site_notice, node_notice) VALUES (%d, '%s', '%s', '%s', '%s')", $cpyid, $copyright['name'], $copyright['description'], $copyright['site_notice'], $copyright['node_notice']); if (isset($copyright['source_url'])) { db_query("UPDATE {copyrights} SET source_url = '%s' WHERE cpyid = %d", $copyright['source_url'], $cpyid); diff -ur copyright/copyright.module copyright-new/copyright.module --- copyright/copyright.module 2007-10-05 11:47:40.000000000 -0400 +++ copyright-new/copyright.module 2008-02-16 21:44:44.000000000 -0500 @@ -49,8 +49,8 @@ /** * Implementation of hook_help(). */ -function copyright_help($section) { - switch ($section) { +function copyright_help($path, $args) { + switch ($path) { case 'admin/content/copyright': return t('The copyright module allows you to select a copyright for display on the site and each node. Some common copyright options are built in. You also have the option to create your own copyright(s).'); @@ -330,29 +330,29 @@ return $form; } -function copyright_edit_license_submit($form_id, $form_values) { +function copyright_edit_license_submit($form, $form_state) { $goto = 'admin/content/copyright/list'; switch ($_POST['op'] && user_access('administer copyright')) { case t('Submit'): - if (isset($form_values['cpyid'])) { - $cpyid = $form_values['cpyid']; + if (isset($form_state['values']['cpyid'])) { + $cpyid = $form_state['values']['cpyid']; _copyright_db_update_copyright($form_values); - module_invoke_all('copyright', 'update', 'license', $form_values); - $message = t('Updated copyright %name.', array('%name' => $form_values['name'])); + module_invoke_all('copyright', 'update', 'license', $form_state['values']); + $message = t('Updated copyright %name.', array('%name' => $form_state['values']['name'])); } else { - $cpyid = db_next_id('{copyrights}_cpyid'); - $form_values['cpyid'] = $cpyid; - _copyright_db_insert_copyright($form_values); + $cpyid = db_last_insert_id('{copyrights}_cpyid'); + $form_state['values']['cpyid'] = $cpyid; + _copyright_db_insert_copyright($form_state['values']); module_invoke_all('copyright', 'insert', 'license', $edit); - $message = t('Created new copyright %name.', array('%name' => $form_values['name'])); + $message = t('Created new copyright %name.', array('%name' => $form_state['values']['name'])); } cache_clear_all(); break; case t('Delete'): - $goto = 'admin/content/copyright/delete/' . $form_values['cpyid']; + $goto = 'admin/content/copyright/delete/'. $form_state['values']['cpyid']; break; } @@ -391,9 +391,9 @@ return drupal_access_denied(); } -function copyright_admin_delete_submit($form_id, $form_values) { - if ($form_values['confirm']) { - $license = $form_values['license']; +function copyright_admin_delete_submit($form, $form_state) { + if ($form_state['values']['confirm']) { + $license = $form_state['values']['license']; db_query("DELETE FROM {copyrights} WHERE cpyid = %d", $license->cpyid); db_query("DELETE FROM {copyright_node} WHERE cpyid = %d", $license->cpyid); cache_clear_all(); @@ -449,10 +449,10 @@ return $form; } -function copyright_admin_overview_submit($form_id, $form_values) { - if (is_numeric($form_values['default'])) { +function copyright_admin_overview_submit($form, $form_state) { + if (is_numeric($form_state['values']['default'])) { drupal_set_message(t('Default site-wide copyright updated.')); - variable_set('copyright-default', $form_values['default']); + variable_set('copyright-default', $form_state['values']['default']); } } @@ -864,7 +864,7 @@ * The default is to center and dull the text. */ function theme_copyright_footer($notice) { - return '
'; + return ''; } /**