summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/File.php2
-rw-r--r--classes/Notice.php21
-rw-r--r--classes/statusnet.ini1
3 files changed, 23 insertions, 1 deletions
diff --git a/classes/File.php b/classes/File.php
index 6dd9e0c06..ee418a802 100644
--- a/classes/File.php
+++ b/classes/File.php
@@ -181,7 +181,7 @@ class File extends Memcached_DataObject
*/
static function validFilename($filename)
{
- return preg_match('^/[A-Za-z0-9._-]+$/', $filename);
+ return preg_match('/^[A-Za-z0-9._-]+$/', $filename);
}
/**
diff --git a/classes/Notice.php b/classes/Notice.php
index 42878d94f..f9f386357 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -1468,4 +1468,25 @@ class Notice extends Memcached_DataObject
$handler->handle($this);
}
}
+
+ function insert()
+ {
+ $result = parent::insert();
+
+ if ($result) {
+ // Profile::hasRepeated() abuses pkeyGet(), so we
+ // have to clear manually
+ if (!empty($this->repeat_of)) {
+ $c = self::memcache();
+ if (!empty($c)) {
+ $ck = self::multicacheKey('Notice',
+ array('profile_id' => $this->profile_id,
+ 'repeat_of' => $this->repeat_of));
+ $c->delete($ck);
+ }
+ }
+ }
+
+ return $result;
+ }
}
diff --git a/classes/statusnet.ini b/classes/statusnet.ini
index 6203650a6..e28424ce2 100644
--- a/classes/statusnet.ini
+++ b/classes/statusnet.ini
@@ -585,6 +585,7 @@ modified = 384
[user_group__keys]
id = N
+nickname = U
[user_openid]
canonical = 130