diff --git a/Credentials/CHANGEDB.php b/Credentials/CHANGEDB.php
index fb427a7..f3dde37 100644
--- a/Credentials/CHANGEDB.php
+++ b/Credentials/CHANGEDB.php
@@ -65,3 +65,8 @@
++$count;
$sql[$count][0] = '2.1.01';
$sql[$count][1] = "";
+
+//2.1.02
+++$count;
+$sql[$count][0] = '2.1.02';
+$sql[$count][1] = "";
diff --git a/Credentials/CHANGELOG.txt b/Credentials/CHANGELOG.txt
index 5d6b5af..04a038f 100644
--- a/Credentials/CHANGELOG.txt
+++ b/Credentials/CHANGELOG.txt
@@ -1,5 +1,10 @@
CHANGELOG
=========
+2.1.02
+------
+Made credentials created by others editable
+Added Notes field to import
+
2.1.01
------
Made credential view list visual
diff --git a/Credentials/credentials_student.php b/Credentials/credentials_student.php
index 5f92cf9..f89c650 100755
--- a/Credentials/credentials_student.php
+++ b/Credentials/credentials_student.php
@@ -153,10 +153,8 @@
}
echo '';
echo '
';
- if ($row['gibbonPersonIDCreator'] == $_SESSION[$guid]['gibbonPersonID']) {
echo " ";
echo "";
- }
echo ' | ';
echo '';
}
diff --git a/Credentials/import_credentials.php b/Credentials/import_credentials.php
index 1716113..7d8c1bd 100755
--- a/Credentials/import_credentials.php
+++ b/Credentials/import_credentials.php
@@ -118,6 +118,7 @@
* -
-
+
@@ -190,6 +191,7 @@
$users[$userSuccessCount]['title'] = $data[1];
$users[$userSuccessCount]['username2'] = $data[2];
$users[$userSuccessCount]['password'] = $data[3];
+ $users[$userSuccessCount]['notes'] = $data[4];
++$userSuccessCount;
} else {
echo "";
@@ -268,8 +270,8 @@
if ($result->rowCount() < 1) { //INSERT
$credentialInsertFail = false;
try {
- $data = array('username' => $user['username'], 'title' => $user['title'], 'username2' => $user['username2'], 'password' => $passwordFinal, 'gibbonPersonIDCreator' => $_SESSION[$guid]['gibbonPersonID'], 'timestampCreator' => date('Y-m-d H:i:s', time()));
- $sql = 'INSERT INTO credentialsCredential SET gibbonPersonID=(SELECT gibbonPersonID FROM gibbonPerson WHERE username=:username), credentialsWebsiteID=(SELECT credentialsWebsiteID FROM credentialsWebsite WHERE title=:title), username=:username2, password=:password, gibbonPersonIDCreator=:gibbonPersonIDCreator, timestampCreator=:timestampCreator';
+ $data = array('username' => $user['username'], 'title' => $user['title'], 'username2' => $user['username2'], 'password' => $passwordFinal, 'notes' => $user['notes'], 'gibbonPersonIDCreator' => $_SESSION[$guid]['gibbonPersonID'], 'timestampCreator' => date('Y-m-d H:i:s', time()));
+ $sql = 'INSERT INTO credentialsCredential SET gibbonPersonID=(SELECT gibbonPersonID FROM gibbonPerson WHERE username=:username), credentialsWebsiteID=(SELECT credentialsWebsiteID FROM credentialsWebsite WHERE title=:title), username=:username2, password=:password, notes=:notes, gibbonPersonIDCreator=:gibbonPersonIDCreator, timestampCreator=:timestampCreator';
$result = $connection2->prepare($sql);
$result->execute($data);
} catch (PDOException $e) {
@@ -290,13 +292,12 @@
$credentialInsertFail = false;
$row = $result->fetch();
try {
- $data = array('credentialsCredentialID' => $row['credentialsCredentialID'], 'username2' => $user['username2'], 'password' => $passwordFinal);
- $sql = 'UPDATE credentialsCredential SET username=:username2, password=:password WHERE credentialsCredentialID=:credentialsCredentialID';
+ $data = array('credentialsCredentialID' => $row['credentialsCredentialID'], 'username2' => $user['username2'], 'password' => $passwordFinal, 'notes' => $user['notes']);
+ $sql = 'UPDATE credentialsCredential SET username=:username2, password=:password, notes=:notes WHERE credentialsCredentialID=:credentialsCredentialID';
$result = $connection2->prepare($sql);
$result->execute($data);
} catch (PDOException $e) {
$credentialInsertFail = true;
- echo $e->getMessage();
}
//Spit out results
diff --git a/Credentials/manifest.php b/Credentials/manifest.php
index bc5718c..fd4537a 100644
--- a/Credentials/manifest.php
+++ b/Credentials/manifest.php
@@ -25,7 +25,7 @@
$entryURL = 'credentials.php';
$type = 'Additional';
$category = 'Admin';
-$version = '2.1.01';
+$version = '2.1.02';
$author = 'Ross Parker';
$url = 'http://rossparker.org';
diff --git a/Credentials/version.php b/Credentials/version.php
index b371ca9..97164cf 100755
--- a/Credentials/version.php
+++ b/Credentials/version.php
@@ -20,4 +20,4 @@
/**
* Sets version information.
*/
-$moduleVersion = '2.1.01';
+$moduleVersion = '2.1.02';