* enhanced sign-in handling

* fixed attachment cache control.
This commit is contained in:
hyung-hwan 2010-04-28 14:33:25 +00:00
parent 7596d92c9e
commit f9208d86a5
39 changed files with 299 additions and 202 deletions

View File

@ -5,6 +5,7 @@
[ -d "@LOGDIR@" ] || { mkdir -p "@LOGDIR@" && logdir=1; }
[ -d "@DEPOTDIR@/svnrepo" ] || { mkdir -p "@DEPOTDIR@/svnrepo" && svnrepodir=1; }
[ -d "@DEPOTDIR@/files" ] || { mkdir -p "@DEPOTDIR@/files" && filesdir=1; }
[ -d "@DEPOTDIR@/attachments" ] || { mkdir -p "@DEPOTDIR@/attachments" && attachmentsdir=1; }
[ -f "@SYSCONFDIR@/apache2/envvars" ] && {
GROUP=$(. "@SYSCONFDIR@/apache2/envvars" && echo "${APACHE_RUN_GROUP}")
@ -21,9 +22,9 @@
chgrp -R "${GROUP}" "@DEPOTDIR@/svnrepo"
chmod 0775 "@DEPOTDIR@/svnrepo"
}
[ "${filesdir}" = "1" ] && {
chgrp -R "${GROUP}" "@DEPOTDIR@/files"
chmod 0775 "@DEPOTDIR@/files"
[ "${attachmentsdir}" = "1" ] && {
chgrp -R "${GROUP}" "@DEPOTDIR@/attachments"
chmod 0775 "@DEPOTDIR@/attachments"
}
}
}

View File

@ -4,6 +4,7 @@
[ -d "@LOGDIR@" ] && rmdir "@LOGDIR@" 2>/dev/null
[ -d "@DEPOTDIR@/svnrepo" ] && rmdir "@DEPOTDIR@/svnrepo" 2>/dev/null
[ -d "@DEPOTDIR@/files" ] && rmdir "@DEPOTDIR@/files" 2>/dev/null
[ -d "@DEPOTDIR@/attachments" ] && rmdir "@DEPOTDIR@/attachments" 2>/dev/null
[ -d "@DEPOTDIR@" ] && rmdir "@DEPOTDIR@" 2>/dev/null
exit 0

View File

@ -699,9 +699,9 @@ install-data-hook:
$(INSTALL) -d "$(DESTDIR)@CACHEDIR@"
uninstall-hook:
$(RMDIR) "$(DESTDIR)@DEPOTDIR@/svnrepo"
$(RMDIR) "$(DESTDIR)@DEPOTDIR@/files"
$(RMDIR) "$(DESTDIR)@DEPOTDIR@/attachments"
$(RMDIR) "$(DESTDIR)@DEPOTDIR@/files"
$(RMDIR) "$(DESTDIR)@DEPOTDIR@/svnrepo"
$(RMDIR) "$(DESTDIR)@DEPOTDIR@"
$(RMDIR) "$(DESTDIR)@LOGDIR@"
$(RMDIR) "$(DESTDIR)@CACHEDIR@"

View File

@ -53,10 +53,12 @@ rm -rf $RPM_BUILD_ROOT
%attr(-,apache,apache) /var/lib/codepot/svnrepo
%attr(-,apache,apache) /var/lib/codepot/files
%attr(-,apache,apache) /var/lib/codepot/attachments
%attr(-,apache,apache) /var/log/codepot
%attr(-,apache,apache) /var/cache/codepot
%dir /var/lib/codepot/svnrepo
%dir /var/lib/codepot/files
%dir /var/lib/codepot/attachments
%dir /var/log/codepot
%dir /var/cache/codepot

View File

@ -1,7 +1,7 @@
;------------------------------------------------------------------------------
; default site language
;------------------------------------------------------------------------------
default_site_language = "english";
default_site_language = "english"
;------------------------------------------------------------------------------
; default site name
@ -153,5 +153,5 @@ force_project_delete = "no"
;------------------------------------------------------------------------------
; Leave this empty for the default footer message
;------------------------------------------------------------------------------
footer = "";
footer = ""

View File

@ -35,7 +35,7 @@ class Code extends Controller
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$path = $this->converter->HexToAscii ($path);
@ -112,7 +112,7 @@ class Code extends Controller
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$path = $this->converter->HexToAscii ($path);
@ -176,7 +176,7 @@ class Code extends Controller
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$path = $this->converter->HexToAscii ($path);
@ -229,7 +229,7 @@ class Code extends Controller
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$path = $this->converter->HexToAscii ($path);
@ -282,7 +282,7 @@ class Code extends Controller
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$path = $this->converter->HexToAscii ($path);

View File

@ -18,6 +18,7 @@ class File extends Controller
$this->load->library ('Language', 'lang');
$this->lang->load ('common', CODEPOT_LANG);
$this->lang->load ('file', CODEPOT_LANG);
}
function home ($projectid = "")
@ -27,7 +28,7 @@ class File extends Controller
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$project = $this->projects->get ($projectid);
@ -68,7 +69,7 @@ class File extends Controller
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$name = $this->converter->HexToAscii ($name);
@ -98,9 +99,8 @@ class File extends Controller
else if ($file === NULL)
{
$data['project'] = $project;
$data['message'] =
$this->lang->line('MSG_NO_SUCH_FILE').
" - {$name}";
$data['message'] = sprintf (
$this->lang->line('FILE_MSG_NO_SUCH_FILE'), $name);
$this->load->view ($this->VIEW_ERROR, $data);
}
else
@ -119,7 +119,7 @@ class File extends Controller
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$name = $this->converter->HexToAscii ($name);
@ -148,7 +148,7 @@ class File extends Controller
}
else if ($file === NULL)
{
redirect ('file/create/'. $projectid . '/' .
redirect ("file/create/{$projectid}/" .
$this->converter->AsciiToHex($name));
}
else
@ -197,7 +197,8 @@ class File extends Controller
$this->load->model ('FileModel', 'files');
$login = $this->login->getUser ();
if ($login['id'] == '') redirect ('main');
if ($login['id'] == '')
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$name = $this->converter->HexToAscii ($name);
@ -219,7 +220,8 @@ class File extends Controller
$this->projects->projectHasMember($project->id, $login['id']) === FALSE)
{
$data['project'] = $project;
$data['message'] = "NO PERMISSION - $projectid";
$data['message'] = sprintf (
$this->lang->line('MSG_PROJECT_MEMBERSHIP_REQUIRED'), $projectid);
$this->load->view ($this->VIEW_ERROR, $data);
}
else
@ -262,13 +264,22 @@ class File extends Controller
}
else
{
redirect ('file/show/' . $project->id . '/' .
redirect ("file/show/{$project->id}/" .
$this->converter->AsciiToHex($file->name));
}
}
else
{
$fname = $_FILES['file_name']['name'];
if (strpos ($fname, ':') !== FALSE)
{
$data['message'] = $this->lang->line ('FILE_MSG_NAME_NO_COLON');
$data['file'] = $file;
$this->load->view ($this->VIEW_EDIT, $data);
return;
}
$ext = substr ($fname, strrpos ($fname, '.') + 1);
// delete all \" instances ...
@ -320,7 +331,7 @@ class File extends Controller
}
else
{
redirect ('file/show/' . $project->id . '/' .
redirect ("file/show/{$project->id}/" .
$this->converter->AsciiToHex($file->name));
}
}
@ -346,7 +357,8 @@ class File extends Controller
}
else if ($file == NULL)
{
$data['message'] = "NO SUCH FILE - $name";
$data['message'] = sprintf
($this->lang->line('FILE_MSG_NO_SUCH_FILE'), $name);
$this->load->view ($this->VIEW_ERROR, $data);
}
else
@ -390,7 +402,8 @@ class File extends Controller
$this->load->model ('FileModel', 'files');
$login = $this->login->getUser ();
if ($login['id'] == '') redirect ('main');
if ($login['id'] == '')
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$name = $this->converter->HexToAscii ($name);
@ -412,7 +425,8 @@ class File extends Controller
$this->projects->projectHasMember($project->id, $login['id']) === FALSE)
{
$data['project'] = $project;
$data['message'] = "NO PERMISSION - $projectid";
$data['message'] = sprintf (
$this->lang->line('MSG_PROJECT_MEMBERSHIP_REQUIRED'), $projectid);
$this->load->view ($this->VIEW_ERROR, $data);
}
else
@ -468,7 +482,8 @@ class File extends Controller
}
else if ($file === NULL)
{
$data['message'] = "NO SUCH FILE - $name";
$data['message'] = sprintf
($this->lang->line('FILE_MSG_NO_SUCH_FILE'), $name);
$this->load->view ($this->VIEW_ERROR, $data);
}
else

View File

@ -30,7 +30,7 @@ class Issue extends Controller
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$project = $this->projects->get ($projectid);
@ -145,7 +145,7 @@ class Issue extends Controller
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
if ($hexid == '')
@ -185,7 +185,8 @@ class Issue extends Controller
$this->projects->projectHasMember($project->id, $login['id']) === FALSE)
{
$data['project'] = $project;
$data['message'] = "NO PERMISSION - $projectid";
$data['message'] = sprintf (
$this->lang->line('MSG_PROJECT_MEMBERSHIP_REQUIRED'), $projectid);
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($this->issues->change ($login['id'], $project, $id, $change) === FALSE)
@ -206,7 +207,8 @@ class Issue extends Controller
$this->projects->projectHasMember($project->id, $login['id']) === FALSE)
{
$data['project'] = $project;
$data['message'] = "NO PERMISSION - $projectid";
$data['message'] = sprintf (
$this->lang->line('MSG_PROJECT_MEMBERSHIP_REQUIRED'), $projectid);
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($this->issues->undo_last_change ($login['id'], $project, $id) === FALSE)
@ -232,9 +234,8 @@ class Issue extends Controller
else if ($issue === NULL)
{
$data['project'] = $project;
$data['message'] =
$this->lang->line('MSG_NO_SUCH_ISSUE').
" - {$id}";
$data['message'] = sprintf (
$this->lang->line('ISSUE_MSG_NO_SUCH_ISSUE'), $id);
$this->load->view ($this->VIEW_ERROR, $data);
}
else
@ -257,7 +258,8 @@ class Issue extends Controller
$this->load->model ('IssueModel', 'issues');
$login = $this->login->getUser ();
if ($login['id'] == '') redirect ('main');
if ($login['id'] == '')
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$id = $this->converter->HexToAscii ($hexid);
@ -279,7 +281,8 @@ class Issue extends Controller
$this->projects->projectHasMember($project->id, $login['id']) === FALSE)
{
$data['project'] = $project;
$data['message'] = "NO PERMISSION - $projectid";
$data['message'] = sprintf (
$this->lang->line('MSG_PROJECT_MEMBERSHIP_REQUIRED'), $projectid);
$this->load->view ($this->VIEW_ERROR, $data);
}
else
@ -353,9 +356,8 @@ class Issue extends Controller
}
else if ($issue == NULL)
{
$data['message'] =
$this->lang->line('MSG_NO_SUCH_ISSUE') .
" - {$id}";
$data['message'] = sprintf (
$this->lang->line('ISSUE_MSG_NO_SUCH_ISSUE'), $id);
$this->load->view ($this->VIEW_ERROR, $data);
}
else
@ -402,7 +404,8 @@ class Issue extends Controller
$this->load->model ('IssueModel', 'issues');
$login = $this->login->getUser ();
if ($login['id'] == '') redirect ('main');
if ($login['id'] == '')
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$id = $this->converter->HexToAscii ($hexid);
@ -424,7 +427,8 @@ class Issue extends Controller
$this->projects->projectHasMember($project->id, $login['id']) === FALSE)
{
$data['project'] = $project;
$data['message'] = "NO PERMISSION - $projectid";
$data['message'] = sprintf (
$this->lang->line('MSG_PROJECT_MEMBERSHIP_REQUIRED'), $projectid);
$this->load->view ($this->VIEW_ERROR, $data);
}
else
@ -479,9 +483,8 @@ class Issue extends Controller
}
else if ($issue === NULL)
{
$data['message'] =
$this->lang->line('MSG_NO_SUCH_ISSUE') .
" - {$id}";
$data['message'] = sprintf (
$this->lang->line('ISSUE_MSG_NO_SUCH_ISSUE'), $id);
$this->load->view ($this->VIEW_ERROR, $data);
}
else

View File

@ -15,7 +15,12 @@ class Main extends Controller
$this->lang->load ('common', CODEPOT_LANG);
}
function index()
function index ($xurl = '')
{
redirect ("main/signin/$xurl");
}
function signin ($xurl = '')
{
$this->load->library(array('encrypt', 'form_validation', 'session'));
@ -43,7 +48,7 @@ class Main extends Controller
}
else
{
if ($user_url != "") redirect ($user_url);
if ($user_url != '') redirect ($user_url);
else redirect ('site/home');
}
}
@ -60,15 +65,11 @@ class Main extends Controller
$this->login->deauthenticate ();
$data['user_name'] = '';
$data['user_pass'] = '';
$data['user_url'] = '';
$data['user_url'] = $this->converter->HexToAscii($xurl);
$this->load->view ('login', $data);
}
}
function signin ()
{
redirect ('main/index');
}
function signout ($xurl = "")
{

View File

@ -29,7 +29,7 @@ class Project extends Controller
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
if ($filter == '')
@ -117,7 +117,7 @@ class Project extends Controller
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
@ -206,7 +206,7 @@ class Project extends Controller
}
else
{
redirect ('project/home/' . $project->id);
redirect ("project/home/{$project->id}");
}
}
else
@ -237,7 +237,8 @@ class Project extends Controller
$this->load->model ('ProjectModel', 'projects');
$login = $this->login->getUser ();
if ($login['id'] == '') redirect ('main/signin');
if ($login['id'] == '')
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$project->id = $projectid;
$project->name = '';
@ -253,7 +254,8 @@ class Project extends Controller
$this->load->model ('ProjectModel', 'projects');
$login = $this->login->getUser ();
if ($login['id'] == '') redirect ('main/signin');
if ($login['id'] == '')
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$project = $this->projects->get ($projectid);
if ($project === FALSE)
@ -275,7 +277,8 @@ class Project extends Controller
{
$data['project'] = $project;
$data['login'] = $login;
$data['message'] = "NO PERMISSION - $projectid";
$data['message'] = sprintf (
$this->lang->line('MSG_PROJECT_MEMBERSHIP_REQUIRED'), $projectid);
$this->load->view ($this->VIEW_ERROR, $data);
}
else
@ -350,7 +353,8 @@ class Project extends Controller
$this->load->model ('ProjectModel', 'projects');
$login = $this->login->getUser ();
if ($login['id'] == '') redirect ('main/signin');
if ($login['id'] == '')
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$project = $this->projects->get ($projectid);
if ($project === FALSE)
@ -372,7 +376,8 @@ class Project extends Controller
{
$data['login'] = $login;
$data['project'] = $project;
$data['message'] = "NO PERMISSION - $projectid";
$data['message'] = sprintf (
$this->lang->line('MSG_PROJECT_MEMBERSHIP_REQUIRED'), $projectid);
$this->load->view ($this->VIEW_ERROR, $data);
}
else

View File

