Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
6f07cf26
Commit
6f07cf26
authored
13 years ago
by
Jakob Sack
Browse files
Options
Downloads
Plain Diff
Merge branch 'refactoring' of
git://anongit.kde.org/owncloud
into refactoring
parents
b57823ba
a977ba31
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
index.php
+4
-0
4 additions, 0 deletions
index.php
lib/installer.php
+16
-0
16 additions, 0 deletions
lib/installer.php
plugins/publiclink/get.php
+7
-0
7 additions, 0 deletions
plugins/publiclink/get.php
templates/404.php
+10
-0
10 additions, 0 deletions
templates/404.php
with
37 additions
and
0 deletions
index.php
+
4
−
0
View file @
6f07cf26
...
...
@@ -21,6 +21,8 @@
*
*/
$RUNTIME_NOAPPS
=
true
;
//no apps, yet
require_once
(
'lib/base.php'
);
require_once
(
'appconfig.php'
);
require_once
(
'template.php'
);
...
...
@@ -48,6 +50,7 @@ if(count($errors)>0){
exit
();
}
}
elseif
(
isset
(
$_POST
[
"user"
])){
OC_APP
::
loadApps
();
if
(
OC_USER
::
login
(
$_POST
[
"user"
],
$_POST
[
"password"
]
)){
header
(
"Location: "
.
$WEBROOT
.
'/'
.
OC_APPCONFIG
::
getValue
(
"core"
,
"defaultpage"
,
"files/index.php"
));
exit
();
...
...
@@ -55,6 +58,7 @@ if(count($errors)>0){
OC_TEMPLATE
::
printGuestPage
(
""
,
"login"
,
array
(
"error"
=>
true
));
}
}
else
{
OC_APP
::
loadApps
();
OC_TEMPLATE
::
printGuestPage
(
""
,
"login"
,
array
(
"error"
=>
false
));
}
...
...
This diff is collapsed.
Click to expand it.
lib/installer.php
+
16
−
0
View file @
6f07cf26
...
...
@@ -97,6 +97,9 @@ class OC_INSTALLER{
OC_GROUP
::
createGroup
(
'admin'
);
OC_GROUP
::
addToGroup
(
$username
,
'admin'
);
//create htaccess files for apache hosts
self
::
createHtaccess
();
//TODO detect if apache is used
//and we are done
OC_CONFIG
::
setValue
(
'installed'
,
true
);
}
...
...
@@ -125,6 +128,19 @@ class OC_INSTALLER{
$query
=
"CREATE USER '
$name
'@'%' IDENTIFIED BY '
$password
'"
;
$result
=
mysql_query
(
$query
,
$connection
);
}
/**
* create .htaccess files for apache hosts
*/
private
static
function
createHtaccess
(){
global
$SERVERROOT
;
global
$WEBROOT
;
$content
=
"ErrorDocument 404 /
$WEBROOT
/templates/404.php
\n
"
;
file_put_contents
(
$SERVERROOT
.
'/.htaccess'
,
$content
);
$content
=
"deny from all"
;
file_put_contents
(
OC_CONFIG
::
getValue
(
'datadirectory'
,
$SERVERROOT
.
'/data'
)
.
'/.htaccess'
,
$content
);
}
}
?>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
plugins/publiclink/get.php
+
7
−
0
View file @
6f07cf26
...
...
@@ -19,6 +19,13 @@ if($path!==false){
$subPath
=
''
;
}
$path
.
=
$subPath
;
if
(
!
OC_FILESYSTEM
::
file_exists
(
$path
)){
header
(
"HTTP/1.0 404 Not Found"
);
$tmpl
=
new
OC_TEMPLATE
(
''
,
'404'
,
'guest'
);
$tmpl
->
assign
(
'file'
,
$subPath
);
$tmpl
->
printPage
();
exit
;
}
if
(
OC_FILESYSTEM
::
is_dir
(
$path
)){
$files
=
array
();
$rootLength
=
strlen
(
$root
);
...
...
This diff is collapsed.
Click to expand it.
templates/404.php
+
10
−
0
View file @
6f07cf26
<?php
if
(
!
isset
(
$_
)){
//also provide standalone error page
require_once
'../lib/base.php'
;
require
(
'template.php'
);
$tmpl
=
new
OC_TEMPLATE
(
''
,
'404'
,
'guest'
);
$tmpl
->
printPage
();
exit
;
}
?>
<div
id=
"login"
>
<img
src=
"
<?php
echo
image_path
(
""
,
"weather-clear.png"
);
?>
"
alt=
"ownCloud"
/>
<ul>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment