fix: undeclared attributes

This commit is contained in:
vnmedeiros 2024-01-17 16:18:08 -03:00
parent 9bb4519ddb
commit 233343220a
11 changed files with 81 additions and 9 deletions

View File

@ -11,8 +11,14 @@ use Tainacan\Entities;
*
* */
class REST_Background_Processes_Controller extends REST_Controller {
private $collections_repository;
private $collection;
/**
* table
*
* @var String
* @access protected
*/
private $table;
protected function get_schema() {
return "TODO:get_schema";
@ -181,7 +187,7 @@ class REST_Background_Processes_Controller extends REST_Controller {
$process_type = '';
if (isset($request['search'])) {
$name = $request['search'];
$process_type = "AND name LIKE '%${name}%'";
$process_type = "AND name LIKE '%$name%'";
$process_type = $wpdb->prepare($process_type);
}

View File

@ -19,7 +19,7 @@ class REST_Items_Controller extends REST_Controller {
private $metadatum_repository;
private $terms_repository;
private $filters_repository;
private $taxonomy_repository;
private $taxonomies_repository;
/**
* REST_Items_Controller constructor.
@ -587,7 +587,7 @@ class REST_Items_Controller extends REST_Controller {
}
$filter_name = is_string($filter_type_component)
? "tainacan-api-items-${filter_type_component}-filter-arguments"
? "tainacan-api-items-$filter_type_component-filter-arguments"
: 'tainacan-api-items-filter-arguments';
$filters_arguments[] = apply_filters($filter_name, array(

View File

@ -6,8 +6,10 @@ use Tainacan\Repositories\Repository;
class Roles {
private static $instance = null;
private $capabilities;
private $meta_caps;
private $meta_section_caps;
private $filters_caps;
public static function get_instance()
{
@ -585,7 +587,7 @@ class Roles {
foreach ( $caps as $cap ) {
if ( array_key_exists($cap, $allcaps) && $allcaps[$cap] === true ) {
if ( isset($cap) && $cap !== false && array_key_exists($cap, $allcaps) && $allcaps[$cap] === true ) {
continue;
}

View File

@ -15,7 +15,8 @@ class Term extends Entity {
$description,
$user,
$header_image_id,
$taxonomy;
$taxonomy,
$WP_Term;
static $post_type = false;

View File

@ -4,6 +4,14 @@ namespace Tainacan;
class Export_Handler {
/**
* bg_exporter
*
* @var Background_Exporter
* @access protected
*/
protected $bg_exporter;
private $registered_exporters = [];
function __construct() {

View File

@ -4,6 +4,15 @@ namespace Tainacan;
class Generic_Process_Handler {
/**
* bg_process
*
* @var Background_Generic_Process
* @access protected
*/
protected $bg_process;
private $registered_process = [];
function __construct() {

View File

@ -4,6 +4,14 @@ namespace Tainacan;
class Importer_Handler {
/**
* bg_importer
*
* @var Background_Importer
* @access protected
*/
protected $bg_importer;
private $registered_importers = [];
function __construct() {

View File

@ -51,6 +51,38 @@
*/
protected $cron_interval_identifier;
/**
* cron_hook_check_identifier
*
* @var string
* @access protected
*/
protected $cron_hook_check_identifier;
/**
* process_lock_in_time
*
* @var string
* @access protected
*/
protected $process_lock_in_time;
/**
* queue_lock_time
*
* @var string
* @access protected
*/
protected $queue_lock_time;
/**
* cron_interval
*
* @var string
* @access protected
*/
protected $cron_interval;
/**
* Initiate new background process
*/

View File

@ -29,6 +29,10 @@ class OAIPMH_Expose {
var $token_valid;
var $token_prefix;
protected $collection_repository;
protected $item_repository;
protected $repositoryIdentifier;
/**
*
*/

View File

@ -19,6 +19,7 @@ class OAIPMH_List_Records extends OAIPMH_Expose {
public $until;
public $sets;
public $metadataPrefix;
/**
* @signature CONSTRUTOR
@ -186,7 +187,7 @@ class OAIPMH_List_Records extends OAIPMH_Expose {
$this->xml_creater->addChild($this->working_node, $key, '');
}
}
}catch(Exception $e){
}catch(\Exception $e){
var_dump($e,$this->working_node,'dc:' . $key);
}
}

View File

@ -12,6 +12,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class Date extends Metadata_Type {
private $format;
private $output_date_format;
function __construct() {
// call metadatum type constructor