From: Nyloth <ny...@ti...> - 2010-01-20 21:06:21
|
+1 Nyloth 2010/1/13 Jonny Bradley <jo...@ti...>: > > +1 > > On 20 Dec 2009, at 15:27, sy...@us... wrote: > >> Revision: 23968 >> http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=23968&view=rev >> Author: sylvieg >> Date: 2009-12-20 15:27:59 +0000 (Sun, 20 Dec 2009) >> >> Log Message: >> ----------- >> [bp/r 23967][FIX]ATTACH: more generic to relay on than on script_name >> >> Modified Paths: >> -------------- >> branches/proposals/4.x/lib/wiki-plugins/wikiplugin_attach.php >> >> Modified: branches/proposals/4.x/lib/wiki-plugins/wikiplugin_attach.php >> =================================================================== >> --- branches/proposals/4.x/lib/wiki-plugins/wikiplugin_attach.php 2009-12-20 15:25:50 UTC (rev 23967) >> +++ branches/proposals/4.x/lib/wiki-plugins/wikiplugin_attach.php 2009-12-20 15:27:59 UTC (rev 23968) >> @@ -119,7 +119,7 @@ >> global $mimeextensions; >> global $wikilib; >> global $tikilib; >> - global $user; >> + global $user, $section; >> include_once('lib/wiki/wikilib.php'); >> >> extract ($params,EXTR_SKIP); >> @@ -132,7 +132,7 @@ >> // We're being called from a preview or something; try to build the atts ourselves. >> >> // See if we're being called from a tracker page. >> - if( strstr( $_SERVER['SCRIPT_NAME'], "tiki-view_tracker_item.php" ) ) { >> + if( $section == 'trackers' ) { >> $atts_item_name = $_REQUEST["itemId"]; >> $tracker_info = $trklib->get_tracker($atts_item_name); >> $tracker_info = array_merge($tracker_info,$trklib->get_tracker_options($atts_item_name)); >> @@ -149,7 +149,7 @@ >> } >> >> // See if we're being called from a wiki page. >> - if( strstr( $_SERVER['SCRIPT_NAME'], 'tiki-index.php' ) || strstr( $_SERVER['SCRIPT_NAME'], "tiki-editpage.php" ) || strstr( $_SERVER['SCRIPT_NAME'], 'tiki-pagehistory.php') ) { >> + if( $section == 'wiki page' ) { >> $atts_item_name = $_REQUEST["page"]; >> $atts = $wikilib->list_wiki_attachments($atts_item_name,0,-1,'created_desc',''); >> } >> >> >> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. >> >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast and easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> Tikiwiki-cvs mailing list >> Tik...@li... >> https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Tikiwiki-cvs mailing list > Tik...@li... > https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs > |