Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

Commit

Permalink
MaKaC -> indico.legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
ThiefMaster authored and pferreir committed Apr 10, 2017
1 parent ae61270 commit 749f96a
Show file tree
Hide file tree
Showing 346 changed files with 409 additions and 508 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
*.pyo
__pycache__/

# makac symlink
/MaKaC

# configs
/etc/*.conf

Expand Down
2 changes: 1 addition & 1 deletion bin/utils/find_unused_templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ fi
echo 'Searching for potentially unused templates.'
echo 'This will take a long time. Why not get some cookies in the meantime?'
echo
find indico/MaKaC/webinterface/tpls/ -maxdepth 1 -name '*.tpl' -exec sh -c 'TPL=$(basename {} .tpl); ag -c --nofilename --silent --ignore indico/translations/ --ignore ext_modules/ $TPL > /dev/null || echo "UNUSED: $TPL"' \;
find indico/legacy/webinterface/tpls/ -maxdepth 1 -name '*.tpl' -exec sh -c 'TPL=$(basename {} .tpl); ag -c --nofilename --silent --ignore indico/translations/ --ignore ext_modules/ $TPL > /dev/null || echo "UNUSED: $TPL"' \;
24 changes: 0 additions & 24 deletions indico/MaKaC/common/logger.py

This file was deleted.

2 changes: 1 addition & 1 deletion indico/core/celery/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from celery import current_task

from indico.core.logger import Logger
from MaKaC.common.cache import GenericCache
from indico.legacy.common.cache import GenericCache


def locked_task(f):
Expand Down
4 changes: 2 additions & 2 deletions indico/core/celery/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

from __future__ import unicode_literals

from MaKaC.webinterface.pages.admins import WPAdminsBase
from MaKaC.webinterface.pages.base import WPJinjaMixin
from indico.legacy.webinterface.pages.admins import WPAdminsBase
from indico.legacy.webinterface.pages.base import WPJinjaMixin


class WPCelery(WPJinjaMixin, WPAdminsBase):
Expand Down
9 changes: 4 additions & 5 deletions indico/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from werkzeug.urls import url_parse

import indico
import MaKaC
from indico.util.contextManager import ContextManager


Expand Down Expand Up @@ -281,7 +280,7 @@ class Config:
if sys.platform == 'win32':
default_values.update({
"ConfigurationDir" : "C:\\indico\\etc",
"HtdocsDir" : "C:\\Program Files\\Apache Group\\Apache2\\htdocs\\MaKaC",
"HtdocsDir" : "C:\\Program Files\\Apache Group\\Apache2\\htdocs\\indico",
"LogDir" : "C:\\indico\\log",
"BinDir" : "C:\\indico\\archive",
"UploadedFilesTempDir" : "C:\\indico\\temp",
Expand Down Expand Up @@ -311,7 +310,7 @@ def update(self, **options):
self._deriveOptions()

def _deriveOptions(self):
webinterface_dir = os.path.join(os.path.dirname(MaKaC.__file__), 'webinterface')
webinterface_dir = os.path.join(os.path.dirname(indico.__file__), 'legacy/webinterface')

override = os.environ.get('INDICO_CONF_OVERRIDE')
if override:
Expand All @@ -323,7 +322,7 @@ def _deriveOptions(self):
# THIS IS THE PLACE TO ADD NEW SHORTHAND OPTIONS, DONT CREATE A FUNCTION IF THE VALUE NEVER CHANGES,
# config.py will become fat again if you don't follow this advice.
self._configVars.update({
'TPLVars' : {"MaKaCHomeURL": self.getBaseURL()},
'TPLVars' : {},
'FileTypes' : FILE_TYPES,
'HelpDir' : os.path.join(self.getHtdocsDir(), 'ihelp'),
'StylesheetsDir' : os.path.join(webinterface_dir, 'stylesheets'),
Expand Down Expand Up @@ -381,7 +380,7 @@ def __readConfigFile(self):

self._configVars = {}

from MaKaC.errors import MaKaCError
from indico.legacy.errors import MaKaCError

# When populating configuration variables indico.conf's values have priority
config_path = self.__get_config_path()
Expand Down
5 changes: 1 addition & 4 deletions indico/core/db/sqlalchemy/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from __future__ import absolute_import

import logging
import os
import pprint
import time
import traceback
Expand All @@ -43,9 +42,7 @@ def _interesting_tb_item(item, paths):


def _get_sql_line():
indico_path = current_app.root_path
makac_path = os.path.abspath(os.path.join(indico_path, '..', 'MaKaC'))
paths = [indico_path, makac_path] + [p.root_path for p in plugin_engine.get_active_plugins().itervalues()]
paths = [current_app.root_path] + [p.root_path for p in plugin_engine.get_active_plugins().itervalues()]
stack = [item for item in reversed(traceback.extract_stack()) if _interesting_tb_item(item, paths)]
for i, item in enumerate(stack):
return {'file': item[0],
Expand Down
2 changes: 1 addition & 1 deletion indico/core/fossils/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with Indico; if not, see <http://www.gnu.org/licenses/>.


from MaKaC.common.fossilize import IFossil
from indico.legacy.common.fossilize import IFossil


class IErrorReportFossil(IFossil):
Expand Down
2 changes: 1 addition & 1 deletion indico/core/fossils/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with Indico; if not, see <http://www.gnu.org/licenses/>.


from MaKaC.common.fossilize import IFossil
from indico.legacy.common.fossilize import IFossil


class IErrorReportFossil(IFossil):
Expand Down
2 changes: 1 addition & 1 deletion indico/core/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def configFromFile(cls, fname, defaultArgs, filters):
else:
formatters = {}

# Really ugly.. but logging fails to import MaKaC.common.logger.IndicoMailFormatter
# Really ugly.. but logging fails to import indico.legacy.common.logger.IndicoMailFormatter
# when using it in the class= option...
if 'mailFormatter' in formatters:
f = formatters.get('mailFormatter')
Expand Down
2 changes: 1 addition & 1 deletion indico/core/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from types import GeneratorType

from indico.core.config import Config
from MaKaC.common.mail import GenericMailer
from indico.legacy.common.mail import GenericMailer


def email_sender(fn):
Expand Down
2 changes: 1 addition & 1 deletion indico/core/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
from indico.web.flask.wrappers import IndicoBlueprint, IndicoBlueprintSetupState
from indico.web.menu import SideMenuItem

from MaKaC.webinterface.pages.base import WPJinjaMixin
from indico.legacy.webinterface.pages.base import WPJinjaMixin


class PluginCategory(unicode, IndicoEnum):
Expand Down
4 changes: 2 additions & 2 deletions indico/core/plugins/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

from __future__ import unicode_literals

from MaKaC.webinterface.pages.admins import WPAdminsBase
from MaKaC.webinterface.pages.base import WPJinjaMixin
from indico.legacy.webinterface.pages.admins import WPAdminsBase
from indico.legacy.webinterface.pages.base import WPJinjaMixin


class WPPlugins(WPJinjaMixin, WPAdminsBase):
Expand Down
16 changes: 0 additions & 16 deletions indico/htdocs/__init__.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
from indico.util import mdx_latex
from indico.util.i18n import _
from indico.util.string import render_markdown, sanitize_for_platypus, to_unicode
from MaKaC.common.TemplateExec import render as tpl_render
from MaKaC.common.utils import isStringHTML
from indico.legacy.common.TemplateExec import render as tpl_render
from indico.legacy.common.utils import isStringHTML


ratio = math.sqrt(math.sqrt(2.0))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
from indico.util.date_time import format_date, format_datetime, format_time, format_human_timedelta
from indico.util.i18n import i18nformat, ngettext, _
from indico.util.string import html_color_to_rgb, to_unicode, truncate
from MaKaC.PDFinterface.base import (escape, PDFLaTeXBase, PDFBase, PDFWithTOC, Paragraph, Spacer, PageBreak,
from indico.legacy.PDFinterface.base import (escape, PDFLaTeXBase, PDFBase, PDFWithTOC, Paragraph, Spacer, PageBreak,
modifiedFontSize)
from MaKaC.common import utils
from MaKaC.common.timezoneUtils import DisplayTZ, nowutc
from MaKaC.webinterface.common.tools import strip_ml_tags
from indico.legacy.common import utils
from indico.legacy.common.timezoneUtils import DisplayTZ, nowutc
from indico.legacy.webinterface.common.tools import strip_ml_tags

styles = getSampleStyleSheet()

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from MaKaC.common.contextManager import ContextManager
from indico.legacy.common.contextManager import ContextManager


class AccessWrapper:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
import re
import posixpath
from indico.core.config import Config
from MaKaC.common.utils import formatDateTime, formatDate, formatTime, formatDuration
from indico.legacy.common.utils import formatDateTime, formatDate, formatTime, formatDuration
from mako.lookup import TemplateLookup
import mako.exceptions as exceptions
import MaKaC
import indico.legacy
import xml.sax.saxutils

from indico.modules.auth.util import url_for_login, url_for_logout
Expand Down Expand Up @@ -120,7 +120,7 @@ def inlineContextHelp(helpContent):
Allows you to put [?], the context help marker.
Help content passed as argument helpContent.
"""
from MaKaC.webinterface.wcomponents import WTemplated
from indico.legacy.webinterface.wcomponents import WTemplated
params = {"helpContent" : helpContent,
"imgSrc" : Config.getInstance().getSystemIconURL("help")}
return WTemplated('InlineContextHelp').getHTML(params)
Expand All @@ -131,7 +131,7 @@ def contextHelp(helpId):
Allows you to put [?], the context help marker.
Help content is defined in <div id="helpId"></div>.
"""
from MaKaC.webinterface.wcomponents import WTemplated
from indico.legacy.webinterface.wcomponents import WTemplated
params = {"helpId" : helpId,
"imgSrc" : Config.getInstance().getSystemIconURL("help")}
return WTemplated('ContextHelp').getHTML(params)
Expand Down Expand Up @@ -331,7 +331,7 @@ def registerHelpers(objDict):
if not 'jsBoolean' in objDict:
objDict['jsBoolean'] = jsBoolean
if not 'jsonEncode' in objDict:
from MaKaC.services.interface.rpc.json import encode as jsonEncode
from indico.legacy.services.interface.rpc.json import encode as jsonEncode
objDict['jsonEncode'] = jsonEncode
if not 'roomBookingActive' in objDict:
objDict['roomBookingActive'] = Config.getInstance().getIsRoomBookingActive()
Expand All @@ -354,7 +354,7 @@ def registerHelpers(objDict):
objDict['latex_escape'] = latex_escape
# allow fossilization
if not 'fossilize' in objDict:
from MaKaC.common.fossilize import fossilize
from indico.legacy.common.fossilize import fossilize
objDict['fossilize'] = fossilize
if not 'N_' in objDict:
objDict['ngettext'] = ngettext
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
from indico.core.config import Config
from indico.core.logger import Logger
from indico.util.fs import silentremove
from MaKaC.common.contextManager import ContextManager
from MaKaC.common.utils import OSSpecific
from indico.legacy.common.contextManager import ContextManager
from indico.legacy.common.utils import OSSpecific


# To cache `None` we need to actually store something else since memcached
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import zipfile

from indico.core.config import Config
from MaKaC.common.utils import utf8rep
from indico.legacy.common.utils import utf8rep


class ZIPFileHandler:
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions indico/MaKaC/common/mail.py → indico/legacy/common/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
from indico.util.event import unify_event_args
from indico.util.i18n import _
from indico.util.string import to_unicode
from MaKaC.errors import MaKaCError
from indico.legacy.errors import MaKaCError

from MaKaC.common.contextManager import ContextManager
from indico.legacy.common.contextManager import ContextManager

# Prevent base64 encoding of utf-8 e-mails
charset.add_charset('utf-8', charset.SHORTEST)
Expand All @@ -39,7 +39,7 @@ class GenericMailer:
def send(cls, notification, skipQueue=False):
if isinstance(notification, dict):
# Wrap a raw dictionary in a notification class
from MaKaC.webinterface.mail import GenericNotification
from indico.legacy.webinterface.mail import GenericNotification
notification = GenericNotification(notification)
# enqueue emails if we have a rh and do not skip queuing, otherwise send immediately
rh = ContextManager.get('currentRH', None)
Expand Down Expand Up @@ -150,7 +150,7 @@ def sendAndLog(cls, notification, event, module=None, user=None, skipQueue=False
from indico.modules.events.logs import EventLogRealm, EventLogKind
if isinstance(notification, dict):
# Wrap a raw dictionary in a notification class
from MaKaC.webinterface.mail import GenericNotification
from indico.legacy.webinterface.mail import GenericNotification
notification = GenericNotification(notification)
cls.send(notification, skipQueue=skipQueue)
log_data = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,28 @@
# You should have received a copy of the GNU General Public License
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

import errno
import inspect
import itertools
import os
import posixpath
import re
import shutil
from contextlib import contextmanager

import requests
from bs4 import BeautifulSoup
from flask import current_app, request
from werkzeug.utils import secure_filename

from MaKaC.common.contribPacker import ZIPFileHandler
from MaKaC.common import timezoneUtils
from MaKaC.PDFinterface.conference import ProgrammeToPDF, AbstractBook, ContribToPDF, ContribsToPDF
from MaKaC.webinterface.pages.static import (WPStaticAuthorList, WPStaticConferenceDisplay, WPStaticConferenceProgram,
WPStaticContributionDisplay, WPStaticContributionList, WPStaticCustomPage,
WPStaticDisplayRegistrationParticipantList, WPStaticSessionDisplay,
WPStaticSpeakerList, WPStaticSubcontributionDisplay, WPStaticTimetable,
WPTPLStaticConferenceDisplay)
from MaKaC.webinterface.rh.base import RH
from indico.legacy.common.contribPacker import ZIPFileHandler
from indico.legacy.common import timezoneUtils
from indico.legacy.PDFinterface.conference import ProgrammeToPDF, AbstractBook, ContribToPDF, ContribsToPDF
from indico.legacy.webinterface.pages.static import (WPStaticAuthorList, WPStaticConferenceDisplay,
WPStaticConferenceProgram, WPStaticContributionDisplay,
WPStaticContributionList, WPStaticCustomPage,
WPStaticDisplayRegistrationParticipantList, WPStaticSessionDisplay,
WPStaticSpeakerList, WPStaticSubcontributionDisplay,
WPStaticTimetable, WPTPLStaticConferenceDisplay)
from indico.legacy.webinterface.rh.base import RH

from indico.core.config import Config
from indico.modules.attachments.models.attachments import AttachmentType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from lxml import etree

from xmlGen import XMLGen
from MaKaC.common.TemplateExec import escapeHTMLForJS
from indico.legacy.common.TemplateExec import escapeHTMLForJS

from indico.core.config import Config
from indico.modules.attachments.models.attachments import AttachmentType, Attachment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
# along with Indico; if not, see <http://www.gnu.org/licenses/>.

from indico.core.config import Config
from MaKaC.common.utils import encodeUnicode
from indico.legacy.common.utils import encodeUnicode

from MaKaC.errors import MaKaCError, HtmlForbiddenTag
from MaKaC.webinterface.common.tools import escape_html, restrictedHTML
from indico.legacy.errors import MaKaCError, HtmlForbiddenTag
from indico.legacy.webinterface.common.tools import escape_html, restrictedHTML

"""
base module for HTML security
Expand Down
File renamed without changes.
Loading

0 comments on commit 749f96a

Please sign in to comment.