Changeset 960 for trunk/include/functions.inc.php
- Timestamp:
- Dec 3, 2005, 6:33:38 PM (18 years ago)
- Location:
- trunk/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include
- Property svn:ignore
-
old new 1 1 mysql.inc.php 2 config_local.inc.php
-
- Property svn:ignore
-
trunk/include/functions.inc.php
r894 r960 534 534 535 535 /** 536 * returns available templates 536 * returns available templates/themes 537 537 */ 538 538 function get_templates() 539 539 { 540 return get_dirs(PHPWG_ROOT_PATH.'template'); 540 return get_dirs(PHPWG_ROOT_PATH.'theme'); 541 } 542 function get_themes() 543 { 544 $themes = array(); 545 546 foreach (get_dirs(PHPWG_ROOT_PATH.'template') as $template) 547 { 548 foreach (get_dirs(PHPWG_ROOT_PATH.'template/'.$template.'/theme') as $theme) 549 { 550 array_push($themes, $template.'/'.$theme); 551 } 552 } 553 554 return $themes; 541 555 } 542 556 … … 566 580 else 567 581 { 568 $src = PHPWG_ROOT_PATH; 569 $src.= 'template/'.$user['template'].'/mimetypes/'; 582 $src = get_themeconf('mime_icon_dir'); 570 583 $src.= strtolower(get_extension($path)).'.png'; 571 584 } … … 727 740 return isset($lang[$key]) ? $lang[$key] : $key; 728 741 } 742 743 /** 744 * returns the corresponding value from $themeconf if existing. Else, the key is 745 * returned 746 * 747 * @param string key 748 * @return string 749 */ 750 function get_themeconf($key) 751 { 752 global $themeconf; 753 754 return $themeconf[$key]; 755 } 729 756 ?>
Note: See TracChangeset
for help on using the changeset viewer.