@@ -79,7 +79,6 @@ def do_tags():
79
79
tag_id = ''
80
80
tag_get = ''
81
81
show_mine = ''
82
- auth = auth_check ()
83
82
if request .query .get ('id' ):
84
83
tag_id = request .query .get ('id' )
85
84
tag_get = '&id={}' .format (tag_id )
@@ -121,7 +120,7 @@ def do_tags():
121
120
if request .query .get ('page' ):
122
121
page = int (request .query .get ('page' ))
123
122
prev = int (page ) - 1
124
- next = int (page ) + 1 # pylint: W0622
123
+ next = int (page ) + 1 # pylint: W622
125
124
max_results = user_num_bmarks
126
125
# Calculate the offset
127
126
from_offset = (int (page ) * int (max_results )) - int (max_results )
@@ -160,8 +159,7 @@ def do_tags():
160
159
<LI class="item"><A HREF="{u}&num=15"> {a15}15 </a></LI>
161
160
<LI class="item"><A HREF="{u}&num=20"> {a20}20 </a></LI>
162
161
<LI class="item"><A HREF="{u}&num=30"> {a30}30 </a></LI></UL>
163
- </DIV> </TD>''' .format (n = num_bmarks_menu_offset ,
164
- u = url_get_base ,
162
+ </DIV> </TD>''' .format (u = url_get_base ,
165
163
a5 = marker_dict ['5' ],
166
164
a10 = marker_dict ['10' ],
167
165
a15 = marker_dict ['15' ],
@@ -179,10 +177,10 @@ def do_tags():
179
177
if notes :
180
178
notes_string = f'<BR><span class="small"><B>{ notes } </B></span>'
181
179
if hash_check () and owner == username :
182
- bmark_user_edit_string = f'''<BR><A HREF="edit?id={ i } &func=edit"><span class="normal"><B>EDIT</B></a>
180
+ bmark_user_edit_string = f'''<BR><A HREF="edit?id={ bm_id } &func=edit"><span class="normal"><B>EDIT</B></a>
183
181
| <A HREF="bmarks?id={ bm_id } &func=del"><B>DELETE</B></a> </span>'''
184
182
else :
185
- bmark_user_edit_string = f'''<BR><span class="normal">Created by <A HREF="bmarks?whose={ o } ">
183
+ bmark_user_edit_string = f'''<BR><span class="normal">Created by <A HREF="bmarks?whose={ owner } ">
186
184
<B>{ owner } </B></a> </span>'''
187
185
return_data += '''<TABLE><TR>
188
186
<TD valign="top" width="95"><span class="big">{l} </span></TD>
@@ -204,7 +202,7 @@ def do_tags():
204
202
t = tag_get )
205
203
# Create a NEXT link if one is needed
206
204
if page < total_pages :
207
- pagination += f'''<A STYLE="text-decoration:none" title="NEXT PAGE"
205
+ pagination += f'''<A STYLE="text-decoration:none" title="NEXT PAGE"
208
206
HREF="tags?{ mine } &page={ next } &num={ user_num_bmarks } { tag_get } ">
209
207
<span class="huge"><H1>→</H1></span></A>'''
210
208
else :
@@ -272,23 +270,22 @@ def list_tags():
272
270
if not tags_qry_res :
273
271
return_data += '<span class="bad">You have 0 tags<BR>'
274
272
return return_data
273
+ if auth ['username' ]:
274
+ tag_string = '<span class="big"><B>Your Tags</B></span><BR><BR>'
275
+ show_mine = '&mine=yes'
275
276
else :
276
- if auth ['username' ]:
277
- tag_string = '<span class="big"><B>Your Tags</B></span><BR><BR>'
278
- show_mine = '&mine=yes'
279
- else :
280
- tag_string = '<span class="big"><B>Recent Tags</B></span><BR><BR>'
281
- show_mine = ''
282
- num_tags = len (tags_qry_res )
283
- if num_tags :
284
- return_data += tag_string
285
- for tag_list in tags_qry_res :
286
- tag_id = tag_list [0 ]
287
- tag = tag_list [1 ]
288
- return_data += ' <A HREF="tags?id={i}{sh}">{t}</a> <BR>' .format (i = tag_id ,
289
- sh = show_mine ,
290
- t = tag )
291
- return_data += '<BR>'
277
+ tag_string = '<span class="big"><B>Recent Tags</B></span><BR><BR>'
278
+ show_mine = ''
279
+ num_tags = len (tags_qry_res )
280
+ if num_tags :
281
+ return_data += tag_string
282
+ for tag_list in tags_qry_res :
283
+ tag_id = tag_list [0 ]
284
+ tag = tag_list [1 ]
285
+ return_data += ' <A HREF="tags?id={i}{sh}">{t}</a> <BR>' .format (i = tag_id ,
286
+ sh = show_mine ,
287
+ t = tag )
288
+ return_data += '<BR>'
292
289
return return_data
293
290
294
291
0 commit comments