Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify xdmod source for php7 compatibility #101

Merged
merged 1 commit into from
Apr 20, 2017
Merged
Show file tree
Hide file tree
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
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`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add this to the bottom of the file:

INSERT INTO `schema_version_history` VALUES ('moddb', '6.7.0', NOW(), 'upgraded', 'N/A');

Also, please update the schema version in db/data/moddb.sql.

The schema versions aren't used for anything at this time, but might as well keep updating them until we decide if we want to get rid of them.


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