Changeset 11334


Ignore:
Timestamp:
Jun 12, 2011, 7:54:34 PM (13 years ago)
Author:
mistic100
Message:

private items are not displayed in SmartAlbums (according to user permissions)

Location:
extensions/SmartAlbums
Files:
1 added
6 edited
2 moved

Legend:

Unmodified
Added
Removed
  • extensions/SmartAlbums/include/count_images.php

    r11290 r11334  
    1313{
    1414  $filters = array();
     15  $page['errors'] = array();
    1516  $limit_is_set = false;
     17 
    1618  foreach ($_POST['filters'] as $filter)
    1719  {
  • extensions/SmartAlbums/include/functions.inc.php

    r11333 r11334  
    2828      $datas
    2929      );
    30     set_random_representant(array($cat_id));
    31   }
     30  }
     31 
     32  set_random_representant(array($cat_id));
    3233 
    3334  return $images;
  • extensions/SmartAlbums/include/init_cat_list.php

    r11333 r11334  
    9494  global $smart_count;
    9595 
    96   $search[0] = '<ul class="categoryActions">';
    97   $replacement[0] = $search[0].'
     96  $search[0] = '{if isset($category.U_SYNC) }';
     97  $replacement[0] = '
    9898{if isset($SMART_URL[$category.ID])}
    99         <li><a href="{$SMART_URL[$category.ID]}" title="{\'regenerate photos list\'|@translate}"><img src="{$SMART_PATH}template/refresh.png" class="button" alt="{\'regenerate photos list\'|@translate}"></a></li>
    100 {/if}';
     99        <li><a href="{$SMART_URL[$category.ID]}" title="{\'Regenerate photos list of this SmartAlbum\'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/synchronize.png" class="button" alt="{\'regenerate photos list\'|@translate}"></a></li>
     100{/if}'
     101.$search[0];
    101102
    102103  if ($smart_count > 0)
     
    108109<form method="post" action="{$SMART_URL.all}">
    109110  <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
    110   <p><input class="submit" type="submit" value="{\'regenerate photos list of all SmartAlbums\'|@translate}"></p>
     111  <p><input class="submit" type="submit" value="{\'Regenerate photos list of all SmartAlbums\'|@translate}"></p>
    111112</form>';
    112113  }
  • extensions/SmartAlbums/include/init_cat_modify.php

    r11333 r11334  
    77function smart_cat_modify()
    88{
    9   global $template;
     9  global $template, $page;
    1010  include_once(SMART_PATH.'include/functions.inc.php');
    1111 
     
    3131      pwg_query('DELETE FROM '.IMAGE_CATEGORY_TABLE.' WHERE category_id = '.$cat_id.' AND smart = true;');
    3232      pwg_query('DELETE FROM '.CATEGORY_FILTERS_TABLE.' WHERE category_id = '.$cat_id.';');
     33      set_random_representant(array($cat_id));
    3334    }
    3435    /* no filter selected */
  • extensions/SmartAlbums/language/en_UK/plugin.lang.php

    r11290 r11334  
    2121$lang['This album is a SmartAlbum'] = 'This album is a SmartAlbum';
    2222$lang['Count'] = 'Count';
     23$lang['Regenerate photos list of this SmartAlbum'] = 'Regenerate photos list of this SmartAlbum';
     24$lang['Regenerate photos list of all SmartAlbums'] = 'Regenerate photos list of all SmartAlbums';
    2325
    2426?>
  • extensions/SmartAlbums/language/fr_FR/plugin.lang.php

    r11333 r11334  
    11<?php
    22
    3 $lang['%d photos associated to album &laquo;%s&raquo;'] = '%d photos associées à album &laquo;%s&raquo;';
     3$lang['%d photos associated to album &laquo;%s&raquo;'] = '%d photos associées à l\'album &laquo;%s&raquo;';
    44$lang['No filter selected'] = 'Aucun filter sélectionné';
    55$lang['No tag selected'] = 'Aucun tag sélectionné';
     
    2121$lang['This album is a SmartAlbum'] = 'Cet album est un SmartAlbum';
    2222$lang['Count'] = 'Compter';
     23$lang['Regenerate photos list of this SmartAlbum'] = 'Régénérer les photos de ce SmartAlbum';
     24$lang['Regenerate photos list of all SmartAlbums'] = 'Régénérer les photos de tous les SmartAlbums';
    2325
    2426?>
  • extensions/SmartAlbums/main.inc.php

    r11290 r11334  
    1616define('CATEGORY_FILTERS_TABLE', $prefixeTable.'category_filters');
    1717
    18 if (script_basename() == 'admin')
     18if (script_basename() == 'index')
     19{
     20  add_event_handler('loc_end_section_init', 'smart_init_page_items');
     21  include_once(SMART_PATH.'include/init_page_items.php');
     22}
     23else if (script_basename() == 'admin')
    1924{
    2025  load_language('plugin.lang', SMART_PATH);
    2126 
    22   add_event_handler('loc_begin_cat_modify', 'smart_init_cat_modify');
    23   function smart_init_cat_modify()
    24   {
    25     include_once(SMART_PATH.'init_cat_modify.php');
    26     smart_cat_modify();
    27   }
     27  add_event_handler('loc_begin_cat_modify', 'smart_cat_modify');
     28  include_once(SMART_PATH.'include/init_cat_modify.php');
    2829 
    29   add_event_handler('loc_begin_cat_list', 'smart_init_cat_list');
    30   function smart_init_cat_list()
    31   {
    32     include_once(SMART_PATH.'init_cat_list.php');
    33     smart_cat_list();
    34   }
     30  add_event_handler('loc_begin_cat_list', 'smart_cat_list');
     31  include_once(SMART_PATH.'include/init_cat_list.php');
    3532}
    3633
  • extensions/SmartAlbums/template/cat_modify.tpl

    r11333 r11334  
    3535    $('#SmartAlbum_options').toggle();
    3636    $('input[name="countImages"]').toggle();
     37    $('.count_images_display').toggle();
    3738  });
    3839 
Note: See TracChangeset for help on using the changeset viewer.