mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 05:37:32 +02:00
Increase speed of forum-attachment processing.
This commit is contained in:
@@ -1311,8 +1311,9 @@ function getperms($arg, $ap = ADMINPERMS)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @DEPRECATED
|
||||||
* Get the user data from user and user_extended tables
|
* Get the user data from user and user_extended tables
|
||||||
* SO MUCH DEPRECATED!
|
* SO MUCH DEPRECATED! Use e107::user($uid);
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
|
@@ -786,7 +786,7 @@ class e107forum
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$tmp = get_user_data($uid);
|
$tmp = e107::user($uid);
|
||||||
$viewed = $tmp['user_plugin_forum_viewed'];
|
$viewed = $tmp['user_plugin_forum_viewed'];
|
||||||
unset($tmp);
|
unset($tmp);
|
||||||
}
|
}
|
||||||
|
@@ -1140,6 +1140,9 @@ function step10()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attachments
|
||||||
|
*/
|
||||||
function step10_ajax()//TODO
|
function step10_ajax()//TODO
|
||||||
{
|
{
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
@@ -1150,7 +1153,7 @@ function step10_ajax()//TODO
|
|||||||
$qry = "
|
$qry = "
|
||||||
SELECT post_id, post_thread, post_entry, post_user FROM `#forum_post`
|
SELECT post_id, post_thread, post_entry, post_user FROM `#forum_post`
|
||||||
WHERE post_entry REGEXP '_[[:digit:]]+_FT'
|
WHERE post_entry REGEXP '_[[:digit:]]+_FT'
|
||||||
AND post_id > {$lastPost} LIMIT 1
|
AND post_id > {$lastPost} LIMIT 200
|
||||||
";
|
";
|
||||||
|
|
||||||
if ($sql->gen($qry))
|
if ($sql->gen($qry))
|
||||||
@@ -1314,7 +1317,7 @@ function step10_ajax()//TODO
|
|||||||
{
|
{
|
||||||
$info['WHERE'] = 'post_id = ' . $post['post_id'];
|
$info['WHERE'] = 'post_id = ' . $post['post_id'];
|
||||||
$info['post_attachments'] = e107::getArrayStorage()->write($newValues);
|
$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");
|
$sql->update('forum_post',"post_entry = \"".$info['post_entry']."\", post_attachments=\"".$info['post_attachments']."\" WHERE post_id = ".$post['post_id']." LIMIT 1");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user