@ -34,7 +34,7 @@ class Site extends Controller
{
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$this->load->model ('SiteModel', 'sites');
$this->load->model ('ProjectModel', 'projects');
@ -92,7 +92,7 @@ class Site extends Controller
{
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$this->load->model ('SiteModel', 'sites');
@ -116,7 +116,7 @@ class Site extends Controller
{
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$this->load->model ('SiteModel', 'sites');
@ -128,18 +128,17 @@ class Site extends Controller
$data['login'] = $login;
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
return;
}
if ($site === NULL)
else if ($site === NULL)
{
$data['message'] = "NO SUCH SITE - {$siteid}";
$data['message'] = sprintf ($this->lang->line('SITE_MSG_NO_SUCH_SITE'), $siteid);
$this->load->view ($this->VIEW_ERROR, $data);
return;
}
$data['site'] = $site;
$this->load->view ($this->VIEW_SHOW, $data);
else
{
$data['site'] = $site;
$this->load->view ($this->VIEW_SHOW, $data);
}
}
function _edit_site ($site, $mode, $login)
@ -219,12 +218,13 @@ class Site extends Controller
$this->load->model ('SiteModel', 'sites');
$login = $this->login->getUser ();
if ($login['id'] == '') redirect ('main/signin');
if ($login['id'] == '')
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
if (!$login['sysadmin?'])
{
$data['login'] = $login;
$data['message'] = "NO PERMISSION";
$data['message'] = $this->lang->line('SITE_MSG_ADMINISTRATORSHIP_REQUIRED');
$this->load->view ($this->VIEW_ERROR, $data);
}
else
@ -242,7 +242,8 @@ class Site extends Controller
$this->load->model ('SiteModel', 'sites');
$login = $this->login->getUser ();
if ($login['id'] == '') redirect ('main/signin');
if ($login['id'] == '')
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$site = $this->sites->get ($siteid);
if ($site === FALSE)
@ -254,13 +255,13 @@ class Site extends Controller
else if ($site === NULL)
{
$data['login'] = $login;
$data['message'] = "NO SUCH SITE - $siteid";
$data['message'] = sprintf ($this->lang->line('SITE_MSG_NO_SUCH_SITE'), $siteid);
$this->load->view ($this->VIEW_ERROR, $data);
}
else if (!$login['sysadmin?'])
{
$data['login'] = $login;
$data['message'] = "NO PERMISSION - $siteid";
$data['message'] = $this->lang->line('SITE_MSG_ADMINISTRATORSHIP_REQUIRED');
$this->load->view ($this->VIEW_ERROR, $data);
}
else
@ -333,7 +334,8 @@ class Site extends Controller
$this->load->model ('SiteModel', 'sites');
$login = $this->login->getUser ();
if ($login['id'] == '') redirect ('main/signin');
if ($login['id'] == '')
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$site = $this->sites->get ($siteid);
if ($site === FALSE)
@ -345,13 +347,13 @@ class Site extends Controller
else if ($site === NULL)
{
$data['login'] = $login;
$data['message'] = "NO SUCH SITE - $siteid";
$data['message'] = sprintf ($this->lang->line('SITE_MSG_NO_SUCH_SITE'), $siteid);
$this->load->view ($this->VIEW_ERROR, $data);
}
else if (!$login['sysadmin?'])
{
$data['login'] = $login;
$data['message'] = "NO PERMISSION - $siteid";
$data['message'] = $this->lang->line('SITE_MSG_ADMINISTRATORSHIP_REQUIRED');
$this->load->view ($this->VIEW_ERROR, $data);
}
else
@ -433,7 +435,7 @@ class Site extends Controller
{
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
@ -458,7 +460,7 @@ class Site extends Controller
{
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;

View File

@ -30,7 +30,7 @@ class Wiki extends Controller
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$project = $this->projects->get ($projectid);
@ -71,7 +71,7 @@ class Wiki extends Controller
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
if ($name == '')
@ -105,45 +105,54 @@ class Wiki extends Controller
$data['project'] = $project;
$data['message'] = "INVALID LINK - {$name}";
$this->load->view ($this->VIEW_ERROR, $data);
return;
}
else if ($link !== NULL)
{
// redirect to a special link like __WIKI__:projectid:wikiname
if ($link->extra === NULL)
redirect ("{$link->type}/{$link->target}/{$link->projectid}");
else
redirect ("{$link->type}/{$link->target}/{$link->projectid}/{$link->extra}");
return;
}
$wiki = $this->wikis->get ($login['id'], $project, $name);
if ($wiki === FALSE)
else
{
$data['project'] = $project;
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($wiki === NULL)
{
if ($create)
$wiki = $this->wikis->get ($login['id'], $project, $name);
if ($wiki === FALSE)
{
redirect ("wiki/create/{$projectid}/" .
$this->converter->AsciiToHex($name));
$data['project'] = $project;
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($wiki === NULL)
{
if ($create)
{
// Redirecting to the 'new' page is determined by the project membership
// when the wiki page is not found.
$create = ($login['sysadmin?'] ||
$this->projects->projectHasMember($project->id, $login['id']));
}
if ($create)
{
redirect ("wiki/create/{$projectid}/" .
$this->converter->AsciiToHex($name));
}
else
{
$data['project'] = $project;
$data['message'] = sprintf (
$this->lang->line('WIKI_MSG_NO_SUCH_PAGE'), $name);
$this->load->view ($this->VIEW_ERROR, $data);
}
}
else
{
$data['project'] = $project;
$data['message'] = sprintf (
$this->lang->line('WIKI_MSG_NO_SUCH_PAGE'), $name);
$this->load->view ($this->VIEW_ERROR, $data);
$data['wiki'] = $wiki;
$this->load->view ($this->VIEW_SHOW, $data);
}
}
else
{
$data['project'] = $project;
$data['wiki'] = $wiki;
$this->load->view ($this->VIEW_SHOW, $data);
}
}
}
@ -163,7 +172,7 @@ class Wiki extends Controller
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
if ($target == '')
{
@ -186,7 +195,7 @@ class Wiki extends Controller
{
$login = $this->login->getUser ();
if (CODEPOT_SIGNIN_COMPULSORY && $login['id'] == '')
redirect ('main/signin');
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
if ($wikiname == '' || $name == '')
{
@ -233,40 +242,42 @@ class Wiki extends Controller
else
{
$att = $this->wikis->getAttachment ($login['id'], $project, $wikiname, $name);
if ($att == FALSE)
if ($att === FALSE)
{
$data['project'] = $project;
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
return;
}
else if ($att === NULL)
{
$data['project'] = $project;
$data['message'] = sprintf (
$this->lang->line('MSG_WIKI_NO_SUCH_ATTACHMENT'), $name);
$this->lang->line('WIKI_MSG_NO_SUCH_ATTACHMENT'), $name);
$this->load->view ($this->VIEW_ERROR, $data);
}
$path = CODEPOT_ATTACHMENT_DIR . "/{$att->encname}";
$mtime = @filemtime ($path);
if ($mtime === FALSE) $mtime = time();
header('Last-Modified: ' . gmdate("D, d M Y H:i:s", $mtime) . ' GMT');
header ('Content-Type: ' . mime_content_type($path));
header("Content-Disposition: filename={$name}");
$len = @filesize($path);
if ($len !== FALSE) header("Content-Length: {$len}");
//header("Content-Transfer-Encoding: binary");
flush ();
$x = @readfile($path);
if ($x === FALSE)
else
{
$data['project'] = $project;
$data['message'] = sprintf (
$this->lang->line('MSG_WIKI_FAILED_TO_READ_ATTACHMENT'), $name);
$this->load->view ($this->VIEW_ERROR, $data);
$path = CODEPOT_ATTACHMENT_DIR . "/{$att->encname}";
$mtime = @filemtime ($path);
if ($mtime === FALSE) $mtime = time();
header ('Content-Type: ' . mime_content_type($path));
header ('Expires: ' . gmdate("D, d M Y H:i:s", time() + 60*60*24*30) . ' GMT'); // 30days
header ('Last-Modified: ' . gmdate("D, d M Y H:i:s", $mtime) . ' GMT');
header ("Content-Disposition: filename={$name}");
$len = @filesize($path);
if ($len !== FALSE) header("Content-Length: {$len}");
//header("Content-Transfer-Encoding: binary");
flush ();
$x = @readfile($path);
if ($x === FALSE)
{
$data['project'] = $project;
$data['message'] = sprintf (
$this->lang->line('WIKI_MSG_FAILED_TO_READ_ATTACHMENT'), $name);
$this->load->view ($this->VIEW_ERROR, $data);
}
}
}
}
@ -281,7 +292,8 @@ class Wiki extends Controller
$this->load->model ('WikiModel', 'wikis');
$login = $this->login->getUser ();
if ($login['id'] == '') redirect ('main');
if ($login['id'] == '')
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$name = $this->converter->HexToAscii ($name);
@ -303,7 +315,8 @@ class Wiki extends Controller
$this->projects->projectHasMember($project->id, $login['id']) === FALSE)
{
$data['project'] = $project;
$data['message'] = "NO PERMISSION - $projectid";
$data['message'] = sprintf (
$this->lang->line('MSG_PROJECT_MEMBERSHIP_REQUIRED'), $projectid);
$this->load->view ($this->VIEW_ERROR, $data);
}
else
@ -324,44 +337,58 @@ class Wiki extends Controller
if ($this->input->post('wiki'))
{
$wiki->projectid = $this->input->post('wiki_projectid');
$wiki->name = $this->input->post('wiki_name');
$wiki->text = $this->input->post('wiki_text');
$wiki->attachments = array();
$wiki->delete_attachments = array();
$delatts = $this->input->post('wiki_delete_attachment');
if (!empty($delatts))
{
foreach ($delatts as $att)
{
$atpos = strpos ($att, '@');
if ($atpos === FALSE) continue;
$attinfo['name'] = $this->converter->HexToAscii(substr ($att, 0, $atpos));
$attinfo['encname'] = $this->converter->HexToAscii(substr ($att, $atpos + 1));
array_push (
$wiki->delete_attachments,
(object)$attinfo
);
}
}
$wiki->attachments = $this->wikis->getAttachments (
$login['id'], $project, $wiki->name);
if ($wiki->attachments === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
return;
}
if ($this->form_validation->run())
{
$delatts = $this->input->post('wiki_delete_attachment');
if (!empty($delatts))
{
foreach ($delatts as $att)
{
$atpos = strpos ($att, '@');
if ($atpos === FALSE) continue;
$attinfo['name'] = $this->converter->HexToAscii(
substr ($att, 0, $atpos));
$attinfo['encname'] = $this->converter->HexToAscii(
substr ($att, $atpos + 1));
array_push (
$wiki->delete_attachments,
(object)$attinfo
);
}
}
$atts = $this->wikis->getAttachments (
$login['id'], $project, $wiki->name);
if ($atts === FALSE)
{
$data['wiki'] = $wiki;
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_EDIT, $data);
return;
}
$wiki->attachments = $atts;
if (strpos ($wiki->name, ':') !== FALSE)
{
$data['message'] = $this->lang->line('WIKI_MSG_NAME_NO_COLON');
$data['wiki'] = $wiki;
$this->load->view ($this->VIEW_EDIT, $data);
return;
}
if ($this->wikihelper->_is_reserved ($wiki->name, FALSE))
{
$data['message'] = "RESERVED WIKI NAME - {$wiki->name}";
$data['message'] = sprintf (
$this->lang->line('WIKI_MSG_RESERVED_WIKI_NAME'),
$wiki->name
);
$data['wiki'] = $wiki;
$this->load->view ($this->VIEW_EDIT, $data);
}
@ -466,7 +493,8 @@ class Wiki extends Controller
$this->load->model ('WikiModel', 'wikis');
$login = $this->login->getUser ();
if ($login['id'] == '') redirect ('main');
if ($login['id'] == '')
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$name = $this->converter->HexToAscii ($name);
@ -488,13 +516,15 @@ class Wiki extends Controller
$this->projects->projectHasMember($project->id, $login['id']) === FALSE)
{
$data['project'] = $project;
$data['message'] = "NO PERMISSION - $projectid";
$data['message'] = sprintf (
$this->lang->line('MSG_PROJECT_MEMBERSHIP_REQUIRED'), $projectid);
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($this->wikihelper->_is_reserved ($name, FALSE))
{
$data['project'] = $project;
$data['message'] = "RESERVED WIKI PAGE - $name ";
$data['message'] = sprintf (
$this->lang->line('WIKI_MSG_RESERVED_WIKI_NAME'), $name);
$this->load->view ($this->VIEW_ERROR, $data);
}
else

View File

@ -2,6 +2,7 @@ wwwdir=$(WWWDIR)/codepot/language/english
www_DATA = \
code_lang.php \
common_lang.php \
file_lang.php \
issue_lang.php \
index.html \
project_lang.php \

View File

@ -168,6 +168,7 @@ wwwdir = $(WWWDIR)/codepot/language/english
www_DATA = \
code_lang.php \
common_lang.php \
file_lang.php \
issue_lang.php \
index.html \
project_lang.php \

View File

@ -1,9 +1,7 @@
<?php
$lang['CODE_COMMIT'] = 'Commit';
$lang['CODE_HIDE_DETAILS'] = 'Hide details';
$lang['CODE_PROPERTIES'] = 'Properties';
$lang['CODE_PROPERTY'] = 'Property';
$lang['CODE_SHOW_DETAILS'] = 'Show details';
$lang['CODE_MSG_COMMITTED_BY_ON'] = 'Committed by %s on %s';
?>

View File

@ -28,6 +28,7 @@ $lang['Files'] = 'Files';
$lang['First'] = 'First';
$lang['Folder'] = 'Folder';
$lang['Head revision'] = 'Head revision';
$lang['Hide details'] = 'Hide details';
$lang['History'] = 'History';
$lang['Home'] = 'Home';
$lang['ID'] = 'ID';
@ -62,6 +63,7 @@ $lang['Purge'] = 'Purge';
$lang['Repository'] = 'Repository';
$lang['Revision'] = 'Revision';
$lang['Search'] = 'Search';
$lang['Show details'] = 'Show details';
$lang['Sign in'] = 'Sign in';
$lang['Sign out'] = 'Sign out';
$lang['Site'] = 'Site';
@ -91,10 +93,8 @@ $lang['MSG_LOG_REVPROP_CHANGE_BY'] = 'Revision property %s changed by %s';
$lang['MSG_NO_DIFF'] = 'No difference found';
$lang['MSG_NO_CODE_AVAIL'] = 'No source code available';
$lang['MSG_NO_FILES_AVAIL'] = 'No files available';
$lang['MSG_NO_ISSUES_AVAIL'] = 'No outstanding issues';
$lang['MSG_NO_SUCH_FILE'] = 'No such file';
$lang['MSG_NO_SUCH_ISSUE'] = 'No such issue';
$lang['MSG_NO_SUCH_PROJECT'] = 'No such project';
$lang['MSG_SURE_TO_DELETE_THIS'] = "I'm sure to delete this";
$lang['MSG_PROJECT_MEMBERSHIP_REQUIRED'] = 'You have to be a member of the %s project to perform this task';
?>

View File

@ -0,0 +1,5 @@
<?php
$lang['FILE_MSG_NAME_NO_COLON'] = 'File name containing a colon';
$lang['FILE_MSG_NO_SUCH_FILE'] = 'No such file - %s';
$lang['FILE_MSG_NO_FILES_AVAILABLE'] = 'No files available';
?>

View File

@ -21,5 +21,7 @@ $lang['ISSUE_MSG_CHANGED_X_TO_Z'] = "Changed <span class='quoted'>%s</span> to <
$lang['ISSUE_MSG_CHANGED_X_FROM_Y_TO_Z'] = "Changed <span class='quoted'>%s</span> from <span class='quoted'>%s</span> to <span class='quoted'>%s</span>";
$lang['ISSUE_MSG_CONFIRM_UNDO'] = 'Are you sure to undo the last change?';
$lang['ISSUE_MSG_CREATED'] = 'Created';
$lang['ISSUE_MSG_NO_ISSUES_AVAILABLE'] = 'No outstanding issues';
$lang['ISSUE_MSG_NO_SUCH_ISSUE'] = 'No such issue - %s';
$lang['ISSUE_MSG_TOTAL_NUM_ISSUES'] = 'Total %d issues';
?>

View File

@ -1,2 +1,4 @@
<?php
$lang['SITE_MSG_ADMINISTRATORSHIP_REQUIRED'] = 'You have to be a system administrator to perform this task';
$lang['SITE_MSG_NO_SUCH_SITE'] = 'No such site - %s';
?>

View File

@ -5,7 +5,9 @@ $lang['WIKI_MORE_NEW_ATTACHMENTS'] = 'Add more';
$lang['WIKI_MSG_ATTACHMENT_NAME_NO_COLON'] = 'Attachment name containing a colon';
$lang['WIKI_MSG_FAILED_TO_READ_ATTACHMENT'] = 'Failed to read wiki attachment - %s';
$lang['WIKI_MSG_NAME_NO_COLON'] = 'Wiki name containing a colon';
$lang['WIKI_MSG_NO_PAGES_AVAILABLE'] = 'No wiki pages available';
$lang['WIKI_MSG_NO_SUCH_PAGE'] = 'No such wiki page - %s';
$lang['WIKI_MSG_NO_SUCH_ATTACHMENT'] = 'No such wiki attachment - %s';
$lang['WIKI_MSG_RESERVED_WIKI_NAME'] = 'Wiki name containing a reserved word - %s';
?>

View File

@ -2,6 +2,7 @@ wwwdir=$(WWWDIR)/codepot/language/korean
www_DATA = \
code_lang.php \
common_lang.php \
file_lang.php \
issue_lang.php \
index.html \
project_lang.php \

View File

@ -168,6 +168,7 @@ wwwdir = $(WWWDIR)/codepot/language/korean
www_DATA = \
code_lang.php \
common_lang.php \
file_lang.php \
issue_lang.php \
index.html \
project_lang.php \

View File

@ -1,9 +1,7 @@
<?php
$lang['CODE_COMMIT'] = '커밋';
$lang['CODE_HIDE_DETAILS'] = '상세내역숨김';
$lang['CODE_PROPERTIES'] = '속성';
$lang['CODE_PROPERTY'] = '속성';
$lang['CODE_SHOW_DETAILS'] = '상세내역보기';
$lang['CODE_MSG_COMMITTED_BY_ON'] = '%s가 %s에 커밋함';
?>

View File

@ -28,6 +28,7 @@ $lang['Files'] = '파일';
$lang['First'] = '처음';
$lang['Folder'] = '폴더';
$lang['Head revision'] = '최신리비전';
$lang['Hide details'] = '상세내역숨김';
$lang['History'] = '변경기록';
$lang['Home'] = '홈';
$lang['ID'] = '아이디';
@ -62,6 +63,7 @@ $lang['Purge'] = '정화하기';
$lang['Repository'] = '저장소';
$lang['Revision'] = '리비전';
$lang['Search'] = '찾기';
$lang['Show details'] = '상세내역보기';
$lang['Sign in'] = '로그인';
$lang['Sign out'] = '로그아웃';
$lang['Site'] = '사이트';
@ -91,10 +93,9 @@ $lang['MSG_LOG_REVPROP_CHANGE_BY'] = '리비전 속성 %s을(를) %s이(가) 변
$lang['MSG_NO_DIFF'] = '차이점이 없습니다';
$lang['MSG_NO_CODE_AVAIL'] = '소스코드가 없습니다';
$lang['MSG_NO_FILES_AVAIL'] = '파일이 없습니다';
$lang['MSG_NO_ISSUES_AVAIL'] = '이슈항목이 없습니다';
$lang['MSG_NO_SUCH_FILE'] = '파일이 없습니다';
$lang['MSG_NO_SUCH_ISSUE'] = '이슈항목이 없습니다';
$lang['MSG_NO_SUCH_PROJECT'] = '프로젝트가 없습니다';
$lang['MSG_SURE_TO_DELETE_THIS'] = '반드시 이것을 삭제하고 싶어요';
$lang['MSG_PROJECT_MEMBERSHIP_REQUIRED'] = '이 작업을 수행하려면 %s 프로젝트의 멤버가 되어야 합니다';
?>

View File

@ -0,0 +1,5 @@
<?php
$lang['FILE_MSG_NAME_NO_COLON'] = '파일이름에 콜론기호를 포함할 수 없습니다';
$lang['FILE_MSG_NO_SUCH_FILE'] = '파일이 없습니다 - %s';
$lang['FILE_MSG_NO_FILES_AVAILABLE'] = '사용할 수 있는 파일이 없습니다';
?>

View File

@ -21,5 +21,7 @@ $lang['ISSUE_MSG_CHANGED_X_TO_Z'] = "<span class='quoted'>%s</span>을/를 <span
$lang['ISSUE_MSG_CHANGED_X_FROM_Y_TO_Z'] = "<span class='quoted'>%s</span>을/를 <span class='quoted'>%s</span>에서 <span class='quoted'>%s</span>(으)로 변경";
$lang['ISSUE_MSG_CONFIRM_UNDO'] = '마지막 변경내용을 취소할까요?';
$lang['ISSUE_MSG_CREATED'] = '생성됨';
$lang['ISSUE_MSG_NO_ISSUES_AVAILABLE'] = '처리해야 할 이슈가 없습니다';
$lang['ISSUE_MSG_NO_SUCH_ISSUE'] = '해당 이슈가 없습니다 - %s';
$lang['ISSUE_MSG_TOTAL_NUM_ISSUES'] = '전체 이슈 %d개';
?>

View File

@ -1,2 +1,4 @@
<?php
$lang['SITE_MSG_ADMINISTRATORSHIP_REQUIRED'] = '이 작업은 시스템 관리자만이 수행할 수 있습니다';
$lang['SITE_MSG_NO_SUCH_SITE'] = '사이트가 없습니다 - %s';
?>

View File

@ -3,9 +3,11 @@ $lang['WIKI_ATTACHMENTS'] = '첨부파일';
$lang['WIKI_NEW_ATTACHMENTS'] = '새로운 첨부파일';
$lang['WIKI_MORE_NEW_ATTACHMENTS'] = '첨부파일 추가';
$lang['WIKI_MSG_ATTACHMENT_NAME_NO_COLON'] = '첨부파일이름에 콜론기호가 포함될 수 없습니다';
$lang['WIKI_MSG_ATTACHMENT_NAME_NO_COLON'] = '첨부파일이름에 콜론기호를 포함할 수 없습니다';
$lang['WIKI_MSG_FAILED_TO_READ_ATTACHMENT'] = '위키 첨부파일을 읽을 수 없습니다 - %s';
$lang['WIKI_MSG_NO_PAGES_AVAILABLE'] = '위키 페이지가 없습니다';
$lang['WIKI_MSG_NAME_NO_COLON'] = '위키이름에 콜론기호를 포함할 수 없습니다';
$lang['WIKI_MSG_NO_PAGES_AVAILABLE'] = '사용할 수 있는 위키 페이지가 없습니다';
$lang['WIKI_MSG_NO_SUCH_PAGE'] = '위키 페이지를 찾을수 없습니다 - %s';
$lang['WIKI_MSG_NO_SUCH_ATTACHMENT'] = '위키 첨부파일을 찾을 수 없습니다 - %s';
$lang['WIKI_MSG_RESERVED_WIKI_NAME'] = '%s은(는) 사용할 수 없는 위키이름입니다';
?>

View File

@ -83,6 +83,17 @@ class WikiHelper
return FALSE;
}
else if ($ex[0] == '__WIKI__')
{
// __WIKI__:projectid:wikiname:attachment
$link->type = $this->_trans_reserved ($ex[0]);
$link->target = 'attachment0';
$link->projectid = ($ex[1] == '')? $projectid: $ex[1];
$link->extra = $converter->AsciiToHex ("{$link->projectid}:{$ex[2]}:{$ex[3]}");
return $link;
}
}
}
@ -91,7 +102,10 @@ class WikiHelper
function _trans_reserved ($name)
{
return substr (strtolower ($name), 2, strlen($name) - 4);
// trim off leading and trailing double underscores blindly.
// actually it trims off the first and the last two characters
// each.
return substr (strtolower($name), 2, strlen($name) - 4);
}
function _is_reserved ($name, $exact)

