Skip to content
This repository was archived by the owner on Dec 12, 2018. It is now read-only.

Two minor improvements. #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions mongodbadmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
{
die("Mongo support required. Install mongo pecl extension with 'pecl install mongo; echo \"extension=mongo.so\" >> php.ini'");
}

try
{
$mongo = new Mongo(getServer($server), $options);
Expand All @@ -55,9 +56,9 @@ function getServer($server)
{
if (is_array($server)) {
return (isset($_COOKIE['mongo_server']) && isset($server[$_COOKIE['mongo_server']])) ? $server[$_COOKIE['mongo_server']] : $server[0];
} else {
return $server;
}

return $server;
}

/**
Expand Down Expand Up @@ -230,9 +231,9 @@ function findMongoDbDocument($id, $db, $collection, $forceCustomId = false)

if ($customId) {
header('location: ' . $url . '&custom_id=true');
} else {
header('location: ' . $url);
exit;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indention looks out of line here.

}
header('location: ' . $url);
}
}

Expand Down