You are here

backend.inc in Filebrowser 6.2

File

includes/backend.inc
View source
<?php

/* This file is part of "filebrowser".
 *    Copyright 2009-2011, arNuméral
 *    Author : Yoran Brault
 *    eMail  : yoran.brault@bad_arnumeral.fr (remove bad_ before sending an email)
 *    Site   : http://www.arnumeral.fr
 *
 * "filebrowser" is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * "filebrowser" is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with "filebrowser"; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */

/**
 * remove all content bits from parent node id.
 */
function _filebrowser_node_content_delete($node) {
  db_query("\n  \tDELETE\n  \tFROM {node_dir_listing_content}\n  \tWHERE\n  \t\tnid = %d", $node->nid);
}

/**
 * Load a specific node content.
 *
 * @param $fid content fid
 * @return content record
 */
function _filebrowser_node_content_load($fid) {
  static $contents = array();
  if (isset($contents[$fid])) {
    return $contents[$fid];
  }
  $contents[$fid] = db_fetch_array(db_query("\n  \tSELECT *\n  \tFROM {node_dir_listing_content}\n  \tWHERE fid=%d", $fid));
  return $contents[$fid];
}

Functions

Namesort descending Description
_filebrowser_node_content_delete remove all content bits from parent node id.
_filebrowser_node_content_load Load a specific node content.