Changeset 12727 for branches/2.3/include/ws_functions.inc.php
- Timestamp:
- Dec 13, 2011, 3:58:39 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3/include/ws_functions.inc.php
r12725 r12727 1786 1786 } 1787 1787 1788 $url_params = array('image_id' => $image_id); 1789 1788 1790 // let's add links between the image and the categories 1789 1791 if (isset($params['categories'])) 1790 1792 { 1791 1793 ws_add_image_category_relations($image_id, $params['categories']); 1794 1795 if (preg_match('/^\d+/', $params['categories'], $matches)) { 1796 $category_id = $matches[0]; 1797 1798 $query = ' 1799 SELECT id, name, permalink 1800 FROM '.CATEGORIES_TABLE.' 1801 WHERE id = '.$category_id.' 1802 ;'; 1803 $result = pwg_query($query); 1804 $category = pwg_db_fetch_assoc($result); 1805 1806 $url_params['section'] = 'categories'; 1807 $url_params['category'] = $category; 1808 } 1792 1809 } 1793 1810 … … 1802 1819 1803 1820 invalidate_user_cache(); 1821 1822 return array( 1823 'image_id' => $image_id, 1824 'url' => make_picture_url($url_params), 1825 ); 1804 1826 } 1805 1827
Note: See TracChangeset
for help on using the changeset viewer.