Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image owner is not set at upload #121

Open
Tazzios opened this issue Oct 11, 2022 · 9 comments
Open

Image owner is not set at upload #121

Tazzios opened this issue Oct 11, 2022 · 9 comments

Comments

@Tazzios
Copy link

Tazzios commented Oct 11, 2022

Behavior
When uploaden an image from the backend or the editor button the owner is not set. So i cannot see who had uploaded the picture.
Only when using the menu item user panel for upload the owner gets set.

Expected
Evertime and way an image is uploaded the owner is set.

Do i overlook some reason why it is not set?

info:
Joomgallery 3.6.0
Joomla 3.10.11

@Elfangor93
Copy link
Member

I have also experienced that. But it does not matter for me.
@MrMusic Do you know why JG 3.x is acting like that?

@MrMusic
Copy link
Member

MrMusic commented Oct 11, 2022

Hi,

the image owner is only set when uploading in the frontend, as it was thought that only the admin uploads in the backend anyway. If necessary, you can quickly change the owner via batch editing in the backend.

Regards
MrMusic

@Tazzios
Copy link
Author

Tazzios commented Oct 11, 2022

I have multiple users that use the editor button in the frontend to upload images. I do not always know who has uploaded the image.

I can see if i can make a pull request to add the user to the plugin but joomgallery is a bit more complex then the plugins and modules that i make. :)

@Elfangor93
Copy link
Member

Never realized that the JoomPlu upload is using the Backend uploader...

@Tazzios
Copy link
Author

Tazzios commented Oct 12, 2022

Never realized that the JoomPlu upload is using the Backend uploader...

Sorry I found out that I'm talking nonsense.
My users can use front and backend, I just asked them and they are using the backend.
Did a test on the frontend and then a username is set. ( Why didn`t I test that earlier :( )

At which joomgallery php files should i look to add also a username from the backend?

@MrMusic
Copy link
Member

MrMusic commented Oct 12, 2022

At which joomgallery php files should i look to add also a username from the backend?

Take a look here:

// Owner
if($this->_site)
{
$row->owner = $this->_user->get('id');
}
else
{
$row->owner = 0;
}

@Tazzios
Copy link
Author

Tazzios commented Oct 14, 2022

@MrMusic thanks for the direct link.

This is all what needed to always set the user.

 // Owner 
 //if($this->_site) 
 //{ 
   $row->owner   = $this->_user->get('id'); 
 //} 
 //else 
 //{ 
 //  $row->owner   = 0; 
 //} 

Is there a change it gets in the official release or do I need to apply it as my own mod?

@MrMusic
Copy link
Member

MrMusic commented Oct 14, 2022

Is there a change it gets in the official release or do I need to apply it as my own mod?

I don't think this will come in JoomGallery 3. For backward compatibility a new configuration option would have to be created, etc.

@Tazzios
Copy link
Author

Tazzios commented Oct 17, 2022

Thats also fine, I will edit the file at my own installation. It`s not a big deal if I forget the mod for a few days after an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants