Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Poduptime
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
diasporg
Poduptime
Commits
41f234fd
Commit
41f234fd
authored
Jan 15, 2017
by
noplanman
Committed by
David Morley
Jan 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary pg_free_result and pg_close calls. (#76)
ah, never knew you did not Have to have them!
parent
24e8cc15
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
0 additions
and
35 deletions
+0
-35
api-more.php
api-more.php
+0
-2
api.php
api.php
+0
-3
cleanup.php
cleanup.php
+0
-2
db/add.php
db/add.php
+0
-3
db/edit.php
db/edit.php
+0
-2
db/gettoken.php
db/gettoken.php
+0
-4
db/kill.php
db/kill.php
+0
-3
db/pull.php
db/pull.php
+0
-3
db/saverating.php
db/saverating.php
+0
-3
go.php
go.php
+0
-2
rate.php
rate.php
+0
-2
show.php
show.php
+0
-2
showfull.php
showfull.php
+0
-2
showstats.php
showstats.php
+0
-2
No files found.
api-more.php
View file @
41f234fd
...
...
@@ -32,5 +32,3 @@ while ($row = pg_fetch_array($result)) {
echo
'Longitude: '
.
$row
[
'long'
]
.
'<br>'
;
}
}
pg_free_result
(
$result
);
pg_close
(
$dbh
);
api.php
View file @
41f234fd
...
...
@@ -90,6 +90,3 @@ EOF;
);
}
}
pg_free_result
(
$result
);
pg_close
(
$dbh
);
cleanup.php
View file @
41f234fd
...
...
@@ -97,8 +97,6 @@ $numrows = pg_num_rows($result);
<?php
echo
'</td></tr>'
;
}
pg_free_result
(
$result
);
pg_close
(
$dbh
);
?>
</tbody>
</table>
db/add.php
View file @
41f234fd
...
...
@@ -80,9 +80,6 @@ if (stristr($outputssl, 'nodeName')) {
echo
'Data successfully inserted! Your pod will be reviewed and live on the list in a few hours!'
;
pg_free_result
(
$result
);
pg_close
(
$dbh
);
}
else
{
$log
->
lwrite
(
'Could not validate your pod, check your setup! '
.
$_domain
);
echo
'Could not validate your pod, check your setup!<br>Take a look at <a href="https://'
.
$_domain
.
'/nodeinfo/1.0">your /nodeinfo</a>'
;
...
...
db/edit.php
View file @
41f234fd
...
...
@@ -49,8 +49,6 @@ while ($row = pg_fetch_array($result)) {
$message
=
'Data for '
.
$_domain
.
" Updated. If it was not you reply and let me know!
\n\n
"
;
$headers
=
"From: "
.
$adminemail
.
"
\r\n
Cc:"
.
$adminemail
.
","
.
$_oldemail
.
"
\r\n
"
;
@
mail
(
$to
,
$subject
,
$message
,
$headers
);
pg_free_result
(
$result
);
pg_close
(
$dbh
);
die
(
'Data saved. Will go into effect on next hourly change'
);
}
...
...
db/gettoken.php
View file @
41f234fd
...
...
@@ -49,8 +49,4 @@ while ($row = pg_fetch_array($result)) {
@
mail
(
$to
,
$subject
,
$message
,
$headers
);
echo
'Link sent to administrator to review and verify, if approved they will forward the edit key to you.'
;
}
pg_free_result
(
$result
);
}
pg_close
(
$dbh
);
db/kill.php
View file @
41f234fd
...
...
@@ -33,7 +33,6 @@ while ($row = pg_fetch_array($result)) {
$headers
=
"From: "
.
$adminemail
.
"
\r\n
Cc:"
.
$adminemail
.
","
.
$row
[
'email'
]
.
"
\r\n
"
;
@
mail
(
$to
,
$subject
,
$message
,
$headers
);
}
pg_free_result
(
$result
);
}
elseif
(
$_action
===
'warn'
)
{
if
(
$row
[
'email'
])
{
$to
=
$row
[
'email'
];
...
...
@@ -46,5 +45,3 @@ while ($row = pg_fetch_array($result)) {
echo
$result
;
}
pg_close
(
$dbh
);
db/pull.php
View file @
41f234fd
...
...
@@ -89,7 +89,6 @@ while ($row = pg_fetch_all($result)) {
if
(
$admindb
==
-
1
)
{
$admin_rating
=
-
1
;
}
pg_free_result
(
$ratings
);
unset
(
$name
);
unset
(
$total_users
);
unset
(
$active_users_halfyear
);
...
...
@@ -289,5 +288,3 @@ while ($row = pg_fetch_all($result)) {
//end foreach
}
}
pg_free_result
(
$result
);
pg_close
(
$dbh
);
db/saverating.php
View file @
41f234fd
...
...
@@ -25,6 +25,3 @@ $message = 'Pod:' . $_domain . $_domain . $_username . $_userurl . $_comment . $
$headers
=
'From: '
.
$_email
.
"
\r\n
"
;
@
mail
(
$to
,
$subject
,
$message
,
$headers
);
echo
'Comment posted!'
;
pg_free_result
(
$result
);
pg_close
(
$dbh
);
go.php
View file @
41f234fd
...
...
@@ -35,5 +35,3 @@ if ($_url) {
header
(
'Location:https://'
.
$row
[
0
][
'domain'
]
.
'/users/sign_up'
);
}
pg_free_result
(
$result
);
pg_close
(
$dbh
);
rate.php
View file @
41f234fd
...
...
@@ -90,5 +90,3 @@
</div>
</div>
<?php
pg_free_result
(
$result
);
pg_close
(
$dbh
);
show.php
View file @
41f234fd
...
...
@@ -59,8 +59,6 @@ $numrows = pg_num_rows($result);
$row
[
'service_xmpp'
]
===
't'
&&
print
'<div class="smlogo smlogo-xmpp"><img src="/images/icon-xmpp.png" width="16" height="16" title="XMPP chat server" alt="XMPP chat server"></div>'
;
echo
'</td></tr>'
;
}
pg_free_result
(
$result
);
pg_close
(
$dbh
);
?>
</tbody>
</table>
showfull.php
View file @
41f234fd
...
...
@@ -93,8 +93,6 @@ $numrows = pg_num_rows($result);
$row
[
'service_xmpp'
]
===
't'
&&
print
'<div class="smlogo smlogo-xmpp"><img src="/images/icon-xmpp.png" width="16" height="16" title="XMPP chat server" alt="XMPP chat server"></div>'
;
echo
'</td></tr>'
;
}
pg_free_result
(
$result
);
pg_close
(
$dbh
);
?>
</tbody>
</table>
showstats.php
View file @
41f234fd
...
...
@@ -48,5 +48,3 @@ if ($uptr->monitors[0]->status == 9) {
$live
=
'Down'
;
}
echo
'Status: '
.
$live
;
pg_free_result
(
$result
);
pg_close
(
$dbh
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment