Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3264e10
trying to request gokb
AmandineMroad Jun 23, 2015
4c01291
"oui"
AmandineMroad Jun 23, 2015
4657a60
GOKb search + display results
AmandineMroad Jun 26, 2015
76599a3
display all results + display resource details
AmandineMroad Jun 26, 2015
3d07d05
ajout pagination et mise en forme, pagination en cours (non terminée)
AmandineMroad Jul 3, 2015
2a5f3f7
amélioration pagination
AmandineMroad Jul 3, 2015
786350b
back button display previous screen
AmandineMroad Jul 9, 2015
c85132d
EN TRAVAUX _ Implémentation fonction d'import commune, début code spé…
AmandineMroad Jul 27, 2015
d5ef957
0729
AmandineMroad Jul 29, 2015
310e52c
new import csv with common import tool
AmandineMroad Jul 30, 2015
bf64271
DB update file (add tables Identifier and IdentifierType)
AmandineMroad Jul 30, 2015
b6881e4
display csv import stat + removeResourceIdentifiers
AmandineMroad Jul 30, 2015
e034129
Import _ ResourceType treatment
AmandineMroad Jul 31, 2015
999a55b
Add GOKb Alias/history Treatment
AmandineMroad Jul 31, 2015
d202a13
add package import
AmandineMroad Aug 3, 2015
5b9bafb
Add organizations hierarchy (org module) + debug import package(not f…
AmandineMroad Aug 3, 2015
a6a1723
debug history.js (not completed)
AmandineMroad Aug 3, 2015
0aee465
adding select button on resource details screen
AmandineMroad Aug 4, 2015
edc66b9
UI displaying improvement
AmandineMroad Aug 4, 2015
4622a25
add loading gif + link tipp/details
AmandineMroad Aug 5, 2015
f2dbf54
ajax errors treatment
AmandineMroad Aug 5, 2015
6420193
add beginning of package content customization
AmandineMroad Aug 5, 2015
dadfd6b
Fix bug of resource duplication + customization of package content
AmandineMroad Aug 7, 2015
ec3f056
package content customization + little IHM improvements
AmandineMroad Aug 11, 2015
08aeed6
HTTP Client inheritance
AmandineMroad Aug 11, 2015
5f0b5be
Fix back button bug
AmandineMroad Aug 12, 2015
7809fd1
filter and css for package customization, add custom link on each pac…
AmandineMroad Aug 13, 2015
5ffe64a
fix allResults back button
AmandineMroad Aug 17, 2015
1c29262
add code comments
AmandineMroad Aug 18, 2015
ed98602
Fix some bugs
AmandineMroad Aug 18, 2015
baf590b
DB change, drop table IsbnOrIssn
AmandineMroad Aug 20, 2015
6be47a7
fix display bug
AmandineMroad Aug 20, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions admin/classes/common/DBService.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ protected function dealloc() {
protected function checkForError() {
if ($this->error = mysql_error($this->db)) {
throw new Exception("There was a problem with the database: " . $this->error);
echo "DEBUG _ ERROR process query : ".$this->error;
}
}

Expand Down
132 changes: 72 additions & 60 deletions admin/classes/domain/AcquisitionType.php
Original file line number Diff line number Diff line change
@@ -1,69 +1,81 @@
<?php

/*
**************************************************************************************************************************
** CORAL Resources Module v. 1.0
**
** Copyright (c) 2010 University of Notre Dame
**
** This file is part of CORAL.
**
** CORAL is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
**
** CORAL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License along with CORAL. If not, see <http://www.gnu.org/licenses/>.
**
**************************************************************************************************************************
*/
* *************************************************************************************************************************
* * CORAL Resources Module v. 1.0
* *
* * Copyright (c) 2010 University of Notre Dame
* *
* * This file is part of CORAL.
* *
* * CORAL is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
* *
* * CORAL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
* *
* * You should have received a copy of the GNU General Public License along with CORAL. If not, see <http://www.gnu.org/licenses/>.
* *
* *************************************************************************************************************************
*/

class AcquisitionType extends DatabaseObject {

protected function defineRelationships() {}

protected function overridePrimaryKeyName() {}



public function sortedArray() {
$query = "SELECT * FROM AcquisitionType ORDER BY IF(UCASE(shortName)='PAID',1, 2), shortName asc";
$result = $this->db->processQuery($query, 'assoc');

$resultArray = array();
$rowArray = array();

if (isset($result['AcquisitionTypeID'])){
foreach (array_keys($result) as $attributeName) {
$rowArray[$attributeName] = $result[$attributeName];
}
array_push($resultArray, $rowArray);
}else{
foreach ($result as $row) {
foreach (array_keys($this->attributeNames) as $attributeName) {
$rowArray[$attributeName] = $row[$attributeName];
}
array_push($resultArray, $rowArray);
}
}

return $resultArray;
}





//returns number of children for this particular contact role
public function getNumberOfChildren(){

$query = "SELECT count(*) childCount FROM Resource WHERE acquisitionTypeID = '" . $this->acquisitionTypeID . "';";

$result = $this->db->processQuery($query, 'assoc');

return $result['childCount'];

}

protected function defineRelationships() {

}

protected function overridePrimaryKeyName() {

}

public function sortedArray() {
$query = "SELECT * FROM AcquisitionType ORDER BY IF(UCASE(shortName)='PAID',1, 2), shortName asc";
$result = $this->db->processQuery($query, 'assoc');

$resultArray = array();
$rowArray = array();

if (isset($result['AcquisitionTypeID'])) {
foreach (array_keys($result) as $attributeName) {
$rowArray[$attributeName] = $result[$attributeName];
}
array_push($resultArray, $rowArray);
} else {
foreach ($result as $row) {
foreach (array_keys($this->attributeNames) as $attributeName) {
$rowArray[$attributeName] = $row[$attributeName];
}
array_push($resultArray, $rowArray);
}
}

return $resultArray;
}

//returns number of children for this particular contact role
public function getNumberOfChildren() {

$query = "SELECT count(*) childCount FROM Resource WHERE acquisitionTypeID = '" . $this->acquisitionTypeID . "';";

$result = $this->db->processQuery($query, 'assoc');

return $result['childCount'];
}

public static function getAcquisitionTypeID($type) {
$object = new AcquisitionType();
$query = "SELECT acquisitionTypeID FROM AcquisitionType WHERE upper(shortName) = '" . str_replace("'", "''", strtoupper($type)) . "'";

$result = $object->db->processQuery($query, 'assoc');

if (count($result) == 0) {
$object->shortName = $type;
$object->save();
$id = $object->acquisitionTypeID;
} else {
$id = $result[0];
}
return $id;
}

}

Expand Down
62 changes: 39 additions & 23 deletions admin/classes/domain/AliasType.php
Original file line number Diff line number Diff line change
@@ -1,40 +1,56 @@
<?php

/*
**************************************************************************************************************************
** CORAL Resources Module v. 1.0
**
** Copyright (c) 2010 University of Notre Dame
**
** This file is part of CORAL.
**
** CORAL is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
**
** CORAL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License along with CORAL. If not, see <http://www.gnu.org/licenses/>.
**
**************************************************************************************************************************
*/
* *************************************************************************************************************************
* * CORAL Resources Module v. 1.0
* *
* * Copyright (c) 2010 University of Notre Dame
* *
* * This file is part of CORAL.
* *
* * CORAL is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
* *
* * CORAL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
* *
* * You should have received a copy of the GNU General Public License along with CORAL. If not, see <http://www.gnu.org/licenses/>.
* *
* *************************************************************************************************************************
*/

class AliasType extends DatabaseObject {

protected function defineRelationships() {}
protected function defineRelationships() {

}

protected function overridePrimaryKeyName() {}
protected function overridePrimaryKeyName() {

}

//returns number of children for this particular alias type
public function getNumberOfChildren() {

$query = "SELECT count(*) childCount FROM Alias WHERE aliasTypeID = '" . $this->aliasTypeID . "';";

//returns number of children for this particular alias type
public function getNumberOfChildren(){
$result = $this->db->processQuery($query, 'assoc');

$query = "SELECT count(*) childCount FROM Alias WHERE aliasTypeID = '" . $this->aliasTypeID . "';";
return $result['childCount'];
}

$result = $this->db->processQuery($query, 'assoc');
public static function getAliasTypeID($type) {
$object = new AliasType();
$query = "SELECT aliasTypeID FROM AliasType WHERE upper(shortName) = '" . str_replace("'", "''", strtoupper($type)) . "'";

return $result['childCount'];
$result = $object->db->processQUery($query);

if (count($result) == 0) {
$id = null;
} else {
$id = $result[0];
}
return $id;
}

}
}

?>
Loading