Skip to content

Commit

Permalink
compatibility-php73 (#4)
Browse files Browse the repository at this point in the history
* PHP7 convention : no more closing php tags

* cleanup of the changelog with markdown and adding v2.3 entry

* adding gitignore

* update version info

* update insert procedure to have the correct signature (PHP7)
  • Loading branch information
fiammybe authored Jul 10, 2020
1 parent 09ff69a commit bf3dce4
Show file tree
Hide file tree
Showing 69 changed files with 232 additions and 242 deletions.
73 changes: 73 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Created by .ignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

3 changes: 1 addition & 2 deletions admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
include_once 'admin_header.php';

$aboutObj = new icms_ipf_About();
$aboutObj->render();
?>
$aboutObj->render();
3 changes: 1 addition & 2 deletions admin/audio.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,4 @@ function editaudio($audio_id = 0) {
break;
}
icms_cp_footer();
}
?>
}
3 changes: 1 addition & 2 deletions admin/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,4 @@ function editcategory($category_id = 0) {
break;
}
icms_cp_footer();
}
?>
}
3 changes: 1 addition & 2 deletions admin/field.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,4 @@ function editfield($field_id = 0) {
break;
}
icms_cp_footer();
}
?>
}
3 changes: 1 addition & 2 deletions admin/finduser.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,4 @@
break;
}

icms_cp_footer();
?>
icms_cp_footer();
3 changes: 1 addition & 2 deletions admin/permissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,4 @@
}
}
$form->display();
icms_cp_footer();
?>
icms_cp_footer();
3 changes: 1 addition & 2 deletions admin/pictures.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,4 @@ function editpictures($pictures_id = 0) {
break;
}
icms_cp_footer();
}
?>
}
3 changes: 1 addition & 2 deletions admin/regstep.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,4 @@ function editregstep($regstep_id = 0) {
break;
}
icms_cp_footer();
}
?>
}
3 changes: 1 addition & 2 deletions admin/tribes.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,4 @@ function mergetribes($tribes_id) {
break;
}
icms_cp_footer();
}
?>
}
3 changes: 1 addition & 2 deletions admin/tribeuser.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,4 @@ function edittribeuser($tribeuser_id) {
break;
}
icms_cp_footer();
}
?>
}
3 changes: 1 addition & 2 deletions admin/videos.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,4 @@ function editvideos($videos_id = 0) {
break;
}
icms_cp_footer();
}
?>
}
3 changes: 1 addition & 2 deletions admin/visibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,4 @@

$icmsAdminTpl->display("db:profile_admin_visibility.html");

icms_cp_footer();
?>
icms_cp_footer();
3 changes: 1 addition & 2 deletions audio.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,4 @@ function editaudio($audioObj, $hideForm=false) {
}
$icmsTpl->assign('profile_category_path', _MD_PROFILE_AUDIOS);

