Skip to content
Browse files

[331] Store sha1 hash in upper case; links to images in `calendar/css…

…/*.css` were fixed. Thanks to Ashen @ getmangos.org for reports (prev. commit too).
  • Loading branch information...
1 parent a9c7797 commit b6cdb96f7a631a1a40ea5789bef6946e361ede0a @Shadez committed Jul 27, 2010
Showing with 147 additions and 59 deletions.
  1. +13 −13 calendar/css/ie6.css
  2. +40 −40 calendar/css/master.css
  3. +2 −2 calendar/css/opera.css
  4. +91 −3 includes/classes/class.utils.php
  5. +1 −1 includes/revision_nr.php
View
26 calendar/css/ie6.css
@@ -4,41 +4,41 @@
.calendar-box-gradient {
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='/../../images/calendar/gradient.png');
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='../../images/calendar/gradient.png');
}
.calendar-box-hover {
- /*filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='/../../images/calendar/hover.png'); */
+ /*filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='../../images/calendar/hover.png'); */
}
.calendar-box-selected {
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='/../../images/calendar/selected.png');
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='../../images/calendar/selected.png');
}
.calendar-box-othermonth {
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='/../../images/calendar/othermonth.png');
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='../../images/calendar/othermonth.png');
}
.calendar-box-today {
margin: -7px 0 0 -7px;
width: 134px;
height: 134px;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='/../../images/calendar/today.png');
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='../../images/calendar/today.png');
z-index: 8;
}
.calendar-day-events-select {
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='/../../images/calendar/window2-contour.png');
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='../../images/calendar/window2-contour.png');
}
/* ie6 fix */
.calendar-detail {
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='/../../images/calendar/window1-contour.png');
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='../../images/calendar/window1-contour.png');
}
.guild,
.calendar-confirmation-dialog,
.calendar-detail-simple {
height: 394px;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='/../../images/calendar/windowsmall-contour.png');
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='../../images/calendar/windowsmall-contour.png');
}
.guild .calendar-detail-bg,
@@ -47,17 +47,17 @@
width: 362px;
height: 316px;
margin: 23px 0 0 23px;
- background:url('/../../images/calendar/windowsmall-inside.jpg') top left no-repeat;
+ background:url('../../images/calendar/windowsmall-inside.jpg') top left no-repeat;
}
.calendar-confirmation-dialog {
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='/../../images/calendar/windowmini-contour.png');
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='../../images/calendar/windowmini-contour.png');
}
.calendar-detail .actions .disabled { /* ie6 - no chained class selector support */
cursor: default !important;
color: inherit !important;
- background: url('/../../images/button-grey.gif') no-repeat 0 0 !important;
+ background: url('../../images/button-grey.gif') no-repeat 0 0 !important;
color: #888 !important
}
.calendar-detail .actions .disabled:hover { /* ie6 - no chained class selector support */
@@ -99,7 +99,7 @@
.calendar .month td .dropicon {
width: 17px;
height: 17px;
- background:url('/../../images/calendar/dropdownarrow.gif') top left no-repeat;
+ background:url('../../images/calendar/dropdownarrow.gif') top left no-repeat;
float: right;
margin: 0 3px 16px 0;
cursor: pointer;
@@ -108,7 +108,7 @@
.calendar .month td.invited .day-hasinvite {
background: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='/../../images/calendar/hasinvite.png');
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='../../images/calendar/hasinvite.png');
}
View
80 calendar/css/master.css
@@ -3,7 +3,7 @@
/**************************************************************/
.calendar-holder {width: 1px; height: 906px; clear: both; left: -10px;}
-.calendar-container {width: 876px; height:821px; background:url('/../../images/calendar/calendar-bg-bottom.jpg') no-repeat top left; float: left; margin-left:6px; padding-top: 3px; margin-top: 55px;}
+.calendar-container {width: 876px; height:821px; background:url('../../images/calendar/calendar-bg-bottom.jpg') no-repeat top left; float: left; margin-left:6px; padding-top: 3px; margin-top: 55px;}
#calendar-loading-target { width:100%; height: 85px; z-index: 2; position: absolute; padding-left:13px; }
.calendar-weekday { font-family: Georgia, "Times New Roman", Times, serif; color: #794d0a; font-size: 16px; font-style: italic; text-align: center; width: 121px; height: 45px; position: absolute; top: 10px;}
@@ -106,10 +106,10 @@
.calendar .month td.invited .day-hasinvite {
display: block;
- background: url('/../../images/calendar/hasinvite.png');
+ background: url('../../images/calendar/hasinvite.png');
}
.calendar .month th.selected {
- background:url('/../../images/calendar/daybg.gif');
+ background:url('../../images/calendar/daybg.gif');
background-repeat: no-repeat;
background-position: center 4px;
}
@@ -184,7 +184,7 @@
.calendar .month td .dropicon {
width: 17px;
height: 17px;
- background:url('/../../images/calendar/dropdownarrow.gif') top left no-repeat;
+ background:url('../../images/calendar/dropdownarrow.gif') top left no-repeat;
margin: -37px 7px 0 0;
cursor: pointer;
z-index: 0;
@@ -229,7 +229,7 @@
div > .calendar-detail {
- background:url('/../../images/calendar/window1-contour.png') top left no-repeat;
+ background:url('../../images/calendar/window1-contour.png') top left no-repeat;
}
@@ -250,7 +250,7 @@ div > .calendar-detail {
width: 362px;
height: 572px;
margin: 23px 0 0 23px;
- background:url('/../../images/calendar/window1-inside.jpg') top left no-repeat;
+ background:url('../../images/calendar/window1-inside.jpg') top left no-repeat;
}
.calendar-confirmation-contents,
@@ -315,12 +315,12 @@ div > .calendar-detail.guild,
div > .calendar-confirmation-dialog,
div > .calendar-detail-simple {
height: 394px;
- background:url('/../../images/calendar/windowsmall-contour.png') top left no-repeat;
+ background:url('../../images/calendar/windowsmall-contour.png') top left no-repeat;
}
div > .calendar-confirmation-dialog {
height: 258px;
- background:url('/../../images/calendar/windowmini-contour.png') top left no-repeat;
+ background:url('../../images/calendar/windowmini-contour.png') top left no-repeat;
}
@@ -331,15 +331,15 @@ div > .calendar-confirmation-dialog {
width: 362px;
height: 316px;
margin: 23px 0 0 23px;
- background:url('/../../images/calendar/windowsmall-inside.jpg') top left no-repeat;
+ background:url('../../images/calendar/windowsmall-inside.jpg') top left no-repeat;
}
.calendar-confirmation-dialog .calendar-detail-mini-bg {
position: absolute;
width: 362px;
height: 182px;
margin: 23px 0 0 23px;
- background:url('/../../images/calendar/windowmini-inside.jpg') top left no-repeat;
+ background:url('../../images/calendar/windowmini-inside.jpg') top left no-repeat;
}
.calendar-confirmation-contents {
@@ -398,7 +398,7 @@ div > .calendar-confirmation-dialog {
.calendar-detail a.disabled, .calendar-detail a.disabled:hover {
cursor: default;
color: inherit;
- background: url('/../../images/button-grey.gif') no-repeat 0 0;
+ background: url('../../images/button-grey.gif') no-repeat 0 0;
color: #888
}
.calendar-detail div.disabled {
@@ -491,7 +491,7 @@ a.actionButton, a.actionButton:active, a.actionButton:visited {
width: 131px;
text-align: center;
height: 19px;
- background: url('/../../images/button-red.gif') no-repeat 0 0;
+ background: url('../../images/button-red.gif') no-repeat 0 0;
text-decoration:none;
font-size: 12px;
padding: 4px 0 2px 0;
@@ -524,7 +524,7 @@ a.actionButton:hover{
font-weight: bold;
color: #888;
cursor: default;
- background: url('/../../images/button-grey.gif') no-repeat 0 0;
+ background: url('../../images/button-grey.gif') no-repeat 0 0;
width: 131px;
display: block;
}
@@ -642,34 +642,34 @@ font-weight: bold;
width: 283px;
}
.calendar-detail .warrior {
- background: url(/../../images/icons/class/1.gif)
+ background: url(../../images/icons/class/1.gif)
}
.calendar-detail .deathknight {
- background: url(/../../images/icons/class/6.gif)
+ background: url(../../images/icons/class/6.gif)
}
.calendar-detail .paladin {
- background: url(/../../images/icons/class/2.gif)
+ background: url(../../images/icons/class/2.gif)
}
.calendar-detail .priest {
- background: url(/../../images/icons/class/5.gif)
+ background: url(../../images/icons/class/5.gif)
}
.calendar-detail .shaman {
- background: url(/../../images/icons/class/7.gif)
+ background: url(../../images/icons/class/7.gif)
}
.calendar-detail .druid {
- background: url(/../../images/icons/class/11.gif)
+ background: url(../../images/icons/class/11.gif)
}
.calendar-detail .rogue {
- background: url(/../../images/icons/class/4.gif)
+ background: url(../../images/icons/class/4.gif)
}
.calendar-detail .mage {
- background: url(/../../images/icons/class/8.gif)
+ background: url(../../images/icons/class/8.gif)
}
.calendar-detail .warlock {
- background: url(/../../images/icons/class/9.gif)
+ background: url(../../images/icons/class/9.gif)
}
.calendar-detail .hunter {
- background: url(/../../images/icons/class/3.gif)
+ background: url(../../images/icons/class/3.gif)
}
/* Day events tooltip & shared */
@@ -757,14 +757,14 @@ font-weight: bold;
div > .calendar-day-events-select {
- background:url('/../../images/calendar/window2-contour.png') top left no-repeat;
+ background:url('../../images/calendar/window2-contour.png') top left no-repeat;
}
.calendar-day-events-select-bg {
position: absolute;
width: 362px;
height: 572px;
margin: 23px 0 0 23px;
- background:url('/../../images/calendar/window2-inside.jpg') top left no-repeat;
+ background:url('../../images/calendar/window2-inside.jpg') top left no-repeat;
}
.calendar-day-events-select ol.events {
@@ -776,7 +776,7 @@ div > .calendar-day-events-select {
height: 20px;
margin:0;
padding:6px 20px 0 5px;
- background: url('/../../images/calendar/list-bg.gif') top left no-repeat;
+ background: url('../../images/calendar/list-bg.gif') top left no-repeat;
line-height: 12px;
cursor: pointer;
}
@@ -813,15 +813,15 @@ div > .calendar-day-events-select {
}
.calendar-day-events-select li.selected {
- background: url('/../../images/calendar/list-bg.gif') bottom left no-repeat;
+ background: url('../../images/calendar/list-bg.gif') bottom left no-repeat;
}
/* Calendar Event Filter */
.calendar-drop {
height:29px;
width:139px;
- background:url('/../../images/calendar/dropdown.gif') no-repeat !important;
+ background:url('../../images/calendar/dropdown.gif') no-repeat !important;
display:block;
margin:0;
text-decoration:none !important;
@@ -847,7 +847,7 @@ div > .calendar-day-events-select {
.calendar-button {
height:32px;
width:35px;
- background:url('/../../images/calendar/feed.jpg') no-repeat !important;
+ background:url('../../images/calendar/feed.jpg') no-repeat !important;
display:block;
margin:0;
text-decoration:none !important;
@@ -881,7 +881,7 @@ div > .calendar-day-events-select {
}
.calendar-filter-contents li {
- background:url('/../../images/calendar/select-off.gif') top left no-repeat;
+ background:url('../../images/calendar/select-off.gif') top left no-repeat;
background-position: 0 2px;
padding-left: 17px;
cursor: pointer;
@@ -891,7 +891,7 @@ div > .calendar-day-events-select {
color: #979282;
}
.select-custom li.selected {
- background-image: url('/../../images/calendar/select-on.gif');
+ background-image: url('../../images/calendar/select-on.gif');
color: #a07c00;
}
@@ -940,7 +940,7 @@ div > .calendar-day-events-select {
}
.calendar-timezone li {
- background:url('/../../images/calendar/select-off.gif') top left no-repeat;
+ background:url('../../images/calendar/select-off.gif') top left no-repeat;
background-position: 0 2px;
padding-left: 17px;
cursor: pointer;
@@ -978,20 +978,20 @@ div > .calendar-day-events-select {
.reldiv > .calendar-box-gradient {
- background:url('/../../images/calendar/gradient.png');
+ background:url('../../images/calendar/gradient.png');
}
.reldiv > .calendar-box-hover {
- background:url('/../../images/calendar/hover.png');
+ background:url('../../images/calendar/hover.png');
}
.reldiv > .calendar-box-selected {
- background:url('/../../images/calendar/selected.png');
+ background:url('../../images/calendar/selected.png');
}
.reldiv > .calendar-box-othermonth {
- background:url('/../../images/calendar/othermonth.png');
+ background:url('../../images/calendar/othermonth.png');
background-repeat:no-repeat;
}
@@ -1000,7 +1000,7 @@ div > .calendar-day-events-select {
margin: -7px 0 0 -7px;
width: 134px;
height: 134px;
- background:url('/../../images/calendar/today.png');
+ background:url('../../images/calendar/today.png');
z-index: 1;
}
@@ -1083,7 +1083,7 @@ img.hourglass {
}
#calendar-filter-holder {
- background:#F2E0A0 url(/../../images/item-input-box.gif) repeat-x scroll 0 0;
+ background:#F2E0A0 url(../../images/item-input-box.gif) repeat-x scroll 0 0;
margin-right:40px;
margin-bottom:5px;
border:3px solid #d3a54d;
@@ -1093,7 +1093,7 @@ img.hourglass {
.feed-link {font-size:12px;}
.feed-link-description {color:#794D0A;font-family:Georgia,"Times New Roman",Times,serif;font-size:11px;font-style:italic;}
-.calendar-prev-month { display:block; width:33px; height:29px; background:url(/../../images/calendar/arrow-left.gif) no-repeat;position:absolute;top:0px;left:16px;z-index:12345;}
+.calendar-prev-month { display:block; width:33px; height:29px; background:url(../../images/calendar/arrow-left.gif) no-repeat;position:absolute;top:0px;left:16px;z-index:12345;}
.calendar-prev-month:hover { background-position:0px -29px;}
-.calendar-next-month { display:block; width:33px; height:29px; background:url(/../../images/calendar/arrow-right.gif) no-repeat;position:absolute;left:46px;top:0px;z-index:12345;}
+.calendar-next-month { display:block; width:33px; height:29px; background:url(../../images/calendar/arrow-right.gif) no-repeat;position:absolute;left:46px;top:0px;z-index:12345;}
.calendar-next-month:hover { background-position:0px -29px;}
View
4 calendar/css/opera.css
@@ -5,7 +5,7 @@
.calendar .month td .dropicon {
width: 17px;
height: 17px;
- background:url('/../../images/calendar/dropdownarrow.gif') top left no-repeat;
+ background:url('../../images/calendar/dropdownarrow.gif') top left no-repeat;
float: right;
margin: -37px 7px 0 0;
cursor: pointer;
@@ -16,5 +16,5 @@
div > .calendar-detail.guild {
height: 394px;
margin-top: 350px;
- background:url('/../../images/calendar/windowsmall-contour.png') top left no-repeat;
+ background:url('../../images/calendar/windowsmall-contour.png') top left no-repeat;
}
View
94 includes/classes/class.utils.php
@@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
- * @revision 321
+ * @revision 331
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
@@ -48,7 +48,7 @@ public function authUser() {
$this->Log()->writeError('%s : unable to get data from DB for account %s', __METHOD__, $this->username);
return false;
}
- elseif($info['sha_pass_hash'] != $this->createShaHash()) {
+ elseif(strtoupper($info['sha_pass_hash']) != $this->createShaHash()) {
$this->Log()->writeError('%s : sha_pass_hash and generated SHA1 hash are diffirent (%s and %s), unable to auth user.', __METHOD__, $info['sha_pass_hash'], $this->createShaHash());
return false;
}
@@ -344,7 +344,7 @@ public function createShaHash() {
return false;
}
$this->shaHash = sha1(strtoupper($this->username).':'.strtoupper($this->password));
- return $this->shaHash;
+ return strtoupper($this->shaHash);
}
public function ComputePetBonus($stat, $value, $unitClass) {
@@ -1180,5 +1180,93 @@ public function GetAchievementsComparisonDB($realms) {
}
return $db;
}
+
+ /**
+ * Returns bit mask for class ID
+ * @category Utils class
+ * @access public
+ * @param int $classId
+ * @return int
+ **/
+ public function GetClassBitMaskByClassId($classId) {
+ $mask = -1;
+ switch($classId) {
+ case CLASS_WARRIOR:
+ $mask = 1;
+ break;
+ case CLASS_PALADIN:
+ $mask = 2;
+ break;
+ case CLASS_HUNTER:
+ $mask = 4;
+ break;
+ case CLASS_ROGUE:
+ $mask = 8;
+ break;
+ case CLASS_PRIEST:
+ $mask = 16;
+ break;
+ case CLASS_DK:
+ $mask = 32;
+ break;
+ case CLASS_SHAMAN:
+ $mask = 64;
+ break;
+ case CLASS_MAGE:
+ $mask = 128;
+ break;
+ case CLASS_WARLOCK:
+ $mask = 256;
+ break;
+ case CLASS_DRUID:
+ $mask = 1024;
+ break;
+ }
+ return $mask;
+ }
+
+ /**
+ * Returns bit mask for race ID
+ * @category Utils class
+ * @access public
+ * @param int $raceId
+ * @return int
+ **/
+ public function GetRaceBitMaskByRaceId($raceId) {
+ $mask = -1;
+ switch($raceId) {
+ case RACE_HUMAN:
+ $mask = 1;
+ break;
+ case RACE_ORC:
+ $mask = 2;
+ break;
+ case RACE_DWARF:
+ $mask = 4;
+ break;
+ case RACE_NIGHTELF:
+ $mask = 8;
+ break;
+ case RACE_UNDEAD:
+ $mask = 16;
+ break;
+ case RACE_TAUREN:
+ $mask = 32;
+ break;
+ case RACE_GNOME:
+ $mask = 64;
+ break;
+ case RACE_TROLL:
+ $mask = 128;
+ break;
+ case RACE_BLOODELF:
+ $mask = 512;
+ break;
+ case RACE_DRAENEI:
+ $mask = 1024;
+ break;
+ }
+ return $mask;
+ }
}
?>
View
2 includes/revision_nr.php
@@ -1,5 +1,5 @@
<?php
-define('ARMORY_REVISION', 330);
+define('ARMORY_REVISION', 331);
define('DB_VERSION', 'armory_r307');
define('CONFIG_VERSION', 1107201001);
?>

1 comment on commit b6cdb96

@Shadez
Owner
Shadez commented on b6cdb96 Jul 27, 2010

Typo in commit message: Ashen @ getmangos.com ;)

Please sign in to comment.
Something went wrong with that request. Please try again.