Version 5.0.0 beta 4
This commit is contained in:
1 parent
e86153356a
commit
2f24f9de48
276 files changed
+8614
-6044
No files matched your search
@@ -44,9 +44,9 @@ class Punbb extends Software
|
||||
/**
|
||||
* Software Name
|
||||
*
|
||||
* @return string
|
||||
* @return string
|
||||
*/
|
||||
public static function softwareName()
|
||||
public static function softwareName(): string
|
||||
{
|
||||
/* Child classes must override this method */
|
||||
return "PunBB (1.x)";
|
||||
@@ -55,9 +55,9 @@ class Punbb extends Software
|
||||
/**
|
||||
* Software Key
|
||||
*
|
||||
* @return string
|
||||
* @return string
|
||||
*/
|
||||
public static function softwareKey()
|
||||
public static function softwareKey(): string
|
||||
{
|
||||
/* Child classes must override this method */
|
||||
return "punbb";
|
||||
@@ -66,9 +66,9 @@ class Punbb extends Software
|
||||
/**
|
||||
* Content we can convert from this software.
|
||||
*
|
||||
* @return array
|
||||
* @return array|null
|
||||
*/
|
||||
public static function canConvert()
|
||||
public static function canConvert(): ?array
|
||||
{
|
||||
return array(
|
||||
'convertGroups' => array(
|
||||
@@ -93,9 +93,9 @@ class Punbb extends Software
|
||||
/**
|
||||
* Can we convert passwords from this software.
|
||||
*
|
||||
* @return boolean
|
||||
* @return boolean
|
||||
*/
|
||||
public static function loginEnabled()
|
||||
public static function loginEnabled(): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -103,9 +103,9 @@ class Punbb extends Software
|
||||
/**
|
||||
* List of conversion methods that require additional information
|
||||
*
|
||||
* @return array
|
||||
* @return array
|
||||
*/
|
||||
public static function checkConf()
|
||||
public static function checkConf(): array
|
||||
{
|
||||
return array(
|
||||
'convertGroups',
|
||||
@@ -116,10 +116,10 @@ class Punbb extends Software
|
||||
/**
|
||||
* Get More Information
|
||||
*
|
||||
* @param string $method Conversion method
|
||||
* @return array
|
||||
* @param string $method Conversion method
|
||||
* @return array|null
|
||||
*/
|
||||
public function getMoreInfo( $method )
|
||||
public function getMoreInfo( string $method ): ?array
|
||||
{
|
||||
$return = array();
|
||||
|
||||
@@ -179,9 +179,9 @@ class Punbb extends Software
|
||||
/**
|
||||
* Finish - Adds everything it needs to the queues and clears data store
|
||||
*
|
||||
* @return array Messages to display
|
||||
* @return array Messages to display
|
||||
*/
|
||||
public function finish()
|
||||
public function finish(): array
|
||||
{
|
||||
/* Search Index Rebuild */
|
||||
Index::i()->rebuild();
|
||||
@@ -206,9 +206,9 @@ class Punbb extends Software
|
||||
/**
|
||||
* Pre-process content for the Invision Community text parser
|
||||
*
|
||||
* @param string The post
|
||||
* @param string|null Content Classname passed by post-conversion rebuild
|
||||
* @param int|null Content ID passed by post-conversion rebuild
|
||||
* @param string $post The post
|
||||
* @param string|null $className Classname passed by post-conversion rebuild
|
||||
* @param int|null $contentId ID passed by post-conversion rebuild
|
||||
* @return string The converted post
|
||||
*/
|
||||
public static function fixPostData( string $post, ?string $className=null, ?int $contentId=null ): string
|
||||
@@ -224,7 +224,7 @@ class Punbb extends Software
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertGroups()
|
||||
public function convertGroups() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
|
||||
@@ -254,7 +254,7 @@ class Punbb extends Software
|
||||
|
||||
$libraryClass->convertGroup( $info );
|
||||
|
||||
$libraryClass->setLastKeyValue( $row['g_id'], $merge );
|
||||
$libraryClass->setLastKeyValue( $row['g_id'] );
|
||||
}
|
||||
|
||||
/* Now check for group promotions */
|
||||
@@ -272,7 +272,7 @@ class Punbb extends Software
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertMembers()
|
||||
public function convertMembers() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
|
||||
@@ -343,7 +343,7 @@ class Punbb extends Software
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertPrivateMessages()
|
||||
public function convertPrivateMessages() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
|
||||
@@ -394,7 +394,7 @@ class Punbb extends Software
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertPrivateMessageReplies()
|
||||
public function convertPrivateMessageReplies() : void
|
||||
{
|
||||
$libraryClass = $this->getLibrary();
|
||||
|
||||
@@ -419,9 +419,9 @@ class Punbb extends Software
|
||||
/**
|
||||
* Check if we can redirect the legacy URLs from this software to the new locations
|
||||
*
|
||||
* @return NULL|Url
|
||||
* @return Url|NULL
|
||||
*/
|
||||
public function checkRedirects()
|
||||
public function checkRedirects(): ?Url
|
||||
{
|
||||
/* If we can't access profiles, don't bother trying to redirect */
|
||||
if( !Member::loggedIn()->canAccessModule( Module::get( 'core', 'members' ) ) )
|
||||
@@ -454,7 +454,7 @@ class Punbb extends Software
|
||||
* @param string $password Password from form
|
||||
* @return bool
|
||||
*/
|
||||
public static function login( $member, $password )
|
||||
public static function login( Member $member, string $password ) : bool
|
||||
{
|
||||
$success = FALSE;
|
||||
|
||||
|
||||
Reference in new issue
Block a user