switch ($ci_content_type) {
                case 'Post':
                case 'Thread':
                    $ci_content = fetch_postinfo($ci_urls_data[$key]['contentid']);
                    $ci_manager =& datamanager_init($ci_content_type, $vbulletin, ERRTYPE_STANDARD, 'threadpost');
                    $ci_manager->set_existing($ci_content);
                    $ci_manager->set('pagetext', ci_replace_img_tag($ci_content['pagetext'], $ci_urls_data[$key]['url'], $url_data['size']));
                    $ci_manager->save();
                    break;
                case 'SocialGroupMessage':
                case 'SocialGroupDiscussion':
                    $ci_content = fetch_groupmessageinfo($ci_urls_data[$key]['contentid']);
                    $ci_manager =& datamanager_init('GroupMessage', $vbulletin);
                    $ci_manager->set_existing($ci_content);
                    $ci_manager->set('pagetext', ci_replace_img_tag($ci_content['pagetext'], $ci_urls_data[$key]['url'], $url_data['size']));
                    $ci_manager->save();
                    break;
                case 'BlogEntry':
                case 'BlogComment':
                    $ci_content = fetch_blog_textinfo($ci_urls_data[$key]['contentid']);
                    $ci_manager =& datamanager_init('BlogText', $vbulletin, ERRTYPE_STANDARD, 'blog');
                    $ci_manager->set_existing($ci_content);
                    $ci_manager->set('pagetext', ci_replace_img_tag($ci_content['pagetext'], $ci_urls_data[$key]['url'], $url_data['size']));
                    $ci_manager->save();
                    break;
            }
        }
        $vbulletin->db->query_write("\n          UPDATE " . TABLE_PREFIX . "rcd_imagequeue\n             SET attempts = {$ci_url_check_attempts},\n                 nextcheck = {$ci_next_check},\n                 status = '{$ci_url_queue_status}'\n           WHERE imagequeueid = {$key}\n       ");
    }
}
log_cron_action('', $nextitem, 1);
Ejemplo n.º 2
0
    }
    ($hook = vBulletinHook::fetch_hook('blog_random_query')) ? eval($hook) : false;
    $blog = $db->query_first_slave("\r\n\t\tSELECT *\r\n\t\tFROM " . TABLE_PREFIX . "blog AS blog\r\n\t\t" . (!empty($sql1join) ? implode("\r\n", $sql1join) : "") . "\r\n\t\tWHERE " . implode("\r\nAND ", $sql) . "\r\n\t\tORDER BY RAND() LIMIT 1\r\n\t");
    if ($blog) {
        exec_header_redirect(fetch_seo_url('entry|js', $blog));
    } else {
        standard_error(fetch_error('blog_no_blogs'));
    }
}
// #######################################################################
if ($_REQUEST['do'] == 'viewip') {
    if (!$vbulletin->options['logip'] or !can_moderate_blog('canviewips') and $vbulletin->options['logip'] != 2) {
        print_no_permission();
    }
    if ($blogtextid) {
        $blogtextinfo = fetch_blog_textinfo($vbulletin->GPC['blogtextid']);
        if ($blogtextinfo === false) {
            standard_error(fetch_error('invalidid', $vbphrase['comment'], $vbulletin->options['contactuslink']));
        }
        $ipaddress = $blogtextinfo['ipaddress'] ? htmlspecialchars_uni(long2ip($blogtextinfo['ipaddress'])) : '';
    } else {
        $bloginfo = verify_blog($blogid);
        $ipaddress = $bloginfo['blogipaddress'] ? htmlspecialchars_uni(long2ip($bloginfo['blogipaddress'])) : '';
    }
    $hostname = htmlspecialchars_uni(gethostbyaddr($ipaddress));
    ($hook = vBulletinHook::fetch_hook('blog_viewip_complete')) ? eval($hook) : false;
    standard_error(fetch_error('thread_displayip', $ipaddress, $hostname, '', 0));
}
// #######################################################################
if ($_REQUEST['do'] == 'markread') {
    $vbulletin->input->clean_array_gpc('r', array('userid' => TYPE_UINT, 'readhash' => TYPE_STR));