- 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.

git-svn-id: http://piwigo.org/svn/trunk@2588 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
patdenice 2008-09-25 17:46:27 +00:00
commit 1eb3d18ae2
46 changed files with 692 additions and 350 deletions

View file

@ -1788,4 +1788,32 @@ function get_user_access_level_html_options($MinLevelAccess = ACCESS_FREE, $MaxL
return $tpl_options;
}
/**
* returns a list of templates currently available in template-extension
* Each .tpl file is extracted from template-extension.
* @return array
*/
function get_extents($start='')
{
if ($start == '') { $start = './template-extension'; }
$dir = opendir($start);
$extents = array();
while (($file = readdir($dir)) !== false)
{
if ( $file == '.' or $file == '..' or $file == '.svn') continue;
$path = $start . '/' . $file;
if (is_dir($path))
{
$extents = array_merge($extents, get_extents($path));
}
elseif ( !is_link($path) and file_exists($path)
and get_extension($path) == 'tpl' )
{
$extents[] = substr($path, 21);
}
}
return $extents;
}
?>