From: <dj...@us...> - 2012-03-01 11:26:06
|
Revision: 9083 http://xoops.svn.sourceforge.net/xoops/?rev=9083&view=rev Author: djculex Date: 2012-03-01 11:25:55 +0000 (Thu, 01 Mar 2012) Log Message: ----------- - Bugfix: Emails containg -._ after @ not accepted by validation - Bugfix: Colorboxes containing info wich is empty showing - Bugfix: Validation returning true - Bugfix: Rankimages isset even if not existing giving error - Bugfix: el not defined in ajaxupload. Fixed by returning false if not defined Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/class/profile.php XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/js/ajaxupload.3.5.js XoopsModules/smallworld/trunk/smallworld/js/jquery.stepy.js XoopsModules/smallworld/trunk/smallworld/js/jquery.validate.js XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html Modified: XoopsModules/smallworld/trunk/smallworld/class/profile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/class/profile.php 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/class/profile.php 2012-03-01 11:25:55 UTC (rev 9083) @@ -65,7 +65,11 @@ $country = $r['birthplace_country']; $rank = $user->rank(); $rank_title = $rank['title']; - $rank_image = "<img align='center' src='".XOOPS_UPLOAD_URL."/".$rank['image']."'></img>"; + if (isset($rank['image'])) { + $rank_image = "<img align='center' src='".XOOPS_UPLOAD_URL."/".$rank['image']."'></img>"; + } else { + $rank_image = ''; + } $commentsrating = "<img src='".XOOPS_URL."/modules/smallworld/images/like.png' height='10px'width='10px'"."/></img> ".$usersratedplus; $commentsrating .= " <img src='".XOOPS_URL."/modules/smallworld/images/dislike.png' height='10px'width='10px'"."/></img> ".$usersratedminus; $lastlogin = $user->getVar('last_login'); Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-03-01 11:25:55 UTC (rev 9083) @@ -7,6 +7,12 @@ - Change: Adding special facebook metas - Change: adjusting bits and pieces +01 Marts 2012 +- Bugfix: Emails containg -._ after @ not accepted by validation +- Bugfix: Colorboxes containing info wich is empty showing +- Bugfix: Validation returning true +- Bugfix: Rankimages isset even if not existing giving error +- Bugfix: el not defined in ajaxupload. Fixed by returning false if not defined ------------------------------ Changelog v.1.11 RC 3 Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-01 11:25:55 UTC (rev 9083) @@ -54,7 +54,7 @@ // Sanitize string function Smallworld_cleanup_string($text) { - $text = htmlspecialchars($text, ENT_QUOTES); + // $text = htmlspecialchars($text, ENT_QUOTES); $myts = MyTextSanitizer::getInstance(); $text = $myts->displayTarea($text, 1, 1, 1, 1); $text = str_replace("\n\r", "\n", $text); Modified: XoopsModules/smallworld/trunk/smallworld/js/ajaxupload.3.5.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/ajaxupload.3.5.js 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/js/ajaxupload.3.5.js 2012-03-01 11:25:55 UTC (rev 9083) @@ -33,6 +33,9 @@ * Attaches event to a dom element */ function addEvent(el, type, fn){ + if (el === undefined) { + return false; + } if (w.addEventListener){ el.addEventListener(type, fn, false); } else if (w.attachEvent){ Modified: XoopsModules/smallworld/trunk/smallworld/js/jquery.stepy.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/jquery.stepy.js 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/js/jquery.stepy.js 2012-03-01 11:25:55 UTC (rev 9083) @@ -91,7 +91,7 @@ title = (step.attr('title') != '' ) ? step.attr('title') : '--'; // Culex hack to prevent titles being undefined - if (title = 'undefined') { + if (title == undefined) { title = ''; } Modified: XoopsModules/smallworld/trunk/smallworld/js/jquery.validate.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/jquery.validate.js 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/js/jquery.validate.js 2012-03-01 11:25:55 UTC (rev 9083) @@ -85,6 +85,7 @@ return true; } else {}; } + return false; } }; xoops_smallworld.fn.validated = function(callback){ Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-03-01 11:25:55 UTC (rev 9083) @@ -692,7 +692,7 @@ xoops_smallworld(this).parent().prev().andSelf().remove(); //remove the last input i--; //deduct 1 from i so if i = 3, after i--, i will be i = 2 } - }); + }); } @@ -839,7 +839,7 @@ xoops_smallworld('input[name="emailtype[]"]').live('blur',function(){ var id = xoops_smallworld(this).attr('id'); xoops_smallworld("#"+id).validate({ - expression: "if (VAL.match(/^[^\\W][a-zA-Z0-9\\_\\-\\.]+([a-zA-Z0-9\\_\\-\\.]+)*\\@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\.[a-zA-Z]{2,4}$/)) return true; else return false;", + expression: "if (VAL.match(/^[^\\W][a-zA-Z0-9\\_\\-\\.]+([a-zA-Z0-9\\_\\-\\.]+)*\\@[a-zA-Z0-9\\_\\-]+(\\.[a-zA-Z0-9\\_\\-]+)*\\.[a-zA-Z]{2,4}$/)) return true; else return false;", message:"<img src='images/error.png' title='"+SmallworldValidationEmailTitleErrorMsg+"'/>" }); }); Modified: XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html 2012-03-01 11:25:55 UTC (rev 9083) @@ -12,7 +12,7 @@ <b><{$comments[i].username}></b> </a> <{$comments[i].comment}></div> <div class="smallworld_stcommenttime"><{$comments[i].time}></div> - <{if $post.username == $myusername}> + <{if $comments[i].username == $myusername}> <div class="smallworld_stcommentvote"> <span id ="smallworld_votenum"><{$comments[i].vote_up}></span> <img class="smallworld_voteimg" src = "images/like.png" /> Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-03-01 09:37:56 UTC (rev 9082) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-03-01 11:25:55 UTC (rev 9083) @@ -305,7 +305,8 @@ <fieldset> <label><{$smarty.const._SMALLWORLD_WORKFULL_TITLE}></label><br/> <{section name=i loop=$workfull}> - <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> + <{if $workfull[i].employer != ''}> + <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> <p class="smallworld_clonebreaker"> <tr> <td><{$smarty.const._SMALLWORLD_EMPLOYER}></td> @@ -332,6 +333,9 @@ <td><{$workfull[i].description}></td> </tr> </table> + <{else}> + <{$smarty.const._SMALLWORLD_ALL_FIELDS_DISABLED}> + <{/if}> </p> <{/section}> </fieldset> @@ -341,6 +345,7 @@ <fieldset> <label><{$smarty.const._SMALLWORLD_SCHOOLFULL_TITLE}></label><br/> <{section name=i loop=$educationfull}> + <{if $educationfull[i].school_type != ''}> <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> <tr> <p class="smallworld_clonebreaker"></tr> @@ -364,6 +369,9 @@ <td><{$educationfull[i].schoolstop}></td> </tr> </table> + <{else}> + <{$smarty.const._SMALLWORLD_ALL_FIELDS_DISABLED}> + <{/if}> </p> <{/section}> </fieldset> @@ -409,14 +417,14 @@ <h3><label><{$smarty.const._SMALLWORLD_BELIEFS}></label></h3> </tr> - <{if !in_array('politicalview',$flds)}> + <{if !in_array('politicalview',$flds) || $politic == ''}> <{else}> <tr> <td><{$smarty.const._SMALLWORLD_POLITICWORD}>:</td> <td><{$politic}></td> </tr> <{/if}> - <{if !in_array('religiousview',$flds)}> + <{if !in_array('religiousview',$flds) || $religion == ''}> <{else}> <tr> <td><{$smarty.const._SMALLWORLD_RELIGIONWORD}>:</td> @@ -433,50 +441,55 @@ !in_array('interests',$flds) }> <{else}> - <fieldset> - <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> - <tr> - <h3><label><{$smarty.const._SMALLWORLD_FAVOURITETHINGS}></label></h3> - </tr> - <{if !in_array('favouritebooks',$flds)}> - <{else}> - <tr> - <td><{$smarty.const._SMALLWORLD_FAVOURITEBOOKS}>:</td> - <td><{$favbook}></td> - </tr> - <{/if}> - - <{if !in_array('favouritemusic',$flds)}> - <{else}> - <tr> - <td><{$smarty.const._SMALLWORLD_FAVOURITEMUSIC}>:</td> - <td><{$favmusic}></td> - </tr> - <{/if}> - - <{if !in_array('favouritemovies',$flds)}> - <{else}> - <tr> - <td><{$smarty.const._SMALLWORLD_FAVOURITEMOVIE}>:</td> - <td><{$favmovie}></td> - </tr> - <{/if}> - <{if !in_array('favouritetvshows',$flds)}> - <{else}> - <tr> - <td><{$smarty.const._SMALLWORLD_FAVOURITETVSHOW}>:</td> - <td><{$favtvshow}></td> - </tr> - <{/if}> - <{if !in_array('interests',$flds)}> - <{else}> - <tr> - <td><{$smarty.const._SMALLWORLD_FAVOURITEINTERESTS}>:</td> - <td><{$favinterests}></td> - </tr> - <{/if}> - </table> - </fieldset> + <{if + $favbook != '' && $favmusic != '' && + $favmovie != '' && $favshows != '' && $favinterests != '' + }> + <fieldset> + <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> + <tr> + <h3><label><{$smarty.const._SMALLWORLD_FAVOURITETHINGS}></label></h3> + </tr> + <{if !in_array('favouritebooks',$flds) || $favbook == ''}> + <{else}> + <tr> + <td><{$smarty.const._SMALLWORLD_FAVOURITEBOOKS}>:</td> + <td><{$favbook}></td> + </tr> + <{/if}> + + <{if !in_array('favouritemusic',$flds) || $favmusic == ''}> + <{else}> + <tr> + <td><{$smarty.const._SMALLWORLD_FAVOURITEMUSIC}>:</td> + <td><{$favmusic}></td> + </tr> + <{/if}> + + <{if !in_array('favouritemovies',$flds) || $favmovie == ''}> + <{else}> + <tr> + <td><{$smarty.const._SMALLWORLD_FAVOURITEMOVIE}>:</td> + <td><{$favmovie}></td> + </tr> + <{/if}> + <{if !in_array('favouritetvshows',$flds) || $favshows == ''}> + <{else}> + <tr> + <td><{$smarty.const._SMALLWORLD_FAVOURITETVSHOW}>:</td> + <td><{$favtvshow}></td> + </tr> + <{/if}> + <{if !in_array('interests',$flds) || $favinterests == ''}> + <{else}> + <tr> + <td><{$smarty.const._SMALLWORLD_FAVOURITEINTERESTS}>:</td> + <td><{$favinterests}></td> + </tr> + <{/if}> + </table> + </fieldset> + <{/if}> <{/if}> <{if @@ -491,44 +504,52 @@ </tr> <{if !in_array('emails',$flds)}> <{else}> - <tr> - <td><{$smarty.const._SMALLWORLD_EMAIL}>:</td> - <td> - <{section name=i loop=$email}> - <span class="smallworld_website"><a href="mailto:<{$email[i]}>"><{$email[i]}></a></span><br> - <{/section}> - <br><br> - </td> - </tr> + <{if $email|@count gt 0}> + <tr> + <td><{$smarty.const._SMALLWORLD_EMAIL}>:</td> + <td> + <{section name=i loop=$email}> + <span class="smallworld_website"><a href="mailto:<{$email[i]}>"><{$email[i]}></a></span><br> + <{/section}> + <br><br> + </td> + </tr> + <{/if}> <{/if}> <{if !in_array('screennames',$flds)}> <{else}> - <tr> - <td><{$smarty.const._SMALLWORLD_SCREENNAMES}>:</td> - <td> - <{foreach item=post from=$screenname}> - <{$post.link}><{$post.screenname}></a></span><br> - <{/foreach}> - <br><br> - </td> - </tr> + <{if $screenname|@count gt 0}> + <tr> + <td><{$smarty.const._SMALLWORLD_SCREENNAMES}>:</td> + <td> + <{foreach item=post from=$screenname}> + <{$post.link}><{$post.screenname}></a></span><br> + <{/foreach}> + <br><br> + </td> + </tr> + <{/if}> <{/if}> <{if !in_array('landphone',$flds)}> <{else}> - <tr> + <{if $phone != ''}> + <tr> <td><{$smarty.const._SMALLWORLD_PHONE}>:</td> <td><{$phone}></td> </tr> + <{/if}> <{/if}> <{if !in_array('mobile',$flds)}> <{else}> + <{if $mobile != ''}> <tr> <td><{$smarty.const._SMALLWORLD_GSM}>:</td> <td><{$mobile}></td> </tr> <{/if}> + <{/if}> </table> </fieldset> <{/if}> @@ -540,6 +561,7 @@ !in_array('website',$flds) }> <{else}> + <{if $adress != '' && $country != '' && $website != ''}> <fieldset> <table border="0" class="smallworld_table" cellspacing="0" cellpadding="0"> <tr><h3><label><{$smarty.const._SMALLWORLD_ADRESS}></label></h3></tr> @@ -568,6 +590,7 @@ <{/if}> </table> </fieldset> + <{/if}> <{/if}> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |