summaryrefslogtreecommitdiff
path: root/includes/actions.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-12-20 05:20:21 +0000
committerDries Buytaert <dries@buytaert.net>2008-12-20 05:20:21 +0000
commitee700371aca60269b9c752d1e143cae64d18a745 (patch)
tree0b1a841aa4adb127b7b57bb1bf3eb4f8e47a4d1e /includes/actions.inc
parent1415f6b74390ec844ccf42d281b6eddcbb11c84e (diff)
downloadbrdo-ee700371aca60269b9c752d1e143cae64d18a745.tar.gz
brdo-ee700371aca60269b9c752d1e143cae64d18a745.tar.bz2
- Patch #319404 by Dave Reid: simplify actions_sychronize and remove paramater.
Diffstat (limited to 'includes/actions.inc')
-rw-r--r--includes/actions.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/includes/actions.inc b/includes/actions.inc
index 98b9b8eae..f18f54c5c 100644
--- a/includes/actions.inc
+++ b/includes/actions.inc
@@ -245,11 +245,14 @@ function actions_function_lookup($hash) {
* the actions table. This is necessary so that actions that do not require
* configuration can receive action IDs. This is not necessarily the best
* approach, but it is the most straightforward.
+ *
+ * @param $delete_orphans
+ * Boolean if TRUE, any actions that exist in the database but are no longer
+ * found in the code (for example, because the module that provides them has
+ * been disabled) will be deleted.
*/
-function actions_synchronize($actions_in_code = array(), $delete_orphans = FALSE) {
- if (!$actions_in_code) {
- $actions_in_code = actions_list(TRUE);
- }
+function actions_synchronize($delete_orphans = FALSE) {
+ $actions_in_code = actions_list(TRUE);
$actions_in_db = db_query("SELECT aid, callback, description FROM {actions} WHERE parameters = ''")->fetchAllAssoc('callback', PDO::FETCH_ASSOC);
// Go through all the actions provided by modules.