Ignore:
Timestamp:
Mar 7, 2006, 2:20:02 AM (18 years ago)
Author:
rvelices
Message:

bug fix: call to undefined session_create in register.php (added function
log_user called from identification and register)

bug fix: empty line at the beginning of functions.php disallowed cookies
(and hence logging in)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions.php

    r1064 r1068  
    1 
    21<?php
    32// +-----------------------------------------------------------------------+
     
    188187;';
    189188  pwg_query($query);
    190  
     189
    191190  $query = '
    192191DELETE FROM '.GROUP_ACCESS_TABLE.'
     
    206205
    207206  $sources_of = array();
    208  
     207
    209208  while ($row = mysql_fetch_array($result))
    210209  {
     
    446445  {
    447446    array_push($query_ids, $row['category_id']);
    448    
     447
    449448    array_push(
    450449      $datas,
     
    13501349{
    13511350  $images_of = array();
    1352  
     1351
    13531352  $query = '
    13541353SELECT category_id, image_id
     
    13691368      );
    13701369  }
    1371  
     1370
    13721371  $fulldirs = get_fulldirs(
    13731372    array_keys($images_of)
     
    16191618
    16201619  $destinations_of = array();
    1621  
     1620
    16221621  while ($row = mysql_fetch_array($result))
    16231622  {
     
    16391638    // let's suppose we only need a single turn
    16401639    $need_new_turn = false;
    1641    
     1640
    16421641    foreach ($destinations_of as $source => $destinations)
    16431642    {
     
    16561655            array($source) // no cyclic link
    16571656            );
    1658          
     1657
    16591658          if (count($missing_destinations) > 0)
    16601659          {
     
    16851684      $filtered_destinations_of[$category] = array();
    16861685    }
    1687    
     1686
    16881687    foreach ($destinations_of as $source => $destinations)
    16891688    {
     
    17131712
    17141713  $sources_of = array();
    1715  
     1714
    17161715  foreach ($destinations_of as $source => $destinations)
    17171716  {
     
    17261725    }
    17271726  }
    1728  
     1727
    17291728  // eventually, filter
    17301729  if (is_array($categories))
     
    17381737      $filtered_sources_of[$category] = array();
    17391738    }
    1740    
     1739
    17411740    foreach ($sources_of as $destination => $sources)
    17421741    {
     
    17841783    }
    17851784  }
    1786  
     1785
    17871786  $query = '
    17881787SELECT image_id, category_id
     
    18031802
    18041803  $inserts = array();
    1805  
     1804
    18061805  foreach ($sources_of as $destination => $sources)
    18071806  {
    18081807    // merge all images from the sources of this destination
    18091808    $sources_images = array();
    1810    
     1809
    18111810    foreach ($sources as $source)
    18121811    {
     
    18751874 *
    18761875 * Warning: only virtual links can be removed, physical links are protected.
    1877  * 
     1876 *
    18781877 * @param int destination
    18791878 * @param array sources
     
    18941893;';
    18951894  pwg_query($query);
    1896  
     1895
    18971896  // The strategy is the following:
    18981897  //
     
    19281927    $destinations_of[$destination]
    19291928    );
    1930  
     1929
    19311930  // unlink sources images from destinations
    19321931  $query = '
     
    19491948
    19501949  $request_random = array();
    1951  
     1950
    19521951  while ($row = mysql_fetch_array($result))
    19531952  {
     
    19791978{
    19801979  global $conf;
    1981  
     1980
    19821981  // is the given category name only containing blank spaces ?
    19831982  if (preg_match('/^\s*$/', $category_name))
     
    19851984    return array('error' => l10n('cat_error_name'));
    19861985  }
    1987        
     1986
    19881987  $parent_id = !empty($parent_id) ? $parent_id : 'NULL';
    19891988
     
    19941993;';
    19951994  list($current_rank) = mysql_fetch_array(pwg_query($query));
    1996  
     1995
    19971996  $insert = array(
    19981997    'name' => $category_name,
     
    20012000    'uploadable' => 'false',
    20022001    );
    2003    
     2002
    20042003  if ($parent_id != 'NULL')
    20052004  {
     
    20132012    $insert{'id_uppercat'} = $parent{'id'};
    20142013    $insert{'global_rank'} = $parent{'global_rank'}.'.'.$insert{'rank'};
    2015    
     2014
    20162015    // at creation, must a category be visible or not ? Warning : if the
    20172016    // parent category is invisible, the category is automatically create
     
    20252024      $insert{'visible'} = $conf['newcat_default_visible'];
    20262025    }
    2027    
     2026
    20282027    // at creation, must a category be public or private ? Warning : if the
    20292028    // parent category is private, the category is automatically create
     
    20672066;';
    20682067  pwg_query($query);
    2069  
     2068
    20702069  return array(
    20712070    'info' => l10n('cat_virtual_added'),
Note: See TracChangeset for help on using the changeset viewer.