Index: trunk/extensions/EditOwn/EditOwn.php |
— | — | @@ -62,6 +62,14 @@ |
63 | 63 | $result = $cache[$user->getName()][$title->getArticleId()]; |
64 | 64 | return is_null($result); |
65 | 65 | } |
| 66 | + |
| 67 | + if(!$title->exists()) |
| 68 | + { |
| 69 | + // Creation is allowed |
| 70 | + $cache[$user->getName()][$title->getArticleId()] = null; |
| 71 | + $result = null; |
| 72 | + return true; |
| 73 | + } |
66 | 74 | |
67 | 75 | // Since there's no easy way to get the first revision, |
68 | 76 | // we'll just do a DB query |
— | — | @@ -73,7 +81,7 @@ |
74 | 82 | $row = $dbr->fetchObject($res); |
75 | 83 | if(!$row) |
76 | 84 | { |
77 | | - // Nonexistent title? Creation is allowed |
| 85 | + // Title with no revs, weird... allow creation |
78 | 86 | $cache[$user->getName()][$title->getArticleId()] = null; |
79 | 87 | $result = null; |
80 | 88 | return true; |