Changeset 9572 for extensions/ContestResults/main.inc.php
- Timestamp:
- Mar 8, 2011, 1:19:06 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ContestResults/main.inc.php
r9333 r9572 2 2 /* 3 3 Plugin Name: ContestResults 4 Version: 1. 2.a4 Version: 1.3 5 5 Description: Add contests management pages 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=439 … … 16 16 // Variables globales CR 17 17 // +-----------------------------------------------------------------------+ 18 define('CR_NAME' , 'Contest Results'); 19 define('CR_VERSION', '1.3'); 18 20 define('CR_DIR' , basename(dirname(__FILE__))); 19 21 define('CR_PATH' , PHPWG_PLUGINS_PATH . CR_DIR . '/'); 20 22 define('CR_TABLE_1' , $prefixeTable . 'contests'); 21 23 define('CR_TABLE_2' , $prefixeTable . 'contests_results'); 22 define('CR_NAME' , 'ContestResults');23 define('CR_VERSION', '1.2.a');24 24 define('CR_ADMIN', PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . CR_DIR . '/admin/admin.php'); 25 25 define('CR_PUBLIC', make_index_url(array('section' => 'contests')) . '/'); … … 42 42 // Fonctions 43 43 // +-----------------------------------------------------------------------+ 44 include(CR_PATH . 'include/functions.php'); 44 45 // Gestion du menu 45 46 include(CR_PATH . 'include/cr_menubar.php'); … … 59 60 60 61 load_language('plugin.lang', CR_PATH); 61 include(CR_PATH . 'include/functions.php');62 62 63 63 if ($tokens[0] == 'contests') { // on est dans la section concours … … 65 65 $page['title'] = l10n('Contests'); 66 66 67 if (isset($tokens[1]) AND $tokens[1]) { // on est sur la page d'un concours 68 $page['contest'] = explode('-', $tokens[1]); 69 $page['contest'] = $page['contest'][0]; 70 $page['title'] .= $conf['level_separator'] . trigger_event('render_CR_content', get_contest_name($page['contest'])); 67 if (isset($tokens[1]) AND !empty($tokens[1])) { // on est sur la page d'un concours 68 $tokens[1] = explode('-', $tokens[1]); 69 if (preg_match('#^([0-9]*)$#', $tokens[1][0])) { // is_int ne marche pas parce que le chiffre est stocké en (string) 70 $page['contest'] = $tokens[1][0]; 71 $page['title'] .= $conf['level_separator'] . trigger_event('render_CR_content', get_contest_name($page['contest'])); 72 } 71 73 } 72 74 }
Note: See TracChangeset
for help on using the changeset viewer.