Changeset 130


Ignore:
Timestamp:
Sep 17, 2003, 10:40:15 PM (21 years ago)
Author:
z0rglub
Message:

If we delete a picture which is logically linked to a category, the
informations about this category are not updated (number of pictures and
date of last picture) -> use of update_category( 'all' )

Location:
trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/configuration.php

    r108 r130  
    6969  {
    7070    $site = 'delete_site_'.$row['id'];
    71     if ( $_POST[$site] == 1 ) delete_site( $row['id'] );
     71    if ( $_POST[$site] == 1 )
     72    {
     73      delete_site( $row['id'] );
     74      // if any picture of this site were linked to another categories, we
     75      // have to update the informations of those categories. To make it
     76      // simple, we just update all the categories
     77      update_category( 'all' );
     78    }
    7279  }
    7380  // thumbnail prefix must not contain accentuated characters
  • trunk/admin/update.php

    r126 r130  
    4545    {
    4646      $output.= insert_local_image( $cat_directory, $cat_id );
    47       update_category( $cat_id );
    4847    }
    4948  }
     
    404403    }
    405404    $output.= insert_remote_image( $list_dirs[$i], $category_id );
    406     update_category( $category_id );
    407405    $output.= insert_remote_category( $list_dirs[$i], $site_id,
    408406                                      $category_id, $level+1 );
     
    599597  $vtp->closeSession( $sub, 'remote_update' );
    600598}
     599//---------------------------------------- update informations about categories
     600update_category( 'all' );
    601601//----------------------------------------------------------- sending html code
    602602$vtp->Parse( $handle , 'sub', $sub );
Note: See TracChangeset for help on using the changeset viewer.