Skip to content

Commit

Permalink
Merge pull request #116 from UMiamiLibraries/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
little9 authored Jun 22, 2016
2 parents 229a920 + ef3e6ce commit 5b4b529
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 59 deletions.
4 changes: 2 additions & 2 deletions conf/db.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
$db_host = '127.0.0.1';
$db_user = 'root';
$db_pass = '';
$db_pass = 'root';
$db_default = 'ead_eac';
$db_port = '3306';
$db_port = '3306';
4 changes: 2 additions & 2 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<link rel="stylesheet" type="text/css" href="style/select2-skins.css">

<!-- Pure, Font Awesome, Lato Font -->
<link rel="stylesheet" href="style/pure-min.css">
<link rel="stylesheet" href="style/grids-responsive-min.css">
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-min.css">
<link rel="stylesheet" href="style/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Lato:400,900italic,900,700italic,700,400italic,300italic,300' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="style/main.css"/>
Expand Down
51 changes: 24 additions & 27 deletions lib/RAMP/Ingest/IngestStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,30 @@ public function __construct($eac_id, Database $db)
$db = Database::getInstance();
$mysqli = $db->getConnection();

try {
$statement = $mysqli->prepare("SELECT eac_xml FROM eac WHERE eac_id = ?");
$statement->bind_param("s", $eac_id);
$statement->execute();
$statement->bind_result($result);
$statement->fetch();
$this->eac_xml_string = $result;
$this->eac_xml_dom = simplexml_load_string($result);
$this->eac_xml_dom->registerXPathNamespace('eac', 'urn:isbn:1-931666-33-4');

$statement->close();

$wiki_stmt = $mysqli->prepare("SELECT wiki_text FROM mediawiki WHERE eac_id = ?");
$wiki_stmt->bind_param("s", $eac_id);
$wiki_stmt->execute();
$wiki_stmt->bind_result($result);
$wiki_stmt->fetch();
$wiki_stmt->close();

if ($result != null) {
$this->wiki_status = 'true';
} else {
$this->wiki_status = 'false';
}

} catch (\Exception $e) {

$statement = $mysqli->prepare("SELECT eac_xml FROM ead_eac.eac WHERE eac_id = ?");
$statement->bind_param("s", $eac_id);
$statement->execute();
$statement->bind_result($result);
$statement->fetch();
$this->eac_xml_string = $result;
$this->eac_xml_dom = simplexml_load_string($result);
$this->eac_xml_dom->registerXPathNamespace('eac', 'urn:isbn:1-931666-33-4');

$statement->close();

$wiki_stmt = $mysqli->prepare("SELECT wiki_text FROM ead_eac.mediawiki WHERE eac_id = ?");
$wiki_stmt->bind_param("s", $eac_id);
$wiki_stmt->execute();
$wiki_stmt->bind_result($result);
$wiki_stmt->fetch();
$wiki_stmt->close();

if ($result != null) {
$this->wiki_status = 'true';
} else {
$this->wiki_status = 'false';


}
}

Expand Down
5 changes: 2 additions & 3 deletions lib/RAMP/Wiki/Wikiator.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,9 @@ private function setupCurl()
*/
static function encodeForUrl($lstrString)
{
$lstrString = preg_replace('/\s\s+/', " ", $lstrString );
$lstrString = rawurlencode(utf8_decode($lstrString));

return $lstrString;

return urlencode(trim($lstrString));
}

/**
Expand Down
5 changes: 0 additions & 5 deletions script/eac_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,6 @@ function Ead()
lobjAttributes["cpfRelationType"] = lobjRels;
}

if ( lobjAttributes["xlink:type"] == '' )
{
lobjAttributes["xlink:type"] = "simple";
}

var lobjCPFRelationNode = this.createElement( 'cpfRelation', lobjAttributes, lobjElements );

if( this.doesElementExist('//*[local-name()=\'cpfDescription\']/*[local-name()=\'relations\']/*[local-name()=\'resourceRelation\']') )
Expand Down
4 changes: 2 additions & 2 deletions script/ingest_wiki.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,14 @@ function getLocalWikiMarkup(eacId) {

function autoSearchWikipedia(entityName) {

lstrUserSearch = encode_utf8(entityName);
var lstrUserSearch = entityName;

showLoadingImage();

//post to ajax wiki controller to search wiki and get results
$.post('ajax/wiki_api.php', {'action': 'search', 'title': lstrUserSearch}, function (response) {
try {
lobjData = JSON.parse(response);
var lobjData = JSON.parse(response);
}
catch (e) {
renderFlashMessage('<p>' + e.message + '</p>');
Expand Down
7 changes: 0 additions & 7 deletions style/grids-responsive-min.css

This file was deleted.

11 changes: 0 additions & 11 deletions style/pure-min.css

This file was deleted.

0 comments on commit 5b4b529

Please sign in to comment.