Skip to content

Commit

Permalink
modified hook_userpoints to include a default for
Browse files Browse the repository at this point in the history
  • Loading branch information
jredding committed Jan 9, 2009
1 parent 12951a3 commit 0089299
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions user2userpoints/user2userpoints.module
@@ -1,5 +1,5 @@
<?php
// $Id: user2userpoints.module,v 1.5 2009-01-09 09:20:16 jredding Exp $
// $Id: user2userpoints.module,v 1.6 2009-01-09 10:39:21 jredding Exp $

/**
* @file
Expand Down Expand Up @@ -220,7 +220,7 @@ function user2userpoints_giveform_submit($form, &$form_state) {
userpoints_userpointsapi($params);
}

function user2userpoints_userpoints($op, $params) {
function user2userpoints_userpoints($op, $params = array()) {
switch ($op) {
case 'setting':
$form['user2user'] = array(
Expand Down
4 changes: 2 additions & 2 deletions userpoints_badges/userpoints_badges.module
@@ -1,5 +1,5 @@
<?php
// $Id: userpoints_badges.module,v 1.2 2009-01-09 09:20:17 jredding Exp $
// $Id: userpoints_badges.module,v 1.3 2009-01-09 10:39:21 jredding Exp $

function userpoints_badges_menu() {
$items = array();
Expand Down Expand Up @@ -103,7 +103,7 @@ function userpoints_badges_run_mass_badge_check($bid, $userpoints_goal) {
/**
* Implementation of hook_userpoints
*/
function userpoints_badges_userpoints($op, $params) {
function userpoints_badges_userpoints($op, $params = array()) {
switch ($op) {
case 'setting':
$group = 'userpoints_badges';
Expand Down
4 changes: 2 additions & 2 deletions userpoints_invite/userpoints_invite.module
@@ -1,6 +1,6 @@
<?php

//$Id: userpoints_invite.module,v 1.10 2009-01-09 09:20:17 jredding Exp $
//$Id: userpoints_invite.module,v 1.11 2009-01-09 10:39:21 jredding Exp $

// Copyright 2005-2007 Khalid Baheyeldin http://2bits.com

Expand All @@ -18,7 +18,7 @@ function userpoints_invite_help($path, $arg) {
return $output;
}

function userpoints_invite_userpoints($op, $params) {
function userpoints_invite_userpoints($op, $params = array()) {
switch($op) {
case 'setting':
$group = 'invite';
Expand Down
4 changes: 2 additions & 2 deletions userpoints_no_negative/userpoints_no_negative.module
@@ -1,5 +1,5 @@
<?
// $Id: userpoints_no_negative.module,v 1.2 2009-01-09 09:20:17 jredding Exp $
// $Id: userpoints_no_negative.module,v 1.3 2009-01-09 10:39:22 jredding Exp $

/**
* @file
Expand All @@ -9,7 +9,7 @@
/**
* Implementation of hook_userpoints
*/
function userpoints_no_negative_userpoints($op, $params) {
function userpoints_no_negative_userpoints($op, $params = array()) {
$uid = $params['uid'];
$points = $params['points'];
if ($op == 'points before') {
Expand Down
4 changes: 2 additions & 2 deletions userpoints_pageviews/userpoints_pageviews.module
@@ -1,9 +1,9 @@
<?php
// $Id: userpoints_pageviews.module,v 1.2 2009-01-09 09:20:17 jredding Exp $
// $Id: userpoints_pageviews.module,v 1.3 2009-01-09 10:39:22 jredding Exp $

define('USERPOINTS_PAGE_VIEWS', 'userpoints_pageviews');

function userpoints_pageviews_userpoints($op, $params) {
function userpoints_pageviews_userpoints($op, $params = array()) {
if ($op == 'setting') {
$group = 'invite';
$form[$group] = array(
Expand Down
4 changes: 2 additions & 2 deletions userpoints_role/userpoints_role.module
@@ -1,6 +1,6 @@
<?php

//$Id: userpoints_role.module,v 1.5 2009-01-09 09:20:18 jredding Exp $
//$Id: userpoints_role.module,v 1.6 2009-01-09 10:39:22 jredding Exp $

// Copyright 2005-2007 Khalid Baheyeldin http://2bits.com

Expand All @@ -20,7 +20,7 @@ function userpoints_role_help($path, $arg) {
/**
* Role promotion/demotion based on points gained/lost
*/
function userpoints_role_userpoints($op, $params) {
function userpoints_role_userpoints($op, $params = array()) {
switch($op) {
case 'setting':
$group = 'role';
Expand Down
4 changes: 2 additions & 2 deletions userpoints_role_exempt/userpoints_role_exempt.module
@@ -1,5 +1,5 @@
<?php
//$Id: userpoints_role_exempt.module,v 1.4 2009-01-09 09:20:18 jredding Exp $
//$Id: userpoints_role_exempt.module,v 1.5 2009-01-09 10:39:22 jredding Exp $

// Copyright 2005-2008 Khalid Baheyeldin http://2bits.com

Expand All @@ -13,7 +13,7 @@ function userpoints_role_exempt_help($section) {
}
}

function userpoints_role_exempt_userpoints($op, $params) {
function userpoints_role_exempt_userpoints($op, $params = array()) {
switch($op) {
case 'setting':
$group = 'role_exempt';
Expand Down

0 comments on commit 0089299

Please sign in to comment.