Skip to content

Commit

Permalink
Add some deprecated logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Jakobi committed Nov 12, 2018
1 parent e4aafa2 commit c1492db
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/model/modx/modmanagercontroller.class.php
Expand Up @@ -54,7 +54,7 @@ abstract class modManagerController {
protected $failureMessage = '';

/**
* The constructor for the modManaagerController class.
* The constructor for the modManagerController class.
*
* @param modX $modx A reference to the modX object.
* @param array $config A configuration array of options related to this controller's action object.
Expand Down
2 changes: 2 additions & 0 deletions core/model/modx/modmanagercontrollerdeprecated.class.php
Expand Up @@ -24,6 +24,8 @@ class modManagerControllerDeprecated extends modManagerController {
* @return string
*/
public function process(array $scriptProperties = array()) {
$this->modx->deprecated('2.2.0', '', 'modManagerControllerDeprecated support');

$modx =& $this->modx;
$theme = $this->modx->getOption('manager_theme',null,'default');

Expand Down
1 change: 1 addition & 0 deletions core/model/modx/modmanagerresponse.class.php
Expand Up @@ -65,6 +65,7 @@ public function outputContent(array $options = array()) {
$this->modx->request->loadActionMap();
$this->action = !empty($this->modx->actionMap[$route]) ? $this->modx->actionMap[$route] : array();
$this->namespace = !empty($this->action['namespace']) ? $this->action['namespace'] : 'core';
$this->modx->deprecated('2.3.0', 'Support for modAction has been replaced with routing based on a namespace and action name. Please update the extra with the namespace ' . $this->namespace . ' to the routing based system.', 'modAction support');
$isDeprecated = true;
}

Expand Down
1 change: 1 addition & 0 deletions core/model/modx/modmenu.class.php
Expand Up @@ -116,6 +116,7 @@ public function getSubMenus($start = '') {
// allow 2.2 and earlier actions
$deprecatedNamespace = $menu->get('action_namespace');
if (!empty($deprecatedNamespace)) {
$this->modx->deprecated('2.3.0', 'Support for modAction has been replaced with routing based on a namespace and action name. Please update the extra with the namespace ' . $deprecatedNamespace . ' to the routing based system.', 'modAction support');
$namespace = $deprecatedNamespace;
}
if ($namespace != 'core') {
Expand Down
2 changes: 2 additions & 0 deletions core/model/modx/modprocessor.class.php
Expand Up @@ -353,6 +353,8 @@ class modDeprecatedProcessor extends modProcessor {
* @return mixed
*/
public function process() {
$this->modx->deprecated('2.7.0', '', 'Flat file processor support');

$modx =& $this->modx;
$scriptProperties = $this->getProperties();
$o = include $this->path;
Expand Down
7 changes: 7 additions & 0 deletions core/model/modx/modresponse.class.php
Expand Up @@ -197,6 +197,13 @@ public function sendRedirect($url, $options= false, $type= '', $responseCode= ''
if (!is_array($options)) {
$options = array('count_attempts' => (boolean) $options);
}

if ($responseCode) {
$this->modx->deprecated('2.0.5', 'Use responseCode in options array instead.', 'sendRedirect method parameter $type');
}
if ($responseCode) {
$this->modx->deprecated('2.0.5', 'Use responseCode in options array instead.', 'sendRedirect method parameter $responseCode');
}
$options = array_merge(array('count_attempts' => false, 'type' => $type, 'responseCode' => $responseCode), $options);
$url= str_replace('&','&',$url);
if (empty ($url)) {
Expand Down
2 changes: 2 additions & 0 deletions core/model/modx/modtemplatevar.class.php
Expand Up @@ -265,6 +265,7 @@ public function renderOutput($resourceId= 0) {
* @deprecated To be removed in 2.2
*/
if ($paramstring= $this->get('display_params')) {
$this->xpdo->deprecated('2.2.0', 'Use output_properties instead.', 'modTemplateVar renderOutput display_params');
$cp= explode("&", $paramstring);
foreach ($cp as $p => $v) {
$ar= explode("=", $v);
Expand Down Expand Up @@ -424,6 +425,7 @@ public function getRender($params,$value,array $paths,$method,$resourceId = 0,$t
$output = $render->render($value,$params);
} else {
$deprecatedClassName = $method == 'input' ? 'modTemplateVarInputRenderDeprecated' : 'modTemplateVarOutputRenderDeprecated';
$this->xpdo->deprecated('2.2.0', '', 'Old modTemplateVar getRender ' . $method . 'method');
$render = new $deprecatedClassName($this);

foreach ($paths as $path) {
Expand Down
2 changes: 2 additions & 0 deletions core/model/modx/processors/element/getclasses.class.php
Expand Up @@ -32,6 +32,8 @@ public function initialize() {
}

public function process() {
$this->modx->deprecated('2.1.4', 'Please use $modx->getDescendants($className) now.', 'modElementGetClassesProcessor support');

$limit = $this->getProperty('limit',10);
$isLimit = !empty($limit);

Expand Down
1 change: 1 addition & 0 deletions core/model/modx/processors/system/clearcache.class.php
Expand Up @@ -143,6 +143,7 @@ public function getPartitions() {
public function clearByPaths() {
$pathResults = array();
/* deprecated: use a dedicated cache partition rather than specifying paths */
$this->modx->deprecated('2.1.4', 'Use a dedicated cache partition rather than specifying paths.', 'modSystemClearCacheProcessor clearByPaths');
$paths = $this->getProperty('paths',false);
if (!empty($paths)) {
$paths = array_walk(explode(',',$paths), 'trim');
Expand Down
2 changes: 2 additions & 0 deletions core/model/modx/processors/workspace/packages/view.class.php
Expand Up @@ -38,6 +38,8 @@ public function initialize() {
}

public function process() {
$this->modx->deprecated('2.1.5', '', 'modPackageViewProcessor support');

$collection= array();
$packageArray = $this->package->toArray();

Expand Down

0 comments on commit c1492db

Please sign in to comment.