Changeset 27146


Ignore:
Timestamp:
Feb 3, 2014, 1:33:18 PM (7 years ago)
Author:
JanisV
Message:

Add new virt albums thumbnails

File:
1 edited

Legend:

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

    r27096 r27146  
    22/*
    33Plugin Name: physical2virtual
    4 Version: 2.6.a
     4Version: 2.6.b
    55Description: Autoconvert physical albums to virtual
    66Author: JanisV
     
    5050  {
    5151    $virt_name = $row['name'];
     52    $created = false;
    5253    if (!in_array($virt_name, $virt_cats))
    5354    {
    5455      $parent = isset($conf['physical2virtual']['parent_cat']) ? $conf['physical2virtual']['parent_cat'] : null;
    5556      $virt_id = create_virtual_category($virt_name, $parent)['id'];
     57      $created = true;
    5658
    5759      if (isset($conf['physical2virtual']['lock_physical']) and $conf['physical2virtual']['lock_physical'])
     
    7880    ;';
    7981    pwg_query($query);
     82
     83    if ($created)
     84    {
     85      set_random_representant(array($virt_id));
     86    }
    8087  }
    8188}
Note: See TracChangeset for help on using the changeset viewer.