Changeset 1880


Ignore:
Timestamp:
Mar 8, 2007, 2:55:49 AM (18 years ago)
Author:
rvelices
Message:
  • plugin administration: small fix during activation phase
  • plugins: added 3 actions in category_cats.inc.php and 1 event that allow a plugin to decide if insertion to #history occurs
  • added a warning in section_init if script_basename() is not index or picture (I think we'll have issues on some servers with this function)
  • web service methods categories.getImages, tags.getImages and images.search return now the image comment
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/plugins.php

    r1852 r1880  
    9090      {
    9191        array_push($errors, 'CANNOT '. $_GET['action'] .' - NOT INSTALLED');
     92        break;
    9293      }
    9394      if ($crt_db_plugin['state']!='inactive')
    9495      {
    9596        array_push($errors, 'invalid current state '.$crt_db_plugin['state']);
     97        break;
    9698      }
    9799      if ( file_exists($file_to_include) )
  • trunk/include/category_cats.inc.php

    r1876 r1880  
    178178    update_cats_with_filtered_data($categories);
    179179  }
    180   trigger_action('loc_begin_index_categories');
     180  trigger_action('loc_begin_index_category_thumbnails', $categories);
    181181  if ($conf['subcatify'])
    182182  {
     
    222222          )
    223223        );
     224       
     225      //plugins need to add/modify sth in this loop ?
     226      trigger_action('loc_index_category_thumbnail',
     227        $category, 'categories.category' );
    224228    }
    225229
     
    253257                                    $category['count_categories'],
    254258                                    true,
    255                                     '<BR>'
     259                                    '; '
    256260                                  ),
    257261
     
    285289        );
    286290
     291      //plugins need to add/modify sth in this loop ?
     292      trigger_action('loc_index_category_thumbnail',
     293        $category, 'thumbnails.line.thumbnail' );
     294
    287295      // create a new line ?
    288296      if (++$row_number == $user['nb_image_line'])
     
    301309    unset( $template->_tpldata['thumbnails.'] );//maybe write a func for that
    302310  }
     311  trigger_action('loc_end_index_category_thumbnails', $categories);
    303312}
    304313?>
  • trunk/include/functions.inc.php

    r1868 r1880  
    414414  global $conf, $user, $page;
    415415
     416  $do_log = true;
    416417  if (!$conf['log'])
    417418  {
    418     return false;
    419   }
    420 
     419    $do_log = false;
     420  }
    421421  if (is_admin() and !$conf['history_admin'])
    422422  {
    423     return false;
    424   }
    425 
     423    $do_log = false;
     424  }
    426425  if ($user['is_the_guest'] and !$conf['history_guest'])
     426  {
     427    $do_log = false;
     428  }
     429
     430  $do_log = trigger_event('pwg_log_allowed', $do_log, $image_id, $image_type);
     431 
     432  if (!$do_log)
    427433  {
    428434    return false;
  • trunk/include/section_init.inc.php

    r1876 r1880  
    299299      break;
    300300    }
     301    default:
     302      trigger_error('script_basename "'.script_basename().'" unknown',
     303        E_USER_WARNING);
    301304  }
    302305}
  • trunk/include/ws_functions.inc.php

    r1866 r1880  
    376376        }
    377377      }
    378       foreach ( array('name', 'file') as $k )
     378      foreach ( array('file', 'name', 'comment') as $k )
    379379      {
    380380        $image[$k] = $row[$k];
     
    830830        }
    831831      }
    832       foreach ( array('name', 'file') as $k )
     832      foreach ( array('file', 'name', 'comment') as $k )
    833833      {
    834834        $image[$k] = $row[$k];
     
    10361036        }
    10371037      }
    1038       foreach ( array('name', 'file') as $k )
     1038      foreach ( array('file', 'name', 'comment') as $k )
    10391039      {
    10401040        $image[$k] = $row[$k];
Note: See TracChangeset for help on using the changeset viewer.