OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 25-Aug-2008 17:27:39 Branch: HEAD Handle: 2008082516273800 Modified files: openpkg-src/drupal drupal.patch drupal.spec Log: Fix again the 'actions' related administration dialog and corresponding run-time handling Summary: Revision Changes Path 1.30 +113 -1 openpkg-src/drupal/drupal.patch 1.333 +1 -1 openpkg-src/drupal/drupal.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/drupal/drupal.patch ============================================================================ $ cvs diff -u -r1.29 -r1.30 drupal.patch --- openpkg-src/drupal/drupal.patch 16 Aug 2008 18:26:08 -0000 1.29 +++ openpkg-src/drupal/drupal.patch 25 Aug 2008 15:27:38 -0000 1.30 @@ -344,7 +344,7 @@ --- /dev/null 2008-05-02 21:08:21 +0200 +++ sites/all/modules/img_assist/img_assist_popup.js 2008-05-02 21:05:56 +0200 @@ -0,0 +1,20 @@ -+/* $Id: drupal.patch,v 1.29 2008/08/16 18:26:08 rse Exp $ */ ++/* $Id: drupal.patch,v 1.30 2008/08/25 15:27:38 rse Exp $ */ + +function launch_popup(nid, mw, mh) { + var ox = mw; @@ -842,3 +842,115 @@ $channel['title'] = variable_get('site_name', 'Drupal') .' blogs'; $channel['link'] = url('blog', array('absolute' => TRUE)); +----------------------------------------------------------------------------- + +Fix "Action" related administration dialog and corresponding run-time handling. + +Index: modules/system/system.module +--- modules/system/system.module.orig 2008-04-09 23:11:49 +0200 ++++ modules/system/system.module 2008-05-23 10:41:26 +0200 +@@ -1431,7 +1439,7 @@ + if (is_numeric($action)) { + $aid = $action; + // Load stored parameter values from database. +- $data = db_fetch_object(db_query("SELECT * FROM {actions} WHERE aid = %d", intval($aid))); ++ $data = db_fetch_object(db_query("SELECT * FROM {actions} WHERE aid = '%s'", $aid)); + $edit['actions_description'] = $data->description; + $edit['actions_type'] = $data->type; + $function = $data->callback; + +Index: includes/actions.inc +--- includes/actions.inc.orig 2007-12-31 15:51:04 +0100 ++++ includes/actions.inc 2008-05-23 11:22:17 +0200 +@@ -54,7 +54,7 @@ + $where_values = array(); + foreach ($action_ids as $action_id) { + if (is_numeric($action_id)) { +- $where[] = 'OR aid = %d'; ++ $where[] = "OR aid = '%s'"; + $where_values[] = $action_id; + } + elseif (isset($available_actions[$action_id])) { +@@ -93,7 +93,7 @@ + else { + // If it's a configurable action, retrieve stored parameters. + if (is_numeric($action_ids)) { +- $action = db_fetch_object(db_query("SELECT * FROM {actions} WHERE aid = %d", $action_ids)); ++ $action = db_fetch_object(db_query("SELECT * FROM {actions} WHERE aid = '%s'", $action_ids)); + $function = $action->callback; + $context = array_merge($context, unserialize($action->parameters)); + $result[$action_ids] = $function($object, $context, $a1, $a2); +@@ -325,7 +325,7 @@ + function actions_save($function, $type, $params, $desc, $aid = NULL) { + $serialized = serialize($params); + if ($aid) { +- db_query("UPDATE {actions} SET callback = '%s', type = '%s', parameters = '%s', description = '%s' WHERE aid = %d", $function, $type, $serialized, $desc, $aid); ++ db_query("UPDATE {actions} SET callback = '%s', type = '%s', parameters = '%s', description = '%s' WHERE aid = '%s'", $function, $type, $serialized, $desc, $aid); + watchdog('actions', 'Action %action saved.', array('%action' => $desc)); + } + else { +@@ -333,7 +333,7 @@ + // separate table for numeric aids. + db_query('INSERT INTO {actions_aid} VALUES (default)'); + $aid = db_last_insert_id('actions_aid', 'aid'); +- db_query("INSERT INTO {actions} (aid, callback, type, parameters, description) VALUES (%d, '%s', '%s', '%s', '%s')", $aid, $function, $type, $serialized, $desc); ++ db_query("INSERT INTO {actions} (aid, callback, type, parameters, description) VALUES ('%s', '%s', '%s', '%s', '%s')", $aid, $function, $type, $serialized, $desc); + watchdog('actions', 'Action %action created.', array('%action' => $desc)); + } + +@@ -350,7 +350,7 @@ + * The appropriate action row from the database as an object. + */ + function actions_load($aid) { +- return db_fetch_object(db_query("SELECT * FROM {actions} WHERE aid = %d", $aid)); ++ return db_fetch_object(db_query("SELECT * FROM {actions} WHERE aid = '%s'", $aid)); + } + + /** +@@ -360,6 +360,6 @@ + * integer The ID of the action to delete. + */ + function actions_delete($aid) { +- db_query("DELETE FROM {actions} WHERE aid = %d", $aid); ++ db_query("DELETE FROM {actions} WHERE aid = '%s'", $aid); + module_invoke_all('actions_delete', $aid); + } +Index: modules/user/user.admin.inc +--- modules/user/user.admin.inc.orig 2008-08-14 01:59:14 +0200 ++++ modules/user/user.admin.inc 2008-08-25 17:24:27 +0200 +@@ -721,7 +721,7 @@ + * Menu callback: edit an access rule. + */ + function user_admin_access_edit($aid = 0) { +- $edit = db_fetch_array(db_query('SELECT aid, type, status, mask FROM {access} WHERE aid = %d', $aid)); ++ $edit = db_fetch_array(db_query('SELECT aid, type, status, mask FROM {access} WHERE aid = '%s'', $aid)); + return drupal_get_form('user_admin_access_edit_form', $edit, t('Save rule')); + } + +@@ -770,7 +770,7 @@ + function user_admin_access_form_submit($form, &$form_state) { + $edit = $form_state['values']; + if ($edit['aid']) { +- db_query("UPDATE {access} SET mask = '%s', type = '%s', status = '%s' WHERE aid = %d", $edit['mask'], $edit['type'], $edit['status'], $edit['aid']); ++ db_query("UPDATE {access} SET mask = '%s', type = '%s', status = '%s' WHERE aid = '%s'", $edit['mask'], $edit['type'], $edit['status'], $edit['aid']); + drupal_set_message(t('The access rule has been saved.')); + } + else { +@@ -858,7 +858,7 @@ + */ + function user_admin_access_delete_confirm($form_state, $aid = 0) { + $access_types = array('user' => t('username'), 'mail' => t('e-mail'), 'host' => t('host')); +- $edit = db_fetch_object(db_query('SELECT aid, type, status, mask FROM {access} WHERE aid = %d', $aid)); ++ $edit = db_fetch_object(db_query("SELECT aid, type, status, mask FROM {access} WHERE aid = '%s'", $aid)); + + $form = array(); + $form['aid'] = array('#type' => 'hidden', '#value' => $aid); +@@ -872,7 +872,7 @@ + } + + function user_admin_access_delete_confirm_submit($form, &$form_state) { +- db_query('DELETE FROM {access} WHERE aid = %d', $form_state['values']['aid']); ++ db_query("DELETE FROM {access} WHERE aid = '%s'", $form_state['values']['aid']); + drupal_set_message(t('The access rule has been deleted.')); + $form_state['redirect'] = 'admin/user/rules'; + return; @@ . patch -p0 <<'@@ .' Index: openpkg-src/drupal/drupal.spec ============================================================================ $ cvs diff -u -r1.332 -r1.333 drupal.spec --- openpkg-src/drupal/drupal.spec 23 Aug 2008 21:00:02 -0000 1.332 +++ openpkg-src/drupal/drupal.spec 25 Aug 2008 15:27:38 -0000 1.333 @@ -231,7 +231,7 @@ Group: CMS License: GPL Version: %{V_drupal} -Release: 20080823 +Release: 20080825 # package options %option with_mysql yes @@ . ______________________________________________________________________ OpenPKG http://openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org