Commit 3f0c42d3 authored by Tres Seaver's avatar Tres Seaver

Replaced used of deprecated 'OFS.content_types' module with cognates from 'zope.app.content_types'.

parent ef6057a4
......@@ -32,6 +32,9 @@ Zope Changes
- officially deprecated the zLOG module (to be removed in Zope 2.11).
Use the logging module of Python instead.
- Replaced used of deprecated 'OFS.content_types' module with cognates
from 'zope.app.content_types'.
Zope 2.9.0 (2006/01/09)
Bugs fixed
......
......@@ -18,7 +18,7 @@ import os
import time
from App.config import getConfiguration
from OFS.content_types import guess_content_type
from zope.app.content_types import guess_content_type
from Globals import package_home
from Common import rfc1123_date
from DateTime import DateTime
......
......@@ -16,7 +16,7 @@ $Id$
"""
from ZPublisher.Converters import type_converters
from Globals import HTML, DTMLFile, MessageDialog
from OFS.content_types import guess_content_type
from zope.app.content_types import guess_content_type
from DTMLMethod import DTMLMethod, decapitate
from PropertyManager import PropertyManager
from webdav.common import rfc1123_date
......
......@@ -17,7 +17,7 @@ $Id$
import History
from Globals import HTML, DTMLFile, MessageDialog
from SimpleItem import Item_w__name__, pretty_tb
from OFS.content_types import guess_content_type
from zope.app.content_types import guess_content_type
from PropertyManager import PropertyManager
from AccessControl.Role import RoleManager
from webdav.common import rfc1123_date
......
......@@ -15,7 +15,7 @@
$Id$
"""
import Globals, struct
from OFS.content_types import guess_content_type
from zope.app.content_types import guess_content_type
from Globals import DTMLFile
from PropertyManager import PropertyManager
from AccessControl.Role import RoleManager
......
......@@ -19,7 +19,7 @@ import App.Dialogs, ZClasses, App.Factory, App.ProductRegistry
import ZClassOwner
from AccessControl.PermissionMapping import aqwrap, PermissionMapper
import OFS.content_types
from zope.app.content_types import guess_content_type
from OFS.DTMLMethod import DTMLMethod
from Products.PythonScripts.PythonScript import PythonScript
from zExceptions import BadRequest
......@@ -189,7 +189,7 @@ class ZClassMethodsSheet(
new item uploaded via FTP/WebDAV.
"""
if typ is None:
typ, enc = OFS.content_types.guess_content_type()
typ, enc = guess_content_type()
if typ == 'text/x-python':
return PythonScript( name )
if typ[ :4 ] == 'text':
......
......@@ -175,8 +175,8 @@ def root_handler(config):
# Augment the set of MIME types:
if config.mime_types:
import OFS.content_types
OFS.content_types.add_files(config.mime_types)
import zope.app.content_types
zope.app.content_types.add_files(config.mime_types)
# if no servers are defined, create default http server and ftp server
if not config.servers:
......
......@@ -17,7 +17,7 @@ $Id$
import sys
import Acquisition, OFS.content_types
import Acquisition
import Globals
import OFS.SimpleItem
from AccessControl import getSecurityManager
......@@ -25,6 +25,7 @@ from Globals import Persistent, DTMLFile
from OFS.CopySupport import CopyError
from zExceptions import MethodNotAllowed
from zExceptions import Unauthorized, NotFound, Forbidden, BadRequest
from zope.app.content_types import guess_content_type
import davcmds
from common import aq_base, tokenFinder, IfParser
......@@ -141,7 +142,7 @@ class NullResource(Persistent, Acquisition.Implicit, Resource):
typ=REQUEST.get_header('content-type', None)
if typ is None:
typ, enc=OFS.content_types.guess_content_type(name, body)
typ, enc = guess_content_type(name, body)
factory = getattr(parent, 'PUT_factory', self._default_PUT_factory )
ob = factory(name, typ, body)
......@@ -407,7 +408,7 @@ class LockNullResource(NullResource, OFS.SimpleItem.Item_w__name__):
body = REQUEST.get('BODY', '')
typ = REQUEST.get_header('content-type', None)
if typ is None:
typ, enc = OFS.content_types.guess_content_type(name, body)
typ, enc = guess_content_type(name, body)
factory = getattr(parent, 'PUT_factory', self._default_PUT_factory)
ob = (factory(name, typ, body) or
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment