Skip to content

Commit

Permalink
Merge branch '2023.11' into 2024.11
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlabci committed Jan 10, 2024
2 parents 8bbb085 + 985b6d5 commit 38868e4
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 73 deletions.
2 changes: 2 additions & 0 deletions tests/tine20/Tinebase/FileSystem/PreviewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class Tinebase_FileSystem_PreviewTest extends TestCase

protected $_rmDir = array();

protected $_oldQuota;

protected function setUp(): void
{
if (empty(Tinebase_Core::getConfig()->filesdir)) {
Expand Down
3 changes: 2 additions & 1 deletion tests/tine20/Tinebase/Group/ActiveDirectoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ class Tinebase_Group_ActiveDirectoryTest extends \PHPUnit\Framework\TestCase
protected $groupObjectGUID = '0cbadcc5-72f7-4a2d-8858-7ba6c80e6c15';
protected $userObjectGUID = '0cbadcc5-72f7-4a2d-8858-7ba6c80e6c16';
protected $groupBaseFilter = 'objectclass=group';

protected $_groupAD;

/**
* Sets up the fixture.
* This method is called before a test is executed.
Expand Down
2 changes: 2 additions & 0 deletions tests/tine20/Tinebase/ImageHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class Tinebase_ImageHelperTest extends \PHPUnit\Framework\TestCase

protected $_testImage;

protected $_testImageData;

/**
* Runs the test methods of this class.
*
Expand Down
2 changes: 2 additions & 0 deletions tests/tine20/Tinebase/User/LdapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class Tinebase_User_LdapTest extends TestCase
* @var Tinebase_User_LDAP
*/
protected $_backend = NULL;

protected $objects;

/**
* Sets up the fixture.
Expand Down
2 changes: 1 addition & 1 deletion tine20/DFCom/Model/DeviceResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function triggerEventChain($name)
*/
public function displayMessage($message, $duration=5, $beep=self::BEEP_SHORTLONG, $font=self::FONT_STANDARD)
{
$this->_responseData['df_msg'] = implode(',', [rawurlencode(utf8_decode($message)), $duration, $beep, $font]);
$this->_responseData['df_msg'] = implode(',', [rawurlencode(Tinebase_Helper::mbConvertTo($message)), $duration, $beep, $font]);
return $this;
}

Expand Down
66 changes: 6 additions & 60 deletions tine20/Setup/Backend/Schema/Index/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
*
* @package Setup
* @license http://www.gnu.org/licenses/agpl.html
* @copyright Copyright (c) 2008 Metaways Infosystems GmbH (http://www.metaways.de)
* @copyright Copyright (c) 2008-2024 Metaways Infosystems GmbH (http://www.metaways.de)
* @author Matthias Greiling <[email protected]>
*/


abstract class Setup_Backend_Schema_Index_Abstract extends Setup_Backend_Schema_Abstract
{

Expand Down Expand Up @@ -59,14 +58,14 @@ abstract class Setup_Backend_Schema_Index_Abstract extends Setup_Backend_Schema_
*
* @var string
*/
public $referencetable;
public $referenceTable;

/**
* name of referenced table field/column of foreign key
*
* @var string
*/
public $referencefield;
public $referenceField;

/**
* defines behaviour of foreign key
Expand All @@ -88,66 +87,13 @@ abstract class Setup_Backend_Schema_Index_Abstract extends Setup_Backend_Schema_
* @var integer
*/
public $length = NULL;


public $fulltext;

abstract protected function _setIndex($_declaration);

public function setForeignKey($_foreign)
{
$this->foreign = 'true';
}

//
// /**
// * set index from declaration
// * @param stdClass $_declaration
// * NOT IMPLEMENTED YET
// */
// public function addIndex($_definition)
// {
// foreach ($this->declaration['index'] as $index) {
// if ($index->field['name'] == $_definition['COLUMN_NAME']) {
// if ($_definition['CONSTRAINT_NAME'] == 'PRIMARY') {
// $index->setName($_definition['COLUMN_NAME']);
// } else {
// $index->setName($_definition['CONSTRAINT_NAME']);
// }
// }
// }
// }
//
// /**
// * set index from declaration
// * @param stdClass $_declaration
// * NOT IMPLEMENTED YET
// */
// public function setIndex($_definition)
// {
// foreach ($this->declaration['index'] as $index) {
// if ($index->field['name'] == $_definition['COLUMN_NAME']) {
// if ($_definition['CONSTRAINT_NAME'] == 'PRIMARY') {
// $index->setName($_definition['COLUMN_NAME']);
// } else {
// $index->setName($_definition['CONSTRAINT_NAME']);
// }
// }
// }
// }
//
// /**
// * set index from declaration
// * @param stdClass $_declaration
// * NOT IMPLEMENTED YET
// */
// public function setForeign($_definition)
// {
// foreach ($this->declaration['index'] as $index) {
// //// auto shutup by cweiss: echo "<h1>" . substr($_definition['CONSTRAINT_NAME'], strlen(SQL_TABLE_PREFIX)) . "/" .$index->field->name. "</h1>";
//
// //if ($index->field->name == substr($_definition['CONSTRAINT_NAME'], strlen(SQL_TABLE_PREFIX)))
// //{
// $index->setForeignKey($_definition);
// //}
// }
// }

}
10 changes: 3 additions & 7 deletions tine20/Setup/Backend/Schema/Index/Mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
*
* @package Setup
* @license http://www.gnu.org/licenses/agpl.html
* @copyright Copyright (c) 2008 Metaways Infosystems GmbH (http://www.metaways.de)
* @copyright Copyright (c) 2008-2024 Metaways Infosystems GmbH (http://www.metaways.de)
* @author Matthias Greiling <[email protected]>
*/


class Setup_Backend_Schema_Index_Mysql extends Setup_Backend_Schema_Index_Abstract
{

Expand All @@ -20,13 +19,10 @@ public function __construct($_declaration)
public function setForeignKey($_declaration)
{
parent::setForeignKey($_declaration);
$this->referencetable = substr($_declaration['REFERENCED_TABLE_NAME'], strlen(SQL_TABLE_PREFIX));
$this->referencefield = $_declaration['REFERENCED_COLUMN_NAME'];
// $this->referenceOnDelete;
// $this->referenceOnUpdate;
$this->referenceTable = substr($_declaration['REFERENCED_TABLE_NAME'], strlen(SQL_TABLE_PREFIX));
$this->referenceField = $_declaration['REFERENCED_COLUMN_NAME'];
}


/**
* set Setup_Backend_Schema_Table from a given database query
*
Expand Down
3 changes: 1 addition & 2 deletions tine20/Setup/Backend/Schema/Index/Xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
*
* @package Setup
* @license http://www.gnu.org/licenses/agpl.html AGPL3
* @copyright Copyright (c) 2008 Metaways Infosystems GmbH (http://www.metaways.de)
* @copyright Copyright (c) 2008-2024 Metaways Infosystems GmbH (http://www.metaways.de)
* @author Matthias Greiling <[email protected]>
*/


class Setup_Backend_Schema_Index_Xml extends Setup_Backend_Schema_Index_Abstract
{
/**
Expand Down
2 changes: 2 additions & 0 deletions tine20/Tinebase/Group/Ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ class Tinebase_Group_Ldap extends Tinebase_Group_Sql implements Tinebase_Group_I
protected $_isReadOnlyBackend = false;

protected $_isDisabledBackend = false;

protected $_baseDn;

/**
* the constructor
Expand Down
2 changes: 1 addition & 1 deletion tine20/Tinebase/Import/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public static function createFromDefinition(
public function importFile($_filename, $_clientRecordData = array())
{
if (preg_match('/^win/i', PHP_OS)) {
$_filename = utf8_decode($_filename);
$_filename = Tinebase_Helper::mbConvertTo($_filename);
}
if (! file_exists($_filename)) {
throw new Tinebase_Exception_NotFound("File $_filename not found.");
Expand Down
8 changes: 8 additions & 0 deletions tine20/Tinebase/ModelConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,14 @@ class Tinebase_ModelConfiguration extends Tinebase_ModelConfiguration_Const {
*/
protected $_controllerHookBeforeUpdate = [];

/**
* FIXME do we need both?? this might be needed because php 8.2 deprecates dynamic props
* FIXME adding this breaks Sales_Document_JsonTest::testOfferBoilerplates
*
* @var array
*/
// public $controllerHookBeforeUpdate = [];

protected $_jsonFacadeFields = [];

/**
Expand Down
2 changes: 1 addition & 1 deletion tine20/Tinebase/User/PasswordPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ protected static function _testPolicy($password, $configKey, $regex = null)
$minLength = $configValue;
if ($minLength > 0) {
$reduced = ($regex) ? preg_replace($regex, '', $password) : $password;
$charCount = strlen(utf8_decode((string)$reduced));
$charCount = strlen(Tinebase_Helper::mbConvertTo((string)$reduced));
if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__
. ' Found ' . $charCount . '/' . $minLength . ' chars for ' . $configKey /*. ': ' . $reduced */);

Expand Down

0 comments on commit 38868e4

Please sign in to comment.