Changeset 32592 in spip-zone
- Timestamp:
- Nov 1, 2009, 5:22:14 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/mutualisation/exec/mutualisation.php
r31652 r32592 50 50 $stats = intval($meta['popularite_total']); 51 51 if ($plugins = @unserialize($meta['plugin'])) { 52 $plugins = array_keys($plugins); 52 53 ksort($plugins); 54 foreach ($plugins as $plugin) 55 $lsplugs[$plugin][] = $v; 53 56 $plugins = count($plugins) 54 57 . ' <small>' 55 . strtolower(join(', ', array_keys($plugins)))58 . strtolower(join(', ', $plugins)) 56 59 . '</small>'; 57 60 } else … … 82 85 } 83 86 $page .= "</tbody></table>"; 84 87 88 if ($lsplugs) { 89 $page .= "<br /><br /><table style='clear:both;'> 90 <thead> 91 <tr> 92 <td>#</td> 93 <td>Plugins utilisés</td> 94 <td>Sites</td> 95 </tr> 96 </thead> 97 <tbody>"; 98 foreach ($lsplugs as $plugin => $c) 99 $plnum[count($c)] .= "<tr><td>".count($c)."</td><td>$plugin</td><td>".join(', ', $c).'</td></tr>'; 100 krsort($plnum); 101 $page .= join('', $plnum); 102 $page .= "</tbody></table>\n"; 103 } 104 85 105 $page .= '<div style="text-align:center;"><img src="' 86 106 . _DIR_IMG.'mutualiser.png' … … 139 159 function mutualisation_lister_sites_dist() { 140 160 $sites = array(); 141 # Code tres tres tres lent ! 142 # foreach(preg_files('../'.$GLOBALS['mutualisation_dir'].'/', '.*/config/connect.php') as $s) { 143 # $sites[] = preg_replace(',^\.\./'.$GLOBALS['mutualisation_dir'].'/(.*)/config/connect.php,', '\1', $s); 144 # } 145 # Code rapide 146 $dir = '../'.$GLOBALS['mutualisation_dir'].'/'; 147 if (is_dir($dir)) { 148 if ($dh = @opendir($dir)) { 149 while (($file = readdir($dh)) !== false) { 150 if ((filetype($dir . $file) == 'dir') OR (filetype($dir . $file) == 'link')) { 151 if (file_exists($dir . $file . '/config/'. _FILE_CONNECT_INS . '.php')) $sites[] = $file; 152 } 153 } 154 closedir($dh); 155 } 161 foreach(glob('../'.$GLOBALS['mutualisation_dir'].'/*/config/connect.php') as $s) { 162 $sites[] = preg_replace(',^\.\./'.$GLOBALS['mutualisation_dir'].'/(.*)/config/connect.php,', '\1', $s); 156 163 } 157 164 sort($sites);
Note: See TracChangeset
for help on using the changeset viewer.