HEX
Server: Apache
System: Linux webm010.cluster103.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: iestorre (46869)
PHP: 8.0.30
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/iestorre/www2/modules/service_links/services/forward_services.module
<?php

/**
 * @file
 * Extends Service Links with Forward module support.
 *
 * @author Fabio Mucciante (TheCrow)
 */

/**
 * Implementation of hook_service_links().
 */
function forward_services_service_links() {
  $links = array();

  $links['forward'] = array(
    'name' => 'Forward',
    'link' => (variable_get('clean_url', 0) == 1) ? '<front-page>forward?path=<encoded-query>' : '<front-page>forward&path=<encoded-query>',
    'description' => t('Send to a friend'),
    'preset' => 'forward_url_fix',
  );

  return $links;
}

function forward_url_fix(&$service, &$settings, $node = NULL) {
  if (isset($node->nid)) {
    $service['link'] = str_replace('<encoded-query>', 'node/<node-id>', $service['link']);
  }
}