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