/[drupal]/contributions/modules/bookmarks/bookmarks.module
ViewVC logotype

Diff of /contributions/modules/bookmarks/bookmarks.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.47.2.7 by darthclue, Tue Mar 17 12:27:52 2009 UTC revision 1.47.2.8 by darthclue, Sun Jun 21 01:54:02 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: bookmarks.module,v 1.47.2.4 2009/01/20 15:02:42 darthclue Exp $  // $Id: bookmarks.module,v 1.47.2.7 2009/03/17 12:27:52 darthclue Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 233  function bookmarks_block($op = 'list', $ Line 233  function bookmarks_block($op = 'list', $
233      $block[0]["info"] = t("Bookmarks");      $block[0]["info"] = t("Bookmarks");
234      return $block;      return $block;
235    }    }
236    else if ($op == 'view') {    else if ($op == 'view' && user_access('administer own bookmarks')) {
237      foreach ($menus as $name => $title) {      foreach ($menus as $name => $title) {
238        // Menu blocks can't be cached because each menu item can have        // Menu blocks can't be cached because each menu item can have
239        // a custom access callback. menu.inc manages its own caching.        // a custom access callback. menu.inc manages its own caching.
# Line 291  function bookmarks_block($op = 'list', $ Line 291  function bookmarks_block($op = 'list', $
291      // Add admin options to bottom of block.      // Add admin options to bottom of block.
292      $block['content'] .= '<div style="text-align:center;">';      $block['content'] .= '<div style="text-align:center;">';
293      $path = drupal_urlencode(drupal_get_normal_path(drupal_get_path_alias($_GET['q'])));      $path = drupal_urlencode(drupal_get_normal_path(drupal_get_path_alias($_GET['q'])));
294        $query_variables = $_GET;
295        unset($query_variables['q']);
296        $query_string = '';
297        foreach ($query_variables as $key => $value) {
298          $query_string .= '&' . $key . '=' . $value;
299        }
300    
301      if (!empty($path)) {      if (!empty($path)) {
302        $block['content'] .= l(t('Add this page'), 'bookmarks/item/addpage/'. $path);        if (!empty($query_string)) {
303            $path .= '?' . $query_string;
304          }
305          $block['content'] .= l(t('Add this page'), 'bookmarks/item/addpage/'. base64_encode($path),array('attributes' => array('id' => 'bookmarks_addthispage')));
306        $block['content'] .= '&nbsp;|&nbsp;'. l(t('Customize'), 'bookmarks/mine');        $block['content'] .= '&nbsp;|&nbsp;'. l(t('Customize'), 'bookmarks/mine');
307      }      }
308      else {      else {

Legend:
Removed from v.1.47.2.7  
changed lines
  Added in v.1.47.2.8

  ViewVC Help
Powered by ViewVC 1.1.3