Merge branch 'master' of https://github.com/dae/anki
This commit is contained in:
commit
5be945ec05
@ -28,6 +28,6 @@ if arch[1] == "ELF":
|
||||
sys.path.insert(0, os.path.join(ext, "py2.%d-%s" % (
|
||||
sys.version_info[1], arch[0][0:2])))
|
||||
|
||||
version="2.0.14" # build scripts grep this line, so preserve formatting
|
||||
version="2.0.15" # build scripts grep this line, so preserve formatting
|
||||
from anki.storage import Collection
|
||||
__all__ = ["Collection"]
|
||||
|
@ -23,6 +23,7 @@ class Finder(object):
|
||||
deck=self._findDeck,
|
||||
mid=self._findMid,
|
||||
nid=self._findNids,
|
||||
cid=self._findCids,
|
||||
note=self._findModel,
|
||||
prop=self._findProp,
|
||||
rated=self._findRated,
|
||||
@ -335,6 +336,11 @@ select distinct(n.id) from cards c, notes n where c.nid=n.id and """+preds
|
||||
return
|
||||
return "n.id in (%s)" % val
|
||||
|
||||
def _findCids(self, (val, args)):
|
||||
if re.search("[^0-9,]", val):
|
||||
return
|
||||
return "c.id in (%s)" % val
|
||||
|
||||
def _findMid(self, (val, args)):
|
||||
if re.search("[^0-9]", val):
|
||||
return
|
||||
|
@ -896,7 +896,7 @@ Difference to correct time: %s.""") % diffText
|
||||
", ".join([customRepr(x) for x in args]))
|
||||
lpath = re.sub("\.anki2$", ".log", self.pm.collectionPath())
|
||||
open(lpath, "ab").write(buf.encode("utf8") + "\n")
|
||||
if os.environ.get("LOG"):
|
||||
if os.environ.get("ANKIDEV"):
|
||||
print buf
|
||||
|
||||
# Schema modifications
|
||||
|
Loading…
Reference in New Issue
Block a user