Changeset 1688


Ignore:
Timestamp:
Jan 2, 2007, 10:02:39 AM (17 years ago)
Author:
vdigital
Message:

Physical duplicate files in Admin Advanced Functions

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/advanced_feature.php

    r1656 r1688  
    6666//    'U_ADV_????' => $start_url.'???',
    6767    'U_ADV_ELEMENT_NOT_LINKED' => PHPWG_ROOT_PATH.'admin.php?page=element_set&cat=not_linked',
     68    'U_ADV_DUP_FILES' => PHPWG_ROOT_PATH.'admin.php?page=element_set&cat=duplicates',
    6869    'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=advanced_feature'
    6970    )
  • trunk/admin/element_set.php

    r1072 r1688  
    138138else if ('not_linked' == $_GET['cat'])
    139139{
    140   $page['title'] = 'elements not linked to any virtual categories';
     140  $page['title'] = l10n('Elements_not_linked');
    141141 
    142142  // we are searching elements not linked to any virtual category
     
    163163  $page['cat_elements_id'] = array_diff($all_elements, $linked_to_virtual);
    164164}
    165 
     165else if ('duplicates' == $_GET['cat'])
     166{
     167  $page['title'] = l10n('Duplicates');
     168 
     169  // we are searching related elements twice or more to physical categories
     170  // 1 - Retrieve Files
     171  $query = '
     172SELECT DISTINCT(file)
     173  FROM '.IMAGES_TABLE.'
     174 GROUP BY file
     175HAVING COUNT(DISTINCT storage_category_id) > 1
     176;'; 
     177
     178  $duplicate_files = array_from_query($query, 'file');
     179  $duplicate_files[]='Nofiles';
     180  // 2 - Retrives related picture ids
     181  $query = '
     182SELECT id, file
     183  FROM '.IMAGES_TABLE.'
     184WHERE file IN (\''.implode("','", $duplicate_files).'\')
     185ORDER BY file, id
     186;';
     187
     188  $page['cat_elements_id'] = array_from_query($query, 'id');
     189  $page['cat_elements_id'][] = 0;
     190}
    166191// +-----------------------------------------------------------------------+
    167192// |                       first element to display                        |
  • trunk/language/en_UK.iso-8859-1/admin.lang.php

    r1682 r1688  
    572572$lang['note_check_more_info_forum'] = 'the forum';
    573573$lang['note_check_more_info_wiki'] = 'the wiki';
    574 
     574$lang['Duplicates'] = 'Files with same name in more than one physical category';
    575575
    576576?>
  • trunk/language/en_UK.iso-8859-1/help/advanced_feature.html

    r1656 r1688  
    77  <li>
    88    <strong>Not linked elements:</strong>
    9     Display images witch are not associaed with an virtual catgory
     9    Display images which are not associated to any virtual category.
     10  </li>
     11  <li>
     12    <strong>Files with same name in more than one physical category:</strong>
     13    Display images or any files which are found with the same filename in some categories.
    1014  </li>
    1115
  • trunk/language/fr_FR.iso-8859-1/admin.lang.php

    r1682 r1688  
    570570$lang['note_check_more_info_forum'] = 'le forum';
    571571$lang['note_check_more_info_wiki'] = 'le wiki';
     572$lang['Duplicates'] = 'Fichiers portant le même nom dans plusieurs' .
     573    ' catégories physiques';
    572574
    573575?>
  • trunk/language/fr_FR.iso-8859-1/help/advanced_feature.html

    r1656 r1688  
    66
    77  <li>
    8     <strong>Eléments non liés:</strong>
     8    <strong>Eléments non liés :</strong>
    99    Affiche les images qui ne sont pas associées à une catégorie virtuelle
     10  </li>
     11  <li>
     12    <strong>Fichiers portant le même nom dans plusieurs catégories physiques :</strong>
     13    Affiche les images ou les éventuels fichiers qui pourraient être trouvés dans plusieurs catégories.
    1014  </li>
    1115
  • trunk/template/yoga/admin/advanced_feature.tpl

    r1656 r1688  
    1010<!--  <li><a href="{U_ADV_????}" {TAG_INPUT_ENABLED}>{lang:update categories informations}</a></li>-->
    1111  <li><a href="{U_ADV_ELEMENT_NOT_LINKED}" {TAG_INPUT_ENABLED}>{lang:Elements_not_linked}</a></li>
     12  <li><a href="{U_ADV_DUP_FILES}" {TAG_INPUT_ENABLED}>{lang:Duplicates}</a></li>
    1213</ul>
Note: See TracChangeset for help on using the changeset viewer.