-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,9 +180,9 @@ | |
(def author (u i) (is u i!by)) | ||
|
||
|
||
(= stories* nil ranked-stories* nil comments* nil | ||
items* (table) url->story* (table) | ||
maxid* 0 initload* 15000) | ||
(or= stories* nil ranked-stories* nil comments* nil | ||
items* (table) url->story* (table) | ||
maxid* 0 initload* 15000) | ||
|
||
; The dir expression yields stories in order of file creation time | ||
; (because arc infile truncates), so could just rev the list instead of | ||
|
@@ -233,7 +233,7 @@ | |
(def register-url (i url) | ||
(= (url->story* (canonical-url url)) i!id)) | ||
|
||
(= stemmable-sites* (table)) | ||
(or= stemmable-sites* (table)) | ||
|
||
(def canonical-url (url) | ||
(if (stemmable-sites* (sitename url)) | ||
|
@@ -268,7 +268,7 @@ | |
(set i!dead) | ||
(save-item i))) | ||
|
||
(= kill-log* nil) | ||
(or= kill-log* nil) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
shawwn
Author
Member
|
||
|
||
(def log-kill (i how) | ||
(push (list i!id how) kill-log*)) | ||
|
@@ -416,7 +416,7 @@ | |
background-color: #" (hexrep (main-color user)) ";" | ||
"}")))) | ||
|
||
(= pagefns* nil) | ||
(or= pagefns* nil) | ||
|
||
; page top | ||
|
||
|
@@ -573,7 +573,7 @@ | |
(newslog ip user ',name ,@parms) | ||
,@body))))) | ||
|
||
(= newsop-names* nil) | ||
(or= newsop-names* nil) | ||
|
||
(mac newsop args | ||
`(do (pushnew ',(car args) newsop-names*) | ||
|
@@ -1051,7 +1051,7 @@ | |
|
||
(= user-changetime* 120 editor-changetime* 1440) | ||
|
||
(= everchange* (table) noedit* (table)) | ||
(or= everchange* (table) noedit* (table)) | ||
|
||
(def canedit (user i) | ||
(or (admin user) | ||
|
@@ -1685,7 +1685,7 @@ | |
(do (note-baditem user ip) | ||
(pr "No such item."))))) | ||
|
||
(= baditemreqs* (table) baditem-threshold* 1/100) | ||
(or= baditemreqs* (table) baditem-threshold* 1/100) | ||
|
||
; Something looking at a lot of deleted items is probably the bad sort | ||
; of crawler. Throttle it for this server invocation. | ||
|
@@ -1730,7 +1730,7 @@ | |
(mem 'commentable i!keys)))) | ||
|
||
|
||
(= displayfn* (table)) | ||
(or= displayfn* (table)) | ||
|
||
(= (displayfn* 'story) (fn (n i user here inlist) | ||
(display-story n i user here))) | ||
|
@@ -1773,7 +1773,7 @@ | |
|
||
(def editable-type (i) (fieldfn* i!type)) | ||
|
||
(= fieldfn* (table)) | ||
(or= fieldfn* (table)) | ||
|
||
(= (fieldfn* 'story) | ||
(fn (user s) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
; by [email protected] | ||
|
||
(= declare-fns* (table)) | ||
(or= declare-fns* (table)) | ||
|
||
(defs decl-idfn (old new args) new | ||
decl-bool (old new args) (no:no new)) | ||
|
Hmm, this is a very ironic thing to see. If some of the global state values are actually going to be legitimate empty lists, it seems like a bad idea to use
or=
to decide whether to set them. Then again, setting them to another empty list doesn't cause a problem; this would only be a problem if the default value were a non-empty list and it could legitimately become empty later.