View Single Post
  #4  
Old 09-16-2010, 05:56 PM
SeToY SeToY is offline
 
Join Date: Dec 2009
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Me2, this happens for me nevertheless i changed the lines.

My projectpost.php:
PHP Code:
<?php
[...]

        
$optgroup_options '';
        foreach (
array_keys($projectinfo['types']) AS $type)
        {
            
// Check we can both view and post the target issue type
            
if (!($project_perms["$projectid"]["$type"]['generalpermissions'] & $vbulletin->pt_bitfields['general']['canview']) OR !($project_perms["$projectid"]["$type"]['postpermissions'] & $vbulletin->pt_bitfields['post']['canpostnew']))
            {
                continue;
            }
            
$optionvalue $projectinfo['projectid'] . '-' $type;
            
$optiontitle $vbphrase["issuetype_{$type}_singular"];
            
$optionselected = (($issue['issuetypeid'] == $type AND $issue['projectid'] == $projectid) ? ' selected="selected"' '');
            
$optgroup_options .= render_option_template($optiontitle$optionvalue$optionselected$optionclass);
        }

        if (empty(
$optgroup_options))
        {
            continue;
        }

        
$optgroup_label $projectinfo['title'];
        
$templater vB_Template::create('optgroup');
            
$templater->register('optgroup_extra'$optgroup_extra);
            
$templater->register('optgroup_label'$optgroup_label);
            
$templater->register('optgroup_options'$optgroup_options);
        
$project_type_select .= $templater->render();
    }

    
$navbits = array(
        
'project.php' $vbulletin->session->vars['sessionurl_q'] => $vbphrase['projects'],
        
"project.php?" $vbulletin->session->vars['sessionurl'] . "projectid=$project[projectid]=> $project['title_clean'],
        
'project.php?' $vbulletin->session->vars['sessionurl'] . "issueid=$issue[issueid]=> $issue['title'],
        
'' => $vbphrase['edit_issue']
    );

    
$navbits construct_navbits($navbits);
    
$navbar render_navbar_template($navbits);

    
$templater vB_Template::create('pt_move_issue');
        
$templater->register_page_templates();
        
$templater->register('issue'$issue);
        
$templater->register('navbar'$navbar);
        
$templater->register('project'$project);
        
$templater->register('project_type_select'$project_type_select);
    
print_output($templater->render());

}

//require_once(DIR . '/includes/functions_ptimporter.php');
//$threadinfo = verify_id('thread', $threadid, 1, 1);

if (in_array($_REQUEST['do'], array('processimportthread''importthread''importthread2')))
{
    require_once(
DIR '/includes/functions_ptimporter.php');
    
$threadinfo verify_id('thread'$threadid11);


// #######################################################################
if ($_POST['do'] == 'processimportthread')
{
    
$vbulletin->input->clean_array_gpc('p', array(
        
'projectid' => TYPE_UINT,
        
'issuetypeid' => TYPE_NOHTML,
        
'title' => TYPE_NOHTML,
        
'summary' => TYPE_NOHTML,
        
'priority' => TYPE_UINT,
        
'projectcategoryid' => TYPE_UINT,
        
'appliesversionid' => TYPE_UINT,
        
'addressedversionid' => TYPE_INT,
        
'issuestatusid' => TYPE_UINT,
        
'milestoneid' => TYPE_UINT
    
));

    
// Do our own checking to make sure we have all permissions needed to create issues
    
$project ptimporter_verify_issuetypeid($vbulletin->GPC['issuetypeid'], $vbulletin->GPC['projectid']);
    
$posting_perms ptimporter_prepare_issue_posting_pemissions($project['projectid'], $vbulletin->GPC['issuetypeid']);
    
    
// Make sure the new issue status is valid
    
ptimporter_verify_issuestatusid($vbulletin->GPC['issuestatusid'], $vbulletin->GPC['issuetypeid']);

    
// Finally, run the import
    
require_once(DIR '/includes/class_ptimporter.php');
    
    
$importer = new vB_PtImporter($vbulletin$threadinfo$project$posting_perms, array(), array());
    
$issueid $importer->import_all();

    
$vbulletin->url 'project.php?' $vbulletin->session->vars['sessionurl'] . "issueid=$issueid";
    eval(
print_standard_redirect('pt_issue_inserted'));
}

// #######################################################################
if ($_REQUEST['do'] == 'importthread2')
{
    
$vbulletin->input->clean_array_gpc('r', array(
        
'project-issuetype' => TYPE_NOHTML
    
));

    list(
$projectid$issuetypeid) = explode('-'$vbulletin->GPC['project-issuetype']);

    
$project verify_project($projectid);
    
$posting_perms ptimporter_prepare_issue_posting_pemissions($project['projectid'], $issuetypeid);

    
verify_issuetypeid($issuetypeid$project['projectid']);

    
$issuetype $vbphrase["issuetype_{$issuetypeid}_singular"];

    
$issueperms fetch_project_permissions($vbulletin->userinfo$project['projectid'], $issuetypeid);

    
// Check we can both view and post the target issue type
    
if (!($issueperms['generalpermissions'] & $vbulletin->pt_bitfields['general']['canview']) OR !($issueperms['postpermissions'] & $vbulletin->pt_bitfields['post']['canpostnew']))
    {
        
print_no_permission();
    }

[...]
?>
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01424 seconds
  • Memory Usage 1,871KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete