Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

renamed branding

  • Loading branch information...
commit 8bffec86870ccaa63690c50e0dee2bf7c6204c82 1 parent bf9f43c
Kevin Rose authored
Showing with 1,767 additions and 1,767 deletions.
  1. +3 −3 LICENSE
  2. +6 −6 config/solr/schema.xml
  3. +1 −1  config/solr/server.xml
  4. +1 −1  config/solr/solrconfig.xml
  5. +4 −4 r2/Makefile
  6. +1 −1  r2/babel.cfg
  7. +1 −1  r2/check_procs.sh
  8. +13 −13 r2/example.ini
  9. +1 −1  r2/ez_setup/__init__.py
  10. +1 −1  r2/r2/__init__.py
  11. +1 −1  r2/r2/commands.py
  12. +1 −1  r2/r2/config/__init__.py
  13. +1 −1  r2/r2/config/admin_routes.py
  14. +3 −3 r2/r2/config/environment.py
  15. +13 −13 r2/r2/config/middleware.py
  16. +1 −1  r2/r2/config/rewrites.py
  17. +12 −12 r2/r2/config/routing.py
  18. +4 −4 r2/r2/config/templates.py
  19. +1 −1  r2/r2/config/utils.py
  20. +2 −2 r2/r2/controllers/__init__.py
  21. +3 −3 r2/r2/controllers/admin.py
  22. +37 −37 r2/r2/controllers/api.py
  23. +2 −2 r2/r2/controllers/awards.py
  24. +8 −8 r2/r2/controllers/buttons.py
  25. +2 −2 r2/r2/controllers/captcha.py
  26. +6 −6 r2/r2/controllers/embed.py
  27. +10 −10 r2/r2/controllers/error.py
  28. +4 −4 r2/r2/controllers/errors.py
  29. +5 −5 r2/r2/controllers/feedback.py
  30. +40 −40 r2/r2/controllers/front.py
  31. +1 −1  r2/r2/controllers/health.py
  32. +4 −4 r2/r2/controllers/i18n.py
  33. +23 −23 r2/r2/controllers/listingcontroller.py
  34. +2 −2 r2/r2/controllers/mediaembed.py
  35. +2 −2 r2/r2/controllers/post.py
  36. +2 −2 r2/r2/controllers/promotecontroller.py
  37. +1 −1  r2/r2/controllers/querycontroller.py
  38. +33 −33 r2/r2/controllers/reddit_base.py
  39. +1 −1  r2/r2/controllers/redirect.py
  40. +1 −1  r2/r2/controllers/template.py
  41. +6 −6 r2/r2/controllers/toolbar.py
  42. +1 −1  r2/r2/controllers/validator/__init__.py
  43. +21 −21 r2/r2/controllers/validator/validator.py
  44. +1 −1  r2/r2/i18n/__init__.py
  45. BIN  r2/r2/i18n/en/LC_MESSAGES/r2.mo
  46. +176 −176 r2/r2/i18n/en/LC_MESSAGES/r2.po
  47. +144 −144 r2/r2/i18n/r2.pot
  48. +1 −1  r2/r2/lib/__init__.py
  49. +5 −5 r2/r2/lib/amqp.py
  50. +7 −7 r2/r2/lib/app_globals.py
  51. +1 −1  r2/r2/lib/authorize/__init__.py
  52. +1 −1  r2/r2/lib/authorize/api.py
  53. +1 −1  r2/r2/lib/authorize/interaction.py
  54. +2 −2 r2/r2/lib/base.py
  55. +1 −1  r2/r2/lib/c/filters.c
  56. +1 −1  r2/r2/lib/c/recommendations/Database.cpp
  57. +1 −1  r2/r2/lib/c/recommendations/Database.h
  58. +1 −1  r2/r2/lib/c/recommendations/Dictionary.h
  59. +3 −3 r2/r2/lib/c/recommendations/ModsTable.cpp
  60. +1 −1  r2/r2/lib/c/recommendations/ModsTable.h
  61. +1 −1  r2/r2/lib/c/recommendations/Recommender.cpp
  62. +1 −1  r2/r2/lib/c/recommendations/Recommender.h
  63. +1 −1  r2/r2/lib/c/recommendations/SparseMatrix.h
  64. +1 −1  r2/r2/lib/c/recommendations/User.cpp
  65. +1 −1  r2/r2/lib/c/recommendations/User.h
  66. +3 −3 r2/r2/lib/c/recommendations/articles.cpp
  67. +1 −1  r2/r2/lib/c/recommendations/articles.h
  68. +1 −1  r2/r2/lib/c/recommendations/main.cpp
  69. +1 −1  r2/r2/lib/c/recommendations/recommend_memcache.cpp
  70. +1 −1  r2/r2/lib/c/recommendations/recommend_memcache.h
  71. +1 −1  r2/r2/lib/c/recommendations/recommender_py.h
  72. +1 −1  r2/r2/lib/cache.py
  73. +1 −1  r2/r2/lib/captcha.py
  74. +1 −1  r2/r2/lib/comment_tree.py
  75. +1 −1  r2/r2/lib/contrib/nymph.py
  76. +3 −3 r2/r2/lib/count.py
  77. +3 −3 r2/r2/lib/cssfilter.py
  78. +1 −1  r2/r2/lib/db/__init__.py
  79. +1 −1  r2/r2/lib/db/alter_db.py
  80. +1 −1  r2/r2/lib/db/operators.py
  81. +12 −12 r2/r2/lib/db/queries.py
  82. +1 −1  r2/r2/lib/db/sorts.py
  83. +4 −4 r2/r2/lib/db/stats.py
  84. +1 −1  r2/r2/lib/db/tdb_sql.py
  85. +1 −1  r2/r2/lib/db/thing.py
  86. +1 −1  r2/r2/lib/db/userrel.py
  87. +3 −3 r2/r2/lib/emailer.py
  88. +1 −1  r2/r2/lib/filters.py
  89. +1 −1  r2/r2/lib/find_tz.py
  90. +1 −1  r2/r2/lib/helpers.py
  91. +1 −1  r2/r2/lib/html_source.py
  92. +1 −1  r2/r2/lib/jsonresponse.py
  93. +11 −11 r2/r2/lib/jsontemplates.py
  94. +1 −1  r2/r2/lib/lock.py
  95. +1 −1  r2/r2/lib/logger.py
  96. +1 −1  r2/r2/lib/manager/__init__.py
  97. +1 −1  r2/r2/lib/manager/db_manager.py
  98. +1 −1  r2/r2/lib/manager/tp_manager.py
  99. +1 −1  r2/r2/lib/media.py
  100. +1 −1  r2/r2/lib/memoize.py
  101. +11 −11 r2/r2/lib/menus.py
  102. +9 −9 r2/r2/lib/migrate.py
  103. +6 −6 r2/r2/lib/normalized_hot.py
  104. +9 −9 r2/r2/lib/organic.py
  105. +1 −1  r2/r2/lib/pages/__init__.py
  106. +2 −2 r2/r2/lib/pages/admin_pages.py
  107. +1 −1  r2/r2/lib/pages/graph.py
  108. +118 −118 r2/r2/lib/pages/pages.py
  109. +1 −1  r2/r2/lib/pages/things.py
  110. +7 −7 r2/r2/lib/promote.py
  111. +3 −3 r2/r2/lib/recommendation.py
  112. +2 −2 r2/r2/lib/rising.py
  113. +1 −1  r2/r2/lib/rpc.py
  114. +1 −1  r2/r2/lib/s3cp.py
  115. +3 −3 r2/r2/lib/scraper.py
  116. +3 −3 r2/r2/lib/services.py
  117. +3 −3 r2/r2/lib/set_reddit_pops.py
  118. +26 −26 r2/r2/lib/solrsearch.py
  119. +15 −15 r2/r2/lib/strings.py
  120. +7 −7 r2/r2/lib/subreddit_search.py
  121. +2 −2 r2/r2/lib/sup.py
  122. +15 −15 r2/r2/lib/template_helpers.py
  123. +1 −1  r2/r2/lib/test_cache.py
  124. +1 −1  r2/r2/lib/test_wrapper.py
  125. +1 −1  r2/r2/lib/tracking.py
  126. +3 −3 r2/r2/lib/traffic.py
  127. +3 −3 r2/r2/lib/translation.py
  128. +1 −1  r2/r2/lib/utils/__init__.py
  129. +1 −1  r2/r2/lib/utils/cmd_utils.py
  130. +7 −7 r2/r2/lib/utils/reporting.py
  131. +34 −34 r2/r2/lib/utils/utils.py
  132. +1 −1  r2/r2/lib/workqueue.py
  133. +1 −1  r2/r2/lib/wrapped.py
  134. +2 −2 r2/r2/models/__init__.py
  135. +5 −5 r2/r2/models/account.py
  136. +2 −2 r2/r2/models/admintools.py
  137. +1 −1  r2/r2/models/award.py
  138. +1 −1  r2/r2/models/bidding.py
  139. +11 −11 r2/r2/models/builder.py
  140. +48 −48 r2/r2/models/link.py
  141. +1 −1  r2/r2/models/listing.py
  142. +13 −13 r2/r2/models/mail_queue.py
  143. +6 −6 r2/r2/models/populatedb.py
  144. +2 −2 r2/r2/models/printable.py
  145. +3 −3 r2/r2/models/report.py
  146. +70 −70 r2/r2/models/subreddit.py
  147. +1 −1  r2/r2/models/thing_changes.py
  148. +6 −6 r2/r2/models/types.py
  149. +6 −6 r2/r2/models/update_karmas.py
  150. +3 −3 r2/r2/models/vote.py
  151. +4 −4 r2/r2/public/static/ad_default.html
  152. +2 −2 r2/r2/public/static/css/mobile.css
  153. +32 −32 r2/r2/public/static/css/reddit.css
  154. +1 −1  r2/r2/public/static/defunct/comments.js
  155. +2 −2 r2/r2/public/static/defunct/frame_piece.js
  156. +8 −8 r2/r2/public/static/defunct/link.js
  157. +4 −4 r2/r2/public/static/defunct/organic.js
  158. +38 −38 r2/r2/public/static/defunct/reddit_piece.js
  159. +3 −3 r2/r2/public/static/defunct/subreddit.js
  160. +1 −1  r2/r2/public/static/defunct/tabular.js
  161. +9 −9 r2/r2/public/static/defunct/utils.js
  162. +1 −1  r2/r2/public/static/defunct/vote_piece.js
  163. +14 −14 r2/r2/public/static/iphone/index.html
  164. +20 −20 r2/r2/public/static/js/jquery.reddit.js
  165. +73 −73 r2/r2/public/static/js/reddit.js
  166. +13 −13 r2/r2/public/static/newlayout.css
  167. +7 −7 r2/r2/public/static/reddit.js.old
  168. +22 −22 r2/r2/public/static/redditaddict/index.html
  169. +20 −20 r2/r2/public/static/socialite/index.html
  170. +4 −4 r2/r2/public/static/wiredcomment.css
  171. +1 −1  r2/r2/templates/__init__.py
  172. +1 −1  r2/r2/templates/admin/__init__.py
  173. +1 −1  r2/r2/templates/admin_rightbox.html
  174. +1 −1  r2/r2/templates/adminawardgive.html
  175. +1 −1  r2/r2/templates/adminawards.html
  176. +1 −1  r2/r2/templates/adminawardwinners.html
  177. +1 −1  r2/r2/templates/admintranslations.html
  178. +1 −1  r2/r2/templates/ads.html
  179. +4 −4 r2/r2/templates/appservicemonitor.html
  180. +2 −2 r2/r2/templates/authorizedembed.html
  181. +1 −1  r2/r2/templates/autohandler
  182. +4 −4 r2/r2/templates/base.html
  183. +7 −7 r2/r2/templates/base.htmllite
  184. +1 −1  r2/r2/templates/base.mobile
  185. +3 −3 r2/r2/templates/base.wired
  186. +2 −2 r2/r2/templates/base.xml
  187. +2 −2 r2/r2/templates/bookmarklets.html
  188. +3 −3 r2/r2/templates/button.html
  189. +11 −11 r2/r2/templates/buttondemopanel.html
  190. +7 −7 r2/r2/templates/buttonembed.js
  191. +6 −6 r2/r2/templates/buttonlite.js
  192. +1 −1  r2/r2/templates/buttonnobody.html
  193. +11 −11 r2/r2/templates/buttontypes.html
  194. +1 −1  r2/r2/templates/captcha.html
  195. +1 −1  r2/r2/templates/clickgadget.html
  196. +2 −2 r2/r2/templates/cnameframe.html
  197. +1 −1  r2/r2/templates/comment.html
  198. +1 −1  r2/r2/templates/comment.htmllite
  199. +1 −1  r2/r2/templates/comment.mobile
  200. +1 −1  r2/r2/templates/comment.xml
  201. +1 −1  r2/r2/templates/comment_skeleton.html
  202. +1 −1  r2/r2/templates/commentspanel.html
  203. +7 −7 r2/r2/templates/createsubreddit.html
  204. +1 −1  r2/r2/templates/csserror.html
  205. +4 −4 r2/r2/templates/dart_ad.html
  206. +1 −1  r2/r2/templates/embed.html
  207. +1 −1  r2/r2/templates/errorpage.html
  208. +1 −1  r2/r2/templates/feedback.html
  209. +3 −3 r2/r2/templates/frame.html
  210. +7 −7 r2/r2/templates/framebuster.html
  211. +5 −5 r2/r2/templates/frametoolbar.html
  212. +1 −1  r2/r2/templates/gettextheader.html
  213. +1 −1  r2/r2/templates/headerbar.mobile
  214. +1 −1  r2/r2/templates/headerbar.xml
  215. +3 −3 r2/r2/templates/helppage.html
  216. +1 −1  r2/r2/templates/infobar.html
  217. +1 −1  r2/r2/templates/infobar.htmllite
  218. +1 −1  r2/r2/templates/infobar.mobile
  219. +1 −1  r2/r2/templates/infobar.wired
  220. +1 −1  r2/r2/templates/infobar.xml
  221. +3 −3 r2/r2/templates/innertoolbarframe.html
  222. +1 −1  r2/r2/templates/jquery.reddit.js
  223. +7 −7 r2/r2/templates/link.html
  224. +6 −6 r2/r2/templates/link.htmllite
  225. +9 −9 r2/r2/templates/link.mobile
  226. +4 −4 r2/r2/templates/link.wired
  227. +5 −5 r2/r2/templates/link.xml
  228. +1 −1  r2/r2/templates/linkinfobar.html
  229. +1 −1  r2/r2/templates/linkpromoteinfobar.html
  230. +1 −1  r2/r2/templates/listing.html
  231. +4 −4 r2/r2/templates/listing.htmllite
  232. +1 −1  r2/r2/templates/listing.mobile
  233. +1 −1  r2/r2/templates/listing.wired
  234. +1 −1  r2/r2/templates/listing.xml
  235. +1 −1  r2/r2/templates/login.html
  236. +1 −1  r2/r2/templates/login.mobile
  237. +1 −1  r2/r2/templates/loginformwide.html
  238. +1 −1  r2/r2/templates/mail_opt.email
  239. +1 −1  r2/r2/templates/mediaembed.html
  240. +1 −1  r2/r2/templates/mediaembedbody.html
  241. +1 −1  r2/r2/templates/menuarea.html
  242. +1 −1  r2/r2/templates/menuarea.htmllite
  243. +1 −1  r2/r2/templates/menuarea.mobile
  244. +1 −1  r2/r2/templates/menuarea.xml
  245. +1 −1  r2/r2/templates/message.html
  246. +1 −1  r2/r2/templates/message.xml
  247. +4 −4 r2/r2/templates/messagecompose.html
  248. +1 −1  r2/r2/templates/morechildren.html
  249. +1 −1  r2/r2/templates/morechildren.htmllite
  250. +1 −1  r2/r2/templates/morechildren.mobile
  251. +1 −1  r2/r2/templates/morechildren.xml
  252. +1 −1  r2/r2/templates/morerecursion.html
  253. +1 −1  r2/r2/templates/morerecursion.htmllite
  254. +1 −1  r2/r2/templates/morerecursion.mobile
  255. +1 −1  r2/r2/templates/morerecursion.xml
  256. +1 −1  r2/r2/templates/navbutton.html
  257. +1 −1  r2/r2/templates/navbutton.mobile
  258. +1 −1  r2/r2/templates/navmenu.html
  259. +1 −1  r2/r2/templates/navmenu.htmllite
  260. +1 −1  r2/r2/templates/navmenu.mobile
  261. +7 −7 r2/r2/templates/newlink.html
  262. +1 −1  r2/r2/templates/optout.html
  263. +2 −2 r2/r2/templates/organiclisting.html
  264. +2 −2 r2/r2/templates/over18.html
  265. +2 −2 r2/r2/templates/page_down.html
  266. +8 −8 r2/r2/templates/pagenamenav.html
  267. +6 −6 r2/r2/templates/pagenamenav.mobile
  268. +1 −1  r2/r2/templates/panestack.html
  269. +1 −1  r2/r2/templates/panestack.htmllite
  270. +1 −1  r2/r2/templates/panestack.mobile
  271. +1 −1  r2/r2/templates/panestack.wired
  272. +1 −1  r2/r2/templates/panestack.xml
  273. +1 −1  r2/r2/templates/password.html
  274. +1 −1  r2/r2/templates/passwordreset.email
  275. +1 −1  r2/r2/templates/paymentform.html
  276. +1 −1  r2/r2/templates/permalinkmessage.html
  277. +1 −1  r2/r2/templates/permalinkmessage.mobile
  278. +1 −1  r2/r2/templates/permalinkmessage.xml
  279. +2 −2 r2/r2/templates/prefdelete.html
  280. +5 −5 r2/r2/templates/prefoptions.html
  281. +1 −1  r2/r2/templates/prefupdate.html
  282. +1 −1  r2/r2/templates/printable.html
  283. +6 −6 r2/r2/templates/printable.htmllite
  284. +1 −1  r2/r2/templates/printable.mobile
  285. +1 −1  r2/r2/templates/printablebuttons.html
  286. +3 −3 r2/r2/templates/profilebar.html
  287. +1 −1  r2/r2/templates/profiling.html
  288. +17 −17 r2/r2/templates/promo_email.email
  289. +1 −1  r2/r2/templates/promote_graph.html
  290. +2 −2 r2/r2/templates/promotedlink.html
  291. +2 −2 r2/r2/templates/promotedtraffic.html
  292. +2 −2 r2/r2/templates/promotelinkform.html
  293. +9 −9 r2/r2/templates/reddit.html
  294. +1 −1  r2/r2/templates/reddit.htmllite
  295. +1 −1  r2/r2/templates/reddit.js
  296. +2 −2 r2/r2/templates/reddit.mobile
  297. +1 −1  r2/r2/templates/reddit.wired
  298. +1 −1  r2/r2/templates/reddit.xml
  299. +3 −3 r2/r2/templates/redditfooter.html
  300. +3 −3 r2/r2/templates/redditheader.html
Sorry, we could not display the entire diff because too many files (351) changed.
6 LICENSE
View
@@ -472,7 +472,7 @@ EXHIBIT A. Common Public Attribution License Version 1.0.
"The contents of this file are subject to the Common Public Attribution License
Version 1.0. (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
-http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+http://code.digg.com/LICENSE. The License is based on the Mozilla Public
License Version 1.1, but Sections 14 and 15 have been added to cover use of
software over a computer network and provide for limited attribution for the
Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -497,10 +497,10 @@ Reserved.
Attribution Phrase (not exceeding 10 words): Powered by Reddit
-Attribution URL: http://code.reddit.com
+Attribution URL: http://code.digg.com
Graphic Image as provided in the Covered Code:
-http://code.reddit.com/reddit_logo.png
+http://code.digg.com/reddit_logo.png
Display of Attribution Information is required in Larger Works which are defined
in the CPAL as a work which combines Covered Code or portions thereof with code
12 config/solr/schema.xml
View
@@ -3,7 +3,7 @@
"The contents of this file are subject to the Common Public Attribution
License Version 1.0. (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
-http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+http://code.digg.com/LICENSE. The License is based on the Mozilla Public
License Version 1.1, but Sections 14 and 15 have been added to cover use of
software over a computer network and provide for limited attribution for the
Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -22,7 +22,7 @@ All portions of the code written by CondeNet are Copyright (c) 2006-2009
CondeNet, Inc. All Rights Reserved.
-->
-<schema name="reddit" version="1.1">
+<schema name="digg" version="1.1">
<types>
<!-- field type definitions. The "name" attribute is
just a label to be used by field definitions. The "class"
@@ -387,10 +387,10 @@ CondeNet, Inc. All Rights Reserved.
<field name="points" type="sint" indexed="true" stored="true" required="true" reversed="true" />
<field name="spam" type="boolean" indexed="true" stored="true" required="false" />
<field name="deleted" type="boolean" indexed="true" stored="true" required="false" />
- <!-- subreddit,link,comment -->
+ <!-- subdigg,link,comment -->
<field name="author_id" type="integer" indexed="true" stored="false" required="false" />
<field name="author" type="string" indexed="true" stored="false" required="false" />
- <!-- subreddit -->
+ <!-- subdigg -->
<field name="title" type="text" indexed="true" stored="false" required="false" />
<field name="description" type="text" indexed="true" stored="false" required="false" />
<field name="firsttext" type="text" indexed="true" stored="false" required="false" />
@@ -399,8 +399,8 @@ CondeNet, Inc. All Rights Reserved.
<field name="sr_type" type="string" indexed="true" stored="false" required="false" />
<!-- link -->
<field name="sr_id" type="integer" indexed="true" stored="false" required="false" />
- <field name="reddit" type="string" indexed="true" stored="false" required="false" />
- <field name="subreddit" type="string" indexed="true" stored="false" required="false" />
+ <field name="digg" type="string" indexed="true" stored="false" required="false" />
+ <field name="subdigg" type="string" indexed="true" stored="false" required="false" />
<field name="url" type="text" indexed="true" stored="false" required="false" />
<field name="domain" type="string" indexed="true" stored="false" required="false" multiValued="true" />
<field name="site" type="string" indexed="true" stored="false" required="false" multiValued="true" />
2  config/solr/server.xml
View
@@ -3,7 +3,7 @@
"The contents of this file are subject to the Common Public Attribution
License Version 1.0. (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
-http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+http://code.digg.com/LICENSE. The License is based on the Mozilla Public
License Version 1.1, but Sections 14 and 15 have been added to cover use of
software over a computer network and provide for limited attribution for the
Original Developer. In addition, Exhibit A has been modified to be consistent
2  config/solr/solrconfig.xml
View
@@ -3,7 +3,7 @@
"The contents of this file are subject to the Common Public Attribution
License Version 1.0. (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
-http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+http://code.digg.com/LICENSE. The License is based on the Mozilla Public
License Version 1.1, but Sections 14 and 15 have been added to cover use of
software over a computer network and provide for limited attribution for the
Original Developer. In addition, Exhibit A has been modified to be consistent
8 r2/Makefile
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -21,10 +21,10 @@
################################################################################
# Jacascript files to be compressified
-js_targets = jquery.js jquery.json.js jquery.reddit.js reddit.js ui.core.js ui.datepicker.js sponsored.js
+js_targets = jquery.js jquery.json.js jquery.digg.js reddit.js ui.core.js ui.datepicker.js sponsored.js
# CSS targets
-main_css = reddit.css
-css_targets = reddit-ie6-hax.css reddit-ie7-hax.css mobile.css spreadshirt.css
+main_css = digg.css
+css_targets = digg-ie6-hax.css reddit-ie7-hax.css mobile.css spreadshirt.css
SED=sed
CAT=cat
2  r2/babel.cfg
View
@@ -1,7 +1,7 @@
## The contents of this file are subject to the Common Public Attribution
## License Version 1.0. (the "License"); you may not use this file except in
## compliance with the License. You may obtain a copy of the License at
-## http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+## http://code.digg.com/LICENSE. The License is based on the Mozilla Public
## License Version 1.1, but Sections 14 and 15 have been added to cover use of
## software over a computer network and provide for limited attribution for the
## Original Developer. In addition, Exhibit A has been modified to be consistent
2  r2/check_procs.sh
View
@@ -1,4 +1,4 @@
#!/bin/sh
-cd /home/ri/reddit/r2
+cd /home/ri/digg/r2
/usr/bin/paster run local.ini supervise_watcher.py -c "Alert(restart_list=['MEM'])"
26 r2/example.ini
View
@@ -47,16 +47,16 @@ amqp_virtual_host = /
databases = main, comment, vote, change, email, authorize, award
#db name db host user, pass
-main_db = newreddit, 127.0.0.1, ri, password
-comment_db = newreddit, 127.0.0.1, ri, password
-comment2_db = newreddit, 127.0.0.1, ri, password
-vote_db = newreddit, 127.0.0.1, ri, password
+main_db = newdigg, 127.0.0.1, ri, password
+comment_db = newdigg, 127.0.0.1, ri, password
+comment2_db = newdigg, 127.0.0.1, ri, password
+vote_db = newdigg, 127.0.0.1, ri, password
change_db = changed, 127.0.0.1, ri, password
email_db = email, 127.0.0.1, ri, password
authorize_db = authorize, 127.0.0.1, ri, password
award_db = award, 127.0.0.1, ri, password
-db_app_name = reddit
+db_app_name = digg
db_create_tables = True
type_db = main
@@ -70,9 +70,9 @@ db_table_savehide = relation, account, link, main
db_table_click = relation, account, link, main
db_table_comment = thing, comment
-db_table_subreddit = thing, comment
+db_table_subdigg = thing, comment
-db_table_srmember = relation, subreddit, account, comment
+db_table_srmember = relation, subdigg, account, comment
db_table_friend = relation, account, account, comment
@@ -85,7 +85,7 @@ db_table_inbox_account_message = relation, account, message, main
db_table_report_account_link = relation, account, link, main
db_table_report_account_comment = relation, account, comment, comment
db_table_report_account_message = relation, account, message, main
-db_table_report_account_subreddit = relation, account, subreddit, main
+db_table_report_account_subdigg = relation, account, subreddit, main
db_table_award = thing, award
db_table_trophy = relation, account, award, award
@@ -107,8 +107,8 @@ enable_doquery = False
use_query_cache = False
write_query_queue = False
-stylesheet = reddit.css
-stylesheet_rtl = reddit_rtl.css
+stylesheet = digg.css
+stylesheet_rtl = digg_rtl.css
allowed_css_linked_domains = my.domain.com, my.otherdomain.com
css_killswitch = False
@@ -116,12 +116,12 @@ max_sr_images = 20
show_awards = False
-login_cookie = reddit_session
+login_cookie = digg_session
domain = localhost
domain_prefix =
media_domain = localhost
default_sr = localhost
-automatic_reddits =
+automatic_diggs =
admins =
sponsors =
@@ -164,7 +164,7 @@ RATELIMIT = 10
num_comments = 200
max_comments = 500
-num_default_reddits = 10
+num_default_diggs = 10
num_serendipity = 100
sr_dropdown_threshold = 15
2  r2/ez_setup/__init__.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
2  r2/r2/__init__.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
2  r2/r2/commands.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
2  r2/r2/config/__init__.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
2  r2/r2/config/admin_routes.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
6 r2/r2/config/environment.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -33,7 +33,7 @@
import r2.lib.app_globals as app_globals
from r2.lib import rpc
import r2.lib.helpers
-import r2.config as reddit_config
+import r2.config as digg_config
from r2.templates import tmpl_dirs
@@ -74,7 +74,7 @@ def load_environment(global_conf={}, app_conf={}):
# note that all config options will override
# any Pylons config options
g = config['pylons.g']
- reddit_config.cache = g.cache
+ digg_config.cache = g.cache
# Return our loaded config object
#return config.Config(tmpl_options, map, paths)
26 r2/r2/config/middleware.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -275,7 +275,7 @@ def __call__(self, environ, start_response):
elif self.is_auth_cname(sub_domains):
environ['frameless_cname'] = True
environ['authorized_cname'] = True
- elif ("redditSession=cname" in environ.get('HTTP_COOKIE', '')
+ elif ("diggSession=cname" in environ.get('HTTP_COOKIE', '')
and environ['REQUEST_METHOD'] != 'POST'
and not environ['PATH_INFO'].startswith('/error')):
environ['original_path'] = environ['PATH_INFO']
@@ -294,12 +294,12 @@ def __call__(self, environ, start_response):
continue
# subdomains which change the extension
elif sd == 'm':
- environ['reddit-domain-extension'] = 'mobile'
+ environ['digg-domain-extension'] = 'mobile'
elif sd in ('api', 'rss', 'xml', 'json'):
- environ['reddit-domain-extension'] = sd
+ environ['digg-domain-extension'] = sd
elif (len(sd) == 2 or (len(sd) == 5 and sd[2] == '-')) and self.lang_re.match(sd):
- environ['reddit-prefer-lang'] = sd
- environ['reddit-domain-prefix'] = sd
+ environ['digg-prefer-lang'] = sd
+ environ['digg-domain-prefix'] = sd
else:
sr_redirect = sd
sub_domains.remove(sd)
@@ -318,7 +318,7 @@ def __call__(self, environ, start_response):
return self.app(environ, start_response)
-class SubredditMiddleware(object):
+class SubdiggMiddleware(object):
sr_pattern = re.compile(r'^/r/([^/]{2,})')
def __init__(self, app):
@@ -328,10 +328,10 @@ def __call__(self, environ, start_response):
path = environ['PATH_INFO']
sr = self.sr_pattern.match(path)
if sr:
- environ['subreddit'] = sr.groups()[0]
+ environ['subdigg'] = sr.groups()[0]
environ['PATH_INFO'] = self.sr_pattern.sub('', path) or '/'
- elif path.startswith("/reddits"):
- environ['subreddit'] = 'r'
+ elif path.startswith("/diggs"):
+ environ['subdigg'] = 'r'
return self.app(environ, start_response)
class DomainListingMiddleware(object):
@@ -341,7 +341,7 @@ def __init__(self, app):
self.app = app
def __call__(self, environ, start_response):
- if not environ.has_key('subreddit'):
+ if not environ.has_key('subdigg'):
path = environ['PATH_INFO']
domain = self.domain_pattern.match(path)
if domain:
@@ -370,7 +370,7 @@ def __init__(self, app):
def __call__(self, environ, start_response):
path = environ['PATH_INFO']
- domain_ext = environ.get('reddit-domain-extension')
+ domain_ext = environ.get('digg-domain-extension')
for ext, val in self.extensions.iteritems():
if ext == domain_ext or path.endswith('.' + ext):
environ['extension'] = ext
@@ -531,7 +531,7 @@ def make_app(global_conf, full_stack=True, **app_conf):
app = SourceViewMiddleware(app)
app = DomainListingMiddleware(app)
- app = SubredditMiddleware(app)
+ app = SubdiggMiddleware(app)
app = ExtensionMiddleware(app)
app = DomainMiddleware(app)
2  r2/r2/config/rewrites.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
24 r2/r2/config/routing.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -48,16 +48,16 @@ def make_map(global_conf={}, app_conf={}):
mc('/traffic', controller='front', action='site_traffic')
mc('/about/:location', controller='front',
- action='editreddit', location = 'about')
+ action='editdigg', location = 'about')
- mc('/reddits/create', controller='front', action='newreddit')
- mc('/reddits/search', controller='front', action='search_reddits')
- mc('/reddits/login', controller='front', action='login')
- mc('/reddits/:where', controller='reddits', action='listing',
+ mc('/diggs/create', controller='front', action='newreddit')
+ mc('/diggs/search', controller='front', action='search_reddits')
+ mc('/diggs/login', controller='front', action='login')
+ mc('/diggs/:where', controller='reddits', action='listing',
where = 'popular',
requirements=dict(where="popular|new|banned"))
- mc('/reddits/mine/:where', controller='myreddits', action='listing',
+ mc('/diggs/mine/:where', controller='myreddits', action='listing',
where='subscriber',
requirements=dict(where='subscriber|contributor|moderator'))
@@ -199,18 +199,18 @@ def make_map(global_conf={}, app_conf={}):
mc('/doquery', controller='query', action='doquery')
mc('/store', controller='redirect', action='redirect',
- dest='http://store.reddit.com/index.html')
+ dest='http://store.digg.com/index.html')
mc('/code', controller='redirect', action='redirect',
- dest='http://code.reddit.com/')
+ dest='http://code.digg.com/')
mc('/mobile', controller='redirect', action='redirect',
- dest='http://m.reddit.com/')
+ dest='http://m.digg.com/')
mc('/authorize_embed', controller = 'front', action = 'authorize_embed')
mc("/ads/", controller = "front", action = "ad")
- mc("/ads/:reddit", controller = "front", action = "ad")
+ mc("/ads/:digg", controller = "front", action = "ad")
# This route handles displaying the error page and
# graphics used in the 404/500
# error pages. It should likely stay at the top
@@ -220,7 +220,7 @@ def make_map(global_conf={}, app_conf={}):
# these should be near the buttom, because they should only kick
# in if everything else fails. It's the attempted catch-all
- # reddit.com/http://... and reddit.com/34fr, but these redirect to
+ # digg.com/http://... and reddit.com/34fr, but these redirect to
# the less-guessy versions at /s/ and /tb/
mc('/:linkoid', controller='toolbar', action='linkoid',
requirements=dict(linkoid='[0-9a-z]{1,6}'))
8 r2/r2/config/templates.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -36,15 +36,15 @@ def api(type, cls):
api('promotedlink', PromotedLinkJsonTemplate)
api('comment', CommentJsonTemplate)
api('message', MessageJsonTemplate)
-api('subreddit', SubredditJsonTemplate)
+api('subdigg', SubredditJsonTemplate)
api('morerecursion', MoreCommentJsonTemplate)
api('morechildren', MoreCommentJsonTemplate)
-api('reddit', RedditJsonTemplate)
+api('digg', RedditJsonTemplate)
api('panestack', PanestackJsonTemplate)
api('listing', ListingJsonTemplate)
api('usertableitem', UserItemJsonTemplate)
api('account', AccountJsonTemplate)
api('organiclisting', OrganicListingJsonTemplate)
-api('reddittraffic', TrafficJsonTemplate)
+api('diggtraffic', TrafficJsonTemplate)
api('takedownpane', TakedownJsonTemplate)
2  r2/r2/config/utils.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
4 r2/r2/controllers/__init__.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -33,7 +33,7 @@
from listingcontroller import UserController
from listingcontroller import CommentsController
-from listingcontroller import MyredditsController
+from listingcontroller import MydiggsController
from feedback import FeedbackController
from front import FrontController
6 r2/r2/controllers/admin.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -19,8 +19,8 @@
# All portions of the code written by CondeNet are Copyright (c) 2006-2009
# CondeNet, Inc. All Rights Reserved.
################################################################################
-from r2.controllers.reddit_base import RedditController
-from r2.controllers.reddit_base import base_listing
+from r2.controllers.digg_base import RedditController
+from r2.controllers.digg_base import base_listing
from r2.controllers.validator import *
from r2.lib.pages import *
74 r2/r2/controllers/api.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -19,7 +19,7 @@
# All portions of the code written by CondeNet are Copyright (c) 2006-2009
# CondeNet, Inc. All Rights Reserved.
################################################################################
-from reddit_base import RedditController, set_user_cookie
+from digg_base import RedditController, set_user_cookie
from pylons.i18n import _
from pylons import c, request
@@ -27,7 +27,7 @@
from validator import *
from r2.models import *
-from r2.models.subreddit import Default as DefaultSR
+from r2.models.subdigg import Default as DefaultSR
import r2.models.thing_changes as tc
from r2.lib.utils import get_title, sanitize_url, timeuntil, set_last_modified
@@ -49,7 +49,7 @@
from r2.lib.media import force_thumbnail, thumbnail_url
from r2.lib.comment_tree import add_comment, delete_comment
from r2.lib import tracking, sup, cssfilter, emailer
-from r2.lib.subreddit_search import search_reddits
+from r2.lib.subdigg_search import search_reddits
from datetime import datetime, timedelta
from md5 import md5
@@ -161,7 +161,7 @@ def POST_submit(self, form, jquery, url, selftext, kind, title, save,
errors.SUBREDDIT_NOTALLOWED,
errors.SUBREDDIT_REQUIRED):
# checking to get the error set in the form, but we can't
- # check for rate-limiting if there's no subreddit
+ # check for rate-limiting if there's no subdigg
return
else:
should_ratelimit = sr.should_ratelimit(c.user, 'link')
@@ -340,8 +340,8 @@ def POST_register(self, form, jquery, name, email,
container = VByName('id'))
def POST_leavemoderator(self, container):
"""
- Handles self-removal as moderator from a subreddit as rendered
- in the subreddit sidebox on any of that subreddit's pages.
+ Handles self-removal as moderator from a subdigg as rendered
+ in the subdigg sidebox on any of that subreddit's pages.
"""
if container and container.is_moderator(c.user):
container.remove_moderator(c.user)
@@ -367,10 +367,10 @@ def POST_leavecontributor(self, container):
def POST_unfriend(self, nuser, iuser, container, type):
"""
Handles removal of a friend (a user-user relation) or removal
- of a user's priviledges from a subreddit (a user-subreddit
+ of a user's priviledges from a subdigg (a user-subreddit
relation). The user can either be passed in by name (nuser)
or buy fullname (iuser). 'container' will either be the
- current user or the subreddit.
+ current user or the subdigg.
"""
# The user who made the request must be an admin or a moderator
@@ -399,7 +399,7 @@ def POST_friend(self, form, jquery, ip, friend,
container, type):
"""
Complement to POST_unfriend: handles friending as well as
- privilege changes on subreddits.
+ privilege changes on subdiggs.
"""
fn = getattr(container, 'add_' + type)
@@ -527,7 +527,7 @@ def POST_del(self, thing):
#expire the item from the sr cache
if isinstance(thing, Link):
- sr = thing.subreddit_slow
+ sr = thing.subdigg_slow
expire_hot(sr)
if g.use_query_cache:
queries.new_link(thing)
@@ -605,7 +605,7 @@ def POST_comment(self, commentform, jquery, parent, comment, ip):
else:
link = Link._byID(parent.link_id, data = True)
parent_comment = parent
- sr = parent.subreddit_slow
+ sr = parent.subdigg_slow
if ((link.is_self and link.author_id == c.user._id)
or not sr.should_ratelimit(c.user, 'comment')):
should_ratelimit = False
@@ -691,7 +691,7 @@ def POST_share(self, shareform, jquery, emails, thing, share_from, reply_to,
message):
# remove the ratelimit error if the user's karma is high
- sr = thing.subreddit_slow
+ sr = thing.subdigg_slow
should_ratelimit = sr.should_ratelimit(c.user, 'link')
if not should_ratelimit:
c.errors.remove((errors.RATELIMIT, 'ratelimit'))
@@ -760,7 +760,7 @@ def POST_vote(self, dir, thing, ip, vote_type):
#update relevant caches
if isinstance(thing, Link):
- sr = thing.subreddit_slow
+ sr = thing.subdigg_slow
set_last_modified(c.user, 'liked')
set_last_modified(c.user, 'disliked')
@@ -784,7 +784,7 @@ def POST_vote(self, dir, thing, ip, vote_type):
# nop is safe: handled after auth checks below
stylesheet_contents = nop('stylesheet_contents'),
op = VOneOf('op',['save','preview']))
- def POST_subreddit_stylesheet(self, form, jquery,
+ def POST_subdigg_stylesheet(self, form, jquery,
stylesheet_contents = '', op='save'):
if not c.site.can_change_stylesheet(c.user):
return self.abort(403,'forbidden')
@@ -976,9 +976,9 @@ def POST_upload_sr_img(self, file, header, sponsor, name, form_id):
VModhash(),
VRatelimit(rate_user = True,
rate_ip = True,
- prefix = 'create_reddit_'),
+ prefix = 'create_digg_'),
sr = VByName('sr'),
- name = VSubredditName("name"),
+ name = VSubdiggName("name"),
title = VLength("title", max_length = 100),
domain = VCnameDomain("domain"),
description = VLength("description", max_length = 1000),
@@ -1009,7 +1009,7 @@ def POST_site_admin(self, form, jquery, name, ip, sr, ad_type, ad_file,
c.errors.add(errors.RATELIMIT, {'time': time})
domain = kw['domain']
- cname_sr = domain and Subreddit._by_domain(domain)
+ cname_sr = domain and Subdigg._by_domain(domain)
if cname_sr and (not sr or sr != cname_sr):
c.errors.add(errors.USED_CNAME)
@@ -1025,16 +1025,16 @@ def POST_site_admin(self, form, jquery, name, ip, sr, ad_type, ad_file,
elif (form.has_errors(None, errors.INVALID_OPTION) or
form.has_errors('description', errors.TOO_LONG)):
pass
- #creating a new reddit
+ #creating a new digg
elif not sr:
#sending kw is ok because it was sanitized above
- sr = Subreddit._new(name = name, author_id = c.user._id, ip = ip,
+ sr = Subdigg._new(name = name, author_id = c.user._id, ip = ip,
**kw)
# will also update search
- worker.do(lambda: amqp.add_item('new_subreddit', sr._fullname))
+ worker.do(lambda: amqp.add_item('new_subdigg', sr._fullname))
- Subreddit.subscribe_defaults(c.user)
+ Subdigg.subscribe_defaults(c.user)
# make sure this user is on the admin list of that site!
if sr.add_subscriber(c.user):
sr._incr('_ups', 1)
@@ -1044,15 +1044,15 @@ def POST_site_admin(self, form, jquery, name, ip, sr, ad_type, ad_file,
if not c.user_is_admin:
VRatelimit.ratelimit(rate_user=True,
rate_ip = True,
- prefix = "create_reddit_")
+ prefix = "create_digg_")
- #editting an existing reddit
+ #editting an existing digg
elif sr.is_moderator(c.user) or c.user_is_admin:
if c.user_is_admin:
sr.ad_type = ad_type
if ad_type != "custom":
- ad_file = Subreddit._defaults['ad_file']
+ ad_file = Subdigg._defaults['ad_file']
sr.ad_file = ad_file
sr.sponsorship_url = sponsor_url or None
sr.sponsorship_name = sponsor_name or None
@@ -1068,8 +1068,8 @@ def POST_site_admin(self, form, jquery, name, ip, sr, ad_type, ad_file,
#update the domain cache if the domain changed
if sr.domain != old_domain:
- Subreddit._by_domain(old_domain, _update = True)
- Subreddit._by_domain(sr.domain, _update = True)
+ Subdigg._by_domain(old_domain, _update = True)
+ Subdigg._by_domain(sr.domain, _update = True)
# flag search indexer that something has changed
tc.changed(sr)
@@ -1157,7 +1157,7 @@ def POST_unhide(self, thing):
def POST_morechildren(self, form, jquery,
link, sort, children, depth, mc_id):
user = c.user if c.user_is_loggedin else None
- if not link or not link.subreddit_slow.can_view(user):
+ if not link or not link.subdigg_slow.can_view(user):
return self.abort(403,'forbidden')
if children:
@@ -1209,13 +1209,13 @@ def GET_bookmarklet(self, action, uh, links):
return self.redirect("/static/css_update.png")
# unlike most cases, if not already submitted, error.
elif errors.ALREADY_SUB in c.errors:
- # preserve the subreddit if not Default
- sr = c.site if not isinstance(c.site, FakeSubreddit) else None
+ # preserve the subdigg if not Default
+ sr = c.site if not isinstance(c.site, FakeSubdigg) else None
# check permissions on those links to make sure votes will count
- Subreddit.load_subreddits(links, return_dict = False)
+ Subdigg.load_subreddits(links, return_dict = False)
user = c.user if c.user_is_loggedin else None
- links = [l for l in links if l.subreddit_slow.can_view(user)]
+ links = [l for l in links if l.subdigg_slow.can_view(user)]
if links:
if action in ['like', 'dislike']:
@@ -1268,7 +1268,7 @@ def POST_resetpassword(self, form, jquery, cache_evt, password):
@noresponse(VUser())
def POST_noframe(self):
"""
- removes the reddit toolbar if that currently the user's preference
+ removes the digg toolbar if that currently the user's preference
"""
c.user.pref_frame = False
c.user._commit()
@@ -1307,7 +1307,7 @@ def POST_subscribe(self, action, sr):
self._subscribe(sr, action == 'sub')
def _subscribe(self, sr, sub):
- Subreddit.subscribe_defaults(c.user)
+ Subdigg.subscribe_defaults(c.user)
if sub:
if sr.add_subscriber(c.user):
@@ -1466,7 +1466,7 @@ def POST_tb_commentspanel_hide(self):
@validatedForm(promoted = VByName('ids', thing_cls = Link,
multiple = True),
- sponsorships = VByName('ids', thing_cls = Subreddit,
+ sponsorships = VByName('ids', thing_cls = Subdigg,
multiple = True))
def POST_onload(self, form, jquery, promoted, sponsorships, *a, **kw):
def add_tracker(dest, where, what):
@@ -1492,10 +1492,10 @@ def add_tracker(dest, where, what):
@json_validate(query = nop('query'))
- def POST_search_reddit_names(self, query):
+ def POST_search_digg_names(self, query):
names = []
if query:
- names = search_reddits(query)
+ names = search_diggs(query)
return {'names': names}
4 r2/r2/controllers/awards.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -20,7 +20,7 @@
# CondeNet, Inc. All Rights Reserved.
################################################################################
from pylons import request, g
-from reddit_base import RedditController
+from digg_base import RedditController
from r2.lib.pages import AdminPage, AdminAwards
from r2.lib.pages import AdminAwardGive, AdminAwardWinners
from validator import *
16 r2/r2/controllers/buttons.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -19,7 +19,7 @@
# All portions of the code written by CondeNet are Copyright (c) 2006-2009
# CondeNet, Inc. All Rights Reserved.
################################################################################
-from reddit_base import RedditController
+from digg_base import RedditController
from r2.lib.pages import Button, ButtonNoBody, ButtonEmbed, ButtonLite, \
ButtonDemoPanel, WidgetDemoPanel, Bookmarklets, BoringPage
from r2.lib.pages.things import wrap_links
@@ -44,7 +44,7 @@ def get_wrapped_link(self, url, link = None, wrapper = None):
if link:
links = [link]
else:
- sr = None if isinstance(c.site, FakeSubreddit) else c.site
+ sr = None if isinstance(c.site, FakeSubdigg) else c.site
try:
links = tup(Link._by_url(url, sr))
except NotFound:
@@ -63,7 +63,7 @@ def get_wrapped_link(self, url, link = None, wrapper = None):
return links
# note: even if _by_url successed or a link was passed in,
# it is possible link_listing.things is empty if the
- # link(s) is/are members of a private reddit
+ # link(s) is/are members of a private digg
# return the link with the highest score (if more than 1)
except:
#we don't want to return 500s in other people's pages.
@@ -90,8 +90,8 @@ def GET_button_content(self, url, title, css, vote, newwindow, width, link):
return self.redirect(request.path + query_string(request.GET))
#disable css hack
- if (css != 'http://blog.wired.com/css/redditsocial.css' and
- css != 'http://www.wired.com/css/redditsocial.css'):
+ if (css != 'http://blog.wired.com/css/diggsocial.css' and
+ css != 'http://www.wired.com/css/diggsocial.css'):
css = None
if link:
@@ -173,13 +173,13 @@ def GET_button_demo_page(self):
# no buttons for domain listings -> redirect to top level
if isinstance(c.site, DomainSR):
return self.redirect('/buttons')
- return BoringPage(_("reddit buttons"),
+ return BoringPage(_("digg buttons"),
show_sidebar = False,
content=ButtonDemoPanel()).render()
def GET_widget_demo_page(self):
- return BoringPage(_("reddit widget"),
+ return BoringPage(_("digg widget"),
show_sidebar = False,
content=WidgetDemoPanel()).render()
4 r2/r2/controllers/captcha.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -19,7 +19,7 @@
# All portions of the code written by CondeNet are Copyright (c) 2006-2009
# CondeNet, Inc. All Rights Reserved.
################################################################################
-from reddit_base import RedditController
+from digg_base import RedditController
import StringIO
import r2.lib.captcha as captcha
from pylons import c
12 r2/r2/controllers/embed.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -19,7 +19,7 @@
# All portions of the code written by CondeNet are Copyright (c) 2006-2009
# CondeNet, Inc. All Rights Reserved.
################################################################################
-from reddit_base import RedditController, proxyurl
+from digg_base import RedditController, proxyurl
from r2.lib.template_helpers import get_domain
from r2.lib.pages import Embed, BoringPage, HelpPage
from r2.lib.filters import websafe, SC_OFF, SC_ON
@@ -46,7 +46,7 @@ def rendercontent(self, input, fp):
edit_text = _('edit this page')
yes_you_can = _("yes, it's okay!")
read_first = _('just read this first.')
- url = "http://code.reddit.com/wiki" + websafe(fp) + "?action=edit"
+ url = "http://code.digg.com/wiki" + websafe(fp) + "?action=edit"
edittag = """
<div class="editlink">
@@ -67,9 +67,9 @@ def rendercontent(self, input, fp):
def renderurl(self):
- # Needed so http://reddit.com/help/ works
+ # Needed so http://digg.com/help/ works
fp = request.path.rstrip("/")
- u = "http://code.reddit.com/wiki" + fp + '?stripped=1'
+ u = "http://code.digg.com/wiki" + fp + '?stripped=1'
g.log.debug("Pulling %s for help" % u)
@@ -86,5 +86,5 @@ def renderurl(self):
def GET_blog(self):
return self.redirect("http://blog.%s/" %
- get_domain(cname = False, subreddit = False,
+ get_domain(cname = False, subdigg = False,
no_www = True))
20 r2/r2/controllers/error.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -31,8 +31,8 @@
try:
# place all r2 specific imports in here. If there is a code error, it'll get caught and
# the stack trace won't be presented to the user in production
- from reddit_base import RedditController
- from r2.models.subreddit import Default, Subreddit
+ from digg_base import RedditController
+ from r2.models.subdigg import Default, Subreddit
from r2.models.link import Link
from r2.lib import pages
from r2.lib.strings import strings, rand_strings
@@ -47,7 +47,7 @@
import os
os._exit(1)
-redditbroke = \
+diggbroke = \
'''<html>
<head>
<title>Reddit broke!</title>
@@ -56,7 +56,7 @@
<div style="margin: auto; text-align: center">
<p>
<a href="/">
- <img border="0" src="/static/youbrokeit.png" alt="you broke reddit" />
+ <img border="0" src="/static/youbrokeit.png" alt="you broke digg" />
</a>
</p>
<p>
@@ -117,9 +117,9 @@ def send404(self):
if 'usable_error_content' in request.environ:
return request.environ['usable_error_content']
if c.site._spam and not c.user_is_admin:
- message = (strings.banned_subreddit % dict(link = '/feedback'))
+ message = (strings.banned_subdigg % dict(link = '/feedback'))
- res = pages.RedditError(_('this reddit has been banned'),
+ res = pages.RedditError(_('this digg has been banned'),
unsafe(safemarkdown(message)))
return res.render()
else:
@@ -134,7 +134,7 @@ def GET_document(self):
srname = request.GET.get('srname', '')
takedown = request.GET.get('takedown', "")
if srname:
- c.site = Subreddit._by_name(srname)
+ c.site = Subdigg._by_name(srname)
if c.render_style not in self.allowed_render_styles:
return str(code)
elif takedown and code == '404':
@@ -143,7 +143,7 @@ def GET_document(self):
elif code == '403':
return self.send403()
elif code == '500':
- return redditbroke % rand_strings.sadmessages
+ return diggbroke % rand_strings.sadmessages
elif code == '503':
c.response.status_code = 503
c.response.headers['Retry-After'] = 1
@@ -177,7 +177,7 @@ def handle_awful_failure(fail_text):
import traceback
g.log.error("FULLPATH: %s" % fail_text)
g.log.error(traceback.format_exc())
- return redditbroke % fail_text
+ return diggbroke % fail_text
except:
# we are doomed. Admit defeat
return "This is an error that should never occur. You win."
8 r2/r2/controllers/errors.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -49,10 +49,10 @@
('BAD_NUMBER', _("that number isn't in the right range (%(min)d to %(max)d)")),
('BAD_BID', _("your bid must be at least $%(min)d per day and no more than to $%(max)d in total.")),
('ALREADY_SUB', _("that link has already been submitted")),
- ('SUBREDDIT_EXISTS', _('that reddit already exists')),
- ('SUBREDDIT_NOEXIST', _('that reddit doesn\'t exist')),
+ ('SUBREDDIT_EXISTS', _('that digg already exists')),
+ ('SUBREDDIT_NOEXIST', _('that digg doesn\'t exist')),
('SUBREDDIT_NOTALLOWED', _("you aren't allowed to post there.")),
- ('SUBREDDIT_REQUIRED', _('you must specify a reddit')),
+ ('SUBREDDIT_REQUIRED', _('you must specify a digg')),
('BAD_SR_NAME', _('that name isn\'t going to work')),
('RATELIMIT', _('you are trying to submit too fast. try again in %(time)s.')),
('EXPIRED', _('your session has expired')),
10 r2/r2/controllers/feedback.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -19,7 +19,7 @@
# All portions of the code written by CondeNet are Copyright (c) 2006-2009
# CondeNet, Inc. All Rights Reserved.
################################################################################
-from reddit_base import RedditController
+from digg_base import RedditController
from pylons import c, request
from pylons.i18n import _
from r2.lib.pages import FormPage, Feedback, Captcha, PaneStack, SelfServeBlurb
@@ -27,7 +27,7 @@
class FeedbackController(RedditController):
def GET_ad_inq(self):
- title = _("inquire about advertising on reddit")
+ title = _("inquire about advertising on digg")
return FormPage('advertise',
content = PaneStack([SelfServeBlurb(),
Feedback(title=title,
@@ -35,13 +35,13 @@ def GET_ad_inq(self):
loginbox = False).render()
def GET_feedback(self):
- title = _("send reddit feedback")
+ title = _("send digg feedback")
return FormPage('feedback',
content = Feedback(title=title, action='feedback'),
loginbox = False).render()
def GET_i18n(self):
- title = _("help translate reddit into your language")
+ title = _("help translate digg into your language")
return FormPage('help translate',
content = Feedback(title=title, action='i18n'),
loginbox = False).render()
80 r2/r2/controllers/front.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -21,7 +21,7 @@
################################################################################
from validator import *
from pylons.i18n import _, ungettext
-from reddit_base import RedditController, base_listing
+from digg_base import RedditController, base_listing
from r2 import config
from r2.models import *
from r2.lib.pages import *
@@ -35,7 +35,7 @@
from r2.lib.db.operators import desc
from r2.lib.db import queries
from r2.lib.strings import strings
-from r2.lib.solrsearch import RelatedSearchQuery, SubredditSearchQuery, LinkSearchQuery
+from r2.lib.solrsearch import RelatedSearchQuery, SubdiggSearchQuery, LinkSearchQuery
from r2.lib import jsontemplates
from r2.lib import sup
import r2.lib.db.thing as thing
@@ -190,7 +190,7 @@ def GET_comments(self, article, comment, context, sort, num_comments):
if comment and comment.link_id != article._id:
return self.abort404()
- sr = Subreddit._byID(article.sr_id, True)
+ sr = Subdigg._byID(article.sr_id, True)
if sr.name == g.takedown_sr:
request.environ['REDDIT_TAKEDOWN'] = article._fullname
@@ -277,11 +277,11 @@ def GET_prefs(self, location=''):
@validate(VUser(),
name = nop('name'))
- def GET_newreddit(self, name):
- """Create a reddit form"""
- title = _('create a reddit')
- content=CreateSubreddit(name = name or '')
- res = FormPage(_("create a reddit"),
+ def GET_newdigg(self, name):
+ """Create a digg form"""
+ title = _('create a digg')
+ content=CreateSubdigg(name = name or '')
+ res = FormPage(_("create a digg"),
content = content,
).render()
return res
@@ -299,19 +299,19 @@ def GET_stylesheet(self):
@validate(location = nop('location'),
created = VOneOf('created', ('true','false'),
default = 'false'))
- def GET_editreddit(self, location, num, after, reverse, count, created):
- """Edit reddit form."""
- if isinstance(c.site, FakeSubreddit):
+ def GET_editdigg(self, location, num, after, reverse, count, created):
+ """Edit digg form."""
+ if isinstance(c.site, FakeSubdigg):
return self.abort404()
- # moderator is either reddit's moderator or an admin
+ # moderator is either digg's moderator or an admin
is_moderator = c.user_is_loggedin and c.site.is_moderator(c.user) or c.user_is_admin
if is_moderator and location == 'edit':
pane = PaneStack()
if created == 'true':
- pane.append(InfoBar(message = _('your reddit has been created')))
- pane.append(CreateSubreddit(site = c.site))
+ pane.append(InfoBar(message = _('your digg has been created')))
+ pane.append(CreateSubdigg(site = c.site))
elif location == 'moderators':
pane = ModList(editable = is_moderator)
elif is_moderator and location == 'banned':
@@ -327,7 +327,7 @@ def GET_editreddit(self, location, num, after, reverse, count, created):
stylesheet_contents = c.site.stylesheet_contents
else:
stylesheet_contents = ''
- pane = SubredditStylesheet(site = c.site,
+ pane = SubdiggStylesheet(site = c.site,
stylesheet_contents = stylesheet_contents)
elif location in ('reports', 'spam') and is_moderator:
query = (c.site.get_reported() if location == 'reports'
@@ -403,14 +403,14 @@ def GET_duplicates(self, article, num, after, reverse, count):
@base_listing
@validate(query = nop('q'))
- def GET_search_reddits(self, query, reverse, after, count, num):
- """Search reddits by title and description."""
- q = SubredditSearchQuery(query)
+ def GET_search_diggs(self, query, reverse, after, count, num):
+ """Search diggs by title and description."""
+ q = SubdiggSearchQuery(query)
num, t, spane = self._search(q, num = num, reverse = reverse,
after = after, count = count)
- res = SubredditsPage(content=spane,
+ res = SubdiggsPage(content=spane,
prev_search = query,
elapsed_time = t,
num_results = num,
@@ -435,29 +435,29 @@ def GET_search(self, query, num, time, reverse, after, count, langs, sort):
else:
langs = c.content_langs
- subreddits = None
+ subdiggs = None
authors = None
- if c.site == subreddit.Friends and c.user_is_loggedin and c.user.friends:
+ if c.site == subdigg.Friends and c.user_is_loggedin and c.user.friends:
authors = c.user.friends
elif isinstance(c.site, MultiReddit):
- subreddits = c.site.sr_ids
- elif not isinstance(c.site, FakeSubreddit):
- subreddits = [c.site._id]
+ subdiggs = c.site.sr_ids
+ elif not isinstance(c.site, FakeSubdigg):
+ subdiggs = [c.site._id]
q = LinkSearchQuery(q = query, timerange = time, langs = langs,
- subreddits = subreddits, authors = authors,
+ subdiggs = subreddits, authors = authors,
sort = SearchSortMenu.operator(sort))
num, t, spane = self._search(q, num = num, after = after, reverse = reverse,
count = count)
- if not isinstance(c.site,FakeSubreddit) and not c.cname:
- all_reddits_link = "%s/search%s" % (subreddit.All.path,
+ if not isinstance(c.site,FakeSubdigg) and not c.cname:
+ all_diggs_link = "%s/search%s" % (subreddit.All.path,
query_string({'q': query}))
- d = {'reddit_name': c.site.name,
- 'reddit_link': "http://%s/"%get_domain(cname = c.cname),
- 'all_reddits_link': all_reddits_link}
- infotext = strings.searching_a_reddit % d
+ d = {'digg_name': c.site.name,
+ 'digg_link': "http://%s/"%get_domain(cname = c.cname),
+ 'all_diggs_link': all_reddits_link}
+ infotext = strings.searching_a_digg % d
else:
infotext = None
@@ -570,14 +570,14 @@ def GET_submit(self, url, title, then):
return res
captcha = Captcha() if c.user.needs_captcha() else None
- sr_names = (Subreddit.submit_sr_names(c.user) or
- Subreddit.submit_sr_names(None))
+ sr_names = (Subdigg.submit_sr_names(c.user) or
+ Subdigg.submit_sr_names(None))
return FormPage(_("submit"),
content=NewLink(url=url or '',
title=title or '',
- subreddits = sr_names,
+ subdiggs = sr_names,
captcha=captcha,
then = then)).render()
@@ -613,14 +613,14 @@ def GET_frame(self):
puts the proper url as the frame source"""
sub_domain = request.environ.get('sub_domain')
original_path = request.environ.get('original_path')
- sr = Subreddit._by_domain(sub_domain)
+ sr = Subdigg._by_domain(sub_domain)
return Cnameframe(original_path, sr, sub_domain).render()
def GET_framebuster(self, what = None, blah = None):
"""
renders the contents of the iframe which, on a cname, checks
- if the user is currently logged into reddit.
+ if the user is currently logged into digg.
if this page is hit from the primary domain, redirects to the
cnamed domain version of the site. If the user is logged in,
@@ -641,7 +641,7 @@ def GET_framebuster(self, what = None, blah = None):
if c.user_is_loggedin:
path += "login/"
u = UrlParser(path + str(random.random()))
- u.mk_cname(require_frame = False, subreddit = c.site,
+ u.mk_cname(require_frame = False, subdigg = c.site,
port = request.port)
return self.redirect(u.unparse())
# the user is not logged in or there is no cname.
@@ -684,5 +684,5 @@ def GET_site_traffic(self):
content = RedditTraffic()).render()
- def GET_ad(self, reddit = None):
- return Dart_Ad(reddit).render(style="html")
+ def GET_ad(self, digg = None):
+ return Dart_Ad(digg).render(style="html")
2  r2/r2/controllers/health.py
View
@@ -5,7 +5,7 @@
from pylons.controllers.util import abort
from pylons import c, g
-from reddit_base import RedditController
+from digg_base import RedditController
from r2.lib.utils import worker
class HealthController(RedditController):
8 r2/r2/controllers/i18n.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -20,7 +20,7 @@
# CondeNet, Inc. All Rights Reserved.
################################################################################
from pylons import request, g
-from reddit_base import RedditController
+from digg_base import RedditController
from r2.lib.pages import UnfoundPage, AdminTranslations, AdminPage
from r2.lib.translation import Translator, TranslatorTemplate, get_translator
@@ -60,7 +60,7 @@ def POST_adduser(self, lang, a):
VAdmin())
def GET_list(self):
res = AdminPage(content = AdminTranslations(),
- title = 'translate reddit').render()
+ title = 'translate digg').render()
return res
@@ -85,7 +85,7 @@ def GET_edit(self, lang):
else:
content = UnfoundPage()
res = AdminPage(content = content,
- title = 'translate reddit').render()
+ title = 'translate digg').render()
return res
@validate(VTranslationEnabled(),
46 r2/r2/controllers/listingcontroller.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -19,7 +19,7 @@
# All portions of the code written by CondeNet are Copyright (c) 2006-2009
# CondeNet, Inc. All Rights Reserved.
################################################################################
-from reddit_base import RedditController, base_listing
+from digg_base import RedditController, base_listing
from validator import *
from r2.models import *
@@ -65,7 +65,7 @@ class ListingController(RedditController):
# page title
title_text = ''
- # login box, subreddit box, submit box, etc, visible
+ # login box, subdigg box, submit box, etc, visible
show_sidebar = True
# class (probably a subclass of Reddit) to use to render the page.
@@ -222,11 +222,11 @@ def query(self):
self.fix_listing = False
if c.site == Default:
- sr_ids = Subreddit.user_subreddits(c.user)
+ sr_ids = Subdigg.user_subreddits(c.user)
return normalized_hot(sr_ids)
#if not using the query_cache we still want cached front pages
elif (not g.use_query_cache
- and not isinstance(c.site, FakeSubreddit)
+ and not isinstance(c.site, FakeSubdigg)
and self.after is None
and self.count == 0):
return [l._fullname for l in get_hot(c.site)]
@@ -289,7 +289,7 @@ def keep(item):
if item.promoted is not None:
return False
elif c.user_is_loggedin and (c.user_is_admin or
- item.subreddit.is_moderator(c.user)):
+ item.subdigg.is_moderator(c.user)):
# let admins and moderators see them regardless
return wouldkeep
elif wouldkeep and c.user_is_loggedin and c.user._id == item.author_id:
@@ -537,33 +537,33 @@ def GET_compose(self, to, subject, message, success):
return MessagePage(content = content).render()
class RedditsController(ListingController):
- render_cls = SubredditsPage
+ render_cls = SubdiggsPage
def title(self):
- return _('reddits')
+ return _('diggs')
def query(self):
if self.where == 'banned' and c.user_is_admin:
- reddits = Subreddit._query(Subreddit.c._spam == True,
+ diggs = Subreddit._query(Subreddit.c._spam == True,
sort = desc('_date'))
else:
- reddits = Subreddit._query()
+ diggs = Subreddit._query()
if self.where == 'new':
- reddits._sort = desc('_date')
+ diggs._sort = desc('_date')
else:
- reddits._sort = desc('_downs')
+ diggs._sort = desc('_downs')
if c.content_langs != 'all':
- reddits._filter(Subreddit.c.lang == c.content_langs)
+ diggs._filter(Subreddit.c.lang == c.content_langs)
if not c.over18:
- reddits._filter(Subreddit.c.over_18 == False)
+ diggs._filter(Subreddit.c.over_18 == False)
- return reddits
+ return diggs
def GET_listing(self, where, **env):
self.where = where
return ListingController.GET_listing(self, **env)
-class MyredditsController(ListingController):
- render_cls = MySubredditsPage
+class MydiggsController(ListingController):
+ render_cls = MySubdiggsPage
@property
def menus(self):
@@ -571,25 +571,25 @@ def menus(self):
NavButton(plurals.contributor, 'contributor'),
NavButton(plurals.moderator, 'moderator'))
- return [NavMenu(buttons, base_path = '/reddits/mine/', default = 'subscriber', type = "flatlist")]
+ return [NavMenu(buttons, base_path = '/diggs/mine/', default = 'subscriber', type = "flatlist")]
def title(self):
- return _('reddits: ') + self.where
+ return _('diggs: ') + self.where
def query(self):
- reddits = SRMember._query(SRMember.c._name == self.where,
+ diggs = SRMember._query(SRMember.c._name == self.where,
SRMember.c._thing2_id == c.user._id,
#hack to prevent the query from
#adding it's own date
sort = (desc('_t1_ups'), desc('_t1_date')),
eager_load = True,
thing_data = True)
- reddits.prewrap_fn = lambda x: x._thing1
- return reddits
+ diggs.prewrap_fn = lambda x: x._thing1
+ return diggs
def content(self):
user = c.user if c.user_is_loggedin else None
- num_subscriptions = len(Subreddit.reverse_subscriber_ids(user))
+ num_subscriptions = len(Subdigg.reverse_subscriber_ids(user))
if self.where == 'subscriber' and num_subscriptions == 0:
message = strings.sr_messages['empty']
else:
4 r2/r2/controllers/mediaembed.py
View
@@ -1,7 +1,7 @@
# The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
-# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
+# http://code.digg.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, but Sections 14 and 15 have been added to cover use of
# software over a computer network and provide for limited attribution for the
# Original Developer. In addition, Exhibit A has been modified to be consistent
@@ -20,7 +20,7 @@
# CondeNet, Inc. All Rights Reserved.
################################################################################
from validator import *
-from reddit_base import RedditController
+from digg_base import RedditController
from r2.lib.scraper import scrapers
from r2.lib.pages import MediaEmbedBody