Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray Clark authored and Ray Clark committed Dec 5, 2014
2 parents 192838c + 4e5506d commit b6feef2
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 21 deletions.
16 changes: 6 additions & 10 deletions CHANGEDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@
$sql=array() ;
$count=0 ;

//v0.0.00
$sql[$count][0]="0.0.00" ;
//v0.0.01
$sql[$count][0]="0.0.01" ;
$sql[$count][1]="-- First version, nothing to update" ;


//v0.0.01
$count++
$sql[$count][0]="0.0.01" ;
$sql[$count][1]="
CREATE TABLE `gibbonTechnicians` (`technicianID` int(4) unsigned zerofill NOT NULL AUTO_INCREMENT,`gibbonPersonID` int(10) unsigned zerofill NOT NULL,PRIMARY KEY (`technicianID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;end
CREATE TABLE `gibbonIssue` (`issueID` int(12) unsigned zerofill NOT NULL AUTO_INCREMENT,`technicianID` int(4) unsigned zerofill NOT NULL AUTO_INCREMENT,`gibbonPersonID` int(10) unsigned zerofill NOT NULL,`title` varchar(55) NOT NULL,`desc` text NOT NULL,`active` boolean DEFAULT TRUE,PRIMARY KEY (`issueID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;end
CREATE TABLE `gibbonIssueDiscuss` (`issueDiscussID` int(12) unsigned zerofill NOT NULL,`issueID` int(12) unsigned zerofill NOT NULL AUTO_INCREMENT,`gibbonPersonID` int(10) unsigned zerofill NOT NULL,`comment` text NOT NULL,PRIMARY KEY (`issueDiscussID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;end
" ;
$count++;
$sql[$count][0]="0.0.02" ;
$sql[$count][1]="--nothing to update" ;


?>
7 changes: 4 additions & 3 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CHANGELOG

v0.0.01
-------
First Release.
First Release.

v0.0.02
-------
Expand All @@ -16,8 +16,9 @@ Added Manage Technicians Action in manifest.php.
Added issues_manage_technicians.php.
Added issues_techniciansDeleteProcess.php.
Fixed 2 issues with the table in issues_manage_technicians.php
Fixed an issues with the drop down menu in issues_createTechnicians.php where you could make a technician a technician.
Fixed an issues with the drop down menu in issues_createTechnicians.php where you could make a technician a technician.
Fixed Security Issues with issues_discuss_view_post.php and issues_discuss_postProcess.php.
Fixed Security Issue with issues_technicianDeleteProcess.php.
Fixed an issue with the table in issues_manage_technicians.php.
Fixed an issue with issues_createTechnician.php
Fixed an issue with issues_createTechnician.php
Updated issues_technicianDeleteProcess.php so it deletes all related data in the helpDeskIssues table.
2 changes: 1 addition & 1 deletion issues_createTechnician.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

@session_start() ;
include "./modules/" . $_SESSION[$guid]["module"] . "/moduleFunctions.php" ;

Expand Down
3 changes: 1 addition & 2 deletions issues_discuss_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
$result->execute($data);

$sql2="SELECT helpDeskTechnicians.*, surname , title, preferredName FROM helpDeskIssue JOIN helpDeskTechnicians ON (helpDeskIssue.technicianID=helpDeskTechnicians.technicianID) JOIN gibbonPerson ON (helpDeskTechnicians.gibbonPersonID=gibbonPerson.gibbonPersonID) WHERE issueID=:issueID " ;
$result2=$connection2->prepare($sql2);
$result2=$connection2->prepare($sql2);
$result2->execute($data);
$array2 = $result2->fetchall();

Expand Down Expand Up @@ -116,7 +116,6 @@
print "<tr>" ;
print "<td>". $row["description"] ."</td>" ;
print "</tr>" ;
print "</table>" ;
}

if($array2[0]["technicianID"]==null) {
Expand Down
4 changes: 4 additions & 0 deletions issues_technicianDeleteProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
$sql="DELETE FROM helpDeskTechnicians WHERE helpDeskTechnicians.technicianID=:technicianID" ;
$result=$connection2->prepare($sql);
$result->execute($data);

$sql2="UPDATE helpDeskIssue SET helpDeskIssue.technicianID=null, helpDeskIssue.status='Unassigned' WHERE helpDeskIssue.technicianID=:technicianID" ;
$result2=$connection2->prepare($sql2);
$result2->execute($data);
} catch(PDOException $e) {
//Fail 2
print $e ;
Expand Down
2 changes: 1 addition & 1 deletion manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$entryURL="issues_view.php" ;
$type="Additional" ;
$category="Other" ;
$version="0.0.01" ;
$version="0.0.02" ;
$author="Adrien Tremblay & Ray Clark" ;
$url="https://github.com/adrientremblay/helpdesk" ;

Expand Down
5 changes: 2 additions & 3 deletions moduleFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function notifyTechnican($connection2, $guid, $issueID) {
catch(PDOException $e) {
print $e;
}

while($row = $result->fetch()) {
setNotification($connection2, $guid, $row["gibbonPersonID"], "A new issue has been added.", "Help Desk", "/index.php?q=/modules/Help Desk/issues_discuss_view.php&issueID=" . $issueID);
}
Expand All @@ -167,12 +167,11 @@ function notifyTechnican($connection2, $guid, $issueID) {
function relatedToIssue($connection2, $issueID, $gibbonPersonID) {
try {
$data=array("issueID"=> $issueID);
$sql="SELECT helpDeskIssue.*, helpDeskTechnicians.technicianID AS techID, helpDeskTechnicians.gibbonPersonID AS personID FROM helpDeskIssue JOIN helpDeskTechnicians ON (helpDeskIssue.technicianID=techI3D) WHERE issueID=:issueID";
$sql="SELECT helpDeskIssue.*, helpDeskTechnicians.technicianID, helpDeskTechnicians.gibbonPersonID AS personID FROM helpDeskIssue JOIN helpDeskTechnicians ON (helpDeskIssue.technicianID=helpDeskTechnicians.technicianID) WHERE helpDeskIssue.issueID=:issueID";
$result=$connection2->prepare($sql);
$result->execute($data);
}
catch(PDOException $e) {
return false;
}
$row = $result->fetch();
if($row["gibbonPersonID"]==$gibbonPersonID || $row["personID"]==$gibbonPersonID) {
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
/**
* Sets version information
*/
$moduleVersion="0.0.01" ;
$moduleVersion="0.0.02" ;
?>

0 comments on commit b6feef2

Please sign in to comment.