* @param array $parameters
*/
public function __construct(array $objects, $action, array $parameters = array()) {
+ // set class name
+ if (empty($this->className)) {
+ $className = get_called_class();
+
+ if (StringUtil::substring($className, -6) == 'Action') {
+ $this->className = StringUtil::substring($className, 0, -6).'Editor';
+ }
+ }
+
$indexName = call_user_func(array($this->className, 'getDatabaseTableIndexName'));
$baseClass = call_user_func(array($this->className, 'getBaseClass'));
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\exception\SystemException;
use wcf\system\WCF;
+use wcf\util\StringUtil;
/**
* Abstract class for a list of database objects.
* Creates a new DatabaseObjectList object.
*/
public function __construct() {
+ // set class name
+ if (empty($this->className)) {
+ $className = get_called_class();
+
+ if (StringUtil::substring($className, -4) == 'List') {
+ $this->className = StringUtil::substring($className, 0, -4);
+ }
+ }
+
$this->conditionBuilder = new PreparedStatementConditionBuilder();
}