Changeset 2365 in ExiteCMS
- Timestamp:
- 07/29/10 17:48:33 (5 weeks ago)
- Location:
- modules/ExiteCMS/tracsvn/php-files/modules/tracsvn
- Files:
-
- 5 edited
-
admin.php (modified) (6 diffs)
-
module_installer.php (modified) (6 diffs)
-
templates/modules.tracsvn.admin.tpl (modified) (2 diffs)
-
templates/modules.tracsvn.side_panel.tpl (modified) (2 diffs)
-
tracsvn.side_panel.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
modules/ExiteCMS/tracsvn/php-files/modules/tracsvn/admin.php
r2093 r2365 36 36 $database = stripinput($_POST['database']); 37 37 $url = stripinput($_POST['url']); 38 $repo = stripinput($_POST['repo']); 38 39 $trac_url = stripinput($_POST['trac_url']); 39 40 $cmd = stripinput($_POST['cmd']); … … 44 45 $view_diff = isNum($_POST['view_diff']) ? $_POST['view_diff'] : 102; 45 46 $view_file = isNum($_POST['view_file']) ? $_POST['view_file'] : 102; 46 47 47 48 $variables['message'] = ""; 48 49 … … 51 52 $variables['message'] = ($variables['message'] == "" ? "" : "<br />") . $locale['406']; 52 53 } else { 54 // if a repo is defined, check if it exists 55 if (!empty($repo)) { 56 if(!dbtable_exists("repository", $database)) { 57 $variables['message'] = ($variables['message'] == "" ? "" : "<br />") . $locale['459']; 58 } else { 59 $result = dbquery("SELECT * FROM ".$database.".repository WHERE name = '".mysql_real_escape_string($repo)."'"); 60 if (!dbrows($result)) { 61 $variables['message'] = ($variables['message'] == "" ? "" : "<br />") . $locale['460']; 62 } 63 } 64 } 53 65 // check if the cmd points to svn 54 66 $_tmp = explode(" ", $cmd); … … 86 98 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$database."' WHERE cfg_name = 'tracsvn_database'"); 87 99 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$url."' WHERE cfg_name = 'tracsvn_url'"); 100 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$repo."' WHERE cfg_name = 'tracsvn_repo'"); 88 101 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$trac_url."' WHERE cfg_name = 'tracsvn_trac_url'"); 89 102 $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$cmd."' WHERE cfg_name = 'tracsvn_svncmd'"); … … 121 134 $database = $settings['tracsvn_database']; 122 135 $url = $settings['tracsvn_url']; 136 $repo = $settings['tracsvn_repo']; 123 137 $trac_url = $settings['tracsvn_trac_url']; 124 138 $cmd = $settings['tracsvn_svncmd']; … … 190 204 $variables['database'] = $database; 191 205 $variables['url'] = $url; 206 $variables['repo'] = $repo; 192 207 $variables['trac_url'] = $trac_url; 193 208 $variables['cmd'] = $cmd; -
modules/ExiteCMS/tracsvn/php-files/modules/tracsvn/module_installer.php
r2323 r2365 24 24 $mod_title = "Trac-SVN reports"; 25 25 $mod_description = "This ExiteCMS module provides a reporting of Trac Project management, and connects to SVN to retrieve details status information"; 26 $mod_version = "0.1. 6";26 $mod_version = "0.1.7"; 27 27 $mod_developer = "WanWizard"; 28 28 $mod_email = "wanwizard@exitecms.org"; … … 129 129 $localestrings['en']['456'] = "Non-public repository paths:"; 130 130 $localestrings['en']['457'] = "Trac base URL:"; 131 $localestrings['en']['458'] = "Trac SVN repository name:"; 132 $localestrings['en']['459'] = "A repository name is given, but your Trac installation has no support for multirepos"; 133 $localestrings['en']['460'] = "The repository name entered can not be located in the Trac database"; 131 134 132 135 $localestrings['en']['500'] = "Changeset"; … … 211 214 $localestrings['nl']['456'] = "Niet publieke repository paden:"; 212 215 $localestrings['nl']['457'] = "Trac basis URL:"; 216 $localestrings['nl']['458'] = "Trac SVN repository naam:"; 217 $localestrings['nl']['459'] = "Een repository naam is ingevoerd, maar de Trac installatie heeft geen multirepos ondersteuning"; 218 $localestrings['nl']['460'] = "De repository naam die is ingevoerd kan niet gevonden worden in de Trac database"; 213 219 214 220 $localestrings['nl']['500'] = "Changeset"; … … 243 249 $mod_install_cmds[] = array('type' => 'db', 'value' => "INSERT INTO ".$db_prefix."configuration( cfg_name, cfg_value ) VALUES ('tracsvn_database', '')"); 244 250 $mod_install_cmds[] = array('type' => 'db', 'value' => "INSERT INTO ".$db_prefix."configuration( cfg_name, cfg_value ) VALUES ('tracsvn_url', '')"); 251 $mod_install_cmds[] = array('type' => 'db', 'value' => "INSERT INTO ".$db_prefix."configuration( cfg_name, cfg_value ) VALUES ('tracsvn_repo', '')"); 245 252 $mod_install_cmds[] = array('type' => 'db', 'value' => "INSERT INTO ".$db_prefix."configuration( cfg_name, cfg_value ) VALUES ('tracsvn_trac_url', '')"); 246 253 $mod_install_cmds[] = array('type' => 'db', 'value' => "INSERT INTO ".$db_prefix."configuration( cfg_name, cfg_value ) VALUES ('tracsvn_svncmd', '/usr/bin/svn')"); … … 270 277 $mod_uninstall_cmds[] = array('type' => 'db', 'value' => "DELETE FROM ##PREFIX##configuration WHERE cfg_name = 'tracsvn_database'"); 271 278 $mod_uninstall_cmds[] = array('type' => 'db', 'value' => "DELETE FROM ##PREFIX##configuration WHERE cfg_name = 'tracsvn_url'"); 279 $mod_uninstall_cmds[] = array('type' => 'db', 'value' => "DELETE FROM ##PREFIX##configuration WHERE cfg_name = 'tracsvn_repo'"); 272 280 $mod_uninstall_cmds[] = array('type' => 'db', 'value' => "DELETE FROM ##PREFIX##configuration WHERE cfg_name = 'tracsvn_trac_url'"); 273 281 $mod_uninstall_cmds[] = array('type' => 'db', 'value' => "DELETE FROM ##PREFIX##configuration WHERE cfg_name = 'tracsvn_svncmd'"); … … 322 330 case "0.1.5": 323 331 // no upgrades this version 332 case "0.1.6": 333 // add the new trac repo name (support for v0.12 multirepos) 334 $result = dbquery("INSERT INTO ".$db_prefix."configuration( cfg_name, cfg_value ) VALUES ('tracsvn_repo', '')"); 324 335 default: 325 336 // do this with every upgrade -
modules/ExiteCMS/tracsvn/php-files/modules/tracsvn/templates/modules.tracsvn.admin.tpl
r2093 r2365 58 58 <td width='50%' class='tbl'> 59 59 <input type='text' name='url' value='{$url}' maxlength='255' class='textbox' style='width:300px;' /> 60 </td> 61 </tr> 62 <tr> 63 <td width='50%' class='tbl'> 64 {$locale.458} 65 </td> 66 <td width='50%' class='tbl'> 67 <input type='text' name='repo' value='{$repo}' maxlength='50' class='textbox' style='width:250px;' /> 60 68 </td> 61 69 </tr> … … 126 134 </tr> 127 135 </table> 128 </form> 136 </form> 129 137 {include file="_closetable.tpl"} 130 138 {include file="_opentable.tpl" name=$_name title=$locale.407 state=$_state style=$_style} -
modules/ExiteCMS/tracsvn/php-files/modules/tracsvn/templates/modules.tracsvn.side_panel.tpl
r2093 r2365 20 20 {include file="_openside_x.tpl" name=$_name title=$locale.401 state=$_state style=$_style} 21 21 {if $rev != 0} 22 <div style="text-align:center;cursor:pointer;" onclick="window.open('{$settings.tracsvn_trac_url}changeset/{$rev} ')" title="{$locale.110} {$locale.402} {$rev}">22 <div style="text-align:center;cursor:pointer;" onclick="window.open('{$settings.tracsvn_trac_url}changeset/{$rev}{$repo}')" title="{$locale.110} {$locale.402} {$rev}"> 23 23 <span class='small'>{$locale.402}</span> 24 24 <b>{$rev}</b> … … 28 28 <b>{$date|date_format:"%d %b %Y · %H:%M"}</b> 29 29 <br /> 30 <span class='small'>{$locale.404}</span> 30 <span class='small'>{$locale.404}</span> 31 31 <b>{$dev.user_name}</b> 32 32 </div> -
modules/ExiteCMS/tracsvn/php-files/modules/tracsvn/tracsvn.side_panel.php
r2359 r2365 30 30 $data = dbarray($result); 31 31 $variables['rev'] = (int) $data['rev']; 32 if (empty($settings['tracsvn_repo'])) { 33 $variables['repo'] = ""; 34 } else { 35 $variables['repo'] = '/' . $settings['tracsvn_repo']; 36 } 32 37 if (strlen($data['time']) > 10) $data['time'] = substr($data['time'],0,10); 33 38 $variables['date'] = $data['time'];
Note: See TracChangeset
for help on using the changeset viewer.
