Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: character replace hack no longer working.  (Read 1336 times)

0 Members and 1 Guest are viewing this topic.

jaus

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
character replace hack no longer working.
« on: October 13, 2008, 06:00:32 pm »

I had this working, but have not used coppermine for several months.  I recently started working with coppermine again and now this mod doesn't work anymore.   

In include/picmgmt.inc.php I changed this:

 
Code: [Select]
      if ($CONFIG['read_iptc_data']) {
           $iptc = get_IPTC($image);
           if (is_array($iptc) && !$title && !$caption && !$keywords) {  //if any of those 3 are filled out we don't want to override them, they may be blank on purpose.
               $title = (isset($iptc['Title'])) ? $iptc['Title'] : $title;
               $caption = (isset($iptc['Caption'])) ? $iptc['Caption'] : $caption;
               $keywords = (isset($iptc['Keywords'])) ? implode(' ',$iptc['Keywords']) : $keywords;
           }
        }

TO THIS:

 
Code: [Select]
       if ($CONFIG['read_iptc_data']) {
           $iptc = get_IPTC($image);
           if (is_array($iptc) && !$title && !$caption && !$keywords) {  //if any of those 3 are filled out we don't want to override them, they may be blank on purpose.
               $title = (isset($iptc['Title'])) ? $iptc['Title'] : $title;
               $caption = (isset($iptc['Caption'])) ? $iptc['Caption'] : $caption;
               $keywords = (isset($iptc['Keywords'])) ? implode(' ',$iptc['Keywords']) : $keywords;
           $parens = array("(" , ")");
               $keywords = str_replace($parens , "" , $keywords);
          }
        }


It was doing what I wanted (removing parenthesis from imported keywords) but now it doesn't.  I don't see what the problem is.  The only change I have made is upgrading to 1.4.19 and that seems to have gone well otherwise.  All of my other mods are still working.

What could have changed to make this one no longer work?

Thanks,
Joe.
Logged
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 19 queries.