Ignore:
Timestamp:
Sep 25, 2008, 7:46:27 PM (16 years ago)
Author:
patdenice
Message:
  • Move get_extents function to include/functions.inc.php.
  • Change all plugins version to 2.0.
  • LocalFiles Editor can now edit and create template extension.
  • Editarea (for LocalFiles Editor) go to version 0.7.2.2 (chrome compatible)
  • Editarea activation is now saved in database with AJAX.
File:
1 edited

Legend:

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

    r2575 r2588  
    17891789}
    17901790
     1791/**
     1792 * returns a list of templates currently available in template-extension
     1793 * Each .tpl file is extracted from template-extension.
     1794 * @return array
     1795 */
     1796function get_extents($start='')
     1797{
     1798  if ($start == '') { $start = './template-extension'; }
     1799  $dir = opendir($start);
     1800  $extents = array();
     1801
     1802  while (($file = readdir($dir)) !== false)
     1803  {
     1804    if ( $file == '.' or $file == '..' or $file == '.svn') continue;
     1805    $path = $start . '/' . $file;
     1806    if (is_dir($path))
     1807    {
     1808      $extents = array_merge($extents, get_extents($path));
     1809    }
     1810    elseif ( !is_link($path) and file_exists($path)
     1811            and get_extension($path) == 'tpl' )
     1812    {
     1813      $extents[] = substr($path, 21);
     1814    }
     1815  }
     1816  return $extents;
     1817}
     1818
    17911819?>
Note: See TracChangeset for help on using the changeset viewer.