Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Feeds
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Feeds
Commits
11a9d3bd
Commit
11a9d3bd
authored
5 years ago
by
fox
Committed by
Gogs
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge branch 'escape-install' of JustAMacUser/tt-rss into master
parents
0d467973
56e16a8d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
config.php-dist
+8
-8
8 additions, 8 deletions
config.php-dist
install/index.php
+13
-29
13 additions, 29 deletions
install/index.php
with
21 additions
and
37 deletions
config.php-dist
+
8
−
8
View file @
11a9d3bd
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
// *** Database configuration (important!) ***
// *** Database configuration (important!) ***
// *******************************************
// *******************************************
define
(
'DB_TYPE'
,
"
pgsql"
);
//
or mysql
define
(
'DB_TYPE'
,
"
%DB_TYPE"
);
// pgsql
or mysql
define
(
'DB_HOST'
,
"
localhost
"
);
define
(
'DB_HOST'
,
"
%DB_HOST
"
);
define
(
'DB_USER'
,
"
fox
"
);
define
(
'DB_USER'
,
"
%DB_USER
"
);
define
(
'DB_NAME'
,
"
fox
"
);
define
(
'DB_NAME'
,
"
%DB_NAME
"
);
define
(
'DB_PASS'
,
"
XXXXXX
"
);
define
(
'DB_PASS'
,
"
%DB_PASS
"
);
define
(
'DB_PORT'
,
''
);
// usually 5432 for PostgreSQL, 3306 for MySQL
define
(
'DB_PORT'
,
'
%DB_PORT
'
);
// usually 5432 for PostgreSQL, 3306 for MySQL
define
(
'MYSQL_CHARSET'
,
'UTF8'
);
define
(
'MYSQL_CHARSET'
,
'UTF8'
);
// Connection charset for MySQL. If you have a legacy database and/or experience
// Connection charset for MySQL. If you have a legacy database and/or experience
...
@@ -18,9 +18,9 @@
...
@@ -18,9 +18,9 @@
// *** Basic settings (important!) ***
// *** Basic settings (important!) ***
// ***********************************
// ***********************************
define
(
'SELF_URL_PATH'
,
'
https://example.org/tt-rss/
'
);
define
(
'SELF_URL_PATH'
,
'
%SELF_URL_PATH
'
);
// This should be set to a fully qualified URL used to access
// This should be set to a fully qualified URL used to access
// your tt-rss instance over the net
.
// your tt-rss instance over the net
, such as: https://example.org/tt-rss/
// The value should be a constant string literal. Please don't use
// The value should be a constant string literal. Please don't use
// PHP server variables here - you might introduce security
// PHP server variables here - you might introduce security
// issues on your install and cause hard to debug problems.
// issues on your install and cause hard to debug problems.
...
...
This diff is collapsed.
Click to expand it.
install/index.php
+
13
−
29
View file @
11a9d3bd
...
@@ -151,35 +151,19 @@
...
@@ -151,35 +151,19 @@
function
make_config
(
$DB_TYPE
,
$DB_HOST
,
$DB_USER
,
$DB_NAME
,
$DB_PASS
,
function
make_config
(
$DB_TYPE
,
$DB_HOST
,
$DB_USER
,
$DB_NAME
,
$DB_PASS
,
$DB_PORT
,
$SELF_URL_PATH
)
{
$DB_PORT
,
$SELF_URL_PATH
)
{
$data
=
explode
(
"
\n
"
,
file_get_contents
(
"../config.php-dist"
));
$rv
=
file_get_contents
(
"../config.php-dist"
);
$rv
=
""
;
$settings
=
[
"%DB_TYPE"
=>
$DB_TYPE
==
'pgsql'
?
'pgsql'
:
'mysql'
,
$finished
=
false
;
"%DB_HOST"
=>
addslashes
(
$DB_HOST
),
"%DB_USER"
=>
addslashes
(
$DB_USER
),
foreach
(
$data
as
$line
)
{
"%DB_NAME"
=>
addslashes
(
$DB_NAME
),
if
(
preg_match
(
"/define\('DB_TYPE'/"
,
$line
))
{
"%DB_PASS"
=>
addslashes
(
$DB_PASS
),
$rv
.
=
"
\t
define('DB_TYPE', '
$DB_TYPE
');
\n
"
;
"%DB_PORT"
=>
intval
(
$DB_PORT
),
}
else
if
(
preg_match
(
"/define\('DB_HOST'/"
,
$line
))
{
"%SELF_URL_PATH"
=>
addslashes
(
$SELF_URL_PATH
)
$rv
.
=
"
\t
define('DB_HOST', '
$DB_HOST
');
\n
"
;
];
}
else
if
(
preg_match
(
"/define\('DB_USER'/"
,
$line
))
{
$rv
.
=
"
\t
define('DB_USER', '
$DB_USER
');
\n
"
;
$rv
=
str_replace
(
array_keys
(
$settings
),
array_values
(
$settings
),
$rv
);
}
else
if
(
preg_match
(
"/define\('DB_NAME'/"
,
$line
))
{
$rv
.
=
"
\t
define('DB_NAME', '
$DB_NAME
');
\n
"
;
}
else
if
(
preg_match
(
"/define\('DB_PASS'/"
,
$line
))
{
$rv
.
=
"
\t
define('DB_PASS', '
$DB_PASS
');
\n
"
;
}
else
if
(
preg_match
(
"/define\('DB_PORT'/"
,
$line
))
{
$rv
.
=
"
\t
define('DB_PORT', '
$DB_PORT
');
\n
"
;
}
else
if
(
preg_match
(
"/define\('SELF_URL_PATH'/"
,
$line
))
{
$rv
.
=
"
\t
define('SELF_URL_PATH', '
$SELF_URL_PATH
');
\n
"
;
}
else
if
(
!
$finished
)
{
$rv
.
=
"
$line
\n
"
;
}
if
(
preg_match
(
"/\?\>/"
,
$line
))
{
$finished
=
true
;
}
}
return
$rv
;
return
$rv
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Angedestenebres
@Angedestenebres
mentioned in issue
#6 (closed)
·
5 years ago
mentioned in issue
#6 (closed)
mentioned in issue #6
Toggle commit list
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