Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
551e19dc
Commit
551e19dc
authored
9 years ago
by
Jaime Perez Crespo
Browse files
Options
Downloads
Patches
Plain Diff
Minor fixes in comments and phpdocs.
parent
b63c5c71
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/SimpleSAML/Database.php
+4
-4
4 additions, 4 deletions
lib/SimpleSAML/Database.php
lib/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php
+4
-8
4 additions, 8 deletions
lib/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php
with
8 additions
and
12 deletions
lib/SimpleSAML/Database.php
+
4
−
4
View file @
551e19dc
...
...
@@ -60,12 +60,12 @@ class Database
$config
=
(
$altConfig
)
?
$altConfig
:
\SimpleSAML_Configuration
::
getInstance
();
$instanceId
=
self
::
generateInstanceId
(
$config
);
/
* C
heck if we already have initialized the session
. */
/
/ c
heck if we already have initialized the session
if
(
isset
(
self
::
$instance
[
$instanceId
]))
{
return
self
::
$instance
[
$instanceId
];
}
/
* C
reate a new session
. */
/
/ c
reate a new session
self
::
$instance
[
$instanceId
]
=
new
Database
(
$config
);
return
self
::
$instance
[
$instanceId
];
}
...
...
@@ -83,7 +83,7 @@ class Database
$driverOptions
=
array
(
\PDO
::
ATTR_PERSISTENT
=>
true
);
}
//
C
onnect to the master
//
c
onnect to the master
$this
->
dbMaster
=
$this
->
connect
(
$config
->
getString
(
'database.dsn'
),
$config
->
getString
(
'database.username'
,
null
),
...
...
@@ -91,7 +91,7 @@ class Database
$driverOptions
);
//
C
onnect to any configured slaves
//
c
onnect to any configured slaves
$slaves
=
$config
->
getArray
(
'database.slaves'
,
array
());
if
(
count
(
$slaves
>=
1
))
{
foreach
(
$slaves
as
$slave
)
{
...
...
This diff is collapsed.
Click to expand it.
lib/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php
+
4
−
8
View file @
551e19dc
...
...
@@ -51,22 +51,18 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerPdo extends SimpleSAML_Metadata_
* This constructor initializes the PDO metadata storage handler with the specified
* configuration. The configuration is an associative array with the following
* possible elements (set in config.php):
* - 'usePersistentConnection': TRUE/FALSE if database connection should be
* persistent.
*
* - 'dsn': The database connection string.
*
* - 'usePersistentConnection': TRUE/FALSE if database connection should be persistent.
* - 'dsn': The database connection string.
* - 'username': Database user name
*
* - 'password': Password for the database user.
*
* @param array $config An associtive array with the configuration for this handler.
* @param array $config An associ
a
tive array with the configuration for this handler.
*/
public
function
__construct
(
$config
)
{
assert
(
'is_array($config)'
);
$this
->
db
=
SimpleSAML\Database
::
getInstance
();
$this
->
db
=
SimpleSAML\Database
::
getInstance
(
$config
);
}
...
...
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