Skip to content

Commit

Permalink
Merge pull request #101 from jsperhac/php7-xdmod
Browse files Browse the repository at this point in the history
Modify xdmod source for php7 compatibility. Schema version changes requested by @jtpalmer are included.
  • Loading branch information
jsperhac authored Apr 20, 2017
2 parents eed4e57 + 53e923d commit 678b7c7
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 305 deletions.
77 changes: 0 additions & 77 deletions classes/Glossary.php

This file was deleted.

2 changes: 1 addition & 1 deletion classes/OpenXdmod/DataWarehouseInitializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class DataWarehouseInitializer
* @var array
*/
protected $shreddedJobIngestors = array(
'Resource',
'Resources',
'PI',
'PIResource',
'UserPIResource',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PDODBSynchronizingIngestor;

class Resource extends PDODBSynchronizingIngestor
class Resources extends PDODBSynchronizingIngestor
{
public function __construct($dest_db, $src_db)
{
Expand All @@ -20,4 +20,3 @@ public function __construct($dest_db, $src_db)
);
}
}

2 changes: 1 addition & 1 deletion db/data/moddb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

INSERT INTO `schema_version_history` VALUES ('moddb', '6.6.0', NOW(), 'created', 'N/A');
INSERT INTO `schema_version_history` VALUES ('moddb', '6.7.0', NOW(), 'created', 'N/A');
5 changes: 5 additions & 0 deletions db/migrations/6.6.0-6.7.0/moddb.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DROP TABLE IF EXISTS `Glossary`;

DROP TABLE IF EXISTS `GlossaryAliases`;

INSERT INTO `schema_version_history` VALUES ('moddb', '6.7.0', NOW(), 'upgraded', 'N/A');
16 changes: 0 additions & 16 deletions db/schema/moddb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,6 @@ CREATE TABLE `ExceptionEmailAddresses` (
`email_address` varchar(200) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Glossary`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Glossary` (
`term` text,
`definition` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GlossaryAliases`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GlossaryAliases` (
`term` text,
`alias` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `RESTx509`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
Expand Down
34 changes: 0 additions & 34 deletions html/controllers/ui_data/repogen_sites.php

This file was deleted.

30 changes: 0 additions & 30 deletions html/controllers/user_profile.php

This file was deleted.

20 changes: 0 additions & 20 deletions html/controllers/user_profile/fetch_profile.php

This file was deleted.

27 changes: 0 additions & 27 deletions html/controllers/user_profile/list_fields_of_science.php

This file was deleted.

49 changes: 0 additions & 49 deletions html/controllers/user_profile/update_profile.php

This file was deleted.

25 changes: 0 additions & 25 deletions libraries/network.php

This file was deleted.

22 changes: 0 additions & 22 deletions libraries/utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,28 +184,6 @@ function quote($entity)
return "'$entity'";
}

/**
* Resolve a token?
*/
function tokenResolver($input)
{
$user = \xd_security\getLoggedInUser();

$mappings = array(
"username" => $user->getUsername()
);

$output = $input;

foreach ($mappings as $find => $replace) {
$output = str_replace("<$find>", $replace, $output);
}

$output = mysql_escape_string($output);

return $output;
}

/**
* Remove an element from an array.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct($config = array())

private function processResponseHeader($curl, $headerline)
{
$tokens = split(':', $headerline);
$tokens = explode(':', $headerline);
if (count($tokens) == 2) {
$this->responseHeaders[$tokens[0]] = $tokens[1];
}
Expand Down

0 comments on commit 678b7c7

Please sign in to comment.