Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -250,8 +250,9 @@ class _Phpbb extends \IPS\convert\Software
|
||||
foreach( $this->fetch( 'topics', 'topic_id' ) AS $row )
|
||||
{
|
||||
$poll = NULL;
|
||||
|
||||
if ( $row['poll_title'] )
|
||||
$pollTitle = str_ireplace( array( '<t>', '</t>' ), '', $row['poll_title'] );
|
||||
|
||||
if ( $pollTitle )
|
||||
{
|
||||
$poll = array();
|
||||
|
||||
@@ -261,16 +262,16 @@ class _Phpbb extends \IPS\convert\Software
|
||||
$search = array(); # make sure we actually assign the vote correctly
|
||||
foreach( $this->db->select( '*', 'poll_options', array( "topic_id=?", $row['topic_id'] ) ) AS $choice )
|
||||
{
|
||||
$choices[$index] = $choice['poll_option_text'];
|
||||
$votes[$index] = $choice['poll_option_total'];
|
||||
$search[$index] = $choice['poll_option_id'];
|
||||
$choices[ $index ] = str_ireplace( array( '<t>', '</t>' ), '', $choice['poll_option_text'] );
|
||||
$votes[ $index ] = $choice['poll_option_total'];
|
||||
$search[ $index ] = $choice['poll_option_id'];
|
||||
$index++;
|
||||
}
|
||||
|
||||
$poll['poll_data'] = array(
|
||||
'pid' => $row['topic_id'],
|
||||
'choices' => array( 1 => array(
|
||||
'question' => $row['poll_title'],
|
||||
'question' => $pollTitle,
|
||||
'multi' => ( $row['poll_max_options'] > 1 ) ? 1 : 0,
|
||||
'choice' => $choices,
|
||||
'votes' => $votes,
|
||||
@@ -291,13 +292,13 @@ class _Phpbb extends \IPS\convert\Software
|
||||
$ourVotes[$vote['vote_user_id']] = array( 'votes' => array() );
|
||||
}
|
||||
|
||||
$ourVotes[$vote['vote_user_id']]['votes'][] = array_search( $vote['poll_option_id'], $search );
|
||||
$ourVotes[$vote['vote_user_id']]['member_id'] = $vote['vote_user_id'];
|
||||
$ourVotes[ $vote['vote_user_id'] ]['votes'][] = array_search( $vote['poll_option_id'], $search );
|
||||
$ourVotes[ $vote['vote_user_id'] ]['member_id'] = $vote['vote_user_id'];
|
||||
}
|
||||
|
||||
foreach( $ourVotes AS $member_id => $vote )
|
||||
{
|
||||
$poll['vote_data'][$member_id] = array(
|
||||
$poll['vote_data'][ $member_id ] = array(
|
||||
'member_id' => $vote['member_id'],
|
||||
'member_choices' => array( 1 => $vote['votes'] ),
|
||||
);
|
||||
@@ -552,6 +553,19 @@ class _Phpbb extends \IPS\convert\Software
|
||||
$types = array( 'forums', 'forums_forums' );
|
||||
$oldId = \IPS\Request::i()->f;
|
||||
}
|
||||
elseif( mb_strpos( $url->data[ \IPS\Http\Url::COMPONENT_PATH ], 'download/file.php' ) !== FALSE )
|
||||
{
|
||||
try
|
||||
{
|
||||
$data = (string) $this->app->getLink( \IPS\Request::i()->id, array( 'attachments', 'core_attachments' ) );
|
||||
|
||||
return \IPS\Http\Url::external( \IPS\Settings::i()->base_url . 'applications/core/interface/file/attachment.php' )->setQueryString( 'id', $data );
|
||||
}
|
||||
catch( \Exception $e )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if( isset( $class ) )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user