* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-// Don't try to connect to the DB, just dumping SVN log
+// Don't try to connect to the DB, just dumping Hg log
putenv('FUSIONFORGE_NO_DB=true');
require_once '../../../www/env.inc.php';
$unix_group_name = $_GET['unix_group_name'];
$repo_name = $_GET['repo_name'];
$mode = $_GET['mode'];
-if (!preg_match('/^(date_range|latest|latest_user)$/', $mode))
+if (!preg_match('/^(date_range|latest|latest_user)$/', $mode)) {
die('Invalid mode');
-if (!preg_match('/^[a-z0-9][-a-z0-9_\.]+\z/', $unix_group_name))
+}
+if (!preg_match('/^[a-z0-9][-a-z0-9_\.]+\z/', $unix_group_name)) {
die('Invalid group name');
+}
if ($mode == 'date_range') {
$start_time = $_GET['begin'];
$end_time = $_GET['end'];
- if (!ctype_digit($start_time))
+ if (!ctype_digit($start_time)) {
die('Invalid start time');
- if (!ctype_digit($end_time))
+ }
+ if (!ctype_digit($end_time)) {
die('Invalid end time');
+ }
$d1 = date('Y-m-d', $start_time - 80000);
$d2 = date('Y-m-d', $end_time + 80000);
$options = "-d '$start_time 0 to $end_time 0'";
-// } elseif ($mode == 'latest' or $mode == 'latest_user') {
-// $limit = $_GET['limit'];
-// if (!ctype_digit($limit))
-// die('Invalid limit');
-// $options = "--limit $limit";
-//
-// if ($mode == 'latest_user') {
-// $user_name = $_GET['user_name'];
-// if (!preg_match('/^[a-z0-9][-a-z0-9_\.]+\z/', $user_name))
-// die('Invalid user name');
-// $options .= " --search '$user_name'";
-// }
}
$repo = forge_get_config('repos_path', 'scmhg').'/'.$unix_group_name.'/'.$repo_name;