Ignore:
Timestamp:
Jan 5, 2012, 11:06:21 PM (12 years ago)
Author:
rvelices
Message:

feature 2548 multisize - improved picture.php display (original...) + code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_url.inc.php

    r11831 r12855  
    661661}
    662662
     663
     664/**
     665 * @param id image id
     666 * @param what_part string one of 'e' (element), 'r' (representative)
     667 */
     668function get_action_url($id, $what_part, $download)
     669{
     670  $params = array(
     671        'id' => $id,
     672        'part' => $what_part,
     673      );
     674  if ($download)
     675  {
     676    $params['download'] = null;
     677  }
     678 
     679  return add_url_params(get_root_url().'action.php', $params);
     680}
     681
     682/*
     683 * @param element_info array containing element information from db;
     684 * at least 'id', 'path' should be present
     685 */
     686function get_element_url($element_info)
     687{
     688  $url = $element_info['path'];
     689  if ( !url_is_remote($url) )
     690  {
     691    $url = embellish_url(get_root_url().$url);
     692  }
     693  return $url;
     694}
     695
     696
    663697/**
    664698 * Indicate to build url with full path
Note: See TracChangeset for help on using the changeset viewer.