Changeset 27229


Ignore:
Timestamp:
02/06/14 09:55:31 (5 years ago)
Author:
JanisV
Message:

New options (unlock new virtual albums, inherit permissions)

Location:
extensions/physical2virtual
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/physical2virtual/admin.php

    r27164 r27229  
    1111    'private_physical' => isset($_POST['private_physical']),  
    1212    'store_structure' => isset($_POST['store_structure']),  
     13    'unlock_virtual' => isset($_POST['unlock_virtual']),  
     14    'inherit' => isset($_POST['inherit']),  
    1315    ); 
    1416  if (isset($_POST['parent_cat']) and $_POST['parent_cat'] > 0) 
  • extensions/physical2virtual/language/en_UK/plugin.lang.php

    r27164 r27229  
    77$lang['Convertion done'] = 'Convertion done'; 
    88$lang['Store folder structure'] = 'Store folder structure'; 
     9$lang['Unlock new virtual albums when possible'] = 'Unlock new virtual albums when possible'; 
     10$lang['New virtual albums inherit the group/user permissions from its parent'] = 'New virtual albums inherit the group/user permissions from its parent'; 
    911 
    1012?> 
  • extensions/physical2virtual/language/ru_RU/plugin.lang.php

    r27164 r27229  
    66$lang['Convert now'] = 'Конвертировать сейчас'; 
    77$lang['Store folder structure'] = 'Сохранять структуру папок'; 
     8$lang['Unlock new virtual albums when possible'] = 'Разблокировать новые виртуальные альбомы когда возможно'; 
     9$lang['New virtual albums inherit the group/user permissions from its parent'] = 'Новые виртуальные альбомы наследуют групповые/пользовательские права родителя'; 
    810 
    911?> 
  • extensions/physical2virtual/main.inc.php

    r27183 r27229  
    22/* 
    33Plugin Name: physical2virtual 
    4 Version: 2.6.c 
     4Version: 2.6.d 
    55Description: Autoconvert physical albums to virtual 
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=730 
     
    5656{ 
    5757  global $conf; 
     58   
     59  $options=array(); 
     60  if (isset($conf['physical2virtual']['unlock_virtual']) and $conf['physical2virtual']['unlock_virtual']) 
     61    $options['visible'] = true; 
     62  $options['inherit'] = $conf['physical2virtual']['inherit']; 
    5863 
    5964  $query = ' 
     
    7883      foreach ($uppers as $upper) 
    7984      { 
    80         $parent = find_or_create_virtual_category($upper['name'], $parent)['id']; 
     85        $parent = find_or_create_virtual_category($upper['name'], $parent, $options)['id']; 
    8186      } 
    8287    } 
    8388 
    84     $virt_cat = find_or_create_virtual_category($virt_name, $parent); 
    85 //    $virt_cat = create_virtual_category($virt_name, $parent)['id']; // use this for duplicate folders name 
     89    $virt_cat = find_or_create_virtual_category($virt_name, $parent, $options); 
     90//    $virt_cat = create_virtual_category($virt_name, $parent, $options); // use this for duplicate folders name 
    8691 
    8792    if (isset($conf['physical2virtual']['lock_physical']) and $conf['physical2virtual']['lock_physical']) 
  • extensions/physical2virtual/maintain.inc.php

    r27164 r27229  
    1515    'lock_physical' => false, 
    1616    'private_physical' => false, 
     17    'unlock_virtual' => false, 
     18    'inherit' => false, 
    1719    'update_on_manual' => true, 
    1820    'update_on_upload' => false, 
  • extensions/physical2virtual/template/admin.tpl

    r27164 r27229  
    3030  </li> 
    3131  <li> 
     32    <input type="checkbox" id="unlock_virtual" name="unlock_virtual"{if $physical2virtual.unlock_virtual} checked="checked"{/if}> 
     33    <label for="unlock_virtual"> 
     34      <b>{'Unlock new virtual albums when possible'|@translate}</b> 
     35    </label> 
     36  </li> 
     37  <li> 
     38    <input type="checkbox" id="inherit" name="inherit"{if $physical2virtual.inherit} checked="checked"{/if}> 
     39    <label for="inherit"> 
     40      <b>{'New virtual albums inherit the group/user permissions from its parent'|@translate}</b> 
     41    </label> 
     42  </li> 
     43  <li> 
    3244    <input type="checkbox" id="store_structure" name="store_structure"{if $physical2virtual.store_structure} checked="checked"{/if}> 
    3345    <label for="store_structure"> 
Note: See TracChangeset for help on using the changeset viewer.