diff --git a/modules/backend/behaviors/FormController.php b/modules/backend/behaviors/FormController.php index 589d626fb..ecde8c9ed 100644 --- a/modules/backend/behaviors/FormController.php +++ b/modules/backend/behaviors/FormController.php @@ -349,7 +349,7 @@ class FormController extends ControllerBehavior * @param array $extras Any extra params to include in the language string variables * @return string The translated string. */ - private function getLang($name, $default = null, $extras = []) + protected function getLang($name, $default = null, $extras = []) { $name = $this->getConfig($name, $default); $vars = [ @@ -567,7 +567,7 @@ class FormController extends ControllerBehavior // Internals // - private function prepareModelsToSave($model, $saveData) + protected function prepareModelsToSave($model, $saveData) { $this->modelsToSave = []; $this->setModelAttributes($model, $saveData); @@ -580,7 +580,7 @@ class FormController extends ControllerBehavior * @param Model $model Model to save to * @return array The collection of models to save. */ - private function setModelAttributes($model, $saveData) + protected function setModelAttributes($model, $saveData) { $this->modelsToSave[] = $model; diff --git a/modules/backend/behaviors/RelationController.php b/modules/backend/behaviors/RelationController.php index 30109c7ac..f1afd0c65 100644 --- a/modules/backend/behaviors/RelationController.php +++ b/modules/backend/behaviors/RelationController.php @@ -326,7 +326,7 @@ class RelationController extends ControllerBehavior * @param string $field The relationship field. * @return string The active field name. */ - private function validateField($field = null) + protected function validateField($field = null) { $field = $field ?: post(self::PARAM_FIELD); @@ -406,7 +406,7 @@ class RelationController extends ControllerBehavior /** * Returns the existing record IDs for the relation. */ - private function findExistingRelationIds($checkIds = null) + protected function findExistingRelationIds($checkIds = null) { $results = $this->relationObject ->getBaseQuery() diff --git a/modules/backend/behaviors/UserPreferencesModel.php b/modules/backend/behaviors/UserPreferencesModel.php index bc186a983..c88e61afa 100644 --- a/modules/backend/behaviors/UserPreferencesModel.php +++ b/modules/backend/behaviors/UserPreferencesModel.php @@ -85,7 +85,7 @@ class UserPreferencesModel extends SettingsModel * Checks if a key is legitimate or should be added to * the field value collection */ - private function isKeyAllowed($key) + protected function isKeyAllowed($key) { /* * Let the core columns through diff --git a/modules/backend/classes/BackendController.php b/modules/backend/classes/BackendController.php index ea5b2172c..a1a9b8147 100644 --- a/modules/backend/classes/BackendController.php +++ b/modules/backend/classes/BackendController.php @@ -75,7 +75,7 @@ class BackendController extends ControllerBase * @param string $action Specifies a method name to execute. * @return ControllerBase Returns the backend controller object */ - private function findController($controller, $action, $dirPrefix = null) + protected function findController($controller, $action, $dirPrefix = null) { /* * Workaround: Composer does not support case insensitivity. diff --git a/modules/backend/classes/NavigationManager.php b/modules/backend/classes/NavigationManager.php index 340ef76ce..7c20e26d6 100644 --- a/modules/backend/classes/NavigationManager.php +++ b/modules/backend/classes/NavigationManager.php @@ -419,7 +419,7 @@ class NavigationManager * @param array $items A collection of menu items * @return array The filtered menu items */ - private function filterItemPermissions($user, array $items) + protected function filterItemPermissions($user, array $items) { $items = array_filter($items, function($item) use ($user) { if (!$item->permissions || !count($item->permissions)) @@ -436,7 +436,7 @@ class NavigationManager * @param object $item * @return string */ - private function makeItemKey($owner, $code) + protected function makeItemKey($owner, $code) { return strtoupper($owner).'.'.strtoupper($code); } diff --git a/modules/backend/widgets/Form.php b/modules/backend/widgets/Form.php index 987e958d5..060c6ffdd 100644 --- a/modules/backend/widgets/Form.php +++ b/modules/backend/widgets/Form.php @@ -39,7 +39,7 @@ class Form extends WidgetBase /** * @var boolean Determines if field definitions have been created. */ - private $fieldsDefined = false; + protected $fieldsDefined = false; /** * @var array Collection of all fields used in this form. @@ -218,7 +218,7 @@ class Form extends WidgetBase /** * Prepares the list data */ - public function prepareVars() + protected function prepareVars() { $this->defineFormFields(); $this->vars['sessionKey'] = $this->getSessionKey(); @@ -517,7 +517,7 @@ class Form extends WidgetBase * @param string $fieldType * @return boolean */ - private function isFormWidget($fieldType) + protected function isFormWidget($fieldType) { if ($fieldType === null) return false; @@ -539,7 +539,7 @@ class Form extends WidgetBase /** * Makes a widget object from a form field object. */ - public function makeFormWidget($field) + protected function makeFormWidget($field) { if ($field->type != 'widget') return null; @@ -687,7 +687,7 @@ class Form extends WidgetBase /** * Looks at the model for defined options. */ - private function getOptionsFromModel($field, $fieldOptions) + protected function getOptionsFromModel($field, $fieldOptions) { /* * Advanced usage, supplied options are callable @@ -751,7 +751,7 @@ class Form extends WidgetBase * @param string $method * @return boolean */ - private function methodExists($object, $method) + protected function methodExists($object, $method) { if (method_exists($object, 'methodExists')) return $object->methodExists($method); diff --git a/modules/backend/widgets/Lists.php b/modules/backend/widgets/Lists.php index a827669a0..24b1fde3a 100644 --- a/modules/backend/widgets/Lists.php +++ b/modules/backend/widgets/Lists.php @@ -249,7 +249,7 @@ class Lists extends WidgetBase * @param string $table * @return string */ - private function parseTableName($sql, $table) + protected function parseTableName($sql, $table) { return str_replace('@', $table.'.', $sql); } @@ -679,7 +679,7 @@ class Lists extends WidgetBase /** * Validates a column type as a date */ - private function validateDateTimeValue($value, $column) + protected function validateDateTimeValue($value, $column) { if ($value instanceof DateTime) $value = Carbon::instance($value); diff --git a/modules/cms/classes/Controller.php b/modules/cms/classes/Controller.php index ea0d4970a..cce7b120b 100644 --- a/modules/cms/classes/Controller.php +++ b/modules/cms/classes/Controller.php @@ -821,7 +821,7 @@ class Controller extends BaseController * Searches the layout and page components by an alias * @return ComponentBase The component object, if found */ - private function findComponentByName($name) + protected function findComponentByName($name) { if (isset($this->page->components[$name])) return $this->page->components[$name]; @@ -836,7 +836,7 @@ class Controller extends BaseController * Searches the layout and page components by an AJAX handler * @return ComponentBase The component object, if found */ - private function findComponentByHandler($handler) + protected function findComponentByHandler($handler) { foreach ($this->page->components as $component) { if (method_exists($component, $handler)) @@ -855,7 +855,7 @@ class Controller extends BaseController * Searches the layout and page components by a partial file * @return ComponentBase The component object, if found */ - private function findComponentByPartial($partial) + protected function findComponentByPartial($partial) { foreach ($this->page->components as $component) { $fileName = ComponentPartial::getFilePath($component, $partial); diff --git a/modules/cms/controllers/Index.php b/modules/cms/controllers/Index.php index 578afcf85..9f4e17439 100644 --- a/modules/cms/controllers/Index.php +++ b/modules/cms/controllers/Index.php @@ -394,7 +394,7 @@ class Index extends Controller * @param string $markup The markup to convert to unix style endings * @return string */ - private function convertLineEndings($markup) + protected function convertLineEndings($markup) { $markup = str_replace("\r\n", "\n", $markup); $markup = str_replace("\r", "\n", $markup); diff --git a/modules/system/behaviors/SettingsModel.php b/modules/system/behaviors/SettingsModel.php index cbff8d117..f4c7c30a8 100644 --- a/modules/system/behaviors/SettingsModel.php +++ b/modules/system/behaviors/SettingsModel.php @@ -176,7 +176,7 @@ class SettingsModel extends ModelBehavior * Checks if a key is legitimate or should be added to * the field value collection */ - private function isKeyAllowed($key) + protected function isKeyAllowed($key) { /* * Let the core columns through diff --git a/modules/system/classes/ExceptionBase.php b/modules/system/classes/ExceptionBase.php index 3a91d6b29..15688084a 100644 --- a/modules/system/classes/ExceptionBase.php +++ b/modules/system/classes/ExceptionBase.php @@ -254,7 +254,7 @@ class ExceptionBase extends Exception * @param array $traceInfo The trace information from getTrace() or debug_backtrace(). * @return array The filtered array containing the trace information. */ - private function filterCallStack($traceInfo) + protected function filterCallStack($traceInfo) { /* * Determine if filter should be used at all. diff --git a/modules/system/classes/SettingsManager.php b/modules/system/classes/SettingsManager.php index bfd0db461..08089561d 100644 --- a/modules/system/classes/SettingsManager.php +++ b/modules/system/classes/SettingsManager.php @@ -270,7 +270,7 @@ class SettingsManager * @param array $items A collection of setting items * @return array The filtered settings items */ - private function filterItemPermissions($user, array $items) + protected function filterItemPermissions($user, array $items) { array_filter($items, function($item) use ($user) { if (!$item->permissions || !count($item->permissions)) diff --git a/modules/system/classes/UpdateManager.php b/modules/system/classes/UpdateManager.php index b1425d14a..04e8dcd2e 100644 --- a/modules/system/classes/UpdateManager.php +++ b/modules/system/classes/UpdateManager.php @@ -606,7 +606,7 @@ class UpdateManager * @param string $fileCode A unique file code * @return string Full path on the disk */ - private function getFilePath($fileCode) + protected function getFilePath($fileCode) { $name = md5($fileCode) . '.arc'; return $this->tempDirectory . '/' . $name; @@ -628,7 +628,7 @@ class UpdateManager * @param string $uri URI * @return string URL */ - private function createServerUrl($uri) + protected function createServerUrl($uri) { $gateway = Config::get('cms.updateServer', 'http://octobercms.com/api'); if (substr($gateway, -1) != '/') @@ -643,7 +643,7 @@ class UpdateManager * @param array $postData Post data * @return void */ - private function applyHttpAttributes($http, $postData) + protected function applyHttpAttributes($http, $postData) { $postData['url'] = base64_encode(URL::to('/')); @@ -664,7 +664,7 @@ class UpdateManager * Create a nonce based on millisecond time * @return int */ - private function createNonce() + protected function createNonce() { $mt = explode(' ', microtime()); return $mt[1] . substr($mt[0], 2, 6); @@ -674,7 +674,7 @@ class UpdateManager * Create a unique signature for transmission. * @return string */ - private function createSignature($data, $secret) + protected function createSignature($data, $secret) { return base64_encode(hash_hmac('sha512', http_build_query($data, '', '&'), base64_decode($secret), true)); } diff --git a/modules/system/classes/VersionManager.php b/modules/system/classes/VersionManager.php index f80f8b1d5..aad27e31a 100644 --- a/modules/system/classes/VersionManager.php +++ b/modules/system/classes/VersionManager.php @@ -243,7 +243,7 @@ class VersionManager /** * Returns the absolute path to a version file for a plugin. */ - private function getVersionFile($code) + protected function getVersionFile($code) { $versionFile = $this->pluginManager->getPluginPath($code) . '/updates/version.yaml'; return $versionFile; @@ -252,7 +252,7 @@ class VersionManager /** * Checks if a plugin has a version file. */ - private function hasVersionFile($code) + protected function hasVersionFile($code) { $versionFile = $this->getVersionFile($code); return File::isFile($versionFile); diff --git a/modules/system/controllers/Settings.php b/modules/system/controllers/Settings.php index bab2723ef..e9044f495 100644 --- a/modules/system/controllers/Settings.php +++ b/modules/system/controllers/Settings.php @@ -144,7 +144,7 @@ class Settings extends Controller /** * Locates a setting item for a module or plugin */ - private function findSettingItem($author, $plugin, $code) + protected function findSettingItem($author, $plugin, $code) { $manager = SettingsManager::instance(); diff --git a/modules/system/controllers/Updates.php b/modules/system/controllers/Updates.php index e6a4a783d..72f5a233c 100644 --- a/modules/system/controllers/Updates.php +++ b/modules/system/controllers/Updates.php @@ -263,7 +263,7 @@ class Updates extends Controller return $this->makePartial('execute'); } - private function buildUpdateSteps($core, $plugins, $themes) + protected function buildUpdateSteps($core, $plugins, $themes) { if (!is_array($core)) $core = [null, null]; diff --git a/modules/system/traits/AssetMaker.php b/modules/system/traits/AssetMaker.php index 74c0236b8..6e5be3450 100644 --- a/modules/system/traits/AssetMaker.php +++ b/modules/system/traits/AssetMaker.php @@ -212,7 +212,7 @@ trait AssetMaker * @param array $asset Stored asset array * @return string */ - private function getAssetEntryBuildPath($asset) + protected function getAssetEntryBuildPath($asset) { $path = $asset['path']; if (isset($asset['attributes']['build'])) { @@ -234,7 +234,7 @@ trait AssetMaker * @param string $asset Specifies a path (URL) to the asset. * @return string */ - private function getAssetScheme($asset) + protected function getAssetScheme($asset) { if (preg_match("/(\/\/|http|https)/", $asset)) return $asset;