include_once 'footer.php';
?>
include_once 'footer.php';
3 changes: 1 addition & 2 deletions blocks/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,4 @@ function b_profile_usermenu_show($options) {
$block[$i]['url'] = ICMS_URL."/user.php?op=logout";

return $block;
}
?>
}
3 changes: 1 addition & 2 deletions class/Audio.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,4 @@ public function toArray() {
$ret['audio_sender_link'] = $this->getAudioSender();
return $ret;
}
}
?>
}
3 changes: 1 addition & 2 deletions class/AudioHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,4 @@ protected function afterDelete(&$obj) {

return true;
}
}
?>
}
3 changes: 1 addition & 2 deletions class/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,4 @@ public function getCat_weightControl() {
$control = new icms_form_elements_Text('', 'cat_weight[]', 5, 4, $this->getVar('cat_weight'));
return $control->render();
}
}
?>
}
3 changes: 1 addition & 2 deletions class/CategoryHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ protected function beforeDelete(&$obj) {
$obj->setErrors(sprintf(_AM_PROFILE_CATEGORY_NOTDELETED_FIELDS, $fields_count));
return false;
}
}
?>
}
3 changes: 1 addition & 2 deletions class/Configs.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,4 @@ public function userCanEditAndDelete() {
if ($profile_isAdmin) return true;
return $this->getVar('config_uid', 'e') == icms::$user->getVar('uid');
}
}
?>
}
3 changes: 1 addition & 2 deletions class/ConfigsHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,4 @@ protected function afterSave(&$obj) {
}
return true;
}
}
?>
}
3 changes: 1 addition & 2 deletions class/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -420,5 +420,4 @@ public function getField_weightControl() {
$control = new icms_form_elements_Text('', 'field_weight[]', 5, 4, $this->getVar('field_weight'));
return $control->render();
}
}
?>
}
9 changes: 4 additions & 5 deletions class/FieldHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public function getProfileFields(&$thisUser) {
$first_category = true;
for ($j = 0; $j < count($fields); $j++) {
$value = $fields[$j]->getOutputValue($thisUser, $profile);
if ($fields[$j]->getVar('field_show') && $fields[$j]->getVar('catid') == $categories[$i]->getVar('catid') && ($module->config['show_empty'] || trim($value) || $value == '0')) {;
if ($first_category) $rtn[$i]['title'] = $categories[$i]->getVar('cat_title');
if ($fields[$j]->getVar('field_show') && $fields[$j]->getVar('catid') == $categories[$i]->getVar('catid') && ($module->config['show_empty'] || trim($value) || $value == '0')) {
if ($first_category) $rtn[$i]['title'] = $categories[$i]->getVar('cat_title');
$first_category = false;
$rtn[$i]['fields'][$j]['image'] = $fields[$j]->getImage();
$rtn[$i]['fields'][$j]['title'] = $fields[$j]->getVar('field_title');
Expand Down Expand Up @@ -98,7 +98,7 @@ public function &loadFields($force_update = false) {
*
* @return bool FALSE if failed, TRUE if already present and unchanged or successful
*/
public function insert(&$obj, $force = false) {
public function insert(&$obj, $force = false, $checkObject = true, $debug = false) {
$profile_handler = icms_getmodulehandler('profile', basename(dirname(dirname(__FILE__))), 'profile');

$obj->cleanVars();
Expand Down Expand Up @@ -295,5 +295,4 @@ protected function afterDelete(&$obj) {
if (!empty($imgUrl)) unlink($imgPath.$imgUrl);
return true;
}
}
?>
}
3 changes: 1 addition & 2 deletions class/Friendship.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,4 @@ public function toArray() {
$ret['userCanEditAndDelete'] = $this->userCanEditAndDelete();
return $ret;
}
}
?>
}
3 changes: 1 addition & 2 deletions class/FriendshipHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,4 @@ public function getFriendship_statusArray() {
function userCanSubmit() {
return is_object(icms::$user);
}
}
?>
}
3 changes: 1 addition & 2 deletions class/Pictures.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,4 @@ public function toArray() {
$ret['userCanEditAndDelete'] = $this->userCanEditAndDelete();
return $ret;
}
}
?>
}
3 changes: 1 addition & 2 deletions class/PicturesHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,5 +252,4 @@ protected function afterDelete(&$obj) {

return true;
}
}
?>
}
3 changes: 1 addition & 2 deletions class/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ public function __construct($fields) {
}
}
}
}
?>
}
5 changes: 2 additions & 3 deletions class/ProfileHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function &loadFields() {
* @param bool $checkObject check if the object is dirty and clean the attributes
* @return bool FALSE if failed, TRUE if already present and unchanged or successful
*/
public function insert(&$obj, $force = false, $checkObject = true) {
public function insert(&$obj, $force = false, $checkObject = true, $debug = false) {
$uservars = $this->getUserVars();
foreach ($uservars as $var) unset($obj->vars[$var]);
if (count($obj->vars) == 1) return true;
Expand Down Expand Up @@ -145,5 +145,4 @@ public function search($criteria, $searchvars) {

return array($users, $profiles, $count);
}
}
?>
}
3 changes: 1 addition & 2 deletions class/Regstep.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,4 @@ public function getCustomStepSave(){
public function getCustomStepName(){
return $this->getVar('step_name');
}
}
?>
}
5 changes: 2 additions & 3 deletions class/RegstepHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(&$db) {
* @param bool $force
* @return bool
*/
public function insert(&$obj, $force = false) {
public function insert(&$obj, $force = false, $checkObject = true, $debug = false) {
if (parent::insert($obj, $force)) {
if ($obj->getVar('step_save') == 1) return $this->updateAll('step_save', 0, new icms_db_criteria_Item('step_id', $obj->getVar('step_id'), "!="));
return true;
Expand Down Expand Up @@ -62,5 +62,4 @@ public function delete(&$obj, $force = false) {
public function getListForFields() {
return array_merge(array(0 => '---'), $this->getList());
}
}
?>
}
5 changes: 1 addition & 4 deletions class/Smartuser.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,4 @@ function &getFields(){
}
return $fields_array;
}
}


?>
}
Loading

0 comments on commit bf3dce4

Please sign in to comment.