Commit 3d17339b authored by das-peter's avatar das-peter Committed by merlinofchaos

Issue #1319872: Respect callback arguments when creating token in ctools_set_callback_token().

parent ec1dc1e2
......@@ -329,6 +329,10 @@ function ctools_set_variable_token($token) {
* $token = ctools_set_variable_token('id', 'mymodule_myfunction');
*/
function ctools_set_callback_token($token, $callback) {
// If the callback uses arguments they are considered in the token.
if (is_array($callback)) {
$token .= '-' . md5(serialize($callback));
}
$string = '<!-- ctools-page-' . $token . ' -->';
ctools_set_page_token($string, 'callback', $callback);
return $string;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment