Skip to content

Commit

Permalink
Started working on Revo 3 compatibility (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
rtripault committed Oct 24, 2022
1 parent e5c689f commit 1afe3ca
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 22 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

## [unreleased]

- Revo 3+ compatiblity (#5)
- Added ability to directly enter target/destination resource ID (#3)
- Added Spanish lexicons. Thanks to @guelu63 (#4)
- Added French lexicons. Thanks to @julienstuder


Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0-pl
0.2.0-beta
18 changes: 9 additions & 9 deletions _build/build.config.sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* Define the MODX path constants required for the build process
*/
define('MODX_BASE_PATH', dirname(__DIR__, 2) . '/modx/');
define('MODX_CORE_PATH', MODX_BASE_PATH . 'core/');
define('MODX_MANAGER_PATH', MODX_BASE_PATH . 'manager/');
define('MODX_CONNECTORS_PATH', MODX_BASE_PATH . 'connectors/');
define('MODX_ASSETS_PATH', MODX_BASE_PATH . 'assets/');
const MODX_CORE_PATH = MODX_BASE_PATH . 'core/';
const MODX_MANAGER_PATH = MODX_BASE_PATH . 'manager/';
const MODX_CONNECTORS_PATH = MODX_BASE_PATH . 'connectors/';
const MODX_ASSETS_PATH = MODX_BASE_PATH . 'assets/';

define('MODX_BASE_URL', '/modx/');
define('MODX_CORE_URL', MODX_BASE_URL . 'core/');
define('MODX_MANAGER_URL', MODX_BASE_URL . 'manager/');
define('MODX_CONNECTORS_URL', MODX_BASE_URL . 'connectors/');
define('MODX_ASSETS_URL', MODX_BASE_URL . 'assets/');
const MODX_BASE_URL = '/modx/';
const MODX_CORE_URL = MODX_BASE_URL . 'core/';
const MODX_MANAGER_URL = MODX_BASE_URL . 'manager/';
const MODX_CONNECTORS_URL = MODX_BASE_URL . 'connectors/';
const MODX_ASSETS_URL = MODX_BASE_URL . 'assets/';
2 changes: 1 addition & 1 deletion _build/build.transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function getPHPContent(string $file) : string
}

// Define package names
define('PKG_NAME', 'CopyContent');
const PKG_NAME = 'CopyContent';
define('PKG_NAME_LOWER', strtolower(PKG_NAME));
$version = explode('-', trim(file_get_contents($root . 'VERSION')));
define('PKG_VERSION', $version[0]);
Expand Down
2 changes: 1 addition & 1 deletion assets/components/copycontent/connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require_once MODX_CORE_PATH . 'config/' . MODX_CONFIG_KEY . '.inc.php';
require_once MODX_CONNECTORS_PATH . 'index.php';
/**
* @var modX $modx
* @var \MODX\Revolution\modX $modx
*/
$corePath = $modx->getOption(
'copycontent.core_path',
Expand Down
2 changes: 1 addition & 1 deletion assets/components/copycontent/js/copycontent.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ CopyContent.Resource = function(config) {
,pageSize: 20
,url: CopyContent.config.connector
,baseParams: {
action: 'searchResource'
action: 'searchresource'
,current: MODx.request.id
}
});
Expand Down
7 changes: 5 additions & 2 deletions core/components/copycontent/elements/plugins/copycontent.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<?php

use MODX\Revolution\modSystemEvent;

/**
* CopyContent
* A plugin to load "copy content" assets
*
* @var modX $modx
* @var \MODX\Revolution\modX $modx
* @var array $scriptProperties
*
* @var modPlugin $this
* @var \MODX\Revolution\modPlugin $this
*
* @see modPlugin::process()
*
Expand Down
2 changes: 1 addition & 1 deletion core/components/copycontent/lexicon/de/default.inc.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $_lang array
* @var modLexicon $this
* @var \MODX\Revolution\modLexicon $this
*
* @see modLexicon::getFileTopic()
*/
Expand Down
2 changes: 1 addition & 1 deletion core/components/copycontent/lexicon/en/default.inc.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $_lang array
* @var modLexicon $this
* @var \MODX\Revolution\modLexicon $this
*
* @see modLexicon::getFileTopic()
*/
Expand Down
2 changes: 1 addition & 1 deletion core/components/copycontent/lexicon/es/default.inc.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $_lang array
* @var modLexicon $this
* @var \MODX\Revolution\modLexicon $this
*
* @see modLexicon::getFileTopic()
*/
Expand Down
2 changes: 1 addition & 1 deletion core/components/copycontent/lexicon/fr/default.inc.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* @var $_lang array
* @var modLexicon $this
* @var \MODX\Revolution\modLexicon $this
*
* @see modLexicon::getFileTopic()
*/
Expand Down
7 changes: 6 additions & 1 deletion core/components/copycontent/processors/copycontent.class.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<?php

use MODX\Revolution\modResource;
use MODX\Revolution\modTemplateVar;
use MODX\Revolution\Processors\Processor;

/**
* CopyContent Processor
* @copyright 2019 SEDA.digital GmbH & Co. KG
*/

class CopyContent extends modProcessor
class CopyContent extends Processor
{
public function process()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?php

require_once MODX_CORE_PATH . 'model/modx/processors/resource/getlist.class.php';
use MODX\Revolution\modContext;

class SearchResource extends modResourceGetListProcessor
class SearchResource extends \MODX\Revolution\Processors\Resource\GetList
{
public function prepareQueryBeforeCount(xPDOQuery $c)
{
$c->leftJoin(modContext::class, 'Context');

$query = $this->getProperty('query');
$current = $this->getProperty('current');

Expand Down

0 comments on commit 1afe3ca

Please sign in to comment.