forked from egbot/Symbiota
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from mandrewj/revert-20-revert-19-master
Revert "Revert "code update""
- Loading branch information
Showing
6,771 changed files
with
849,204 additions
and
1,507 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
<?php | ||
require_once('../config/symbini.php'); | ||
require_once($SERVER_ROOT.'/classes/PortalIndex.php'); | ||
//include_once($SERVER_ROOT.'/content/lang/admin/portalindex.'.$LANG_TAG.'.php'); | ||
header("Content-Type: text/html; charset=".$CHARSET); | ||
|
||
if(!$SYMB_UID) header('Location: '.$CLIENT_ROOT.'/profile/index.php?refurl=../admin/portalindex.php?'.htmlspecialchars($_SERVER['QUERY_STRING'], ENT_QUOTES)); | ||
|
||
$portalID = array_key_exists('portalid',$_REQUEST)?$_REQUEST['portalid']:0; | ||
$collID = array_key_exists('collid',$_REQUEST)?$_REQUEST['collid']:0; | ||
$formSubmit = array_key_exists('formsubmit',$_POST)?$_POST['formsubmit']:''; | ||
|
||
//Sanitation | ||
if(!is_numeric($portalID)) $portalID = 0; | ||
if(!is_numeric($collID)) $collID = 0; | ||
|
||
$portalManager = new PortalIndex(); | ||
|
||
$isEditor = 0; | ||
if($IS_ADMIN) $isEditor = 1; | ||
?> | ||
<html> | ||
<head> | ||
<title><?php echo $DEFAULT_TITLE; ?> Portal Index Control Panel</title> | ||
<?php | ||
$activateJQuery = true; | ||
include_once($SERVER_ROOT.'/includes/head.php'); | ||
?> | ||
<script src="<?php echo $CLIENT_ROOT; ?>/js/jquery.js" type="text/javascript"></script> | ||
<script src="<?php echo $CLIENT_ROOT; ?>/js/jquery-ui.js" type="text/javascript"></script> | ||
<script type="text/javascript"> | ||
</script> | ||
<style type="text/css"> | ||
fieldset{ margin:20px; padding:15px; } | ||
legend{ font-weight: bold; } | ||
label{ font-weight: bold; } | ||
hr{ margin-top: 15px; margin-bottom: 15px; } | ||
</style> | ||
</head> | ||
<body> | ||
<?php | ||
$displayLeftMenu = true; | ||
include($SERVER_ROOT.'/includes/header.php'); | ||
?> | ||
<div class="navpath"> | ||
<a href="../../index.php">Home</a> >> | ||
<b>Portal Index Control Panel</b> | ||
</div> | ||
<div id="innertext"> | ||
<?php | ||
if($isEditor){ | ||
if($formSubmit == ''){ | ||
//$portalManager->; | ||
} | ||
$indexArr = $portalManager->getPortalIndexArr($portalID); | ||
?> | ||
<fieldset> | ||
<legend>Portal Index</legend> | ||
<?php | ||
foreach($indexArr as $portalID => $portalArr){ | ||
foreach($portalArr as $fieldName => $fieldValue){ | ||
if($fieldValue){ | ||
echo '<div><label>'.$fieldName.'</label>: '; | ||
$href = ''; | ||
if($fieldName=='urlRoot') $href = $fieldValue; | ||
elseif($fieldName=='guid') $href = $portalArr['urlRoot'].'/api/v2/installation/ping'; | ||
if($href) echo '<a href="'.$href.'" target="_blank">'; | ||
echo $fieldValue; | ||
if($href) echo '</a>'; | ||
echo '</div>'; | ||
} | ||
} | ||
echo '<hr/>'; | ||
if($collID){ | ||
$url = $portalArr['urlRoot'].'/api/v2/collection/'.$collID; | ||
$collectArr = $portalManager->getAPIResponce($url); | ||
$collTitle = $collectArr['collectionName'].' ('.$collectArr['institutionCode'].($collectArr['collectionCode']?':'.$collectArr['collectionCode']:'').')'; | ||
echo '<div style="font-weight:bold">#'.$collID.': '.$collTitle.'</div>'; | ||
unset($collectArr['collID']); | ||
unset($collectArr['collectionName']); | ||
unset($collectArr['institutionCode']); | ||
unset($collectArr['collectionCode']); | ||
echo '<div style="margin:15px 30px;">'; | ||
foreach($collectArr as $fName => $fValue){ | ||
if($fValue) echo '<div><label>'.$fName.'</label>: '.$fValue.'</div>'; | ||
} | ||
echo '</div>'; | ||
?> | ||
<form name="collPubForm" method="post" action="portalindex.php"> | ||
<input name="portalid" type="hidden" value="<?php echo $portalID; ?>" /> | ||
<input name="collid" type="hidden" value="<?php echo $collID; ?>" /> | ||
<button ></button> | ||
</form> | ||
<?php | ||
} | ||
elseif($formSubmit == 'listCollections'){ | ||
$url = $portalArr['urlRoot'].'/api/v2/collection/'; | ||
$collList = $portalManager->getAPIResponce($url); | ||
if(isset($collList['count'])){ | ||
echo '<div><label>Collection Count</label>: '.$collList['count'].'</div>'; | ||
if($collList['count']){ | ||
echo '<table class="styledtable">'; | ||
echo '<tr><th>ID</th><th>Institution Code</th><th>Collection Code</th><th>Collection Name</th><th>Dataset Type</th><th>Management</th></tr>'; | ||
foreach($collList['results'] as $collArr){ | ||
echo '<tr>'; | ||
echo '<td><a href="portalindex.php?portalid='.$portalID.'&collid='.$collArr['collID'].'">'.$collArr['collID'].'</a></td>'; | ||
echo '<td>'.$collArr['institutionCode'].'</td>'; | ||
echo '<td>'.$collArr['collectionCode'].'</td>'; | ||
echo '<td>'.$collArr['collectionName'].'</td>'; | ||
echo '<td>'.$collArr['collType'].'</td>'; | ||
echo '<td>'.$collArr['managementType'].'</td>'; | ||
echo '</tr>'; | ||
} | ||
echo '</table>'; | ||
} | ||
} | ||
} | ||
else{ | ||
?> | ||
<div> | ||
<form name="portalActionForm" method="post" action="portalindex.php"> | ||
<input name="portalid" type="hidden" value="<?php echo $portalID; ?>" /> | ||
<button name="formsubmit" type="submit" value="listCollections">List Collections</button> | ||
</form> | ||
</div> | ||
<?php | ||
} | ||
echo '<hr/>'; | ||
} | ||
?> | ||
</fieldset> | ||
<?php | ||
} | ||
else echo '<h2>ERROR: access denied</h2>'; | ||
?> | ||
</div> | ||
<?php | ||
include($SERVER_ROOT.'/includes/footer.php'); | ||
?> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
APP_NAME=Lumen | ||
APP_ENV=local | ||
APP_KEY= | ||
APP_DEBUG=true | ||
APP_URL= | ||
APP_TIMEZONE=UTC | ||
|
||
LOG_CHANNEL=stack | ||
LOG_SLACK_WEBHOOK_URL= | ||
|
||
DB_CONNECTION=mysql | ||
DB_HOST= | ||
DB_PORT= | ||
DB_DATABASE= | ||
DB_USERNAME= | ||
DB_PASSWORD= | ||
|
||
CACHE_DRIVER=file | ||
QUEUE_CONNECTION=sync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
APP_NAME=Lumen | ||
APP_ENV=local | ||
APP_KEY= | ||
APP_DEBUG=true | ||
APP_URL=http://localhost | ||
APP_TIMEZONE=UTC | ||
|
||
LOG_CHANNEL=stack | ||
LOG_SLACK_WEBHOOK_URL= | ||
|
||
DB_CONNECTION=mysql | ||
DB_HOST=127.0.0.1 | ||
DB_PORT=3306 | ||
DB_DATABASE=homestead | ||
DB_USERNAME=homestead | ||
DB_PASSWORD=secret | ||
|
||
CACHE_DRIVER=file | ||
QUEUE_CONNECTION=sync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
node_modules/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# Laravel 4 specific | ||
bootstrap/compiled.php | ||
app/storage/ | ||
|
||
# Laravel 5 & Lumen specific | ||
public/storage | ||
public/hot | ||
|
||
# Laravel 5 & Lumen specific with changed public path | ||
public_html/storage | ||
public_html/hot | ||
|
||
storage/*.key | ||
Homestead.yaml | ||
Homestead.json | ||
/.vagrant | ||
.phpunit.result.cache | ||
/.idea | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<IfModule mod_rewrite.c> | ||
<IfModule mod_negotiation.c> | ||
Options -MultiViews -Indexes | ||
</IfModule> | ||
|
||
RewriteEngine On | ||
|
||
# Handle Authorization Header | ||
RewriteCond %{HTTP:Authorization} . | ||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | ||
|
||
# Redirect Trailing Slashes If Not A Folder... | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteCond %{REQUEST_URI} (.+)/$ | ||
RewriteRule ^ %1 [L,R=301] | ||
|
||
# Handle Front Controller... | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteRule ^ index.php [L] | ||
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
php: | ||
preset: laravel | ||
disabled: | ||
- unused_use | ||
js: true | ||
css: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
namespace App; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class Collection extends Model{ | ||
|
||
protected $table = 'omcollections'; | ||
protected $primaryKey = 'collid'; | ||
public $timestamps = false; | ||
|
||
protected $fillable = [ | ||
'InstitutionCode', 'CollectionCode', 'CollectionName', 'collectionId', 'datasetID', 'datasetName', 'fulldescription', 'resourceJson', 'IndividualUrl', 'contactJson', | ||
'latitudedecimal', 'longitudedecimal', 'icon', 'CollType', 'ManagementType', 'PublicEdits', 'collectionguid', 'rightsHolder', 'rights', 'usageTerm', 'dwcaUrl', | ||
'bibliographicCitation', 'accessrights', 'SortSeq' | ||
]; | ||
|
||
protected $hidden = ['securitykey', 'guidtarget', 'aggKeysStr', 'dwcTermJson', 'publishToGbif', 'publishToIdigbio', 'dynamicProperties']; | ||
|
||
public function occurrence(){ | ||
return $this->hasMany(Occurrence::class, 'collid', 'collid'); | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace App\Console; | ||
|
||
use Illuminate\Console\Scheduling\Schedule; | ||
use Laravel\Lumen\Console\Kernel as ConsoleKernel; | ||
|
||
class Kernel extends ConsoleKernel | ||
{ | ||
/** | ||
* The Artisan commands provided by your application. | ||
* | ||
* @var array | ||
*/ | ||
protected $commands = [ | ||
// | ||
]; | ||
|
||
/** | ||
* Define the application's command schedule. | ||
* | ||
* @param \Illuminate\Console\Scheduling\Schedule $schedule | ||
* @return void | ||
*/ | ||
protected function schedule(Schedule $schedule) | ||
{ | ||
// | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use Illuminate\Queue\SerializesModels; | ||
|
||
abstract class Event | ||
{ | ||
use SerializesModels; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
class ExampleEvent extends Event | ||
{ | ||
/** | ||
* Create a new event instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
// | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
namespace App\Exceptions; | ||
|
||
use Illuminate\Auth\Access\AuthorizationException; | ||
use Illuminate\Database\Eloquent\ModelNotFoundException; | ||
use Illuminate\Validation\ValidationException; | ||
use Laravel\Lumen\Exceptions\Handler as ExceptionHandler; | ||
use Symfony\Component\HttpKernel\Exception\HttpException; | ||
use Throwable; | ||
|
||
class Handler extends ExceptionHandler | ||
{ | ||
/** | ||
* A list of the exception types that should not be reported. | ||
* | ||
* @var array | ||
*/ | ||
protected $dontReport = [ | ||
AuthorizationException::class, | ||
HttpException::class, | ||
ModelNotFoundException::class, | ||
ValidationException::class, | ||
]; | ||
|
||
/** | ||
* Report or log an exception. | ||
* | ||
* This is a great spot to send exceptions to Sentry, Bugsnag, etc. | ||
* | ||
* @param \Throwable $exception | ||
* @return void | ||
* | ||
* @throws \Exception | ||
*/ | ||
public function report(Throwable $exception) | ||
{ | ||
parent::report($exception); | ||
} | ||
|
||
/** | ||
* Render an exception into an HTTP response. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @param \Throwable $exception | ||
* @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse | ||
* | ||
* @throws \Throwable | ||
*/ | ||
public function render($request, Throwable $exception) | ||
{ | ||
return parent::render($request, $exception); | ||
} | ||
} |
Oops, something went wrong.