View File

@ -18,9 +18,9 @@
<script type="text/javascript">
$(function () {
if ($("#code_blame_mainarea_result_info").is(":visible"))
btn_label = "<?=$this->lang->line('CODE_HIDE_DETAILS')?>";
btn_label = "<?=$this->lang->line('Hide details')?>";
else
btn_label = "<?=$this->lang->line('CODE_SHOW_DETAILS')?>";
btn_label = "<?=$this->lang->line('Show details')?>";
btn = $("#code_blame_mainarea_details_button").button({"label": btn_label}).click (function () {
@ -28,13 +28,13 @@ $(function () {
{
$("#code_blame_mainarea_result_info").hide("blind",{},200);
$("#code_blame_mainarea_details_button").button(
"option", "label", "<?=$this->lang->line('CODE_SHOW_DETAILS')?>");
"option", "label", "<?=$this->lang->line('Show details')?>");
}
else
{
$("#code_blame_mainarea_result_info").show("blind",{},200);
$("#code_blame_mainarea_details_button").button(
"option", "label", "<?=$this->lang->line('CODE_HIDE_DETAILS')?>");
"option", "label", "<?=$this->lang->line('Hide details')?>");
}
});
});

View File

@ -18,9 +18,9 @@
<script type="text/javascript">
$(function () {
if ($("#code_file_mainarea_result_info").is(":visible"))
btn_label = "<?=$this->lang->line('CODE_HIDE_DETAILS')?>";
btn_label = "<?=$this->lang->line('Hide details')?>";
else
btn_label = "<?=$this->lang->line('CODE_SHOW_DETAILS')?>";
btn_label = "<?=$this->lang->line('Show details')?>";
btn = $("#code_file_mainarea_details_button").button({"label": btn_label}).click (function () {
@ -28,13 +28,13 @@ $(function () {
{
$("#code_file_mainarea_result_info").hide("blind",{},200);
$("#code_file_mainarea_details_button").button(
"option", "label", "<?=$this->lang->line('CODE_SHOW_DETAILS')?>");
"option", "label", "<?=$this->lang->line('Show details')?>");
}
else
{
$("#code_file_mainarea_result_info").show("blind",{},200);
$("#code_file_mainarea_details_button").button(
"option", "label", "<?=$this->lang->line('CODE_HIDE_DETAILS')?>");
"option", "label", "<?=$this->lang->line('Hide details')?>");
}
});
});

View File

@ -45,7 +45,7 @@ $this->load->view (
<?php
if (empty($files))
{
print htmlspecialchars($this->lang->line('MSG_NO_FILES_AVAIL'));
print htmlspecialchars($this->lang->line('FILE_MSG_NO_FILES_AVAILABLE'));
}
else
{

View File

@ -153,7 +153,7 @@ $this->load->view (
<?php
if (empty($issues))
{
print $this->lang->line('MSG_NO_ISSUES_AVAIL');
print $this->lang->line('ISSUE_MSG_NO_ISSUES_AVAILABLE');
}
else
{

View File

@ -45,7 +45,7 @@ $this->load->view (
<?php if ($message != "") print "<div id='project_create_message' class='form_message'>$message</div>"; ?>
<?=form_open('main/index/')?>
<?=form_open('main/signin/')?>
<?=form_fieldset('')?>
<?=form_hidden('user_url', set_value ('user_url', $user_url))?>

View File

@ -53,7 +53,6 @@ $this->load->view (
?>
<!---------------------------------------------------------------------------->
<div class="sidebar" id="project_home_sidebar">
<div class="box">
@ -93,7 +92,7 @@ $this->load->view (
<div class="boxtitle">
<?= anchor ("/project/log/{$project->id}", $this->lang->line('Change log')) ?>
</div>
<table id="project_home_mainarea_sidebar_log_table">
<table id="project_home_sidebar_log_table">
<?php
$xdot = $this->converter->AsciiToHex ('.');
foreach ($log_entries as $log)

View File

@ -17,7 +17,7 @@ function show_taskbar ($con, $login)
}
else
{
print form_open('main/index');
print form_open('main/signin');
$user_name = "";
$user_pass = "";

View File

@ -9,8 +9,8 @@ define ('CODEPOT_CACHE_DIR', '@CACHEDIR@');
function load_ini ($file)
{
$cfg = parse_ini_file ($file, FALSE);
if (/*$cfg === FALSE*/ $cfg == FALSE) die ("ERROR: cannot parse $file");
$cfg = @parse_ini_file ($file, FALSE);
if (!is_array($cfg)) $cfg = array ();
$xcfgs = array (
array ('default_site_language', 'string', 'english'),

View File

@ -376,6 +376,7 @@ pre.prettyprint .nocode a:hover {
font-size: 0.9em;
float: right;
width: 22em;
margin-top: 0.3em;
}
.content .sidebar .box {

View File

@ -5,32 +5,32 @@
/*-----------------------------------------------
* project home view
*-----------------------------------------------*/
#project_home_mainarea_sidebar_log_table {
#project_home_sidebar_log_table {
border-collapse: collapse;
}
#project_home_mainarea_sidebar_log_table tr.odd {
#project_home_sidebar_log_table tr.odd {
background-color: #bbccef;
}
#project_home_mainarea_sidebar_log_table tr.odd td.date {
#project_home_sidebar_log_table tr.odd td.date {
width: 1%;
white-space: nowrap;
}
#project_home_mainarea_sidebar_log_table tr.odd td.object {
#project_home_sidebar_log_table tr.odd td.object {
white-space: nowrap;
}
#project_home_mainarea_sidebar_log_table tr.even {
#project_home_sidebar_log_table tr.even {
background-color: inherit;
}
#project_home_mainarea_sidebar_log_table tr.even td.details .description {
#project_home_sidebar_log_table tr.even td.details .description {
font-style: italic;
}
#project_home_mainarea_sidebar_log_table tr.even td.details pre.message {
#project_home_sidebar_log_table tr.even td.details pre.message {
border: 0;
margin: 1px;
background-color: inherit;