Skip to content

Commit

Permalink
additional adjustments made to accommodate use with PHP 8
Browse files Browse the repository at this point in the history
  • Loading branch information
ron4mac committed Oct 8, 2021
1 parent eeeee3e commit da17dce
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
29 changes: 13 additions & 16 deletions edit_one_pic.php
@@ -1,22 +1,19 @@
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2016 Coppermine Dev Team
v1.0 originally written by Gregory Demar
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3
as published by the Free Software Foundation.
********************************************
Coppermine version: 1.6.03
$HeadURL$
**********************************************/
/**
* Coppermine Photo Gallery
*
* v1.0 originally written by Gregory Demar
*
* @copyright Copyright (c) 2003-2021 Coppermine Dev Team
* @license GNU General Public License version 3 or later; see LICENSE
*
* edit_one_pic.php
* @since 1.6.15
*/

define('IN_COPPERMINE', true);
define('EDITPICS_PHP', true);
require('include/init.inc.php');
require 'include/init.inc.php';

js_include('js/edit_one_pic.js');

Expand Down Expand Up @@ -96,7 +93,7 @@ function process_post_data()
}
$pic = $result->fetchAssoc(true);

if (!GALLERY_ADMIN_MODE && !MODERATOR_MODE && !USER_ADMIN_MODE && !user_is_allowed() && !$CONFIG['users_can_edit_pics'] ) {
if (!GALLERY_ADMIN_MODE && (!defined('MODERATOR_MODE') || !MODERATOR_MODE) && !USER_ADMIN_MODE && !user_is_allowed() && !$CONFIG['users_can_edit_pics'] ) {

if ($pic['category'] != FIRST_USER_CAT + USER_ID) {
cpg_die(ERROR, $lang_errors['perm_denied'], __FILE__, __LINE__);
Expand Down
4 changes: 2 additions & 2 deletions include/cpg16x.files.xml
Expand Up @@ -349,10 +349,10 @@
</element>
<element>
<fullpath>edit_one_pic.php</fullpath>
<version>1.6.03</version>
<version>1.6.15</version>
<status>mandatory</status>
<permission>read</permission>
<hash>62a4b1dbc432c1f63984a936a61e31f8</hash>
<hash>69d8fb626b7a80d181004e506d066a7d</hash>
</element>
<element>
<fullpath>editpics.php</fullpath>
Expand Down

0 comments on commit da17dce

Please sign in to comment.