annotate admin/application/libraries/hgphp.php @ 44:46961a5f545c

Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
author joshjcarrier
date Wed, 09 Jun 2010 00:59:15 -0700
parents 2cf4300b3541
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
1 <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
2
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
3 /**
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
4 * CodeIgniter Mercurial Repository Management class
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
5 *
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
6 * Scans file system and Mercurial projects directory, allowing
11
2ec108f96fad Cleaned up config. UI tidy up. Commenting. Still missing caching and concurrency checks.
joshjcarrier
parents: 10
diff changeset
7 * web-based manipulation of the hgweb.config and hgrc configuration files.
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
8 *
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
9 * Depends on the HgConf2Ini library.
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
10 *
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
11 * @package CodeIgniter
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
12 * @subpackage Libraries
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
13 * @category Libraries
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
14 * @author Josh Carrier
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
15 * @link blog.joshjcarrier.com
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
16 *
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
17 */
7
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
18 class HgPHP
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
19 {
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
20 private $_ci;
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
21 private $_ofl_lock_hgweb;
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
22 private $_ofl_lock_hgrc;
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
23
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
24 function __construct($config = array())
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
25 {
28
4543c151a667 Added additional configuration options. Fixed last possible concurrency error, removing a single hgweb.config.lock with per-save temporary files.
joshjcarrier
parents: 24
diff changeset
26 $this->_ci =& get_instance();
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
27 if(!empty($config))
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
28 {
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
29 $this->initialize($config);
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
30 }
28
4543c151a667 Added additional configuration options. Fixed last possible concurrency error, removing a single hgweb.config.lock with per-save temporary files.
joshjcarrier
parents: 24
diff changeset
31 else
4543c151a667 Added additional configuration options. Fixed last possible concurrency error, removing a single hgweb.config.lock with per-save temporary files.
joshjcarrier
parents: 24
diff changeset
32 {
4543c151a667 Added additional configuration options. Fixed last possible concurrency error, removing a single hgweb.config.lock with per-save temporary files.
joshjcarrier
parents: 24
diff changeset
33 $this->_ci->config->load('hgphp', TRUE);
4543c151a667 Added additional configuration options. Fixed last possible concurrency error, removing a single hgweb.config.lock with per-save temporary files.
joshjcarrier
parents: 24
diff changeset
34 $this->initialize($this->_ci->config->item('hgphp'));
4543c151a667 Added additional configuration options. Fixed last possible concurrency error, removing a single hgweb.config.lock with per-save temporary files.
joshjcarrier
parents: 24
diff changeset
35 }
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
36
7
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
37 $this->_ci->lang->load('hgphp');
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
38 $this->_ci->load->library('hgconf2ini');
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
39 log_message('debug', 'HgPHP class Initialized');
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
40 }
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
41
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
42 function initialize($config = array())
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
43 {
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
44 foreach($config as $key=>$val)
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
45 {
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
46 $this->{'_'.$key} = $val;
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
47 }
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
48 }
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
49
1
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
50 /**
4
1648e02be7e0 Global lockout permission config
joshjcarrier
parents: 3
diff changeset
51 * Public accessors - hgweb.config
1648e02be7e0 Global lockout permission config
joshjcarrier
parents: 3
diff changeset
52 */
1648e02be7e0 Global lockout permission config
joshjcarrier
parents: 3
diff changeset
53
1648e02be7e0 Global lockout permission config
joshjcarrier
parents: 3
diff changeset
54 /**
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
55 * Associates OFL locks
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
56 */
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
57 function start_transaction(&$ofl_lock_hgweb, &$ofl_lock_hgrc)
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
58 {
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
59 $this->_ofl_lock_hgweb = &$ofl_lock_hgweb;
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
60 $this->_ofl_lock_hgrc = &$ofl_lock_hgrc;
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
61 }
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
62
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
63 /**
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
64 * Disassociates OFL locks
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
65 */
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
66 function end_transaction()
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
67 {
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
68 $dummy = '';
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
69 $this->_ofl_lock_hgweb = &$dummy;
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
70 $this->_ofl_lock_hgrc = &$dummy;
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
71 }
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
72
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
73 /**
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
74 * Returns a list of available repositories.
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
75 * Will show up if: detected in repo directory
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
76 * Will have status "enabled" if: detected in hgweb.config
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
77 *
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
78 * @return an array of 0 or more detected repositories
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
79 */
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
80 function lsdir()
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
81 {
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
82 $realdir = $this->__realdirscan();
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
83 $this->_ci->hgconf2ini->register_OFL($this->_ofl_lock_hgweb);
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
84 $hgwebdir_compat = $this->_ci->hgconf2ini->getHgWebDirCollections();
2
492f28533a05 Cleaned up hgweb.config loading data array a bit. Starting to implement locking system, repository editor.
joshjcarrier
parents: 1
diff changeset
85
41
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
86 $allrepo = $realdir;
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
87 if(!is_integer($hgwebdir_compat))
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
88 {
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
89 $allrepo = array_merge($realdir, $hgwebdir_compat);
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
90 }
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
91 else
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
92 {
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
93 // error code
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
94 return $hgwebdir_compat;
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
95 }
1
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
96
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
97 $hgrepos = array();
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
98 foreach($allrepo as $repo)
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
99 {
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
100 $hgrepos[$repo]['name'] = $repo;
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
101
2
492f28533a05 Cleaned up hgweb.config loading data array a bit. Starting to implement locking system, repository editor.
joshjcarrier
parents: 1
diff changeset
102 if(isset($realdir[$repo]) && isset($hgwebdir_compat[$repo]))
1
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
103 {
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
104 $hgrepos[$repo]['status'] = HGPHP_REPO_STATUS_ENABLED;
1
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
105 }
2
492f28533a05 Cleaned up hgweb.config loading data array a bit. Starting to implement locking system, repository editor.
joshjcarrier
parents: 1
diff changeset
106 else if(isset($realdir[$repo]) && !isset($hgwebdir_compat[$repo]))
1
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
107 {
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
108 $hgrepos[$repo]['status'] = HGPHP_REPO_STATUS_DISABLED;
1
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
109 }
2
492f28533a05 Cleaned up hgweb.config loading data array a bit. Starting to implement locking system, repository editor.
joshjcarrier
parents: 1
diff changeset
110 else if(!isset($realdir[$repo]) && isset($hgwebdir_compat[$repo]))
1
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
111 {
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
112 $hgrepos[$repo]['status'] = HGPHP_REPO_STATUS_MISSING;
1
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
113 }
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
114 }
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
115
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
116 return $hgrepos;
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
117 }
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
118
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
119 /**
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
120 * Create a Hg repository by:
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
121 * - adding an entry in hgrc if not present
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
122 * - creating a bare repository if not present
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
123 * @param r_name name of the new repository to create, used as folder name
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
124 * @return status code
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
125 */
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
126 function create_repository($r_name)
3
53341b414217 Ability to create repository entry (via uri), which updates live hgweb.config + sets up an empty directory to push to.
joshjcarrier
parents: 2
diff changeset
127 {
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
128 if(!$this->can_create($r_name))
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
129 {
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
130 return HGPHP_ERR_PERM_USR;
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
131 }
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
132
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
133 $create_status = HGPHP_OK;
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
134
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
135 $lsdir = $this->_ci->hgconf2ini->getHgWebDirCollections();
19
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
136
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
137 // simplifies repo list into array where name is both key and value
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
138 // this is how hgweb.config wants it
41
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
139 $existingdir = array();
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
140
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
141 if(!is_integer($lsdir))
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
142 {
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
143 $existingdir = array_keys($lsdir);
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
144 }
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
145 else
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
146 {
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
147 // error code
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
148 return $lsdir;
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
149 }
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
150
19
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
151 $tempexistingdir = array();
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
152 foreach($existingdir as $repo_name)
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
153 {
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
154 $tempexistingdir[$repo_name] = $repo_name;
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
155 }
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
156 $existingdir = $tempexistingdir;
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
157
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
158 // not registered in hgweb.config
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
159 if(!isset($lsdir[$r_name]))
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
160 {
19
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
161 // edit the directory
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
162 $existingdir[$r_name] = $r_name;
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
163 $this->_ci->hgconf2ini->register_OFL($this->_ofl_lock_hgweb);
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
164 $create_status = $this->_ci->hgconf2ini->setHgWebDirCollections($existingdir);
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
165 if($create_status == HGPHP_OK)
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
166 {
19
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
167 // then create the repository
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
168 $this->_ci->hgconf2ini->register_OFL($this->_ofl_lock_hgrc);
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
169 $create_status = $this->create_repository_dir($r_name);
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
170 }
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
171 }
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
172 else
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
173 {
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
174 // repository already exists
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
175 $create_status = HGPHP_ERR_FS_PREEXISTS;
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
176 }
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
177 return $create_status;
3
53341b414217 Ability to create repository entry (via uri), which updates live hgweb.config + sets up an empty directory to push to.
joshjcarrier
parents: 2
diff changeset
178 }
53341b414217 Ability to create repository entry (via uri), which updates live hgweb.config + sets up an empty directory to push to.
joshjcarrier
parents: 2
diff changeset
179
17
4aa2707ae587 Optimistic locking integration mostly completed (missing some temp file stuff on hgweb.config). Need return code constants + ensure all error codes can be returned. OFL not enabled until session integration
joshjcarrier
parents: 11
diff changeset
180 /**
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
181 * update_repository
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
182 * Update repository's hgrc
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
183 * @param r_name name of the repository to update hgrc for
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
184 * @param hgrc_data array representing new hgrc file
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
185 * @return status code
17
4aa2707ae587 Optimistic locking integration mostly completed (missing some temp file stuff on hgweb.config). Need return code constants + ensure all error codes can be returned. OFL not enabled until session integration
joshjcarrier
parents: 11
diff changeset
186 */
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
187 function update_repository($r_name, $hgrc_data)
10
0e7e4cead7c9 HGRC write and handle true/false key values
joshjcarrier
parents: 9
diff changeset
188 {
23
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
189 if(!$this->can_update($r_name))
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
190 {
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
191 return HGPHP_ERR_PERM_USR;
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
192 }
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
193 $this->_ci->hgconf2ini->register_OFL($this->_ofl_lock_hgrc);
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
194 return $this->_ci->hgconf2ini->setHGRC($r_name, $hgrc_data);
10
0e7e4cead7c9 HGRC write and handle true/false key values
joshjcarrier
parents: 9
diff changeset
195 }
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
196
17
4aa2707ae587 Optimistic locking integration mostly completed (missing some temp file stuff on hgweb.config). Need return code constants + ensure all error codes can be returned. OFL not enabled until session integration
joshjcarrier
parents: 11
diff changeset
197 /**
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
198 * delete_repository
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
199 * Deletes a repository from the file system and unregisters it from hgweb.config
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
200 * @param r_name name of the repo to delete permanently
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
201 * @return status code
17
4aa2707ae587 Optimistic locking integration mostly completed (missing some temp file stuff on hgweb.config). Need return code constants + ensure all error codes can be returned. OFL not enabled until session integration
joshjcarrier
parents: 11
diff changeset
202 */
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
203 function delete_repository($r_name)
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
204 {
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
205 if(!$this->can_delete($r_name))
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
206 {
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
207 return HGPHP_ERR_PERM_USR;
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
208 }
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
209
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
210 $del_status = HGPHP_OK;
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
211 $lsdir = $this->_ci->hgconf2ini->getHgWebDirCollections();
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
212
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
213 // simplifies repo list into array where name is both key and value
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
214 // this is how hgweb.config wants it
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
215 $existingdir = array_keys($lsdir);
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
216 $tempexistingdir = array();
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
217 foreach($existingdir as $repo_name)
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
218 {
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
219 $tempexistingdir[$repo_name] = $repo_name;
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
220 }
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
221 $existingdir = $tempexistingdir;
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
222
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
223 if(isset($lsdir[$r_name]))
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
224 {
19
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
225 // edit the directory
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
226 unset($existingdir[$r_name]);
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
227 // remove hgweb.config
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
228 $this->_ci->hgconf2ini->register_OFL($this->_ofl_lock_hgweb);
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
229 $del_status = $this->_ci->hgconf2ini->setHgWebDirCollections($existingdir);
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
230
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
231 // remove from hgweb.config
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
232 if($del_status == HGPHP_OK)
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
233 {
19
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
234 // existing filesystem is not missing, thus needs to be deleted
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
235 if($lsdir[$r_name]['status'] != HGPHP_REPO_STATUS_MISSING)
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
236 {
23
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
237 // unregister hgrc from transaction manager to keep index small
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
238 $this->_ci->hgconf2ini->register_OFL($this->_ofl_lock_hgrc);
23
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
239 $del_status = $this->_ci->hgconf2ini->unlinkHGRC($r_name);
19
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
240
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
241 if($del_status == HGPHP_OK)
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
242 {
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
243 $del_status = $this->delete_repository_dir($r_name);
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
244 }
51f6d4415b09 completed Issue #8 security - block creation of 'admin' repository name and issue #2 concurrency - hgweb support
joshjcarrier
parents: 18
diff changeset
245 }
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
246 }
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
247 }
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
248 else
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
249 {
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
250 $del_status = HGPHP_ERR_FS_PREEXISTS;
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
251 }
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
252 return $del_status;
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
253 }
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
254
17
4aa2707ae587 Optimistic locking integration mostly completed (missing some temp file stuff on hgweb.config). Need return code constants + ensure all error codes can be returned. OFL not enabled until session integration
joshjcarrier
parents: 11
diff changeset
255 /**
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
256 * stat_repository
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
257 * Returns the HGRC represented as an array for the specified repository
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
258 * @param r_name name of the project whose hgrc to retrieve
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
259 * @return array representing hgrc or status code
17
4aa2707ae587 Optimistic locking integration mostly completed (missing some temp file stuff on hgweb.config). Need return code constants + ensure all error codes can be returned. OFL not enabled until session integration
joshjcarrier
parents: 11
diff changeset
260 */
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
261 function stat_repository($r_name)
9
97bc7635ce3f HGRC read properties, and prepped for write
joshjcarrier
parents: 8
diff changeset
262 {
23
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
263 if(!$this->can_view($r_name))
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
264 {
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
265 return HGPHP_ERR_PERM_USR;
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
266 }
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
267 $this->_ci->hgconf2ini->register_OFL($this->_ofl_lock_hgrc);
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
268 return $this->_ci->hgconf2ini->getHGRC($r_name);
9
97bc7635ce3f HGRC read properties, and prepped for write
joshjcarrier
parents: 8
diff changeset
269 }
4
1648e02be7e0 Global lockout permission config
joshjcarrier
parents: 3
diff changeset
270
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
271
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
272 /**
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
273 * can_create
23
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
274 * Checks if user has permissions to create this repository.
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
275 * Requires view permission.
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
276 * @param r_name name of repository wanting to be created
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
277 * @return true if allowed
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
278 */
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
279 function can_create($r_name)
4
1648e02be7e0 Global lockout permission config
joshjcarrier
parents: 3
diff changeset
280 {
24
26ff1899349f Bug fix: improper can_view function call causing script crash.
joshjcarrier
parents: 23
diff changeset
281 return $this->can_view($r_name) && $this->_hgwebconf_allow_repo_create;
23
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
282 }
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
283
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
284 /**
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
285 * can_update
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
286 * Checks if user has permissions to update this repository
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
287 * Requires view permission.
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
288 * @param r_name name of repository wanting to be updated
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
289 * @return true if allowed
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
290 */
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
291 function can_update($r_name)
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
292 {
24
26ff1899349f Bug fix: improper can_view function call causing script crash.
joshjcarrier
parents: 23
diff changeset
293 return $this->can_view($r_name) && $this->_hgwebconf_allow_repo_update;
23
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
294 }
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
295
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
296 /**
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
297 * can_create
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
298 * Checks if user has permissions to view this repository
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
299 * @param r_name name of repository wanting to be created
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
300 * @return true if allowed
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
301 */
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
302 function can_view($r_name)
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
303 {
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
304 return $this->_hgwebconf_allow_repo_view;
4
1648e02be7e0 Global lockout permission config
joshjcarrier
parents: 3
diff changeset
305 }
7
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
306
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
307 /**
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
308 * can_delete
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
309 * Checks if user has permissions to delete this repository
23
6f38dd98ff78 View and update permission checks (all permissions default to true atm)
joshjcarrier
parents: 19
diff changeset
310 * Requires view permission.
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
311 * @param r_name name of repository wanting to be deleted
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
312 * @return true if allowed
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
313 */
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
314 function can_delete($r_name)
7
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
315 {
24
26ff1899349f Bug fix: improper can_view function call causing script crash.
joshjcarrier
parents: 23
diff changeset
316 return $this->can_view($r_name) && $this->_hgwebconf_allow_repo_delete;
7
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
317 }
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
318
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
319 /**
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
320 * create_repository_dir
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
321 * Creates a whole repository directory, with hgrc
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
322 * @param r_name name of repository to create directory for
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
323 * @return status code
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
324 */
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
325 function create_repository_dir($r_name)
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
326 {
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
327 if(!$this->can_create($r_name))
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
328 {
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
329 return HGPHP_ERR_PERM_USR;
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
330 }
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
331
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
332 // create repo directory structure recursively
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
333 $create_status = mkdir($this->_repositories_abs_dir . $r_name . '/.hg/store/data/', 0755, TRUE);
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
334
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
335 if($create_status == TRUE)
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
336 {
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
337 // create hgrc
44
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
338 $this->_ci->hgconf2ini->register_OFL($this->_ofl_lock_hgrc);
46961a5f545c Pulled the OFL out of hgphp and hgconf2ini method signatures in favor of 'transaction' order of method calls
joshjcarrier
parents: 41
diff changeset
339 $create_status = $this->_ci->hgconf2ini->touchHGRC($r_name);
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
340 }
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
341 else
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
342 {
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
343 // system couldn't make directory
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
344 $create_status = HGPHP_ERR_PERM_SYS_REPODIR;
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
345 }
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
346 return $create_status;
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
347 }
7
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
348
4
1648e02be7e0 Global lockout permission config
joshjcarrier
parents: 3
diff changeset
349 /**
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
350 * delete_repository_dir
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
351 * Deletes a whole repository directory including hgrc and data files
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
352 * @param r_name name of repository to delete directory of
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
353 * @return status code
17
4aa2707ae587 Optimistic locking integration mostly completed (missing some temp file stuff on hgweb.config). Need return code constants + ensure all error codes can be returned. OFL not enabled until session integration
joshjcarrier
parents: 11
diff changeset
354 */
8
6215bb22f3d3 Refactored config handler functions to new library.
joshjcarrier
parents: 7
diff changeset
355 function delete_repository_dir($repository_name)
4
1648e02be7e0 Global lockout permission config
joshjcarrier
parents: 3
diff changeset
356 {
7
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
357 if(!$this->can_delete($repository_name))
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
358 {
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
359 return HGPHP_ERR_PERM_USR;
7
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
360 }
4
1648e02be7e0 Global lockout permission config
joshjcarrier
parents: 3
diff changeset
361
11
2ec108f96fad Cleaned up config. UI tidy up. Commenting. Still missing caching and concurrency checks.
joshjcarrier
parents: 10
diff changeset
362 $cd = $this->_repositories_abs_dir . $repository_name;
7
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
363 $this->recursiveDelete($cd . '/.hg/');
17
4aa2707ae587 Optimistic locking integration mostly completed (missing some temp file stuff on hgweb.config). Need return code constants + ensure all error codes can be returned. OFL not enabled until session integration
joshjcarrier
parents: 11
diff changeset
364 $del_status = $this->recursiveDelete($cd);
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
365 if($del_status == TRUE)
17
4aa2707ae587 Optimistic locking integration mostly completed (missing some temp file stuff on hgweb.config). Need return code constants + ensure all error codes can be returned. OFL not enabled until session integration
joshjcarrier
parents: 11
diff changeset
366 {
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
367 $del_status = HGPHP_OK;
17
4aa2707ae587 Optimistic locking integration mostly completed (missing some temp file stuff on hgweb.config). Need return code constants + ensure all error codes can be returned. OFL not enabled until session integration
joshjcarrier
parents: 11
diff changeset
368 }
4aa2707ae587 Optimistic locking integration mostly completed (missing some temp file stuff on hgweb.config). Need return code constants + ensure all error codes can be returned. OFL not enabled until session integration
joshjcarrier
parents: 11
diff changeset
369 else
4aa2707ae587 Optimistic locking integration mostly completed (missing some temp file stuff on hgweb.config). Need return code constants + ensure all error codes can be returned. OFL not enabled until session integration
joshjcarrier
parents: 11
diff changeset
370 {
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
371 $del_status = HGPHP_ERR_PERM_SYS_REPODIR;
17
4aa2707ae587 Optimistic locking integration mostly completed (missing some temp file stuff on hgweb.config). Need return code constants + ensure all error codes can be returned. OFL not enabled until session integration
joshjcarrier
parents: 11
diff changeset
372 }
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
373 return $del_status;
4
1648e02be7e0 Global lockout permission config
joshjcarrier
parents: 3
diff changeset
374 }
3
53341b414217 Ability to create repository entry (via uri), which updates live hgweb.config + sets up an empty directory to push to.
joshjcarrier
parents: 2
diff changeset
375
1
2d2757428cc6 Repository directory can detect if a repo is enabled, disabled, or missing. Can also parse hgweb.config with a compatibility fix (convert / to ---- as defined in config)
joshjcarrier
parents: 0
diff changeset
376 /**
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
377 * Performs a real directory scan where the projects are suppose to reside.
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
378 *
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
379 * @return the array containing 0 or more valid directories
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
380 */
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
381 function __realdirscan()
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
382 {
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
383 $this->_ci->load->helper('directory');
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
384
11
2ec108f96fad Cleaned up config. UI tidy up. Commenting. Still missing caching and concurrency checks.
joshjcarrier
parents: 10
diff changeset
385 $realdir = directory_map($this->_repositories_abs_dir, TRUE);
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
386
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
387 $verifiedrealdir = array();
41
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
388 if(is_array($realdir))
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
389 {
41
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
390 foreach($realdir as $file)
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
391 {
41
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
392 // checks if we detected a folder
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
393 if(is_dir($this->_repositories_abs_dir . $file))
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
394 {
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
395 $verifiedrealdir[$file] = $file;
2cf4300b3541 - hgweb.config and the repositories can now exist in separate directories
joshjcarrier
parents: 28
diff changeset
396 }
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
397 }
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
398 }
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
399
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
400 return $verifiedrealdir;
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
401 }
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
402
7
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
403 /**
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
404 * Delete a file or recursively delete a directory
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
405 *
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
406 * @param string $str Path to file or directory
18
9aceab434288 Using constants instead of magic numbers. Cleaned up code and commenting.
joshjcarrier
parents: 17
diff changeset
407 * @return true on successful deletion
7
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
408 */
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
409 function recursiveDelete($str){
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
410 if(is_file($str)){
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
411 return @unlink($str);
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
412 }
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
413 elseif(is_dir($str)){
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
414 $scan = glob(rtrim($str,'/').'/*');
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
415 foreach($scan as $index=>$path){
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
416 $this->recursiveDelete($path);
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
417 }
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
418 return @rmdir($str);
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
419 }
9790c4a95b14 delete repo&data + basic UI support for delete
joshjcarrier
parents: 5
diff changeset
420 }
0
9124b60de5a6 CodeIgniter 1.7.2 base. .htaccess modification for subdirectory serve. Hg_conf library begin - can scan directories on disk.
joshjcarrier
parents:
diff changeset
421 }