diff --git a/codepot/src/codepot/models/subversionmodel.php b/codepot/src/codepot/models/subversionmodel.php index 689096e5..2f5c33e9 100644 --- a/codepot/src/codepot/models/subversionmodel.php +++ b/codepot/src/codepot/models/subversionmodel.php @@ -18,7 +18,7 @@ class SubversionModel extends Model return $canonical; } - function getFile ($projectid, $path, $rev = SVN_REVISION_HEAD) + function getFile ($projectid, $path, $rev = SVN_REVISION_HEAD, $no_file_content = FALSE) { //$url = 'file://'.CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}"; $orgurl = 'file://'.$this->_canonical_path(CODEPOT_SVNREPO_DIR."/{$projectid}/{$path}"); @@ -55,8 +55,15 @@ class SubversionModel extends Model if (array_key_exists ($info0['path'], $lsinfo) === FALSE) return FALSE; $fileinfo = $lsinfo[$info0['path']]; - $str = @svn_cat ($workurl, $rev); - if ($str === FALSE) return FALSE; + if ($no_file_content) + { + $str = ''; + } + else + { + $str = @svn_cat ($workurl, $rev); + if ($str === FALSE) return FALSE; + } $log = @svn_log ($workurl, $fileinfo['created_rev'], @@ -73,8 +80,7 @@ class SubversionModel extends Model } else $fileinfo['properties'] = NULL; - $fileinfo['fullpath'] = substr ( - $info0['url'], strlen($info0['repos'])); + $fileinfo['fullpath'] = substr ($info0['url'], strlen($info0['repos'])); $fileinfo['content'] = $str; $fileinfo['logmsg'] = (count($log) > 0)? $log[0]['msg']: ''; diff --git a/codepot/src/codepot/views/code_folder.php b/codepot/src/codepot/views/code_folder.php index 36e17716..7804c0ab 100644 --- a/codepot/src/codepot/views/code_folder.php +++ b/codepot/src/codepot/views/code_folder.php @@ -211,15 +211,17 @@ $(function () { //$("#code_folder_mainarea_result_info_loc_progress" ).progressbar().hide(); - $('#code_folder_search_submit').button().click (function (e) { - if ($.trim($("#code_folder_search_string").val()) != "") + $('#code_search_submit').button().click (function () { + if ($.trim($("#code_search_string").val()) != "") { - $('#code_folder_search_form').submit (); + $('#code_search_submit').button ('disable'); + $('#code_search_string').addClass("search-in-progress"); + $('#code_search_form').submit (); } }); /* - $('#code_folder_search_form').submit (function(e) { - if ($.trim($("#code_folder_search_string").val()) === "") + $('#code_search_form').submit (function(e) { + if ($.trim($("#code_search_string").val()) === "") { // prevent submission when the search string is empty. e.preventDefault(); @@ -310,7 +312,7 @@ $this->load->view (