Ignore:
Timestamp:
01/12/14 00:46:45 (6 years ago)
Author:
ddtddt
Message:

[extensions] - see_my_photos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/see_my_photos/main.inc.php

    r26634 r26641  
    2020 
    2121function add_link_SMP($menu_ref_arr) 
    22 { 
     22 { 
    2323  global $conf, $user; 
    24  
    25      $query = ' 
    26 SELECT DISTINCT(id) 
     24   $query = ' 
     25  SELECT DISTINCT(id) 
    2726  FROM '.IMAGES_TABLE.' 
    2827  INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id 
    2928  WHERE added_by = \''.$user['id'].'\' 
    3029;'; 
    31         $result = pwg_query($query); 
    32         $row = pwg_db_fetch_assoc($result); 
    33  
    34   if (!is_a_guest() and !empty($row)) 
    35  
     30  $result = pwg_query($query); 
     31  $row = pwg_db_fetch_assoc($result); 
     32 if (!is_a_guest() and !empty($row)) 
     33  {   
    3634  $menu = & $menu_ref_arr[0]; 
    37    
    3835  if (($block = $menu->get_block('mbSpecials')) != null) 
    39   { 
    40     load_language('plugin.lang', SMP_PATH); 
    41  
    42     $position = (isset($conf['SMP_position']) and is_numeric($conf['SMP_position'])) ? $conf['SMP_position'] : count($block->data)+1; 
    43  
    44     array_splice($block->data, $position-1, 0, array('see_my_photos' => 
     36   { 
     37   load_language('plugin.lang', SMP_PATH); 
     38   $position = (isset($conf['SMP_position']) and is_numeric($conf['SMP_position'])) ? $conf['SMP_position'] : count($block->data)+1; 
     39   array_splice($block->data, $position-1, 0, array('see_my_photos' => 
    4540      array( 
    4641        'URL' => make_index_url(array('section' => 'see_my_photos')), 
     
    5045      ) 
    5146    ); 
    52   }} 
     47   } 
     48        } 
    5349} 
    5450 
    5551function section_init_SMP() 
    56 { 
    57   global $tokens; 
     52 { 
     53 global $tokens; 
    5854  if (in_array('see_my_photos', $tokens)) 
    59     include(SMP_PATH . 'pagessmp.php'); 
    60 } 
     55  include(SMP_PATH . 'pagessmp.php'); 
     56 } 
    6157 
    6258 
Note: See TracChangeset for help on using the changeset viewer.