* User Info

Welcome, Guest. Please login or register.

* Recent Posts

Forum closed by whazzup
[September 25, 2021, 02:56:14 PM]

How do i replace an image file with another image file by Malu
[December 16, 2020, 03:17:02 PM]

Can't get RSG "Show My Galleries" to work by Dampfnudel
[February 25, 2019, 11:01:55 AM]

Change the order of uploaded images in the gallery by whazzup
[February 19, 2019, 10:37:29 PM]

Upload timeout for large galleries (500 images each) by whazzup
[February 11, 2019, 10:07:25 PM]

Greetings from Ronald Smit by whazzup
[January 06, 2019, 03:39:22 PM]

Pluign and module by whazzup
[June 08, 2018, 11:57:13 PM]

Version 4.4.1 released by whazzup
[May 31, 2018, 04:31:16 PM]

Author Topic: RSGallery2 3.2 still uses deprecated index2.php  (Read 3027 times)

Offline Jeff Rivett

  • Dev Team
  • Newbie
  • *****
  • Posts: 18
    • Boot13
RSGallery2 3.2 still uses deprecated index2.php
« on: July 08, 2013, 02:07:43 PM »
I recently discovered that the use of 'index2.php' in Joomla is deprecated, and that in Joomla 1.5 and newer, other methods for generating component-only output are recommended. I noticed that the only code on my Joomla 2.5 site that still uses index2.php is in RSGallery2. Specifically, it's used in /components/com_rsgallery2/lib/rsgcomments/js/client.js, in the function ajaxSend. I was wondering if this is an oversight or whether there's some reason for using this method in RSGallery2. Note that in researching this, I found a lot of references to index2.php in connection with hacked sites.

Offline mirjam

  • Retired from Dev Team
  • Hero Member
  • ****
  • Posts: 670
Re: RSGallery2 3.2 still uses deprecated index2.php
« Reply #1 on: July 10, 2013, 11:37:23 AM »
Thought I had removed all references (in use) to index2 quite some time ago... Missed this one.

The javascript it is in is only called in the file /components/com_rsgallery2/lib/rsgcomments/rsgcomments.class.php in line 248
Code: [Select]
$doc->addScript(JURI_SITE."/components/com_rsgallery2/lib/rsgcomments/js/client.js");It is in the function editComment. This function was changed last year. I believe that this line including the js file may be removed, and that the file client.js (and the directory /js/ it is in) may be removed as well.

Could you double check for me (by commenting the line 248 mentioned, and then removing the /js/ directory, of course while keeping a backup of the file(s))?

I do not believe that this instance of index2 has anything to do with a hack.
With a little boy in the house I don't spend as much time on RSG2 anymore.

I still like RSG2, if you do too, please think about how you can invest some of your time in RSG2... the one remaining coding volunteer (Whazzup) can use your help!

Offline Jeff Rivett

  • Dev Team
  • Newbie
  • *****
  • Posts: 18
    • Boot13
Re: RSGallery2 3.2 still uses deprecated index2.php
« Reply #2 on: July 10, 2013, 03:25:34 PM »
Commented out the include in /components/com_rsgallery2/lib/rsgcomments/rsgcomments.class.php and renamed the /components/com_rsgallery2/lib/rsgcomments/js folder as requested. Site and gallery still work fine, including comments.

May I assume that this change will find its way into the next release?

I never actually thought that the code I found was evidence of a hack, because I downloaded a fresh copy of RSGallery2 and found the same thing. I only thought that it might be confusing or alarming to anyone finding it, and of course I figured it should probably be changed given the index2.php method being deprecated. I discovered the code while performing regular monitoring of Google Webmaster Tools site errors: a few errors involved URLS with 'index2.php'. I did a bit of research and the rest you know.