1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

Increase speed of forum-attachment processing.

This commit is contained in:
Cameron
2013-03-31 04:23:11 -07:00
parent 52d57adef5
commit 6becda09d4
3 changed files with 8 additions and 4 deletions

View File

@@ -1311,8 +1311,9 @@ function getperms($arg, $ap = ADMINPERMS)
}
/**
* @DEPRECATED
* Get the user data from user and user_extended tables
* SO MUCH DEPRECATED!
* SO MUCH DEPRECATED! Use e107::user($uid);
*
*
* @return array

View File

@@ -786,7 +786,7 @@ class e107forum
}
else
{
$tmp = get_user_data($uid);
$tmp = e107::user($uid);
$viewed = $tmp['user_plugin_forum_viewed'];
unset($tmp);
}

View File

@@ -1140,6 +1140,9 @@ function step10()
}
/**
* Attachments
*/
function step10_ajax()//TODO
{
$sql = e107::getDb();
@@ -1150,7 +1153,7 @@ function step10_ajax()//TODO
$qry = "
SELECT post_id, post_thread, post_entry, post_user FROM `#forum_post`
WHERE post_entry REGEXP '_[[:digit:]]+_FT'
AND post_id > {$lastPost} LIMIT 1
AND post_id > {$lastPost} LIMIT 200
";
if ($sql->gen($qry))
@@ -1314,7 +1317,7 @@ function step10_ajax()//TODO
{
$info['WHERE'] = 'post_id = ' . $post['post_id'];
$info['post_attachments'] = e107::getArrayStorage()->write($newValues);
// $sql->update('forum_post', $info); // XXX screwed up due to Fields-defs.
// $sql->update('forum_post', $info); // XXX FIXME TODO screwed up due to _FIELD_DEFS
$sql->update('forum_post',"post_entry = \"".$info['post_entry']."\", post_attachments=\"".$info['post_attachments']."\" WHERE post_id = ".$post['post_id']." LIMIT 1");
}