- Timestamp:
- Jan 9, 2007, 7:01:49 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/advanced_feature.php
r1699 r1704 72 72 ( 73 73 'CAPTION' => l10n('Elements_not_linked'), 74 'URL' => get_root_url().'admin.php?page=element_set& cat=not_linked'74 'URL' => get_root_url().'admin.php?page=element_set&cat=not_linked' 75 75 )); 76 76 … … 79 79 ( 80 80 'CAPTION' => l10n('Duplicates'), 81 'URL' => get_root_url().'admin.php?page=element_set& cat=duplicates'81 'URL' => get_root_url().'admin.php?page=element_set&cat=duplicates' 82 82 )); 83 83 84 84 //$advanced_features is array of array composed of CAPTION & URL 85 85 $advanced_features = 86 trigger_event(' array_advanced_features', $advanced_features);86 trigger_event('get_admin_advanced_features_links', $advanced_features); 87 87 88 88 // +-----------------------------------------------------------------------+ -
trunk/admin/site_manager.php
r1699 r1704 298 298 //$plugin_links is array of array composed of U_HREF, U_HINT & U_CAPTION 299 299 $plugin_links = 300 trigger_event(' array_site_manager_plugin_links',300 trigger_event('get_admins_site_links', 301 301 $plugin_links, $row['id'], $is_remote); 302 302 -
trunk/plugins/add_index/admin/main_page.php
r1699 r1704 4 4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | 5 5 // | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net | 6 // | Copyright (C) 2006 Ruben ARNAUD - team@phpwebgallery.net|6 // | Copyright (C) 2006-2007 Ruben ARNAUD - team@phpwebgallery.net | 7 7 // +-----------------------------------------------------------------------+ 8 8 // | last modifier : $Author: rub $ … … 24 24 // +-----------------------------------------------------------------------+ 25 25 26 // +-----------------------------------------------------------------------+ 27 // | Here before to modify by user | 28 // +-----------------------------------------------------------------------+ 29 // Name of index file (index.php or index.htm or index.html) 30 if (!isset($conf['index']['file_name'])) 31 { 32 $conf['index']['file_name'] = 'index.php'; 33 } 34 // Name of index file (index.php or index.htm or index.html) 35 if (!isset($conf['index']['source_directory_name'])) 36 { 37 // Name of the directoty use in order to copy index file 38 $conf['index']['source_directory_name'] = 'include/index.php'; 26 if ((!defined('PHPWG_ROOT_PATH')) or (!(defined('IN_ADMIN') and IN_ADMIN))) 27 { 28 die('Hacking attempt!'); 39 29 } 40 30 … … 42 32 // | include | 43 33 // +-----------------------------------------------------------------------+ 44 45 if (!defined('PHPWG_ROOT_PATH'))46 {47 die ("Hacking attempt!");48 }49 50 34 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 51 35 include_once(PHPWG_ROOT_PATH.'include/common.inc.php'); … … 102 86 // | Main | 103 87 // +-----------------------------------------------------------------------+ 104 $index_file_src=PHPWG_ROOT_PATH.$conf['index']['source_directory_name']; 88 // Compute values 89 $index_file_src=$conf['add_index_source_directory_path'].$conf['add_index_filename']; 105 90 $overwrite_file=isset($_GET['overwrite']); 106 91 $site_id = (isset($_GET['site_id']) and is_numeric($_GET['site_id']) … … 108 93 : 0); 109 94 95 // Init values 110 96 $add_index_results = array(); 111 97 $count_copy = 0; … … 141 127 foreach (get_add_index_directories($galleries_url) as $dir_galleries) 142 128 { 143 $file_dest = $dir_galleries.'/'.$conf[' index']['file_name'];129 $file_dest = $dir_galleries.'/'.$conf['add_index_filename']; 144 130 if ($overwrite_file or !@file_exists($file_dest)) 145 131 { … … 175 161 } 176 162 177 if ($count_copy != 0) 163 // Show always an result, defaut (0 copy, $count_copy == $count_skip == 0) 164 if (($count_copy != 0) or ($count_skip == 0)) 178 165 { 179 166 array_push($add_index_results, -
trunk/plugins/add_index/language/en_UK.iso-8859-1/help/advanced_feature.html
r1699 r1704 3 3 <li> 4 4 <strong>Add and overwrite "index" files for all local sites:</strong> 5 Overwrite copy the file ./include/index.php inall sub-directories of gallerie local sites.5 Overwrite copy the file ./include/index.php to all sub-directories of gallerie local sites. 6 6 </li> 7 7 <ul> -
trunk/plugins/add_index/language/en_UK.iso-8859-1/help/site_manager.html
r1699 r1704 3 3 <li> 4 4 <strong>Add "index" files for local site:</strong> 5 Copy the file ./include/index.php inall sub-directories of selected local site.5 Copy the file ./include/index.php to all sub-directories of selected local site. 6 6 </li> 7 7 <ul> -
trunk/plugins/add_index/language/en_UK.iso-8859-1/plugin.lang.php
r1699 r1704 4 4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | 5 5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | 6 // | Copyright (C) 200 6-2007 Ruben ARNAUD - team@phpwebgallery.net |6 // | Copyright (C) 2007 Ruben ARNAUD - team@phpwebgallery.net | 7 7 // +-----------------------------------------------------------------------+ 8 8 // | branch : BSF (Best So Far) … … 30 30 $lang['Advanced_Add_Index'] = 'Add and overwrite "index" files for all local sites'; 31 31 $lang['Manager_Add_Index'] = 'add "index"'; 32 $lang['Menu_Add_Index'] = 'Add "index"'; 32 33 33 34 $lang['add_index_file_copied'] = '%s copied'; … … 42 43 $lang['add_index_src_file_dont_exists'] = 'Source file %s don\'t esists, cannot duplicate this file'; 43 44 45 $lang['add_index_Description_1'] = 'Add "index" files allows to copy "index" file from source directory to all sub-directories of gallerie local sites.'; 46 $lang['add_index_Description_2'] = '"index" file prevents to list contents of a directory.'; 47 $lang['add_index_Parameters'] = 'Parameters'; 48 $lang['add_index_filename'] = 'File name'; 49 $lang['add_index_source_directory_path'] = 'Path of source directory'; 50 51 44 52 ?> -
trunk/plugins/add_index/language/fr_FR.iso-8859-1/plugin.lang.php
r1699 r1704 4 4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | 5 5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | 6 // | Copyright (C) 200 6-2007 Ruben ARNAUD - team@phpwebgallery.net |6 // | Copyright (C) 2007 Ruben ARNAUD - team@phpwebgallery.net | 7 7 // +-----------------------------------------------------------------------+ 8 8 // | branch : BSF (Best So Far) … … 30 30 $lang['Advanced_Add_Index'] = 'Ajout et écrasement des fichiers "index" pour tous les sites locaux'; 31 31 $lang['Manager_Add_Index'] = 'ajout des "index"'; 32 $lang['Menu_Add_Index'] = 'Add "index"'; 32 33 33 34 $lang['add_index_file_copied'] = '%s copié'; … … 42 43 $lang['add_index_src_file_dont_exists'] = 'Le fichier source n\'existe pas, la duplication de ce fichier n\'est pas possible'; 43 44 45 $lang['add_index_Description_1'] = 'L\'ajout des fichiers " permet de copier le fichier "index" du repertoire source vers tous les sous-répertoires des galeries des sites locaux.'; 46 $lang['add_index_Description_2'] = 'Le fichier "index" empêche de lister le contenu d\'un répertoire.'; 47 $lang['add_index_Parameters'] = 'Paramètres'; 48 $lang['add_index_filename'] = 'Nom du fichier'; 49 $lang['add_index_source_directory_path'] = 'Chemin du répertoire source'; 50 44 51 ?> -
trunk/plugins/add_index/main.admin.inc.php
r1699 r1704 4 4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | 5 5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | 6 // | Copyright (C) 200 6-2007 Ruben ARNAUD - team@phpwebgallery.net |6 // | Copyright (C) 2007 Ruben ARNAUD - team@phpwebgallery.net | 7 7 // +-----------------------------------------------------------------------+ 8 8 // | branch : BSF (Best So Far) … … 34 34 class AdminAddIndex extends AddIndex 35 35 { 36 function load_params() 37 { 38 global $conf; 39 // Name of index file (index.php or index.htm or index.html) 40 if (!isset($conf['add_index_filename'])) 41 { 42 $conf['add_index_filename'] = 'index.php'; 43 } 44 // Name of index file (index.php or index.htm or index.html) 45 if (!isset($conf['add_index_source_directory_path'])) 46 { 47 // Name of the directoty use in order to copy index file 48 $conf['add_index_source_directory_path'] = PHPWG_ROOT_PATH.'include/'; 49 } 50 } 51 36 52 function loading_lang() 37 53 { … … 41 57 } 42 58 43 function array_advanced_features($advanced_features)59 function get_admin_advanced_features_links($advanced_features) 44 60 { 45 61 array_push($advanced_features, … … 47 63 ( 48 64 'CAPTION' => l10n('Advanced_Add_Index'), 49 'URL' => get_root_url().'admin.php?page=main_page& page_type=plugin&plugin_id=add_index&overwrite'65 'URL' => get_root_url().'admin.php?page=main_page&page_type=plugin&plugin_id=add_index&overwrite' 50 66 )); 51 67 … … 53 69 } 54 70 55 function array_site_manager_plugin_links($site_manager_plugin_links, $site_id, $is_remote)71 function get_admins_site_links($site_manager_plugin_links, $site_id, $is_remote) 56 72 { 57 73 if (!$is_remote) … … 60 76 array 61 77 ( 62 'U_HREF' => get_root_url().'admin.php?page=main_page& page_type=plugin&plugin_id=add_index&site_id='.$site_id,78 'U_HREF' => get_root_url().'admin.php?page=main_page&page_type=plugin&plugin_id=add_index&site_id='.$site_id, 63 79 'U_CAPTION' => l10n('Manager_Add_Index'), 64 80 'U_HINT' => l10n('Add_Index') … … 68 84 return $site_manager_plugin_links; 69 85 } 86 87 function plugin_admin_menu() 88 { 89 add_plugin_admin_menu(l10n('Menu_Add_Index'), array(&$this, 'do_plugin_admin_menu')); 90 } 91 92 function do_plugin_admin_menu($my_url) 93 { 94 include_once(dirname(__FILE__).'/admin/'.'admin_menu.php'); 95 } 96 70 97 } 71 98 99 // Create object 72 100 $add_index = new AdminAddIndex(); 73 101 102 // Load Add Index parameters 103 $add_index->load_params(); 104 105 // Add events 74 106 add_event_handler('loading_lang', array(&$add_index, 'loading_lang')); 75 add_event_handler('array_advanced_features', array(&$add_index, 'array_advanced_features')); 76 add_event_handler('array_site_manager_plugin_links', array(&$add_index, 'array_site_manager_plugin_links'), EVENT_HANDLER_PRIORITY_NEUTRAL, 3); 107 add_event_handler('get_admin_advanced_features_links', array(&$add_index, 'get_admin_advanced_features_links')); 108 add_event_handler('get_admins_site_links', array(&$add_index, 'get_admins_site_links'), EVENT_HANDLER_PRIORITY_NEUTRAL, 3); 109 add_event_handler('plugin_admin_menu', array(&$add_index, 'plugin_admin_menu') ); 77 110 78 111 ?> -
trunk/plugins/add_index/main.inc.php
r1699 r1704 10 10 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | 11 11 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | 12 // | Copyright (C) 200 6-2007 Ruben ARNAUD - team@phpwebgallery.net |12 // | Copyright (C) 2007 Ruben ARNAUD - team@phpwebgallery.net | 13 13 // +-----------------------------------------------------------------------+ 14 14 // | branch : BSF (Best So Far) … … 38 38 } 39 39 40 class AddIndex 40 if (in_array(script_basename(), array('popuphelp', 'admin'))) 41 41 { 42 var $path; 43 44 function AddIndex() 42 if (defined('IN_ADMIN') and IN_ADMIN) 45 43 { 46 $this->path = dirname(__FILE__).'/'; 44 include_once(dirname(__FILE__).'/'.'main.base.inc.php'); 45 include_once(dirname(__FILE__).'/'.'main.admin.inc.php'); 47 46 } 48 49 function get_popup_help_content($popup_help_content, $page) 47 else 50 48 { 51 $help_content = 52 @file_get_contents(get_language_filepath('help/'.$page.'.html', $this->path)); 53 if ($help_content == false) 54 { 55 return $popup_help_content; 56 } 57 else 58 { 59 return $popup_help_content.$help_content; 60 } 49 include_once(dirname(__FILE__).'/'.'main.base.inc.php'); 50 include_once(dirname(__FILE__).'/'.'main.normal.inc.php'); 61 51 } 62 52 } 63 53 64 if (defined('IN_ADMIN') and IN_ADMIN)65 {66 include_once(dirname(__FILE__).'/'.'main.admin.inc.php');67 }68 else69 {70 $add_index = new AddIndex();71 add_event_handler('get_popup_help_content', array(&$add_index, 'get_popup_help_content'), EVENT_HANDLER_PRIORITY_NEUTRAL, 2);72 }73 74 54 ?>
Note: See TracChangeset
for help on using the changeset viewer.