@@ -315,7 +315,7 @@ private function fill_forums()
315315 'topic_title ' => qi::lang ('TEST_TOPIC_TITLE ' , $ topic_cnt ),
316316 );
317317
318- if (qi::phpbb_branch ('31 ' ))
318+ if (qi::phpbb_branch ('3.1 ' ))
319319 {
320320 $ topic_arr ['topic_posts_approved ' ] = 1 ;
321321
@@ -361,10 +361,10 @@ private function fill_forums()
361361 'post_text ' => $ post_text ,
362362 'post_checksum ' => md5 ($ post_text ),
363363 'bbcode_bitfield ' => $ bbcode_bitfield ,
364- 'bbcode_uid ' => qi::phpbb_branch ('32 ' ) ? gen_rand_string () : $ bbcode_uid ,
364+ 'bbcode_uid ' => qi::phpbb_branch ('3.2 ' ) ? gen_rand_string () : $ bbcode_uid ,
365365 );
366366
367- if (qi::phpbb_branch ('31 ' ))
367+ if (qi::phpbb_branch ('3.1 ' ))
368368 {
369369 $ sql_posts [count ($ sql_posts ) - 1 ]['post_visibility ' ] = ITEM_APPROVED ;
370370 }
@@ -377,14 +377,14 @@ private function fill_forums()
377377 $ topic_arr ['topic_time ' ] = $ post_time ;
378378 $ topic_arr ['topic_poster ' ] = $ poster_arr ['user_id ' ];
379379
380- if (qi::phpbb_branch ('31 ' ))
380+ if (qi::phpbb_branch ('3.1 ' ))
381381 {
382382 $ topic_arr ['topic_visibility ' ] = ITEM_APPROVED ;
383383 }
384384 }
385385 else
386386 {
387- if (qi::phpbb_branch ('31 ' ))
387+ if (qi::phpbb_branch ('3.1 ' ))
388388 {
389389 $ topic_arr ['topic_posts_approved ' ]++;
390390 $ forum ['forum_posts_approved ' ]++;
@@ -435,8 +435,8 @@ private function fill_forums()
435435 }
436436
437437 $ sql_ary = array (
438- 'forum_posts ' . (qi::phpbb_branch ('31 ' ) ? '_approved ' : '' ) => $ forum ['forum_posts ' . (qi::phpbb_branch ('31 ' ) ? '_approved ' : '' )],
439- 'forum_topics ' . (qi::phpbb_branch ('31 ' ) ? '_approved ' : '' ) => $ forum ['forum_topics ' . (qi::phpbb_branch ('31 ' ) ? '_approved ' : '' )],
438+ 'forum_posts ' . (qi::phpbb_branch ('3.1 ' ) ? '_approved ' : '' ) => $ forum ['forum_posts ' . (qi::phpbb_branch ('3.1 ' ) ? '_approved ' : '' )],
439+ 'forum_topics ' . (qi::phpbb_branch ('3.1 ' ) ? '_approved ' : '' ) => $ forum ['forum_topics ' . (qi::phpbb_branch ('3.1 ' ) ? '_approved ' : '' )],
440440 'forum_last_post_id ' => $ forum ['forum_last_post_id ' ],
441441 'forum_last_poster_id ' => $ forum ['forum_last_poster_id ' ],
442442 'forum_last_post_subject ' => $ forum ['forum_last_post_subject ' ],
@@ -445,7 +445,7 @@ private function fill_forums()
445445 'forum_last_poster_colour ' => '' ,
446446 );
447447
448- if (!qi::phpbb_branch ('31 ' ))
448+ if (!qi::phpbb_branch ('3.1 ' ))
449449 {
450450 $ sql_ary ['forum_topics_real ' ] = $ forum ['forum_topics_real ' ];
451451 }
@@ -609,7 +609,7 @@ private function _create_forums($forum_type, $cnt, $acp_forums, $parent_id = 0)
609609 'forum_last_poster_name ' => '' ,
610610 );
611611
612- if (qi::phpbb_branch ('31 ' ))
612+ if (qi::phpbb_branch ('3.1 ' ))
613613 {
614614 $ this ->forum_arr [$ forum_data ['forum_id ' ]]['forum_posts_approved ' ] = 0 ;
615615 $ this ->forum_arr [$ forum_data ['forum_id ' ]]['forum_topics_approved ' ] = 0 ;
@@ -633,7 +633,7 @@ private function save_users()
633633 global $ db , $ db_tools , $ config , $ settings ;
634634
635635 // Hash the password.
636- if (qi::phpbb_branch ('31 ' ))
636+ if (qi::phpbb_branch ('3.1 ' ))
637637 {
638638 global $ passwords_manager ;
639639 $ password = $ passwords_manager ->hash ('123456 ' );
@@ -652,7 +652,7 @@ private function save_users()
652652 $ chunk_cnt = 0 ;
653653 $ sql_ary = array ();
654654
655- if (!qi::phpbb_branch ('31 ' ))
655+ if (!qi::phpbb_branch ('3.1 ' ))
656656 {
657657 $ tz = new DateTimeZone ($ settings ->get_config ('qi_tz ' , '' ));
658658 $ tz_ary = $ tz ->getTransitions (time ());
@@ -690,7 +690,7 @@ private function save_users()
690690 );
691691
692692 $ count = count ($ sql_ary ) - 1 ;
693- if (qi::phpbb_branch ('31 ' ))
693+ if (qi::phpbb_branch ('3.1 ' ))
694694 {
695695 $ sql_ary [$ count ]['user_timezone ' ] = $ settings ->get_config ('qi_tz ' , '' );
696696 }
@@ -703,7 +703,7 @@ private function save_users()
703703 $ sql_ary [$ count ]['user_dst ' ] = $ qi_dst ;
704704 }
705705
706- if (!qi::phpbb_branch ('33 ' ) || $ db_tools ->sql_column_exists (USERS_TABLE , 'user_email_hash ' ))
706+ if (!qi::phpbb_branch ('3.3 ' ) || $ db_tools ->sql_column_exists (USERS_TABLE , 'user_email_hash ' ))
707707 {
708708 $ sql_ary [$ count ]['user_email_hash ' ] = phpbb_email_hash ($ email );
709709 }
@@ -780,7 +780,7 @@ private function get_default_forums()
780780
781781 // We are the only ones messing with this database so far.
782782 // So the latest user_id + 1 should be the user id for the first test user.
783- $ sql = 'SELECT forum_id, parent_id, forum_type, forum_posts ' . (qi::phpbb_branch ('31 ' ) ? '_approved ' : '' ) . ', forum_topics ' . (qi::phpbb_branch ('31 ' ) ? '_approved ' : ', forum_topics_real ' ) . ', forum_last_post_id, forum_last_poster_id, forum_last_post_subject, forum_last_post_time, forum_last_poster_name FROM ' . FORUMS_TABLE ;
783+ $ sql = 'SELECT forum_id, parent_id, forum_type, forum_posts ' . (qi::phpbb_branch ('3.1 ' ) ? '_approved ' : '' ) . ', forum_topics ' . (qi::phpbb_branch ('3.1 ' ) ? '_approved ' : ', forum_topics_real ' ) . ', forum_last_post_id, forum_last_poster_id, forum_last_post_subject, forum_last_post_time, forum_last_poster_name FROM ' . FORUMS_TABLE ;
784784 $ result = $ db ->sql_query ($ sql );
785785
786786 while ($ row = $ db ->sql_fetchrow ($ result ))
@@ -795,16 +795,16 @@ private function get_default_forums()
795795 $ this ->forum_arr [$ row ['forum_id ' ]] = array (
796796 'forum_id ' => $ row ['forum_id ' ],
797797 'parent_id ' => $ row ['parent_id ' ],
798- 'forum_posts ' . (qi::phpbb_branch ('31 ' ) ? '_approved ' : '' ) => $ row ['forum_posts ' . (qi::phpbb_branch ('31 ' ) ? '_approved ' : '' )],
799- 'forum_topics ' . (qi::phpbb_branch ('31 ' ) ? '_approved ' : '' ) => $ row ['forum_topics ' . (qi::phpbb_branch ('31 ' ) ? '_approved ' : '' )],
798+ 'forum_posts ' . (qi::phpbb_branch ('3.1 ' ) ? '_approved ' : '' ) => $ row ['forum_posts ' . (qi::phpbb_branch ('3.1 ' ) ? '_approved ' : '' )],
799+ 'forum_topics ' . (qi::phpbb_branch ('3.1 ' ) ? '_approved ' : '' ) => $ row ['forum_topics ' . (qi::phpbb_branch ('3.1 ' ) ? '_approved ' : '' )],
800800 'forum_last_post_id ' => $ row ['forum_last_post_id ' ],
801801 'forum_last_poster_id ' => $ row ['forum_last_poster_id ' ],
802802 'forum_last_post_subject ' => $ row ['forum_last_post_subject ' ],
803803 'forum_last_post_time ' => $ row ['forum_last_post_time ' ],
804804 'forum_last_poster_name ' => $ row ['forum_last_poster_name ' ],
805805 );
806806
807- if (!qi::phpbb_branch ('31 ' ))
807+ if (!qi::phpbb_branch ('3.1 ' ))
808808 {
809809 $ this ->forum_arr [$ row ['forum_id ' ]]['forum_topics_real ' ] = $ row ['forum_topics_real ' ];
810810 }
0 commit comments