Skip to content

Node.js based forum software built for the modern web

fixes

Baris Soner Usaklic17b8ae9a177
diff --git a/public/templates/account.tpl b/public/templates/account.tpl
index f2b05763bc..951678aa08 100644
--- a/public/templates/account.tpl
+++ b/public/templates/account.tpl
@@ -1,9 +1,9 @@
-<div class="well account">
+<div class="account-username-box" data-userslug="{userslug}">
- <div class="account-username-box" data-userslug="{userslug}">
+</div>
- </div>
+<div class="well account">
<div class="row">
<div class="col-md-5 account-block">
diff --git a/public/templates/accountedit.tpl b/public/templates/accountedit.tpl
index 3720df04cb..6d0e9a87c0 100644
--- a/public/templates/accountedit.tpl
+++ b/public/templates/accountedit.tpl
@@ -1,3 +1,7 @@
+<div class="account-username-box" data-userslug="{userslug}">
+
+</div>
+
<div class="well account">
<div id="change-picture-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="[[user:change_picture]]" aria-hidden="true">
@@ -30,10 +34,6 @@
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
- <div class="account-username-box clearfix" data-userslug="{userslug}">
-
- </div>
-
<div class="row">
<div class="col-md-2" style="text-align: center; margin-bottom:20px;">
<div class="account-picture-block text-center">
@@ -150,5 +150,7 @@
</div>
</div>
+<input type="hidden" template-variable="yourid" value="{yourid}" />
+<input type="hidden" template-variable="theirid" value="{theirid}" />
<input type="hidden" template-variable="gravatarpicture" value="{gravatarpicture}" />
<input type="hidden" template-variable="uploadedpicture" value="{uploadedpicture}" />
diff --git a/public/templates/accountposts.tpl b/public/templates/accountposts.tpl
index e2196327e8..f1348cbba0 100644
--- a/public/templates/accountposts.tpl
+++ b/public/templates/accountposts.tpl
@@ -1,7 +1,8 @@
-<div class="well favourites">
- <div class="account-username-box clearfix" data-userslug="{userslug}" data-uid="{uid}">
+<div class="account-username-box clearfix" data-userslug="{userslug}" data-uid="{uid}">
- </div>
+</div>
+
+<div class="well favourites">
<!-- IF !posts.length -->
<div class="alert alert-warning">[[topic:favourites.has_no_favourites]]</div>
@@ -39,3 +40,6 @@
</div>
</div>
</div>
+
+<input type="hidden" template-variable="yourid" value="{yourid}" />
+<input type="hidden" template-variable="theirid" value="{theirid}" />
\ No newline at end of file
diff --git a/public/templates/accountsettings.tpl b/public/templates/accountsettings.tpl
index 377bd80e61..89ad7e803f 100644
--- a/public/templates/accountsettings.tpl
+++ b/public/templates/accountsettings.tpl
@@ -1,8 +1,8 @@
-<div class="well account">
+<div class="account-username-box clearfix" data-userslug="{userslug}">
- <div class="account-username-box clearfix" data-userslug="{userslug}">
+</div>
- </div>
+<div class="well account">
<div class="row">
<div class="col-md-6">
@@ -22,3 +22,6 @@
<a id="submitBtn" href="#" class="btn btn-primary">[[global:save_changes]]</a>
</div>
</div>
+
+<input type="hidden" template-variable="yourid" value="{yourid}" />
+<input type="hidden" template-variable="theirid" value="{theirid}" />
\ No newline at end of file
diff --git a/public/templates/favourites.tpl b/public/templates/favourites.tpl
index a0edf132ee..e5e267a6cd 100644
--- a/public/templates/favourites.tpl
+++ b/public/templates/favourites.tpl
@@ -1,7 +1,8 @@
-<div class="well favourites">
- <div class="account-username-box clearfix" data-userslug="{userslug}">
+<div class="account-username-box clearfix" data-userslug="{userslug}">
- </div>
+</div>
+
+<div class="well favourites">
<!-- IF !posts.length -->
<div class="alert alert-warning">[[topic:favourites.has_no_favourites]]</div>
@@ -39,3 +40,6 @@
</div>
</div>
</div>
+
+<input type="hidden" template-variable="yourid" value="{yourid}" />
+<input type="hidden" template-variable="theirid" value="{theirid}" />
\ No newline at end of file
diff --git a/public/templates/followers.tpl b/public/templates/followers.tpl
index f56e92733b..8ae976c41d 100644
--- a/public/templates/followers.tpl
+++ b/public/templates/followers.tpl
@@ -1,9 +1,8 @@
-<div class="well users account">
-
- <div class="account-username-box clearfix" data-userslug="{userslug}">
+<div class="account-username-box clearfix" data-userslug="{userslug}">
- </div>
+</div>
+<div class="well users account">
<div>
<!-- BEGIN followers -->
<div class="users-box">
diff --git a/public/templates/following.tpl b/public/templates/following.tpl
index 0f1e3b7acb..541e3543d3 100644
--- a/public/templates/following.tpl
+++ b/public/templates/following.tpl
@@ -1,9 +1,8 @@
-<div class="well users account">
-
- <div class="account-username-box clearfix" data-userslug="{userslug}">
+<div class="account-username-box clearfix" data-userslug="{userslug}">
- </div>
+</div>
+<div class="well users account">
<div>
<!-- BEGIN following -->
<div class="users-box">
diff --git a/src/routes/user.js b/src/routes/user.js
index 1a4dc674be..b6574d245c 100644
--- a/src/routes/user.js
+++ b/src/routes/user.js
@@ -311,6 +311,9 @@ var fs = require('fs'),
} else {
userData.showemail = "";
}
+
+ userData.theirid = uid;
+ userData.yourid = callerUID;
res.json(userData);
} else {
res.json(404, {
@@ -350,6 +353,8 @@ var fs = require('fs'),
return next(err);
}
+ userData.theirid = uid;
+ userData.yourid = callerUID;
userData.posts = favourites.posts;
userData.nextStart = favourites.nextStart;
@@ -386,6 +391,8 @@ var fs = require('fs'),
return next(err);
}
userData.uid = uid;
+ userData.theirid = uid;
+ userData.yourid = callerUID;
userData.posts = userPosts.posts;
userData.nextStart = userPosts.nextStart;