file uploads file when memcache statistics are written to page footer - easy fix

ultimike - October 10, 2008 - 18:16
Project:Memcache API and Integration
Version:5.x-1.8
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

When "memcache admin" is enabled, and the "show memcache statistics at the bottom of each page" option is selected on admin/settings/memcache, file uploads fail.

The fix is easy, just replace the following line in memcache_admin_init():

if (($user->uid == 0) || strstr($_SERVER['PHP_SELF'], 'update.php') || strstr($_GET['q'], 'autocomplete')) {
 

with this (heavily borrowing from devel module)

if (($user->uid == 0) || strstr($_SERVER['PHP_SELF'], 'update.php') || strstr($_GET['q'], 'autocomplete') || $_GET['q'] == 'admin/content/node-settings/rebuild' || $_GET['q'] == 'upload/js' || substr($_GET['q'], 0, strlen('system/files')) == 'system/files') {

-mike

#1

Jeremy - October 30, 2008 - 19:31
Status:active» needs review

Can someone test this and confirm it solves the problem? (Attaching a real patch would certainly help...)

#2

jaydub - April 30, 2009 - 17:35
AttachmentSize
memcache_admin.module.319697.patch 907 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.