bookmarks change view mode
Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
parent
06a4d254c2
commit
f207e56b2d
@ -99,14 +99,17 @@ function materio_flag_menu() {
|
|||||||
|
|
||||||
$items['materioflag/ajax/list/%'] = $base+array(
|
$items['materioflag/ajax/list/%'] = $base+array(
|
||||||
'page callback' => 'materio_flag_ajax_list',
|
'page callback' => 'materio_flag_ajax_list',
|
||||||
'access arguments' => array('create flag lists'),
|
'access callback' => 'materio_access_ajax_flags',
|
||||||
'access callback' => 'user_access',
|
|
||||||
'page arguments' => array(3, 4),
|
'page arguments' => array(3, 4),
|
||||||
);
|
);
|
||||||
|
|
||||||
return $items;
|
return $items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function materio_access_ajax_flags(){
|
||||||
|
return ( user_access('create flag lists') || user_access('flag bookmarks') );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements hook_menu_alter().
|
* Implements hook_menu_alter().
|
||||||
*/
|
*/
|
||||||
|
@ -422,10 +422,13 @@ function materio_flag_ajax_list($fid, $page = 0){
|
|||||||
$debug = false;
|
$debug = false;
|
||||||
|
|
||||||
$_GET['page'] = $page;
|
$_GET['page'] = $page;
|
||||||
|
if($fid = 1){
|
||||||
$list_path = 'lists';
|
$list_path = $path = 'bookmarks';
|
||||||
|
}else{
|
||||||
$path = $list_path.'/'.$fid;
|
$list_path = 'lists';
|
||||||
|
$path = $list_path.'/'.$fid;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// check if request is ajax, if not rediret to search_api_page page with right keys
|
// check if request is ajax, if not rediret to search_api_page page with right keys
|
||||||
if (!$debug && (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) != 'xmlhttprequest')) {
|
if (!$debug && (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) != 'xmlhttprequest')) {
|
||||||
@ -459,7 +462,7 @@ function materio_flag_ajax_list($fid, $page = 0){
|
|||||||
menu_set_active_item($path);
|
menu_set_active_item($path);
|
||||||
$return = menu_execute_active_handler($path, FALSE);
|
$return = menu_execute_active_handler($path, FALSE);
|
||||||
|
|
||||||
// dsm($return, '$return');
|
dsm($return, '$return');
|
||||||
|
|
||||||
if (is_int($return)) {
|
if (is_int($return)) {
|
||||||
switch ($return) {
|
switch ($return) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user