From f4cad3ea00b464ebd9081f6c8390c17b721661d1 Mon Sep 17 00:00:00 2001 From: Piotr Kaczmarek Date: Fri, 29 Apr 2011 21:40:17 +0200 Subject: [PATCH 003/320] add web-based translation tool directory --HG-- branch : gsoc2011-kerozcak --- code/ryzom/tools/server/www/phrases/index.php | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 code/ryzom/tools/server/www/phrases/index.php diff --git a/code/ryzom/tools/server/www/phrases/index.php b/code/ryzom/tools/server/www/phrases/index.php new file mode 100644 index 000000000..cd1ee3d6b --- /dev/null +++ b/code/ryzom/tools/server/www/phrases/index.php @@ -0,0 +1,3 @@ + \ No newline at end of file From cddb66027e39adae589585e444ff6485fcd597f6 Mon Sep 17 00:00:00 2001 From: cemycc Date: Fri, 29 Apr 2011 22:58:59 +0300 Subject: [PATCH 004/320] Create directory for the Translation Manager plugin --HG-- branch : gsoc2011-translationovqt --- .../object_viewer_qt/src/plugins/translation_manager/README | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/README diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/README b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/README new file mode 100644 index 000000000..b182bfdcf --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/README @@ -0,0 +1,5 @@ +Translation Manager Plugin +-------------------------- +GSoC 2011 Project +http://dev.ryzom.com/wiki/ryzom/OVQTTranslationPluginGSoc2011 + From f5a42f16de89523acf50bf5fdb5d87dd9c4cd9a3 Mon Sep 17 00:00:00 2001 From: sfb Date: Sun, 8 May 2011 14:59:27 -0500 Subject: [PATCH 005/320] Changed: Started fixing up the menus. --- .../zone_painter/zone_painter_model.cpp | 40 ++++++++++++++++++ .../plugins/zone_painter/zone_painter_model.h | 42 +++++++++++++++++++ .../zone_painter/zone_painter_plugin.cpp | 32 ++++++++------ .../zone_painter/zone_painter_plugin.h | 5 +++ 4 files changed, 107 insertions(+), 12 deletions(-) create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_model.cpp create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_model.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_model.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_model.cpp new file mode 100644 index 000000000..4ab93d62d --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_model.cpp @@ -0,0 +1,40 @@ +// Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2011 Dzmitry Kamiahin +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "zone_painter_model.h" + +// STL includes + +// Qt includes + +// NeL includes + +namespace Plugin +{ + +CZonePainterModel::CZonePainterModel() +{ + +} + +CZonePainterModel::~CZonePainterModel() +{ + +} + +} /* namespace Plugin */ + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_model.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_model.h new file mode 100644 index 000000000..259634b63 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_model.h @@ -0,0 +1,42 @@ +// Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2011 Dzmitry Kamiahin +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#ifndef ZONE_PAINTER_MODEL_H +#define ZONE_PAINTER_MODEL_H + +// NeL includes +#include +#include +#include + +// Qt includes + +namespace Plugin +{ + +class CZonePainterModel +{ +public: + CZonePainterModel(); + virtual ~CZonePainterModel(); + +}; /* class CZonePainterModel */ + +} /* namespace Plugin */ + + +#endif // ZONE_PAINTER_MODEL_H diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.cpp index 7b8237ccb..bfd310e95 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.cpp @@ -16,6 +16,7 @@ #include #include #include +#include namespace Plugin { @@ -37,6 +38,7 @@ bool ZonePainterPlugin::initialize(ExtensionSystem::IPluginManager *pluginManage addAutoReleasedObject(new CZonePainterSettingsPage(this)); addAutoReleasedObject(new CZonePainterContext(this)); //addAutoReleasedObject(new CCoreListener(this)); + return true; } @@ -44,20 +46,26 @@ void ZonePainterPlugin::extensionsInitialized() { Core::ICore *core = Core::ICore::instance(); Core::IMenuManager *menuManager = core->menuManager(); - //menuManager = _plugMan->getObject(); - QAction *exampleAction1 = new QAction("Zone1", this); - QAction *exampleAction2 = new QAction("Zone2", this); - QAction *aboutQtAction = menuManager->action(Core::Constants::ABOUT_QT); - QMenu *helpMenu = menuManager->menu(Core::Constants::M_HELP); - helpMenu->insertAction(aboutQtAction, exampleAction1); - helpMenu->addSeparator(); - helpMenu->addAction(exampleAction2); - QMenu *zoneMenu = menuManager->menuBar()->addMenu("ZoneMenu"); - zoneMenu->insertAction(aboutQtAction, exampleAction1); - zoneMenu->addSeparator(); - zoneMenu->addAction(exampleAction2); + QAction *loadZoneAction = new QAction("Load Zone", this); + QAction *saveZoneAction = new QAction("Save Zone", this); + + QMenu *toolsMenu = menuManager->menu(Core::Constants::M_TOOLS); + QMenu *zoneMenu = toolsMenu->addMenu("Zone Painter"); + zoneMenu->addAction(loadZoneAction); + connect(loadZoneAction, SIGNAL(triggered()), this, SLOT(clickLoadZoneAction())); + zoneMenu->addAction(saveZoneAction); } +/****** SLOTS ******/ +void ZonePainterPlugin::clickLoadZoneAction() { + QString zoneFile = QFileDialog::getOpenFileName(NULL, tr("Open Zone File"), ".", tr("Zone Files (*.zone);;")); +} + +void ZonePainterPlugin::clickSaveZoneAction() { + +} +/****** END SLOTS ******/ + void ZonePainterPlugin::setNelContext(NLMISC::INelContext *nelContext) { #ifdef NL_OS_WINDOWS diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h index aeae39ba6..2731637ed 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h @@ -65,7 +65,10 @@ public: QObject *objectByName(const QString &name) const; ExtensionSystem::IPluginSpec *pluginByName(const QString &name) const; +public Q_SLOTS: + void clickLoadZoneAction(); + void clickSaveZoneAction(); protected: NLMISC::CLibraryContext *_LibContext; @@ -73,6 +76,8 @@ protected: private: ExtensionSystem::IPluginManager *_plugMan; QList _autoReleaseObjects; + + NL3D::CLandscapeModel *m_Landscape; }; class CZonePainterContext: public Core::IContext From f47f5a3799b315b06cdaab759c421b265cb58ef5 Mon Sep 17 00:00:00 2001 From: cemycc Date: Wed, 25 May 2011 00:06:07 +0300 Subject: [PATCH 006/320] first stage for my plugin --HG-- branch : gsoc2011-translationovqt --- .../tools/3d/object_viewer_qt/src/plugins/CMakeLists.txt | 3 ++- .../src/plugins/object_viewer/scheme_manager.h | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/CMakeLists.txt index d5a792acd..125c0c8c4 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/CMakeLists.txt @@ -4,4 +4,5 @@ ADD_SUBDIRECTORY(ovqt_sheet_builder) ADD_SUBDIRECTORY(log) ADD_SUBDIRECTORY(disp_sheet_id) ADD_SUBDIRECTORY(object_viewer) -ADD_SUBDIRECTORY(zone_painter) \ No newline at end of file +ADD_SUBDIRECTORY(zone_painter) +ADD_SUBDIRECTORY(translation_manager) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_manager.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_manager.h index 01a2abb35..7b06734f2 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_manager.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_manager.h @@ -27,8 +27,8 @@ namespace NL3D { class CPSAttribMakerBase; } - -namespace NLQT + +namespace NLQT { class CSchemeManager @@ -51,11 +51,11 @@ public: // rename a scheme, given a pointer on it void rename(NL3D::CPSAttribMakerBase *am, const std::string &newName); protected: - typedef std::pair TSchemeInfo; + // typedef std::pair TSchemeInfo; typedef std::multimap TSchemeMap; TSchemeMap _SchemeMap; }; } /* namespace NLQT */ -#endif \ No newline at end of file +#endif From 9dab149983def5b077e99fa0924c310fb24a1915 Mon Sep 17 00:00:00 2001 From: cemycc Date: Wed, 25 May 2011 00:07:32 +0300 Subject: [PATCH 007/320] first stage for my plugin --HG-- branch : gsoc2011-translationovqt --- .../translation_manager/CMakeLists.txt | 41 ++++ .../translation_manager/qnel_widget.cpp | 197 ++++++++++++++++++ .../plugins/translation_manager/qnel_widget.h | 130 ++++++++++++ .../translation_manager/simple_viewer.cpp | 54 +++++ .../translation_manager/simple_viewer.h | 54 +++++ .../translation_manager_plugin.cpp | 122 +++++++++++ .../translation_manager_plugin.h | 94 +++++++++ .../translation_manager_settings_page.cpp | 67 ++++++ .../translation_manager_settings_page.h | 58 ++++++ .../translation_manager_settings_page.ui | 92 ++++++++ 10 files changed, 909 insertions(+) create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/qnel_widget.cpp create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/qnel_widget.h create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/simple_viewer.cpp create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/simple_viewer.h create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.cpp create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.h create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.cpp create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.h create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt new file mode 100644 index 000000000..ce85c682e --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt @@ -0,0 +1,41 @@ +INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${LIBXML2_INCLUDE_DIR} + ${QT_INCLUDES}) + +FILE(GLOB SRC *.cpp *.h) + +SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h + ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_manager.h + ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h) + +SET(OVQT_PLUG_TRANSLATION_MANAGER_HDR translation_manager_plugin.h + qnel_widget.h + simple_viewer.h + translation_manager_settings_page.h) + +SET(OVQT_PLUG_TRANSLATION_MANAGER_UIS translation_manager_settings_page.ui) + +SET(QT_USE_QTGUI TRUE) +SET(QT_USE_QTOPENGL TRUE) + +QT4_WRAP_CPP(OVQT_PLUG_TRANSLATION_MANAGER_MOC_SRC ${OVQT_PLUG_TRANSLATION_MANAGER_HDR}) +QT4_WRAP_UI(OVQT_PLUG_TRANSLATION_MANAGER_UI_HDRS ${OVQT_PLUG_TRANSLATION_MANAGER_UIS}) + +SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_TRANSLATION_MANAGER_UIS}) +SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_TRANSLATION_MANAGER_UI_HDRS}) +SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_TRANSLATION_MANAGER_MOC_SRC}) +SOURCE_GROUP("Translation Manager Plugin" FILES ${SRC}) +SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) + +ADD_LIBRARY(ovqt_plugin_translation_manager MODULE ${SRC} ${OVQT_PLUG_TRANSLATION_MANAGER_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_TRANSLATION_MANAGER_UI_HDRS}) + +TARGET_LINK_LIBRARIES(ovqt_plugin_translation_manager ovqt_plugin_core nelmisc nel3d ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY}) + +NL_DEFAULT_PROPS(ovqt_plugin_translation_manager "NeL, Tools, 3D: Object Viewer Qt Plugin: Translation Manager") +NL_ADD_RUNTIME_FLAGS(ovqt_plugin_translation_manager) +NL_ADD_LIB_SUFFIX(ovqt_plugin_translation_manager) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) + +INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/qnel_widget.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/qnel_widget.cpp new file mode 100644 index 000000000..9a67abb80 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/qnel_widget.cpp @@ -0,0 +1,197 @@ +// Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2011 Dzmitry Kamiahin +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "qnel_widget.h" + +// STL includes + +// Qt includes +#include +#include + +// NeL includes +#include +#include +#include +#include + +namespace NLQT +{ + +QNLWidget::QNLWidget(QWidget *parent) + : QNeLWidget(parent), + m_driver(NULL), + m_initialized(false), + m_interval(25) +{ + setMouseTracking(true); + setFocusPolicy(Qt::StrongFocus); + + init(); +#ifdef Q_OS_LINUX + makeCurrent(); +#endif + m_mainTimer = new QTimer(this); + connect(m_mainTimer, SIGNAL(timeout()), this, SLOT(updateRender())); +} + +QNLWidget::~QNLWidget() +{ + release(); +} + +void QNLWidget::init() +{ + // create the driver + m_driver = NL3D::UDriver::createDriver(NULL, false, NULL); + nlassert(m_driver); + + // initialize the nel 3d viewport + m_driver->setDisplay((nlWindow)winId(), NL3D::UDriver::CMode(width(), height(), 32)); + + // set the cache size for the font manager(in bytes) + m_driver->setFontManagerMaxMemory(2097152); + + m_initialized = true; +} + +void QNLWidget::release() +{ + m_mainTimer->stop(); + delete m_mainTimer; + if (m_initialized) + { + m_driver->release(); + delete m_driver; + m_driver = NULL; + } +} + +void QNLWidget::setInterval(int msec) +{ + m_interval = msec; + m_mainTimer->setInterval(msec); +} + +void QNLWidget::setBackgroundColor(NLMISC::CRGBA backgroundColor) +{ + m_backgroundColor = backgroundColor; +} + +void QNLWidget::updateRender() +{ + if (isVisible()) + { + if (m_initialized) + m_driver->EventServer.pump(); + Q_EMIT updateData(); + + // Calc FPS + static sint64 lastTime = NLMISC::CTime::getPerformanceTime (); + sint64 newTime = NLMISC::CTime::getPerformanceTime (); + m_fps = float(1.0 / NLMISC::CTime::ticksToSecond (newTime-lastTime)); + lastTime = newTime; + + if (m_initialized && !m_driver->isLost()) + { + //_driver->activate(); + m_driver->clearBuffers(m_backgroundColor); + Q_EMIT updatePreRender(); + + Q_EMIT updatePostRender(); + // swap 3d buffers + m_driver->swapBuffers(); + } + } +} + +void QNLWidget::showEvent(QShowEvent *showEvent) +{ + QWidget::showEvent(showEvent); + m_driver->activate(); + m_mainTimer->start(m_interval); +} + +void QNLWidget::hideEvent(QHideEvent *hideEvent) +{ + m_mainTimer->stop(); + QWidget::hideEvent(hideEvent); +} + +#if defined(NL_OS_WINDOWS) + +typedef bool (*winProc)(NL3D::IDriver *driver, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); + +bool QNLWidget::winEvent(MSG *message, long *result) +{ + if (m_driver && m_driver->isActive()) + { + NL3D::IDriver *driver = dynamic_cast(m_driver)->getDriver(); + if (driver) + { + winProc proc = (winProc)driver->getWindowProc(); + return proc(driver, message->hwnd, message->message, message->wParam, message->lParam); + } + } + + return false; +} + +#elif defined(NL_OS_MAC) + +typedef bool (*cocoaProc)(NL3D::IDriver *, const void *e); + +bool QNLWidget::macEvent(EventHandlerCallRef caller, EventRef event) +{ + if(caller) + nlerror("You are using QtCarbon! Only QtCocoa supported, please upgrade Qt"); + + if (m_driver && m_driver->isActive()) + { + NL3D::IDriver *driver = dynamic_cast(m_driver)->getDriver(); + if (driver) + { + cocoaProc proc = (cocoaProc)driver->getWindowProc(); + return proc(driver, event); + } + } + + return false; +} + +#elif defined(NL_OS_UNIX) + +typedef bool (*x11Proc)(NL3D::IDriver *drv, XEvent *e); + +bool QNLWidget::x11Event(XEvent *event) +{ + if (m_driver && m_driver->isActive()) + { + NL3D::IDriver *driver = dynamic_cast(m_driver)->getDriver(); + if (driver) + { + x11Proc proc = (x11Proc)driver->getWindowProc(); + return proc(driver, event); + } + } + + return false; +} +#endif + +} /* namespace NLQT */ + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/qnel_widget.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/qnel_widget.h new file mode 100644 index 000000000..a54e6bb8a --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/qnel_widget.h @@ -0,0 +1,130 @@ +// Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2011 Dzmitry Kamiahin +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#ifndef QNEL_WIDGET_H +#define QNEL_WIDGET_H + +// NeL includes +#include +#include +#include + +// Qt includes +#include +#include + +class QAction; + +/* TODO every platform should use QWidget */ +#if defined(NL_OS_WINDOWS) +typedef QWidget QNeLWidget; +#elif defined(NL_OS_MAC) +typedef QWidget QNeLWidget; +#elif defined(NL_OS_UNIX) +typedef QGLWidget QNeLWidget; +#endif // NL_OS_UNIX + +namespace NL3D +{ +class UDriver; +class UScene; +} + +namespace NLQT +{ + +/** +@class QNLWidget +@brief Responsible for interaction between Qt and NeL. +@details Automatically begins to update the render if the widget is visible +or suspends the updating of render if the widget is hidden. +*/ +class QNLWidget : public QNeLWidget +{ + Q_OBJECT + +public: + QNLWidget(QWidget *parent); + virtual ~QNLWidget(); + + /// Set the update interval renderer + void setInterval(int msec); + + /// Set the background color. + void setBackgroundColor(NLMISC::CRGBA backgroundColor); + + float fps() const + { + return m_fps; + } + + inline NLMISC::CRGBA backgroundColor() const + { + return m_backgroundColor; + } + + NL3D::UDriver *driver() const + { + return m_driver; + } + + virtual QPaintEngine* paintEngine() const + { + return NULL; + } +Q_SIGNALS: + void updateData(); + void updatePreRender(); + void updatePostRender(); + +private Q_SLOTS: + void updateRender(); + +protected: + virtual void showEvent(QShowEvent *showEvent); + virtual void hideEvent(QHideEvent *hideEvent); + +#if defined(NL_OS_WINDOWS) + virtual bool winEvent(MSG *message, long *result); +#elif defined(NL_OS_MAC) + virtual bool macEvent(EventHandlerCallRef caller, EventRef event); +#elif defined(NL_OS_UNIX) + virtual bool x11Event(XEvent *event); +#endif + +private: + void init(); + void release(); + + QNLWidget(const QNLWidget &); + QNLWidget &operator=(const QNLWidget &); + + NL3D::UDriver *m_driver; + NLMISC::CRGBA m_backgroundColor; + + QTimer *m_mainTimer; + + bool m_initialized; + int m_interval; + float m_fps; + +}; /* class QNLWidget */ + +} /* namespace NLQT */ + + +#endif // QNEL_WIDGET_H diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/simple_viewer.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/simple_viewer.cpp new file mode 100644 index 000000000..e128710c4 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/simple_viewer.cpp @@ -0,0 +1,54 @@ +// Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2011 Dzmitry Kamiahin +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "simple_viewer.h" + +// Qt includes +#include +#include +#include + +// NeL includes + +// Project includes + +namespace Plugin +{ + +CSimpleViewer::CSimpleViewer(QWidget *parent) + : QWidget(parent) +{ + QGridLayout *gridLayout = new QGridLayout(this); + gridLayout->setObjectName(QString::fromUtf8("gridLayoutSimpleViewer")); + gridLayout->setContentsMargins(0, 0, 0, 0); + NLQT::QNLWidget *_nelWidget = new NLQT::QNLWidget(this); + gridLayout->addWidget(_nelWidget, 0, 0, 1, 1); +} + +bool CCoreListener::closeMainWindow() const +{ + int ret = QMessageBox::question(0, tr("Example close event hook"), + tr("Do you want to close window?"), + QMessageBox::Yes | QMessageBox::No); + + if (ret == QMessageBox::Yes) + return true; + else + return false; +} + +} /* namespace Plugin */ \ No newline at end of file diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/simple_viewer.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/simple_viewer.h new file mode 100644 index 000000000..bbff7e9e0 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/simple_viewer.h @@ -0,0 +1,54 @@ +// Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2011 Dzmitry Kamiahin +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + + +#ifndef SIMPLE_VIEWER_H +#define SIMPLE_VIEWER_H + +// Project includes +#include "qnel_widget.h" +#include "../core/icore_listener.h" + +// Qt includes +#include + +class QWidget; + +namespace Plugin +{ + +class CSimpleViewer : public QWidget +{ + Q_OBJECT +public: + CSimpleViewer(QWidget *parent = 0); + virtual ~CSimpleViewer() {} +}; + +class CCoreListener : public Core::ICoreListener +{ + Q_OBJECT +public: + CCoreListener(QObject *parent = 0): ICoreListener(parent) {} + virtual ~CCoreListener() {} + + virtual bool closeMainWindow() const; +}; + +} // namespace Plugin + +#endif // SIMPLE_VIEWER_H diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.cpp new file mode 100644 index 000000000..6140a3985 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.cpp @@ -0,0 +1,122 @@ +// Project includes +#include "translation_manager_plugin.h" +#include "translation_manager_settings_page.h" +#include "simple_viewer.h" +// Project system includes +#include "../core/icore.h" +#include "../core/core_constants.h" +#include "../core/imenu_manager.h" +#include "../../extension_system/iplugin_spec.h" + +// NeL includes +#include "nel/misc/debug.h" + +// Qt includes +#include +#include +#include +#include +#include +#include + +namespace Plugin +{ +TranslationManagerPlugin::~TranslationManagerPlugin() +{ + Q_FOREACH(QObject *obj, _autoReleaseObjects) + { + _plugMan->removeObject(obj); + } + qDeleteAll(_autoReleaseObjects); + _autoReleaseObjects.clear(); +} + +bool TranslationManagerPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) +{ + Q_UNUSED(errorString); + _plugMan = pluginManager; + + addAutoReleasedObject(new CTranslationManagerSettingsPage(this)); + addAutoReleasedObject(new CTranslationManagerContext(this)); + addAutoReleasedObject(new CCoreListener(this)); + return true; +} + +void TranslationManagerPlugin::extensionsInitialized() +{ + Core::ICore *core = Core::ICore::instance(); + Core::IMenuManager *menuManager = core->menuManager(); + //menuManager = _plugMan->getObject(); + // Menu Actions for plugin + QAction *aboutTManPlugin = new QAction("Translation Manager", this); + // Locations + QMenu *helpMenu = menuManager->menu(Core::Constants::M_HELP); + QAction *aboutQtAction = menuManager->action(Core::Constants::ABOUT_QT); + helpMenu->addSeparator(); + helpMenu->insertAction(aboutQtAction, aboutTManPlugin); + menuManager->menuBar()->addMenu("Translation Manager"); +} + +void TranslationManagerPlugin::setNelContext(NLMISC::INelContext *nelContext) +{ +#ifdef NL_OS_WINDOWS + // Ensure that a context doesn't exist yet. + // This only applies to platforms without PIC, e.g. Windows. + nlassert(!NLMISC::INelContext::isContextInitialised()); +#endif // NL_OS_WINDOWS + _LibContext = new NLMISC::CLibraryContext(*nelContext); +} + +QString TranslationManagerPlugin::name() const +{ + return "Translation Manager"; +} + +QString TranslationManagerPlugin::version() const +{ + return "0.1"; +} + +QString TranslationManagerPlugin::vendor() const +{ + return "cemycc"; +} + +QString TranslationManagerPlugin::description() const +{ + return "OVQT plugin for translation files."; +} + +QStringList TranslationManagerPlugin::dependencies() const +{ + QStringList list; + list.append(Core::Constants::OVQT_CORE_PLUGIN); + list.append("ObjectViewer"); + return list; +} + +void TranslationManagerPlugin::addAutoReleasedObject(QObject *obj) +{ + _plugMan->addObject(obj); + _autoReleaseObjects.prepend(obj); +} + +QObject* TranslationManagerPlugin::objectByName(const QString &name) const +{ + Q_FOREACH (QObject *qobj, _plugMan->allObjects()) + if (qobj->objectName() == name) + return qobj; + return 0; +} + +ExtensionSystem::IPluginSpec *TranslationManagerPlugin::pluginByName(const QString &name) const +{ + Q_FOREACH (ExtensionSystem::IPluginSpec *spec, _plugMan->plugins()) + if (spec->name() == name) + return spec; + return 0; +} + +} + +Q_EXPORT_PLUGIN(Plugin::TranslationManagerPlugin) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.h new file mode 100644 index 000000000..c1bfc2548 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.h @@ -0,0 +1,94 @@ +#ifndef TRANSLATION_MANAGER_PLUGIN_H +#define TRANSLATION_MANAGER_PLUGIN_H + +// Project includes +#include "../../extension_system/iplugin.h" +#include "../core/icontext.h" +#include "simple_viewer.h" + +// NeL includes +#include "nel/misc/app_context.h" + +// Qt includes +#include +#include + +namespace NLMISC +{ +class CLibraryContext; +} + +namespace ExtensionSystem +{ +class IPluginSpec; +} + +namespace Plugin +{ + +class TranslationManagerPlugin : public QObject, public ExtensionSystem::IPlugin +{ + Q_OBJECT + Q_INTERFACES(ExtensionSystem::IPlugin) +public: + + virtual ~TranslationManagerPlugin(); + + bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString); + void extensionsInitialized(); + + void setNelContext(NLMISC::INelContext *nelContext); + + QString name() const; + QString version() const; + QString vendor() const; + QString description() const; + QStringList dependencies() const; + + void addAutoReleasedObject(QObject *obj); + + QObject *objectByName(const QString &name) const; + ExtensionSystem::IPluginSpec *pluginByName(const QString &name) const; + +protected: + NLMISC::CLibraryContext *_LibContext; + +private: + ExtensionSystem::IPluginManager *_plugMan; + QList _autoReleaseObjects; +}; + +class CTranslationManagerContext: public Core::IContext +{ + Q_OBJECT +public: + CTranslationManagerContext(QObject *parent = 0): IContext(parent) + { + m_simpleViewer = new CSimpleViewer(); + } + + virtual ~CTranslationManagerContext() {} + + virtual QString id() const + { + return QLatin1String("TranslationManagerContext"); + } + virtual QString trName() const + { + return tr("Translation Manager"); + } + virtual QIcon icon() const + { + return QIcon(); + } + virtual QWidget *widget() + { + return m_simpleViewer; + } + + CSimpleViewer *m_simpleViewer; +}; + +} // namespace Plugin + +#endif // TRANSLATION_MANAGER_PLUGIN_H diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.cpp new file mode 100644 index 000000000..c3e4883d4 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.cpp @@ -0,0 +1,67 @@ +// Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2011 Dzmitry Kamiahin +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "translation_manager_settings_page.h" + +// Qt includes +#include + +// NeL includes + +// Project includes + +namespace Plugin +{ + +CTranslationManagerSettingsPage::CTranslationManagerSettingsPage(QObject *parent) + : IOptionsPage(parent), + _currentPage(NULL) +{ +} + +QString CTranslationManagerSettingsPage::id() const +{ + return QLatin1String("TranslationManagerPage"); +} + +QString CTranslationManagerSettingsPage::trName() const +{ + return tr("Translation Manager page"); +} + +QString CTranslationManagerSettingsPage::category() const +{ + return QLatin1String("General"); +} + +QString CTranslationManagerSettingsPage::trCategory() const +{ + return tr("General"); +} + +QWidget *CTranslationManagerSettingsPage::createPage(QWidget *parent) +{ + _currentPage = new QWidget(parent); + _ui.setupUi(_currentPage); + return _currentPage; +} + +void CTranslationManagerSettingsPage::apply() +{ +} + +} /* namespace Plugin */ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.h new file mode 100644 index 000000000..53f9068e1 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.h @@ -0,0 +1,58 @@ +// Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2011 Dzmitry Kamiahin +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + + +#ifndef TRANSLATION_MANAGER_SETTINGS_PAGE_H +#define TRANSLATION_MANAGER_SETTINGS_PAGE_H + +#include + +#include "../core/ioptions_page.h" + +#include "ui_translation_manager_settings_page.h" + +class QWidget; + +namespace Plugin +{ +/** +@class CTranslationManagerSettingsPage +*/ +class CTranslationManagerSettingsPage : public Core::IOptionsPage +{ + Q_OBJECT +public: + CTranslationManagerSettingsPage(QObject *parent = 0); + virtual ~CTranslationManagerSettingsPage() {} + + virtual QString id() const; + virtual QString trName() const; + virtual QString category() const; + virtual QString trCategory() const; + virtual QWidget *createPage(QWidget *parent); + + virtual void apply(); + virtual void finish() {} + +private: + QWidget *_currentPage; + Ui::CTranslationManagerSettingsPage _ui; +}; + +} // namespace Plugin + +#endif // TRANSLATION_MANAGER_SETTINGS_H diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.ui new file mode 100644 index 000000000..951be0615 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.ui @@ -0,0 +1,92 @@ + + + CTranslationManagerSettingsPage + + + + 0 + 0 + 458 + 479 + + + + Form + + + + 0 + + + + + GroupBox + + + + + + PushButton + + + + + + + + + + PushButton + + + + + + + RadioButton + + + + + + + RadioButton + + + + + + + CheckBox + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + + + + + + From 0371b04509d46fb237373dcadc8fb1c57dfdd426 Mon Sep 17 00:00:00 2001 From: cemycc Date: Mon, 30 May 2011 20:56:22 +0300 Subject: [PATCH 008/320] Changed: #1307 Added extract bot names and UI dialog for plugin settings. --HG-- branch : gsoc2011-translationovqt --- .../translation_manager/CMakeLists.txt | 2 +- .../translation_manager/extract_bot_names.cpp | 756 ++++++++++++++++++ .../translation_manager_plugin.cpp | 47 +- .../translation_manager_plugin.h | 8 + .../translation_manager_settings_page.cpp | 243 ++++++ .../translation_manager_settings_page.h | 16 +- .../translation_manager_settings_page.ui | 485 ++++++++--- 7 files changed, 1462 insertions(+), 95 deletions(-) create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/extract_bot_names.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt index ce85c682e..827db7487 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt @@ -30,7 +30,7 @@ SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) ADD_LIBRARY(ovqt_plugin_translation_manager MODULE ${SRC} ${OVQT_PLUG_TRANSLATION_MANAGER_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_TRANSLATION_MANAGER_UI_HDRS}) -TARGET_LINK_LIBRARIES(ovqt_plugin_translation_manager ovqt_plugin_core nelmisc nel3d ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY}) +TARGET_LINK_LIBRARIES(ovqt_plugin_translation_manager ovqt_plugin_core nelmisc nel3d nelligo nelgeorges ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY}) NL_DEFAULT_PROPS(ovqt_plugin_translation_manager "NeL, Tools, 3D: Object Viewer Qt Plugin: Translation Manager") NL_ADD_RUNTIME_FLAGS(ovqt_plugin_translation_manager) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/extract_bot_names.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/extract_bot_names.cpp new file mode 100644 index 000000000..75a97d3bb --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/extract_bot_names.cpp @@ -0,0 +1,756 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "nel/misc/types_nl.h" +#include "nel/misc/config_file.h" +#include "nel/misc/sheet_id.h" +#include "nel/misc/path.h" +#include "nel/misc/diff_tool.h" +#include "nel/georges/u_form.h" +#include "nel/georges/u_form_elm.h" +#include "nel/georges/load_form.h" +#include "nel/ligo/ligo_config.h" +#include "nel/ligo/primitive.h" +#include "nel/ligo/primitive_utils.h" + +using namespace std; +using namespace NLMISC; +using namespace NLLIGO; +using namespace STRING_MANAGER; + +vector Filters; + +static CLigoConfig LigoConfig; +static bool RemoveOlds = false; + +struct TCreatureInfo +{ + CSheetId SheetId; + bool ForceSheetName; + bool DisplayName; + + + void readGeorges (const NLMISC::CSmartPtr &form, const NLMISC::CSheetId &sheetId) + { + const NLGEORGES::UFormElm &item=form->getRootNode(); + + SheetId=sheetId; + item.getValueByName(ForceSheetName, "3d data.ForceDisplayCreatureName"); + item.getValueByName(DisplayName, "3d data.DisplayName"); + } + + void serial(NLMISC::IStream &f) + { + f.serial(SheetId); + f.serial(ForceSheetName); + f.serial(DisplayName); + } + + + static uint getVersion () + { + return 1; + } + + void removed() + { + } + +}; + +std::map Creatures; + +TCreatureInfo *getCreature(const std::string &sheetName) +{ + CSheetId id(sheetName+".creature"); + + if (Creatures.find(id) != Creatures.end()) + return &(Creatures.find(id)->second); + else + return NULL; +} + +string cleanupName(const std::string &name) +{ + string ret; + + for (uint i=0; i= 2) + { + if ( *ret.begin() == ucchar('$')) + { + ret=ret.substr(1); + } + if ( *ret.rbegin() == ucchar('$')) + { + ret = ret.substr(0, ret.size()-1); + } + } + ret = cleanupUcName(ret); + return ret; +} + +struct TEntryInfo +{ + string SheetName; +}; + +set GenericNames; +map SimpleNames; +set Functions; + + +string removeAndStoreFunction(const std::string &fullName) +{ + string::size_type pos = fullName.find("$"); + if (pos == string::npos) + return fullName; + else + { + // extract and store the function name + string ret; + + ret = fullName.substr(0, pos); + string::size_type pos2 = fullName.find("$", pos+1); + + string fct = fullName.substr(pos+1, pos2-(pos+1)); + + ret += fullName.substr(pos2+1); + + if (Functions.find(fct) == Functions.end()) + { + nldebug("Adding function '%s'", fct.c_str()); + Functions.insert(fct); + } + + return ret; + } +} + + +void addGenericName(const std::string &name, const std::string &sheetName) +{ + TCreatureInfo *c = getCreature(sheetName); + if (!c || c->ForceSheetName || !c->DisplayName) + return; + + if (SimpleNames.find(name) != SimpleNames.end()) + { + nldebug("Name '%s' is now a generic name", name.c_str()); + GenericNames.insert(name); + SimpleNames.erase(name); + + } + else if (GenericNames.find(name) == GenericNames.end()) + { + nldebug("Adding generic name '%s'", name.c_str()); + GenericNames.insert(name); + } +} + +void addSimpleName(const std::string &name, const std::string &sheetName) +{ + TCreatureInfo *c = getCreature(sheetName); + if (!c || c->ForceSheetName || !c->DisplayName) + return; + + if (SimpleNames.find(name) != SimpleNames.end()) + { + addGenericName(name, sheetName); + } + else if (GenericNames.find(name) != GenericNames.end()) + { + return; + } + else + { + nldebug("Adding simple name '%s'", name.c_str()); + + TEntryInfo ei; + ei.SheetName = sheetName; + + SimpleNames.insert(make_pair(name, ei)); + } +} + +int extractBotNamesAll(map > config_paths, string ligo_class_file, string trans_path, string work_path) +{ + //------------------------------------------------------------------- + // read the parameters + /*for (int i=2; i::iterator it = config_paths["paths"].begin(); it != config_paths["paths"].end(); ++it) + { + CPath::addSearchPath(*it, true, false); + } + for (std::list::iterator it = config_paths["pathsR"].begin(); it != config_paths["pathsR"].end(); ++it) + { + CPath::addSearchPath(*it, false, false); + } + + for (std::list::iterator it = config_paths["filters"].begin(); it != config_paths["filters"].end(); ++it) + { + Filters.push_back(*it); + } + + + //------------------------------------------------------------------- + // init the sheets + CSheetId::init(false); + const string PACKED_SHEETS_NAME = "bin/translation_tools_creature.packed_sheets"; + loadForm("creature", PACKED_SHEETS_NAME, Creatures, false, false); + + if (Creatures.empty()) + { + for (std::list::iterator it = config_paths["georges"].begin(); it != config_paths["georges"].end(); ++it) + CPath::addSearchPath((*it).c_str(), true, false); + + loadForm("creature", PACKED_SHEETS_NAME, Creatures, true); + } + + + //------------------------------------------------------------------- + // init ligo config + string ligoPath = CPath::lookup(ligo_class_file, true, true); + LigoConfig.readPrimitiveClass(ligoPath.c_str(), false); + NLLIGO::Register(); + + CPrimitiveContext::instance().CurrentLigoConfig = &LigoConfig; + + //------------------------------------------------------------------- + // ok, ready for the real work, + // first, read the primitives files and parse the primitives + vector files; + CPath::getFileList("primitive", files); + + for (uint i=0; i ps; + ps.buildSet(primDoc.RootNode, pred, result); + + for (uint i=0; igetPropertyByName("name", name); + result[i]->getPropertyByName("count", countStr); + result[i]->getPropertyByName("bot_sheet_look", sheetStr); + + uint32 count; + NLMISC::fromString(countStr, count); + + if (count != 0) + { + if (sheetStr.empty()) + { + nlwarning("In '%s', empty sheet !", buildPrimPath(result[i]).c_str()); + } + else + { + addGenericName(removeAndStoreFunction(name), sheetStr); + } + } + } + } + // look for bot template + { + TPrimitiveClassPredicate pred("bot_template_npc"); + TPrimitiveSet result; + + CPrimitiveSet ps; + ps.buildSet(primDoc.RootNode, pred, result); + + for (uint i=0; igetPropertyByName("name", name); + result[i]->getPropertyByName("sheet_look", sheetStr); + + if (sheetStr.empty()) + { + // take the sheet in the parent + result[i]->getParent()->getPropertyByName("bot_sheet_look", sheetStr); + } + + if (sheetStr.empty()) + { + nlwarning("In '%s', empty sheet !", buildPrimPath(result[i]).c_str()); + } + else + { + addGenericName(removeAndStoreFunction(name), sheetStr); + } + } + } + // look for npc_group + { + TPrimitiveClassPredicate pred("npc_group"); + TPrimitiveSet result; + + CPrimitiveSet ps; + ps.buildSet(primDoc.RootNode, pred, result); + + for (uint i=0; igetPropertyByName("name", name); + result[i]->getPropertyByName("count", countStr); + result[i]->getPropertyByName("bot_sheet_client", sheetStr); + + uint32 count; + NLMISC::fromString(countStr, count); + + if (count > 0 && sheetStr.empty()) + { + nlwarning("In '%s', empty sheet !", buildPrimPath(result[i]).c_str()); + } + else + { + if (count == 1) + { + addSimpleName(removeAndStoreFunction(name), sheetStr); + } + else if (count > 1) + { + addGenericName(removeAndStoreFunction(name), sheetStr); + } + } + } + } + // look for bot + { + TPrimitiveClassPredicate pred("npc_bot"); + TPrimitiveSet result; + + CPrimitiveSet ps; + ps.buildSet(primDoc.RootNode, pred, result); + + for (uint i=0; igetPropertyByName("name", name); + result[i]->getPropertyByName("sheet_client", sheetStr); + + if (sheetStr.empty()) + { + // take the sheet in the parent + result[i]->getParent()->getPropertyByName("bot_sheet_client", sheetStr); + } + + if (sheetStr.empty()) + { + nlwarning("In '%s', empty sheet !", buildPrimPath(result[i]).c_str()); + } + else + { + TEntryInfo ei; + addSimpleName(removeAndStoreFunction(name), sheetStr); + } + } + } + } + + //------------------------------------------------------------------- + // step 2 : load the reference file + + nlinfo("Looking for missing translation:"); + + TWorksheet botNames; + loadExcelSheet(work_path, botNames, true); + TWorksheet transBotNames; + loadExcelSheet(trans_path, transBotNames, true); + + TWorksheet fcts; + loadExcelSheet(work_path, fcts, true); + + + // add missing element + + uint nbAddSimpleName = 0; + uint nbAddFunction = 0; + uint nbAddGenericName = 0; + + uint botIdCol; + nlverify(botNames.findId(botIdCol)); + uint transIdCol; + nlverify(transBotNames.findId(transIdCol)); + uint fctsIdCol; + nlverify(fcts.findId(fctsIdCol)); + + // special treatment to add the sheet_name col + { + uint sheetCol; + if (!botNames.findCol(ucstring("sheet_name"), sheetCol)) + { + botNames.insertColumn(botNames.ColCount); + botNames.setData(0, botNames.ColCount-1, ucstring("sheet_name")); + } + + if (!transBotNames.findCol(ucstring("sheet_name"), sheetCol)) + { + transBotNames.insertColumn(transBotNames.ColCount); + transBotNames.setData(0, transBotNames.ColCount-1, ucstring("sheet_name")); + } + } + // 1 - simple names + { + nlinfo(" Simple names..."); + + + map::iterator first(SimpleNames.begin()), last(SimpleNames.end()); + for (; first != last; ++first) + { + uint rowIdx; + if (!botNames.findRow(botIdCol, first->first, rowIdx)) + { + // we need to add the entry + rowIdx = botNames.size(); + botNames.resize(botNames.size()+1); + + botNames.setData(rowIdx, ucstring("bot name"), first->first); + botNames.setData(rowIdx, ucstring("translated name"), first->first); + botNames.setData(rowIdx, ucstring("sheet_name"), first->second.SheetName); + + nbAddSimpleName++; + } + else + { + // set/update the sheet name info + // try to restore the existing translation + uint transRowIdx; + if (transBotNames.findRow(transIdCol, first->first, transRowIdx)) + { + ucstring wkBotName = botNames.getData(rowIdx, ucstring("bot name")); + ucstring wkSheetName = botNames.getData(rowIdx, ucstring("sheet_name")); + ucstring wkTranslationName = botNames.getData(rowIdx, ucstring("translated name")); + ucstring ucWkHash; + uint64 hash = CI18N::makeHash(wkBotName + wkTranslationName +wkSheetName); + CI18N::hashToUCString(hash, ucWkHash); + ucstring trUcHash = transBotNames[transRowIdx][0]; + bool isWkTranslationNameAGroupName = wkTranslationName.find(ucstring("$")) != ucstring::npos; + bool hashIsValide = std::equal(ucWkHash.begin(), ucWkHash.end(), trUcHash.begin()+1); + // Hash is equal get the translation + if (hashIsValide && !isWkTranslationNameAGroupName) + { + wkTranslationName = transBotNames.getData(transRowIdx, ucstring("translated name")); + wkSheetName = transBotNames.getData(transRowIdx, ucstring("sheet_name")); + botNames.setData(rowIdx, ucstring("translated name"), wkTranslationName); + botNames.setData(rowIdx, ucstring("sheet_name"), wkSheetName); + hash = CI18N::makeHash(wkBotName + wkTranslationName + wkSheetName); + // update the hash code + CI18N::hashToUCString(hash, transBotNames[transRowIdx][0]); + } + // bots_name.txt has been manually changed. We trust what the Level Designer has done. We don't destroy is work. + // or it is a simple + else + { + //use the "translated name" of the manually changed work/bot_name.txt + botNames.setData(rowIdx, ucstring("translated name"), wkTranslationName); + botNames.setData(rowIdx, ucstring("sheet_name"), wkSheetName); + } + } + } + } + } + + // 2 - generic names + + { + nlinfo(" Generic names..."); + + set::iterator first(GenericNames.begin()), last(GenericNames.end()); + for (; first != last; ++first) + { + string gnName = "gn_" + cleanupName(*first); + + ucstring fctsTitleId; + ucstring fctsName; + // add or modify the bot names + uint rowIdx; + if (!botNames.findRow(botIdCol, *first, rowIdx)) + { + // we need to add the entry + rowIdx = botNames.size(); + botNames.resize(botNames.size()+1); + + botNames.setData(rowIdx, ucstring("bot name"), *first); + botNames.setData(rowIdx, ucstring("translated name"), ucstring("$") + gnName + "$"); + botNames.setData(rowIdx, ucstring("sheet_name"), ucstring()); + fctsTitleId = gnName; + fctsName = *first; + + nbAddSimpleName++; + } + else + { + // look in the translated table to remember the translated name to write it in the string file + ucstring wkBotName = botNames.getData(rowIdx, ucstring("bot name")); + ucstring wkTranslationName = botNames.getData(rowIdx, ucstring("translated name")); + ucstring wkSheetName = botNames.getData(rowIdx, ucstring("sheet_name")); + + + nlinfo("Bot name:%s\n",wkBotName.toString().c_str()); + bool isWkTranslationNameAGroupName = wkTranslationName.find(ucstring("$")) != ucstring::npos; + + if ( isWkTranslationNameAGroupName ) //work name looks like "$gn_***$: do not modify + { + + //Do not change work/bot_name.txt + // update work/world_title.txt + + ucstring transName; + fctsTitleId = makeGroupName(wkTranslationName); + uint transRowIdx; + if (transBotNames.findRow(transIdCol, *first, transRowIdx)) + { + transName = transBotNames.getData(transRowIdx, ucstring("translated name")); + + if (transName.find(ucstring("$")) != ucstring::npos) + { + transName = fctsTitleId; + } + } + else + { + transName = fctsTitleId; + } + //Do not touch anything + botNames.setData(rowIdx, ucstring("translated name"), wkTranslationName); + botNames.setData(rowIdx, ucstring("sheet_name"), wkSheetName); + // fctsTitleId = makeGroupName(wkTranslationName); + fctsName = transName; + + } + else // WkTranslationName != "$gn*$" + { + uint transRowIdx; + ucstring transName; + ucstring wkSheetName; + // Get the translation as a simple name. + if (transBotNames.findRow(transIdCol, *first, transRowIdx)) + { + + transName = transBotNames.getData(transRowIdx, ucstring("translated name")); + ucstring trSheetName = transBotNames.getData(transRowIdx, ucstring("sheet_name")); + + //tr."translation name" is + if (transName.find(ucstring("$")) != ucstring::npos) + { + //get Translation, update hash + botNames[rowIdx][1] = transName; + botNames[rowIdx][2] = trSheetName; + fctsTitleId = makeGroupName(transName); + fctsName = makeGroupName(transName); + ucstring trNewUcHash; + uint64 hash = CI18N::makeHash(wkBotName + transName +trSheetName); + CI18N::hashToUCString(hash, trNewUcHash); + transBotNames[transRowIdx][0] = ucstring("_") + trNewUcHash; + } + else //botNames."translated name" != $gn_$ && tansName."translated name" != $gn_$ + { + + // get the translation back + //update work/bot_name.txt + wkTranslationName = ucstring("$")+gnName+"$"; + botNames[rowIdx][0] = wkBotName; + botNames[rowIdx][1] = wkTranslationName; + botNames[rowIdx][2] = wkSheetName; + + //update translated/bot_name.txt + + fctsName = transName; //transName + fctsTitleId = gnName; + ucstring trNewUcHash; + uint64 hash = CI18N::makeHash(botNames[rowIdx][0] + botNames[rowIdx][1] +botNames[rowIdx][2]); + CI18N::hashToUCString(hash, trNewUcHash); + transBotNames[transRowIdx][0] = ucstring("_") + trNewUcHash; + } + + } + else //There is no translation yet + { + fctsName = wkTranslationName; + wkTranslationName = ucstring("$")+gnName+"$"; + botNames[rowIdx][0] = wkBotName; + botNames[rowIdx][1] = wkTranslationName; + botNames[rowIdx][2] = wkSheetName; + fctsTitleId = gnName; + + + } + } + + } + + + // look for a corresponding entry + uint gnNameRow; + + + if (!fcts.findRow(fctsIdCol, fctsTitleId, gnNameRow)) + { + + // not found, add it + gnNameRow = fcts.size(); + fcts.resize(fcts.size()+1); + fcts.setData(gnNameRow, ucstring("title_id"), fctsTitleId); + fcts.setData(gnNameRow, ucstring("name"), fctsName); + nbAddGenericName++; + + } + else //Update + { + + } + } + } + + + // 3 - functions + { + nlinfo(" Functions..."); + + set::iterator first(Functions.begin()), last(Functions.end()); + for (; first != last; ++first) + { + string fctName = *first; + // look for a corresponding entry + uint functionRow; + if (!fcts.findRow(fctsIdCol, fctName, functionRow)) + { + // not found, add it + functionRow = fcts.size(); + fcts.resize(fcts.size()+1); + + fcts.setData(functionRow, ucstring("title_id"), fctName); + fcts.setData(functionRow, ucstring("name"), *first); + + nbAddFunction++; + } + } + } + + // display resum\E9 + nlinfo("Adding %u new simple name", nbAddSimpleName); + nlinfo("Adding %u new generic name", nbAddGenericName); + nlinfo("Adding %u new function name", nbAddFunction); + + // saving the modified files + + ucstring s = prepareExcelSheet(botNames); + CI18N::writeTextFile(work_path, s, false); + s = prepareExcelSheet(transBotNames); + CI18N::writeTextFile(trans_path, s, false); + s = prepareExcelSheet(fcts); + CI18N::writeTextFile(work_path, s, false); + + return 0; +} + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.cpp index 6140a3985..233780ca5 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.cpp @@ -19,6 +19,8 @@ #include #include +int extractBotNamesAll(map > config_paths, string ligo_class_file, string trans_path, string work_path); + namespace Plugin { TranslationManagerPlugin::~TranslationManagerPlugin() @@ -54,7 +56,39 @@ void TranslationManagerPlugin::extensionsInitialized() QAction *aboutQtAction = menuManager->action(Core::Constants::ABOUT_QT); helpMenu->addSeparator(); helpMenu->insertAction(aboutQtAction, aboutTManPlugin); - menuManager->menuBar()->addMenu("Translation Manager"); + QMenu *transMenu = menuManager->menuBar()->addMenu("Translation Manager"); + /* Words extraction*/ + QAction *botnamesAct = new QAction("Extract bot_names", this); + connect(botnamesAct, SIGNAL(triggered()), this, SLOT(extractBotNames())); + transMenu->addAction(botnamesAct); +} + +void TranslationManagerPlugin::extractBotNames() +{ + // prepare the config paths + list paths,pathsR, georges, filters, languages; + string ligo, translation, work; + map > config_paths; + + QSettings *settings = Core::ICore::instance()->settings(); + settings->beginGroup("translationmanager"); + + paths = ConvertQStringList(settings->value("paths").toStringList()); /* paths */ + config_paths["paths"] = paths; + pathsR = ConvertQStringList(settings->value("pathsR").toStringList()); /* pathsR */ + config_paths["pathsR"] = pathsR; + georges = ConvertQStringList(settings->value("georges").toStringList()); /* georges */ + config_paths["georges"] = georges; + filters = ConvertQStringList(settings->value("filters").toStringList()); /* filters */ + config_paths["filters"] = filters; + languages = ConvertQStringList(settings->value("languages").toStringList()); /* languages */ + ligo = settings->value("ligo").toString().toStdString(); + translation = settings->value("translation").toString().toStdString(); + work = settings->value("work").toString().toStdString(); + settings->endGroup(); + + extractBotNamesAll(config_paths, ligo, translation, work); + } void TranslationManagerPlugin::setNelContext(NLMISC::INelContext *nelContext) @@ -67,6 +101,17 @@ void TranslationManagerPlugin::setNelContext(NLMISC::INelContext *nelContext) _LibContext = new NLMISC::CLibraryContext(*nelContext); } +list TranslationManagerPlugin::ConvertQStringList(QStringList listq) +{ + std::list stdlist; + Q_FOREACH(QString text, listq) + { + stdlist.push_back(text.toStdString()); + } + + return stdlist; +} + QString TranslationManagerPlugin::name() const { return "Translation Manager"; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.h index c1bfc2548..07bf0d434 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.h @@ -13,6 +13,8 @@ #include #include +using namespace std; + namespace NLMISC { class CLibraryContext; @@ -56,6 +58,11 @@ protected: private: ExtensionSystem::IPluginManager *_plugMan; QList _autoReleaseObjects; + list ConvertQStringList(QStringList list); + + +private Q_SLOTS: + void extractBotNames(); }; class CTranslationManagerContext: public Core::IContext @@ -87,6 +94,7 @@ public: } CSimpleViewer *m_simpleViewer; + }; } // namespace Plugin diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.cpp index c3e4883d4..b3a731ae5 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.cpp @@ -18,15 +18,21 @@ #include "translation_manager_settings_page.h" // Qt includes +#include #include +#include +#include // NeL includes // Project includes +#include "../core/icore.h" namespace Plugin { +QString lastDir = "."; + CTranslationManagerSettingsPage::CTranslationManagerSettingsPage(QObject *parent) : IOptionsPage(parent), _currentPage(NULL) @@ -57,11 +63,248 @@ QWidget *CTranslationManagerSettingsPage::createPage(QWidget *parent) { _currentPage = new QWidget(parent); _ui.setupUi(_currentPage); + readSettings(); + connect(_ui.paths_add, SIGNAL(clicked()), this, SLOT(pathAdd())); + connect(_ui.paths_del, SIGNAL(clicked()), this, SLOT(pathDel())); + connect(_ui.pathsR_add, SIGNAL(clicked()), this, SLOT(pathRAdd())); + connect(_ui.pathsR_del, SIGNAL(clicked()), this, SLOT(pathRDel())); + connect(_ui.georges_add, SIGNAL(clicked()), this, SLOT(georgeAdd())); + connect(_ui.georges_del, SIGNAL(clicked()), this, SLOT(georgeDel())); + connect(_ui.filter_add, SIGNAL(clicked()), this, SLOT(filterAdd())); + connect(_ui.filter_del, SIGNAL(clicked()), this, SLOT(filterDel())); + connect(_ui.lang_add, SIGNAL(clicked()), this, SLOT(languageAdd())); + connect(_ui.lang_del, SIGNAL(clicked()), this, SLOT(languageDel())); + connect(_ui.translation_add, SIGNAL(clicked()), this, SLOT(translationAdd())); + connect(_ui.work_add, SIGNAL(clicked()), this, SLOT(workAdd())); + return _currentPage; } +void CTranslationManagerSettingsPage::pathAdd() +{ + QString newPath = QFileDialog::getExistingDirectory(_currentPage, "", lastDir); + if (!newPath.isEmpty()) + { + QListWidgetItem *newItem = new QListWidgetItem; + newItem->setText(newPath); + newItem->setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable); + _ui.paths_list->addItem(newItem); + lastDir = newPath; + } +} + +void CTranslationManagerSettingsPage::pathDel() +{ + QListWidgetItem *removeItem = _ui.paths_list->takeItem(_ui.paths_list->currentRow()); + if (!removeItem) + delete removeItem; +} + +void CTranslationManagerSettingsPage::pathRAdd() +{ + QString newPath = QFileDialog::getExistingDirectory(_currentPage, "", lastDir); + if (!newPath.isEmpty()) + { + QListWidgetItem *newItem = new QListWidgetItem; + newItem->setText(newPath); + newItem->setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable); + _ui.pathsR_list->addItem(newItem); + lastDir = newPath; + } +} + +void CTranslationManagerSettingsPage::pathRDel() +{ + QListWidgetItem *removeItem = _ui.pathsR_list->takeItem(_ui.pathsR_list->currentRow()); + if (!removeItem) + delete removeItem; +} + +void CTranslationManagerSettingsPage::georgeAdd() +{ + QString newPath = QFileDialog::getExistingDirectory(_currentPage, "", lastDir); + if (!newPath.isEmpty()) + { + QListWidgetItem *newItem = new QListWidgetItem; + newItem->setText(newPath); + newItem->setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable); + _ui.georges_list->addItem(newItem); + lastDir = newPath; + } +} + +void CTranslationManagerSettingsPage::georgeDel() +{ + QListWidgetItem *removeItem = _ui.georges_list->takeItem(_ui.georges_list->currentRow()); + if (!removeItem) + delete removeItem; +} + +void CTranslationManagerSettingsPage::filterAdd() +{ + QString newValue = _ui.filter_edit->text(); + if (!newValue.isEmpty()) + { + QListWidgetItem *newItem = new QListWidgetItem; + newItem->setText(newValue); + newItem->setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable); + _ui.filter_list->addItem(newItem); + } +} + +void CTranslationManagerSettingsPage::filterDel() +{ + QListWidgetItem *removeItem = _ui.filter_list->takeItem(_ui.filter_list->currentRow()); + if (!removeItem) + delete removeItem; +} + +void CTranslationManagerSettingsPage::languageAdd() +{ + QString newValue = _ui.lang_edit->text(); + if (!newValue.isEmpty()) + { + QListWidgetItem *newItem = new QListWidgetItem; + newItem->setText(newValue); + newItem->setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable); + _ui.lang_list->addItem(newItem); + } +} + +void CTranslationManagerSettingsPage::languageDel() +{ + QListWidgetItem *removeItem = _ui.lang_list->takeItem(_ui.lang_list->currentRow()); + if (!removeItem) + delete removeItem; +} + +void CTranslationManagerSettingsPage::translationAdd() +{ + QString newPath = QFileDialog::getExistingDirectory(_currentPage, ""); + if (!newPath.isEmpty()) + { + _ui.translation_edit->setText(newPath); + } +} + +void CTranslationManagerSettingsPage::workAdd() +{ + QString newPath = QFileDialog::getExistingDirectory(_currentPage, ""); + if (!newPath.isEmpty()) + { + _ui.work_edit->setText(newPath); + } +} + void CTranslationManagerSettingsPage::apply() { + writeSettings(); } +void CTranslationManagerSettingsPage::readSettings() +{ + QStringList paths, pathsR, georges, filters, languages; + QString ligo, translation, work; + + QSettings *settings = Core::ICore::instance()->settings(); + settings->beginGroup("translationmanager"); + + paths = settings->value("paths").toStringList(); /* paths */ + pathsR = settings->value("pathsR").toStringList(); /* pathsR */ + georges = settings->value("georges").toStringList(); /* georges */ + filters = settings->value("filters").toStringList(); /* filters */ + languages = settings->value("languages").toStringList(); /* languages */ + ligo = settings->value("ligo").toString(); + translation = settings->value("translation").toString(); + work = settings->value("work").toString(); + + settings->endGroup(); + /* paths */ + Q_FOREACH(QString path, paths) + { + QListWidgetItem *newItem = new QListWidgetItem; + newItem->setText(path); + newItem->setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable); + _ui.paths_list->addItem(newItem); + } + /* pathsR */ + Q_FOREACH(QString pathR, pathsR) + { + QListWidgetItem *newItem = new QListWidgetItem; + newItem->setText(pathR); + newItem->setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable); + _ui.pathsR_list->addItem(newItem); + } + /* georges */ + Q_FOREACH(QString george, georges) + { + QListWidgetItem *newItem = new QListWidgetItem; + newItem->setText(george); + newItem->setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable); + _ui.georges_list->addItem(newItem); + } + /* filter */ + Q_FOREACH(QString filter, filters) + { + QListWidgetItem *newItem = new QListWidgetItem; + newItem->setText(filter); + newItem->setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable); + _ui.filter_list->addItem(newItem); + } + /* languages */ + Q_FOREACH(QString lang, languages) + { + QListWidgetItem *newItem = new QListWidgetItem; + newItem->setText(lang); + newItem->setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable); + _ui.lang_list->addItem(newItem); + } + /* ligo */ + _ui.ligo_edit->setText(ligo); + /* translation */ + _ui.translation_edit->setText(translation); + /* work */ + _ui.work_edit->setText(work); + +} + +void CTranslationManagerSettingsPage::writeSettings() +{ + QStringList paths, pathsR, georges, filters, languages; + QString ligo, translation, work; + /* paths */ + for (int i = 0; i < _ui.paths_list->count(); ++i) + paths << _ui.paths_list->item(i)->text(); + /* pathsR */ + for (int i = 0; i < _ui.pathsR_list->count(); ++i) + pathsR << _ui.pathsR_list->item(i)->text(); + /* georges */ + for (int i = 0; i < _ui.georges_list->count(); ++i) + georges << _ui.georges_list->item(i)->text(); + /* filters */ + for (int i = 0; i < _ui.filter_list->count(); ++i) + filters << _ui.filter_list->item(i)->text(); + /* languages */ + for (int i = 0; i < _ui.lang_list->count(); ++i) + languages << _ui.lang_list->item(i)->text(); + /* ligo path */ + ligo = _ui.ligo_edit->text(); + /* translations path*/ + translation = _ui.translation_edit->text(); + work = _ui.work_edit->text(); + + QSettings *settings = Core::ICore::instance()->settings(); + settings->beginGroup("translationmanager"); + settings->setValue("paths", paths); + settings->setValue("pathsR", pathsR); + settings->setValue("georges", georges); + settings->setValue("filters", filters); + settings->setValue("languages", languages); + settings->setValue("ligo", ligo); + settings->setValue("translation", translation); + settings->setValue("work", work); + settings->endGroup(); +} + + } /* namespace Plugin */ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.h index 53f9068e1..4fec51fb6 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.h @@ -47,10 +47,24 @@ public: virtual void apply(); virtual void finish() {} - +private Q_SLOTS: + void pathAdd(); + void pathDel(); + void pathRAdd(); + void pathRDel(); + void georgeAdd(); + void georgeDel(); + void filterAdd(); + void filterDel(); + void languageAdd(); + void languageDel(); + void translationAdd(); + void workAdd(); private: QWidget *_currentPage; Ui::CTranslationManagerSettingsPage _ui; + void writeSettings(); + void readSettings(); }; } // namespace Plugin diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.ui index 951be0615..c58533185 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.ui @@ -1,92 +1,393 @@ - - - CTranslationManagerSettingsPage - - - - 0 - 0 - 458 - 479 - - - - Form - - - - 0 - - - - - GroupBox - - - - - - PushButton - - - - - - - - - - PushButton - - - - - - - RadioButton - - - - - - - RadioButton - - - - - - - CheckBox - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - - - - - - - + + + CTranslationManagerSettingsPage + + + + 0 + 0 + 490 + 495 + + + + Form + + + + + + 1 + + + + Core paths + + + + + + + + + + Paths + + + + + + + Qt::Horizontal + + + + 318 + 20 + + + + + + + + dwadwadwa + + + + :/icons/ic_nel_add_item.png:/icons/ic_nel_add_item.png + + + Qt::ToolButtonIconOnly + + + true + + + + + + + ... + + + + :/icons/ic_nel_delete_item.png:/icons/ic_nel_delete_item.png + + + true + + + + + + + + + + + + + + + + + + Paths non recursives + + + + + + + Qt::Horizontal + + + + 218 + 20 + + + + + + + + + + + + :/icons/ic_nel_add_item.png:/icons/ic_nel_add_item.png + + + true + + + + + + + ... + + + + :/icons/ic_nel_delete_item.png:/icons/ic_nel_delete_item.png + + + true + + + + + + + + + + + + + + + + + + Georges Paths + + + + + + + Qt::Horizontal + + + + 258 + 20 + + + + + + + + + + + + :/icons/ic_nel_add_item.png:/icons/ic_nel_add_item.png + + + true + + + + + + + + + + + :/icons/ic_nel_delete_item.png:/icons/ic_nel_delete_item.png + + + true + + + + + + + + + + + + + + + Translation files paths + + + + + 9 + 230 + 450 + 201 + + + + + + + Ligo class file - This is the name of the world_editor_classes.xml file. + + + + + + + + + + Work directory + + + + + + + + + + + + ... + + + + + + + + + Translation directory + + + + + + + + + + + + ... + + + + + + + + + + + 9 + 10 + 211 + 221 + + + + + + + Filters + + + + + + + + + + + + + + :/icons/ic_nel_add_item.png:/icons/ic_nel_add_item.png + + + true + + + + + + + + + + + :/icons/ic_nel_delete_item.png:/icons/ic_nel_delete_item.png + + + true + + + + + + + + + + + + 240 + 10 + 221 + 221 + + + + + + + Languages + + + + + + + + + + + + + + :/icons/ic_nel_add_item.png:/icons/ic_nel_add_item.png + + + true + + + + + + + + + + + :/icons/ic_nel_delete_item.png:/icons/ic_nel_delete_item.png + + + true + + + + + + + + + + + + + + + + + + + From bab4b3af21e747babc42cd86a8d8b8600d84424d Mon Sep 17 00:00:00 2001 From: Fabien_HENON Date: Tue, 31 May 2011 16:22:57 +0200 Subject: [PATCH 009/320] Changed: #1304: mission_compiler objectives: check and script generation mission compiler now checks if we are not asking several guild members to complete an objective whereas the mission is not a guild mission. It also generates the 'nb_guild_members_needed' parameter for objectives in the script. --HG-- branch : gsoc2011-guildmissions --- .../world_editor_classes.xml | 4 +- .../mission_compiler_lib/mission_compiler.h | 5 ++ .../leveldesign/mission_compiler_lib/step.h | 5 ++ .../mission_compiler_lib/step_content.cpp | 76 ++++++++++++++++--- 4 files changed, 79 insertions(+), 11 deletions(-) diff --git a/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml b/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml index 1e4f9d723..238158bbf 100644 --- a/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml +++ b/code/ryzom/common/data_leveldesign/leveldesign/world_editor_files/world_editor_classes.xml @@ -1304,9 +1304,9 @@ - + diff --git a/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.h b/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.h index 756b3859d..6f993679b 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.h +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.h @@ -318,6 +318,11 @@ public: bool isThereAJumpTo(const std::string &stepName); + bool isGuildMission() const + { + return _Guild; + } + private: std::string genPreRequisites(); diff --git a/code/ryzom/tools/leveldesign/mission_compiler_lib/step.h b/code/ryzom/tools/leveldesign/mission_compiler_lib/step.h index e93db4524..9d2a053df 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/step.h +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/step.h @@ -192,6 +192,11 @@ protected: std::vector _RoleplayObj; CPhrase _RoleplayPhrase; bool _HideObj; + + // Option nb_guild_members_needed, available for each objective + int _NbGuildMembersNeeded; + + std::string genNbGuildMembersNeededOption(CMissionData &md); public: void init(CMissionData &md, NLLIGO::IPrimitive *prim); diff --git a/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp b/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp index 19d210f0f..c18709b1d 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp @@ -1630,6 +1630,20 @@ void CContentObjective::init(CMissionData &md, IPrimitive *prim) _OverloadPhrase.initPhrase(md, prim, _OverloadObj, numEntry, params); // init the roleplay phrase _RoleplayPhrase.initPhrase(md, prim, _RoleplayObj, numEntry, params); + + // check for the 'nb_guild_members_needed' option and see if it's correct for this mission + string nbGuildMembersNeeded = md.getProperty(prim, "nb_guild_members_needed", false, true); + if (nbGuildMembersNeeded.empty()) + nbGuildMembersNeeded = "1"; + if (!fromString(nbGuildMembersNeeded.c_str(), _NbGuildMembersNeeded)) + _NbGuildMembersNeeded = 1; + + // Check: + if (!md.isGuildMission() && _NbGuildMembersNeeded != 1) + { + string err = toString("primitive(%s): nb_guild_members_needed != 1 for non guild mission.", prim->getName().c_str()); + throw EParseException(prim, err.c_str()); + } } // --------------------------------------------------------------------------- @@ -1649,6 +1663,20 @@ string CContentObjective::genCode(CMissionData &md) return ret; } +// --------------------------------------------------------------------------- +std::string CContentObjective::genNbGuildMembersNeededOption(CMissionData &md) +{ + string ret = ""; + // If we are in a guild mission we add the 'nb_guild_members_needed' option to the script + if (md.isGuildMission()) + { + ret = "; nb_guild_members_needed: "; + ret += toString(_NbGuildMembersNeeded); + } + + return ret; +} + // --------------------------------------------------------------------------- string CContentObjective::genPhrase() { @@ -1949,6 +1977,9 @@ public: if (!_Place.empty()) ret += " : "+_Place; + + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); ret += NL; return ret; @@ -2004,6 +2035,8 @@ public: if (!_Phrase.isEmpty()) ret += " : "+_Phrase.genScript(md); + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); ret += NL; return ret; @@ -2078,6 +2111,8 @@ public: { ret += ": "+_Place; } + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); ret += NL; return ret; @@ -2151,6 +2186,8 @@ public: if (i < _Mps.size()-1) ret += "; "; } + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); ret += NL; return ret; @@ -2276,6 +2313,8 @@ public: if (i < _Items.size()-1) ret += "; "; } + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); ret += NL; return ret; @@ -2349,6 +2388,8 @@ public: if (i < _Items.size()-1) ret += "; "; } + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); ret += NL; return ret; @@ -2479,7 +2520,8 @@ public: if (!_Place.empty()) ret += " : " + _Place; - + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); ret += NL; return ret; @@ -2564,6 +2606,8 @@ public: { ret += " : "+_Npc; } + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); ret += NL; return ret; @@ -2645,6 +2689,8 @@ public: { ret += " : "+_Npc; } + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); ret += NL; return ret; @@ -2755,7 +2801,10 @@ public: if (i < _Items.size()-1) ret += "; "; }; - ret += " : "+_Npc +NL; + ret += " : "+_Npc; + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); + ret += NL; return ret; } @@ -2790,7 +2839,10 @@ public: string ret; ret = CContentObjective::genCode(md); - ret += "give_money : "+_Amount+" : "+_Npc+NL; + ret += "give_money : "+_Amount+" : "+_Npc; + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); + ret += NL; return ret; } @@ -2841,7 +2893,8 @@ public: ret += "; "; } } - + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); ret += NL; return ret; @@ -2877,7 +2930,8 @@ public: if (_SaveAll) ret += " : save_all"; - + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); ret += NL; return ret; @@ -2950,7 +3004,8 @@ public: if (i < _Skills.size()-1) ret += "; "; } - + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); ret += NL; return ret; @@ -2988,7 +3043,8 @@ public: if (i < _Missions.size()-1) ret += "; "; } - + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); ret += NL; return ret; @@ -3026,7 +3082,8 @@ public: if (i < _MsgContent.size()-1) ret += " "; } - + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); ret += NL; return ret; @@ -3242,7 +3299,8 @@ public: ret += "ring_scenario : "; ret += _ScenarioTag; - + // Add the 'nb_guild_members_needed' parameter if needed + ret += CContentObjective::genNbGuildMembersNeededOption(md); ret += NL; return ret; From 91fef65450c56f8607a8c5bfc11986c04de58367 Mon Sep 17 00:00:00 2001 From: Fabien_HENON Date: Tue, 31 May 2011 22:00:27 +0200 Subject: [PATCH 011/320] Changed: #1304: mission_compiler actions: add new ones, check and script generation Add 2 new actions for the mission compiler: recv_charge_point and give_control. Add the 'guild' option for some actions: check if the mission is valid, and change the script generation to add this option. --HG-- branch : gsoc2011-guildmissions --- .../mission_compiler_lib/step_content.cpp | 134 +++++++++++++++++- 1 file changed, 132 insertions(+), 2 deletions(-) diff --git a/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp b/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp index c18709b1d..456f7e286 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/step_content.cpp @@ -142,6 +142,7 @@ REGISTER_STEP_CONTENT(CActionJumpTo, "jump_to"); class CActionRecvMoney : public IStepContent { string _Amount; + bool _Guild; void getPredefParam(uint32 &numEntry, CPhrase::TPredefParams &predef) { @@ -152,12 +153,27 @@ public: { IStepContent::init(md, prim); _Amount = md.getProperty(prim, "amount", true, false); + + _Guild = md.getProperty(prim, "guild", false, true) == "true"; + // Check: if _Guild is true then check if we are in a guild mission + if (_Guild && !md.isGuildMission()) + { + string err = toString("primitive(%s): 'guild' option true 1 for non guild mission.", prim->getName().c_str()); + throw EParseException(prim, err.c_str()); + } } string genCode(CMissionData &md) { if (!_Amount.empty()) - return "recv_money : "+_Amount+NL; + { + string ret; + ret = "recv_money : "+_Amount; + if (_Guild) + ret += "; guild"; + ret += NL; + return ret; + } else return string(); } @@ -166,6 +182,72 @@ public: REGISTER_STEP_CONTENT(CActionRecvMoney, "recv_money"); +// --------------------------------------------------------------------------- +class CActionRecvChargePoint : public IStepContent +{ + string _Amount; + + void getPredefParam(uint32 &numEntry, CPhrase::TPredefParams &predef) + { + numEntry = 0; + } +public: + void init(CMissionData &md, IPrimitive *prim) + { + IStepContent::init(md, prim); + _Amount = md.getProperty(prim, "charge_points", true, false); + } + + string genCode(CMissionData &md) + { + if (!_Amount.empty()) + { + string ret; + ret = "recv_charge_point : "+_Amount; + ret += NL; + return ret; + } + else + return string(); + } + +}; +REGISTER_STEP_CONTENT(CActionRecvChargePoint, "recv_charge_point"); + + +// --------------------------------------------------------------------------- +class CActionGiveOutpostControl : public IStepContent +{ + string _OutpostName; + + void getPredefParam(uint32 &numEntry, CPhrase::TPredefParams &predef) + { + numEntry = 0; + } +public: + void init(CMissionData &md, IPrimitive *prim) + { + IStepContent::init(md, prim); + _OutpostName = md.getProperty(prim, "outpost_name", true, false); + } + + string genCode(CMissionData &md) + { + if (!_OutpostName.empty()) + { + string ret; + ret = "give_control : "+_OutpostName; + ret += NL; + return ret; + } + else + return string(); + } + +}; +REGISTER_STEP_CONTENT(CActionGiveOutpostControl, "give_control"); + + // --------------------------------------------------------------------------- class CActionSpawnMission : public IStepContent { @@ -590,6 +672,7 @@ class CActionRecvFame : public IStepContent { string _Faction; string _Fame; + bool _Guild; void getPredefParam(uint32 &numEntry, CPhrase::TPredefParams &predef) { @@ -602,12 +685,27 @@ public: _Faction = md.getProperty(prim, "faction", true, false); _Fame = md.getProperty(prim, "value", true, false); + + _Guild = md.getProperty(prim, "guild", false, true) == "true"; + // Check: if _Guild is true then check if we are in a guild mission + if (_Guild && !md.isGuildMission()) + { + string err = toString("primitive(%s): 'guild' option true 1 for non guild mission.", prim->getName().c_str()); + throw EParseException(prim, err.c_str()); + } } string genCode(CMissionData &md) { if (!_Faction.empty() && !_Fame.empty()) - return string("recv_fame : ")+_Faction+" "+_Fame+NL; + { + string ret; + ret = "recv_fame : "+_Faction+" "+_Fame; + if (_Guild) + ret += "; guild"; + ret += NL; + return ret; + } else return string(); } @@ -628,6 +726,7 @@ class CActionRecvItem : public IStepContent vector _Items; bool _QualSpec; bool _Group; + bool _Guild; void getPredefParam(uint32 &numEntry, CPhrase::TPredefParams &predef) { @@ -675,6 +774,13 @@ public: s = md.getProperty(prim, "group", true, false); _Group = (strlwr(s) == "true"); + _Guild = md.getProperty(prim, "guild", false, true) == "true"; + // Check: if _Guild is true then check if we are in a guild mission + if (_Guild && !md.isGuildMission()) + { + string err = toString("primitive(%s): 'guild' option true 1 for non guild mission.", prim->getName().c_str()); + throw EParseException(prim, err.c_str()); + } IStepContent::init(md, prim); } @@ -693,6 +799,8 @@ public: ret += " : "+_BotGiver; if (_Group) ret += " : group"; + if (_Guild) + ret += "; guild"; ret += NL; } @@ -707,6 +815,7 @@ class CActionRecvNamedItem : public IStepContent { vector _Items; bool _Group; + bool _Guild; void getPredefParam(uint32 &numEntry, CPhrase::TPredefParams &predef) { @@ -743,6 +852,14 @@ public: s = md.getProperty(prim, "group", true, false); _Group = (strlwr(s) == "true"); + _Guild = md.getProperty(prim, "guild", false, true) == "true"; + // Check: if _Guild is true then check if we are in a guild mission + if (_Guild && !md.isGuildMission()) + { + string err = toString("primitive(%s): 'guild' option true 1 for non guild mission.", prim->getName().c_str()); + throw EParseException(prim, err.c_str()); + } + IStepContent::init(md, prim); } @@ -756,6 +873,8 @@ public: ret += "recv_named_item : "+item.ItemName+" "+item.ItemQuant; if (_Group) ret += " : group"; + if (_Guild) + ret += "; guild"; ret += NL; } @@ -777,6 +896,7 @@ class CActionDestroyItem : public IStepContent string _BotDestroyer; vector _Items; + bool _Guild; void getPredefParam(uint32 &numEntry, CPhrase::TPredefParams &predef) { @@ -821,6 +941,14 @@ public: _Items.push_back(item); } } + + _Guild = md.getProperty(prim, "guild", false, true) == "true"; + // Check: if _Guild is true then check if we are in a guild mission + if (_Guild && !md.isGuildMission()) + { + string err = toString("primitive(%s): 'guild' option true 1 for non guild mission.", prim->getName().c_str()); + throw EParseException(prim, err.c_str()); + } IStepContent::init(md, prim); } @@ -839,6 +967,8 @@ public: ret +=" "+item.Desc.ItemQual; if (!_BotDestroyer.empty()) ret += " : "+_BotDestroyer; + if (_Guild) + ret += "; guild"; ret += NL; } From 5be81c6487d1c43638797c304d8dfffdecdc2616 Mon Sep 17 00:00:00 2001 From: sfb Date: Wed, 1 Jun 2011 07:44:44 -0500 Subject: [PATCH 012/320] Changed: Fixed a bug with the log plugin causing crashes when the apply button was clicked for settings. --HG-- branch : branch-mission-compiler-qt --- .../object_viewer_qt/src/plugins/log/log_plugin.cpp | 2 +- .../src/plugins/log/log_settings_page.cpp | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp index 2f88200ec..b1f3cbc18 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp @@ -103,7 +103,7 @@ namespace Plugin QString CLogPlugin::name() const { - return "NeL Log"; + return "LogPlugin"; } QString CLogPlugin::version() const diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp index f75d6ab37..02d6cd24d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp @@ -99,11 +99,14 @@ namespace Plugin writeSettings(); ExtensionSystem::IPluginManager *p = Core::ICore::instance()->pluginManager(); - ExtensionSystem::IPlugin *plugin = p->pluginByName("LogPlugin")->plugin(); - CLogPlugin* lp = dynamic_cast(plugin); - if (lp) + ExtensionSystem::IPluginSpec *spec = p->pluginByName("LogPlugin"); + + if(spec) { - lp->setDisplayers(); + ExtensionSystem::IPlugin *plugin = spec->plugin(); + CLogPlugin* lp = dynamic_cast(plugin); + if (lp) + lp->setDisplayers(); } } From 947d69c97e5406889f5b2c61e745d6956ef7c166 Mon Sep 17 00:00:00 2001 From: sfb Date: Wed, 1 Jun 2011 07:45:20 -0500 Subject: [PATCH 013/320] Changed: Added the primitive file path and ligo config file to the "data section" - automatically applied these paths to addSearchPath. --HG-- branch : branch-mission-compiler-qt --- .../src/plugins/core/core_constants.h | 2 + .../plugins/core/general_settings_page.cpp | 36 +++++++++++++++++ .../src/plugins/core/general_settings_page.h | 2 + .../src/plugins/core/general_settings_page.ui | 40 +++++++++++++++++-- 4 files changed, 77 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core_constants.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core_constants.h index 7f0b5cd15..745812c2a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core_constants.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core_constants.h @@ -78,6 +78,8 @@ const char * const SEARCH_PATHS = "SearchPaths"; const char * const RECURSIVE_SEARCH_PATHS = "RecursiveSearchPathes"; const char * const LEVELDESIGN_PATH = "LevelDesignPath"; const char * const ASSETS_PATH = "AssetsPath"; +const char * const PRIMITIVES_PATH = "PrimitivesPath"; +const char * const LIGOCONFIG_FILE = "LigoConfigFile"; const char * const REMAP_EXTENSIONS = "RemapExtensions"; const char * const LOG_SECTION = "LogSettings"; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.cpp index 51da80f67..a050f4789 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.cpp @@ -82,6 +82,15 @@ void GeneralSettingsPage::applyGeneralSettings() else QApplication::setPalette(m_originalPalette); settings->endGroup(); + + // Add primitives path and ligo config file to CPath + settings->beginGroup(Core::Constants::DATA_PATH_SECTION); + QString primitivePath = settings->value(Core::Constants::PRIMITIVES_PATH, "l:/primitives").toString(); + QString ligoConfigFile = settings->value(Core::Constants::LIGOCONFIG_FILE, "l:/leveldesign/world_editor_files/world_editor_classes.xml").toString(); + NLMISC::CPath::addSearchPath(primitivePath.toStdString(), true, false); + NLMISC::CPath::display(); + NLMISC::CPath::addSearchFile(ligoConfigFile.toStdString()); + settings->endGroup(); } QWidget *GeneralSettingsPage::createPage(QWidget *parent) @@ -94,6 +103,8 @@ QWidget *GeneralSettingsPage::createPage(QWidget *parent) connect(m_ui.pluginsPathButton, SIGNAL(clicked()), this, SLOT(setPluginsPath())); connect(m_ui.leveldesignPathButton, SIGNAL(clicked()), this, SLOT(setLevelDesignPath())); connect(m_ui.assetsPathButton, SIGNAL(clicked()), this, SLOT(setAssetsPath())); + connect(m_ui.primitivesPathButton, SIGNAL(clicked()), this, SLOT(setPrimitivesPath())); + connect(m_ui.ligoConfigFileButton, SIGNAL(clicked()), this, SLOT(setLigoConfigFile())); return m_page; } @@ -135,6 +146,27 @@ void GeneralSettingsPage::setLevelDesignPath() } } +void GeneralSettingsPage::setPrimitivesPath() +{ + QString newPath = QFileDialog::getExistingDirectory(0, tr("Set the primitives path"), + m_ui.primitivesPathLineEdit->text()); + if (!newPath.isEmpty()) + { + m_ui.primitivesPathLineEdit->setText(newPath); + } +} + +void GeneralSettingsPage::setLigoConfigFile() +{ + QString newFile = QFileDialog::getOpenFileName(0, tr("Set the ligo config file"), + m_ui.ligoConfigFileLineEdit->text()); + if (!newFile.isEmpty()) + { + m_ui.ligoConfigFileLineEdit->setText(newFile); + } +} + + void GeneralSettingsPage::setAssetsPath() { QString newPath = QFileDialog::getExistingDirectory(0, tr("Set the assets path"), @@ -165,6 +197,8 @@ void GeneralSettingsPage::readSettings() settings->beginGroup(Core::Constants::DATA_PATH_SECTION); m_ui.leveldesignPathLineEdit->setText(settings->value(Core::Constants::LEVELDESIGN_PATH, "l:/leveldesign").toString()); m_ui.assetsPathLineEdit->setText(settings->value(Core::Constants::ASSETS_PATH, "w:/database").toString()); + m_ui.primitivesPathLineEdit->setText(settings->value(Core::Constants::PRIMITIVES_PATH, "l:/primitives").toString()); + m_ui.ligoConfigFileLineEdit->setText(settings->value(Core::Constants::LIGOCONFIG_FILE, "l:/leveldesign/world_editor_files/world_editor_classes.xml").toString()); settings->endGroup(); } @@ -185,6 +219,8 @@ void GeneralSettingsPage::writeSettings() settings->beginGroup(Core::Constants::DATA_PATH_SECTION); settings->setValue(Core::Constants::LEVELDESIGN_PATH, m_ui.leveldesignPathLineEdit->text()); settings->setValue(Core::Constants::ASSETS_PATH, m_ui.assetsPathLineEdit->text()); + settings->setValue(Core::Constants::PRIMITIVES_PATH, m_ui.primitivesPathLineEdit->text()); + settings->setValue(Core::Constants::LIGOCONFIG_FILE, m_ui.ligoConfigFileLineEdit->text()); settings->endGroup(); settings->sync(); } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.h index 2fbcb842a..22ab30e45 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.h @@ -57,6 +57,8 @@ private Q_SLOTS: void setPluginsPath(); void setLevelDesignPath(); void setAssetsPath(); + void setPrimitivesPath(); + void setLigoConfigFile(); private: void readSettings(); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.ui index d2aa042e3..7d40b65df 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.ui @@ -105,7 +105,7 @@ - Plugins path: + Plugins @@ -129,7 +129,7 @@ - Level design path: + Sheets @@ -153,7 +153,7 @@ - Assets path: + Assets Database: @@ -174,6 +174,40 @@ + + + + Primitives + + + + + + + + + + ... + + + + + + + + + + Ligo Config File + + + + + + + ... + + + From bdbeaa29e80e9f22cd3595b200d011e3719b959a Mon Sep 17 00:00:00 2001 From: sfb Date: Wed, 1 Jun 2011 07:45:55 -0500 Subject: [PATCH 014/320] Changed: Initial footwork on OVQT-based mission compiler plugin. --HG-- branch : branch-mission-compiler-qt --- .../src/plugins/CMakeLists.txt | 1 + .../plugins/mission_compiler/CMakeLists.txt | 41 ++++ .../mission_compiler_main_window.cpp | 63 ++++++ .../mission_compiler_main_window.h | 36 ++++ .../mission_compiler_main_window.ui | 195 ++++++++++++++++++ .../mission_compiler_plugin.cpp | 132 ++++++++++++ .../mission_compiler_plugin.h | 105 ++++++++++ 7 files changed, 573 insertions(+) create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.cpp create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/CMakeLists.txt index bec71cf94..c5d49418d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/CMakeLists.txt @@ -7,3 +7,4 @@ ADD_SUBDIRECTORY(disp_sheet_id) ADD_SUBDIRECTORY(object_viewer) ADD_SUBDIRECTORY(zone_painter) ADD_SUBDIRECTORY(georges_editor) +ADD_SUBDIRECTORY(mission_compiler) \ No newline at end of file diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt new file mode 100644 index 000000000..70f4d0642 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt @@ -0,0 +1,41 @@ +INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${LIBXML2_INCLUDE_DIR} + ${QT_INCLUDES}) + +FILE(GLOB SRC *.cpp *.h) + +SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h + ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_manager.h + ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h) + +SET(OVQT_PLUG_MISSION_COMPILER_HDR mission_compiler_plugin.h + mission_compiler_main_window.h) + +SET(OVQT_PLUG_MISSION_COMPILER_UIS mission_compiler_main_window.ui) + +#SET(OVQT_PLUG_ZONE_PAINTER_RCS zone_painter.qrc) + +SET(QT_USE_QTGUI TRUE) + +QT4_WRAP_CPP(OVQT_PLUG_MISSION_COMPILER_MOC_SRC ${OVQT_PLUG_MISSION_COMPILER_HDR}) +#QT4_ADD_RESOURCES( OVQT_PLUG_ZONE_PAINTER_RC_SRCS ${OVQT_PLUG_ZONE_PAINTER_RCS}) +QT4_WRAP_UI(OVQT_PLUG_MISSION_COMPILER_UI_HDRS ${OVQT_PLUG_MISSION_COMPILER_UIS}) + +SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_MISSION_COMPILER_UIS}) +SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_MISSION_COMPILER_UI_HDRS}) +SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_MISSION_COMPILER_MOC_SRC} ) +SOURCE_GROUP("Mission Compiler Plugin" FILES ${SRC}) +SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) + +ADD_LIBRARY(ovqt_plugin_mission_compiler MODULE ${SRC} ${OVQT_PLUG_MISSION_COMPILER_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_MISSION_COMPILER_UI_HDRS}) + +TARGET_LINK_LIBRARIES(ovqt_plugin_mission_compiler ovqt_plugin_core nelmisc nelligo ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY}) + +NL_DEFAULT_PROPS(ovqt_plugin_mission_compiler "NeL, Tools, 3D: Object Viewer Qt Plugin: Mission Compiler") +NL_ADD_RUNTIME_FLAGS(ovqt_plugin_mission_compiler) +NL_ADD_LIB_SUFFIX(ovqt_plugin_mission_compiler) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) + +INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp new file mode 100644 index 000000000..dcf17ba34 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp @@ -0,0 +1,63 @@ +#include "mission_compiler_main_window.h" +#include "ui_mission_compiler_main_window.h" + +#include +#include +#include +#include +#include + +#include "../core/icore.h" +#include "../core/imenu_manager.h" +#include "../core/core_constants.h" + +#include + +MissionCompilerMainWindow::MissionCompilerMainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MissionCompilerMainWindow) +{ + ui->setupUi(this); + + // Load the settings. + loadConfig(); + + m_undoStack = new QUndoStack(this); + + // Populate the "all" primitives box. + std::vector paths; + NLMISC::CPath::getFileList("primitive", paths); + + std::vector::iterator itr = paths.begin(); + while( itr != paths.end() ) + { + const char *path2 = (*itr).c_str(); + ui->allPrimitivesList->insertItem(0,path2); + ++itr; + } +} + +void MissionCompilerMainWindow::loadConfig() { + QSettings *settings = Core::ICore::instance()->settings(); + settings->beginGroup("MissionCompiler"); + + //QColor color; + //color = settings->value("BackgroundColor", QColor(80, 80, 80)).value(); + //m_nelWidget->setBackgroundColor(NLMISC::CRGBA(color.red(), color.green(), color.blue(), color.alpha())); +} + +void MissionCompilerMainWindow::saveConfig() { + QSettings *settings = Core::ICore::instance()->settings(); + settings->beginGroup("MissionCompiler" ); + + //QColor color(m_nelWidget->backgroundColor().R, m_nelWidget->backgroundColor().G, m_nelWidget->backgroundColor().B, m_nelWidget->backgroundColor().A); + //settings->setValue("BackgroundColor", color); + + settings->endGroup(); + settings->sync(); +} + +MissionCompilerMainWindow::~MissionCompilerMainWindow() +{ + delete ui; +} diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h new file mode 100644 index 000000000..9e94ea9fb --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h @@ -0,0 +1,36 @@ +#ifndef MISSION_COMPILER_MAIN_WINDOW_H +#define MISSION_COMPILER_MAIN_WINDOW_H + +#include +#include +#include +#include +#include +#include + +namespace Ui { + class MissionCompilerMainWindow; +} + +class MissionCompilerMainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MissionCompilerMainWindow(QWidget *parent = 0); + ~MissionCompilerMainWindow(); + + void loadConfig(); + void saveConfig(); + QUndoStack *getUndoStack() { return m_undoStack; } + + +private: + Ui::MissionCompilerMainWindow *ui; + + QMenu *_toolModeMenu; + QUndoStack *m_undoStack; + QStringListModel *m_allPrimitivesModel; +}; + +#endif // MISSION_COMPILER_MAIN_WINDOW_H diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui new file mode 100644 index 000000000..30756f91c --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui @@ -0,0 +1,195 @@ + + + MissionCompilerMainWindow + + + + 0 + 0 + 794 + 600 + + + + MainWindow + + + + + + + 0 + + + + + 0 + 0 + 776 + 398 + + + + Mission Compiler Options + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + >> + + + + + + + ALL >> + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + << ALL + + + + + + + << + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + Publish Options + + + + + + + + + + + 0 + 0 + 776 + 398 + + + + Compilation Output + + + + + + true + + + + + + + + + + + Actions + + + + + + Validate + + + + + + + Compile + + + + + + + Compile and Publish + + + + + + + + + + + + 0 + 0 + 794 + 21 + + + + + + + + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.cpp new file mode 100644 index 000000000..cfea63959 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.cpp @@ -0,0 +1,132 @@ +// Project includes +#include "mission_compiler_plugin.h" +#include "../core/icore.h" +#include "../core/core_constants.h" +#include "../core/imenu_manager.h" +#include "../../extension_system/iplugin_spec.h" + +// NeL includes +#include "nel/misc/debug.h" + +// Qt includes +#include +#include +#include +#include +#include +#include + +namespace Plugin +{ + +MissionCompilerPlugin::~MissionCompilerPlugin() +{ + Q_FOREACH(QObject *obj, _autoReleaseObjects) + { + _plugMan->removeObject(obj); + } + qDeleteAll(_autoReleaseObjects); + _autoReleaseObjects.clear(); +} + +bool MissionCompilerPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) +{ + Q_UNUSED(errorString); + _plugMan = pluginManager; + + //addAutoReleasedObject(new CZonePainterSettingsPage(this)); + addAutoReleasedObject(new CMissionCompilerContext(this)); + //addAutoReleasedObject(new CCoreListener(this)); + return true; +} + +void MissionCompilerPlugin::extensionsInitialized() +{ + Core::ICore *core = Core::ICore::instance(); + QSettings *settings = Core::ICore::instance()->settings(); + Core::IMenuManager *menuManager = core->menuManager(); + //menuManager = _plugMan->getObject(); + //QAction *exampleAction1 = new QAction("Zone1", this); + //QAction *exampleAction2 = new QAction("Zone2", this); + //QMenu *toolsMenu = menuManager->menu(Core::Constants::M_TOOLS); + //helpMenu->insertAction(aboutQtAction, exampleAction1); + //helpMenu->addSeparator(); + //helpMenu->addAction(exampleAction2); + //QMenu *zoneMenu = menuManager->menuBar()->addMenu("ZoneMenu"); + //zoneMenu->insertAction(aboutQtAction, exampleAction1); + //zoneMenu->addSeparator(); + //zoneMenu->addAction(exampleAction2); + + // Initialize Ligo. + settings->beginGroup(Core::Constants::DATA_PATH_SECTION); + QString ligoConfigFile = settings->value(Core::Constants::DATA_PATH_SECTION).toString(); + settings->beginGroup(Core::Constants::DATA_PATH_SECTION); + + NLLIGO::Register(); + LigoConfig.readPrimitiveClass(ligoConfigFile.toAscii().data(), false); + NLLIGO::CPrimitiveContext::instance().CurrentLigoConfig = &LigoConfig; +} + +void MissionCompilerPlugin::setNelContext(NLMISC::INelContext *nelContext) +{ +#ifdef NL_OS_WINDOWS + // Ensure that a context doesn't exist yet. + // This only applies to platforms without PIC, e.g. Windows. + nlassert(!NLMISC::INelContext::isContextInitialised()); +#endif // NL_OS_WINDOWS + _LibContext = new NLMISC::CLibraryContext(*nelContext); +} + +QString MissionCompilerPlugin::name() const +{ + return "MissionCompilerPlugin"; +} + +QString MissionCompilerPlugin::version() const +{ + return "0.1"; +} + +QString MissionCompilerPlugin::vendor() const +{ + return "Ryzom Core"; +} + +QString MissionCompilerPlugin::description() const +{ + return "Mission Compiler Plugin"; +} + +QStringList MissionCompilerPlugin::dependencies() const +{ + QStringList list; + list.append(Core::Constants::OVQT_CORE_PLUGIN); + //list.append("ObjectViewer"); + return list; +} + +void MissionCompilerPlugin::addAutoReleasedObject(QObject *obj) +{ + _plugMan->addObject(obj); + _autoReleaseObjects.prepend(obj); +} + +QObject* MissionCompilerPlugin::objectByName(const QString &name) const +{ + Q_FOREACH (QObject *qobj, _plugMan->allObjects()) + if (qobj->objectName() == name) + return qobj; + return 0; +} + +ExtensionSystem::IPluginSpec *MissionCompilerPlugin::pluginByName(const QString &name) const +{ + Q_FOREACH (ExtensionSystem::IPluginSpec *spec, _plugMan->plugins()) + if (spec->name() == name) + return spec; + return 0; +} + +} + +Q_EXPORT_PLUGIN(Plugin::MissionCompilerPlugin) \ No newline at end of file diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.h new file mode 100644 index 000000000..a9d34bd13 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.h @@ -0,0 +1,105 @@ +#ifndef MISSION_COMPILER_PLUGIN_H +#define MISSION_COMPILER_PLUGIN_H + +// Project includes +#include "../../extension_system/iplugin.h" +#include "../core/icontext.h" +#include "mission_compiler_main_window.h" + +// NeL includes +#include +#include +#include +#include + +// Qt includes +#include +#include + +namespace NLMISC +{ +class CLibraryContext; +} + +namespace ExtensionSystem +{ +class IPluginSpec; +} + +namespace Plugin +{ + +class MissionCompilerPlugin : public QObject, public ExtensionSystem::IPlugin +{ + Q_OBJECT + Q_INTERFACES(ExtensionSystem::IPlugin) +public: + + virtual ~MissionCompilerPlugin(); + + bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString); + void extensionsInitialized(); + + void setNelContext(NLMISC::INelContext *nelContext); + + QString name() const; + QString version() const; + QString vendor() const; + QString description() const; + QStringList dependencies() const; + + void addAutoReleasedObject(QObject *obj); + + QObject *objectByName(const QString &name) const; + ExtensionSystem::IPluginSpec *pluginByName(const QString &name) const; + + NLLIGO::CLigoConfig LigoConfig; + +protected: + NLMISC::CLibraryContext *_LibContext; + +private: + ExtensionSystem::IPluginManager *_plugMan; + QList _autoReleaseObjects; +}; + +class CMissionCompilerContext: public Core::IContext +{ + Q_OBJECT +public: + CMissionCompilerContext(QObject *parent = 0): IContext(parent) + { + m_missionCompilerMainWindow = new MissionCompilerMainWindow(); + } + virtual ~CMissionCompilerContext() {} + + virtual QString id() const + { + return QLatin1String("MissionCompilerContext"); + } + virtual QString trName() const + { + return tr("Mission Compiler"); + } + virtual QIcon icon() const + { + return QIcon(); + } + virtual QWidget *widget() + { + return m_missionCompilerMainWindow; + } + + virtual QUndoStack *undoStack() + { + return m_missionCompilerMainWindow->getUndoStack(); + } + virtual void open() {} + + + MissionCompilerMainWindow *m_missionCompilerMainWindow; +}; + +} // namespace Plugin + +#endif // MISSION_COMPILER_PLUGIN_H From 00e65b101557e11cd2458e4f77acb3946d3ed20d Mon Sep 17 00:00:00 2001 From: sfb Date: Wed, 1 Jun 2011 18:41:01 -0500 Subject: [PATCH 015/320] Changed: Added some more UI tweaks - most of the UI design is now done. --HG-- branch : branch-mission-compiler-qt --- .../plugins/mission_compiler/CMakeLists.txt | 10 +- .../mission_compiler/images/arrow-left-2.png | Bin 0 -> 1512 bytes .../images/arrow-left-double-2.png | Bin 0 -> 1893 bytes .../mission_compiler/images/arrow-right-2.png | Bin 0 -> 1478 bytes .../images/arrow-right-double-2.png | Bin 0 -> 1899 bytes .../images/document-export-4.png | Bin 0 -> 1604 bytes .../images/news-subscribe-2.png | Bin 0 -> 1805 bytes .../mission_compiler/images/run-build-2.png | Bin 0 -> 2228 bytes .../mission_compiler/mission_compiler.qrc | 11 + .../mission_compiler_main_window.cpp | 25 ++- .../mission_compiler_main_window.h | 7 + .../mission_compiler_main_window.ui | 212 ++++++++++++++---- .../mission_compiler_plugin.cpp | 11 +- 13 files changed, 222 insertions(+), 54 deletions(-) create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-left-2.png create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-left-double-2.png create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-right-2.png create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-right-double-2.png create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/document-export-4.png create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/news-subscribe-2.png create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/run-build-2.png create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler.qrc diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt index 70f4d0642..af39fc18a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt @@ -14,21 +14,21 @@ SET(OVQT_PLUG_MISSION_COMPILER_HDR mission_compiler_plugin.h SET(OVQT_PLUG_MISSION_COMPILER_UIS mission_compiler_main_window.ui) -#SET(OVQT_PLUG_ZONE_PAINTER_RCS zone_painter.qrc) +SET(OVQT_PLUG_MISSION_COMPILER_RCS mission_compiler.qrc) SET(QT_USE_QTGUI TRUE) QT4_WRAP_CPP(OVQT_PLUG_MISSION_COMPILER_MOC_SRC ${OVQT_PLUG_MISSION_COMPILER_HDR}) -#QT4_ADD_RESOURCES( OVQT_PLUG_ZONE_PAINTER_RC_SRCS ${OVQT_PLUG_ZONE_PAINTER_RCS}) +QT4_ADD_RESOURCES( OVQT_PLUG_MISSION_COMPILER_RC_SRCS ${OVQT_PLUG_MISSION_COMPILER_RCS}) QT4_WRAP_UI(OVQT_PLUG_MISSION_COMPILER_UI_HDRS ${OVQT_PLUG_MISSION_COMPILER_UIS}) -SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_MISSION_COMPILER_UIS}) +SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_MISSION_COMPILER_UIS} ${OVQT_PLUG_MISSION_COMPILER_RCS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_MISSION_COMPILER_UI_HDRS}) -SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_MISSION_COMPILER_MOC_SRC} ) +SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_MISSION_COMPILER_MOC_SRC} ${OVQT_PLUG_MISSION_COMPILER_RC_SRCS}) SOURCE_GROUP("Mission Compiler Plugin" FILES ${SRC}) SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) -ADD_LIBRARY(ovqt_plugin_mission_compiler MODULE ${SRC} ${OVQT_PLUG_MISSION_COMPILER_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_MISSION_COMPILER_UI_HDRS}) +ADD_LIBRARY(ovqt_plugin_mission_compiler MODULE ${SRC} ${OVQT_PLUG_MISSION_COMPILER_MOC_SRC} ${OVQT_PLUG_MISSION_COMPILER_RC_SRCS} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_MISSION_COMPILER_UI_HDRS}) TARGET_LINK_LIBRARIES(ovqt_plugin_mission_compiler ovqt_plugin_core nelmisc nelligo ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY}) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-left-2.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-left-2.png new file mode 100644 index 0000000000000000000000000000000000000000..8f153292c3c8f4e41e5ce87e5eb8e72fad7ba126 GIT binary patch literal 1512 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjEa{HEjtmUzPnffIy#(^vlDyqr zfHV;NblzPLq&N#aB8!2v2N=7Z%(epwmK8Xr18J~%3>7|0moYFfKk#&M4DmR=_3G{X z5LcN4AK#yuv-x?>cPD*s?+GQEsh$fWc5+S>*lFkRC@VvWtIPkGxT)5p2b1-WnHyd_ zvgBHey@RliNUvb>qKgp+JiJ4t8lw`TS1r|f8+R`CyyatNI{~e{wZFX8Ci^`5{yW8J z^3Q|+Ws>gAd|j=0Va@BfGnby`)_nQt+9dFz{*yg}*%!x!JZsCOJ91Bj%=D1FpP4yt z@&AN^-(ipC#rN;$*9o4qG5mPaG4Jf%w>~unbRLZFQfJnk&%Evo|BVlNKNMYVEqapY zzkKcV?fH54e;v73eRe&&x}?;~6wZ=Q=eF!*l>WUSidpsYkB9rN`8;aA6#h>v%6$ww|%^%?$keVOKjY3&Rt??x7=Dl zqG)AH`eyHFzGvm@vtoCu9XDs~E@thGpZDpc9+cr<`*MHLY zTcCO&A*#(Va`TU}2qP0dRsJQb1qF}zT>k8I_@J4x%jf%cPNvzZh4&cSy3J#MA9_); ze06e}b8;6)r+B1J+>~jjqmFFql3rI-`&Bwf^o5Na zZ_CRGj+-=DFD;O|Wn#KKGJes2wPj5Xuj>Vxa2b}m21 zw)MrP;8kS;Y~7Q%rCcn=&N(ZSk*1|tIlOI<@FT?2~{LnA9wV=F^rT?2C~1B3agXKY~_ zKq{>ux_}xC4Rj5Rbd3x`jEt>}%&ZJeAsX1MV;WI308-w%HO3D+9QW+dm@{>{(JaZG%Q-e|y zQz{EjrrH1%@j?`p7A2=L_?4FB=OnK2H~k2dFhNMfhX(n;oLpXBu9umdpQoFhnU}5y jbhv&&QGQlxa!Ij%9$346ne7%(SgTe~DWM4fC9QN+ literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-left-double-2.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-left-double-2.png new file mode 100644 index 0000000000000000000000000000000000000000..8b6d62c7a6cfa1ff82302ff120359a54b7af657d GIT binary patch literal 1893 zcmai#c|04~7RNJM#!`E=YORW;LskhDd#PB$SZfa&p+Uq%BvMPLdc;=KD%Az;h<#rN zWu~f$Wzas`Ywc=z9;H-c>#GUgeBS5%_3r0$&+p!I&-b2l|G9_hV2>6RmJ+U3dVATv8N0HCHvk3V&Vw->l!i?-k?Z|s@3Gk78tZsifdQ>)`? z*&AYf|`&e6;xmaP4WYNcQblEvhwnF&xLqG-XrQlCl-`#_Lftp7|Z0BTJK0TWguOve_Q)2TlBo zBD-4eMOx1-%V#7l*gBPk{Q+;E{)QG*W!)Pb%%N@+j?WsKPa(X0!Z{VSbLfj}OEHfi zGYq$bPNJ7^bdk$c&)tD{k*6<#tWgtVv;eM2+)m&0jf$2ucZ81*6ejS#PhC22qa<25 zT6x9iF(H_cW$7u_+|(1hq?z)A`&e5hm2~(^yKuo|8zHII8=at*dp`7=zLmxta4%*k zXRJgiuC$^TSpUbKR1tq>dk|q(^OKHKj&0@6Og_vZYn=c zjwJ1{n@ggj$7T5Rek?-_y$Nr6o+0RFDfo*xoxS&c=t_}-nA9o%v`?x8PswCow3%!PEn0l5%>x%7}Usr zU)Q=*ZeoAX<@BQEXsdV%SHV3*BM`DlhOqmVYWf5mNKKu410 zy!;{ILt>3<|F<-S-AT3l*i(&ztruv%L+s)XulBS&=?`F5f8@0CL#5WJGA>a%)$M20 zujKFfB&WyX%&CX5?FKEWGK%xGe?OXIh*{@}Vl>DqDm)`s zQ_78<=}N3jT;p67+HYL`aabqpbHLEY*Ylfo2+m+gxig+Yt-oc3UOEsgrqc%)_HoZr z({uWqn0ap=)Et^S$t9GNvYagYtao4NldNRU1#05u`{yEc}< zN4X;ze1)|oN*3v7GWJ7OfBk5$u65_>0$Y9b(uYD~H8S$=U*`syozl?&^?sxZI%t3> z1eqiF-?x1?)~BF1eo0^X&K6=KU;H266kZJPkjy5+aE)?e&!aRmyQ(R=t`1nSxd0b) zPs+%u88^g4(U55~G}XxVD;ZAh}xp!sE&y7SXG+%#v)#)laO)WyS(!V?|TN zWhY1c&a$P|&*%nhVV!;G-BeGt(2lkxj=jQaoOX%LKgZK;o{Hh*h+b5dAqRYLPRI=@ zdwF~;J@z{lTZPr(;7wPhzs)DgX?*cN%Z{+*JgyhT>N;EwRwo?9jYy*3ddwoiq=2rV zsRl=FFGck9JsXcPZ_Q2Bce3m*ovUAyaIp_qRr6CEQ)o@bt}DKrTxb|W?{Y@26^T^m za_ZCK7Z&YzzsN-uM}boo^-2P_3%VRuF;aKV@~L=!N7}<~FHiYxKN;If*112LxcKwt zJMT-s+me2DvW>3bt^gdX7uPs<(C?wPy=!w1@8|;}e-BH$a_wNJk?VCCHGL ze|qhjL`2eTke13rWNCMFlc|v&w%8=y^zt@ZIK<=S1`V9P(_x^1>OHT)u5fbaYGnQE z^wm|hwYw3YlCH3OR3nhsPv-e4NDT=Lq%kGr^(zhQC(4DLZ3f9%;ASJcCZ(-DyTbuv zf~ns#g2kL_-eP-~_u(*O`&5>&3Mk#>QyRCT!540u8#BAVa=5&EKDH2<)2)?f$NP2F zDA(L6I5OU!f(Hfg3;+&=>Vsf#5cG-*430wTppMphD4th}!~6?4ibS1IJOBm-LE#`c z)CI1Cg6pDS$P+-oz&qi803s=X5J>+I00Y5bE>L|G9EyU$P5_bTSS$}f9+iY4;P7D) zc)(2xB^(8T9OoiX@i-EZND7MplgL4k(36k|2nOwdfxy8qh{4Ooqb_p%rjum<=S_jX z)OGNH3r889Nr4oaKN$}&3n1OVU$iFr2jQLY{sHu#dhv$5AkmYcNHPu&u#cpYLj5a$ zL~im95dS^!b#=o0RWgl60~2thFi;2~EC|di91>0@1>Z^XY{{$yGPTv3k literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-right-2.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-right-2.png new file mode 100644 index 0000000000000000000000000000000000000000..d4016e2c72a2461b0722fc3aa38b48408a69c629 GIT binary patch literal 1478 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjEa{HEjtmUzPnffIy#(^vlDyqr zfHV;NblzPLq&N#aB8!2v2N=7Z%(epwmK8Xr18J~%3>7|0moYFf@AGtV4DmR=_tNR? zm{f`5AKzD7razlA^Q6kd^L zo#?XOg-a9eC*RÅZ){re2Z8$Y+_3r~;@KCofaH$mZBs%z#hxKKQIE$feOM|qix zZYJd}7kl)!y4~8ZFXjC&i)Y90FaDb*ChGNV&R$st-JlEK6Si5`y?Nnrd*9x_=a)zS zoy_tsIO6rj@7fhbkK!2`M4Q?IQg)dYKM4qvuc`WQ(fYl|T!oU7g9;bf?e>eJ6>gqr@Z&u<$E|mPo9^(F~*@&(naUVL-WK>cS{+fzd3K+lkxcF=cTJO z<4%YE(&9BLeP|qfp<>?Y69GZXY_8VYo@buw5WQqq%hgc1DsDCR>kMh-E`eKFZp3m^S^D;N9L@3xa?3ODb}jX|+aD{Uq(E-Pht@Jig^ zx8;}pSB~WGlxX#tp1o{yOy;+%AD$kqJli`dA$*NZ z=t;kR9N6~dUDLfMXQn(>u{p6sC;S=D<^63(gRaio=rqr%YvPttf#Fe2;c~5=U-4l4sVd6MXo*NOu!lQ#Wg2mIC$SHKb7Ln1Y=(tqyYSzOk8*3V-#0$BqCUIKG#v22zDq&rjw$_mOYmjLMOWGkN z{{>$xHz+>Vea-cMX7o0hSr;?ZwU@|kbP}ETNqWzh_a>)4oILiZo;ik1Vdu)$6CSI+ zax7{3_@(Xf|I>dNcY3vT+@9EJ3Cz~2C9V-A$wjG&C8@e8K!U-@z`#=1&`8(7BE-CMA49&pOTqY z3DsbzYiJl^U}KKAFj>dBv#=86_nJR{Hv2yE4mClk;Bl$^@oS6Y^zleos;^dnHh1R)V08sr0Wa(Q{V uUS@KBo^Ez#Ub-I8;razd`B|ySCB^!AVD0*4wp&0YHG`+CpUXO@geCxCqjY!x literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-right-double-2.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-right-double-2.png new file mode 100644 index 0000000000000000000000000000000000000000..1fe9feb284002c2c194f74aeb4c1985e12e729d1 GIT binary patch literal 1899 zcmai#c{~*A8po$&--_fU6glM6WmelU(qyumOj)L}H^vy-%wWb?rZ|dg&30xaj@(RK zYa=vbBvM8=LY5@iKG9~2GPdas&iUNW{p-G;_kDlw@_gUtdH#8y)Qe8G3bJal002P2 z-p5?_0)V6F-?Wh~z1NJ157@Hn#ibr~jB-Z~O5`9Kicg+YIxI z{QQk_eTT>JMyhAiu`eU++E6~@bRovEMqk}JM;=a{L$)|x^!apQ|`hzd12n1 zVar8ls+{20(M!y)bBbGJNAq>Uo72rUrW&~ci%pC#jE%)Lb^}|xwKb~E;s+ngnrbD=AXBO})|Vzn9uh~F4^1rg91ETcVewU`kIcWs|wKyc4E}0!WwhSI~KE6h8}n(&fO9m_wVR zqdVtV1te-!mr9XW)SU__r?x=@+=Fz>r8 zLXTaik_Y8Z)iax*RgfpQaf9#s)9|aUCC6cmuVZROn+GxS)>o9mzZrQw3x&7z2h8BX zd7cMV`;I>`5R5iXXXV+vA>QC-76Pw%TD+KhS zIJQ!zc(JNDt9Qm-QtsQf=Gr@CYW0#k@^r|Zf!McPcLz8~K? zpUR|-K^J3?3--#1oK`-x|IBuX3NMzKro}D6{eiz;7q424QE$wr@SCv?qSdiWsyVat} zvaxAx30&8nNPNGcvO2K6U4a2!mGsQx^tKBd|5X~Qho3<77bBRTKB|Agy35|qcd8i- zb}i(WTttYu+8b3?NXmMDJpVaaQZu9ZpI&;i*%&u9IjUjYaJ+-9E{t^{n3Kil(xT`Qx8rEOLOYHRvj{XAXX41K+x#E>3g7;t%Ac%Gqh~Y z(}@^0w7_Vt@79gr*%Zq&=#pQA--ko$x;p44xnKQ3Vr3H$R{F!=ajFRGZu1Uh%?@f| zdxS*ZgyX46661s!?*d+ktnsM8-5!_z ztC7ZW@8?VfySktk&9oFm{K;})jfSK44mI~)r|-Jg@77fuJC9T*Qm^PYmd6%Kv0P8- zt4?4CRr&Gs7ZtjllvG}a6?#{%y~6q(<2R8De17h7(9q+6z$Q%R%~73}-?Zi$ zm5a-69aSjg_6k^=lRFNN@4{DbbCdb+*RtHJFcO)={oNV^cQeO1uz7pKZY|l%Y2VrZ z$ti&S;IRlew(HS_5MGyd%{uDogmOTkaBsddr{xRV%2xmk_3j0Qp5qJW?DUwbJ z#Z{w?S40;^|Gn^ab4L9ga#U0lC14DwyM35+Oa99K-n1H8I!Q?$0Ot)y*EvEo` MYbUGw$Sc?X1Hp?})c^nh literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/document-export-4.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/document-export-4.png new file mode 100644 index 0000000000000000000000000000000000000000..bc76888585fa83ffc6e6acc390fefdbb83ab4316 GIT binary patch literal 1604 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjY)RhkEu-kbUIVD{!X-4)8V`{&-A`TqC4>dog(tgL=H+Q{u!UaBI{ z$k4#y!ou)%=iXwISproP ztvDo-Z`{9szs|t+uZ)9sAKa_+Q9y*z}F5A`2fMUxEZ%2S;rD7z$jqP5$a3HP7Z6gTnOFjvS2{CS5*ikLBg$`1<<$w+l7Ac(lOxl7f=Bg{6nZ zbB%fP7Oh{;Z)i{FPXUc2_J zxq*Set$X+W1*jgsUMXoIc+li*T33s}S(CzZic4Mc^Yxn!Dli-{=qWOq>GOKmzkpng z_V6y5iz`=g?Z1DYMa0R$i!=6mVNp@jzkhWM4oibpst9%7J$v?S`_ZJ2%ek3u?{1V$ zRF>e`_QuxQ+SzXY@dpnSm>L;YUCpYjt*y15>ScSWwANC9BZ5co>$_PNwTpK!Bt(jB zx~X&Mp@Gvv0j;U0Dvf6T(Vps6TU}AHLxhKI?aGy!SF#_xFrVJId+{b6?x#hP7c)fW z6u)`%CL}yOe16#KtE{eptAvGx%T{mb_K{PFdl2LmF^%<{<)1qHvhwncTfeHCnVAI@ z7k@rIYguSoTAJRjOz-wD9-X_z<`hrq5#sw?c_m9MWGk=q{{P#4pN@L;+UHs5vW0&Z z-Td2sQ9;n@fQj#(Yw?Ts#yYDMF}E&uscJ5T_ zj~cr@cW#|JXIJ;<>YX=lHm^(A@JzMuVVC}8-=s(}ucbmFt_S7yN8V+UVQZD&*$t}X`#NKU;Sd_5WL9Ca7y)9jxvMF zQk{kWj>j=8$Q+ARWAI3yB+77|;YZGUv-!Cx^6MB^Fj=rCSj}7gZ4X<+fA*QNm*!Rm zG4lgU4%HIZh?3-@)Wnih-4r0fU}RumscUGcYiJr`Xl`X-WMyowYXD>zwDV8thiL$* zw1VgYYA`g=H89dOG6*p;wlXraGBkx~V6%>CMA49&pOTqY3Dp3!!7#+Y5~RVz5Td~^ zMxhp{Asyr-pUmXcyy8@bjFOT9D}8;iU72O6$@#gt`FX{9`9=0i`}Mu~s?$I%44$rjF6*2UngH#hkgNaz literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/news-subscribe-2.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/news-subscribe-2.png new file mode 100644 index 0000000000000000000000000000000000000000..d5259a76be445872183b39b00889f995f0b6d9d0 GIT binary patch literal 1805 zcma)+c~nzZ9>*Vx7zB~HV4!hOkZ6UFJAX#>2c z%8$v34s=*Q@j!}K-3w<5O7QgU3ylC7VZ+-H}eH_nh+eibm3=*$jJ-wwP^HB zoaVm5n+MA?{1E%CA{GvyHaqCrOz@o&1enbuA2Xby5snHM$DYo}pjWyk!TWCQD+x~J zSoZaW4K#=AjDl^$J9mzLc)hgNZaB8=F*o+$+3>Id6l`SFu=Vib*@d-tzvf+Fxl&Gx zZpJW1wr6-t_<7pry+3>;$G*GM7;(txRaY>e&?AvZ?RF^b^gz0O@hNqjHqSV3dle1Z zFD=T`rJi||Dn-*C4G)LtA?=V?j}KTm%G!JWz@)C7UcZx2p{-VWRVsIwkTl@*i(R`= zew2c1KkyIT==*YUsHng7BBa^TUATK*Y_GPZh&L4A&T_HHY8DXXFlGb z7!N)zl45pLBQiTPE^a57IA=BM=o~CmmD&N2U-`N0YA`#`+qHZ9E&$A9xT>rM*q(Ek zzPBhI&!k(Uo1RZQb>v5)jCd99JvJvtTI*X)0V(=6nMGgLqJ>DQE5oc-N8{_zh@w+46RihUdh%0SZE{ zyvY7COGUNcJ>Sy$bZwn++FWl@U-Bwbi-1vU#CbGJf(&=B%c?f<^?M5{t|RC@{I1oz zCum$Klv36m_IQ8)(!-<^+2+p3&Qv!<`}L?IQ_0K3yk(VvR;I=3x+!C%GN1Mf~LUBTJL&Kv;>*0zGHju;?a*>DZOok&^NAnIj^TzXh5kel$3uX z-dsu3{1&T(PZl3wU85Pw-=~~>80~j8L>8~EgB(DNt3|OS`vjXAU278&Wq5oY+8mTI0DBcwjE_gh`*RbIL1dMtV20UVZWa^&n zvrDU6{+7EW0IrDaCui45sjY5^bAbhcZ=jD05f6X=9Vt#t5|vMi0+Ie6Ve0=d`L$~; z?k!6=7F8`ocd3Pk+{-GLRLcxU#<9zK+eV$LS@F15u4VhUSx$)e%j zvi@t=%B_Mj)zUlK#yLODRGJQOlD0~odDaY~bOe4# z$Ca{W#V;L0lWDK3L22lrg6FxuDaa@@>e<@BC8ssnLZ(de<65_3`u==s7rL{DKKo`Y zLaRCLj-~jySw)Lk9JqEc^ugH=pya(s^sVWWk`}Xh@rYPl!(cFeo0`J7_~Fqy^6>ez z(mfTGL-yyazKE+a{-MKg$E!fwkE8N8nYbez_?pAq=wA{>PfbqsRy8&^v&J87t^J}{ z(VzU``+RVdnjX0+XFNIVL7L?X0(?8@G@4=$d` zWvv%AtY?PJEifZh&?>ndDzcsRip~G_Snj+sJ$4_y0!`R1L2POg6vc+HG4KEo@pv07 zfq*4g1`w>scp@3J!s6i;DH} zFk@nA+`j<010eu!qXa;3qeGvDwKojVm65z+sZat70={Ci6UjK-r(Uti5S7VbFcVnj z%p^K4e#64TMRT#NC>&^x$L(b%?friUFE?K=9MPPBJ9+*v^>fCJc>i?@co0jl2_WFf zmPE3JH5N~TPXQBh*AoWxl^KsSX>3kZ5(IEK9P`+OI2JW35mH90nmcR&n|5rNzD}Y- zz~582bSPo3I~7j<2GukTPapWtbOgoU>+@EXi!ndBv9U_`r@g+l;y-~Az}>~ixydn- F_a_&a9Pj`D literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/run-build-2.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/run-build-2.png new file mode 100644 index 0000000000000000000000000000000000000000..5fea6c540bc908826f0d875e9b490146fcddf973 GIT binary patch literal 2228 zcma);cU05K7RP^5Lz66m1PDbQ7(hb`)eu@j6In_C1qCS~uu%hnP{InK3kn-7VL>Sg zPlF^LnkWj0NHeR5EFA(+vJ2^F z0Qhx30HkIDz#2G|`WFDip#k9UU;w}s0e~vKq{#~pPDq6wadrSLSXPP6DWH*|yZAG} z&?DP*7r~&Ixjh(9w~qkrcOd}Njb8zxw8IYeJ}#o)e7(+iKT)wZ`8-+A)kLu8i}b=~ zf-`t&vif@ZF8c#JFPzf1S?h?GJ5ul|ZE*Q|f$pb)NZZQHwey48nVtvK&9bCk2*p(N z?Z+-x<%B6AsR}n_Mg^MbSN!TUtrlAn7kj>lU%pHdoPGF~{kH7vVo9G`Ix4L>VNpsv z%}&g&9x6u2Da;~FfA+rVuF~qZX+Cj3TAbt>(DJJaK!5v8EufXPq0w7reE@cDpL_?@ zgKHDm693`&;#hseF5q6&)H#llqP9&^wnw5B3=Z$CI&p8^#Kh#|*x1&PNj|K#N6hpShwmWS3ct)P&k7CwLWir>NEDxndO%3#OhN}tWfWUy!SI;NKd z$={Zf5ry3wtkBTcbE`=Y>F@gaAND{AV$S(m8?jrP8&fp`K_AY_D#g!0*@k-Rl5gy*p-cvV|+=H+3{PIk~02v2iu8 zf~r0TzgF?iDq&%e&v{isgruFiD@y=s79{oMIV63h^QKMJas#IO_&%pkpY9FAUbPil zkq1V@cex6@gMy|e`}=P@`}(><(l|;L)PH&!@JNDGsF*0u%c!RO6lW>`ody+appj{` z9yJXO4K+>84Vn!%NE&GJ=hf6ieO&!K*ZMrXUZZ+GoxyhHr^htPb9=L|T~n_V%KCau zkBBb`%?t{14UP>zYLx80U0Yl0Sz28DZRp*=P1SoR`+ABke)`R+Z(x9E9Q1JgZbilZ zR@yinE?q%wU;IjRJ%9I;lIxHopv3Z!xV!1Z^tF}0E}PvCR}eA2yIU)zA+;gDd-(>v>T2D*kUA{2PXe!{2t100>t-%BSI-9> zKmLMGe=eYn^J0%gp&vI?pr0AJi8=|?-R_PV90{LM-d<_*rvT)^NfeCys-z?@8QETC?R;<97YCn8dny`{MQA$(^5u+c1hlz)V(t4k;>O9 z2qP`yIU~cvVRe3{3LSnS3JMAbZr!>S^sKiR;p_Wy&+hCDfG0FM*qwe%E_9QsUcr=U zgIG$3^`(_gW)aW2mp|4{70rzOZByV%c`Op8U~Fw|i+aLE1-YuIa79hr7b`*zYq~v4 z6Fljg7~m;P+*=KQjm=&W6|s~Evt4jVfu}#bG-w05c=x>+zXri#=!eF~FDo9a4p`-L z`isiS&h-xsNdhiODr%5D7eo0@cD z1Eu-O;AZ7p^)Hp@}{d{xq?cC>8d=x%q{t3y+ zUgqTmi>`@Gj#3_GWrO8$;>7sZ8=MrWrF*oKcWP@dmX(#U9vxB@3ey?J{qOD=W?p=Q zB+is{#05h31^fSAQe13uYe)zH-M2dj2M062Ur6Gd^O5~ma;>ecxnjK1(o$_VcXu|Q zB(TlunEpp#V4$`Zo>^OPab)WXR4iZH_9XMmUwuJGj~zoO!Y!AoI+J0G1l`}ZT5V}F9^_s@cr2WuQdg_1=P>|Ue#X(b@LNx*Rl?q_poP|53EV^7wMLfP zx1D~hqhBmJh7uA>L56`1fJLJZAu$*v#>@v}fkR_)CKgCE_<_z=6bN9@ zNHi9SMf+e)a9DF3#&QRUcyA5ft2+_C1GK0xYIx#*05Af^2YqN8FvaWu?g2WYPUPdsKQ!*h`=2bJEsL5b8kOa_I$hgE~m0|4>g=^$T{+mBTwBqSI|efLIEx4pkFW6?s`4I;o{M|X#6 ILU8)O0m?46@c;k- literal 0 HcmV?d00001 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler.qrc b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler.qrc new file mode 100644 index 000000000..8d31abddc --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler.qrc @@ -0,0 +1,11 @@ + + + images/arrow-left-2.png + images/arrow-left-double-2.png + images/arrow-right-2.png + images/arrow-right-double-2.png + images/document-export-4.png + images/news-subscribe-2.png + images/run-build-2.png + + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp index dcf17ba34..b233ce922 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp @@ -25,6 +25,7 @@ MissionCompilerMainWindow::MissionCompilerMainWindow(QWidget *parent) : m_undoStack = new QUndoStack(this); // Populate the "all" primitives box. + QStringList list; std::vector paths; NLMISC::CPath::getFileList("primitive", paths); @@ -32,9 +33,31 @@ MissionCompilerMainWindow::MissionCompilerMainWindow(QWidget *parent) : while( itr != paths.end() ) { const char *path2 = (*itr).c_str(); - ui->allPrimitivesList->insertItem(0,path2); + list << path2; ++itr; } + + m_regexpFilter = new QRegExp(); + m_regexpFilter->setPatternSyntax(QRegExp::FixedString); + m_regexpFilter->setCaseSensitivity(Qt::CaseInsensitive); + + m_allPrimitivesModel = new QStringListModel(list, this); + m_filteredProxyModel = new QSortFilterProxyModel(this); + m_filteredProxyModel->setSourceModel(m_allPrimitivesModel); + m_filteredProxyModel->setDynamicSortFilter(true); + m_filteredProxyModel->setFilterRegExp(*m_regexpFilter); + ui->allPrimitivesList->setModel(m_filteredProxyModel); + m_selectedPrimitivesModel = new QStringListModel(this); + ui->selectedPrimitivesList->setModel(m_selectedPrimitivesModel); + + connect(ui->filterEdit, SIGNAL(textEdited(const QString&)), this, SLOT(handleFilterChanged(const QString&))); + +} + +void MissionCompilerMainWindow::handleFilterChanged(const QString &text) +{ + m_regexpFilter->setPattern(text); + m_filteredProxyModel->setFilterRegExp(*m_regexpFilter); } void MissionCompilerMainWindow::loadConfig() { diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h index 9e94ea9fb..388b5c57d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h @@ -7,6 +7,8 @@ #include #include #include +#include +#include namespace Ui { class MissionCompilerMainWindow; @@ -24,6 +26,8 @@ public: void saveConfig(); QUndoStack *getUndoStack() { return m_undoStack; } +public Q_SLOTS: + void handleFilterChanged(const QString &text); private: Ui::MissionCompilerMainWindow *ui; @@ -31,6 +35,9 @@ private: QMenu *_toolModeMenu; QUndoStack *m_undoStack; QStringListModel *m_allPrimitivesModel; + QStringListModel *m_selectedPrimitivesModel; + QSortFilterProxyModel *m_filteredProxyModel; + QRegExp *m_regexpFilter; }; #endif // MISSION_COMPILER_MAIN_WINDOW_H diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui index 30756f91c..865cb20d2 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui @@ -15,7 +15,7 @@ - + 0 @@ -26,17 +26,14 @@ 0 0 776 - 398 + 426 Mission Compiler Options - - - - + @@ -53,15 +50,29 @@ + + Add Selected + - >> + + + + + :/buttons/images/arrow-right-2.png:/buttons/images/arrow-right-2.png + + Add All + - ALL >> + + + + + :/buttons/images/arrow-right-double-2.png:/buttons/images/arrow-right-double-2.png @@ -80,15 +91,29 @@ + + Remove All + - << ALL + + + + + :/buttons/images/arrow-left-double-2.png:/buttons/images/arrow-left-double-2.png + + Remove Selected + - << + + + + + :/buttons/images/arrow-left-2.png:/buttons/images/arrow-left-2.png @@ -107,8 +132,87 @@ + + + + true + + + QAbstractItemView::NoEditTriggers + + + true + + + QAbstractItemView::DragDrop + + + Qt::MoveAction + + + true + + + QAbstractItemView::ExtendedSelection + + + + + + + true + + + QAbstractItemView::NoEditTriggers + + + true + + + QAbstractItemView::DragDrop + + + Qt::MoveAction + + + true + + + QAbstractItemView::ExtendedSelection + + + - + + + All Primitives + + + + + + + Selected Primitives + + + + + + + + + Filter + + + + + + + type filter here + + + + @@ -128,7 +232,7 @@ 0 0 776 - 398 + 426 @@ -146,36 +250,6 @@ - - - - Actions - - - - - - Validate - - - - - - - Compile - - - - - - - Compile and Publish - - - - - - @@ -189,7 +263,59 @@ + + + toolBar + + + TopToolBarArea + + + false + + + + + + + + + :/buttons/images/run-build-2.png:/buttons/images/run-build-2.png + + + Compile + + + Compile + + + + + + :/buttons/images/news-subscribe-2.png:/buttons/images/news-subscribe-2.png + + + Validate + + + Validate + + + + + + :/buttons/images/document-export-4.png:/buttons/images/document-export-4.png + + + Publish + + + Compile and Publish + + - + + + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.cpp index cfea63959..005140391 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.cpp @@ -6,7 +6,8 @@ #include "../../extension_system/iplugin_spec.h" // NeL includes -#include "nel/misc/debug.h" +#include +#include // Qt includes #include @@ -58,12 +59,12 @@ void MissionCompilerPlugin::extensionsInitialized() //zoneMenu->addAction(exampleAction2); // Initialize Ligo. - settings->beginGroup(Core::Constants::DATA_PATH_SECTION); - QString ligoConfigFile = settings->value(Core::Constants::DATA_PATH_SECTION).toString(); - settings->beginGroup(Core::Constants::DATA_PATH_SECTION); + //settings->beginGroup(Core::Constants::DATA_PATH_SECTION); + //QString ligoConfigFile = settings->value(Core::Constants::DATA_PATH_SECTION).toString(); + //settings->beginGroup(Core::Constants::DATA_PATH_SECTION); NLLIGO::Register(); - LigoConfig.readPrimitiveClass(ligoConfigFile.toAscii().data(), false); + LigoConfig.readPrimitiveClass(NLMISC::CPath::lookup("world_editor_classes.xml").c_str(), false); NLLIGO::CPrimitiveContext::instance().CurrentLigoConfig = &LigoConfig; } From 9e3a19e654376a70ce103dc2687dbeec95c81bb4 Mon Sep 17 00:00:00 2001 From: sfb Date: Thu, 2 Jun 2011 13:47:31 -0500 Subject: [PATCH 016/320] Changed: Implemented mission validation. --HG-- branch : branch-mission-compiler-qt --- .../mission_compiler_main_window.cpp | 114 +++++++++++++++ .../mission_compiler_main_window.h | 14 ++ .../mission_compiler_plugin.cpp | 4 - .../mission_compiler_plugin.h | 4 - .../mission_compiler/validation_file.cpp | 133 ++++++++++++++++++ .../mission_compiler/validation_file.h | 51 +++++++ 6 files changed, 312 insertions(+), 8 deletions(-) create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/validation_file.cpp create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/validation_file.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp index b233ce922..0cbb1e708 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp @@ -1,17 +1,24 @@ #include "mission_compiler_main_window.h" #include "ui_mission_compiler_main_window.h" +#include "validation_file.h" #include #include #include #include #include +#include #include "../core/icore.h" #include "../core/imenu_manager.h" #include "../core/core_constants.h" +#include + #include +#include +#include +#include MissionCompilerMainWindow::MissionCompilerMainWindow(QWidget *parent) : QMainWindow(parent), @@ -19,6 +26,9 @@ MissionCompilerMainWindow::MissionCompilerMainWindow(QWidget *parent) : { ui->setupUi(this); + m_compileLog = ""; + updateCompileLog(); + // Load the settings. loadConfig(); @@ -51,7 +61,11 @@ MissionCompilerMainWindow::MissionCompilerMainWindow(QWidget *parent) : ui->selectedPrimitivesList->setModel(m_selectedPrimitivesModel); connect(ui->filterEdit, SIGNAL(textEdited(const QString&)), this, SLOT(handleFilterChanged(const QString&))); + connect(ui->actionValidate, SIGNAL(triggered()), this, SLOT(handleValidation())); + NLLIGO::Register(); + m_ligoConfig.readPrimitiveClass(NLMISC::CPath::lookup("world_editor_classes.xml").c_str(), false); + NLLIGO::CPrimitiveContext::instance().CurrentLigoConfig = &m_ligoConfig; } void MissionCompilerMainWindow::handleFilterChanged(const QString &text) @@ -60,6 +74,106 @@ void MissionCompilerMainWindow::handleFilterChanged(const QString &text) m_filteredProxyModel->setFilterRegExp(*m_regexpFilter); } +void MissionCompilerMainWindow::handleValidation() +{ + // First switch toolbox pages to show the compilation output. + ui->toolBox->setCurrentIndex(2); + + m_compileLog.append("Begin mission validation.\n"); + updateCompileLog(); + + // Load existing validation + CValidationFile validation; + validation.loadMissionValidationFile("mission_validation.cfg"); + + // Go through each file. + QStringList list = m_selectedPrimitivesModel->stringList(); + QStringListIterator itr(list); + while(itr.hasNext()) + { + QString filename = itr.next(); + //QString filePath = NLMISC::CPath::lookup(filename.toAscii().data(), false).c_str(); + m_compileLog.append("Parsing '"+filename+"'...\n"); + updateCompileLog(); + + TMissionContainer missions; + NLLIGO::CPrimitives primDoc; + NLLIGO::CPrimitiveContext::instance().CurrentPrimitive = &primDoc; + NLLIGO::loadXmlPrimitiveFile(primDoc, NLMISC::CPath::lookup(filename.toAscii().data(), false), m_ligoConfig); + parsePrimForMissions(primDoc.RootNode, missions); + + // Parse missions to check modification + std::map::iterator itMission, itMissionEnd = missions.end(); + for (itMission=missions.begin(); itMission!=itMissionEnd; ++itMission) + { + CValidationFile::TMissionStateContainer::iterator itMissionValidation = validation._MissionStates.find(itMission->first); + if (itMissionValidation!=validation._MissionStates.end()) + { + // Mission already registered, check hash key + if (itMissionValidation->second.hashKey!=itMission->second.hashKey) + { + itMissionValidation->second.hashKey = itMission->second.hashKey; + itMissionValidation->second.state = validation.defaultState(); + } + } + else + { + // New mission + validation.insertMission(itMission->first, itMission->second.hashKey); + } + m_compileLog.append("Mission: '"+QString(itMission->first.c_str())+"->"+QString(itMission->second.hashKey.c_str())+"\n"); + updateCompileLog(); + } + } + validation.saveMissionValidationFile("mission_validation.cfg"); + + m_compileLog.append("Validation finished"); + updateCompileLog(); +} + +bool MissionCompilerMainWindow::parsePrimForMissions(NLLIGO::IPrimitive const *prim, TMissionContainer &missions) +{ + std::string value; + // if the node is a mission parse it + if (prim->getPropertyByName("class",value) && !stricmp(value.c_str(),"mission") ) + { + std::string name; + prim->getPropertyByName("name",name); + + m_compileLog.append(" ** Parsing mission '"+QString(name.c_str())+"'\n"); + updateCompileLog(); + + // parse the mission and put it in our manager + CMission mission(value, ""); + if (!mission.parsePrim(prim) ) + { + m_compileLog.append(" ** Previous errors in mission '"+QString(name.c_str())+"'"); + updateCompileLog(); + return false; + } + missions.insert(make_pair(name, mission)); + return true; + } + else + { + //this is not a mission node, so lookup recursively in the children + bool ok = true; + for (uint i=0;igetNumChildren();++i) + { + const NLLIGO::IPrimitive *child; + if ( !prim->getChild(child,i) || !parsePrimForMissions(child, missions) ) + ok = false; + } + return ok; + } +} + +void MissionCompilerMainWindow::updateCompileLog() +{ + ui->compileOutputText->setPlainText(m_compileLog); + QCoreApplication::processEvents(); +} + void MissionCompilerMainWindow::loadConfig() { QSettings *settings = Core::ICore::instance()->settings(); settings->beginGroup("MissionCompiler"); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h index 388b5c57d..de8328dee 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h @@ -10,10 +10,15 @@ #include #include +#include +#include + namespace Ui { class MissionCompilerMainWindow; } +struct CMission; + class MissionCompilerMainWindow : public QMainWindow { Q_OBJECT @@ -26,18 +31,27 @@ public: void saveConfig(); QUndoStack *getUndoStack() { return m_undoStack; } + typedef std::map TMissionContainer; + public Q_SLOTS: void handleFilterChanged(const QString &text); + void handleValidation(); private: Ui::MissionCompilerMainWindow *ui; + void updateCompileLog(); + bool parsePrimForMissions(NLLIGO::IPrimitive const *prim, TMissionContainer &missions); + QMenu *_toolModeMenu; QUndoStack *m_undoStack; QStringListModel *m_allPrimitivesModel; QStringListModel *m_selectedPrimitivesModel; QSortFilterProxyModel *m_filteredProxyModel; QRegExp *m_regexpFilter; + QString m_compileLog; + + NLLIGO::CLigoConfig m_ligoConfig; }; #endif // MISSION_COMPILER_MAIN_WINDOW_H diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.cpp index 005140391..7bd06de91 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.cpp @@ -62,10 +62,6 @@ void MissionCompilerPlugin::extensionsInitialized() //settings->beginGroup(Core::Constants::DATA_PATH_SECTION); //QString ligoConfigFile = settings->value(Core::Constants::DATA_PATH_SECTION).toString(); //settings->beginGroup(Core::Constants::DATA_PATH_SECTION); - - NLLIGO::Register(); - LigoConfig.readPrimitiveClass(NLMISC::CPath::lookup("world_editor_classes.xml").c_str(), false); - NLLIGO::CPrimitiveContext::instance().CurrentLigoConfig = &LigoConfig; } void MissionCompilerPlugin::setNelContext(NLMISC::INelContext *nelContext) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.h index a9d34bd13..773c984ea 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.h @@ -9,8 +9,6 @@ // NeL includes #include #include -#include -#include // Qt includes #include @@ -53,8 +51,6 @@ public: QObject *objectByName(const QString &name) const; ExtensionSystem::IPluginSpec *pluginByName(const QString &name) const; - NLLIGO::CLigoConfig LigoConfig; - protected: NLMISC::CLibraryContext *_LibContext; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/validation_file.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/validation_file.cpp new file mode 100644 index 000000000..3e166da6b --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/validation_file.cpp @@ -0,0 +1,133 @@ +#include "validation_file.h" + +#include +#include + +void CValidationFile::loadMissionValidationFile(std::string filename) +{ + // load the configuration file + NLMISC::CConfigFile cf; + std::string pathName = NLMISC::CPath::lookup(filename, false); + + if (pathName.empty()) + { + nlwarning("Can't find index file '%s' in search path, no mission will be valid", filename.c_str()); + return; + } + cf.load(pathName); + + // get the variable + NLMISC::CConfigFile::CVar* var = cf.getVarPtr("AuthorizedStates"); + if (var) + { + for (uint i=0; isize(); ++i) + _AuthorizedStates.push_back(var->asString(i)); + } + int missionStatesFields = 3; + var = cf.getVarPtr("MissionStatesFields"); + if (var) + missionStatesFields = var->asInt(); + else + nlwarning("Mission validation file does not contain MissionStatesFields variable. Parsing may fail and corrupt data."); + + var = cf.getVarPtr("MissionStates"); + if (var) + { + for (uint i=0; isize()/missionStatesFields; ++i) + { + std::string mission = var->asString(i*missionStatesFields); + std::string stateName = var->asString(i*missionStatesFields+1); + std::string hashKey = var->asString(i*missionStatesFields+2); + _MissionStates.insert(std::make_pair(mission, CMissionState(mission, stateName, hashKey))); + } + } +} + +void CValidationFile::saveMissionValidationFile(std::string filename) +{ + // load the configuration file + std::string pathName = NLMISC::CPath::lookup(filename, false); + + if (pathName.empty()) + { + nlwarning("Can't find index file '%s' in search path, no mission will be valid", filename.c_str()); + return; + } + FILE* file = fopen(pathName.c_str(), "w"); + nlassert(file!=NULL); + + // AuthorizedStates + fprintf(file, "%s", + "// AuthorizedStates contains the list of authorized states. EGS mission\n" + "// manager can accept any number of states. Default state is the first one.\n" + "AuthorizedStates = {\n"); + std::deque::iterator itAuth, itAuthEnd = _AuthorizedStates.end(); + for (itAuth=_AuthorizedStates.begin(); itAuth!=itAuthEnd; ++itAuth) + fprintf(file, "\t\"%s\",\n", itAuth->c_str()); + fprintf(file, "%s", "};\n\n"); + + // MissionStatesFields + fprintf(file, "%s", + "// MissionStatesFields contains the number of fields in MissionStates, for\n" + "// future compatibility purpose.\n" + "MissionStatesFields = "); + fprintf(file, "%d", 3); // 3 fields: name, state, hash key + fprintf(file, "%s", ";\n\n"); + + // MissionStates + fprintf(file, "%s", + "// MissionStates contains a list of mission with for each the state of the\n" + "// mission and its hash key. The tool will add new missions with the default\n" + "// state. It will flag missions with a modified hash key with default state to\n" + "// prevent untested modified missions to be published.\n" + "// :NOTE: You can add a field to this structure without the need to modify EGS\n" + "// code. Simply update MissionStatesFields.\n" + "MissionStates = {\n"); + TMissionStateContainer::iterator itMission, itMissionEnd = _MissionStates.end(); + for (itMission=_MissionStates.begin(); itMission!=itMissionEnd; ++itMission) + fprintf(file, "\t%-42s %-12s \"%s\",\n", ("\""+itMission->second.name+"\",").c_str(), ("\""+itMission->second.state+"\",").c_str(), itMission->second.hashKey.c_str()); + fprintf(file, "};\n\n"); + + fclose(file); +} + +// :NOTE: This function exists in mission_template.cpp. If you change it here modify the other file. +std::string buildHashKey(std::string const& content) +{ + uint32 sum = 0; + size_t size = content.length()/4; + for (size_t i=0; i>1 | 0x80000000; + else + sum = sum>>1; + } + return NLMISC::toString("0x%08X", sum); +} + +bool CMission::parsePrim(NLLIGO::IPrimitive const* prim) +{ + // init default values + std::vector* params; + // get the mission script + if (!prim->getPropertyByName("script", params) || !params) + { + nlwarning("ERROR : cant find mission script!!!!!!"); + return false; + } + + // parse them + std::string content; + std::vector::iterator itParam, itParamEnd = params->end(); + for (itParam=params->begin(); itParam!=itParamEnd; ++itParam) + { + content += *itParam + "\n"; + } + hashKey = buildHashKey(content); + return true; +} \ No newline at end of file diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/validation_file.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/validation_file.h new file mode 100644 index 000000000..73d661a26 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/validation_file.h @@ -0,0 +1,51 @@ +#ifndef VALIDATION_FILE_H +#define VALIDATION_FILE_H + +#include +#include +#include + +#include + +struct CMissionState +{ + std::string name; + std::string state; + std::string hashKey; + CMissionState(std::string _name, std::string _state, std::string _hashKey) + : name(_name), state(_state), hashKey(_hashKey) { } +}; + +struct CMission +{ + std::string name; + std::string hashKey; + CMission(std::string _name, std::string _hashKey) + : name(_name), hashKey(_hashKey) { } + bool parsePrim(NLLIGO::IPrimitive const* prim); +}; + +class CValidationFile +{ +public: + typedef std::map TMissionStateContainer; + std::deque _AuthorizedStates; + TMissionStateContainer _MissionStates; +public: + // CValidationFile() { } + void loadMissionValidationFile(std::string filename); + void saveMissionValidationFile(std::string filename); + void insertMission(std::string const& mission, std::string const& hashKey) + { + _MissionStates.insert(std::make_pair(mission, CMissionState(mission, defaultState(), hashKey))); + } + std::string defaultState() + { + if (!_AuthorizedStates.empty()) + return _AuthorizedStates.front(); + else + return ""; + } +}; + +#endif // VALIDATION_FILE_H \ No newline at end of file From f7ebb89d94cda8082b013ca5f7d31ece13207598 Mon Sep 17 00:00:00 2001 From: sfb Date: Thu, 2 Jun 2011 15:15:12 -0500 Subject: [PATCH 017/320] Changed: Implemented basic mission compilation without publishing. --HG-- branch : branch-mission-compiler-qt --- .../src/plugins/CMakeLists.txt | 6 +- .../plugins/mission_compiler/CMakeLists.txt | 8 +- .../mission_compiler_main_window.cpp | 77 ++++++++++++++++++- .../mission_compiler_main_window.h | 3 + 4 files changed, 91 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/CMakeLists.txt index c5d49418d..66cbdb188 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/CMakeLists.txt @@ -7,4 +7,8 @@ ADD_SUBDIRECTORY(disp_sheet_id) ADD_SUBDIRECTORY(object_viewer) ADD_SUBDIRECTORY(zone_painter) ADD_SUBDIRECTORY(georges_editor) -ADD_SUBDIRECTORY(mission_compiler) \ No newline at end of file + +# Ryzom Specific Plugins +IF(WITH_RYZOM AND WITH_RYZOM_TOOLS) + ADD_SUBDIRECTORY(mission_compiler) +ENDIF(WITH_RYZOM AND WITH_RYZOM_TOOLS) \ No newline at end of file diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt index af39fc18a..4d11e808e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt @@ -28,9 +28,15 @@ SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_MISSION_COMPILER_MOC_SRC} ${OVQ SOURCE_GROUP("Mission Compiler Plugin" FILES ${SRC}) SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) +# Mission Compiler Library +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ryzom/tools/leveldesign/mission_compiler_lib) + +# Game Share Library +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/common/src) + ADD_LIBRARY(ovqt_plugin_mission_compiler MODULE ${SRC} ${OVQT_PLUG_MISSION_COMPILER_MOC_SRC} ${OVQT_PLUG_MISSION_COMPILER_RC_SRCS} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_MISSION_COMPILER_UI_HDRS}) -TARGET_LINK_LIBRARIES(ovqt_plugin_mission_compiler ovqt_plugin_core nelmisc nelligo ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY}) +TARGET_LINK_LIBRARIES(ovqt_plugin_mission_compiler ovqt_plugin_core nelmisc nelligo ryzom_mission_compiler_lib ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY}) NL_DEFAULT_PROPS(ovqt_plugin_mission_compiler "NeL, Tools, 3D: Object Viewer Qt Plugin: Mission Compiler") NL_ADD_RUNTIME_FLAGS(ovqt_plugin_mission_compiler) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp index 0cbb1e708..e760d9f94 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp @@ -1,6 +1,7 @@ #include "mission_compiler_main_window.h" #include "ui_mission_compiler_main_window.h" #include "validation_file.h" +#include "mission_compiler.h" #include #include @@ -62,6 +63,8 @@ MissionCompilerMainWindow::MissionCompilerMainWindow(QWidget *parent) : connect(ui->filterEdit, SIGNAL(textEdited(const QString&)), this, SLOT(handleFilterChanged(const QString&))); connect(ui->actionValidate, SIGNAL(triggered()), this, SLOT(handleValidation())); + connect(ui->actionCompile, SIGNAL(triggered()), this, SLOT(handleCompile())); + connect(ui->actionPublish, SIGNAL(triggered()), this, SLOT(handlePublish())); NLLIGO::Register(); m_ligoConfig.readPrimitiveClass(NLMISC::CPath::lookup("world_editor_classes.xml").c_str(), false); @@ -74,6 +77,79 @@ void MissionCompilerMainWindow::handleFilterChanged(const QString &text) m_filteredProxyModel->setFilterRegExp(*m_regexpFilter); } +void MissionCompilerMainWindow::handleCompile() +{ + compileMission(); +} + +void MissionCompilerMainWindow::handlePublish() +{ + compileMission(true); +} + +void MissionCompilerMainWindow::compileMission(bool publish) +{ + uint nbMission = 0; + + // First switch toolbox pages to show the compilation output. + ui->toolBox->setCurrentIndex(2); + + m_compileLog.append("Begin mission compilation.\n"); + updateCompileLog(); + + // Go through each file. + QStringList list = m_selectedPrimitivesModel->stringList(); + QStringListIterator itr(list); + while(itr.hasNext()) + { + QString filename = itr.next(); + m_compileLog.append("Compiling '"+filename+"'...\n"); + updateCompileLog(); + + NLLIGO::CPrimitives primDoc; + NLLIGO::CPrimitiveContext::instance().CurrentPrimitive = &primDoc; + NLLIGO::loadXmlPrimitiveFile(primDoc, NLMISC::CPath::lookup(filename.toAscii().data(), false), m_ligoConfig); + NLLIGO::CPrimitiveContext::instance().CurrentPrimitive = NULL; + + try + { + CMissionCompiler mc; + mc.compileMissions(primDoc.RootNode, filename.toStdString()); + m_compileLog.append("Found "+QString::number(mc.getMissionsCount())+" valid missions\n"); + updateCompileLog(); + + mc.installCompiledMission(m_ligoConfig, filename.toStdString()); + nbMission += mc.getMissionsCount(); + + // publish files to selected servers + //if (publish) + //for (uint i=0 ; i Date: Tue, 7 Jun 2011 14:42:00 +0200 Subject: [PATCH 018/320] Changed: #1304: Updating CMissionGuild for guild missions. Implementation of the functions: - updateUsersJournalEntry - clearUsersJournalEntry --HG-- branch : gsoc2011-guildmissions --- .../guild_manager/guild.h | 5 ++ .../mission_manager/mission_guild.cpp | 69 ++++++++++++++++++- .../mission_manager/mission_manager.cpp | 4 ++ .../mission_manager/missions_commands.cpp | 14 +++- 4 files changed, 88 insertions(+), 4 deletions(-) diff --git a/code/ryzom/server/src/entities_game_service/guild_manager/guild.h b/code/ryzom/server/src/entities_game_service/guild_manager/guild.h index e740540ca..3f3b04eb6 100644 --- a/code/ryzom/server/src/entities_game_service/guild_manager/guild.h +++ b/code/ryzom/server/src/entities_game_service/guild_manager/guild.h @@ -179,6 +179,11 @@ public: void removeMission(CMissionGuild * mission, TMissionResult result); void addSuccessfulMission(CMissionTemplate * templ); bool processMissionEvent( CMissionEvent & event, TAIAlias alias = CAIAliasTranslator::Invalid); + ///\return the mission + inline std::vector & getMissions() + { + // To Do + } //@} /// inventory management diff --git a/code/ryzom/server/src/entities_game_service/mission_manager/mission_guild.cpp b/code/ryzom/server/src/entities_game_service/mission_manager/mission_guild.cpp index d3bb2c106..63b74e997 100644 --- a/code/ryzom/server/src/entities_game_service/mission_manager/mission_guild.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_manager/mission_guild.cpp @@ -25,18 +25,83 @@ #include "player_manager/player.h" #include "player_manager/character.h" +using namespace std; +using namespace NLMISC; + NL_INSTANCE_COUNTER_IMPL(CMissionGuild); //---------------------------------------------------------------------------- void CMissionGuild::updateUsersJournalEntry() { - /// todo guild mission + CGuild * guild = CGuildManager::getInstance()->getGuildFromId( _GuildId ); + if (!guild) + { + nlwarning( "cant find guild ID : %d", _GuildId ); + return; + } + + for ( std::map::iterator it = guild->getMembersBegin(); + it != guild->getMembersEnd();++it ) + { + CCharacter * user = PlayerManager.getChar( it->first ); + if ( !user ) + { + nlwarning( "cant find user %s", it->first.toString().c_str() ); + continue; + } + updateUserJournalEntry(*user,"GROUP:"); + } } //---------------------------------------------------------------------------- void CMissionGuild::clearUsersJournalEntry() { - /// todo guild mission + CGuild * guild = CGuildManager::getInstance()->getGuildFromId( _GuildId ); + if (!guild) + { + nlwarning( "cant find guild ID : %d", _GuildId ); + return; + } + + for ( std::map::iterator it = guild->getMembersBegin(); + it != guild->getMembersEnd();++it ) + { + CCharacter * user = PlayerManager.getChar( it->first ); + if ( !user ) + { + nlwarning( "cant find user %s", it->first.toString().c_str() ); + continue; + } + + CBankAccessor_PLR::TGROUP::TMISSIONS::TArray &missionItem = CBankAccessor_PLR::getGROUP().getMISSIONS().getArray(_ClientIndex); + // user->_PropertyDatabase.setProp( NLMISC::toString( "GROUP:MISSIONS:%u:TYPE",_ClientIndex), 0); + missionItem.setTYPE(user->_PropertyDatabase, 0); + // user->_PropertyDatabase.setProp( NLMISC::toString( "GROUP:MISSIONS:%u:ICON",_ClientIndex), 0); + missionItem.setICON(user->_PropertyDatabase, CSheetId::Unknown); + // user->_PropertyDatabase.setProp( NLMISC::toString( "GROUP:MISSIONS:%u:TITLE",_ClientIndex), 0); + missionItem.setTITLE(user->_PropertyDatabase, 0); + // user->_PropertyDatabase.setProp( NLMISC::toString( "GROUP:MISSIONS:%u:DETAIL_TEXT",_ClientIndex), 0); + missionItem.setDETAIL_TEXT(user->_PropertyDatabase, 0); + // user->_PropertyDatabase.setProp( NLMISC::toString( "GROUP:MISSIONS:%u:END_DATE",_ClientIndex), 0 ); + missionItem.setEND_DATE(user->_PropertyDatabase, 0); + // user->_PropertyDatabase.setProp( NLMISC::toString( "GROUP:MISSIONS:%u:BEGIN_DATE",_ClientIndex), 0 ); + missionItem.setBEGIN_DATE(user->_PropertyDatabase, 0); + for (uint i = 0; i < NB_JOURNAL_COORDS; i++) + { + CBankAccessor_PLR::TGROUP::TMISSIONS::TArray::TTARGET &targetItem = missionItem.getTARGET(i); + // user->_PropertyDatabase.setProp( NLMISC::toString( "GROUP:MISSIONS:%u:TARGET%u:TITLE",_ClientIndex,i), 0); + targetItem.setTITLE(user->_PropertyDatabase, 0); + // user->_PropertyDatabase.setProp( NLMISC::toString( "GROUP:MISSIONS:%u:TARGET%u:X",_ClientIndex,i), 0); + targetItem.setX(user->_PropertyDatabase, 0); + // user->_PropertyDatabase.setProp( NLMISC::toString( "GROUP:MISSIONS:%u:TARGET%u:Y",_ClientIndex,i), 0); + targetItem.setY(user->_PropertyDatabase, 0); + } + for (uint i = 0; i < NB_STEP_PER_MISSION; i++) + { + // user->_PropertyDatabase.setProp( NLMISC::toString( "GROUP:MISSIONS:%u:GOALS:%u:TEXT",_ClientIndex,i), 0); + missionItem.getGOALS().getArray(i).setTEXT(user->_PropertyDatabase, 0); + } + } } diff --git a/code/ryzom/server/src/entities_game_service/mission_manager/mission_manager.cpp b/code/ryzom/server/src/entities_game_service/mission_manager/mission_manager.cpp index b0bd41ffb..55a08ef4f 100644 --- a/code/ryzom/server/src/entities_game_service/mission_manager/mission_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_manager/mission_manager.cpp @@ -846,6 +846,10 @@ void CMissionManager::instanciateMission(CCharacter* user,TAIAlias alias, TAIAl inst = module->pickMission( templ->Alias ); if (!inst) return; + + /// /!\ Do the same thing that the team missions but with the loop: for ( uint i = MaxGroupMissionCount; i < MaxGroupMissionCount + MaxGuildMissionCount; i++ ) + /// Instead of for ( uint i = 0; i < MaxGroupMissionCount; i++ ), so that we use available space for guild missions + /// todo guild mission : see solo /* todo guild mission : implement that in module diff --git a/code/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp b/code/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp index 78229d3a8..a5f0f863f 100644 --- a/code/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp @@ -30,7 +30,9 @@ #include "team_manager/team_manager.h" #include "mission_manager/mission_team.h" #include "mission_manager/mission_step_ai.h" +#include "mission_manager/mission_guild.h" #include "guild_manager/guild_manager.h" +#include "guild_manager/guild.h" #include "admin.h" #include "creature_manager/creature_manager.h" @@ -81,10 +83,18 @@ NLMISC_COMMAND(forceJournalUpdate,"force mission journal update","getMissions()[i]->updateUsersJournalEntry(); } } - for (uint i = 0; i < MaxGuildMissionCount; i++) + CGuild * guild = CGuildManager::getInstance()->getGuildFromId( user->getGuildId() ); + if (guild) + { + for ( uint i = 0; i < guild->getMissions().size(); i++ ) + { + guild->getMissions()[i]->updateUsersJournalEntry(); + } + } + /*for (uint i = 0; i < MaxGuildMissionCount; i++) { /// todo guild mission - } + }*/ return true; } // missionProgress // From 21db83a0ed8280d1a4ce343867cad7dde7da6a73 Mon Sep 17 00:00:00 2001 From: sfb Date: Tue, 7 Jun 2011 12:14:10 -0500 Subject: [PATCH 019/320] Changed: Added 'data directory' box and re-arranged filters. --HG-- branch : branch-mission-compiler-qt --- .../mission_compiler_main_window.cpp | 82 +++++++++++++++--- .../mission_compiler_main_window.h | 5 ++ .../mission_compiler_main_window.ui | 86 ++++++++++++++----- 3 files changed, 137 insertions(+), 36 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp index e760d9f94..f7da41ff2 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp @@ -9,6 +9,8 @@ #include #include #include +#include +#include #include "../core/icore.h" #include "../core/imenu_manager.h" @@ -27,6 +29,7 @@ MissionCompilerMainWindow::MissionCompilerMainWindow(QWidget *parent) : { ui->setupUi(this); + m_lastDir = "."; m_compileLog = ""; updateCompileLog(); @@ -35,24 +38,11 @@ MissionCompilerMainWindow::MissionCompilerMainWindow(QWidget *parent) : m_undoStack = new QUndoStack(this); - // Populate the "all" primitives box. - QStringList list; - std::vector paths; - NLMISC::CPath::getFileList("primitive", paths); - - std::vector::iterator itr = paths.begin(); - while( itr != paths.end() ) - { - const char *path2 = (*itr).c_str(); - list << path2; - ++itr; - } - m_regexpFilter = new QRegExp(); m_regexpFilter->setPatternSyntax(QRegExp::FixedString); m_regexpFilter->setCaseSensitivity(Qt::CaseInsensitive); - m_allPrimitivesModel = new QStringListModel(list, this); + m_allPrimitivesModel = new QStringListModel(this); m_filteredProxyModel = new QSortFilterProxyModel(this); m_filteredProxyModel->setSourceModel(m_allPrimitivesModel); m_filteredProxyModel->setDynamicSortFilter(true); @@ -65,12 +55,63 @@ MissionCompilerMainWindow::MissionCompilerMainWindow(QWidget *parent) : connect(ui->actionValidate, SIGNAL(triggered()), this, SLOT(handleValidation())); connect(ui->actionCompile, SIGNAL(triggered()), this, SLOT(handleCompile())); connect(ui->actionPublish, SIGNAL(triggered()), this, SLOT(handlePublish())); + connect(ui->allPrimitivesList, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(handleAllDoubleClick(const QModelIndex &))); + connect(ui->dataDirButton, SIGNAL(clicked()), this, SLOT(handleDataDirButton())); + connect(ui->dataDirEdit, SIGNAL(textChanged(const QString &)), this, SLOT(handleDataDirChanged(const QString &))); + + // Set the default data dir to the primitives path. + QSettings *settings = Core::ICore::instance()->settings(); + settings->beginGroup(Core::Constants::DATA_PATH_SECTION); + m_lastDir = settings->value(Core::Constants::PRIMITIVES_PATH).toString(); + ui->dataDirEdit->setText(m_lastDir); + populateAllPrimitives(m_lastDir); + settings->endGroup(); NLLIGO::Register(); m_ligoConfig.readPrimitiveClass(NLMISC::CPath::lookup("world_editor_classes.xml").c_str(), false); NLLIGO::CPrimitiveContext::instance().CurrentLigoConfig = &m_ligoConfig; } +void MissionCompilerMainWindow::populateAllPrimitives(const QString &dataDir) +{ + // First we need to clear out the models entirely. + QStringList emptyList; + m_selectedPrimitivesModel->setStringList(emptyList); + m_allPrimitivesModel->setStringList(emptyList); + + + // Populate the "all" primitives box. + QStringList list; + + // Filter for only primitive files. + QStringList filters; + filters << "*.primitive"; + + QDirIterator it(dataDir, filters, QDir::Files, QDirIterator::Subdirectories|QDirIterator::FollowSymlinks); + while(it.hasNext()) + { + it.next(); + list << it.fileName(); + } + + m_allPrimitivesModel->setStringList(list); +} +void MissionCompilerMainWindow::handleDataDirChanged(const QString &text) +{ + populateAllPrimitives(text); +} + +void MissionCompilerMainWindow::handleDataDirButton() +{ + QString newPath = QFileDialog::getExistingDirectory(this, "", m_lastDir); + if(!newPath.isEmpty()) + { + ui->dataDirEdit->setText(newPath); + m_lastDir = newPath; + populateAllPrimitives(newPath); + } +} + void MissionCompilerMainWindow::handleFilterChanged(const QString &text) { m_regexpFilter->setPattern(text); @@ -87,6 +128,19 @@ void MissionCompilerMainWindow::handlePublish() compileMission(true); } +void MissionCompilerMainWindow::handleAllDoubleClick(const QModelIndex &index) +{ + const QAbstractItemModel *model = index.model(); + QString item = model->data(index).toString(); + nlinfo("all primitives was double clicked: %s", item.toAscii().data()); + + m_filteredProxyModel->removeRows(index.row(),1); + + QStringList list = m_selectedPrimitivesModel->stringList(); + list << item; + m_selectedPrimitivesModel->setStringList(list); +} + void MissionCompilerMainWindow::compileMission(bool publish) { uint nbMission = 0; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h index 7c4feb78a..2248a7cc5 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h @@ -38,11 +38,15 @@ public Q_SLOTS: void handleValidation(); void handleCompile(); void handlePublish(); + void handleAllDoubleClick(const QModelIndex &index); + void handleDataDirButton(); + void handleDataDirChanged(const QString &text); private: Ui::MissionCompilerMainWindow *ui; void updateCompileLog(); + void populateAllPrimitives(const QString &dataDir = QString()); bool parsePrimForMissions(NLLIGO::IPrimitive const *prim, TMissionContainer &missions); void compileMission(bool publish=false); @@ -53,6 +57,7 @@ private: QSortFilterProxyModel *m_filteredProxyModel; QRegExp *m_regexpFilter; QString m_compileLog; + QString m_lastDir; NLLIGO::CLigoConfig m_ligoConfig; }; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui index 865cb20d2..a995f0dab 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui @@ -33,7 +33,7 @@ Mission Compiler Options - + @@ -132,7 +132,7 @@ - + true @@ -157,7 +157,7 @@ - + true @@ -182,41 +182,83 @@ - + All Primitives - + Selected Primitives - - - - - - Filter - - - - - - - type filter here - - - - + + + + Filter Criteria + + + + + + + + Data Directory + + + + + + + + + + ... + + + + + + + + + + + Filter + + + + + + + type filter here + + + + + + + horizontalLayoutWidget + dataDirLabel + horizontalLayoutWidget + + + + + 0 + 0 + 776 + 426 + + Publish Options From 884017a65d4abc03b742bf2be35cae31254096fc Mon Sep 17 00:00:00 2001 From: sfb Date: Tue, 7 Jun 2011 14:30:34 -0500 Subject: [PATCH 020/320] Changed: Mission Compiler add/remove selected/all and reset filter functions. --HG-- branch : branch-mission-compiler-qt --- .../mission_compiler_main_window.cpp | 80 ++++++++++++++++--- .../mission_compiler_main_window.h | 7 ++ .../mission_compiler_main_window.ui | 10 +++ 3 files changed, 87 insertions(+), 10 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp index f7da41ff2..95d7ca50f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp @@ -50,14 +50,25 @@ MissionCompilerMainWindow::MissionCompilerMainWindow(QWidget *parent) : ui->allPrimitivesList->setModel(m_filteredProxyModel); m_selectedPrimitivesModel = new QStringListModel(this); ui->selectedPrimitivesList->setModel(m_selectedPrimitivesModel); - - connect(ui->filterEdit, SIGNAL(textEdited(const QString&)), this, SLOT(handleFilterChanged(const QString&))); + + // Connections for toolbar buttons. connect(ui->actionValidate, SIGNAL(triggered()), this, SLOT(handleValidation())); connect(ui->actionCompile, SIGNAL(triggered()), this, SLOT(handleCompile())); connect(ui->actionPublish, SIGNAL(triggered()), this, SLOT(handlePublish())); + + // Connections for selected item moves. connect(ui->allPrimitivesList, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(handleAllDoubleClick(const QModelIndex &))); + connect(ui->selectedPrimitivesList, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(handleSelDoubleClick(const QModelIndex &))); + connect(ui->addSelectedButton, SIGNAL(clicked()), this, SLOT(handleMoveSelectedRight())); + connect(ui->removeSelectedButton, SIGNAL(clicked()), this, SLOT(handleMoveSelectedLeft())); + connect(ui->addAllButton, SIGNAL(clicked()), this, SLOT(handleMoveAllRight())); + connect(ui->removeAllButton, SIGNAL(clicked()), this, SLOT(handleMoveAllLeft())); + + // Connections for the filter group box. connect(ui->dataDirButton, SIGNAL(clicked()), this, SLOT(handleDataDirButton())); connect(ui->dataDirEdit, SIGNAL(textChanged(const QString &)), this, SLOT(handleDataDirChanged(const QString &))); + connect(ui->filterEdit, SIGNAL(textEdited(const QString&)), this, SLOT(handleFilterChanged(const QString&))); + connect(ui->resetFiltersButton, SIGNAL(clicked()), this, SLOT(handleResetFiltersButton())); // Set the default data dir to the primitives path. QSettings *settings = Core::ICore::instance()->settings(); @@ -96,6 +107,14 @@ void MissionCompilerMainWindow::populateAllPrimitives(const QString &dataDir) m_allPrimitivesModel->setStringList(list); } + +void MissionCompilerMainWindow::handleResetFiltersButton() +{ + handleDataDirChanged(m_lastDir); + ui->filterEdit->setText(""); + handleFilterChanged(""); +} + void MissionCompilerMainWindow::handleDataDirChanged(const QString &text) { populateAllPrimitives(text); @@ -128,17 +147,58 @@ void MissionCompilerMainWindow::handlePublish() compileMission(true); } +void MissionCompilerMainWindow::handleMoveSelectedRight() +{ + QModelIndexList indexes = ui->allPrimitivesList->selectionModel()->selectedIndexes(); + while(!indexes.isEmpty()) + { + const QModelIndex index = indexes.takeFirst(); + moveSelectedItem(index, m_allPrimitivesModel, m_selectedPrimitivesModel); + indexes = ui->allPrimitivesList->selectionModel()->selectedIndexes(); + } +} + +void MissionCompilerMainWindow::handleMoveAllRight() +{ + ui->allPrimitivesList->selectAll(); + handleMoveSelectedRight(); +} + +void MissionCompilerMainWindow::handleMoveSelectedLeft() +{ + QModelIndexList indexes = ui->selectedPrimitivesList->selectionModel()->selectedIndexes(); + while(!indexes.isEmpty()) + { + const QModelIndex index = indexes.takeFirst(); + moveSelectedItem(index, m_selectedPrimitivesModel, m_allPrimitivesModel); + indexes = ui->selectedPrimitivesList->selectionModel()->selectedIndexes(); + } +} + +void MissionCompilerMainWindow::handleMoveAllLeft() +{ + ui->selectedPrimitivesList->selectAll(); + handleMoveSelectedLeft(); +} + +void MissionCompilerMainWindow::moveSelectedItem(const QModelIndex &index, QStringListModel *from, QStringListModel *to) +{ + QString item = from->data(index, Qt::DisplayRole).toString(); + + from->removeRows(index.row(),1); + QStringList list = to->stringList(); + list << item; + to->setStringList(list); +} + void MissionCompilerMainWindow::handleAllDoubleClick(const QModelIndex &index) { - const QAbstractItemModel *model = index.model(); - QString item = model->data(index).toString(); - nlinfo("all primitives was double clicked: %s", item.toAscii().data()); + moveSelectedItem(index, m_allPrimitivesModel, m_selectedPrimitivesModel); +} - m_filteredProxyModel->removeRows(index.row(),1); - - QStringList list = m_selectedPrimitivesModel->stringList(); - list << item; - m_selectedPrimitivesModel->setStringList(list); +void MissionCompilerMainWindow::handleSelDoubleClick(const QModelIndex &index) +{ + moveSelectedItem(index, m_selectedPrimitivesModel, m_allPrimitivesModel); } void MissionCompilerMainWindow::compileMission(bool publish) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h index 2248a7cc5..7ea2e1f81 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h @@ -39,8 +39,14 @@ public Q_SLOTS: void handleCompile(); void handlePublish(); void handleAllDoubleClick(const QModelIndex &index); + void handleSelDoubleClick(const QModelIndex &index); + void handleMoveSelectedRight(); + void handleMoveSelectedLeft(); + void handleMoveAllRight(); + void handleMoveAllLeft(); void handleDataDirButton(); void handleDataDirChanged(const QString &text); + void handleResetFiltersButton(); private: Ui::MissionCompilerMainWindow *ui; @@ -49,6 +55,7 @@ private: void populateAllPrimitives(const QString &dataDir = QString()); bool parsePrimForMissions(NLLIGO::IPrimitive const *prim, TMissionContainer &missions); void compileMission(bool publish=false); + void moveSelectedItem(const QModelIndex &index, QStringListModel *from, QStringListModel *to); QMenu *_toolModeMenu; QUndoStack *m_undoStack; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui index a995f0dab..d68b1a76d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui @@ -239,6 +239,16 @@ + + + + Blanks out the filter and reloads all files from the data directory. + + + Reset + + + From 471f5100e2b5082cc625172c8b8e788a7178ce35 Mon Sep 17 00:00:00 2001 From: kerozcak Date: Thu, 9 Jun 2011 17:51:49 +0200 Subject: [PATCH 021/320] Changed: #1315 Directory name changed. --HG-- branch : gsoc2011-kerozcak --- code/ryzom/tools/server/www/{phrases => webtt}/index.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename code/ryzom/tools/server/www/{phrases => webtt}/index.php (100%) diff --git a/code/ryzom/tools/server/www/phrases/index.php b/code/ryzom/tools/server/www/webtt/index.php similarity index 100% rename from code/ryzom/tools/server/www/phrases/index.php rename to code/ryzom/tools/server/www/webtt/index.php From c45be930140a89d1315edba7e71d328e748fcd27 Mon Sep 17 00:00:00 2001 From: kerozcak Date: Thu, 9 Jun 2011 17:53:42 +0200 Subject: [PATCH 022/320] Changed: #1315 Adding CakePHP app structure. --HG-- branch : gsoc2011-kerozcak --- code/ryzom/tools/server/www/webtt/.gitignore | 4 + code/ryzom/tools/server/www/webtt/.htaccess | 5 + code/ryzom/tools/server/www/webtt/README | 28 + .../tools/server/www/webtt/app/.htaccess | 5 + .../server/www/webtt/app/config/acl.ini.php | 70 + .../server/www/webtt/app/config/bootstrap.php | 50 + .../server/www/webtt/app/config/core.php | 304 + .../www/webtt/app/config/database.php.default | 95 + .../server/www/webtt/app/config/routes.php | 33 + .../www/webtt/app/config/schema/db_acl.php | 73 + .../www/webtt/app/config/schema/i18n.php | 50 + .../www/webtt/app/config/schema/sessions.php | 47 + .../webtt/app/controllers/components/empty | 0 .../tools/server/www/webtt/app/index.php | 18 + .../tools/server/www/webtt/app/libs/empty | 0 .../webtt/app/locale/eng/LC_MESSAGES/empty | 0 .../www/webtt/app/models/behaviors/empty | 0 .../www/webtt/app/models/datasources/empty | 0 .../tools/server/www/webtt/app/plugins/empty | 0 .../www/webtt/app/tests/cases/behaviors/empty | 0 .../webtt/app/tests/cases/components/empty | 0 .../webtt/app/tests/cases/controllers/empty | 0 .../www/webtt/app/tests/cases/helpers/empty | 0 .../www/webtt/app/tests/cases/models/empty | 0 .../server/www/webtt/app/tests/fixtures/empty | 0 .../server/www/webtt/app/tests/groups/empty | 0 .../www/webtt/app/tmp/cache/models/empty | 0 .../www/webtt/app/tmp/cache/persistent/empty | 0 .../www/webtt/app/tmp/cache/views/empty | 0 .../tools/server/www/webtt/app/tmp/logs/empty | 0 .../server/www/webtt/app/tmp/sessions/empty | 0 .../server/www/webtt/app/tmp/tests/empty | 0 .../www/webtt/app/vendors/shells/tasks/empty | 0 .../webtt/app/vendors/shells/templates/empty | 0 .../webtt/app/views/elements/email/html/empty | 0 .../webtt/app/views/elements/email/text/empty | 0 .../server/www/webtt/app/views/elements/empty | 0 .../server/www/webtt/app/views/errors/empty | 0 .../server/www/webtt/app/views/helpers/empty | 0 .../webtt/app/views/layouts/email/html/empty | 0 .../webtt/app/views/layouts/email/text/empty | 0 .../www/webtt/app/views/layouts/js/empty | 0 .../www/webtt/app/views/layouts/rss/empty | 0 .../www/webtt/app/views/layouts/xml/empty | 0 .../server/www/webtt/app/views/pages/empty | 0 .../www/webtt/app/views/scaffolds/empty | 0 .../server/www/webtt/app/webroot/.htaccess | 6 + .../server/www/webtt/app/webroot/css.php | 96 + .../webtt/app/webroot/css/cake.generic.css | 535 + .../server/www/webtt/app/webroot/favicon.ico | Bin 0 -> 372 bytes .../server/www/webtt/app/webroot/files/empty | 0 .../www/webtt/app/webroot/img/cake.icon.png | Bin 0 -> 943 bytes .../www/webtt/app/webroot/img/cake.power.gif | Bin 0 -> 201 bytes .../server/www/webtt/app/webroot/index.php | 84 + .../server/www/webtt/app/webroot/js/empty | 0 .../server/www/webtt/app/webroot/test.php | 94 + .../tools/server/www/webtt/cake/LICENSE.txt | 22 + .../tools/server/www/webtt/cake/VERSION.txt | 21 + .../tools/server/www/webtt/cake/basics.php | 1026 ++ .../tools/server/www/webtt/cake/bootstrap.php | 39 + .../server/www/webtt/cake/config/config.php | 20 + .../server/www/webtt/cake/config/paths.php | 231 + .../config/unicode/casefolding/0080_00ff.php | 74 + .../config/unicode/casefolding/0100_017f.php | 107 + .../config/unicode/casefolding/0180_024F.php | 149 + .../config/unicode/casefolding/0250_02af.php | 42 + .../config/unicode/casefolding/0370_03ff.php | 103 + .../config/unicode/casefolding/0400_04ff.php | 165 + .../config/unicode/casefolding/0500_052f.php | 49 + .../config/unicode/casefolding/0530_058f.php | 79 + .../config/unicode/casefolding/1e00_1eff.php | 169 + .../config/unicode/casefolding/1f00_1fff.php | 217 + .../config/unicode/casefolding/2100_214f.php | 45 + .../config/unicode/casefolding/2150_218f.php | 58 + .../config/unicode/casefolding/2460_24ff.php | 67 + .../config/unicode/casefolding/2c00_2c5f.php | 88 + .../config/unicode/casefolding/2c60_2c7f.php | 49 + .../config/unicode/casefolding/2c80_2cff.php | 91 + .../config/unicode/casefolding/ff00_ffef.php | 67 + .../tools/server/www/webtt/cake/console/cake | 26 + .../server/www/webtt/cake/console/cake.bat | 33 + .../server/www/webtt/cake/console/cake.php | 667 ++ .../server/www/webtt/cake/console/error.php | 265 + .../www/webtt/cake/console/libs/acl.php | 602 ++ .../www/webtt/cake/console/libs/api.php | 213 + .../www/webtt/cake/console/libs/bake.php | 230 + .../www/webtt/cake/console/libs/console.php | 361 + .../www/webtt/cake/console/libs/i18n.php | 128 + .../www/webtt/cake/console/libs/schema.php | 512 + .../www/webtt/cake/console/libs/shell.php | 647 ++ .../webtt/cake/console/libs/tasks/bake.php | 60 + .../cake/console/libs/tasks/controller.php | 486 + .../cake/console/libs/tasks/db_config.php | 368 + .../webtt/cake/console/libs/tasks/extract.php | 494 + .../webtt/cake/console/libs/tasks/fixture.php | 425 + .../webtt/cake/console/libs/tasks/model.php | 938 ++ .../webtt/cake/console/libs/tasks/plugin.php | 247 + .../webtt/cake/console/libs/tasks/project.php | 371 + .../cake/console/libs/tasks/template.php | 210 + .../webtt/cake/console/libs/tasks/test.php | 469 + .../webtt/cake/console/libs/tasks/view.php | 491 + .../www/webtt/cake/console/libs/testsuite.php | 370 + .../default/actions/controller_actions.ctp | 140 + .../templates/default/classes/controller.ctp | 60 + .../templates/default/classes/fixture.ctp | 41 + .../templates/default/classes/model.ctp | 141 + .../templates/default/classes/test.ctp | 56 + .../console/templates/default/views/form.ctp | 66 + .../console/templates/default/views/home.ctp | 84 + .../console/templates/default/views/index.ctp | 96 + .../console/templates/default/views/view.ctp | 146 + .../cake/console/templates/skel/.htaccess | 5 + .../console/templates/skel/app_controller.php | 34 + .../console/templates/skel/app_helper.php | 36 + .../cake/console/templates/skel/app_model.php | 34 + .../console/templates/skel/config/acl.ini.php | 70 + .../templates/skel/config/bootstrap.php | 50 + .../console/templates/skel/config/core.php | 304 + .../skel/config/database.php.default | 95 + .../console/templates/skel/config/routes.php | 35 + .../templates/skel/config/schema/db_acl.php | 75 + .../templates/skel/config/schema/db_acl.sql | 40 + .../templates/skel/config/schema/i18n.php | 52 + .../templates/skel/config/schema/i18n.sql | 26 + .../templates/skel/config/schema/sessions.php | 49 + .../templates/skel/config/schema/sessions.sql | 16 + .../skel/controllers/components/empty | 0 .../skel/controllers/pages_controller.php | 84 + .../cake/console/templates/skel/index.php | 18 + .../cake/console/templates/skel/libs/empty | 0 .../skel/locale/eng/LC_MESSAGES/empty | 0 .../templates/skel/models/behaviors/empty | 0 .../templates/skel/models/datasources/empty | 0 .../cake/console/templates/skel/plugins/empty | 0 .../skel/tests/cases/behaviors/empty | 0 .../skel/tests/cases/components/empty | 0 .../skel/tests/cases/controllers/empty | 0 .../skel/tests/cases/datasources/empty | 0 .../templates/skel/tests/cases/helpers/empty | 0 .../templates/skel/tests/cases/models/empty | 0 .../templates/skel/tests/cases/shells/empty | 0 .../templates/skel/tests/fixtures/empty | 0 .../console/templates/skel/tests/groups/empty | 0 .../templates/skel/tmp/cache/models/empty | 0 .../templates/skel/tmp/cache/persistent/empty | 0 .../templates/skel/tmp/cache/views/empty | 0 .../console/templates/skel/tmp/logs/empty | 0 .../console/templates/skel/tmp/sessions/empty | 0 .../console/templates/skel/tmp/tests/empty | 0 .../templates/skel/vendors/shells/tasks/empty | 0 .../views/elements/email/html/default.ctp | 26 + .../views/elements/email/text/default.ctp | 20 + .../templates/skel/views/elements/empty | 0 .../console/templates/skel/views/errors/empty | 0 .../templates/skel/views/helpers/empty | 0 .../templates/skel/views/layouts/ajax.ctp | 20 + .../templates/skel/views/layouts/default.ctp | 59 + .../skel/views/layouts/email/html/default.ctp | 32 + .../skel/views/layouts/email/text/default.ctp | 23 + .../templates/skel/views/layouts/flash.ctp | 38 + .../skel/views/layouts/js/default.ctp | 2 + .../skel/views/layouts/rss/default.ctp | 17 + .../skel/views/layouts/xml/default.ctp | 2 + .../console/templates/skel/views/pages/empty | 0 .../templates/skel/views/scaffolds/empty | 0 .../console/templates/skel/webroot/.htaccess | 6 + .../console/templates/skel/webroot/css.php | 97 + .../skel/webroot/css/cake.generic.css | 535 + .../templates/skel/webroot/favicon.ico | Bin 0 -> 372 bytes .../templates/skel/webroot/img/cake.icon.png | Bin 0 -> 943 bytes .../templates/skel/webroot/img/cake.power.gif | Bin 0 -> 201 bytes .../console/templates/skel/webroot/index.php | 84 + .../console/templates/skel/webroot/js/empty | 0 .../console/templates/skel/webroot/test.php | 94 + .../server/www/webtt/cake/dispatcher.php | 662 ++ .../server/www/webtt/cake/libs/cache.php | 702 ++ .../server/www/webtt/cake/libs/cache/apc.php | 123 + .../server/www/webtt/cake/libs/cache/file.php | 272 + .../www/webtt/cake/libs/cache/memcache.php | 220 + .../www/webtt/cake/libs/cache/xcache.php | 183 + .../server/www/webtt/cake/libs/cake_log.php | 292 + .../www/webtt/cake/libs/cake_session.php | 794 ++ .../www/webtt/cake/libs/cake_socket.php | 310 + .../www/webtt/cake/libs/class_registry.php | 365 + .../server/www/webtt/cake/libs/configure.php | 1320 +++ .../cake/libs/controller/app_controller.php | 36 + .../webtt/cake/libs/controller/component.php | 267 + .../cake/libs/controller/components/acl.php | 638 ++ .../cake/libs/controller/components/auth.php | 959 ++ .../libs/controller/components/cookie.php | 480 + .../cake/libs/controller/components/email.php | 1004 ++ .../controller/components/request_handler.php | 827 ++ .../libs/controller/components/security.php | 747 ++ .../libs/controller/components/session.php | 295 + .../webtt/cake/libs/controller/controller.php | 1320 +++ .../cake/libs/controller/pages_controller.php | 85 + .../webtt/cake/libs/controller/scaffold.php | 615 ++ .../server/www/webtt/cake/libs/debugger.php | 708 ++ .../server/www/webtt/cake/libs/error.php | 462 + .../tools/server/www/webtt/cake/libs/file.php | 542 + .../server/www/webtt/cake/libs/folder.php | 787 ++ .../www/webtt/cake/libs/http_socket.php | 1081 ++ .../tools/server/www/webtt/cake/libs/i18n.php | 568 + .../server/www/webtt/cake/libs/inflector.php | 626 ++ .../tools/server/www/webtt/cake/libs/l10n.php | 488 + .../www/webtt/cake/libs/log/file_log.php | 77 + .../server/www/webtt/cake/libs/magic_db.php | 302 + .../www/webtt/cake/libs/model/app_model.php | 35 + .../webtt/cake/libs/model/behaviors/acl.php | 123 + .../cake/libs/model/behaviors/containable.php | 453 + .../cake/libs/model/behaviors/translate.php | 540 + .../webtt/cake/libs/model/behaviors/tree.php | 977 ++ .../www/webtt/cake/libs/model/cake_schema.php | 698 ++ .../cake/libs/model/connection_manager.php | 295 + .../libs/model/datasources/datasource.php | 601 ++ .../libs/model/datasources/dbo/dbo_mssql.php | 788 ++ .../libs/model/datasources/dbo/dbo_mysql.php | 808 ++ .../libs/model/datasources/dbo/dbo_mysqli.php | 332 + .../libs/model/datasources/dbo/dbo_oracle.php | 1159 ++ .../model/datasources/dbo/dbo_postgres.php | 980 ++ .../libs/model/datasources/dbo/dbo_sqlite.php | 623 ++ .../libs/model/datasources/dbo_source.php | 2925 ++++++ .../www/webtt/cake/libs/model/db_acl.php | 332 + .../www/webtt/cake/libs/model/model.php | 3074 ++++++ .../webtt/cake/libs/model/model_behavior.php | 533 + .../server/www/webtt/cake/libs/multibyte.php | 1172 +++ .../server/www/webtt/cake/libs/object.php | 298 + .../www/webtt/cake/libs/overloadable.php | 36 + .../www/webtt/cake/libs/overloadable_php4.php | 165 + .../www/webtt/cake/libs/overloadable_php5.php | 108 + .../server/www/webtt/cake/libs/router.php | 1649 +++ .../server/www/webtt/cake/libs/sanitize.php | 348 + .../server/www/webtt/cake/libs/security.php | 191 + .../tools/server/www/webtt/cake/libs/set.php | 1155 ++ .../server/www/webtt/cake/libs/string.php | 329 + .../server/www/webtt/cake/libs/validation.php | 1060 ++ .../libs/view/elements/email/html/default.ctp | 26 + .../libs/view/elements/email/text/default.ctp | 20 + .../cake/libs/view/elements/sql_dump.ctp | 61 + .../webtt/cake/libs/view/errors/error404.ctp | 24 + .../webtt/cake/libs/view/errors/error500.ctp | 24 + .../cake/libs/view/errors/missing_action.ctp | 46 + .../view/errors/missing_behavior_class.ctp | 39 + .../view/errors/missing_behavior_file.ctp | 39 + .../view/errors/missing_component_class.ctp | 39 + .../view/errors/missing_component_file.ctp | 39 + .../libs/view/errors/missing_connection.ctp | 32 + .../libs/view/errors/missing_controller.ctp | 40 + .../libs/view/errors/missing_helper_class.ctp | 39 + .../libs/view/errors/missing_helper_file.ctp | 39 + .../cake/libs/view/errors/missing_layout.ctp | 32 + .../cake/libs/view/errors/missing_model.ctp | 41 + .../libs/view/errors/missing_scaffolddb.ctp | 32 + .../cake/libs/view/errors/missing_table.ctp | 28 + .../cake/libs/view/errors/missing_view.ctp | 32 + .../cake/libs/view/errors/private_action.ctp | 28 + .../cake/libs/view/errors/scaffold_error.ctp | 35 + .../www/webtt/cake/libs/view/helper.php | 912 ++ .../www/webtt/cake/libs/view/helpers/ajax.php | 1036 ++ .../cake/libs/view/helpers/app_helper.php | 36 + .../webtt/cake/libs/view/helpers/cache.php | 263 + .../www/webtt/cake/libs/view/helpers/form.php | 2215 ++++ .../www/webtt/cake/libs/view/helpers/html.php | 835 ++ .../cake/libs/view/helpers/javascript.php | 721 ++ .../cake/libs/view/helpers/jquery_engine.php | 363 + .../www/webtt/cake/libs/view/helpers/js.php | 1132 ++ .../libs/view/helpers/mootools_engine.php | 374 + .../webtt/cake/libs/view/helpers/number.php | 257 + .../cake/libs/view/helpers/paginator.php | 814 ++ .../libs/view/helpers/prototype_engine.php | 370 + .../www/webtt/cake/libs/view/helpers/rss.php | 292 + .../webtt/cake/libs/view/helpers/session.php | 201 + .../www/webtt/cake/libs/view/helpers/text.php | 338 + .../www/webtt/cake/libs/view/helpers/time.php | 744 ++ .../www/webtt/cake/libs/view/helpers/xml.php | 177 + .../www/webtt/cake/libs/view/layouts/ajax.ctp | 20 + .../webtt/cake/libs/view/layouts/default.ctp | 59 + .../libs/view/layouts/email/html/default.ctp | 30 + .../libs/view/layouts/email/text/default.ctp | 22 + .../webtt/cake/libs/view/layouts/flash.ctp | 38 + .../cake/libs/view/layouts/js/default.ctp | 2 + .../cake/libs/view/layouts/rss/default.ctp | 16 + .../cake/libs/view/layouts/xml/default.ctp | 2 + .../server/www/webtt/cake/libs/view/media.php | 285 + .../www/webtt/cake/libs/view/pages/home.ctp | 170 + .../webtt/cake/libs/view/scaffolds/edit.ctp | 47 + .../webtt/cake/libs/view/scaffolds/index.ctp | 93 + .../webtt/cake/libs/view/scaffolds/view.ctp | 159 + .../server/www/webtt/cake/libs/view/theme.php | 74 + .../server/www/webtt/cake/libs/view/view.php | 988 ++ .../tools/server/www/webtt/cake/libs/xml.php | 1457 +++ .../webtt/cake/tests/cases/basics.test.php | 828 ++ .../cake/tests/cases/console/cake.test.php | 956 ++ .../tests/cases/console/libs/acl.test.php | 346 + .../tests/cases/console/libs/api.test.php | 116 + .../tests/cases/console/libs/bake.test.php | 130 + .../tests/cases/console/libs/schema.test.php | 503 + .../tests/cases/console/libs/shell.test.php | 501 + .../console/libs/tasks/controller.test.php | 633 ++ .../console/libs/tasks/db_config.test.php | 155 + .../cases/console/libs/tasks/extract.test.php | 187 + .../cases/console/libs/tasks/fixture.test.php | 373 + .../cases/console/libs/tasks/model.test.php | 919 ++ .../cases/console/libs/tasks/plugin.test.php | 263 + .../cases/console/libs/tasks/project.test.php | 301 + .../console/libs/tasks/template.test.php | 189 + .../cases/console/libs/tasks/test.test.php | 646 ++ .../cases/console/libs/tasks/view.test.php | 677 ++ .../cake/tests/cases/dispatcher.test.php | 2600 +++++ .../cake/tests/cases/libs/cache.test.php | 372 + .../cake/tests/cases/libs/cache/apc.test.php | 196 + .../cake/tests/cases/libs/cache/file.test.php | 404 + .../tests/cases/libs/cache/memcache.test.php | 390 + .../tests/cases/libs/cache/xcache.test.php | 222 + .../cake/tests/cases/libs/cake_log.test.php | 183 + .../tests/cases/libs/cake_session.test.php | 508 + .../tests/cases/libs/cake_socket.test.php | 192 + .../tests/cases/libs/cake_test_case.test.php | 502 + .../cases/libs/cake_test_fixture.test.php | 504 + .../tests/cases/libs/class_registry.test.php | 325 + .../cases/libs/code_coverage_manager.test.php | 516 + .../cake/tests/cases/libs/configure.test.php | 833 ++ .../cases/libs/controller/component.test.php | 587 ++ .../libs/controller/components/acl.test.php | 646 ++ .../libs/controller/components/auth.test.php | 1657 +++ .../controller/components/cookie.test.php | 499 + .../libs/controller/components/email.test.php | 1310 +++ .../components/request_handler.test.php | 731 ++ .../controller/components/security.test.php | 1286 +++ .../controller/components/session.test.php | 385 + .../cases/libs/controller/controller.test.php | 1498 +++ .../controller/controller_merge_vars.test.php | 257 + .../libs/controller/pages_controller.test.php | 72 + .../cases/libs/controller/scaffold.test.php | 897 ++ .../cake/tests/cases/libs/debugger.test.php | 336 + .../cake/tests/cases/libs/error.test.php | 630 ++ .../webtt/cake/tests/cases/libs/file.test.php | 472 + .../cake/tests/cases/libs/folder.test.php | 794 ++ .../tests/cases/libs/http_socket.test.php | 1558 +++ .../webtt/cake/tests/cases/libs/i18n.test.php | 2777 +++++ .../cake/tests/cases/libs/inflector.test.php | 465 + .../webtt/cake/tests/cases/libs/l10n.test.php | 958 ++ .../tests/cases/libs/log/file_log.test.php | 79 + .../cake/tests/cases/libs/magic_db.test.php | 203 + .../cases/libs/model/behaviors/acl.test.php | 462 + .../libs/model/behaviors/containable.test.php | 3731 +++++++ .../libs/model/behaviors/translate.test.php | 898 ++ .../cases/libs/model/behaviors/tree.test.php | 1876 ++++ .../cases/libs/model/cake_schema.test.php | 980 ++ .../libs/model/connection_manager.test.php | 340 + .../model/datasources/dbo/dbo_mssql.test.php | 677 ++ .../model/datasources/dbo/dbo_mysql.test.php | 861 ++ .../model/datasources/dbo/dbo_mysqli.test.php | 339 + .../model/datasources/dbo/dbo_oracle.test.php | 131 + .../datasources/dbo/dbo_postgres.test.php | 883 ++ .../model/datasources/dbo/dbo_sqlite.test.php | 355 + .../model/datasources/dbo_source.test.php | 4616 ++++++++ .../tests/cases/libs/model/db_acl.test.php | 397 + .../tests/cases/libs/model/model.test.php | 103 + .../cases/libs/model/model_behavior.test.php | 1138 ++ .../cases/libs/model/model_delete.test.php | 754 ++ .../libs/model/model_integration.test.php | 1930 ++++ .../cases/libs/model/model_read.test.php | 7456 +++++++++++++ .../libs/model/model_validation.test.php | 673 ++ .../cases/libs/model/model_write.test.php | 4048 +++++++ .../cake/tests/cases/libs/model/models.php | 3594 +++++++ .../cake/tests/cases/libs/multibyte.test.php | 9343 +++++++++++++++++ .../cake/tests/cases/libs/object.test.php | 866 ++ .../tests/cases/libs/overloadable.test.php | 39 + .../cake/tests/cases/libs/router.test.php | 2672 +++++ .../cake/tests/cases/libs/sanitize.test.php | 523 + .../cake/tests/cases/libs/security.test.php | 173 + .../webtt/cake/tests/cases/libs/set.test.php | 3098 ++++++ .../cake/tests/cases/libs/string.test.php | 310 + .../tests/cases/libs/test_manager.test.php | 120 + .../cake/tests/cases/libs/validation.test.php | 2209 ++++ .../tests/cases/libs/view/helper.test.php | 804 ++ .../cases/libs/view/helpers/ajax.test.php | 910 ++ .../cases/libs/view/helpers/cache.test.php | 571 + .../cases/libs/view/helpers/form.test.php | 6864 ++++++++++++ .../cases/libs/view/helpers/html.test.php | 1309 +++ .../libs/view/helpers/javascript.test.php | 911 ++ .../libs/view/helpers/jquery_engine.test.php | 367 + .../tests/cases/libs/view/helpers/js.test.php | 833 ++ .../view/helpers/mootools_engine.test.php | 354 + .../cases/libs/view/helpers/number.test.php | 440 + .../libs/view/helpers/paginator.test.php | 1927 ++++ .../view/helpers/prototype_engine.test.php | 380 + .../cases/libs/view/helpers/rss.test.php | 593 ++ .../cases/libs/view/helpers/session.test.php | 236 + .../cases/libs/view/helpers/text.test.php | 440 + .../cases/libs/view/helpers/time.test.php | 803 ++ .../cases/libs/view/helpers/xml.test.php | 298 + .../cake/tests/cases/libs/view/media.test.php | 180 + .../cake/tests/cases/libs/view/theme.test.php | 343 + .../cake/tests/cases/libs/view/view.test.php | 1008 ++ .../webtt/cake/tests/cases/libs/xml.test.php | 1627 +++ .../cake/tests/fixtures/account_fixture.php | 61 + .../tests/fixtures/aco_action_fixture.php | 60 + .../webtt/cake/tests/fixtures/aco_fixture.php | 73 + .../cake/tests/fixtures/aco_two_fixture.php | 71 + .../webtt/cake/tests/fixtures/ad_fixture.php | 68 + .../tests/fixtures/advertisement_fixture.php | 60 + .../tests/fixtures/after_tree_fixture.php | 67 + .../fixtures/another_article_fixture.php | 61 + .../cake/tests/fixtures/apple_fixture.php | 69 + .../webtt/cake/tests/fixtures/aro_fixture.php | 65 + .../cake/tests/fixtures/aro_two_fixture.php | 71 + .../cake/tests/fixtures/aros_aco_fixture.php | 60 + .../tests/fixtures/aros_aco_two_fixture.php | 81 + .../fixtures/article_featured_fixture.php | 64 + .../article_featureds_tags_fixture.php | 48 + .../cake/tests/fixtures/article_fixture.php | 64 + .../tests/fixtures/articles_tag_fixture.php | 61 + .../tests/fixtures/attachment_fixture.php | 60 + .../auth_user_custom_field_fixture.php | 65 + .../cake/tests/fixtures/auth_user_fixture.php | 65 + .../cake/tests/fixtures/author_fixture.php | 63 + .../cake/tests/fixtures/basket_fixture.php | 61 + .../webtt/cake/tests/fixtures/bid_fixture.php | 62 + .../tests/fixtures/binary_test_fixture.php | 55 + .../cake/tests/fixtures/book_fixture.php | 61 + .../fixtures/cache_test_model_fixture.php | 48 + .../cake/tests/fixtures/callback_fixture.php | 62 + .../cake/tests/fixtures/campaign_fixture.php | 60 + .../cake/tests/fixtures/category_fixture.php | 67 + .../fixtures/category_thread_fixture.php | 66 + .../webtt/cake/tests/fixtures/cd_fixture.php | 59 + .../cake/tests/fixtures/comment_fixture.php | 67 + .../fixtures/content_account_fixture.php | 64 + .../cake/tests/fixtures/content_fixture.php | 61 + .../fixtures/counter_cache_post_fixture.php | 42 + ...e_post_nonstandard_primary_key_fixture.php | 42 + .../fixtures/counter_cache_user_fixture.php | 41 + ...e_user_nonstandard_primary_key_fixture.php | 41 + .../cake/tests/fixtures/data_test_fixture.php | 66 + .../cake/tests/fixtures/datatype_fixture.php | 58 + .../tests/fixtures/dependency_fixture.php | 58 + .../cake/tests/fixtures/device_fixture.php | 61 + .../fixtures/device_type_category_fixture.php | 57 + .../tests/fixtures/device_type_fixture.php | 64 + .../fixtures/document_directory_fixture.php | 57 + .../cake/tests/fixtures/document_fixture.php | 58 + .../exterior_type_category_fixture.php | 58 + .../tests/fixtures/feature_set_fixture.php | 57 + .../cake/tests/fixtures/featured_fixture.php | 63 + .../cake/tests/fixtures/film_file_fixture.php | 58 + .../cake/tests/fixtures/flag_tree_fixture.php | 55 + .../cake/tests/fixtures/fruit_fixture.php | 63 + .../fixtures/fruits_uuid_tag_fixture.php | 60 + .../fixtures/group_update_all_fixture.php | 55 + .../cake/tests/fixtures/home_fixture.php | 62 + .../cake/tests/fixtures/image_fixture.php | 61 + .../cake/tests/fixtures/item_fixture.php | 64 + .../fixtures/items_portfolio_fixture.php | 63 + .../cake/tests/fixtures/join_a_b_fixture.php | 63 + .../cake/tests/fixtures/join_a_c_fixture.php | 63 + .../cake/tests/fixtures/join_a_fixture.php | 62 + .../cake/tests/fixtures/join_b_fixture.php | 61 + .../cake/tests/fixtures/join_c_fixture.php | 61 + .../tests/fixtures/join_thing_fixture.php | 63 + .../cake/tests/fixtures/message_fixture.php | 60 + .../my_categories_my_products_fixture.php | 60 + .../my_categories_my_users_fixture.php | 60 + .../tests/fixtures/my_category_fixture.php | 59 + .../tests/fixtures/my_product_fixture.php | 58 + .../cake/tests/fixtures/my_user_fixture.php | 58 + .../cake/tests/fixtures/node_fixture.php | 60 + .../tests/fixtures/number_tree_fixture.php | 54 + .../fixtures/number_tree_two_fixture.php | 55 + .../fixtures/numeric_article_fixture.php | 60 + .../fixtures/overall_favorite_fixture.php | 60 + .../cake/tests/fixtures/person_fixture.php | 69 + .../cake/tests/fixtures/portfolio_fixture.php | 60 + .../cake/tests/fixtures/post_fixture.php | 64 + .../cake/tests/fixtures/posts_tag_fixture.php | 61 + .../tests/fixtures/primary_model_fixture.php | 57 + .../cake/tests/fixtures/product_fixture.php | 66 + .../fixtures/product_update_all_fixture.php | 61 + .../cake/tests/fixtures/project_fixture.php | 59 + .../cake/tests/fixtures/sample_fixture.php | 61 + .../fixtures/secondary_model_fixture.php | 57 + .../cake/tests/fixtures/session_fixture.php | 63 + .../tests/fixtures/something_else_fixture.php | 63 + .../cake/tests/fixtures/something_fixture.php | 63 + .../tests/fixtures/stories_tag_fixture.php | 58 + .../cake/tests/fixtures/story_fixture.php | 58 + .../cake/tests/fixtures/syfile_fixture.php | 64 + .../webtt/cake/tests/fixtures/tag_fixture.php | 61 + .../fixtures/test_plugin_article_fixture.php | 64 + .../fixtures/test_plugin_comment_fixture.php | 67 + .../fixtures/the_paper_monkies_fixture.php | 55 + .../cake/tests/fixtures/thread_fixture.php | 60 + .../fixtures/translate_article_fixture.php | 86 + .../cake/tests/fixtures/translate_fixture.php | 86 + .../fixtures/translate_table_fixture.php | 69 + .../translate_with_prefix_fixture.php | 87 + .../fixtures/translated_article_fixture.php | 62 + .../fixtures/translated_item_fixture.php | 59 + .../fixtures/unconventional_tree_fixture.php | 53 + .../fixtures/underscore_field_fixture.php | 62 + .../cake/tests/fixtures/user_fixture.php | 63 + .../cake/tests/fixtures/uuid_fixture.php | 63 + .../cake/tests/fixtures/uuid_tag_fixture.php | 58 + .../cake/tests/fixtures/uuid_tree_fixture.php | 51 + .../cake/tests/fixtures/uuiditem_fixture.php | 63 + .../uuiditems_uuidportfolio_fixture.php | 61 + ...ditems_uuidportfolio_numericid_fixture.php | 61 + .../tests/fixtures/uuidportfolio_fixture.php | 58 + .../www/webtt/cake/tests/groups/acl.group.php | 50 + .../webtt/cake/tests/groups/bake.group.php | 59 + .../cake/tests/groups/behaviors.group.php | 48 + .../webtt/cake/tests/groups/cache.group.php | 49 + .../cake/tests/groups/components.group.php | 48 + .../cake/tests/groups/configure.group.php | 49 + .../webtt/cake/tests/groups/console.group.php | 65 + .../cake/tests/groups/controller.group.php | 49 + .../cake/tests/groups/database.group.php | 52 + .../webtt/cake/tests/groups/helpers.group.php | 49 + .../webtt/cake/tests/groups/i18n.group.php | 50 + .../cake/tests/groups/javascript.group.php | 51 + .../www/webtt/cake/tests/groups/lib.group.php | 63 + .../webtt/cake/tests/groups/model.group.php | 54 + .../groups/no_cross_contamination.group.php | 67 + .../tests/groups/routing_system.group.php | 49 + .../webtt/cake/tests/groups/socket.group.php | 55 + .../cake/tests/groups/test_suite.group.php | 52 + .../webtt/cake/tests/groups/view.group.php | 49 + .../www/webtt/cake/tests/groups/xml.group.php | 50 + .../webtt/cake/tests/lib/cake_test_case.php | 835 ++ .../cake/tests/lib/cake_test_fixture.php | 213 + .../webtt/cake/tests/lib/cake_test_model.php | 31 + .../tests/lib/cake_test_suite_dispatcher.php | 249 + .../cake/tests/lib/cake_web_test_case.php | 33 + .../cake/tests/lib/code_coverage_manager.php | 804 ++ .../tests/lib/reporter/cake_base_reporter.php | 225 + .../tests/lib/reporter/cake_cli_reporter.php | 178 + .../tests/lib/reporter/cake_html_reporter.php | 378 + .../tests/lib/reporter/cake_text_reporter.php | 198 + .../webtt/cake/tests/lib/templates/footer.php | 37 + .../webtt/cake/tests/lib/templates/header.php | 125 + .../webtt/cake/tests/lib/templates/menu.php | 58 + .../cake/tests/lib/templates/simpletest.php | 32 + .../webtt/cake/tests/lib/templates/xdebug.php | 27 + .../www/webtt/cake/tests/lib/test_manager.php | 421 + .../cake/tests/test_app/config/acl.ini.php | 61 + .../test_app/controllers/components/empty | 0 .../controllers/tests_apps_controller.php | 35 + .../tests_apps_posts_controller.php | 66 + .../test_app/libs/cache/test_app_cache.php | 22 + .../cake/tests/test_app/libs/library.php | 20 + .../tests/test_app/libs/log/test_app_log.php | 25 + .../cache_test_po/LC_MESSAGES/default.po | 5 + .../locale/cache_test_po/LC_MESSAGES/dom1.po | 8 + .../locale/cache_test_po/LC_MESSAGES/dom2.po | 8 + .../cake/tests/test_app/locale/ja_jp/LC_TIME | 48 + .../test_app/locale/po/LC_MESSAGES/default.po | 76 + .../test_app/locale/po/LC_MONETARY/default.po | 18 + .../cake/tests/test_app/locale/po/LC_TIME | 60 + .../locale/rule_0_mo/LC_MESSAGES/core.mo | Bin 0 -> 673 bytes .../locale/rule_0_mo/LC_MESSAGES/default.mo | Bin 0 -> 617 bytes .../locale/rule_0_po/LC_MESSAGES/core.po | 21 + .../locale/rule_0_po/LC_MESSAGES/default.po | 24 + .../locale/rule_10_mo/LC_MESSAGES/core.mo | Bin 0 -> 845 bytes .../locale/rule_10_mo/LC_MESSAGES/default.mo | Bin 0 -> 759 bytes .../locale/rule_10_po/LC_MESSAGES/core.po | 24 + .../locale/rule_10_po/LC_MESSAGES/default.po | 27 + .../locale/rule_11_mo/LC_MESSAGES/core.mo | Bin 0 -> 858 bytes .../locale/rule_11_mo/LC_MESSAGES/default.mo | Bin 0 -> 762 bytes .../locale/rule_11_po/LC_MESSAGES/core.po | 25 + .../locale/rule_11_po/LC_MESSAGES/default.po | 25 + .../locale/rule_12_mo/LC_MESSAGES/core.mo | Bin 0 -> 821 bytes .../locale/rule_12_mo/LC_MESSAGES/default.mo | Bin 0 -> 735 bytes .../locale/rule_12_po/LC_MESSAGES/core.po | 24 + .../locale/rule_12_po/LC_MESSAGES/default.po | 24 + .../locale/rule_13_mo/LC_MESSAGES/core.mo | Bin 0 -> 865 bytes .../locale/rule_13_mo/LC_MESSAGES/default.mo | Bin 0 -> 779 bytes .../locale/rule_13_po/LC_MESSAGES/core.po | 24 + .../locale/rule_13_po/LC_MESSAGES/default.po | 24 + .../locale/rule_14_mo/LC_MESSAGES/core.mo | Bin 0 -> 769 bytes .../locale/rule_14_mo/LC_MESSAGES/default.mo | Bin 0 -> 693 bytes .../locale/rule_14_po/LC_MESSAGES/core.po | 23 + .../locale/rule_14_po/LC_MESSAGES/default.po | 23 + .../locale/rule_1_mo/LC_MESSAGES/core.mo | Bin 0 -> 704 bytes .../locale/rule_1_mo/LC_MESSAGES/default.mo | Bin 0 -> 638 bytes .../locale/rule_1_po/LC_MESSAGES/core.po | 22 + .../locale/rule_1_po/LC_MESSAGES/default.po | 25 + .../locale/rule_2_mo/LC_MESSAGES/core.mo | Bin 0 -> 699 bytes .../locale/rule_2_mo/LC_MESSAGES/default.mo | Bin 0 -> 633 bytes .../locale/rule_2_po/LC_MESSAGES/core.po | 22 + .../locale/rule_2_po/LC_MESSAGES/default.po | 25 + .../locale/rule_3_mo/LC_MESSAGES/core.mo | Bin 0 -> 790 bytes .../locale/rule_3_mo/LC_MESSAGES/default.mo | Bin 0 -> 714 bytes .../locale/rule_3_po/LC_MESSAGES/core.po | 23 + .../locale/rule_3_po/LC_MESSAGES/default.po | 26 + .../locale/rule_4_mo/LC_MESSAGES/core.mo | Bin 0 -> 758 bytes .../locale/rule_4_mo/LC_MESSAGES/default.mo | Bin 0 -> 682 bytes .../locale/rule_4_po/LC_MESSAGES/core.po | 23 + .../locale/rule_4_po/LC_MESSAGES/default.po | 26 + .../locale/rule_5_mo/LC_MESSAGES/core.mo | Bin 0 -> 806 bytes .../locale/rule_5_mo/LC_MESSAGES/default.mo | Bin 0 -> 658 bytes .../locale/rule_5_po/LC_MESSAGES/core.po | 23 + .../locale/rule_5_po/LC_MESSAGES/default.po | 24 + .../locale/rule_6_mo/LC_MESSAGES/core.mo | Bin 0 -> 841 bytes .../locale/rule_6_mo/LC_MESSAGES/default.mo | Bin 0 -> 765 bytes .../locale/rule_6_po/LC_MESSAGES/core.po | 23 + .../locale/rule_6_po/LC_MESSAGES/default.po | 26 + .../locale/rule_7_mo/LC_MESSAGES/core.mo | Bin 0 -> 850 bytes .../locale/rule_7_mo/LC_MESSAGES/default.mo | Bin 0 -> 774 bytes .../locale/rule_7_po/LC_MESSAGES/core.po | 23 + .../locale/rule_7_po/LC_MESSAGES/default.po | 26 + .../locale/rule_8_mo/LC_MESSAGES/core.mo | Bin 0 -> 774 bytes .../locale/rule_8_mo/LC_MESSAGES/default.mo | Bin 0 -> 698 bytes .../locale/rule_8_po/LC_MESSAGES/core.po | 23 + .../locale/rule_8_po/LC_MESSAGES/default.po | 26 + .../locale/rule_9_mo/LC_MESSAGES/core.mo | Bin 0 -> 819 bytes .../locale/rule_9_mo/LC_MESSAGES/default.mo | Bin 0 -> 743 bytes .../locale/rule_9_po/LC_MESSAGES/core.po | 23 + .../locale/rule_9_po/LC_MESSAGES/default.po | 26 + .../tests/test_app/locale/time_test/LC_TIME | 42 + .../tests/test_app/models/behaviors/empty | 0 .../behaviors/persister_one_behavior.php | 31 + .../behaviors/persister_two_behavior.php | 31 + .../cake/tests/test_app/models/comment.php | 25 + .../models/datasources/test2_other_source.php | 27 + .../models/datasources/test2_source.php | 27 + .../tests/test_app/models/persister_one.php | 29 + .../tests/test_app/models/persister_two.php | 29 + .../webtt/cake/tests/test_app/models/post.php | 25 + .../plugin_js/webroot/js/one/plugin_one.js | 1 + .../plugins/plugin_js/webroot/js/plugin_js.js | 1 + .../plugins/test_plugin/config/load.php | 20 + .../plugins/test_plugin/config/more.load.php | 20 + .../test_plugin/config/schema/schema.php | 36 + .../components/other_component.php | 21 + .../components/plugins_component.php | 22 + .../components/test_plugin_component.php | 22 + .../test_plugin_other_component.php | 21 + .../controllers/test_plugin_controller.php | 30 + .../controllers/tests_controller.php | 32 + .../libs/cache/test_plugin_cache.php | 21 + .../test_plugin/libs/log/test_plugin_log.php | 25 + .../test_plugin/libs/test_plugin_library.php | 20 + .../locale/po/LC_MESSAGES/test_plugin.po | 50 + .../locale/po/LC_MONETARY/test_plugin.po | 22 + .../behaviors/test_plugin_persister_one.php | 34 + .../behaviors/test_plugin_persister_two.php | 34 + .../models/datasources/dbo/dbo_dummy.php | 7 + .../models/datasources/test_other_source.php | 27 + .../models/datasources/test_source.php | 27 + .../models/test_plugin_auth_user.php | 46 + .../models/test_plugin_authors.php | 29 + .../models/test_plugin_comment.php | 29 + .../test_plugin/models/test_plugin_post.php | 37 + .../test_plugin_app_controller.php | 20 + .../test_plugin/test_plugin_app_model.php | 20 + .../vendors/sample/sample_plugin.php | 21 + .../test_plugin/vendors/shells/example.php | 31 + .../test_plugin/vendors/shells/tasks/empty | 0 .../vendors/shells/templates/empty | 0 .../plugins/test_plugin/vendors/welcome.php | 21 + .../views/elements/plugin_element.ctp | 1 + .../views/elements/test_plugin_element.ctp | 1 + .../views/helpers/other_helper.php | 20 + .../views/helpers/plugged_helper.php | 22 + .../views/helpers/test_plugin_app.php | 5 + .../test_plugin/views/layouts/default.ctp | 1 + .../plugins/test_plugin/views/tests/index.ctp | 1 + .../test_plugin/views/tests/scaffold.edit.ctp | 1 + .../webroot/css/test_plugin_asset.css | 1 + .../test_plugin/webroot/css/theme_one.htc | 1 + .../test_plugin/webroot/css/unknown.extension | 1 + .../test_plugin/webroot/flash/plugin_test.swf | 1 + .../test_plugin/webroot/img/cake.icon.gif | Bin 0 -> 233 bytes .../webroot/js/test_plugin/test.js | 1 + .../test_plugin/webroot/pdfs/plugin_test.pdf | 1 + .../plugins/test_plugin/webroot/root.js | 1 + .../vendors/shells/example.php | 31 + .../vendors/shells/tasks/empty | 0 .../vendors/shells/templates/empty | 0 .../vendors/shells/welcome.php | 31 + .../www/webtt/cake/tests/test_app/tmp/dir_map | 2 + .../tests/test_app/vendors/Test/MyTest.php | 21 + .../tests/test_app/vendors/Test/hello.php | 21 + .../tests/test_app/vendors/css/test_asset.css | 1 + .../cake/tests/test_app/vendors/img/test.jpg | Bin 0 -> 5308 bytes .../sample/configure_test_vendor_sample.php | 21 + .../tests/test_app/vendors/shells/sample.php | 31 + .../tests/test_app/vendors/shells/tasks/empty | 0 .../test_app/vendors/somename/some.name.php | 21 + .../cake/tests/test_app/vendors/welcome.php | 21 + .../views/elements/email/html/custom.ctp | 26 + .../views/elements/email/html/default.ctp | 26 + .../elements/email/html/nested_element.ctp | 3 + .../views/elements/email/text/custom.ctp | 26 + .../views/elements/email/text/default.ctp | 20 + .../views/elements/email/text/wide.ctp | 21 + .../cake/tests/test_app/views/elements/empty | 0 .../test_app/views/elements/html_call.ctp | 3 + .../elements/nocache/contains_nocache.ctp | 5 + .../test_app/views/elements/nocache/plain.ctp | 4 + .../test_app/views/elements/nocache/sub1.ctp | 8 + .../test_app/views/elements/nocache/sub2.ctp | 6 + .../views/elements/session_helper.ctp | 5 + .../test_app/views/elements/test_element.ctp | 1 + .../test_app/views/elements/type_check.ctp | 1 + .../cake/tests/test_app/views/errors/empty | 0 .../tests/test_app/views/helpers/banana.php | 20 + .../cake/tests/test_app/views/helpers/empty | 0 .../tests/test_app/views/layouts/ajax.ctp | 20 + .../tests/test_app/views/layouts/ajax2.ctp | 23 + .../views/layouts/cache_empty_sections.ctp | 13 + .../test_app/views/layouts/cache_layout.ctp | 32 + .../tests/test_app/views/layouts/default.ctp | 56 + .../views/layouts/email/html/default.ctp | 32 + .../views/layouts/email/html/thin.ctp | 32 + .../views/layouts/email/text/default.ctp | 23 + .../tests/test_app/views/layouts/flash.ctp | 38 + .../test_app/views/layouts/js/default.ctp | 2 + .../test_app/views/layouts/multi_cache.ctp | 40 + .../test_app/views/layouts/rss/default.ctp | 17 + .../test_app/views/layouts/xml/default.ctp | 2 + .../cake/tests/test_app/views/pages/empty | 0 .../tests/test_app/views/pages/extract.ctp | 14 + .../cake/tests/test_app/views/pages/home.ctp | 82 + .../views/posts/cache_empty_sections.ctp | 2 + .../tests/test_app/views/posts/cache_form.ctp | 14 + .../test_app/views/posts/helper_overwrite.ctp | 4 + .../cake/tests/test_app/views/posts/index.ctp | 1 + .../test_app/views/posts/multiple_nocache.ctp | 15 + .../views/posts/nocache_multiple_element.ctp | 9 + .../test_app/views/posts/scaffold.edit.ctp | 1 + .../views/posts/sequencial_nocache.ctp | 24 + .../views/posts/test_nocache_tags.ctp | 144 + .../cake/tests/test_app/views/scaffolds/empty | 0 .../tests/test_app/views/tests_apps/index.ctp | 1 + .../test_theme/elements/test_element.ctp | 1 + .../themed/test_theme/layouts/default.ctp | 1 + .../test_plugin/layouts/plugin_default.ctp | 1 + .../plugins/test_plugin/tests/index.ctp | 1 + .../views/themed/test_theme/posts/index.ctp | 1 + .../test_theme/posts/scaffold.index.ctp | 1 + .../test_theme/webroot/css/test_asset.css | 1 + .../test_theme/webroot/css/theme_webroot.css | 1 + .../test_theme/webroot/flash/theme_test.swf | 1 + .../test_theme/webroot/img/cake.power.gif | Bin 0 -> 201 bytes .../themed/test_theme/webroot/img/test.jpg | Bin 0 -> 5308 bytes .../test_theme/webroot/js/one/theme_one.js | 1 + .../themed/test_theme/webroot/js/theme.js | 1 + .../test_theme/webroot/pdfs/theme_test.pdf | 1 + .../theme/test_theme/css/theme_webroot.css | 1 + .../theme/test_theme/css/webroot_test.css | 1 + .../theme/test_theme/img/cake.power.gif | Bin 0 -> 201 bytes .../webroot/theme/test_theme/img/test.jpg | Bin 0 -> 5308 bytes code/ryzom/tools/server/www/webtt/index.php | 58 +- .../tools/server/www/webtt/plugins/empty | 0 .../www/webtt/vendors/shells/tasks/empty | 0 .../www/webtt/vendors/shells/templates/empty | 0 758 files changed, 196776 insertions(+), 3 deletions(-) create mode 100644 code/ryzom/tools/server/www/webtt/.gitignore create mode 100644 code/ryzom/tools/server/www/webtt/.htaccess create mode 100644 code/ryzom/tools/server/www/webtt/README create mode 100644 code/ryzom/tools/server/www/webtt/app/.htaccess create mode 100644 code/ryzom/tools/server/www/webtt/app/config/acl.ini.php create mode 100644 code/ryzom/tools/server/www/webtt/app/config/bootstrap.php create mode 100644 code/ryzom/tools/server/www/webtt/app/config/core.php create mode 100644 code/ryzom/tools/server/www/webtt/app/config/database.php.default create mode 100644 code/ryzom/tools/server/www/webtt/app/config/routes.php create mode 100644 code/ryzom/tools/server/www/webtt/app/config/schema/db_acl.php create mode 100644 code/ryzom/tools/server/www/webtt/app/config/schema/i18n.php create mode 100644 code/ryzom/tools/server/www/webtt/app/config/schema/sessions.php create mode 100644 code/ryzom/tools/server/www/webtt/app/controllers/components/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/index.php create mode 100644 code/ryzom/tools/server/www/webtt/app/libs/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/locale/eng/LC_MESSAGES/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/models/behaviors/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/models/datasources/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/plugins/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/tests/cases/behaviors/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/tests/cases/components/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/tests/cases/controllers/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/tests/cases/helpers/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/tests/cases/models/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/tests/fixtures/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/tests/groups/empty create mode 100755 code/ryzom/tools/server/www/webtt/app/tmp/cache/models/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/tmp/cache/persistent/empty create mode 100755 code/ryzom/tools/server/www/webtt/app/tmp/cache/views/empty create mode 100755 code/ryzom/tools/server/www/webtt/app/tmp/logs/empty create mode 100755 code/ryzom/tools/server/www/webtt/app/tmp/sessions/empty create mode 100755 code/ryzom/tools/server/www/webtt/app/tmp/tests/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/vendors/shells/tasks/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/vendors/shells/templates/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/views/elements/email/html/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/views/elements/email/text/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/views/elements/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/views/errors/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/views/helpers/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/views/layouts/email/html/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/views/layouts/email/text/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/views/layouts/js/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/views/layouts/rss/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/views/layouts/xml/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/views/pages/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/views/scaffolds/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/webroot/.htaccess create mode 100644 code/ryzom/tools/server/www/webtt/app/webroot/css.php create mode 100644 code/ryzom/tools/server/www/webtt/app/webroot/css/cake.generic.css create mode 100644 code/ryzom/tools/server/www/webtt/app/webroot/favicon.ico create mode 100644 code/ryzom/tools/server/www/webtt/app/webroot/files/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/webroot/img/cake.icon.png create mode 100644 code/ryzom/tools/server/www/webtt/app/webroot/img/cake.power.gif create mode 100644 code/ryzom/tools/server/www/webtt/app/webroot/index.php create mode 100644 code/ryzom/tools/server/www/webtt/app/webroot/js/empty create mode 100644 code/ryzom/tools/server/www/webtt/app/webroot/test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/LICENSE.txt create mode 100644 code/ryzom/tools/server/www/webtt/cake/VERSION.txt create mode 100644 code/ryzom/tools/server/www/webtt/cake/basics.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/bootstrap.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/config.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/paths.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0080_00ff.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0100_017f.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0180_024F.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0250_02af.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0370_03ff.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0400_04ff.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0500_052f.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0530_058f.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/1e00_1eff.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/1f00_1fff.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2100_214f.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2150_218f.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2460_24ff.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2c00_2c5f.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2c60_2c7f.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2c80_2cff.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/ff00_ffef.php create mode 100755 code/ryzom/tools/server/www/webtt/cake/console/cake create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/cake.bat create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/cake.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/error.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/acl.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/api.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/bake.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/console.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/i18n.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/schema.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/shell.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/bake.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/controller.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/db_config.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/extract.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/model.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/plugin.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/project.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/template.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/view.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/libs/testsuite.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/default/actions/controller_actions.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/default/classes/controller.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/default/classes/fixture.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/default/classes/model.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/default/classes/test.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/default/views/form.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/default/views/home.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/default/views/index.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/default/views/view.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/.htaccess create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/app_controller.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/app_helper.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/app_model.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/config/acl.ini.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/config/bootstrap.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/config/core.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/config/database.php.default create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/config/routes.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/config/schema/db_acl.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/config/schema/db_acl.sql create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/config/schema/i18n.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/config/schema/i18n.sql create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/config/schema/sessions.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/config/schema/sessions.sql create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/controllers/components/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/controllers/pages_controller.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/index.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/libs/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/locale/eng/LC_MESSAGES/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/models/behaviors/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/models/datasources/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/plugins/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/tests/cases/behaviors/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/tests/cases/components/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/tests/cases/controllers/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/tests/cases/datasources/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/tests/cases/helpers/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/tests/cases/models/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/tests/cases/shells/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/tests/fixtures/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/tests/groups/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/tmp/cache/models/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/tmp/cache/persistent/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/tmp/cache/views/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/tmp/logs/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/tmp/sessions/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/tmp/tests/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/vendors/shells/tasks/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/views/elements/email/html/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/views/elements/email/text/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/views/elements/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/views/errors/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/views/helpers/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/views/layouts/ajax.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/views/layouts/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/views/layouts/email/html/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/views/layouts/email/text/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/views/layouts/flash.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/views/layouts/js/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/views/layouts/rss/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/views/layouts/xml/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/views/pages/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/views/scaffolds/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/webroot/.htaccess create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/webroot/css.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/webroot/css/cake.generic.css create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/webroot/favicon.ico create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/webroot/img/cake.icon.png create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/webroot/img/cake.power.gif create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/webroot/index.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/webroot/js/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/console/templates/skel/webroot/test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/dispatcher.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/cache.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/cache/apc.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/cache/file.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/cache/memcache.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/cache/xcache.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/cake_log.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/cake_session.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/cake_socket.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/class_registry.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/configure.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/controller/app_controller.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/controller/component.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/controller/components/acl.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/controller/components/auth.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/controller/components/cookie.php create mode 100755 code/ryzom/tools/server/www/webtt/cake/libs/controller/components/email.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/controller/components/request_handler.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/controller/components/security.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/controller/components/session.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/controller/controller.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/controller/pages_controller.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/controller/scaffold.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/debugger.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/error.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/file.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/folder.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/http_socket.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/i18n.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/inflector.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/l10n.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/log/file_log.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/magic_db.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/app_model.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/behaviors/acl.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/behaviors/containable.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/behaviors/translate.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/behaviors/tree.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/cake_schema.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/connection_manager.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/datasources/datasource.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/datasources/dbo/dbo_mssql.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/datasources/dbo/dbo_mysql.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/datasources/dbo/dbo_mysqli.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/datasources/dbo/dbo_oracle.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/datasources/dbo/dbo_postgres.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/datasources/dbo/dbo_sqlite.php create mode 100755 code/ryzom/tools/server/www/webtt/cake/libs/model/datasources/dbo_source.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/db_acl.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/model.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/model/model_behavior.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/multibyte.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/object.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/overloadable.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/overloadable_php4.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/overloadable_php5.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/router.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/sanitize.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/security.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/set.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/string.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/validation.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/elements/email/html/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/elements/email/text/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/elements/sql_dump.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/error404.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/error500.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/missing_action.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/missing_behavior_class.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/missing_behavior_file.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/missing_component_class.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/missing_component_file.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/missing_connection.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/missing_controller.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/missing_helper_class.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/missing_helper_file.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/missing_layout.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/missing_model.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/missing_scaffolddb.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/missing_table.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/missing_view.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/private_action.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/errors/scaffold_error.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helper.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/ajax.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/app_helper.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/cache.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/form.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/html.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/javascript.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/jquery_engine.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/js.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/mootools_engine.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/number.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/paginator.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/prototype_engine.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/rss.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/session.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/text.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/time.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/helpers/xml.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/layouts/ajax.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/layouts/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/layouts/email/html/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/layouts/email/text/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/layouts/flash.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/layouts/js/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/layouts/rss/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/layouts/xml/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/media.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/pages/home.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/scaffolds/edit.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/scaffolds/index.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/scaffolds/view.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/theme.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/view/view.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/libs/xml.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/basics.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/console/cake.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/console/libs/acl.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/console/libs/api.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/console/libs/bake.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/console/libs/schema.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/console/libs/shell.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/console/libs/tasks/controller.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/console/libs/tasks/db_config.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/console/libs/tasks/extract.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/console/libs/tasks/fixture.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/console/libs/tasks/model.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/console/libs/tasks/plugin.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/console/libs/tasks/project.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/console/libs/tasks/template.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/console/libs/tasks/test.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/console/libs/tasks/view.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/dispatcher.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/cache.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/cache/apc.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/cache/file.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/cache/memcache.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/cache/xcache.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/cake_log.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/cake_session.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/cake_socket.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/cake_test_case.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/cake_test_fixture.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/class_registry.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/code_coverage_manager.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/configure.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/controller/component.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/controller/components/acl.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/controller/components/auth.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/controller/components/cookie.test.php create mode 100755 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/controller/components/email.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/controller/components/request_handler.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/controller/components/security.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/controller/components/session.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/controller/controller.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/controller/controller_merge_vars.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/controller/pages_controller.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/controller/scaffold.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/debugger.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/error.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/file.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/folder.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/http_socket.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/i18n.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/inflector.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/l10n.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/log/file_log.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/magic_db.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/behaviors/acl.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/behaviors/containable.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/behaviors/translate.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/behaviors/tree.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/cake_schema.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/connection_manager.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/datasources/dbo_source.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/db_acl.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/model.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/model_behavior.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/model_delete.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/model_integration.test.php create mode 100755 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/model_read.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/model_validation.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/model_write.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/model/models.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/multibyte.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/object.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/overloadable.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/router.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/sanitize.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/security.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/set.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/string.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/test_manager.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/validation.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helper.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helpers/ajax.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helpers/cache.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helpers/form.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helpers/html.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helpers/javascript.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helpers/jquery_engine.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helpers/js.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helpers/mootools_engine.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helpers/number.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helpers/paginator.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helpers/prototype_engine.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helpers/rss.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helpers/session.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helpers/text.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helpers/time.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/helpers/xml.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/media.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/theme.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/view/view.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/cases/libs/xml.test.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/account_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/aco_action_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/aco_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/aco_two_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/ad_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/advertisement_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/after_tree_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/another_article_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/apple_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/aro_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/aro_two_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/aros_aco_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/aros_aco_two_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/article_featured_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/article_featureds_tags_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/article_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/articles_tag_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/attachment_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/auth_user_custom_field_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/auth_user_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/author_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/basket_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/bid_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/binary_test_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/book_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/cache_test_model_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/callback_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/campaign_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/category_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/category_thread_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/cd_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/comment_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/content_account_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/content_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/counter_cache_post_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/counter_cache_post_nonstandard_primary_key_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/counter_cache_user_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/counter_cache_user_nonstandard_primary_key_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/data_test_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/datatype_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/dependency_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/device_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/device_type_category_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/device_type_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/document_directory_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/document_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/exterior_type_category_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/feature_set_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/featured_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/film_file_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/flag_tree_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/fruit_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/fruits_uuid_tag_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/group_update_all_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/home_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/image_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/item_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/items_portfolio_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/join_a_b_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/join_a_c_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/join_a_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/join_b_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/join_c_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/join_thing_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/message_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/my_categories_my_products_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/my_categories_my_users_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/my_category_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/my_product_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/my_user_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/node_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/number_tree_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/number_tree_two_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/numeric_article_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/overall_favorite_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/person_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/portfolio_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/post_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/posts_tag_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/primary_model_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/product_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/product_update_all_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/project_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/sample_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/secondary_model_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/session_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/something_else_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/something_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/stories_tag_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/story_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/syfile_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/tag_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/test_plugin_article_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/test_plugin_comment_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/the_paper_monkies_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/thread_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/translate_article_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/translate_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/translate_table_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/translate_with_prefix_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/translated_article_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/translated_item_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/unconventional_tree_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/underscore_field_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/user_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/uuid_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/uuid_tag_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/uuid_tree_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/uuiditem_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/uuiditems_uuidportfolio_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/uuiditems_uuidportfolio_numericid_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/fixtures/uuidportfolio_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/acl.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/bake.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/behaviors.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/cache.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/components.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/configure.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/console.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/controller.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/database.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/helpers.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/i18n.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/javascript.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/lib.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/model.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/no_cross_contamination.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/routing_system.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/socket.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/test_suite.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/view.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/groups/xml.group.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/lib/cake_test_case.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/lib/cake_test_fixture.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/lib/cake_test_model.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/lib/cake_test_suite_dispatcher.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/lib/cake_web_test_case.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/lib/code_coverage_manager.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/lib/reporter/cake_base_reporter.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/lib/reporter/cake_cli_reporter.php create mode 100755 code/ryzom/tools/server/www/webtt/cake/tests/lib/reporter/cake_html_reporter.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/lib/reporter/cake_text_reporter.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/lib/templates/footer.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/lib/templates/header.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/lib/templates/menu.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/lib/templates/simpletest.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/lib/templates/xdebug.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/lib/test_manager.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/config/acl.ini.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/controllers/components/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/controllers/tests_apps_controller.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/controllers/tests_apps_posts_controller.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/libs/cache/test_app_cache.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/libs/library.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/libs/log/test_app_log.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/cache_test_po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/cache_test_po/LC_MESSAGES/dom1.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/cache_test_po/LC_MESSAGES/dom2.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/ja_jp/LC_TIME create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/po/LC_MONETARY/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/po/LC_TIME create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_0_mo/LC_MESSAGES/core.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_0_mo/LC_MESSAGES/default.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_0_po/LC_MESSAGES/core.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_0_po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_10_mo/LC_MESSAGES/core.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_10_mo/LC_MESSAGES/default.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_10_po/LC_MESSAGES/core.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_10_po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_11_mo/LC_MESSAGES/core.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_11_mo/LC_MESSAGES/default.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_11_po/LC_MESSAGES/core.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_11_po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_12_mo/LC_MESSAGES/core.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_12_mo/LC_MESSAGES/default.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_12_po/LC_MESSAGES/core.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_12_po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_13_mo/LC_MESSAGES/core.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_13_mo/LC_MESSAGES/default.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_13_po/LC_MESSAGES/core.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_13_po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_14_mo/LC_MESSAGES/core.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_14_mo/LC_MESSAGES/default.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_14_po/LC_MESSAGES/core.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_14_po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_1_mo/LC_MESSAGES/core.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_1_mo/LC_MESSAGES/default.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_1_po/LC_MESSAGES/core.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_1_po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_2_mo/LC_MESSAGES/core.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_2_mo/LC_MESSAGES/default.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_2_po/LC_MESSAGES/core.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_2_po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_3_mo/LC_MESSAGES/core.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_3_mo/LC_MESSAGES/default.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_3_po/LC_MESSAGES/core.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_3_po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_4_mo/LC_MESSAGES/core.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_4_mo/LC_MESSAGES/default.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_4_po/LC_MESSAGES/core.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_4_po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_5_mo/LC_MESSAGES/core.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_5_mo/LC_MESSAGES/default.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_5_po/LC_MESSAGES/core.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_5_po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_6_mo/LC_MESSAGES/core.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_6_mo/LC_MESSAGES/default.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_6_po/LC_MESSAGES/core.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_6_po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_7_mo/LC_MESSAGES/core.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_7_mo/LC_MESSAGES/default.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_7_po/LC_MESSAGES/core.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_7_po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_8_mo/LC_MESSAGES/core.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_8_mo/LC_MESSAGES/default.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_8_po/LC_MESSAGES/core.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_8_po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_9_mo/LC_MESSAGES/core.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_9_mo/LC_MESSAGES/default.mo create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_9_po/LC_MESSAGES/core.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/rule_9_po/LC_MESSAGES/default.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/locale/time_test/LC_TIME create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/models/behaviors/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/models/behaviors/persister_one_behavior.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/models/behaviors/persister_two_behavior.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/models/comment.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/models/datasources/test2_other_source.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/models/datasources/test2_source.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/models/persister_one.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/models/persister_two.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/models/post.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/plugin_js/webroot/js/one/plugin_one.js create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/plugin_js/webroot/js/plugin_js.js create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/config/load.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/config/more.load.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/config/schema/schema.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/controllers/components/other_component.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/controllers/components/plugins_component.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_component.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_other_component.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/controllers/test_plugin_controller.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/controllers/tests_controller.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/libs/cache/test_plugin_cache.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/libs/log/test_plugin_log.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/libs/test_plugin_library.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/locale/po/LC_MESSAGES/test_plugin.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/locale/po/LC_MONETARY/test_plugin.po create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_one.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_two.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/models/datasources/dbo/dbo_dummy.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/models/datasources/test_other_source.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/models/datasources/test_source.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/models/test_plugin_authors.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/models/test_plugin_comment.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/models/test_plugin_post.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/test_plugin_app_controller.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/test_plugin_app_model.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/vendors/sample/sample_plugin.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/vendors/shells/example.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/vendors/shells/tasks/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/vendors/shells/templates/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/vendors/welcome.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/views/elements/plugin_element.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/views/elements/test_plugin_element.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/views/helpers/other_helper.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/views/helpers/plugged_helper.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/views/helpers/test_plugin_app.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/views/layouts/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/views/tests/index.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/views/tests/scaffold.edit.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/webroot/css/test_plugin_asset.css create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/webroot/css/theme_one.htc create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/webroot/css/unknown.extension create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/webroot/flash/plugin_test.swf create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/webroot/img/cake.icon.gif create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/webroot/js/test_plugin/test.js create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/webroot/pdfs/plugin_test.pdf create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin/webroot/root.js create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/example.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/tasks/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/templates/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/plugins/test_plugin_two/vendors/shells/welcome.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/tmp/dir_map create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/vendors/Test/MyTest.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/vendors/Test/hello.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/vendors/css/test_asset.css create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/vendors/img/test.jpg create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/vendors/sample/configure_test_vendor_sample.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/vendors/shells/sample.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/vendors/shells/tasks/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/vendors/somename/some.name.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/vendors/welcome.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/elements/email/html/custom.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/elements/email/html/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/elements/email/html/nested_element.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/elements/email/text/custom.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/elements/email/text/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/elements/email/text/wide.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/elements/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/elements/html_call.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/elements/nocache/contains_nocache.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/elements/nocache/plain.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/elements/nocache/sub1.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/elements/nocache/sub2.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/elements/session_helper.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/elements/test_element.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/elements/type_check.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/errors/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/helpers/banana.php create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/helpers/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/layouts/ajax.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/layouts/ajax2.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/layouts/cache_empty_sections.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/layouts/cache_layout.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/layouts/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/layouts/email/html/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/layouts/email/html/thin.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/layouts/email/text/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/layouts/flash.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/layouts/js/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/layouts/multi_cache.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/layouts/rss/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/layouts/xml/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/pages/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/pages/extract.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/pages/home.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/posts/cache_empty_sections.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/posts/cache_form.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/posts/helper_overwrite.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/posts/index.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/posts/multiple_nocache.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/posts/nocache_multiple_element.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/posts/scaffold.edit.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/posts/sequencial_nocache.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/posts/test_nocache_tags.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/scaffolds/empty create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/tests_apps/index.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/themed/test_theme/elements/test_element.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/themed/test_theme/layouts/default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/themed/test_theme/plugins/test_plugin/layouts/plugin_default.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/themed/test_theme/plugins/test_plugin/tests/index.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/themed/test_theme/posts/index.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/themed/test_theme/posts/scaffold.index.ctp create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/themed/test_theme/webroot/css/test_asset.css create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/themed/test_theme/webroot/css/theme_webroot.css create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/themed/test_theme/webroot/flash/theme_test.swf create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/themed/test_theme/webroot/img/cake.power.gif create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/themed/test_theme/webroot/img/test.jpg create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/themed/test_theme/webroot/js/one/theme_one.js create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/themed/test_theme/webroot/js/theme.js create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/views/themed/test_theme/webroot/pdfs/theme_test.pdf create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/webroot/theme/test_theme/css/theme_webroot.css create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/webroot/theme/test_theme/css/webroot_test.css create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/webroot/theme/test_theme/img/cake.power.gif create mode 100644 code/ryzom/tools/server/www/webtt/cake/tests/test_app/webroot/theme/test_theme/img/test.jpg create mode 100644 code/ryzom/tools/server/www/webtt/plugins/empty create mode 100644 code/ryzom/tools/server/www/webtt/vendors/shells/tasks/empty create mode 100644 code/ryzom/tools/server/www/webtt/vendors/shells/templates/empty diff --git a/code/ryzom/tools/server/www/webtt/.gitignore b/code/ryzom/tools/server/www/webtt/.gitignore new file mode 100644 index 000000000..9edf61016 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/.gitignore @@ -0,0 +1,4 @@ +/app/config +/app/tmp +/plugins +/vendors \ No newline at end of file diff --git a/code/ryzom/tools/server/www/webtt/.htaccess b/code/ryzom/tools/server/www/webtt/.htaccess new file mode 100644 index 000000000..f23dbaf66 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/.htaccess @@ -0,0 +1,5 @@ + + RewriteEngine on + RewriteRule ^$ app/webroot/ [L] + RewriteRule (.*) app/webroot/$1 [L] + \ No newline at end of file diff --git a/code/ryzom/tools/server/www/webtt/README b/code/ryzom/tools/server/www/webtt/README new file mode 100644 index 000000000..ddf42020f --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/README @@ -0,0 +1,28 @@ +CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. + +The Cake Software Foundation - promoting development related to CakePHP +http://cakefoundation.org/ + +CakePHP - the rapid development PHP framework +http://www.cakephp.org + +Cookbook - user documentation for learning about CakePHP +http://book.cakephp.org + +API - quick reference to CakePHP +http://api.cakephp.org + +The Bakery - everything CakePHP +http://bakery.cakephp.org + +The Show - live and archived podcasts about CakePHP and more +http://live.cakephp.org + +CakePHP TV - screen casts from events and video tutorials +http://tv.cakephp.org + +CakePHP Google Group - community mailing list and forum +http://groups.google.com/group/cake-php + +#cakephp on irc.freenode.net - chat with CakePHP developers +irc://irc.freenode.net/cakephp diff --git a/code/ryzom/tools/server/www/webtt/app/.htaccess b/code/ryzom/tools/server/www/webtt/app/.htaccess new file mode 100644 index 000000000..0ed8662ea --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/app/.htaccess @@ -0,0 +1,5 @@ + + RewriteEngine on + RewriteRule ^$ webroot/ [L] + RewriteRule (.*) webroot/$1 [L] + \ No newline at end of file diff --git a/code/ryzom/tools/server/www/webtt/app/config/acl.ini.php b/code/ryzom/tools/server/www/webtt/app/config/acl.ini.php new file mode 100644 index 000000000..0907fbd4d --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/app/config/acl.ini.php @@ -0,0 +1,70 @@ +; +; SVN FILE: $Id$ +;/** +; * ACL configuration +; * +; * +; * PHP versions 4 and 5 +; * +; * CakePHP(tm) : Rapid Development Framework http://cakephp.org +; * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) +; * +; * Licensed under The MIT License +; * Redistributions of files must retain the above copyright notice. +; * +; * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) +; * @link http://cakephp.org CakePHP(tm) Project +; * @package cake +; * @subpackage cake.app.config +; * @since CakePHP(tm) v 0.10.0.1076 +; * @license MIT License (http://www.opensource.org/licenses/mit-license.php) +; */ + +; acl.ini.php - Cake ACL Configuration +; --------------------------------------------------------------------- +; Use this file to specify user permissions. +; aco = access control object (something in your application) +; aro = access request object (something requesting access) +; +; User records are added as follows: +; +; [uid] +; groups = group1, group2, group3 +; allow = aco1, aco2, aco3 +; deny = aco4, aco5, aco6 +; +; Group records are added in a similar manner: +; +; [gid] +; allow = aco1, aco2, aco3 +; deny = aco4, aco5, aco6 +; +; The allow, deny, and groups sections are all optional. +; NOTE: groups names *cannot* ever be the same as usernames! +; +; ACL permissions are checked in the following order: +; 1. Check for user denies (and DENY if specified) +; 2. Check for user allows (and ALLOW if specified) +; 3. Gather user's groups +; 4. Check group denies (and DENY if specified) +; 5. Check group allows (and ALLOW if specified) +; 6. If no aro, aco, or group information is found, DENY +; +; --------------------------------------------------------------------- + +;------------------------------------- +;Users +;------------------------------------- + +[username-goes-here] +groups = group1, group2 +deny = aco1, aco2 +allow = aco3, aco4 + +;------------------------------------- +;Groups +;------------------------------------- + +[groupname-goes-here] +deny = aco5, aco6 +allow = aco7, aco8 \ No newline at end of file diff --git a/code/ryzom/tools/server/www/webtt/app/config/bootstrap.php b/code/ryzom/tools/server/www/webtt/app/config/bootstrap.php new file mode 100644 index 000000000..51c786373 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/app/config/bootstrap.php @@ -0,0 +1,50 @@ + array('/full/path/to/plugins/', '/next/full/path/to/plugins/'), + * 'models' => array('/full/path/to/models/', '/next/full/path/to/models/'), + * 'views' => array('/full/path/to/views/', '/next/full/path/to/views/'), + * 'controllers' => array('/full/path/to/controllers/', '/next/full/path/to/controllers/'), + * 'datasources' => array('/full/path/to/datasources/', '/next/full/path/to/datasources/'), + * 'behaviors' => array('/full/path/to/behaviors/', '/next/full/path/to/behaviors/'), + * 'components' => array('/full/path/to/components/', '/next/full/path/to/components/'), + * 'helpers' => array('/full/path/to/helpers/', '/next/full/path/to/helpers/'), + * 'vendors' => array('/full/path/to/vendors/', '/next/full/path/to/vendors/'), + * 'shells' => array('/full/path/to/shells/', '/next/full/path/to/shells/'), + * 'locales' => array('/full/path/to/locale/', '/next/full/path/to/locale/') + * )); + * + */ + +/** + * As of 1.3, additional rules for the inflector are added below + * + * Inflector::rules('singular', array('rules' => array(), 'irregular' => array(), 'uninflected' => array())); + * Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array())); + * + */ diff --git a/code/ryzom/tools/server/www/webtt/app/config/core.php b/code/ryzom/tools/server/www/webtt/app/config/core.php new file mode 100644 index 000000000..517e32d0d --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/app/config/core.php @@ -0,0 +1,304 @@ +cacheAction = true. + * + */ + //Configure::write('Cache.check', true); + +/** + * Defines the default error type when using the log() function. Used for + * differentiating error logging and debugging. Currently PHP supports LOG_DEBUG. + */ + define('LOG_ERROR', 2); + +/** + * The preferred session handling method. Valid values: + * + * 'php' Uses settings defined in your php.ini. + * 'cake' Saves session files in CakePHP's /tmp directory. + * 'database' Uses CakePHP's database sessions. + * + * To define a custom session handler, save it at /app/config/.php. + * Set the value of 'Session.save' to to utilize it in CakePHP. + * + * To use database sessions, run the app/config/schema/sessions.php schema using + * the cake shell command: cake schema create Sessions + * + */ + Configure::write('Session.save', 'php'); + +/** + * The model name to be used for the session model. + * + * 'Session.save' must be set to 'database' in order to utilize this constant. + * + * The model name set here should *not* be used elsewhere in your application. + */ + //Configure::write('Session.model', 'Session'); + +/** + * The name of the table used to store CakePHP database sessions. + * + * 'Session.save' must be set to 'database' in order to utilize this constant. + * + * The table name set here should *not* include any table prefix defined elsewhere. + * + * Please note that if you set a value for Session.model (above), any value set for + * Session.table will be ignored. + * + * [Note: Session.table is deprecated as of CakePHP 1.3] + */ + //Configure::write('Session.table', 'cake_sessions'); + +/** + * The DATABASE_CONFIG::$var to use for database session handling. + * + * 'Session.save' must be set to 'database' in order to utilize this constant. + */ + //Configure::write('Session.database', 'default'); + +/** + * The name of CakePHP's session cookie. + * + * Note the guidelines for Session names states: "The session name references + * the session id in cookies and URLs. It should contain only alphanumeric + * characters." + * @link http://php.net/session_name + */ + Configure::write('Session.cookie', 'CAKEPHP'); + +/** + * Session time out time (in seconds). + * Actual value depends on 'Security.level' setting. + */ + Configure::write('Session.timeout', '120'); + +/** + * If set to false, sessions are not automatically started. + */ + Configure::write('Session.start', true); + +/** + * When set to false, HTTP_USER_AGENT will not be checked + * in the session. You might want to set the value to false, when dealing with + * older versions of IE, Chrome Frame or certain web-browsing devices and AJAX + */ + Configure::write('Session.checkAgent', true); + +/** + * The level of CakePHP security. The session timeout time defined + * in 'Session.timeout' is multiplied according to the settings here. + * Valid values: + * + * 'high' Session timeout in 'Session.timeout' x 10 + * 'medium' Session timeout in 'Session.timeout' x 100 + * 'low' Session timeout in 'Session.timeout' x 300 + * + * CakePHP session IDs are also regenerated between requests if + * 'Security.level' is set to 'high'. + */ + Configure::write('Security.level', 'medium'); + +/** + * A random string used in security hashing methods. + */ + Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi'); + +/** + * A random numeric string (digits only) used to encrypt/decrypt strings. + */ + Configure::write('Security.cipherSeed', '76859309657453542496749683645'); + +/** + * Apply timestamps with the last modified time to static assets (js, css, images). + * Will append a querystring parameter containing the time the file was modified. This is + * useful for invalidating browser caches. + * + * Set to `true` to apply timestamps, when debug = 0, or set to 'force' to always enable + * timestamping. + */ + //Configure::write('Asset.timestamp', true); +/** + * Compress CSS output by removing comments, whitespace, repeating tags, etc. + * This requires a/var/cache directory to be writable by the web server for caching. + * and /vendors/csspp/csspp.php + * + * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css(). + */ + //Configure::write('Asset.filter.css', 'css.php'); + +/** + * Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the + * output, and setting the config below to the name of the script. + * + * To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link(). + */ + //Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php'); + +/** + * The classname and database used in CakePHP's + * access control lists. + */ + Configure::write('Acl.classname', 'DbAcl'); + Configure::write('Acl.database', 'default'); + +/** + * If you are on PHP 5.3 uncomment this line and correct your server timezone + * to fix the date & time related errors. + */ + //date_default_timezone_set('UTC'); + +/** + * + * Cache Engine Configuration + * Default settings provided below + * + * File storage engine. + * + * Cache::config('default', array( + * 'engine' => 'File', //[required] + * 'duration'=> 3600, //[optional] + * 'probability'=> 100, //[optional] + * 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path + * 'prefix' => 'cake_', //[optional] prefix every cache file with this string + * 'lock' => false, //[optional] use file locking + * 'serialize' => true, [optional] + * )); + * + * + * APC (http://pecl.php.net/package/APC) + * + * Cache::config('default', array( + * 'engine' => 'Apc', //[required] + * 'duration'=> 3600, //[optional] + * 'probability'=> 100, //[optional] + * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string + * )); + * + * Xcache (http://xcache.lighttpd.net/) + * + * Cache::config('default', array( + * 'engine' => 'Xcache', //[required] + * 'duration'=> 3600, //[optional] + * 'probability'=> 100, //[optional] + * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string + * 'user' => 'user', //user from xcache.admin.user settings + * 'password' => 'password', //plaintext password (xcache.admin.pass) + * )); + * + * + * Memcache (http://www.danga.com/memcached/) + * + * Cache::config('default', array( + * 'engine' => 'Memcache', //[required] + * 'duration'=> 3600, //[optional] + * 'probability'=> 100, //[optional] + * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string + * 'servers' => array( + * '127.0.0.1:11211' // localhost, default port 11211 + * ), //[optional] + * 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory) + * 'persistent' => true, // [optional] set this to false for non-persistent connections + * )); + * + */ + Cache::config('default', array('engine' => 'File')); diff --git a/code/ryzom/tools/server/www/webtt/app/config/database.php.default b/code/ryzom/tools/server/www/webtt/app/config/database.php.default new file mode 100644 index 000000000..043ba5ccc --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/app/config/database.php.default @@ -0,0 +1,95 @@ + The name of a supported driver; valid options are as follows: + * mysql - MySQL 4 & 5, + * mysqli - MySQL 4 & 5 Improved Interface (PHP5 only), + * sqlite - SQLite (PHP5 only), + * postgres - PostgreSQL 7 and higher, + * mssql - Microsoft SQL Server 2000 and higher, + * db2 - IBM DB2, Cloudscape, and Apache Derby (http://php.net/ibm-db2) + * oracle - Oracle 8 and higher + * firebird - Firebird/Interbase + * sybase - Sybase ASE + * adodb-[drivername] - ADOdb interface wrapper (see below), + * odbc - ODBC DBO driver + * + * You can add custom database drivers (or override existing drivers) by adding the + * appropriate file to app/models/datasources/dbo. Drivers should be named 'dbo_x.php', + * where 'x' is the name of the database. + * + * persistent => true / false + * Determines whether or not the database should use a persistent connection + * + * connect => + * ADOdb set the connect to one of these + * (http://phplens.com/adodb/supported.databases.html) and + * append it '|p' for persistent connection. (mssql|p for example, or just mssql for not persistent) + * For all other databases, this setting is deprecated. + * + * host => + * the host you connect to the database. To add a socket or port number, use 'port' => # + * + * prefix => + * Uses the given prefix for all the tables in this database. This setting can be overridden + * on a per-table basis with the Model::$tablePrefix property. + * + * schema => + * For Postgres and DB2, specifies which schema you would like to use the tables in. Postgres defaults to + * 'public', DB2 defaults to empty. + * + * encoding => + * For MySQL, MySQLi, Postgres and DB2, specifies the character encoding to use when connecting to the + * database. Uses database default. + * + */ +class DATABASE_CONFIG { + + var $default = array( + 'driver' => 'mysql', + 'persistent' => false, + 'host' => 'localhost', + 'login' => 'user', + 'password' => 'password', + 'database' => 'database_name', + 'prefix' => '', + ); + + var $test = array( + 'driver' => 'mysql', + 'persistent' => false, + 'host' => 'localhost', + 'login' => 'user', + 'password' => 'password', + 'database' => 'test_database_name', + 'prefix' => '', + ); +} diff --git a/code/ryzom/tools/server/www/webtt/app/config/routes.php b/code/ryzom/tools/server/www/webtt/app/config/routes.php new file mode 100644 index 000000000..a186e49b4 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/app/config/routes.php @@ -0,0 +1,33 @@ + 'pages', 'action' => 'display', 'home')); +/** + * ...and connect the rest of 'Pages' controller's urls. + */ + Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display')); diff --git a/code/ryzom/tools/server/www/webtt/app/config/schema/db_acl.php b/code/ryzom/tools/server/www/webtt/app/config/schema/db_acl.php new file mode 100644 index 000000000..96b96bd9a --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/app/config/schema/db_acl.php @@ -0,0 +1,73 @@ + array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'model' => array('type'=>'string', 'null' => true), + 'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'alias' => array('type'=>'string', 'null' => true), + 'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + + var $aros = array( + 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'model' => array('type'=>'string', 'null' => true), + 'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'alias' => array('type'=>'string', 'null' => true), + 'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + + var $aros_acos = array( + 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'aro_id' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'), + 'aco_id' => array('type'=>'integer', 'null' => false, 'length' => 10), + '_create' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), + '_read' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), + '_update' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), + '_delete' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1)) + ); + +} diff --git a/code/ryzom/tools/server/www/webtt/app/config/schema/i18n.php b/code/ryzom/tools/server/www/webtt/app/config/schema/i18n.php new file mode 100644 index 000000000..27e1ec357 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/app/config/schema/i18n.php @@ -0,0 +1,50 @@ + array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), + 'locale' => array('type'=>'string', 'null' => false, 'length' => 6, 'key' => 'index'), + 'model' => array('type'=>'string', 'null' => false, 'key' => 'index'), + 'foreign_key' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'), + 'field' => array('type'=>'string', 'null' => false, 'key' => 'index'), + 'content' => array('type'=>'text', 'null' => true, 'default' => NULL), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0)) + ); + +} diff --git a/code/ryzom/tools/server/www/webtt/app/config/schema/sessions.php b/code/ryzom/tools/server/www/webtt/app/config/schema/sessions.php new file mode 100644 index 000000000..4581c29c6 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/app/config/schema/sessions.php @@ -0,0 +1,47 @@ + array('type'=>'string', 'null' => false, 'key' => 'primary'), + 'data' => array('type'=>'text', 'null' => true, 'default' => NULL), + 'expires' => array('type'=>'integer', 'null' => true, 'default' => NULL), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); + +} diff --git a/code/ryzom/tools/server/www/webtt/app/controllers/components/empty b/code/ryzom/tools/server/www/webtt/app/controllers/components/empty new file mode 100644 index 000000000..e69de29bb diff --git a/code/ryzom/tools/server/www/webtt/app/index.php b/code/ryzom/tools/server/www/webtt/app/index.php new file mode 100644 index 000000000..732c01021 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/app/index.php @@ -0,0 +1,18 @@ + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] + \ No newline at end of file diff --git a/code/ryzom/tools/server/www/webtt/app/webroot/css.php b/code/ryzom/tools/server/www/webtt/app/webroot/css.php new file mode 100644 index 000000000..aae68cba8 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/app/webroot/css.php @@ -0,0 +1,96 @@ +compress($data); + $ratio = 100 - (round(strlen($output) / strlen($data), 3) * 100); + $output = " /* file: $name, ratio: $ratio% */ " . $output; + return $output; + } +/** + * Write CSS cache + * + * @param unknown_type $path + * @param unknown_type $content + * @return unknown + */ + function write_css_cache($path, $content) { + if (!is_dir(dirname($path))) { + mkdir(dirname($path)); + } + $cache = new File($path); + return $cache->write($content); + } + + if (preg_match('|\.\.|', $url) || !preg_match('|^ccss/(.+)$|i', $url, $regs)) { + die('Wrong file name.'); + } + + $filename = 'css/' . $regs[1]; + $filepath = CSS . $regs[1]; + $cachepath = CACHE . 'css' . DS . str_replace(array('/','\\'), '-', $regs[1]); + + if (!file_exists($filepath)) { + die('Wrong file name.'); + } + + if (file_exists($cachepath)) { + $templateModified = filemtime($filepath); + $cacheModified = filemtime($cachepath); + + if ($templateModified > $cacheModified) { + $output = make_clean_css($filepath, $filename); + write_css_cache($cachepath, $output); + } else { + $output = file_get_contents($cachepath); + } + } else { + $output = make_clean_css($filepath, $filename); + write_css_cache($cachepath, $output); + $templateModified = time(); + } + + header("Date: " . date("D, j M Y G:i:s ", $templateModified) . 'GMT'); + header("Content-Type: text/css"); + header("Expires: " . gmdate("D, d M Y H:i:s", time() + DAY) . " GMT"); + header("Cache-Control: max-age=86400, must-revalidate"); // HTTP/1.1 + header("Pragma: cache"); // HTTP/1.0 + print $output; diff --git a/code/ryzom/tools/server/www/webtt/app/webroot/css/cake.generic.css b/code/ryzom/tools/server/www/webtt/app/webroot/css/cake.generic.css new file mode 100644 index 000000000..4f6f5a2cd --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/app/webroot/css/cake.generic.css @@ -0,0 +1,535 @@ +/** + * + * Generic CSS for CakePHP + * + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project + * @package cake + * @subpackage cake.app.webroot.css + * @since CakePHP(tm) + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) + */ + +* { + margin:0; + padding:0; +} + +/** General Style Info **/ +body { + background: #003d4c; + color: #fff; + font-family:'lucida grande',verdana,helvetica,arial,sans-serif; + font-size:90%; + margin: 0; +} +a { + color: #003d4c; + text-decoration: underline; + font-weight: bold; +} +a:hover { + color: #367889; + text-decoration:none; +} +a img { + border:none; +} +h1, h2, h3, h4 { + font-weight: normal; + margin-bottom:0.5em; +} +h1 { + background:#fff; + color: #003d4c; + font-size: 100%; +} +h2 { + background:#fff; + color: #e32; + font-family:'Gill Sans','lucida grande', helvetica, arial, sans-serif; + font-size: 190%; +} +h3 { + color: #993; + font-family:'Gill Sans','lucida grande', helvetica, arial, sans-serif; + font-size: 165%; +} +h4 { + color: #993; + font-weight: normal; +} +ul, li { + margin: 0 12px; +} + +/** Layout **/ +#container { + text-align: left; +} + +#header{ + padding: 10px 20px; +} +#header h1 { + line-height:20px; + background: #003d4c url('../img/cake.icon.png') no-repeat left; + color: #fff; + padding: 0px 30px; +} +#header h1 a { + color: #fff; + background: #003d4c; + font-weight: normal; + text-decoration: none; +} +#header h1 a:hover { + color: #fff; + background: #003d4c; + text-decoration: underline; +} +#content{ + background: #fff; + clear: both; + color: #333; + padding: 10px 20px 40px 20px; + overflow: auto; +} +#footer { + clear: both; + padding: 6px 10px; + text-align: right; +} + +/** containers **/ +div.form, +div.index, +div.view { + float:right; + width:76%; + border-left:1px solid #666; + padding:10px 2%; +} +div.actions { + float:left; + width:16%; + padding:10px 1.5%; +} +div.actions h3 { + padding-top:0; + color:#777; +} + + +/** Tables **/ +table { + background: #fff; + border-right:0; + clear: both; + color: #333; + margin-bottom: 10px; + width: 100%; +} +th { + border:0; + border-bottom:2px solid #555; + text-align: left; + padding:4px; +} +th a { + display: block; + padding: 2px 4px; + text-decoration: none; +} +th a.asc:after { + content: ' ⇣'; +} +th a.desc:after { + content: ' ⇡'; +} +table tr td { + background: #fff; + padding: 6px; + text-align: left; + vertical-align: top; + border-bottom:1px solid #ddd; +} +table tr:nth-child(2n) td { + background: #f5f5f5; +} +table .altrow td { + background: #f5f5f5; +} +td.actions { + text-align: center; + white-space: nowrap; +} +table td.actions a { + margin: 0px 6px; + padding:2px 5px; +} +.cake-sql-log table { + background: #f4f4f4; +} +.cake-sql-log td { + padding: 4px 8px; + text-align: left; + font-family: Monaco, Consolas, "Courier New", monospaced; +} +.cake-sql-log caption { + color:#fff; +} + +/** Paging **/ +div.paging { + background:#fff; + color: #ccc; + margin-top: 1em; + clear:both; +} +div.paging span.disabled { + color: #ddd; + display: inline; +} +div.paging span.current { + color: #c73e14; +} +div.paging span a { +} + +/** Scaffold View **/ +dl { + line-height: 2em; + margin: 0em 0em; + width: 60%; +} +dl .altrow { + background: #f4f4f4; +} +dt { + font-weight: bold; + padding-left: 4px; + vertical-align: top; +} +dd { + margin-left: 10em; + margin-top: -2em; + vertical-align: top; +} + +/** Forms **/ +form { + clear: both; + margin-right: 20px; + padding: 0; + width: 95%; +} +fieldset { + border: 1px solid #ccc; + margin-bottom: 1em; + padding: 16px 20px; +} +fieldset legend { + background:#fff; + color: #e32; + font-size: 160%; + font-weight: bold; +} +fieldset fieldset { + margin-top: 0px; + margin-bottom: 20px; + padding: 16px 10px; +} +fieldset fieldset legend { + font-size: 120%; + font-weight: normal; +} +fieldset fieldset div { + clear: left; + margin: 0 20px; +} +form div { + clear: both; + margin-bottom: 1em; + padding: .5em; + vertical-align: text-top; +} +form .input { + color: #444; +} +form .required { + font-weight: bold; +} +form .required label:after { + color: #e32; + content: '*'; + display:inline; +} +form div.submit { + border: 0; + clear: both; + margin-top: 10px; +} +label { + display: block; + font-size: 110%; + margin-bottom:3px; +} +input, textarea { + clear: both; + font-size: 140%; + font-family: "frutiger linotype", "lucida grande", "verdana", sans-serif; + padding: 1%; + width:98%; +} +select { + clear: both; + font-size: 120%; + vertical-align: text-bottom; +} +select[multiple=multiple] { + width: 100%; +} +option { + font-size: 120%; + padding: 0 3px; +} +input[type=checkbox] { + clear: left; + float: left; + margin: 0px 6px 7px 2px; + width: auto; +} +div.checkbox label { + display: inline; +} +input[type=radio] { + float:left; + width:auto; + margin: 0 3px 7px 0; +} +div.radio label { + margin: 0 0 6px 20px; +} +input[type=submit] { + display: inline; + font-size: 110%; + width: auto; +} +form .submit input[type=submit] { + background:#62af56; + background: -webkit-gradient(linear, left top, left bottom, from(#a8ea9c), to(#62af56)); + background-image: -moz-linear-gradient(top, #a8ea9c, #62af56); + border-color: #2d6324; + color: #000; + text-shadow: #8cee7c 0px 1px 0px; +} +form .submit input[type=submit]:hover { + background:#4ca83d; + background: -webkit-gradient(linear, left top, left bottom, from(#85e573), to(#4ca83d)); + background-image: -moz-linear-gradient(top, #85e573, #4ca83d); +} + +/** Notices and Errors **/ +div.message { + clear: both; + color: #fff; + font-size: 140%; + font-weight: bold; + margin: 0 0 1em 0; + background: #c73e14; + padding: 5px; +} +div.error-message { + clear: both; + color: #fff; + font-weight: bold; + background: #c73e14; +} +p.error { + background-color: #e32; + color: #fff; + font-family: Courier, monospace; + font-size: 120%; + line-height: 140%; + padding: 0.8em; + margin: 1em 0; +} +p.error em { + color: #000; + font-weight: normal; + line-height: 140%; +} +.notice { + background: #ffcc00; + color: #000; + display: block; + font-family: Courier, monospace; + font-size: 120%; + line-height: 140%; + padding: 0.8em; + margin: 1em 0; +} +.success { + background: green; + color: #fff; +} + +/** Actions **/ +div.actions ul { + margin: 0; + padding: 0; +} +div.actions li { + margin:0 0 0.5em 0; + list-style-type: none; + white-space: nowrap; + padding: 0; +} +div.actions ul li a { + font-weight: normal; + display: block; + clear: both; +} +div.actions ul li a:hover { + text-decoration: underline; +} + +input[type=submit], +div.actions ul li a, +td.actions a { + font-weight:normal; + padding: 4px 8px; + background:#e6e49f; + background: -webkit-gradient(linear, left top, left bottom, from(#f1f1d4), to(#e6e49f)); + background-image: -moz-linear-gradient(top, #f1f1d4, #e6e49f); + color:#333; + border:1px solid #aaac62; + -webkit-border-radius:8px; + -moz-border-radius:8px; + border-radius:8px; + text-decoration:none; + text-shadow: #fff 0px 1px 0px; + min-width: 0; +} +input[type=submit]:hover, +div.actions ul li a:hover, +td.actions a:hover { + background: #f0f09a; + background: -webkit-gradient(linear, left top, left bottom, from(#f7f7e1), to(#eeeca9)); +} + +/** Related **/ +div.related { + clear: both; + display: block; +} + +/** Debugging **/ +pre { + color: #000; + background: #f0f0f0; + padding: 1em; +} +pre.cake-debug { + background: #ffcc00; + font-size: 120%; + line-height: 140%; + margin-top: 1em; + overflow: auto; + position: relative; +} +div.cake-stack-trace { + background: #fff; + color: #333; + margin: 0px; + padding: 6px; + font-size: 120%; + line-height: 140%; + overflow: auto; + position: relative; +} +div.cake-code-dump pre { + position: relative; + overflow: auto; +} +div.cake-stack-trace pre, div.cake-code-dump pre { + color: #000; + background-color: #F0F0F0; + margin: 0px; + padding: 1em; + overflow: auto; +} +div.cake-code-dump pre, div.cake-code-dump pre code { + clear: both; + font-size: 12px; + line-height: 15px; + margin: 4px 2px; + padding: 4px; + overflow: auto; +} +div.cake-code-dump span.code-highlight { + background-color: #ff0; + padding: 4px; +} +div.code-coverage-results div.code-line { + padding-left:5px; + display:block; + margin-left:10px; +} +div.code-coverage-results div.uncovered span.content { + background:#ecc; +} +div.code-coverage-results div.covered span.content { + background:#cec; +} +div.code-coverage-results div.ignored span.content { + color:#aaa; +} +div.code-coverage-results span.line-num { + color:#666; + display:block; + float:left; + width:20px; + text-align:right; + margin-right:5px; +} +div.code-coverage-results span.line-num strong { + color:#666; +} +div.code-coverage-results div.start { + border:1px solid #aaa; + border-width:1px 1px 0px 1px; + margin-top:30px; + padding-top:5px; +} +div.code-coverage-results div.end { + border:1px solid #aaa; + border-width:0px 1px 1px 1px; + margin-bottom:30px; + padding-bottom:5px; +} +div.code-coverage-results div.realstart { + margin-top:0px; +} +div.code-coverage-results p.note { + color:#bbb; + padding:5px; + margin:5px 0 10px; + font-size:10px; +} +div.code-coverage-results span.result-bad { + color: #a00; +} +div.code-coverage-results span.result-ok { + color: #fa0; +} +div.code-coverage-results span.result-good { + color: #0a0; +} \ No newline at end of file diff --git a/code/ryzom/tools/server/www/webtt/app/webroot/favicon.ico b/code/ryzom/tools/server/www/webtt/app/webroot/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..b36e81f2f35133dede48dc18f78d3e1a3353f7bc GIT binary patch literal 372 zcmV-)0gL{LP)Ce4&o}{bgKX)=r-B_#-Qs`WM)Da5Prgl zsZ%T@FChJjuHh1`0m$SsVlk8KBKw^@522Z3S}fqzqUy4nLhVp$W)@MMy#WF!pk3U7 zB65kQi)kZ#rBYK5tRifZI?>XjFU4<@lsph9Z1>blC@{qW13mof`13?K&cOa z9q)cr7> zIGsQFGn3| zCzs2iP$-yfVPOGVTU&6sT(-5fwHb2tVsLP9#{Vr9Ct?R7q(rf?v2A5#W$OI=e1YUJ zQ1YRnA&iWSQ1XYAm__>aYb6XIhMiYVD+-z8_pYi6+CsH{*^m;vOjqvbr=H&DFkeqxHQBh$Scsoy0Glw(T zsaSG*ok62V;~yXYNgP*DUw;o98^+0@vGFb{HC+As}XJ=;xg=B7N_;-mKbHH{|lXs_o+aPcs5~J?s%^P2Odb)Uz z$GvY6^!N9(C2-h?28B$qx7%_yHnt2eU%nQ0qThbl6a_+b)EirjBgQ`g1_07Fr&6R? RzIgxu002ovPDHLkV1mdlwUYn< literal 0 HcmV?d00001 diff --git a/code/ryzom/tools/server/www/webtt/app/webroot/img/cake.power.gif b/code/ryzom/tools/server/www/webtt/app/webroot/img/cake.power.gif new file mode 100644 index 0000000000000000000000000000000000000000..8f8d570a2e24d86f0ad7730ee8f2435fd49f152c GIT binary patch literal 201 zcmV;)05<&ZTq0L2I(c1A@d@rg`ENj#vn zcl`yi#iKX*jb2F7vd0WQgUq5Tw}Jp}g+ZnCeBY3dYNI+m71%bHRfx4UCkD2th(Q*@ zmd5r+MJNYn7dispatch(); + } diff --git a/code/ryzom/tools/server/www/webtt/app/webroot/js/empty b/code/ryzom/tools/server/www/webtt/app/webroot/js/empty new file mode 100644 index 000000000..e69de29bb diff --git a/code/ryzom/tools/server/www/webtt/app/webroot/test.php b/code/ryzom/tools/server/www/webtt/app/webroot/test.php new file mode 100644 index 000000000..2c2e9a82b --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/app/webroot/test.php @@ -0,0 +1,94 @@ + + * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The Open Group Test Suite License + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://book.cakephp.org/view/1196/Testing + * @package cake + * @subpackage cake.app.webroot + * @since CakePHP(tm) v 1.2.0.4433 + * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License + */ +set_time_limit(0); +ini_set('display_errors', 1); +/** + * Use the DS to separate the directories in other defines + */ + if (!defined('DS')) { + define('DS', DIRECTORY_SEPARATOR); + } +/** + * These defines should only be edited if you have cake installed in + * a directory layout other than the way it is distributed. + * When using custom settings be sure to use the DS and do not add a trailing DS. + */ + +/** + * The full path to the directory which holds "app", WITHOUT a trailing DS. + * + */ + if (!defined('ROOT')) { + define('ROOT', dirname(dirname(dirname(__FILE__)))); + } +/** + * The actual directory name for the "app". + * + */ + if (!defined('APP_DIR')) { + define('APP_DIR', basename(dirname(dirname(__FILE__)))); + } +/** + * The absolute path to the "cake" directory, WITHOUT a trailing DS. + * + */ + if (!defined('CAKE_CORE_INCLUDE_PATH')) { + define('CAKE_CORE_INCLUDE_PATH', ROOT); + } + +/** + * Editing below this line should not be necessary. + * Change at your own risk. + * + */ +if (!defined('WEBROOT_DIR')) { + define('WEBROOT_DIR', basename(dirname(__FILE__))); +} +if (!defined('WWW_ROOT')) { + define('WWW_ROOT', dirname(__FILE__) . DS); +} +if (!defined('CORE_PATH')) { + if (function_exists('ini_set') && ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'))) { + define('APP_PATH', null); + define('CORE_PATH', null); + } else { + define('APP_PATH', ROOT . DS . APP_DIR . DS); + define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); + } +} +if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { + trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); +} + +$corePath = App::core('cake'); +if (isset($corePath[0])) { + define('TEST_CAKE_CORE_INCLUDE_PATH', rtrim($corePath[0], DS) . DS); +} else { + define('TEST_CAKE_CORE_INCLUDE_PATH', CAKE_CORE_INCLUDE_PATH); +} + +if (Configure::read('debug') < 1) { + die(__('Debug setting does not allow access to this url.', true)); +} + +require_once CAKE_TESTS_LIB . 'cake_test_suite_dispatcher.php'; + +$Dispatcher = new CakeTestSuiteDispatcher(); +$Dispatcher->dispatch(); diff --git a/code/ryzom/tools/server/www/webtt/cake/LICENSE.txt b/code/ryzom/tools/server/www/webtt/cake/LICENSE.txt new file mode 100644 index 000000000..bf6f82dd4 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/LICENSE.txt @@ -0,0 +1,22 @@ +The MIT License + +CakePHP(tm) : The Rapid Development PHP Framework (http://cakephp.org) +Copyright 2005-2010, Cake Software Foundation, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/code/ryzom/tools/server/www/webtt/cake/VERSION.txt b/code/ryzom/tools/server/www/webtt/cake/VERSION.txt new file mode 100644 index 000000000..f443e5a7c --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/VERSION.txt @@ -0,0 +1,21 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +--------------------------------------------------------------------------------------------+ // +// CakePHP Version +// +// Holds a static string representing the current version of CakePHP +// +// CakePHP(tm) : Rapid Development Framework (http://cakephp.org) +// Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) +// +// Licensed under The MIT License +// Redistributions of files must retain the above copyright notice. +// +// @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) +// @link http://cakephp.org +// @package cake +// @subpackage cake.cake.libs +// @since CakePHP(tm) v 0.2.9 +// @license MIT License (http://www.opensource.org/licenses/mit-license.php) +// +--------------------------------------------------------------------------------------------+ // +//////////////////////////////////////////////////////////////////////////////////////////////////// +1.3.9 diff --git a/code/ryzom/tools/server/www/webtt/cake/basics.php b/code/ryzom/tools/server/www/webtt/cake/basics.php new file mode 100644 index 000000000..ac3f02ae0 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/basics.php @@ -0,0 +1,1026 @@ + 0) { + if ($showFrom) { + $calledFrom = debug_backtrace(); + echo '' . substr(str_replace(ROOT, '', $calledFrom[0]['file']), 1) . ''; + echo ' (line ' . $calledFrom[0]['line'] . ')'; + } + echo "\n
\n";
+
+			$var = print_r($var, true);
+			if ($showHtml) {
+				$var = str_replace('<', '<', str_replace('>', '>', $var));
+			}
+			echo $var . "\n
\n"; + } + } +if (!function_exists('getMicrotime')) { + +/** + * Returns microtime for execution time checking + * + * @return float Microtime + */ + function getMicrotime() { + list($usec, $sec) = explode(' ', microtime()); + return ((float)$usec + (float)$sec); + } +} +if (!function_exists('sortByKey')) { + +/** + * Sorts given $array by key $sortby. + * + * @param array $array Array to sort + * @param string $sortby Sort by this key + * @param string $order Sort order asc/desc (ascending or descending). + * @param integer $type Type of sorting to perform + * @return mixed Sorted array + */ + function sortByKey(&$array, $sortby, $order = 'asc', $type = SORT_NUMERIC) { + if (!is_array($array)) { + return null; + } + + foreach ($array as $key => $val) { + $sa[$key] = $val[$sortby]; + } + + if ($order == 'asc') { + asort($sa, $type); + } else { + arsort($sa, $type); + } + + foreach ($sa as $key => $val) { + $out[] = $array[$key]; + } + return $out; + } +} +if (!function_exists('array_combine')) { + +/** + * Combines given identical arrays by using the first array's values as keys, + * and the second one's values as values. (Implemented for backwards compatibility with PHP4) + * + * @param array $a1 Array to use for keys + * @param array $a2 Array to use for values + * @return mixed Outputs either combined array or false. + * @deprecated Will be removed in 2.0 + */ + function array_combine($a1, $a2) { + $a1 = array_values($a1); + $a2 = array_values($a2); + $c1 = count($a1); + $c2 = count($a2); + + if ($c1 != $c2) { + return false; + } + if ($c1 <= 0) { + return false; + } + $output = array(); + + for ($i = 0; $i < $c1; $i++) { + $output[$a1[$i]] = $a2[$i]; + } + return $output; + } +} + +/** + * Convenience method for htmlspecialchars. + * + * @param string $text Text to wrap through htmlspecialchars + * @param string $charset Character set to use when escaping. Defaults to config value in 'App.encoding' or 'UTF-8' + * @return string Wrapped text + * @link http://book.cakephp.org/view/1132/h + */ + function h($text, $charset = null) { + if (is_array($text)) { + return array_map('h', $text); + } + + static $defaultCharset = false; + if ($defaultCharset === false) { + $defaultCharset = Configure::read('App.encoding'); + if ($defaultCharset === null) { + $defaultCharset = 'UTF-8'; + } + } + if ($charset) { + return htmlspecialchars($text, ENT_QUOTES, $charset); + } else { + return htmlspecialchars($text, ENT_QUOTES, $defaultCharset); + } + } + +/** + * Splits a dot syntax plugin name into its plugin and classname. + * If $name does not have a dot, then index 0 will be null. + * + * Commonly used like `list($plugin, $name) = pluginSplit($name);` + * + * @param string $name The name you want to plugin split. + * @param boolean $dotAppend Set to true if you want the plugin to have a '.' appended to it. + * @param string $plugin Optional default plugin to use if no plugin is found. Defaults to null. + * @return array Array with 2 indexes. 0 => plugin name, 1 => classname + */ + function pluginSplit($name, $dotAppend = false, $plugin = null) { + if (strpos($name, '.') !== false) { + $parts = explode('.', $name, 2); + if ($dotAppend) { + $parts[0] .= '.'; + } + return $parts; + } + return array($plugin, $name); + } + +/** + * Returns an array of all the given parameters. + * + * Example: + * + * `a('a', 'b')` + * + * Would return: + * + * `array('a', 'b')` + * + * @return array Array of given parameters + * @link http://book.cakephp.org/view/1122/a + * @deprecated Will be removed in 2.0 + */ + function a() { + $args = func_get_args(); + return $args; + } + +/** + * Constructs associative array from pairs of arguments. + * + * Example: + * + * `aa('a','b')` + * + * Would return: + * + * `array('a'=>'b')` + * + * @return array Associative array + * @link http://book.cakephp.org/view/1123/aa + * @deprecated Will be removed in 2.0 + */ + function aa() { + $args = func_get_args(); + $argc = count($args); + for ($i = 0; $i < $argc; $i++) { + if ($i + 1 < $argc) { + $a[$args[$i]] = $args[$i + 1]; + } else { + $a[$args[$i]] = null; + } + $i++; + } + return $a; + } + +/** + * Convenience method for echo(). + * + * @param string $text String to echo + * @link http://book.cakephp.org/view/1129/e + * @deprecated Will be removed in 2.0 + */ + function e($text) { + echo $text; + } + +/** + * Convenience method for strtolower(). + * + * @param string $str String to lowercase + * @return string Lowercased string + * @link http://book.cakephp.org/view/1134/low + * @deprecated Will be removed in 2.0 + */ + function low($str) { + return strtolower($str); + } + +/** + * Convenience method for strtoupper(). + * + * @param string $str String to uppercase + * @return string Uppercased string + * @link http://book.cakephp.org/view/1139/up + * @deprecated Will be removed in 2.0 + */ + function up($str) { + return strtoupper($str); + } + +/** + * Convenience method for str_replace(). + * + * @param string $search String to be replaced + * @param string $replace String to insert + * @param string $subject String to search + * @return string Replaced string + * @link http://book.cakephp.org/view/1137/r + * @deprecated Will be removed in 2.0 + */ + function r($search, $replace, $subject) { + return str_replace($search, $replace, $subject); + } + +/** + * Print_r convenience function, which prints out
 tags around
+ * the output of given array. Similar to debug().
+ *
+ * @see	debug()
+ * @param array $var Variable to print out
+ * @link http://book.cakephp.org/view/1136/pr
+ */
+	function pr($var) {
+		if (Configure::read() > 0) {
+			echo '
';
+			print_r($var);
+			echo '
'; + } + } + +/** + * Display parameters. + * + * @param mixed $p Parameter as string or array + * @return string + * @deprecated Will be removed in 2.0 + */ + function params($p) { + if (!is_array($p) || count($p) == 0) { + return null; + } + if (is_array($p[0]) && count($p) == 1) { + return $p[0]; + } + return $p; + } + +/** + * Merge a group of arrays + * + * @param array First array + * @param array Second array + * @param array Third array + * @param array Etc... + * @return array All array parameters merged into one + * @link http://book.cakephp.org/view/1124/am + */ + function am() { + $r = array(); + $args = func_get_args(); + foreach ($args as $a) { + if (!is_array($a)) { + $a = array($a); + } + $r = array_merge($r, $a); + } + return $r; + } + +/** + * Gets an environment variable from available sources, and provides emulation + * for unsupported or inconsistent environment variables (i.e. DOCUMENT_ROOT on + * IIS, or SCRIPT_NAME in CGI mode). Also exposes some additional custom + * environment information. + * + * @param string $key Environment variable name. + * @return string Environment variable setting. + * @link http://book.cakephp.org/view/1130/env + */ + function env($key) { + if ($key == 'HTTPS') { + if (isset($_SERVER['HTTPS'])) { + return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'); + } + return (strpos(env('SCRIPT_URI'), 'https://') === 0); + } + + if ($key == 'SCRIPT_NAME') { + if (env('CGI_MODE') && isset($_ENV['SCRIPT_URL'])) { + $key = 'SCRIPT_URL'; + } + } + + $val = null; + if (isset($_SERVER[$key])) { + $val = $_SERVER[$key]; + } elseif (isset($_ENV[$key])) { + $val = $_ENV[$key]; + } elseif (getenv($key) !== false) { + $val = getenv($key); + } + + if ($key === 'REMOTE_ADDR' && $val === env('SERVER_ADDR')) { + $addr = env('HTTP_PC_REMOTE_ADDR'); + if ($addr !== null) { + $val = $addr; + } + } + + if ($val !== null) { + return $val; + } + + switch ($key) { + case 'SCRIPT_FILENAME': + if (defined('SERVER_IIS') && SERVER_IIS === true) { + return str_replace('\\\\', '\\', env('PATH_TRANSLATED')); + } + break; + case 'DOCUMENT_ROOT': + $name = env('SCRIPT_NAME'); + $filename = env('SCRIPT_FILENAME'); + $offset = 0; + if (!strpos($name, '.php')) { + $offset = 4; + } + return substr($filename, 0, strlen($filename) - (strlen($name) + $offset)); + break; + case 'PHP_SELF': + return str_replace(env('DOCUMENT_ROOT'), '', env('SCRIPT_FILENAME')); + break; + case 'CGI_MODE': + return (PHP_SAPI === 'cgi'); + break; + case 'HTTP_BASE': + $host = env('HTTP_HOST'); + $parts = explode('.', $host); + $count = count($parts); + + if ($count === 1) { + return '.' . $host; + } elseif ($count === 2) { + return '.' . $host; + } elseif ($count === 3) { + $gTLD = array('aero', 'asia', 'biz', 'cat', 'com', 'coop', 'edu', 'gov', 'info', 'int', 'jobs', 'mil', 'mobi', 'museum', 'name', 'net', 'org', 'pro', 'tel', 'travel', 'xxx'); + if (in_array($parts[1], $gTLD)) { + return '.' . $host; + } + } + array_shift($parts); + return '.' . implode('.', $parts); + break; + } + return null; + } +if (!function_exists('file_put_contents')) { + +/** + * Writes data into file. + * + * If file exists, it will be overwritten. If data is an array, it will be implode()ed with an empty string. + * + * @param string $fileName File name. + * @param mixed $data String or array. + * @return boolean Success + * @deprecated Will be removed in 2.0 + */ + function file_put_contents($fileName, $data) { + if (is_array($data)) { + $data = implode('', $data); + } + $res = @fopen($fileName, 'w+b'); + + if ($res) { + $write = @fwrite($res, $data); + if ($write === false) { + return false; + } else { + @fclose($res); + return $write; + } + } + return false; + } +} + +/** + * Reads/writes temporary data to cache files or session. + * + * @param string $path File path within /tmp to save the file. + * @param mixed $data The data to save to the temporary file. + * @param mixed $expires A valid strtotime string when the data expires. + * @param string $target The target of the cached data; either 'cache' or 'public'. + * @return mixed The contents of the temporary file. + * @deprecated Please use Cache::write() instead + */ + function cache($path, $data = null, $expires = '+1 day', $target = 'cache') { + if (Configure::read('Cache.disable')) { + return null; + } + $now = time(); + + if (!is_numeric($expires)) { + $expires = strtotime($expires, $now); + } + + switch (strtolower($target)) { + case 'cache': + $filename = CACHE . $path; + break; + case 'public': + $filename = WWW_ROOT . $path; + break; + case 'tmp': + $filename = TMP . $path; + break; + } + $timediff = $expires - $now; + $filetime = false; + + if (file_exists($filename)) { + $filetime = @filemtime($filename); + } + + if ($data === null) { + if (file_exists($filename) && $filetime !== false) { + if ($filetime + $timediff < $now) { + @unlink($filename); + } else { + $data = @file_get_contents($filename); + } + } + } elseif (is_writable(dirname($filename))) { + @file_put_contents($filename, $data); + } + return $data; + } + +/** + * Used to delete files in the cache directories, or clear contents of cache directories + * + * @param mixed $params As String name to be searched for deletion, if name is a directory all files in + * directory will be deleted. If array, names to be searched for deletion. If clearCache() without params, + * all files in app/tmp/cache/views will be deleted + * @param string $type Directory in tmp/cache defaults to view directory + * @param string $ext The file extension you are deleting + * @return true if files found and deleted false otherwise + */ + function clearCache($params = null, $type = 'views', $ext = '.php') { + if (is_string($params) || $params === null) { + $params = preg_replace('/\/\//', '/', $params); + $cache = CACHE . $type . DS . $params; + + if (is_file($cache . $ext)) { + @unlink($cache . $ext); + return true; + } elseif (is_dir($cache)) { + $files = glob($cache . '*'); + + if ($files === false) { + return false; + } + + foreach ($files as $file) { + if (is_file($file) && strrpos($file, DS . 'empty') !== strlen($file) - 6) { + @unlink($file); + } + } + return true; + } else { + $cache = array( + CACHE . $type . DS . '*' . $params . $ext, + CACHE . $type . DS . '*' . $params . '_*' . $ext + ); + $files = array(); + while ($search = array_shift($cache)) { + $results = glob($search); + if ($results !== false) { + $files = array_merge($files, $results); + } + } + if (empty($files)) { + return false; + } + foreach ($files as $file) { + if (is_file($file) && strrpos($file, DS . 'empty') !== strlen($file) - 6) { + @unlink($file); + } + } + return true; + } + } elseif (is_array($params)) { + foreach ($params as $file) { + clearCache($file, $type, $ext); + } + return true; + } + return false; + } + +/** + * Recursively strips slashes from all values in an array + * + * @param array $values Array of values to strip slashes + * @return mixed What is returned from calling stripslashes + * @link http://book.cakephp.org/view/1138/stripslashes_deep + */ + function stripslashes_deep($values) { + if (is_array($values)) { + foreach ($values as $key => $value) { + $values[$key] = stripslashes_deep($value); + } + } else { + $values = stripslashes($values); + } + return $values; + } + +/** + * Returns a translated string if one is found; Otherwise, the submitted message. + * + * @param string $singular Text to translate + * @param boolean $return Set to true to return translated string, or false to echo + * @return mixed translated string if $return is false string will be echoed + * @link http://book.cakephp.org/view/1121/__ + */ + function __($singular, $return = false) { + if (!$singular) { + return; + } + if (!class_exists('I18n')) { + App::import('Core', 'i18n'); + } + + if ($return === false) { + echo I18n::translate($singular); + } else { + return I18n::translate($singular); + } + } + +/** + * Returns correct plural form of message identified by $singular and $plural for count $count. + * Some languages have more than one form for plural messages dependent on the count. + * + * @param string $singular Singular text to translate + * @param string $plural Plural text + * @param integer $count Count + * @param boolean $return true to return, false to echo + * @return mixed plural form of translated string if $return is false string will be echoed + */ + function __n($singular, $plural, $count, $return = false) { + if (!$singular) { + return; + } + if (!class_exists('I18n')) { + App::import('Core', 'i18n'); + } + + if ($return === false) { + echo I18n::translate($singular, $plural, null, 6, $count); + } else { + return I18n::translate($singular, $plural, null, 6, $count); + } + } + +/** + * Allows you to override the current domain for a single message lookup. + * + * @param string $domain Domain + * @param string $msg String to translate + * @param string $return true to return, false to echo + * @return translated string if $return is false string will be echoed + */ + function __d($domain, $msg, $return = false) { + if (!$msg) { + return; + } + if (!class_exists('I18n')) { + App::import('Core', 'i18n'); + } + + if ($return === false) { + echo I18n::translate($msg, null, $domain); + } else { + return I18n::translate($msg, null, $domain); + } + } + +/** + * Allows you to override the current domain for a single plural message lookup. + * Returns correct plural form of message identified by $singular and $plural for count $count + * from domain $domain. + * + * @param string $domain Domain + * @param string $singular Singular string to translate + * @param string $plural Plural + * @param integer $count Count + * @param boolean $return true to return, false to echo + * @return plural form of translated string if $return is false string will be echoed + */ + function __dn($domain, $singular, $plural, $count, $return = false) { + if (!$singular) { + return; + } + if (!class_exists('I18n')) { + App::import('Core', 'i18n'); + } + + if ($return === false) { + echo I18n::translate($singular, $plural, $domain, 6, $count); + } else { + return I18n::translate($singular, $plural, $domain, 6, $count); + } + } + +/** + * Allows you to override the current domain for a single message lookup. + * It also allows you to specify a category. + * + * The category argument allows a specific category of the locale settings to be used for fetching a message. + * Valid categories are: LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY, LC_MESSAGES and LC_ALL. + * + * Note that the category must be specified with a numeric value, instead of the constant name. The values are: + * + * - LC_ALL 0 + * - LC_COLLATE 1 + * - LC_CTYPE 2 + * - LC_MONETARY 3 + * - LC_NUMERIC 4 + * - LC_TIME 5 + * - LC_MESSAGES 6 + * + * @param string $domain Domain + * @param string $msg Message to translate + * @param integer $category Category + * @param boolean $return true to return, false to echo + * @return translated string if $return is false string will be echoed + */ + function __dc($domain, $msg, $category, $return = false) { + if (!$msg) { + return; + } + if (!class_exists('I18n')) { + App::import('Core', 'i18n'); + } + + if ($return === false) { + echo I18n::translate($msg, null, $domain, $category); + } else { + return I18n::translate($msg, null, $domain, $category); + } + } + +/** + * Allows you to override the current domain for a single plural message lookup. + * It also allows you to specify a category. + * Returns correct plural form of message identified by $singular and $plural for count $count + * from domain $domain. + * + * The category argument allows a specific category of the locale settings to be used for fetching a message. + * Valid categories are: LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY, LC_MESSAGES and LC_ALL. + * + * Note that the category must be specified with a numeric value, instead of the constant name. The values are: + * + * - LC_ALL 0 + * - LC_COLLATE 1 + * - LC_CTYPE 2 + * - LC_MONETARY 3 + * - LC_NUMERIC 4 + * - LC_TIME 5 + * - LC_MESSAGES 6 + * + * @param string $domain Domain + * @param string $singular Singular string to translate + * @param string $plural Plural + * @param integer $count Count + * @param integer $category Category + * @param boolean $return true to return, false to echo + * @return plural form of translated string if $return is false string will be echoed + */ + function __dcn($domain, $singular, $plural, $count, $category, $return = false) { + if (!$singular) { + return; + } + if (!class_exists('I18n')) { + App::import('Core', 'i18n'); + } + + if ($return === false) { + echo I18n::translate($singular, $plural, $domain, $category, $count); + } else { + return I18n::translate($singular, $plural, $domain, $category, $count); + } + } + +/** + * The category argument allows a specific category of the locale settings to be used for fetching a message. + * Valid categories are: LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY, LC_MESSAGES and LC_ALL. + * + * Note that the category must be specified with a numeric value, instead of the constant name. The values are: + * + * - LC_ALL 0 + * - LC_COLLATE 1 + * - LC_CTYPE 2 + * - LC_MONETARY 3 + * - LC_NUMERIC 4 + * - LC_TIME 5 + * - LC_MESSAGES 6 + * + * @param string $msg String to translate + * @param integer $category Category + * @param string $return true to return, false to echo + * @return translated string if $return is false string will be echoed + */ + function __c($msg, $category, $return = false) { + if (!$msg) { + return; + } + if (!class_exists('I18n')) { + App::import('Core', 'i18n'); + } + + if ($return === false) { + echo I18n::translate($msg, null, null, $category); + } else { + return I18n::translate($msg, null, null, $category); + } + } + +/** + * Computes the difference of arrays using keys for comparison. + * + * @param array First array + * @param array Second array + * @return array Array with different keys + * @deprecated Will be removed in 2.0 + */ + if (!function_exists('array_diff_key')) { + function array_diff_key() { + $valuesDiff = array(); + + $argc = func_num_args(); + if ($argc < 2) { + return false; + } + + $args = func_get_args(); + foreach ($args as $param) { + if (!is_array($param)) { + return false; + } + } + + foreach ($args[0] as $valueKey => $valueData) { + for ($i = 1; $i < $argc; $i++) { + if (array_key_exists($valueKey, $args[$i])) { + continue 2; + } + } + $valuesDiff[$valueKey] = $valueData; + } + return $valuesDiff; + } + } + +/** + * Computes the intersection of arrays using keys for comparison + * + * @param array First array + * @param array Second array + * @return array Array with interesected keys + * @deprecated Will be removed in 2.0 + */ + if (!function_exists('array_intersect_key')) { + function array_intersect_key($arr1, $arr2) { + $res = array(); + foreach ($arr1 as $key => $value) { + if (array_key_exists($key, $arr2)) { + $res[$key] = $arr1[$key]; + } + } + return $res; + } + } + +/** + * Shortcut to Log::write. + * + * @param string $message Message to write to log + */ + function LogError($message) { + if (!class_exists('CakeLog')) { + App::import('Core', 'CakeLog'); + } + $bad = array("\n", "\r", "\t"); + $good = ' '; + CakeLog::write('error', str_replace($bad, $good, $message)); + } + +/** + * Searches include path for files. + * + * @param string $file File to look for + * @return Full path to file if exists, otherwise false + * @link http://book.cakephp.org/view/1131/fileExistsInPath + */ + function fileExistsInPath($file) { + $paths = explode(PATH_SEPARATOR, ini_get('include_path')); + foreach ($paths as $path) { + $fullPath = $path . DS . $file; + + if (file_exists($fullPath)) { + return $fullPath; + } elseif (file_exists($file)) { + return $file; + } + } + return false; + } + +/** + * Convert forward slashes to underscores and removes first and last underscores in a string + * + * @param string String to convert + * @return string with underscore remove from start and end of string + * @link http://book.cakephp.org/view/1126/convertSlash + */ + function convertSlash($string) { + $string = trim($string, '/'); + $string = preg_replace('/\/\//', '/', $string); + $string = str_replace('/', '_', $string); + return $string; + } + +/** + * Implements http_build_query for PHP4. + * + * @param string $data Data to set in query string + * @param string $prefix If numeric indices, prepend this to index for elements in base array. + * @param string $argSep String used to separate arguments + * @param string $baseKey Base key + * @return string URL encoded query string + * @see http://php.net/http_build_query + * @deprecated Will be removed in 2.0 + */ + if (!function_exists('http_build_query')) { + function http_build_query($data, $prefix = null, $argSep = null, $baseKey = null) { + if (empty($argSep)) { + $argSep = ini_get('arg_separator.output'); + } + if (is_object($data)) { + $data = get_object_vars($data); + } + $out = array(); + + foreach ((array)$data as $key => $v) { + if (is_numeric($key) && !empty($prefix)) { + $key = $prefix . $key; + } + $key = urlencode($key); + + if (!empty($baseKey)) { + $key = $baseKey . '[' . $key . ']'; + } + + if (is_array($v) || is_object($v)) { + $out[] = http_build_query($v, $prefix, $argSep, $key); + } else { + $out[] = $key . '=' . urlencode($v); + } + } + return implode($argSep, $out); + } + } + +/** + * Wraps ternary operations. If $condition is a non-empty value, $val1 is returned, otherwise $val2. + * Don't use for isset() conditions, or wrap your variable with @ operator: + * Example: + * + * `ife(isset($variable), @$variable, 'default');` + * + * @param mixed $condition Conditional expression + * @param mixed $val1 Value to return in case condition matches + * @param mixed $val2 Value to return if condition doesn't match + * @return mixed $val1 or $val2, depending on whether $condition evaluates to a non-empty expression. + * @link http://book.cakephp.org/view/1133/ife + * @deprecated Will be removed in 2.0 + */ + function ife($condition, $val1 = null, $val2 = null) { + if (!empty($condition)) { + return $val1; + } + return $val2; + } diff --git a/code/ryzom/tools/server/www/webtt/cake/bootstrap.php b/code/ryzom/tools/server/www/webtt/cake/bootstrap.php new file mode 100644 index 000000000..b69cb7b75 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/bootstrap.php @@ -0,0 +1,39 @@ += 5)); +} +if (!defined('E_DEPRECATED')) { + define('E_DEPRECATED', 8192); +} +error_reporting(E_ALL & ~E_DEPRECATED); + +require CORE_PATH . 'cake' . DS . 'basics.php'; +$TIME_START = getMicrotime(); +require CORE_PATH . 'cake' . DS . 'config' . DS . 'paths.php'; +require LIBS . 'object.php'; +require LIBS . 'inflector.php'; +require LIBS . 'configure.php'; +require LIBS . 'set.php'; +require LIBS . 'cache.php'; +Configure::getInstance(); +require CAKE . 'dispatcher.php'; diff --git a/code/ryzom/tools/server/www/webtt/cake/config/config.php b/code/ryzom/tools/server/www/webtt/cake/config/config.php new file mode 100644 index 000000000..8c4ab11b9 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/config.php @@ -0,0 +1,20 @@ + 181, 'status' => 'C', 'lower' => array(956)); +$config['0080_00ff'][] = array('upper' => 924, 'status' => 'C', 'lower' => array(181)); +$config['0080_00ff'][] = array('upper' => 192, 'status' => 'C', 'lower' => array(224)); /* LATIN CAPITAL LETTER A WITH GRAVE */ +$config['0080_00ff'][] = array('upper' => 193, 'status' => 'C', 'lower' => array(225)); /* LATIN CAPITAL LETTER A WITH ACUTE */ +$config['0080_00ff'][] = array('upper' => 194, 'status' => 'C', 'lower' => array(226)); /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */ +$config['0080_00ff'][] = array('upper' => 195, 'status' => 'C', 'lower' => array(227)); /* LATIN CAPITAL LETTER A WITH TILDE */ +$config['0080_00ff'][] = array('upper' => 196, 'status' => 'C', 'lower' => array(228)); /* LATIN CAPITAL LETTER A WITH DIAERESIS */ +$config['0080_00ff'][] = array('upper' => 197, 'status' => 'C', 'lower' => array(229)); /* LATIN CAPITAL LETTER A WITH RING ABOVE */ +$config['0080_00ff'][] = array('upper' => 198, 'status' => 'C', 'lower' => array(230)); /* LATIN CAPITAL LETTER AE */ +$config['0080_00ff'][] = array('upper' => 199, 'status' => 'C', 'lower' => array(231)); /* LATIN CAPITAL LETTER C WITH CEDILLA */ +$config['0080_00ff'][] = array('upper' => 200, 'status' => 'C', 'lower' => array(232)); /* LATIN CAPITAL LETTER E WITH GRAVE */ +$config['0080_00ff'][] = array('upper' => 201, 'status' => 'C', 'lower' => array(233)); /* LATIN CAPITAL LETTER E WITH ACUTE */ +$config['0080_00ff'][] = array('upper' => 202, 'status' => 'C', 'lower' => array(234)); /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */ +$config['0080_00ff'][] = array('upper' => 203, 'status' => 'C', 'lower' => array(235)); /* LATIN CAPITAL LETTER E WITH DIAERESIS */ +$config['0080_00ff'][] = array('upper' => 204, 'status' => 'C', 'lower' => array(236)); /* LATIN CAPITAL LETTER I WITH GRAVE */ +$config['0080_00ff'][] = array('upper' => 205, 'status' => 'C', 'lower' => array(237)); /* LATIN CAPITAL LETTER I WITH ACUTE */ +$config['0080_00ff'][] = array('upper' => 206, 'status' => 'C', 'lower' => array(238)); /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */ +$config['0080_00ff'][] = array('upper' => 207, 'status' => 'C', 'lower' => array(239)); /* LATIN CAPITAL LETTER I WITH DIAERESIS */ +$config['0080_00ff'][] = array('upper' => 208, 'status' => 'C', 'lower' => array(240)); /* LATIN CAPITAL LETTER ETH */ +$config['0080_00ff'][] = array('upper' => 209, 'status' => 'C', 'lower' => array(241)); /* LATIN CAPITAL LETTER N WITH TILDE */ +$config['0080_00ff'][] = array('upper' => 210, 'status' => 'C', 'lower' => array(242)); /* LATIN CAPITAL LETTER O WITH GRAVE */ +$config['0080_00ff'][] = array('upper' => 211, 'status' => 'C', 'lower' => array(243)); /* LATIN CAPITAL LETTER O WITH ACUTE */ +$config['0080_00ff'][] = array('upper' => 212, 'status' => 'C', 'lower' => array(244)); /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */ +$config['0080_00ff'][] = array('upper' => 213, 'status' => 'C', 'lower' => array(245)); /* LATIN CAPITAL LETTER O WITH TILDE */ +$config['0080_00ff'][] = array('upper' => 214, 'status' => 'C', 'lower' => array(246)); /* LATIN CAPITAL LETTER O WITH DIAERESIS */ +$config['0080_00ff'][] = array('upper' => 216, 'status' => 'C', 'lower' => array(248)); /* LATIN CAPITAL LETTER O WITH STROKE */ +$config['0080_00ff'][] = array('upper' => 217, 'status' => 'C', 'lower' => array(249)); /* LATIN CAPITAL LETTER U WITH GRAVE */ +$config['0080_00ff'][] = array('upper' => 218, 'status' => 'C', 'lower' => array(250)); /* LATIN CAPITAL LETTER U WITH ACUTE */ +$config['0080_00ff'][] = array('upper' => 219, 'status' => 'C', 'lower' => array(251)); /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */ +$config['0080_00ff'][] = array('upper' => 220, 'status' => 'C', 'lower' => array(252)); /* LATIN CAPITAL LETTER U WITH DIAERESIS */ +$config['0080_00ff'][] = array('upper' => 221, 'status' => 'C', 'lower' => array(253)); /* LATIN CAPITAL LETTER Y WITH ACUTE */ +$config['0080_00ff'][] = array('upper' => 222, 'status' => 'C', 'lower' => array(254)); /* LATIN CAPITAL LETTER THORN */ +$config['0080_00ff'][] = array('upper' => 223, 'status' => 'F', 'lower' => array(115, 115)); /* LATIN SMALL LETTER SHARP S */ diff --git a/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0100_017f.php b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0100_017f.php new file mode 100644 index 000000000..35a9f03da --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0100_017f.php @@ -0,0 +1,107 @@ + 256, 'status' => 'C', 'lower' => array(257)); /* LATIN CAPITAL LETTER A WITH MACRON */ +$config['0100_017f'][] = array('upper' => 258, 'status' => 'C', 'lower' => array(259)); /* LATIN CAPITAL LETTER A WITH BREVE */ +$config['0100_017f'][] = array('upper' => 260, 'status' => 'C', 'lower' => array(261)); /* LATIN CAPITAL LETTER A WITH OGONEK */ +$config['0100_017f'][] = array('upper' => 262, 'status' => 'C', 'lower' => array(263)); /* LATIN CAPITAL LETTER C WITH ACUTE */ +$config['0100_017f'][] = array('upper' => 264, 'status' => 'C', 'lower' => array(265)); /* LATIN CAPITAL LETTER C WITH CIRCUMFLEX */ +$config['0100_017f'][] = array('upper' => 266, 'status' => 'C', 'lower' => array(267)); /* LATIN CAPITAL LETTER C WITH DOT ABOVE */ +$config['0100_017f'][] = array('upper' => 268, 'status' => 'C', 'lower' => array(269)); /* LATIN CAPITAL LETTER C WITH CARON */ +$config['0100_017f'][] = array('upper' => 270, 'status' => 'C', 'lower' => array(271)); /* LATIN CAPITAL LETTER D WITH CARON */ +$config['0100_017f'][] = array('upper' => 272, 'status' => 'C', 'lower' => array(273)); /* LATIN CAPITAL LETTER D WITH STROKE */ +$config['0100_017f'][] = array('upper' => 274, 'status' => 'C', 'lower' => array(275)); /* LATIN CAPITAL LETTER E WITH MACRON */ +$config['0100_017f'][] = array('upper' => 276, 'status' => 'C', 'lower' => array(277)); /* LATIN CAPITAL LETTER E WITH BREVE */ +$config['0100_017f'][] = array('upper' => 278, 'status' => 'C', 'lower' => array(279)); /* LATIN CAPITAL LETTER E WITH DOT ABOVE */ +$config['0100_017f'][] = array('upper' => 280, 'status' => 'C', 'lower' => array(281)); /* LATIN CAPITAL LETTER E WITH OGONEK */ +$config['0100_017f'][] = array('upper' => 282, 'status' => 'C', 'lower' => array(283)); /* LATIN CAPITAL LETTER E WITH CARON */ +$config['0100_017f'][] = array('upper' => 284, 'status' => 'C', 'lower' => array(285)); /* LATIN CAPITAL LETTER G WITH CIRCUMFLEX */ +$config['0100_017f'][] = array('upper' => 286, 'status' => 'C', 'lower' => array(287)); /* LATIN CAPITAL LETTER G WITH BREVE */ +$config['0100_017f'][] = array('upper' => 288, 'status' => 'C', 'lower' => array(289)); /* LATIN CAPITAL LETTER G WITH DOT ABOVE */ +$config['0100_017f'][] = array('upper' => 290, 'status' => 'C', 'lower' => array(291)); /* LATIN CAPITAL LETTER G WITH CEDILLA */ +$config['0100_017f'][] = array('upper' => 292, 'status' => 'C', 'lower' => array(293)); /* LATIN CAPITAL LETTER H WITH CIRCUMFLEX */ +$config['0100_017f'][] = array('upper' => 294, 'status' => 'C', 'lower' => array(295)); /* LATIN CAPITAL LETTER H WITH STROKE */ +$config['0100_017f'][] = array('upper' => 296, 'status' => 'C', 'lower' => array(297)); /* LATIN CAPITAL LETTER I WITH TILDE */ +$config['0100_017f'][] = array('upper' => 298, 'status' => 'C', 'lower' => array(299)); /* LATIN CAPITAL LETTER I WITH MACRON */ +$config['0100_017f'][] = array('upper' => 300, 'status' => 'C', 'lower' => array(301)); /* LATIN CAPITAL LETTER I WITH BREVE */ +$config['0100_017f'][] = array('upper' => 302, 'status' => 'C', 'lower' => array(303)); /* LATIN CAPITAL LETTER I WITH OGONEK */ +$config['0100_017f'][] = array('upper' => 304, 'status' => 'F', 'lower' => array(105, 775)); /* LATIN CAPITAL LETTER I WITH DOT ABOVE */ +$config['0100_017f'][] = array('upper' => 304, 'status' => 'T', 'lower' => array(105)); /* LATIN CAPITAL LETTER I WITH DOT ABOVE */ +$config['0100_017f'][] = array('upper' => 306, 'status' => 'C', 'lower' => array(307)); /* LATIN CAPITAL LIGATURE IJ */ +$config['0100_017f'][] = array('upper' => 308, 'status' => 'C', 'lower' => array(309)); /* LATIN CAPITAL LETTER J WITH CIRCUMFLEX */ +$config['0100_017f'][] = array('upper' => 310, 'status' => 'C', 'lower' => array(311)); /* LATIN CAPITAL LETTER K WITH CEDILLA */ +$config['0100_017f'][] = array('upper' => 313, 'status' => 'C', 'lower' => array(314)); /* LATIN CAPITAL LETTER L WITH ACUTE */ +$config['0100_017f'][] = array('upper' => 315, 'status' => 'C', 'lower' => array(316)); /* LATIN CAPITAL LETTER L WITH CEDILLA */ +$config['0100_017f'][] = array('upper' => 317, 'status' => 'C', 'lower' => array(318)); /* LATIN CAPITAL LETTER L WITH CARON */ +$config['0100_017f'][] = array('upper' => 319, 'status' => 'C', 'lower' => array(320)); /* LATIN CAPITAL LETTER L WITH MIDDLE DOT */ +$config['0100_017f'][] = array('upper' => 321, 'status' => 'C', 'lower' => array(322)); /* LATIN CAPITAL LETTER L WITH STROKE */ +$config['0100_017f'][] = array('upper' => 323, 'status' => 'C', 'lower' => array(324)); /* LATIN CAPITAL LETTER N WITH ACUTE */ +$config['0100_017f'][] = array('upper' => 325, 'status' => 'C', 'lower' => array(326)); /* LATIN CAPITAL LETTER N WITH CEDILLA */ +$config['0100_017f'][] = array('upper' => 327, 'status' => 'C', 'lower' => array(328)); /* LATIN CAPITAL LETTER N WITH CARON */ +$config['0100_017f'][] = array('upper' => 329, 'status' => 'F', 'lower' => array(700, 110)); /* LATIN SMALL LETTER N PRECEDED BY APOSTROPHE */ +$config['0100_017f'][] = array('upper' => 330, 'status' => 'C', 'lower' => array(331)); /* LATIN CAPITAL LETTER ENG */ +$config['0100_017f'][] = array('upper' => 332, 'status' => 'C', 'lower' => array(333)); /* LATIN CAPITAL LETTER O WITH MACRON */ +$config['0100_017f'][] = array('upper' => 334, 'status' => 'C', 'lower' => array(335)); /* LATIN CAPITAL LETTER O WITH BREVE */ +$config['0100_017f'][] = array('upper' => 336, 'status' => 'C', 'lower' => array(337)); /* LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */ +$config['0100_017f'][] = array('upper' => 338, 'status' => 'C', 'lower' => array(339)); /* LATIN CAPITAL LIGATURE OE */ +$config['0100_017f'][] = array('upper' => 340, 'status' => 'C', 'lower' => array(341)); /* LATIN CAPITAL LETTER R WITH ACUTE */ +$config['0100_017f'][] = array('upper' => 342, 'status' => 'C', 'lower' => array(343)); /* LATIN CAPITAL LETTER R WITH CEDILLA */ +$config['0100_017f'][] = array('upper' => 344, 'status' => 'C', 'lower' => array(345)); /* LATIN CAPITAL LETTER R WITH CARON */ +$config['0100_017f'][] = array('upper' => 346, 'status' => 'C', 'lower' => array(347)); /* LATIN CAPITAL LETTER S WITH ACUTE */ +$config['0100_017f'][] = array('upper' => 348, 'status' => 'C', 'lower' => array(349)); /* LATIN CAPITAL LETTER S WITH CIRCUMFLEX */ +$config['0100_017f'][] = array('upper' => 350, 'status' => 'C', 'lower' => array(351)); /* LATIN CAPITAL LETTER S WITH CEDILLA */ +$config['0100_017f'][] = array('upper' => 352, 'status' => 'C', 'lower' => array(353)); /* LATIN CAPITAL LETTER S WITH CARON */ +$config['0100_017f'][] = array('upper' => 354, 'status' => 'C', 'lower' => array(355)); /* LATIN CAPITAL LETTER T WITH CEDILLA */ +$config['0100_017f'][] = array('upper' => 356, 'status' => 'C', 'lower' => array(357)); /* LATIN CAPITAL LETTER T WITH CARON */ +$config['0100_017f'][] = array('upper' => 358, 'status' => 'C', 'lower' => array(359)); /* LATIN CAPITAL LETTER T WITH STROKE */ +$config['0100_017f'][] = array('upper' => 360, 'status' => 'C', 'lower' => array(361)); /* LATIN CAPITAL LETTER U WITH TILDE */ +$config['0100_017f'][] = array('upper' => 362, 'status' => 'C', 'lower' => array(363)); /* LATIN CAPITAL LETTER U WITH MACRON */ +$config['0100_017f'][] = array('upper' => 364, 'status' => 'C', 'lower' => array(365)); /* LATIN CAPITAL LETTER U WITH BREVE */ +$config['0100_017f'][] = array('upper' => 366, 'status' => 'C', 'lower' => array(367)); /* LATIN CAPITAL LETTER U WITH RING ABOVE */ +$config['0100_017f'][] = array('upper' => 368, 'status' => 'C', 'lower' => array(369)); /* LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */ +$config['0100_017f'][] = array('upper' => 370, 'status' => 'C', 'lower' => array(371)); /* LATIN CAPITAL LETTER U WITH OGONEK */ +$config['0100_017f'][] = array('upper' => 372, 'status' => 'C', 'lower' => array(373)); /* LATIN CAPITAL LETTER W WITH CIRCUMFLEX */ +$config['0100_017f'][] = array('upper' => 374, 'status' => 'C', 'lower' => array(375)); /* LATIN CAPITAL LETTER Y WITH CIRCUMFLEX */ +$config['0100_017f'][] = array('upper' => 376, 'status' => 'C', 'lower' => array(255)); /* LATIN CAPITAL LETTER Y WITH DIAERESIS */ +$config['0100_017f'][] = array('upper' => 377, 'status' => 'C', 'lower' => array(378)); /* LATIN CAPITAL LETTER Z WITH ACUTE */ +$config['0100_017f'][] = array('upper' => 379, 'status' => 'C', 'lower' => array(380)); /* LATIN CAPITAL LETTER Z WITH DOT ABOVE */ +$config['0100_017f'][] = array('upper' => 381, 'status' => 'C', 'lower' => array(382)); /* LATIN CAPITAL LETTER Z WITH CARON */ +$config['0100_017f'][] = array('upper' => 383, 'status' => 'C', 'lower' => array(115)); /* LATIN SMALL LETTER LONG S */ diff --git a/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0180_024F.php b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0180_024F.php new file mode 100644 index 000000000..1148ccc94 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0180_024F.php @@ -0,0 +1,149 @@ + 385, 'status' => 'C', 'lower' => array(595)); /* LATIN CAPITAL LETTER B WITH HOOK */ +$config['0180_024F'][] = array('upper' => 386, 'status' => 'C', 'lower' => array(387)); /* LATIN CAPITAL LETTER B WITH TOPBAR */ +$config['0180_024F'][] = array('upper' => 388, 'status' => 'C', 'lower' => array(389)); /* LATIN CAPITAL LETTER TONE SIX */ +$config['0180_024F'][] = array('upper' => 390, 'status' => 'C', 'lower' => array(596)); /* LATIN CAPITAL LETTER OPEN O */ +$config['0180_024F'][] = array('upper' => 391, 'status' => 'C', 'lower' => array(392)); /* LATIN CAPITAL LETTER C WITH HOOK */ +$config['0180_024F'][] = array('upper' => 393, 'status' => 'C', 'lower' => array(598)); /* LATIN CAPITAL LETTER AFRICAN D */ +$config['0180_024F'][] = array('upper' => 394, 'status' => 'C', 'lower' => array(599)); /* LATIN CAPITAL LETTER D WITH HOOK */ +$config['0180_024F'][] = array('upper' => 395, 'status' => 'C', 'lower' => array(396)); /* LATIN CAPITAL LETTER D WITH TOPBAR */ +$config['0180_024F'][] = array('upper' => 398, 'status' => 'C', 'lower' => array(477)); /* LATIN CAPITAL LETTER REVERSED E */ +$config['0180_024F'][] = array('upper' => 399, 'status' => 'C', 'lower' => array(601)); /* LATIN CAPITAL LETTER SCHWA */ +$config['0180_024F'][] = array('upper' => 400, 'status' => 'C', 'lower' => array(603)); /* LATIN CAPITAL LETTER OPEN E */ +$config['0180_024F'][] = array('upper' => 401, 'status' => 'C', 'lower' => array(402)); /* LATIN CAPITAL LETTER F WITH HOOK */ +$config['0180_024F'][] = array('upper' => 403, 'status' => 'C', 'lower' => array(608)); /* LATIN CAPITAL LETTER G WITH HOOK */ +$config['0180_024F'][] = array('upper' => 404, 'status' => 'C', 'lower' => array(611)); /* LATIN CAPITAL LETTER GAMMA */ +$config['0180_024F'][] = array('upper' => 406, 'status' => 'C', 'lower' => array(617)); /* LATIN CAPITAL LETTER IOTA */ +$config['0180_024F'][] = array('upper' => 407, 'status' => 'C', 'lower' => array(616)); /* LATIN CAPITAL LETTER I WITH STROKE */ +$config['0180_024F'][] = array('upper' => 408, 'status' => 'C', 'lower' => array(409)); /* LATIN CAPITAL LETTER K WITH HOOK */ +$config['0180_024F'][] = array('upper' => 412, 'status' => 'C', 'lower' => array(623)); /* LATIN CAPITAL LETTER TURNED M */ +$config['0180_024F'][] = array('upper' => 413, 'status' => 'C', 'lower' => array(626)); /* LATIN CAPITAL LETTER N WITH LEFT HOOK */ +$config['0180_024F'][] = array('upper' => 415, 'status' => 'C', 'lower' => array(629)); /* LATIN CAPITAL LETTER O WITH MIDDLE TILDE */ +$config['0180_024F'][] = array('upper' => 416, 'status' => 'C', 'lower' => array(417)); /* LATIN CAPITAL LETTER O WITH HORN */ +$config['0180_024F'][] = array('upper' => 418, 'status' => 'C', 'lower' => array(419)); /* LATIN CAPITAL LETTER OI */ +$config['0180_024F'][] = array('upper' => 420, 'status' => 'C', 'lower' => array(421)); /* LATIN CAPITAL LETTER P WITH HOOK */ +$config['0180_024F'][] = array('upper' => 422, 'status' => 'C', 'lower' => array(640)); /* LATIN LETTER YR */ +$config['0180_024F'][] = array('upper' => 423, 'status' => 'C', 'lower' => array(424)); /* LATIN CAPITAL LETTER TONE TWO */ +$config['0180_024F'][] = array('upper' => 425, 'status' => 'C', 'lower' => array(643)); /* LATIN CAPITAL LETTER ESH */ +$config['0180_024F'][] = array('upper' => 428, 'status' => 'C', 'lower' => array(429)); /* LATIN CAPITAL LETTER T WITH HOOK */ +$config['0180_024F'][] = array('upper' => 430, 'status' => 'C', 'lower' => array(648)); /* LATIN CAPITAL LETTER T WITH RETROFLEX HOOK */ +$config['0180_024F'][] = array('upper' => 431, 'status' => 'C', 'lower' => array(432)); /* LATIN CAPITAL LETTER U WITH HORN */ +$config['0180_024F'][] = array('upper' => 433, 'status' => 'C', 'lower' => array(650)); /* LATIN CAPITAL LETTER UPSILON */ +$config['0180_024F'][] = array('upper' => 434, 'status' => 'C', 'lower' => array(651)); /* LATIN CAPITAL LETTER V WITH HOOK */ +$config['0180_024F'][] = array('upper' => 435, 'status' => 'C', 'lower' => array(436)); /* LATIN CAPITAL LETTER Y WITH HOOK */ +$config['0180_024F'][] = array('upper' => 437, 'status' => 'C', 'lower' => array(438)); /* LATIN CAPITAL LETTER Z WITH STROKE */ +$config['0180_024F'][] = array('upper' => 439, 'status' => 'C', 'lower' => array(658)); /* LATIN CAPITAL LETTER EZH */ +$config['0180_024F'][] = array('upper' => 440, 'status' => 'C', 'lower' => array(441)); /* LATIN CAPITAL LETTER EZH REVERSED */ +$config['0180_024F'][] = array('upper' => 444, 'status' => 'C', 'lower' => array(445)); /* LATIN CAPITAL LETTER TONE FIVE */ +$config['0180_024F'][] = array('upper' => 452, 'status' => 'C', 'lower' => array(454)); /* LATIN CAPITAL LETTER DZ WITH CARON */ +$config['0180_024F'][] = array('upper' => 453, 'status' => 'C', 'lower' => array(454)); /* LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON */ +$config['0180_024F'][] = array('upper' => 455, 'status' => 'C', 'lower' => array(457)); /* LATIN CAPITAL LETTER LJ */ +$config['0180_024F'][] = array('upper' => 456, 'status' => 'C', 'lower' => array(457)); /* LATIN CAPITAL LETTER L WITH SMALL LETTER J */ +$config['0180_024F'][] = array('upper' => 458, 'status' => 'C', 'lower' => array(460)); /* LATIN CAPITAL LETTER NJ */ +$config['0180_024F'][] = array('upper' => 459, 'status' => 'C', 'lower' => array(460)); /* LATIN CAPITAL LETTER N WITH SMALL LETTER J */ +$config['0180_024F'][] = array('upper' => 461, 'status' => 'C', 'lower' => array(462)); /* LATIN CAPITAL LETTER A WITH CARON */ +$config['0180_024F'][] = array('upper' => 463, 'status' => 'C', 'lower' => array(464)); /* LATIN CAPITAL LETTER I WITH CARON */ +$config['0180_024F'][] = array('upper' => 465, 'status' => 'C', 'lower' => array(466)); /* LATIN CAPITAL LETTER O WITH CARON */ +$config['0180_024F'][] = array('upper' => 467, 'status' => 'C', 'lower' => array(468)); /* LATIN CAPITAL LETTER U WITH CARON */ +$config['0180_024F'][] = array('upper' => 469, 'status' => 'C', 'lower' => array(470)); /* LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON */ +$config['0180_024F'][] = array('upper' => 471, 'status' => 'C', 'lower' => array(472)); /* LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE */ +$config['0180_024F'][] = array('upper' => 473, 'status' => 'C', 'lower' => array(474)); /* LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON */ +$config['0180_024F'][] = array('upper' => 475, 'status' => 'C', 'lower' => array(476)); /* LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE */ +$config['0180_024F'][] = array('upper' => 478, 'status' => 'C', 'lower' => array(479)); /* LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON */ +$config['0180_024F'][] = array('upper' => 480, 'status' => 'C', 'lower' => array(481)); /* LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON */ +$config['0180_024F'][] = array('upper' => 482, 'status' => 'C', 'lower' => array(483)); /* LATIN CAPITAL LETTER AE WITH MACRON */ +$config['0180_024F'][] = array('upper' => 484, 'status' => 'C', 'lower' => array(485)); /* LATIN CAPITAL LETTER G WITH STROKE */ +$config['0180_024F'][] = array('upper' => 486, 'status' => 'C', 'lower' => array(487)); /* LATIN CAPITAL LETTER G WITH CARON */ +$config['0180_024F'][] = array('upper' => 488, 'status' => 'C', 'lower' => array(489)); /* LATIN CAPITAL LETTER K WITH CARON */ +$config['0180_024F'][] = array('upper' => 490, 'status' => 'C', 'lower' => array(491)); /* LATIN CAPITAL LETTER O WITH OGONEK */ +$config['0180_024F'][] = array('upper' => 492, 'status' => 'C', 'lower' => array(493)); /* LATIN CAPITAL LETTER O WITH OGONEK AND MACRON */ +$config['0180_024F'][] = array('upper' => 494, 'status' => 'C', 'lower' => array(495)); /* LATIN CAPITAL LETTER EZH WITH CARON */ +$config['0180_024F'][] = array('upper' => 496, 'status' => 'F', 'lower' => array(106, 780)); /* LATIN SMALL LETTER J WITH CARON */ +$config['0180_024F'][] = array('upper' => 497, 'status' => 'C', 'lower' => array(499)); /* LATIN CAPITAL LETTER DZ */ +$config['0180_024F'][] = array('upper' => 498, 'status' => 'C', 'lower' => array(499)); /* LATIN CAPITAL LETTER D WITH SMALL LETTER Z */ +$config['0180_024F'][] = array('upper' => 500, 'status' => 'C', 'lower' => array(501)); /* LATIN CAPITAL LETTER G WITH ACUTE */ +$config['0180_024F'][] = array('upper' => 502, 'status' => 'C', 'lower' => array(405)); /* LATIN CAPITAL LETTER HWAIR */ +$config['0180_024F'][] = array('upper' => 503, 'status' => 'C', 'lower' => array(447)); /* LATIN CAPITAL LETTER WYNN */ +$config['0180_024F'][] = array('upper' => 504, 'status' => 'C', 'lower' => array(505)); /* LATIN CAPITAL LETTER N WITH GRAVE */ +$config['0180_024F'][] = array('upper' => 506, 'status' => 'C', 'lower' => array(507)); /* LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE */ +$config['0180_024F'][] = array('upper' => 508, 'status' => 'C', 'lower' => array(509)); /* LATIN CAPITAL LETTER AE WITH ACUTE */ +$config['0180_024F'][] = array('upper' => 510, 'status' => 'C', 'lower' => array(511)); /* LATIN CAPITAL LETTER O WITH STROKE AND ACUTE */ +$config['0180_024F'][] = array('upper' => 512, 'status' => 'C', 'lower' => array(513)); /* LATIN CAPITAL LETTER A WITH DOUBLE GRAVE */ +$config['0180_024F'][] = array('upper' => 514, 'status' => 'C', 'lower' => array(515)); /* LATIN CAPITAL LETTER A WITH INVERTED BREVE */ +$config['0180_024F'][] = array('upper' => 516, 'status' => 'C', 'lower' => array(517)); /* LATIN CAPITAL LETTER E WITH DOUBLE GRAVE */ +$config['0180_024F'][] = array('upper' => 518, 'status' => 'C', 'lower' => array(519)); /* LATIN CAPITAL LETTER E WITH INVERTED BREVE */ +$config['0180_024F'][] = array('upper' => 520, 'status' => 'C', 'lower' => array(521)); /* LATIN CAPITAL LETTER I WITH DOUBLE GRAVE */ +$config['0180_024F'][] = array('upper' => 522, 'status' => 'C', 'lower' => array(523)); /* LATIN CAPITAL LETTER I WITH INVERTED BREVE */ +$config['0180_024F'][] = array('upper' => 524, 'status' => 'C', 'lower' => array(525)); /* LATIN CAPITAL LETTER O WITH DOUBLE GRAVE */ +$config['0180_024F'][] = array('upper' => 526, 'status' => 'C', 'lower' => array(527)); /* LATIN CAPITAL LETTER O WITH INVERTED BREVE */ +$config['0180_024F'][] = array('upper' => 528, 'status' => 'C', 'lower' => array(529)); /* LATIN CAPITAL LETTER R WITH DOUBLE GRAVE */ +$config['0180_024F'][] = array('upper' => 530, 'status' => 'C', 'lower' => array(531)); /* LATIN CAPITAL LETTER R WITH INVERTED BREVE */ +$config['0180_024F'][] = array('upper' => 532, 'status' => 'C', 'lower' => array(533)); /* LATIN CAPITAL LETTER U WITH DOUBLE GRAVE */ +$config['0180_024F'][] = array('upper' => 534, 'status' => 'C', 'lower' => array(535)); /* LATIN CAPITAL LETTER U WITH INVERTED BREVE */ +$config['0180_024F'][] = array('upper' => 536, 'status' => 'C', 'lower' => array(537)); /* LATIN CAPITAL LETTER S WITH COMMA BELOW */ +$config['0180_024F'][] = array('upper' => 538, 'status' => 'C', 'lower' => array(539)); /* LATIN CAPITAL LETTER T WITH COMMA BELOW */ +$config['0180_024F'][] = array('upper' => 540, 'status' => 'C', 'lower' => array(541)); /* LATIN CAPITAL LETTER YOGH */ +$config['0180_024F'][] = array('upper' => 542, 'status' => 'C', 'lower' => array(543)); /* LATIN CAPITAL LETTER H WITH CARON */ +$config['0180_024F'][] = array('upper' => 544, 'status' => 'C', 'lower' => array(414)); /* LATIN CAPITAL LETTER N WITH LONG RIGHT LEG */ +$config['0180_024F'][] = array('upper' => 546, 'status' => 'C', 'lower' => array(547)); /* LATIN CAPITAL LETTER OU */ +$config['0180_024F'][] = array('upper' => 548, 'status' => 'C', 'lower' => array(549)); /* LATIN CAPITAL LETTER Z WITH HOOK */ +$config['0180_024F'][] = array('upper' => 550, 'status' => 'C', 'lower' => array(551)); /* LATIN CAPITAL LETTER A WITH DOT ABOVE */ +$config['0180_024F'][] = array('upper' => 552, 'status' => 'C', 'lower' => array(553)); /* LATIN CAPITAL LETTER E WITH CEDILLA */ +$config['0180_024F'][] = array('upper' => 554, 'status' => 'C', 'lower' => array(555)); /* LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON */ +$config['0180_024F'][] = array('upper' => 556, 'status' => 'C', 'lower' => array(557)); /* LATIN CAPITAL LETTER O WITH TILDE AND MACRON */ +$config['0180_024F'][] = array('upper' => 558, 'status' => 'C', 'lower' => array(559)); /* LATIN CAPITAL LETTER O WITH DOT ABOVE */ +$config['0180_024F'][] = array('upper' => 560, 'status' => 'C', 'lower' => array(561)); /* LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON */ +$config['0180_024F'][] = array('upper' => 562, 'status' => 'C', 'lower' => array(563)); /* LATIN CAPITAL LETTER Y WITH MACRON */ +$config['0180_024F'][] = array('upper' => 570, 'status' => 'C', 'lower' => array(11365)); /* LATIN CAPITAL LETTER A WITH STROKE */ +$config['0180_024F'][] = array('upper' => 571, 'status' => 'C', 'lower' => array(572)); /* LATIN CAPITAL LETTER C WITH STROKE */ +$config['0180_024F'][] = array('upper' => 573, 'status' => 'C', 'lower' => array(410)); /* LATIN CAPITAL LETTER L WITH BAR */ +$config['0180_024F'][] = array('upper' => 574, 'status' => 'C', 'lower' => array(11366)); /* LATIN CAPITAL LETTER T WITH DIAGONAL STROKE */ +$config['0180_024F'][] = array('upper' => 577, 'status' => 'C', 'lower' => array(578)); /* LATIN CAPITAL LETTER GLOTTAL STOP */ +$config['0180_024F'][] = array('upper' => 579, 'status' => 'C', 'lower' => array(384)); /* LATIN CAPITAL LETTER B WITH STROKE */ +$config['0180_024F'][] = array('upper' => 580, 'status' => 'C', 'lower' => array(649)); /* LATIN CAPITAL LETTER U BAR */ +$config['0180_024F'][] = array('upper' => 581, 'status' => 'C', 'lower' => array(652)); /* LATIN CAPITAL LETTER TURNED V */ +$config['0180_024F'][] = array('upper' => 582, 'status' => 'C', 'lower' => array(583)); /* LATIN CAPITAL LETTER E WITH STROKE */ +$config['0180_024F'][] = array('upper' => 584, 'status' => 'C', 'lower' => array(585)); /* LATIN CAPITAL LETTER J WITH STROKE */ +$config['0180_024F'][] = array('upper' => 586, 'status' => 'C', 'lower' => array(587)); /* LATIN CAPITAL LETTER SMALL Q WITH HOOK TAIL */ +$config['0180_024F'][] = array('upper' => 588, 'status' => 'C', 'lower' => array(589)); /* LATIN CAPITAL LETTER R WITH STROKE */ +$config['0180_024F'][] = array('upper' => 590, 'status' => 'C', 'lower' => array(591)); /* LATIN CAPITAL LETTER Y WITH STROKE */ diff --git a/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0250_02af.php b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0250_02af.php new file mode 100644 index 000000000..0472e297c --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0250_02af.php @@ -0,0 +1,42 @@ + 422, 'status' => 'C', 'lower' => array(640)); diff --git a/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0370_03ff.php b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0370_03ff.php new file mode 100644 index 000000000..90defe832 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0370_03ff.php @@ -0,0 +1,103 @@ + 902, 'status' => 'C', 'lower' => array(940)); /* GREEK CAPITAL LETTER ALPHA WITH TONOS */ +$config['0370_03ff'][] = array('upper' => 904, 'status' => 'C', 'lower' => array(941)); /* GREEK CAPITAL LETTER EPSILON WITH TONOS */ +$config['0370_03ff'][] = array('upper' => 905, 'status' => 'C', 'lower' => array(942)); /* GREEK CAPITAL LETTER ETA WITH TONOS */ +$config['0370_03ff'][] = array('upper' => 906, 'status' => 'C', 'lower' => array(943)); /* GREEK CAPITAL LETTER IOTA WITH TONOS */ +$config['0370_03ff'][] = array('upper' => 908, 'status' => 'C', 'lower' => array(972)); /* GREEK CAPITAL LETTER OMICRON WITH TONOS */ +$config['0370_03ff'][] = array('upper' => 910, 'status' => 'C', 'lower' => array(973)); /* GREEK CAPITAL LETTER UPSILON WITH TONOS */ +$config['0370_03ff'][] = array('upper' => 911, 'status' => 'C', 'lower' => array(974)); /* GREEK CAPITAL LETTER OMEGA WITH TONOS */ +//$config['0370_03ff'][] = array('upper' => 912, 'status' => 'F', 'lower' => array(953, 776, 769)); /* GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS */ +$config['0370_03ff'][] = array('upper' => 913, 'status' => 'C', 'lower' => array(945)); /* GREEK CAPITAL LETTER ALPHA */ +$config['0370_03ff'][] = array('upper' => 914, 'status' => 'C', 'lower' => array(946)); /* GREEK CAPITAL LETTER BETA */ +$config['0370_03ff'][] = array('upper' => 915, 'status' => 'C', 'lower' => array(947)); /* GREEK CAPITAL LETTER GAMMA */ +$config['0370_03ff'][] = array('upper' => 916, 'status' => 'C', 'lower' => array(948)); /* GREEK CAPITAL LETTER DELTA */ +$config['0370_03ff'][] = array('upper' => 917, 'status' => 'C', 'lower' => array(949)); /* GREEK CAPITAL LETTER EPSILON */ +$config['0370_03ff'][] = array('upper' => 918, 'status' => 'C', 'lower' => array(950)); /* GREEK CAPITAL LETTER ZETA */ +$config['0370_03ff'][] = array('upper' => 919, 'status' => 'C', 'lower' => array(951)); /* GREEK CAPITAL LETTER ETA */ +$config['0370_03ff'][] = array('upper' => 920, 'status' => 'C', 'lower' => array(952)); /* GREEK CAPITAL LETTER THETA */ +$config['0370_03ff'][] = array('upper' => 921, 'status' => 'C', 'lower' => array(953)); /* GREEK CAPITAL LETTER IOTA */ +$config['0370_03ff'][] = array('upper' => 922, 'status' => 'C', 'lower' => array(954)); /* GREEK CAPITAL LETTER KAPPA */ +$config['0370_03ff'][] = array('upper' => 923, 'status' => 'C', 'lower' => array(955)); /* GREEK CAPITAL LETTER LAMDA */ +$config['0370_03ff'][] = array('upper' => 924, 'status' => 'C', 'lower' => array(956)); /* GREEK CAPITAL LETTER MU */ +$config['0370_03ff'][] = array('upper' => 925, 'status' => 'C', 'lower' => array(957)); /* GREEK CAPITAL LETTER NU */ +$config['0370_03ff'][] = array('upper' => 926, 'status' => 'C', 'lower' => array(958)); /* GREEK CAPITAL LETTER XI */ +$config['0370_03ff'][] = array('upper' => 927, 'status' => 'C', 'lower' => array(959)); /* GREEK CAPITAL LETTER OMICRON */ +$config['0370_03ff'][] = array('upper' => 928, 'status' => 'C', 'lower' => array(960)); /* GREEK CAPITAL LETTER PI */ +$config['0370_03ff'][] = array('upper' => 929, 'status' => 'C', 'lower' => array(961)); /* GREEK CAPITAL LETTER RHO */ +$config['0370_03ff'][] = array('upper' => 931, 'status' => 'C', 'lower' => array(963)); /* GREEK CAPITAL LETTER SIGMA */ +$config['0370_03ff'][] = array('upper' => 932, 'status' => 'C', 'lower' => array(964)); /* GREEK CAPITAL LETTER TAU */ +$config['0370_03ff'][] = array('upper' => 933, 'status' => 'C', 'lower' => array(965)); /* GREEK CAPITAL LETTER UPSILON */ +$config['0370_03ff'][] = array('upper' => 934, 'status' => 'C', 'lower' => array(966)); /* GREEK CAPITAL LETTER PHI */ +$config['0370_03ff'][] = array('upper' => 935, 'status' => 'C', 'lower' => array(967)); /* GREEK CAPITAL LETTER CHI */ +$config['0370_03ff'][] = array('upper' => 936, 'status' => 'C', 'lower' => array(968)); /* GREEK CAPITAL LETTER PSI */ +$config['0370_03ff'][] = array('upper' => 937, 'status' => 'C', 'lower' => array(969)); /* GREEK CAPITAL LETTER OMEGA */ +$config['0370_03ff'][] = array('upper' => 938, 'status' => 'C', 'lower' => array(970)); /* GREEK CAPITAL LETTER IOTA WITH DIALYTIKA */ +$config['0370_03ff'][] = array('upper' => 939, 'status' => 'C', 'lower' => array(971)); /* GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA */ +$config['0370_03ff'][] = array('upper' => 944, 'status' => 'F', 'lower' => array(965, 776, 769)); /* GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */ +$config['0370_03ff'][] = array('upper' => 962, 'status' => 'C', 'lower' => array(963)); /* GREEK SMALL LETTER FINAL SIGMA */ +$config['0370_03ff'][] = array('upper' => 976, 'status' => 'C', 'lower' => array(946)); /* GREEK BETA SYMBOL */ +$config['0370_03ff'][] = array('upper' => 977, 'status' => 'C', 'lower' => array(952)); /* GREEK THETA SYMBOL */ +$config['0370_03ff'][] = array('upper' => 981, 'status' => 'C', 'lower' => array(966)); /* GREEK PHI SYMBOL */ +$config['0370_03ff'][] = array('upper' => 982, 'status' => 'C', 'lower' => array(960)); /* GREEK PI SYMBOL */ +$config['0370_03ff'][] = array('upper' => 984, 'status' => 'C', 'lower' => array(985)); /* GREEK LETTER ARCHAIC KOPPA */ +$config['0370_03ff'][] = array('upper' => 986, 'status' => 'C', 'lower' => array(987)); /* GREEK LETTER STIGMA */ +$config['0370_03ff'][] = array('upper' => 988, 'status' => 'C', 'lower' => array(989)); /* GREEK LETTER DIGAMMA */ +$config['0370_03ff'][] = array('upper' => 990, 'status' => 'C', 'lower' => array(991)); /* GREEK LETTER KOPPA */ +$config['0370_03ff'][] = array('upper' => 992, 'status' => 'C', 'lower' => array(993)); /* GREEK LETTER SAMPI */ +$config['0370_03ff'][] = array('upper' => 994, 'status' => 'C', 'lower' => array(995)); /* COPTIC CAPITAL LETTER SHEI */ +$config['0370_03ff'][] = array('upper' => 996, 'status' => 'C', 'lower' => array(997)); /* COPTIC CAPITAL LETTER FEI */ +$config['0370_03ff'][] = array('upper' => 998, 'status' => 'C', 'lower' => array(999)); /* COPTIC CAPITAL LETTER KHEI */ +$config['0370_03ff'][] = array('upper' => 1000, 'status' => 'C', 'lower' => array(1001)); /* COPTIC CAPITAL LETTER HORI */ +$config['0370_03ff'][] = array('upper' => 1002, 'status' => 'C', 'lower' => array(1003)); /* COPTIC CAPITAL LETTER GANGIA */ +$config['0370_03ff'][] = array('upper' => 1004, 'status' => 'C', 'lower' => array(1005)); /* COPTIC CAPITAL LETTER SHIMA */ +$config['0370_03ff'][] = array('upper' => 1006, 'status' => 'C', 'lower' => array(1007)); /* COPTIC CAPITAL LETTER DEI */ +$config['0370_03ff'][] = array('upper' => 1008, 'status' => 'C', 'lower' => array(954)); /* GREEK KAPPA SYMBOL */ +$config['0370_03ff'][] = array('upper' => 1009, 'status' => 'C', 'lower' => array(961)); /* GREEK RHO SYMBOL */ +$config['0370_03ff'][] = array('upper' => 1012, 'status' => 'C', 'lower' => array(952)); /* GREEK CAPITAL THETA SYMBOL */ +$config['0370_03ff'][] = array('upper' => 1013, 'status' => 'C', 'lower' => array(949)); /* GREEK LUNATE EPSILON SYMBOL */ +$config['0370_03ff'][] = array('upper' => 1015, 'status' => 'C', 'lower' => array(1016)); /* GREEK CAPITAL LETTER SHO */ +$config['0370_03ff'][] = array('upper' => 1017, 'status' => 'C', 'lower' => array(1010)); /* GREEK CAPITAL LUNATE SIGMA SYMBOL */ +$config['0370_03ff'][] = array('upper' => 1018, 'status' => 'C', 'lower' => array(1019)); /* GREEK CAPITAL LETTER SAN */ +$config['0370_03ff'][] = array('upper' => 1021, 'status' => 'C', 'lower' => array(891)); /* GREEK CAPITAL REVERSED LUNATE SIGMA SYMBOL */ +$config['0370_03ff'][] = array('upper' => 1022, 'status' => 'C', 'lower' => array(892)); /* GREEK CAPITAL DOTTED LUNATE SIGMA SYMBOL */ +$config['0370_03ff'][] = array('upper' => 1023, 'status' => 'C', 'lower' => array(893)); /* GREEK CAPITAL REVERSED DOTTED LUNATE SIGMA SYMBOL */ diff --git a/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0400_04ff.php b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0400_04ff.php new file mode 100644 index 000000000..9900171b2 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0400_04ff.php @@ -0,0 +1,165 @@ + 1024, 'status' => 'C', 'lower' => array(1104)); /* CYRILLIC CAPITAL LETTER IE WITH GRAVE */ +$config['0400_04ff'][] = array('upper' => 1025, 'status' => 'C', 'lower' => array(1105)); /* CYRILLIC CAPITAL LETTER IO */ +$config['0400_04ff'][] = array('upper' => 1026, 'status' => 'C', 'lower' => array(1106)); /* CYRILLIC CAPITAL LETTER DJE */ +$config['0400_04ff'][] = array('upper' => 1027, 'status' => 'C', 'lower' => array(1107)); /* CYRILLIC CAPITAL LETTER GJE */ +$config['0400_04ff'][] = array('upper' => 1028, 'status' => 'C', 'lower' => array(1108)); /* CYRILLIC CAPITAL LETTER UKRAINIAN IE */ +$config['0400_04ff'][] = array('upper' => 1029, 'status' => 'C', 'lower' => array(1109)); /* CYRILLIC CAPITAL LETTER DZE */ +$config['0400_04ff'][] = array('upper' => 1030, 'status' => 'C', 'lower' => array(1110)); /* CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */ +$config['0400_04ff'][] = array('upper' => 1031, 'status' => 'C', 'lower' => array(1111)); /* CYRILLIC CAPITAL LETTER YI */ +$config['0400_04ff'][] = array('upper' => 1032, 'status' => 'C', 'lower' => array(1112)); /* CYRILLIC CAPITAL LETTER JE */ +$config['0400_04ff'][] = array('upper' => 1033, 'status' => 'C', 'lower' => array(1113)); /* CYRILLIC CAPITAL LETTER LJE */ +$config['0400_04ff'][] = array('upper' => 1034, 'status' => 'C', 'lower' => array(1114)); /* CYRILLIC CAPITAL LETTER NJE */ +$config['0400_04ff'][] = array('upper' => 1035, 'status' => 'C', 'lower' => array(1115)); /* CYRILLIC CAPITAL LETTER TSHE */ +$config['0400_04ff'][] = array('upper' => 1036, 'status' => 'C', 'lower' => array(1116)); /* CYRILLIC CAPITAL LETTER KJE */ +$config['0400_04ff'][] = array('upper' => 1037, 'status' => 'C', 'lower' => array(1117)); /* CYRILLIC CAPITAL LETTER I WITH GRAVE */ +$config['0400_04ff'][] = array('upper' => 1038, 'status' => 'C', 'lower' => array(1118)); /* CYRILLIC CAPITAL LETTER SHORT U */ +$config['0400_04ff'][] = array('upper' => 1039, 'status' => 'C', 'lower' => array(1119)); /* CYRILLIC CAPITAL LETTER DZHE */ +$config['0400_04ff'][] = array('upper' => 1040, 'status' => 'C', 'lower' => array(1072)); /* CYRILLIC CAPITAL LETTER A */ +$config['0400_04ff'][] = array('upper' => 1041, 'status' => 'C', 'lower' => array(1073)); /* CYRILLIC CAPITAL LETTER BE */ +$config['0400_04ff'][] = array('upper' => 1042, 'status' => 'C', 'lower' => array(1074)); /* CYRILLIC CAPITAL LETTER VE */ +$config['0400_04ff'][] = array('upper' => 1043, 'status' => 'C', 'lower' => array(1075)); /* CYRILLIC CAPITAL LETTER GHE */ +$config['0400_04ff'][] = array('upper' => 1044, 'status' => 'C', 'lower' => array(1076)); /* CYRILLIC CAPITAL LETTER DE */ +$config['0400_04ff'][] = array('upper' => 1045, 'status' => 'C', 'lower' => array(1077)); /* CYRILLIC CAPITAL LETTER IE */ +$config['0400_04ff'][] = array('upper' => 1046, 'status' => 'C', 'lower' => array(1078)); /* CYRILLIC CAPITAL LETTER ZHE */ +$config['0400_04ff'][] = array('upper' => 1047, 'status' => 'C', 'lower' => array(1079)); /* CYRILLIC CAPITAL LETTER ZE */ +$config['0400_04ff'][] = array('upper' => 1048, 'status' => 'C', 'lower' => array(1080)); /* CYRILLIC CAPITAL LETTER I */ +$config['0400_04ff'][] = array('upper' => 1049, 'status' => 'C', 'lower' => array(1081)); /* CYRILLIC CAPITAL LETTER SHORT I */ +$config['0400_04ff'][] = array('upper' => 1050, 'status' => 'C', 'lower' => array(1082)); /* CYRILLIC CAPITAL LETTER KA */ +$config['0400_04ff'][] = array('upper' => 1051, 'status' => 'C', 'lower' => array(1083)); /* CYRILLIC CAPITAL LETTER EL */ +$config['0400_04ff'][] = array('upper' => 1052, 'status' => 'C', 'lower' => array(1084)); /* CYRILLIC CAPITAL LETTER EM */ +$config['0400_04ff'][] = array('upper' => 1053, 'status' => 'C', 'lower' => array(1085)); /* CYRILLIC CAPITAL LETTER EN */ +$config['0400_04ff'][] = array('upper' => 1054, 'status' => 'C', 'lower' => array(1086)); /* CYRILLIC CAPITAL LETTER O */ +$config['0400_04ff'][] = array('upper' => 1055, 'status' => 'C', 'lower' => array(1087)); /* CYRILLIC CAPITAL LETTER PE */ +$config['0400_04ff'][] = array('upper' => 1056, 'status' => 'C', 'lower' => array(1088)); /* CYRILLIC CAPITAL LETTER ER */ +$config['0400_04ff'][] = array('upper' => 1057, 'status' => 'C', 'lower' => array(1089)); /* CYRILLIC CAPITAL LETTER ES */ +$config['0400_04ff'][] = array('upper' => 1058, 'status' => 'C', 'lower' => array(1090)); /* CYRILLIC CAPITAL LETTER TE */ +$config['0400_04ff'][] = array('upper' => 1059, 'status' => 'C', 'lower' => array(1091)); /* CYRILLIC CAPITAL LETTER U */ +$config['0400_04ff'][] = array('upper' => 1060, 'status' => 'C', 'lower' => array(1092)); /* CYRILLIC CAPITAL LETTER EF */ +$config['0400_04ff'][] = array('upper' => 1061, 'status' => 'C', 'lower' => array(1093)); /* CYRILLIC CAPITAL LETTER HA */ +$config['0400_04ff'][] = array('upper' => 1062, 'status' => 'C', 'lower' => array(1094)); /* CYRILLIC CAPITAL LETTER TSE */ +$config['0400_04ff'][] = array('upper' => 1063, 'status' => 'C', 'lower' => array(1095)); /* CYRILLIC CAPITAL LETTER CHE */ +$config['0400_04ff'][] = array('upper' => 1064, 'status' => 'C', 'lower' => array(1096)); /* CYRILLIC CAPITAL LETTER SHA */ +$config['0400_04ff'][] = array('upper' => 1065, 'status' => 'C', 'lower' => array(1097)); /* CYRILLIC CAPITAL LETTER SHCHA */ +$config['0400_04ff'][] = array('upper' => 1066, 'status' => 'C', 'lower' => array(1098)); /* CYRILLIC CAPITAL LETTER HARD SIGN */ +$config['0400_04ff'][] = array('upper' => 1067, 'status' => 'C', 'lower' => array(1099)); /* CYRILLIC CAPITAL LETTER YERU */ +$config['0400_04ff'][] = array('upper' => 1068, 'status' => 'C', 'lower' => array(1100)); /* CYRILLIC CAPITAL LETTER SOFT SIGN */ +$config['0400_04ff'][] = array('upper' => 1069, 'status' => 'C', 'lower' => array(1101)); /* CYRILLIC CAPITAL LETTER E */ +$config['0400_04ff'][] = array('upper' => 1070, 'status' => 'C', 'lower' => array(1102)); /* CYRILLIC CAPITAL LETTER YU */ +$config['0400_04ff'][] = array('upper' => 1071, 'status' => 'C', 'lower' => array(1103)); /* CYRILLIC CAPITAL LETTER YA */ +$config['0400_04ff'][] = array('upper' => 1120, 'status' => 'C', 'lower' => array(1121)); /* CYRILLIC CAPITAL LETTER OMEGA */ +$config['0400_04ff'][] = array('upper' => 1122, 'status' => 'C', 'lower' => array(1123)); /* CYRILLIC CAPITAL LETTER YAT */ +$config['0400_04ff'][] = array('upper' => 1124, 'status' => 'C', 'lower' => array(1125)); /* CYRILLIC CAPITAL LETTER IOTIFIED E */ +$config['0400_04ff'][] = array('upper' => 1126, 'status' => 'C', 'lower' => array(1127)); /* CYRILLIC CAPITAL LETTER LITTLE YUS */ +$config['0400_04ff'][] = array('upper' => 1128, 'status' => 'C', 'lower' => array(1129)); /* CYRILLIC CAPITAL LETTER IOTIFIED LITTLE YUS */ +$config['0400_04ff'][] = array('upper' => 1130, 'status' => 'C', 'lower' => array(1131)); /* CYRILLIC CAPITAL LETTER BIG YUS */ +$config['0400_04ff'][] = array('upper' => 1132, 'status' => 'C', 'lower' => array(1133)); /* CYRILLIC CAPITAL LETTER IOTIFIED BIG YUS */ +$config['0400_04ff'][] = array('upper' => 1134, 'status' => 'C', 'lower' => array(1135)); /* CYRILLIC CAPITAL LETTER KSI */ +$config['0400_04ff'][] = array('upper' => 1136, 'status' => 'C', 'lower' => array(1137)); /* CYRILLIC CAPITAL LETTER PSI */ +$config['0400_04ff'][] = array('upper' => 1138, 'status' => 'C', 'lower' => array(1139)); /* CYRILLIC CAPITAL LETTER FITA */ +$config['0400_04ff'][] = array('upper' => 1140, 'status' => 'C', 'lower' => array(1141)); /* CYRILLIC CAPITAL LETTER IZHITSA */ +$config['0400_04ff'][] = array('upper' => 1142, 'status' => 'C', 'lower' => array(1143)); /* CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT */ +$config['0400_04ff'][] = array('upper' => 1144, 'status' => 'C', 'lower' => array(1145)); /* CYRILLIC CAPITAL LETTER UK */ +$config['0400_04ff'][] = array('upper' => 1146, 'status' => 'C', 'lower' => array(1147)); /* CYRILLIC CAPITAL LETTER ROUND OMEGA */ +$config['0400_04ff'][] = array('upper' => 1148, 'status' => 'C', 'lower' => array(1149)); /* CYRILLIC CAPITAL LETTER OMEGA WITH TITLO */ +$config['0400_04ff'][] = array('upper' => 1150, 'status' => 'C', 'lower' => array(1151)); /* CYRILLIC CAPITAL LETTER OT */ +$config['0400_04ff'][] = array('upper' => 1152, 'status' => 'C', 'lower' => array(1153)); /* CYRILLIC CAPITAL LETTER KOPPA */ +$config['0400_04ff'][] = array('upper' => 1162, 'status' => 'C', 'lower' => array(1163)); /* CYRILLIC CAPITAL LETTER SHORT I WITH TAIL */ +$config['0400_04ff'][] = array('upper' => 1164, 'status' => 'C', 'lower' => array(1165)); /* CYRILLIC CAPITAL LETTER SEMISOFT SIGN */ +$config['0400_04ff'][] = array('upper' => 1166, 'status' => 'C', 'lower' => array(1167)); /* CYRILLIC CAPITAL LETTER ER WITH TICK */ +$config['0400_04ff'][] = array('upper' => 1168, 'status' => 'C', 'lower' => array(1169)); /* CYRILLIC CAPITAL LETTER GHE WITH UPTURN */ +$config['0400_04ff'][] = array('upper' => 1170, 'status' => 'C', 'lower' => array(1171)); /* CYRILLIC CAPITAL LETTER GHE WITH STROKE */ +$config['0400_04ff'][] = array('upper' => 1172, 'status' => 'C', 'lower' => array(1173)); /* CYRILLIC CAPITAL LETTER GHE WITH MIDDLE HOOK */ +$config['0400_04ff'][] = array('upper' => 1174, 'status' => 'C', 'lower' => array(1175)); /* CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER */ +$config['0400_04ff'][] = array('upper' => 1176, 'status' => 'C', 'lower' => array(1177)); /* CYRILLIC CAPITAL LETTER ZE WITH DESCENDER */ +$config['0400_04ff'][] = array('upper' => 1178, 'status' => 'C', 'lower' => array(1179)); /* CYRILLIC CAPITAL LETTER KA WITH DESCENDER */ +$config['0400_04ff'][] = array('upper' => 1180, 'status' => 'C', 'lower' => array(1181)); /* CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE */ +$config['0400_04ff'][] = array('upper' => 1182, 'status' => 'C', 'lower' => array(1183)); /* CYRILLIC CAPITAL LETTER KA WITH STROKE */ +$config['0400_04ff'][] = array('upper' => 1184, 'status' => 'C', 'lower' => array(1185)); /* CYRILLIC CAPITAL LETTER BASHKIR KA */ +$config['0400_04ff'][] = array('upper' => 1186, 'status' => 'C', 'lower' => array(1187)); /* CYRILLIC CAPITAL LETTER EN WITH DESCENDER */ +$config['0400_04ff'][] = array('upper' => 1188, 'status' => 'C', 'lower' => array(1189)); /* CYRILLIC CAPITAL LIGATURE EN GHE */ +$config['0400_04ff'][] = array('upper' => 1190, 'status' => 'C', 'lower' => array(1191)); /* CYRILLIC CAPITAL LETTER PE WITH MIDDLE HOOK */ +$config['0400_04ff'][] = array('upper' => 1192, 'status' => 'C', 'lower' => array(1193)); /* CYRILLIC CAPITAL LETTER ABKHASIAN HA */ +$config['0400_04ff'][] = array('upper' => 1194, 'status' => 'C', 'lower' => array(1195)); /* CYRILLIC CAPITAL LETTER ES WITH DESCENDER */ +$config['0400_04ff'][] = array('upper' => 1196, 'status' => 'C', 'lower' => array(1197)); /* CYRILLIC CAPITAL LETTER TE WITH DESCENDER */ +$config['0400_04ff'][] = array('upper' => 1198, 'status' => 'C', 'lower' => array(1199)); /* CYRILLIC CAPITAL LETTER STRAIGHT U */ +$config['0400_04ff'][] = array('upper' => 1200, 'status' => 'C', 'lower' => array(1201)); /* CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE */ +$config['0400_04ff'][] = array('upper' => 1202, 'status' => 'C', 'lower' => array(1203)); /* CYRILLIC CAPITAL LETTER HA WITH DESCENDER */ +$config['0400_04ff'][] = array('upper' => 1204, 'status' => 'C', 'lower' => array(1205)); /* CYRILLIC CAPITAL LIGATURE TE TSE */ +$config['0400_04ff'][] = array('upper' => 1206, 'status' => 'C', 'lower' => array(1207)); /* CYRILLIC CAPITAL LETTER CHE WITH DESCENDER */ +$config['0400_04ff'][] = array('upper' => 1208, 'status' => 'C', 'lower' => array(1209)); /* CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE */ +$config['0400_04ff'][] = array('upper' => 1210, 'status' => 'C', 'lower' => array(1211)); /* CYRILLIC CAPITAL LETTER SHHA */ +$config['0400_04ff'][] = array('upper' => 1212, 'status' => 'C', 'lower' => array(1213)); /* CYRILLIC CAPITAL LETTER ABKHASIAN CHE */ +$config['0400_04ff'][] = array('upper' => 1214, 'status' => 'C', 'lower' => array(1215)); /* CYRILLIC CAPITAL LETTER ABKHASIAN CHE WITH DESCENDER */ +$config['0400_04ff'][] = array('upper' => 1216, 'status' => 'C', 'lower' => array(1231)); /* CYRILLIC LETTER PALOCHKA */ +$config['0400_04ff'][] = array('upper' => 1217, 'status' => 'C', 'lower' => array(1218)); /* CYRILLIC CAPITAL LETTER ZHE WITH BREVE */ +$config['0400_04ff'][] = array('upper' => 1219, 'status' => 'C', 'lower' => array(1220)); /* CYRILLIC CAPITAL LETTER KA WITH HOOK */ +$config['0400_04ff'][] = array('upper' => 1221, 'status' => 'C', 'lower' => array(1222)); /* CYRILLIC CAPITAL LETTER EL WITH TAIL */ +$config['0400_04ff'][] = array('upper' => 1223, 'status' => 'C', 'lower' => array(1224)); /* CYRILLIC CAPITAL LETTER EN WITH HOOK */ +$config['0400_04ff'][] = array('upper' => 1225, 'status' => 'C', 'lower' => array(1226)); /* CYRILLIC CAPITAL LETTER EN WITH TAIL */ +$config['0400_04ff'][] = array('upper' => 1227, 'status' => 'C', 'lower' => array(1228)); /* CYRILLIC CAPITAL LETTER KHAKASSIAN CHE */ +$config['0400_04ff'][] = array('upper' => 1229, 'status' => 'C', 'lower' => array(1230)); /* CYRILLIC CAPITAL LETTER EM WITH TAIL */ +$config['0400_04ff'][] = array('upper' => 1232, 'status' => 'C', 'lower' => array(1233)); /* CYRILLIC CAPITAL LETTER A WITH BREVE */ +$config['0400_04ff'][] = array('upper' => 1234, 'status' => 'C', 'lower' => array(1235)); /* CYRILLIC CAPITAL LETTER A WITH DIAERESIS */ +$config['0400_04ff'][] = array('upper' => 1236, 'status' => 'C', 'lower' => array(1237)); /* CYRILLIC CAPITAL LIGATURE A IE */ +$config['0400_04ff'][] = array('upper' => 1238, 'status' => 'C', 'lower' => array(1239)); /* CYRILLIC CAPITAL LETTER IE WITH BREVE */ +$config['0400_04ff'][] = array('upper' => 1240, 'status' => 'C', 'lower' => array(1241)); /* CYRILLIC CAPITAL LETTER SCHWA */ +$config['0400_04ff'][] = array('upper' => 1242, 'status' => 'C', 'lower' => array(1243)); /* CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS */ +$config['0400_04ff'][] = array('upper' => 1244, 'status' => 'C', 'lower' => array(1245)); /* CYRILLIC CAPITAL LETTER ZHE WITH DIAERESIS */ +$config['0400_04ff'][] = array('upper' => 1246, 'status' => 'C', 'lower' => array(1247)); /* CYRILLIC CAPITAL LETTER ZE WITH DIAERESIS */ +$config['0400_04ff'][] = array('upper' => 1248, 'status' => 'C', 'lower' => array(1249)); /* CYRILLIC CAPITAL LETTER ABKHASIAN DZE */ +$config['0400_04ff'][] = array('upper' => 1250, 'status' => 'C', 'lower' => array(1251)); /* CYRILLIC CAPITAL LETTER I WITH MACRON */ +$config['0400_04ff'][] = array('upper' => 1252, 'status' => 'C', 'lower' => array(1253)); /* CYRILLIC CAPITAL LETTER I WITH DIAERESIS */ +$config['0400_04ff'][] = array('upper' => 1254, 'status' => 'C', 'lower' => array(1255)); /* CYRILLIC CAPITAL LETTER O WITH DIAERESIS */ +$config['0400_04ff'][] = array('upper' => 1256, 'status' => 'C', 'lower' => array(1257)); /* CYRILLIC CAPITAL LETTER BARRED O */ +$config['0400_04ff'][] = array('upper' => 1258, 'status' => 'C', 'lower' => array(1259)); /* CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS */ +$config['0400_04ff'][] = array('upper' => 1260, 'status' => 'C', 'lower' => array(1261)); /* CYRILLIC CAPITAL LETTER E WITH DIAERESIS */ +$config['0400_04ff'][] = array('upper' => 1262, 'status' => 'C', 'lower' => array(1263)); /* CYRILLIC CAPITAL LETTER U WITH MACRON */ +$config['0400_04ff'][] = array('upper' => 1264, 'status' => 'C', 'lower' => array(1265)); /* CYRILLIC CAPITAL LETTER U WITH DIAERESIS */ +$config['0400_04ff'][] = array('upper' => 1266, 'status' => 'C', 'lower' => array(1267)); /* CYRILLIC CAPITAL LETTER U WITH DOUBLE ACUTE */ +$config['0400_04ff'][] = array('upper' => 1268, 'status' => 'C', 'lower' => array(1269)); /* CYRILLIC CAPITAL LETTER CHE WITH DIAERESIS */ +$config['0400_04ff'][] = array('upper' => 1270, 'status' => 'C', 'lower' => array(1271)); /* CYRILLIC CAPITAL LETTER GHE WITH DESCENDER */ +$config['0400_04ff'][] = array('upper' => 1272, 'status' => 'C', 'lower' => array(1273)); /* CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS */ +$config['0400_04ff'][] = array('upper' => 1274, 'status' => 'C', 'lower' => array(1275)); /* CYRILLIC CAPITAL LETTER GHE WITH STROKE AND HOOK */ +$config['0400_04ff'][] = array('upper' => 1276, 'status' => 'C', 'lower' => array(1277)); /* CYRILLIC CAPITAL LETTER HA WITH HOOK */ +$config['0400_04ff'][] = array('upper' => 1278, 'status' => 'C', 'lower' => array(1279)); /* CYRILLIC CAPITAL LETTER HA WITH STROKE */ diff --git a/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0500_052f.php b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0500_052f.php new file mode 100644 index 000000000..7e3c956d1 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0500_052f.php @@ -0,0 +1,49 @@ + 1280, 'status' => 'C', 'lower' => array(1281)); /* CYRILLIC CAPITAL LETTER KOMI DE */ +$config['0500_052f'][] = array('upper' => 1282, 'status' => 'C', 'lower' => array(1283)); /* CYRILLIC CAPITAL LETTER KOMI DJE */ +$config['0500_052f'][] = array('upper' => 1284, 'status' => 'C', 'lower' => array(1285)); /* CYRILLIC CAPITAL LETTER KOMI ZJE */ +$config['0500_052f'][] = array('upper' => 1286, 'status' => 'C', 'lower' => array(1287)); /* CYRILLIC CAPITAL LETTER KOMI DZJE */ +$config['0500_052f'][] = array('upper' => 1288, 'status' => 'C', 'lower' => array(1289)); /* CYRILLIC CAPITAL LETTER KOMI LJE */ +$config['0500_052f'][] = array('upper' => 1290, 'status' => 'C', 'lower' => array(1291)); /* CYRILLIC CAPITAL LETTER KOMI NJE */ +$config['0500_052f'][] = array('upper' => 1292, 'status' => 'C', 'lower' => array(1293)); /* CYRILLIC CAPITAL LETTER KOMI SJE */ +$config['0500_052f'][] = array('upper' => 1294, 'status' => 'C', 'lower' => array(1295)); /* CYRILLIC CAPITAL LETTER KOMI TJE */ diff --git a/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0530_058f.php b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0530_058f.php new file mode 100644 index 000000000..9bfd6dc8d --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/0530_058f.php @@ -0,0 +1,79 @@ + 1329, 'status' => 'C', 'lower' => array(1377)); /* ARMENIAN CAPITAL LETTER AYB */ +$config['0530_058f'][] = array('upper' => 1330, 'status' => 'C', 'lower' => array(1378)); /* ARMENIAN CAPITAL LETTER BEN */ +$config['0530_058f'][] = array('upper' => 1331, 'status' => 'C', 'lower' => array(1379)); /* ARMENIAN CAPITAL LETTER GIM */ +$config['0530_058f'][] = array('upper' => 1332, 'status' => 'C', 'lower' => array(1380)); /* ARMENIAN CAPITAL LETTER DA */ +$config['0530_058f'][] = array('upper' => 1333, 'status' => 'C', 'lower' => array(1381)); /* ARMENIAN CAPITAL LETTER ECH */ +$config['0530_058f'][] = array('upper' => 1334, 'status' => 'C', 'lower' => array(1382)); /* ARMENIAN CAPITAL LETTER ZA */ +$config['0530_058f'][] = array('upper' => 1335, 'status' => 'C', 'lower' => array(1383)); /* ARMENIAN CAPITAL LETTER EH */ +$config['0530_058f'][] = array('upper' => 1336, 'status' => 'C', 'lower' => array(1384)); /* ARMENIAN CAPITAL LETTER ET */ +$config['0530_058f'][] = array('upper' => 1337, 'status' => 'C', 'lower' => array(1385)); /* ARMENIAN CAPITAL LETTER TO */ +$config['0530_058f'][] = array('upper' => 1338, 'status' => 'C', 'lower' => array(1386)); /* ARMENIAN CAPITAL LETTER ZHE */ +$config['0530_058f'][] = array('upper' => 1339, 'status' => 'C', 'lower' => array(1387)); /* ARMENIAN CAPITAL LETTER INI */ +$config['0530_058f'][] = array('upper' => 1340, 'status' => 'C', 'lower' => array(1388)); /* ARMENIAN CAPITAL LETTER LIWN */ +$config['0530_058f'][] = array('upper' => 1341, 'status' => 'C', 'lower' => array(1389)); /* ARMENIAN CAPITAL LETTER XEH */ +$config['0530_058f'][] = array('upper' => 1342, 'status' => 'C', 'lower' => array(1390)); /* ARMENIAN CAPITAL LETTER CA */ +$config['0530_058f'][] = array('upper' => 1343, 'status' => 'C', 'lower' => array(1391)); /* ARMENIAN CAPITAL LETTER KEN */ +$config['0530_058f'][] = array('upper' => 1344, 'status' => 'C', 'lower' => array(1392)); /* ARMENIAN CAPITAL LETTER HO */ +$config['0530_058f'][] = array('upper' => 1345, 'status' => 'C', 'lower' => array(1393)); /* ARMENIAN CAPITAL LETTER JA */ +$config['0530_058f'][] = array('upper' => 1346, 'status' => 'C', 'lower' => array(1394)); /* ARMENIAN CAPITAL LETTER GHAD */ +$config['0530_058f'][] = array('upper' => 1347, 'status' => 'C', 'lower' => array(1395)); /* ARMENIAN CAPITAL LETTER CHEH */ +$config['0530_058f'][] = array('upper' => 1348, 'status' => 'C', 'lower' => array(1396)); /* ARMENIAN CAPITAL LETTER MEN */ +$config['0530_058f'][] = array('upper' => 1349, 'status' => 'C', 'lower' => array(1397)); /* ARMENIAN CAPITAL LETTER YI */ +$config['0530_058f'][] = array('upper' => 1350, 'status' => 'C', 'lower' => array(1398)); /* ARMENIAN CAPITAL LETTER NOW */ +$config['0530_058f'][] = array('upper' => 1351, 'status' => 'C', 'lower' => array(1399)); /* ARMENIAN CAPITAL LETTER SHA */ +$config['0530_058f'][] = array('upper' => 1352, 'status' => 'C', 'lower' => array(1400)); /* ARMENIAN CAPITAL LETTER VO */ +$config['0530_058f'][] = array('upper' => 1353, 'status' => 'C', 'lower' => array(1401)); /* ARMENIAN CAPITAL LETTER CHA */ +$config['0530_058f'][] = array('upper' => 1354, 'status' => 'C', 'lower' => array(1402)); /* ARMENIAN CAPITAL LETTER PEH */ +$config['0530_058f'][] = array('upper' => 1355, 'status' => 'C', 'lower' => array(1403)); /* ARMENIAN CAPITAL LETTER JHEH */ +$config['0530_058f'][] = array('upper' => 1356, 'status' => 'C', 'lower' => array(1404)); /* ARMENIAN CAPITAL LETTER RA */ +$config['0530_058f'][] = array('upper' => 1357, 'status' => 'C', 'lower' => array(1405)); /* ARMENIAN CAPITAL LETTER SEH */ +$config['0530_058f'][] = array('upper' => 1358, 'status' => 'C', 'lower' => array(1406)); /* ARMENIAN CAPITAL LETTER VEW */ +$config['0530_058f'][] = array('upper' => 1359, 'status' => 'C', 'lower' => array(1407)); /* ARMENIAN CAPITAL LETTER TIWN */ +$config['0530_058f'][] = array('upper' => 1360, 'status' => 'C', 'lower' => array(1408)); /* ARMENIAN CAPITAL LETTER REH */ +$config['0530_058f'][] = array('upper' => 1361, 'status' => 'C', 'lower' => array(1409)); /* ARMENIAN CAPITAL LETTER CO */ +$config['0530_058f'][] = array('upper' => 1362, 'status' => 'C', 'lower' => array(1410)); /* ARMENIAN CAPITAL LETTER YIWN */ +$config['0530_058f'][] = array('upper' => 1363, 'status' => 'C', 'lower' => array(1411)); /* ARMENIAN CAPITAL LETTER PIWR */ +$config['0530_058f'][] = array('upper' => 1364, 'status' => 'C', 'lower' => array(1412)); /* ARMENIAN CAPITAL LETTER KEH */ +$config['0530_058f'][] = array('upper' => 1365, 'status' => 'C', 'lower' => array(1413)); /* ARMENIAN CAPITAL LETTER OH */ +$config['0530_058f'][] = array('upper' => 1366, 'status' => 'C', 'lower' => array(1414)); /* ARMENIAN CAPITAL LETTER FEH */ diff --git a/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/1e00_1eff.php b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/1e00_1eff.php new file mode 100644 index 000000000..d4214dda1 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/1e00_1eff.php @@ -0,0 +1,169 @@ + 7680, 'status' => 'C', 'lower' => array(7681)); /* LATIN CAPITAL LETTER A WITH RING BELOW */ +$config['1e00_1eff'][] = array('upper' => 7682, 'status' => 'C', 'lower' => array(7683)); /* LATIN CAPITAL LETTER B WITH DOT ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7684, 'status' => 'C', 'lower' => array(7685)); /* LATIN CAPITAL LETTER B WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7686, 'status' => 'C', 'lower' => array(7687)); /* LATIN CAPITAL LETTER B WITH LINE BELOW */ +$config['1e00_1eff'][] = array('upper' => 7688, 'status' => 'C', 'lower' => array(7689)); /* LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE */ +$config['1e00_1eff'][] = array('upper' => 7690, 'status' => 'C', 'lower' => array(7691)); /* LATIN CAPITAL LETTER D WITH DOT ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7692, 'status' => 'C', 'lower' => array(7693)); /* LATIN CAPITAL LETTER D WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7694, 'status' => 'C', 'lower' => array(7695)); /* LATIN CAPITAL LETTER D WITH LINE BELOW */ +$config['1e00_1eff'][] = array('upper' => 7696, 'status' => 'C', 'lower' => array(7697)); /* LATIN CAPITAL LETTER D WITH CEDILLA */ +$config['1e00_1eff'][] = array('upper' => 7698, 'status' => 'C', 'lower' => array(7699)); /* LATIN CAPITAL LETTER D WITH CIRCUMFLEX BELOW */ +$config['1e00_1eff'][] = array('upper' => 7700, 'status' => 'C', 'lower' => array(7701)); /* LATIN CAPITAL LETTER E WITH MACRON AND GRAVE */ +$config['1e00_1eff'][] = array('upper' => 7702, 'status' => 'C', 'lower' => array(7703)); /* LATIN CAPITAL LETTER E WITH MACRON AND ACUTE */ +$config['1e00_1eff'][] = array('upper' => 7704, 'status' => 'C', 'lower' => array(7705)); /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX BELOW */ +$config['1e00_1eff'][] = array('upper' => 7706, 'status' => 'C', 'lower' => array(7707)); /* LATIN CAPITAL LETTER E WITH TILDE BELOW */ +$config['1e00_1eff'][] = array('upper' => 7708, 'status' => 'C', 'lower' => array(7709)); /* LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE */ +$config['1e00_1eff'][] = array('upper' => 7710, 'status' => 'C', 'lower' => array(7711)); /* LATIN CAPITAL LETTER F WITH DOT ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7712, 'status' => 'C', 'lower' => array(7713)); /* LATIN CAPITAL LETTER G WITH MACRON */ +$config['1e00_1eff'][] = array('upper' => 7714, 'status' => 'C', 'lower' => array(7715)); /* LATIN CAPITAL LETTER H WITH DOT ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7716, 'status' => 'C', 'lower' => array(7717)); /* LATIN CAPITAL LETTER H WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7718, 'status' => 'C', 'lower' => array(7719)); /* LATIN CAPITAL LETTER H WITH DIAERESIS */ +$config['1e00_1eff'][] = array('upper' => 7720, 'status' => 'C', 'lower' => array(7721)); /* LATIN CAPITAL LETTER H WITH CEDILLA */ +$config['1e00_1eff'][] = array('upper' => 7722, 'status' => 'C', 'lower' => array(7723)); /* LATIN CAPITAL LETTER H WITH BREVE BELOW */ +$config['1e00_1eff'][] = array('upper' => 7724, 'status' => 'C', 'lower' => array(7725)); /* LATIN CAPITAL LETTER I WITH TILDE BELOW */ +$config['1e00_1eff'][] = array('upper' => 7726, 'status' => 'C', 'lower' => array(7727)); /* LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE */ +$config['1e00_1eff'][] = array('upper' => 7728, 'status' => 'C', 'lower' => array(7729)); /* LATIN CAPITAL LETTER K WITH ACUTE */ +$config['1e00_1eff'][] = array('upper' => 7730, 'status' => 'C', 'lower' => array(7731)); /* LATIN CAPITAL LETTER K WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7732, 'status' => 'C', 'lower' => array(7733)); /* LATIN CAPITAL LETTER K WITH LINE BELOW */ +$config['1e00_1eff'][] = array('upper' => 7734, 'status' => 'C', 'lower' => array(7735)); /* LATIN CAPITAL LETTER L WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7736, 'status' => 'C', 'lower' => array(7737)); /* LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON */ +$config['1e00_1eff'][] = array('upper' => 7738, 'status' => 'C', 'lower' => array(7739)); /* LATIN CAPITAL LETTER L WITH LINE BELOW */ +$config['1e00_1eff'][] = array('upper' => 7740, 'status' => 'C', 'lower' => array(7741)); /* LATIN CAPITAL LETTER L WITH CIRCUMFLEX BELOW */ +$config['1e00_1eff'][] = array('upper' => 7742, 'status' => 'C', 'lower' => array(7743)); /* LATIN CAPITAL LETTER M WITH ACUTE */ +$config['1e00_1eff'][] = array('upper' => 7744, 'status' => 'C', 'lower' => array(7745)); /* LATIN CAPITAL LETTER M WITH DOT ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7746, 'status' => 'C', 'lower' => array(7747)); /* LATIN CAPITAL LETTER M WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7748, 'status' => 'C', 'lower' => array(7749)); /* LATIN CAPITAL LETTER N WITH DOT ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7750, 'status' => 'C', 'lower' => array(7751)); /* LATIN CAPITAL LETTER N WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7752, 'status' => 'C', 'lower' => array(7753)); /* LATIN CAPITAL LETTER N WITH LINE BELOW */ +$config['1e00_1eff'][] = array('upper' => 7754, 'status' => 'C', 'lower' => array(7755)); /* LATIN CAPITAL LETTER N WITH CIRCUMFLEX BELOW */ +$config['1e00_1eff'][] = array('upper' => 7756, 'status' => 'C', 'lower' => array(7757)); /* LATIN CAPITAL LETTER O WITH TILDE AND ACUTE */ +$config['1e00_1eff'][] = array('upper' => 7758, 'status' => 'C', 'lower' => array(7759)); /* LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS */ +$config['1e00_1eff'][] = array('upper' => 7760, 'status' => 'C', 'lower' => array(7761)); /* LATIN CAPITAL LETTER O WITH MACRON AND GRAVE */ +$config['1e00_1eff'][] = array('upper' => 7762, 'status' => 'C', 'lower' => array(7763)); /* LATIN CAPITAL LETTER O WITH MACRON AND ACUTE */ +$config['1e00_1eff'][] = array('upper' => 7764, 'status' => 'C', 'lower' => array(7765)); /* LATIN CAPITAL LETTER P WITH ACUTE */ +$config['1e00_1eff'][] = array('upper' => 7766, 'status' => 'C', 'lower' => array(7767)); /* LATIN CAPITAL LETTER P WITH DOT ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7768, 'status' => 'C', 'lower' => array(7769)); /* LATIN CAPITAL LETTER R WITH DOT ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7770, 'status' => 'C', 'lower' => array(7771)); /* LATIN CAPITAL LETTER R WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7772, 'status' => 'C', 'lower' => array(7773)); /* LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON */ +$config['1e00_1eff'][] = array('upper' => 7774, 'status' => 'C', 'lower' => array(7775)); /* LATIN CAPITAL LETTER R WITH LINE BELOW */ +$config['1e00_1eff'][] = array('upper' => 7776, 'status' => 'C', 'lower' => array(7777)); /* LATIN CAPITAL LETTER S WITH DOT ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7778, 'status' => 'C', 'lower' => array(7779)); /* LATIN CAPITAL LETTER S WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7780, 'status' => 'C', 'lower' => array(7781)); /* LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7782, 'status' => 'C', 'lower' => array(7783)); /* LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7784, 'status' => 'C', 'lower' => array(7785)); /* LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7786, 'status' => 'C', 'lower' => array(7787)); /* LATIN CAPITAL LETTER T WITH DOT ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7788, 'status' => 'C', 'lower' => array(7789)); /* LATIN CAPITAL LETTER T WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7790, 'status' => 'C', 'lower' => array(7791)); /* LATIN CAPITAL LETTER T WITH LINE BELOW */ +$config['1e00_1eff'][] = array('upper' => 7792, 'status' => 'C', 'lower' => array(7793)); /* LATIN CAPITAL LETTER T WITH CIRCUMFLEX BELOW */ +$config['1e00_1eff'][] = array('upper' => 7794, 'status' => 'C', 'lower' => array(7795)); /* LATIN CAPITAL LETTER U WITH DIAERESIS BELOW */ +$config['1e00_1eff'][] = array('upper' => 7796, 'status' => 'C', 'lower' => array(7797)); /* LATIN CAPITAL LETTER U WITH TILDE BELOW */ +$config['1e00_1eff'][] = array('upper' => 7798, 'status' => 'C', 'lower' => array(7799)); /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX BELOW */ +$config['1e00_1eff'][] = array('upper' => 7800, 'status' => 'C', 'lower' => array(7801)); /* LATIN CAPITAL LETTER U WITH TILDE AND ACUTE */ +$config['1e00_1eff'][] = array('upper' => 7802, 'status' => 'C', 'lower' => array(7803)); /* LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS */ +$config['1e00_1eff'][] = array('upper' => 7804, 'status' => 'C', 'lower' => array(7805)); /* LATIN CAPITAL LETTER V WITH TILDE */ +$config['1e00_1eff'][] = array('upper' => 7806, 'status' => 'C', 'lower' => array(7807)); /* LATIN CAPITAL LETTER V WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7808, 'status' => 'C', 'lower' => array(7809)); /* LATIN CAPITAL LETTER W WITH GRAVE */ +$config['1e00_1eff'][] = array('upper' => 7810, 'status' => 'C', 'lower' => array(7811)); /* LATIN CAPITAL LETTER W WITH ACUTE */ +$config['1e00_1eff'][] = array('upper' => 7812, 'status' => 'C', 'lower' => array(7813)); /* LATIN CAPITAL LETTER W WITH DIAERESIS */ +$config['1e00_1eff'][] = array('upper' => 7814, 'status' => 'C', 'lower' => array(7815)); /* LATIN CAPITAL LETTER W WITH DOT ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7816, 'status' => 'C', 'lower' => array(7817)); /* LATIN CAPITAL LETTER W WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7818, 'status' => 'C', 'lower' => array(7819)); /* LATIN CAPITAL LETTER X WITH DOT ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7820, 'status' => 'C', 'lower' => array(7821)); /* LATIN CAPITAL LETTER X WITH DIAERESIS */ +$config['1e00_1eff'][] = array('upper' => 7822, 'status' => 'C', 'lower' => array(7823)); /* LATIN CAPITAL LETTER Y WITH DOT ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7824, 'status' => 'C', 'lower' => array(7825)); /* LATIN CAPITAL LETTER Z WITH CIRCUMFLEX */ +$config['1e00_1eff'][] = array('upper' => 7826, 'status' => 'C', 'lower' => array(7827)); /* LATIN CAPITAL LETTER Z WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7828, 'status' => 'C', 'lower' => array(7829)); /* LATIN CAPITAL LETTER Z WITH LINE BELOW */ + +//$config['1e00_1eff'][] = array('upper' => 7830, 'status' => 'F', 'lower' => array(104, 817)); /* LATIN SMALL LETTER H WITH LINE BELOW */ +//$config['1e00_1eff'][] = array('upper' => 7831, 'status' => 'F', 'lower' => array(116, 776)); /* LATIN SMALL LETTER T WITH DIAERESIS */ +//$config['1e00_1eff'][] = array('upper' => 7832, 'status' => 'F', 'lower' => array(119, 778)); /* LATIN SMALL LETTER W WITH RING ABOVE */ +//$config['1e00_1eff'][] = array('upper' => 7833, 'status' => 'F', 'lower' => array(121, 778)); /* LATIN SMALL LETTER Y WITH RING ABOVE */ +//$config['1e00_1eff'][] = array('upper' => 7834, 'status' => 'F', 'lower' => array(97, 702)); /* LATIN SMALL LETTER A WITH RIGHT HALF RING */ +//$config['1e00_1eff'][] = array('upper' => 7835, 'status' => 'C', 'lower' => array(7777)); /* LATIN SMALL LETTER LONG S WITH DOT ABOVE */ + +$config['1e00_1eff'][] = array('upper' => 7840, 'status' => 'C', 'lower' => array(7841)); /* LATIN CAPITAL LETTER A WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7842, 'status' => 'C', 'lower' => array(7843)); /* LATIN CAPITAL LETTER A WITH HOOK ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7844, 'status' => 'C', 'lower' => array(7845)); /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE */ +$config['1e00_1eff'][] = array('upper' => 7846, 'status' => 'C', 'lower' => array(7847)); /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE */ +$config['1e00_1eff'][] = array('upper' => 7848, 'status' => 'C', 'lower' => array(7849)); /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7850, 'status' => 'C', 'lower' => array(7851)); /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE */ +$config['1e00_1eff'][] = array('upper' => 7852, 'status' => 'C', 'lower' => array(7853)); /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7854, 'status' => 'C', 'lower' => array(7855)); /* LATIN CAPITAL LETTER A WITH BREVE AND ACUTE */ +$config['1e00_1eff'][] = array('upper' => 7856, 'status' => 'C', 'lower' => array(7857)); /* LATIN CAPITAL LETTER A WITH BREVE AND GRAVE */ +$config['1e00_1eff'][] = array('upper' => 7858, 'status' => 'C', 'lower' => array(7859)); /* LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7860, 'status' => 'C', 'lower' => array(7861)); /* LATIN CAPITAL LETTER A WITH BREVE AND TILDE */ +$config['1e00_1eff'][] = array('upper' => 7862, 'status' => 'C', 'lower' => array(7863)); /* LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7864, 'status' => 'C', 'lower' => array(7865)); /* LATIN CAPITAL LETTER E WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7866, 'status' => 'C', 'lower' => array(7867)); /* LATIN CAPITAL LETTER E WITH HOOK ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7868, 'status' => 'C', 'lower' => array(7869)); /* LATIN CAPITAL LETTER E WITH TILDE */ +$config['1e00_1eff'][] = array('upper' => 7870, 'status' => 'C', 'lower' => array(7871)); /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE */ +$config['1e00_1eff'][] = array('upper' => 7872, 'status' => 'C', 'lower' => array(7873)); /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE */ +$config['1e00_1eff'][] = array('upper' => 7874, 'status' => 'C', 'lower' => array(7875)); /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7876, 'status' => 'C', 'lower' => array(7877)); /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE */ +$config['1e00_1eff'][] = array('upper' => 7878, 'status' => 'C', 'lower' => array(7879)); /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7880, 'status' => 'C', 'lower' => array(7881)); /* LATIN CAPITAL LETTER I WITH HOOK ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7882, 'status' => 'C', 'lower' => array(7883)); /* LATIN CAPITAL LETTER I WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7884, 'status' => 'C', 'lower' => array(7885)); /* LATIN CAPITAL LETTER O WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7886, 'status' => 'C', 'lower' => array(7887)); /* LATIN CAPITAL LETTER O WITH HOOK ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7888, 'status' => 'C', 'lower' => array(7889)); /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE */ +$config['1e00_1eff'][] = array('upper' => 7890, 'status' => 'C', 'lower' => array(7891)); /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE */ +$config['1e00_1eff'][] = array('upper' => 7892, 'status' => 'C', 'lower' => array(7893)); /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7894, 'status' => 'C', 'lower' => array(7895)); /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE */ +$config['1e00_1eff'][] = array('upper' => 7896, 'status' => 'C', 'lower' => array(7897)); /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7898, 'status' => 'C', 'lower' => array(7899)); /* LATIN CAPITAL LETTER O WITH HORN AND ACUTE */ +$config['1e00_1eff'][] = array('upper' => 7900, 'status' => 'C', 'lower' => array(7901)); /* LATIN CAPITAL LETTER O WITH HORN AND GRAVE */ +$config['1e00_1eff'][] = array('upper' => 7902, 'status' => 'C', 'lower' => array(7903)); /* LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7904, 'status' => 'C', 'lower' => array(7905)); /* LATIN CAPITAL LETTER O WITH HORN AND TILDE */ +$config['1e00_1eff'][] = array('upper' => 7906, 'status' => 'C', 'lower' => array(7907)); /* LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7908, 'status' => 'C', 'lower' => array(7909)); /* LATIN CAPITAL LETTER U WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7910, 'status' => 'C', 'lower' => array(7911)); /* LATIN CAPITAL LETTER U WITH HOOK ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7912, 'status' => 'C', 'lower' => array(7913)); /* LATIN CAPITAL LETTER U WITH HORN AND ACUTE */ +$config['1e00_1eff'][] = array('upper' => 7914, 'status' => 'C', 'lower' => array(7915)); /* LATIN CAPITAL LETTER U WITH HORN AND GRAVE */ +$config['1e00_1eff'][] = array('upper' => 7916, 'status' => 'C', 'lower' => array(7917)); /* LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7918, 'status' => 'C', 'lower' => array(7919)); /* LATIN CAPITAL LETTER U WITH HORN AND TILDE */ +$config['1e00_1eff'][] = array('upper' => 7920, 'status' => 'C', 'lower' => array(7921)); /* LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7922, 'status' => 'C', 'lower' => array(7923)); /* LATIN CAPITAL LETTER Y WITH GRAVE */ +$config['1e00_1eff'][] = array('upper' => 7924, 'status' => 'C', 'lower' => array(7925)); /* LATIN CAPITAL LETTER Y WITH DOT BELOW */ +$config['1e00_1eff'][] = array('upper' => 7926, 'status' => 'C', 'lower' => array(7927)); /* LATIN CAPITAL LETTER Y WITH HOOK ABOVE */ +$config['1e00_1eff'][] = array('upper' => 7928, 'status' => 'C', 'lower' => array(7929)); /* LATIN CAPITAL LETTER Y WITH TILDE */ diff --git a/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/1f00_1fff.php b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/1f00_1fff.php new file mode 100644 index 000000000..b8b25cf0e --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/1f00_1fff.php @@ -0,0 +1,217 @@ + 7944, 'status' => 'C', 'lower' => array(7936, 953)); /* GREEK CAPITAL LETTER ALPHA WITH PSILI */ +$config['1f00_1fff'][] = array('upper' => 7945, 'status' => 'C', 'lower' => array(7937)); /* GREEK CAPITAL LETTER ALPHA WITH DASIA */ +$config['1f00_1fff'][] = array('upper' => 7946, 'status' => 'C', 'lower' => array(7938)); /* GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA */ +$config['1f00_1fff'][] = array('upper' => 7947, 'status' => 'C', 'lower' => array(7939)); /* GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA */ +$config['1f00_1fff'][] = array('upper' => 7948, 'status' => 'C', 'lower' => array(7940)); /* GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA */ +$config['1f00_1fff'][] = array('upper' => 7949, 'status' => 'C', 'lower' => array(7941)); /* GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA */ +$config['1f00_1fff'][] = array('upper' => 7950, 'status' => 'C', 'lower' => array(7942)); /* GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 7951, 'status' => 'C', 'lower' => array(7943)); /* GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 7960, 'status' => 'C', 'lower' => array(7952)); /* GREEK CAPITAL LETTER EPSILON WITH PSILI */ +$config['1f00_1fff'][] = array('upper' => 7961, 'status' => 'C', 'lower' => array(7953)); /* GREEK CAPITAL LETTER EPSILON WITH DASIA */ +$config['1f00_1fff'][] = array('upper' => 7962, 'status' => 'C', 'lower' => array(7954)); /* GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA */ +$config['1f00_1fff'][] = array('upper' => 7963, 'status' => 'C', 'lower' => array(7955)); /* GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA */ +$config['1f00_1fff'][] = array('upper' => 7964, 'status' => 'C', 'lower' => array(7956)); /* GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA */ +$config['1f00_1fff'][] = array('upper' => 7965, 'status' => 'C', 'lower' => array(7957)); /* GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA */ +$config['1f00_1fff'][] = array('upper' => 7976, 'status' => 'C', 'lower' => array(7968)); /* GREEK CAPITAL LETTER ETA WITH PSILI */ +$config['1f00_1fff'][] = array('upper' => 7977, 'status' => 'C', 'lower' => array(7969)); /* GREEK CAPITAL LETTER ETA WITH DASIA */ +$config['1f00_1fff'][] = array('upper' => 7978, 'status' => 'C', 'lower' => array(7970)); /* GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA */ +$config['1f00_1fff'][] = array('upper' => 7979, 'status' => 'C', 'lower' => array(7971)); /* GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA */ +$config['1f00_1fff'][] = array('upper' => 7980, 'status' => 'C', 'lower' => array(7972)); /* GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA */ +$config['1f00_1fff'][] = array('upper' => 7981, 'status' => 'C', 'lower' => array(7973)); /* GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA */ +$config['1f00_1fff'][] = array('upper' => 7982, 'status' => 'C', 'lower' => array(7974)); /* GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 7983, 'status' => 'C', 'lower' => array(7975)); /* GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 7992, 'status' => 'C', 'lower' => array(7984)); /* GREEK CAPITAL LETTER IOTA WITH PSILI */ +$config['1f00_1fff'][] = array('upper' => 7993, 'status' => 'C', 'lower' => array(7985)); /* GREEK CAPITAL LETTER IOTA WITH DASIA */ +$config['1f00_1fff'][] = array('upper' => 7994, 'status' => 'C', 'lower' => array(7986)); /* GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA */ +$config['1f00_1fff'][] = array('upper' => 7995, 'status' => 'C', 'lower' => array(7987)); /* GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA */ +$config['1f00_1fff'][] = array('upper' => 7996, 'status' => 'C', 'lower' => array(7988)); /* GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA */ +$config['1f00_1fff'][] = array('upper' => 7997, 'status' => 'C', 'lower' => array(7989)); /* GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA */ +$config['1f00_1fff'][] = array('upper' => 7998, 'status' => 'C', 'lower' => array(7990)); /* GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 7999, 'status' => 'C', 'lower' => array(7991)); /* GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 8008, 'status' => 'C', 'lower' => array(8000)); /* GREEK CAPITAL LETTER OMICRON WITH PSILI */ +$config['1f00_1fff'][] = array('upper' => 8009, 'status' => 'C', 'lower' => array(8001)); /* GREEK CAPITAL LETTER OMICRON WITH DASIA */ +$config['1f00_1fff'][] = array('upper' => 8010, 'status' => 'C', 'lower' => array(8002)); /* GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA */ +$config['1f00_1fff'][] = array('upper' => 8011, 'status' => 'C', 'lower' => array(8003)); /* GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA */ +$config['1f00_1fff'][] = array('upper' => 8012, 'status' => 'C', 'lower' => array(8004)); /* GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA */ +$config['1f00_1fff'][] = array('upper' => 8013, 'status' => 'C', 'lower' => array(8005)); /* GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA */ +$config['1f00_1fff'][] = array('upper' => 8016, 'status' => 'F', 'lower' => array(965, 787)); /* GREEK SMALL LETTER UPSILON WITH PSILI */ +$config['1f00_1fff'][] = array('upper' => 8018, 'status' => 'F', 'lower' => array(965, 787, 768)); /* GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA */ +$config['1f00_1fff'][] = array('upper' => 8020, 'status' => 'F', 'lower' => array(965, 787, 769)); /* GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA */ +$config['1f00_1fff'][] = array('upper' => 8022, 'status' => 'F', 'lower' => array(965, 787, 834)); /* GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 8025, 'status' => 'C', 'lower' => array(8017)); /* GREEK CAPITAL LETTER UPSILON WITH DASIA */ +$config['1f00_1fff'][] = array('upper' => 8027, 'status' => 'C', 'lower' => array(8019)); /* GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA */ +$config['1f00_1fff'][] = array('upper' => 8029, 'status' => 'C', 'lower' => array(8021)); /* GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA */ +$config['1f00_1fff'][] = array('upper' => 8031, 'status' => 'C', 'lower' => array(8023)); /* GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 8040, 'status' => 'C', 'lower' => array(8032)); /* GREEK CAPITAL LETTER OMEGA WITH PSILI */ +$config['1f00_1fff'][] = array('upper' => 8041, 'status' => 'C', 'lower' => array(8033)); /* GREEK CAPITAL LETTER OMEGA WITH DASIA */ +$config['1f00_1fff'][] = array('upper' => 8042, 'status' => 'C', 'lower' => array(8034)); /* GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA */ +$config['1f00_1fff'][] = array('upper' => 8043, 'status' => 'C', 'lower' => array(8035)); /* GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA */ +$config['1f00_1fff'][] = array('upper' => 8044, 'status' => 'C', 'lower' => array(8036)); /* GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA */ +$config['1f00_1fff'][] = array('upper' => 8045, 'status' => 'C', 'lower' => array(8037)); /* GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA */ +$config['1f00_1fff'][] = array('upper' => 8046, 'status' => 'C', 'lower' => array(8038)); /* GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 8047, 'status' => 'C', 'lower' => array(8039)); /* GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 8064, 'status' => 'F', 'lower' => array(7936, 953)); /* GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8065, 'status' => 'F', 'lower' => array(7937, 953)); /* GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8066, 'status' => 'F', 'lower' => array(7938, 953)); /* GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8067, 'status' => 'F', 'lower' => array(7939, 953)); /* GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8068, 'status' => 'F', 'lower' => array(7940, 953)); /* GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8069, 'status' => 'F', 'lower' => array(7941, 953)); /* GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8070, 'status' => 'F', 'lower' => array(7942, 953)); /* GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8071, 'status' => 'F', 'lower' => array(7943, 953)); /* GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8072, 'status' => 'F', 'lower' => array(7936, 953)); /* GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8072, 'status' => 'S', 'lower' => array(8064)); /* GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8073, 'status' => 'F', 'lower' => array(7937, 953)); /* GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8073, 'status' => 'S', 'lower' => array(8065)); /* GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8074, 'status' => 'F', 'lower' => array(7938, 953)); /* GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8074, 'status' => 'S', 'lower' => array(8066)); /* GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8075, 'status' => 'F', 'lower' => array(7939, 953)); /* GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8075, 'status' => 'S', 'lower' => array(8067)); /* GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8076, 'status' => 'F', 'lower' => array(7940, 953)); /* GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8076, 'status' => 'S', 'lower' => array(8068)); /* GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8077, 'status' => 'F', 'lower' => array(7941, 953)); /* GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8077, 'status' => 'S', 'lower' => array(8069)); /* GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8078, 'status' => 'F', 'lower' => array(7942, 953)); /* GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8078, 'status' => 'S', 'lower' => array(8070)); /* GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8079, 'status' => 'F', 'lower' => array(7943, 953)); /* GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8079, 'status' => 'S', 'lower' => array(8071)); /* GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8080, 'status' => 'F', 'lower' => array(7968, 953)); /* GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8081, 'status' => 'F', 'lower' => array(7969, 953)); /* GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8082, 'status' => 'F', 'lower' => array(7970, 953)); /* GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8083, 'status' => 'F', 'lower' => array(7971, 953)); /* GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8084, 'status' => 'F', 'lower' => array(7972, 953)); /* GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8085, 'status' => 'F', 'lower' => array(7973, 953)); /* GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8086, 'status' => 'F', 'lower' => array(7974, 953)); /* GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8087, 'status' => 'F', 'lower' => array(7975, 953)); /* GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8088, 'status' => 'F', 'lower' => array(7968, 953)); /* GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8088, 'status' => 'S', 'lower' => array(8080)); /* GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8089, 'status' => 'F', 'lower' => array(7969, 953)); /* GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8089, 'status' => 'S', 'lower' => array(8081)); /* GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8090, 'status' => 'F', 'lower' => array(7970, 953)); /* GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8090, 'status' => 'S', 'lower' => array(8082)); /* GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8091, 'status' => 'F', 'lower' => array(7971, 953)); /* GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8091, 'status' => 'S', 'lower' => array(8083)); /* GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8092, 'status' => 'F', 'lower' => array(7972, 953)); /* GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8092, 'status' => 'S', 'lower' => array(8084)); /* GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8093, 'status' => 'F', 'lower' => array(7973, 953)); /* GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8093, 'status' => 'S', 'lower' => array(8085)); /* GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8094, 'status' => 'F', 'lower' => array(7974, 953)); /* GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8094, 'status' => 'S', 'lower' => array(8086)); /* GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8095, 'status' => 'F', 'lower' => array(7975, 953)); /* GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8095, 'status' => 'S', 'lower' => array(8087)); /* GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8096, 'status' => 'F', 'lower' => array(8032, 953)); /* GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8097, 'status' => 'F', 'lower' => array(8033, 953)); /* GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8098, 'status' => 'F', 'lower' => array(8034, 953)); /* GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8099, 'status' => 'F', 'lower' => array(8035, 953)); /* GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8100, 'status' => 'F', 'lower' => array(8036, 953)); /* GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8101, 'status' => 'F', 'lower' => array(8037, 953)); /* GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8102, 'status' => 'F', 'lower' => array(8038, 953)); /* GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8103, 'status' => 'F', 'lower' => array(8039, 953)); /* GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8104, 'status' => 'F', 'lower' => array(8032, 953)); /* GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8104, 'status' => 'S', 'lower' => array(8096)); /* GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8105, 'status' => 'F', 'lower' => array(8033, 953)); /* GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8105, 'status' => 'S', 'lower' => array(8097)); /* GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8106, 'status' => 'F', 'lower' => array(8034, 953)); /* GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8106, 'status' => 'S', 'lower' => array(8098)); /* GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8107, 'status' => 'F', 'lower' => array(8035, 953)); /* GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8107, 'status' => 'S', 'lower' => array(8099)); /* GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8108, 'status' => 'F', 'lower' => array(8036, 953)); /* GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8108, 'status' => 'S', 'lower' => array(8100)); /* GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8109, 'status' => 'F', 'lower' => array(8037, 953)); /* GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8109, 'status' => 'S', 'lower' => array(8101)); /* GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8110, 'status' => 'F', 'lower' => array(8038, 953)); /* GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8110, 'status' => 'S', 'lower' => array(8102)); /* GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8111, 'status' => 'F', 'lower' => array(8039, 953)); /* GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8111, 'status' => 'S', 'lower' => array(8103)); /* GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8114, 'status' => 'F', 'lower' => array(8048, 953)); /* GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8115, 'status' => 'F', 'lower' => array(945, 953)); /* GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8116, 'status' => 'F', 'lower' => array(940, 953)); /* GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8118, 'status' => 'F', 'lower' => array(945, 834)); /* GREEK SMALL LETTER ALPHA WITH PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 8119, 'status' => 'F', 'lower' => array(945, 834, 953)); /* GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8120, 'status' => 'C', 'lower' => array(8112)); /* GREEK CAPITAL LETTER ALPHA WITH VRACHY */ +$config['1f00_1fff'][] = array('upper' => 8121, 'status' => 'C', 'lower' => array(8113)); /* GREEK CAPITAL LETTER ALPHA WITH MACRON */ +$config['1f00_1fff'][] = array('upper' => 8122, 'status' => 'C', 'lower' => array(8048)); /* GREEK CAPITAL LETTER ALPHA WITH VARIA */ +$config['1f00_1fff'][] = array('upper' => 8123, 'status' => 'C', 'lower' => array(8049)); /* GREEK CAPITAL LETTER ALPHA WITH OXIA */ +$config['1f00_1fff'][] = array('upper' => 8124, 'status' => 'F', 'lower' => array(945, 953)); /* GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8124, 'status' => 'S', 'lower' => array(8115)); /* GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8126, 'status' => 'C', 'lower' => array(953)); /* GREEK PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8130, 'status' => 'F', 'lower' => array(8052, 953)); /* GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8131, 'status' => 'F', 'lower' => array(951, 953)); /* GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8132, 'status' => 'F', 'lower' => array(942, 953)); /* GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8134, 'status' => 'F', 'lower' => array(951, 834)); /* GREEK SMALL LETTER ETA WITH PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 8135, 'status' => 'F', 'lower' => array(951, 834, 953)); /* GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8136, 'status' => 'C', 'lower' => array(8050)); /* GREEK CAPITAL LETTER EPSILON WITH VARIA */ +$config['1f00_1fff'][] = array('upper' => 8137, 'status' => 'C', 'lower' => array(8051)); /* GREEK CAPITAL LETTER EPSILON WITH OXIA */ +$config['1f00_1fff'][] = array('upper' => 8138, 'status' => 'C', 'lower' => array(8052)); /* GREEK CAPITAL LETTER ETA WITH VARIA */ +$config['1f00_1fff'][] = array('upper' => 8139, 'status' => 'C', 'lower' => array(8053)); /* GREEK CAPITAL LETTER ETA WITH OXIA */ +$config['1f00_1fff'][] = array('upper' => 8140, 'status' => 'F', 'lower' => array(951, 953)); /* GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8140, 'status' => 'S', 'lower' => array(8131)); /* GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8146, 'status' => 'F', 'lower' => array(953, 776, 768)); /* GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA */ +$config['1f00_1fff'][] = array('upper' => 8147, 'status' => 'F', 'lower' => array(953, 776, 769)); /* GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA */ +$config['1f00_1fff'][] = array('upper' => 8150, 'status' => 'F', 'lower' => array(953, 834)); /* GREEK SMALL LETTER IOTA WITH PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 8151, 'status' => 'F', 'lower' => array(953, 776, 834)); /* GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 8152, 'status' => 'C', 'lower' => array(8144)); /* GREEK CAPITAL LETTER IOTA WITH VRACHY */ +$config['1f00_1fff'][] = array('upper' => 8153, 'status' => 'C', 'lower' => array(8145)); /* GREEK CAPITAL LETTER IOTA WITH MACRON */ +$config['1f00_1fff'][] = array('upper' => 8154, 'status' => 'C', 'lower' => array(8054)); /* GREEK CAPITAL LETTER IOTA WITH VARIA */ +$config['1f00_1fff'][] = array('upper' => 8155, 'status' => 'C', 'lower' => array(8055)); /* GREEK CAPITAL LETTER IOTA WITH OXIA */ +$config['1f00_1fff'][] = array('upper' => 8162, 'status' => 'F', 'lower' => array(965, 776, 768)); /* GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA */ +$config['1f00_1fff'][] = array('upper' => 8163, 'status' => 'F', 'lower' => array(965, 776, 769)); /* GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA */ +$config['1f00_1fff'][] = array('upper' => 8164, 'status' => 'F', 'lower' => array(961, 787)); /* GREEK SMALL LETTER RHO WITH PSILI */ +$config['1f00_1fff'][] = array('upper' => 8166, 'status' => 'F', 'lower' => array(965, 834)); /* GREEK SMALL LETTER UPSILON WITH PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 8167, 'status' => 'F', 'lower' => array(965, 776, 834)); /* GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 8168, 'status' => 'C', 'lower' => array(8160)); /* GREEK CAPITAL LETTER UPSILON WITH VRACHY */ +$config['1f00_1fff'][] = array('upper' => 8169, 'status' => 'C', 'lower' => array(8161)); /* GREEK CAPITAL LETTER UPSILON WITH MACRON */ +$config['1f00_1fff'][] = array('upper' => 8170, 'status' => 'C', 'lower' => array(8058)); /* GREEK CAPITAL LETTER UPSILON WITH VARIA */ +$config['1f00_1fff'][] = array('upper' => 8171, 'status' => 'C', 'lower' => array(8059)); /* GREEK CAPITAL LETTER UPSILON WITH OXIA */ +$config['1f00_1fff'][] = array('upper' => 8172, 'status' => 'C', 'lower' => array(8165)); /* GREEK CAPITAL LETTER RHO WITH DASIA */ +$config['1f00_1fff'][] = array('upper' => 8178, 'status' => 'F', 'lower' => array(8060, 953)); /* GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8179, 'status' => 'F', 'lower' => array(969, 953)); /* GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8180, 'status' => 'F', 'lower' => array(974, 953)); /* GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8182, 'status' => 'F', 'lower' => array(969, 834)); /* GREEK SMALL LETTER OMEGA WITH PERISPOMENI */ +$config['1f00_1fff'][] = array('upper' => 8183, 'status' => 'F', 'lower' => array(969, 834, 953)); /* GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8184, 'status' => 'C', 'lower' => array(8056)); /* GREEK CAPITAL LETTER OMICRON WITH VARIA */ +$config['1f00_1fff'][] = array('upper' => 8185, 'status' => 'C', 'lower' => array(8057)); /* GREEK CAPITAL LETTER OMICRON WITH OXIA */ +$config['1f00_1fff'][] = array('upper' => 8186, 'status' => 'C', 'lower' => array(8060)); /* GREEK CAPITAL LETTER OMEGA WITH VARIA */ +$config['1f00_1fff'][] = array('upper' => 8187, 'status' => 'C', 'lower' => array(8061)); /* GREEK CAPITAL LETTER OMEGA WITH OXIA */ +$config['1f00_1fff'][] = array('upper' => 8188, 'status' => 'F', 'lower' => array(969, 953)); /* GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI */ +$config['1f00_1fff'][] = array('upper' => 8188, 'status' => 'S', 'lower' => array(8179)); /* GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI */ diff --git a/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2100_214f.php b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2100_214f.php new file mode 100644 index 000000000..e0023500e --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2100_214f.php @@ -0,0 +1,45 @@ + 8486, 'status' => 'C', 'lower' => array(969)); /* OHM SIGN */ +$config['2100_214f'][] = array('upper' => 8490, 'status' => 'C', 'lower' => array(107)); /* KELVIN SIGN */ +$config['2100_214f'][] = array('upper' => 8491, 'status' => 'C', 'lower' => array(229)); /* ANGSTROM SIGN */ +$config['2100_214f'][] = array('upper' => 8498, 'status' => 'C', 'lower' => array(8526)); /* TURNED CAPITAL F */ diff --git a/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2150_218f.php b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2150_218f.php new file mode 100644 index 000000000..6a1e6855c --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2150_218f.php @@ -0,0 +1,58 @@ + 8544, 'status' => 'C', 'lower' => array(8560)); /* ROMAN NUMERAL ONE */ +$config['2150_218f'][] = array('upper' => 8545, 'status' => 'C', 'lower' => array(8561)); /* ROMAN NUMERAL TWO */ +$config['2150_218f'][] = array('upper' => 8546, 'status' => 'C', 'lower' => array(8562)); /* ROMAN NUMERAL THREE */ +$config['2150_218f'][] = array('upper' => 8547, 'status' => 'C', 'lower' => array(8563)); /* ROMAN NUMERAL FOUR */ +$config['2150_218f'][] = array('upper' => 8548, 'status' => 'C', 'lower' => array(8564)); /* ROMAN NUMERAL FIVE */ +$config['2150_218f'][] = array('upper' => 8549, 'status' => 'C', 'lower' => array(8565)); /* ROMAN NUMERAL SIX */ +$config['2150_218f'][] = array('upper' => 8550, 'status' => 'C', 'lower' => array(8566)); /* ROMAN NUMERAL SEVEN */ +$config['2150_218f'][] = array('upper' => 8551, 'status' => 'C', 'lower' => array(8567)); /* ROMAN NUMERAL EIGHT */ +$config['2150_218f'][] = array('upper' => 8552, 'status' => 'C', 'lower' => array(8568)); /* ROMAN NUMERAL NINE */ +$config['2150_218f'][] = array('upper' => 8553, 'status' => 'C', 'lower' => array(8569)); /* ROMAN NUMERAL TEN */ +$config['2150_218f'][] = array('upper' => 8554, 'status' => 'C', 'lower' => array(8570)); /* ROMAN NUMERAL ELEVEN */ +$config['2150_218f'][] = array('upper' => 8555, 'status' => 'C', 'lower' => array(8571)); /* ROMAN NUMERAL TWELVE */ +$config['2150_218f'][] = array('upper' => 8556, 'status' => 'C', 'lower' => array(8572)); /* ROMAN NUMERAL FIFTY */ +$config['2150_218f'][] = array('upper' => 8557, 'status' => 'C', 'lower' => array(8573)); /* ROMAN NUMERAL ONE HUNDRED */ +$config['2150_218f'][] = array('upper' => 8558, 'status' => 'C', 'lower' => array(8574)); /* ROMAN NUMERAL FIVE HUNDRED */ +$config['2150_218f'][] = array('upper' => 8559, 'status' => 'C', 'lower' => array(8575)); /* ROMAN NUMERAL ONE THOUSAND */ +$config['2150_218f'][] = array('upper' => 8579, 'status' => 'C', 'lower' => array(8580)); /* ROMAN NUMERAL REVERSED ONE HUNDRED */ diff --git a/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2460_24ff.php b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2460_24ff.php new file mode 100644 index 000000000..3b8dee7b3 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2460_24ff.php @@ -0,0 +1,67 @@ + 9398, 'status' => 'C', 'lower' => array(9424)); /* CIRCLED LATIN CAPITAL LETTER A */ +$config['2460_24ff'][] = array('upper' => 9399, 'status' => 'C', 'lower' => array(9425)); /* CIRCLED LATIN CAPITAL LETTER B */ +$config['2460_24ff'][] = array('upper' => 9400, 'status' => 'C', 'lower' => array(9426)); /* CIRCLED LATIN CAPITAL LETTER C */ +$config['2460_24ff'][] = array('upper' => 9401, 'status' => 'C', 'lower' => array(9427)); /* CIRCLED LATIN CAPITAL LETTER D */ +$config['2460_24ff'][] = array('upper' => 9402, 'status' => 'C', 'lower' => array(9428)); /* CIRCLED LATIN CAPITAL LETTER E */ +$config['2460_24ff'][] = array('upper' => 9403, 'status' => 'C', 'lower' => array(9429)); /* CIRCLED LATIN CAPITAL LETTER F */ +$config['2460_24ff'][] = array('upper' => 9404, 'status' => 'C', 'lower' => array(9430)); /* CIRCLED LATIN CAPITAL LETTER G */ +$config['2460_24ff'][] = array('upper' => 9405, 'status' => 'C', 'lower' => array(9431)); /* CIRCLED LATIN CAPITAL LETTER H */ +$config['2460_24ff'][] = array('upper' => 9406, 'status' => 'C', 'lower' => array(9432)); /* CIRCLED LATIN CAPITAL LETTER I */ +$config['2460_24ff'][] = array('upper' => 9407, 'status' => 'C', 'lower' => array(9433)); /* CIRCLED LATIN CAPITAL LETTER J */ +$config['2460_24ff'][] = array('upper' => 9408, 'status' => 'C', 'lower' => array(9434)); /* CIRCLED LATIN CAPITAL LETTER K */ +$config['2460_24ff'][] = array('upper' => 9409, 'status' => 'C', 'lower' => array(9435)); /* CIRCLED LATIN CAPITAL LETTER L */ +$config['2460_24ff'][] = array('upper' => 9410, 'status' => 'C', 'lower' => array(9436)); /* CIRCLED LATIN CAPITAL LETTER M */ +$config['2460_24ff'][] = array('upper' => 9411, 'status' => 'C', 'lower' => array(9437)); /* CIRCLED LATIN CAPITAL LETTER N */ +$config['2460_24ff'][] = array('upper' => 9412, 'status' => 'C', 'lower' => array(9438)); /* CIRCLED LATIN CAPITAL LETTER O */ +$config['2460_24ff'][] = array('upper' => 9413, 'status' => 'C', 'lower' => array(9439)); /* CIRCLED LATIN CAPITAL LETTER P */ +$config['2460_24ff'][] = array('upper' => 9414, 'status' => 'C', 'lower' => array(9440)); /* CIRCLED LATIN CAPITAL LETTER Q */ +$config['2460_24ff'][] = array('upper' => 9415, 'status' => 'C', 'lower' => array(9441)); /* CIRCLED LATIN CAPITAL LETTER R */ +$config['2460_24ff'][] = array('upper' => 9416, 'status' => 'C', 'lower' => array(9442)); /* CIRCLED LATIN CAPITAL LETTER S */ +$config['2460_24ff'][] = array('upper' => 9417, 'status' => 'C', 'lower' => array(9443)); /* CIRCLED LATIN CAPITAL LETTER T */ +$config['2460_24ff'][] = array('upper' => 9418, 'status' => 'C', 'lower' => array(9444)); /* CIRCLED LATIN CAPITAL LETTER U */ +$config['2460_24ff'][] = array('upper' => 9419, 'status' => 'C', 'lower' => array(9445)); /* CIRCLED LATIN CAPITAL LETTER V */ +$config['2460_24ff'][] = array('upper' => 9420, 'status' => 'C', 'lower' => array(9446)); /* CIRCLED LATIN CAPITAL LETTER W */ +$config['2460_24ff'][] = array('upper' => 9421, 'status' => 'C', 'lower' => array(9447)); /* CIRCLED LATIN CAPITAL LETTER X */ +$config['2460_24ff'][] = array('upper' => 9422, 'status' => 'C', 'lower' => array(9448)); /* CIRCLED LATIN CAPITAL LETTER Y */ +$config['2460_24ff'][] = array('upper' => 9423, 'status' => 'C', 'lower' => array(9449)); /* CIRCLED LATIN CAPITAL LETTER Z */ diff --git a/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2c00_2c5f.php b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2c00_2c5f.php new file mode 100644 index 000000000..7f80a4185 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2c00_2c5f.php @@ -0,0 +1,88 @@ + 11264, 'status' => 'C', 'lower' => array(11312)); /* GLAGOLITIC CAPITAL LETTER AZU */ +$config['2c00_2c5f'][] = array('upper' => 11265, 'status' => 'C', 'lower' => array(11313)); /* GLAGOLITIC CAPITAL LETTER BUKY */ +$config['2c00_2c5f'][] = array('upper' => 11266, 'status' => 'C', 'lower' => array(11314)); /* GLAGOLITIC CAPITAL LETTER VEDE */ +$config['2c00_2c5f'][] = array('upper' => 11267, 'status' => 'C', 'lower' => array(11315)); /* GLAGOLITIC CAPITAL LETTER GLAGOLI */ +$config['2c00_2c5f'][] = array('upper' => 11268, 'status' => 'C', 'lower' => array(11316)); /* GLAGOLITIC CAPITAL LETTER DOBRO */ +$config['2c00_2c5f'][] = array('upper' => 11269, 'status' => 'C', 'lower' => array(11317)); /* GLAGOLITIC CAPITAL LETTER YESTU */ +$config['2c00_2c5f'][] = array('upper' => 11270, 'status' => 'C', 'lower' => array(11318)); /* GLAGOLITIC CAPITAL LETTER ZHIVETE */ +$config['2c00_2c5f'][] = array('upper' => 11271, 'status' => 'C', 'lower' => array(11319)); /* GLAGOLITIC CAPITAL LETTER DZELO */ +$config['2c00_2c5f'][] = array('upper' => 11272, 'status' => 'C', 'lower' => array(11320)); /* GLAGOLITIC CAPITAL LETTER ZEMLJA */ +$config['2c00_2c5f'][] = array('upper' => 11273, 'status' => 'C', 'lower' => array(11321)); /* GLAGOLITIC CAPITAL LETTER IZHE */ +$config['2c00_2c5f'][] = array('upper' => 11274, 'status' => 'C', 'lower' => array(11322)); /* GLAGOLITIC CAPITAL LETTER INITIAL IZHE */ +$config['2c00_2c5f'][] = array('upper' => 11275, 'status' => 'C', 'lower' => array(11323)); /* GLAGOLITIC CAPITAL LETTER I */ +$config['2c00_2c5f'][] = array('upper' => 11276, 'status' => 'C', 'lower' => array(11324)); /* GLAGOLITIC CAPITAL LETTER DJERVI */ +$config['2c00_2c5f'][] = array('upper' => 11277, 'status' => 'C', 'lower' => array(11325)); /* GLAGOLITIC CAPITAL LETTER KAKO */ +$config['2c00_2c5f'][] = array('upper' => 11278, 'status' => 'C', 'lower' => array(11326)); /* GLAGOLITIC CAPITAL LETTER LJUDIJE */ +$config['2c00_2c5f'][] = array('upper' => 11279, 'status' => 'C', 'lower' => array(11327)); /* GLAGOLITIC CAPITAL LETTER MYSLITE */ +$config['2c00_2c5f'][] = array('upper' => 11280, 'status' => 'C', 'lower' => array(11328)); /* GLAGOLITIC CAPITAL LETTER NASHI */ +$config['2c00_2c5f'][] = array('upper' => 11281, 'status' => 'C', 'lower' => array(11329)); /* GLAGOLITIC CAPITAL LETTER ONU */ +$config['2c00_2c5f'][] = array('upper' => 11282, 'status' => 'C', 'lower' => array(11330)); /* GLAGOLITIC CAPITAL LETTER POKOJI */ +$config['2c00_2c5f'][] = array('upper' => 11283, 'status' => 'C', 'lower' => array(11331)); /* GLAGOLITIC CAPITAL LETTER RITSI */ +$config['2c00_2c5f'][] = array('upper' => 11284, 'status' => 'C', 'lower' => array(11332)); /* GLAGOLITIC CAPITAL LETTER SLOVO */ +$config['2c00_2c5f'][] = array('upper' => 11285, 'status' => 'C', 'lower' => array(11333)); /* GLAGOLITIC CAPITAL LETTER TVRIDO */ +$config['2c00_2c5f'][] = array('upper' => 11286, 'status' => 'C', 'lower' => array(11334)); /* GLAGOLITIC CAPITAL LETTER UKU */ +$config['2c00_2c5f'][] = array('upper' => 11287, 'status' => 'C', 'lower' => array(11335)); /* GLAGOLITIC CAPITAL LETTER FRITU */ +$config['2c00_2c5f'][] = array('upper' => 11288, 'status' => 'C', 'lower' => array(11336)); /* GLAGOLITIC CAPITAL LETTER HERU */ +$config['2c00_2c5f'][] = array('upper' => 11289, 'status' => 'C', 'lower' => array(11337)); /* GLAGOLITIC CAPITAL LETTER OTU */ +$config['2c00_2c5f'][] = array('upper' => 11290, 'status' => 'C', 'lower' => array(11338)); /* GLAGOLITIC CAPITAL LETTER PE */ +$config['2c00_2c5f'][] = array('upper' => 11291, 'status' => 'C', 'lower' => array(11339)); /* GLAGOLITIC CAPITAL LETTER SHTA */ +$config['2c00_2c5f'][] = array('upper' => 11292, 'status' => 'C', 'lower' => array(11340)); /* GLAGOLITIC CAPITAL LETTER TSI */ +$config['2c00_2c5f'][] = array('upper' => 11293, 'status' => 'C', 'lower' => array(11341)); /* GLAGOLITIC CAPITAL LETTER CHRIVI */ +$config['2c00_2c5f'][] = array('upper' => 11294, 'status' => 'C', 'lower' => array(11342)); /* GLAGOLITIC CAPITAL LETTER SHA */ +$config['2c00_2c5f'][] = array('upper' => 11295, 'status' => 'C', 'lower' => array(11343)); /* GLAGOLITIC CAPITAL LETTER YERU */ +$config['2c00_2c5f'][] = array('upper' => 11296, 'status' => 'C', 'lower' => array(11344)); /* GLAGOLITIC CAPITAL LETTER YERI */ +$config['2c00_2c5f'][] = array('upper' => 11297, 'status' => 'C', 'lower' => array(11345)); /* GLAGOLITIC CAPITAL LETTER YATI */ +$config['2c00_2c5f'][] = array('upper' => 11298, 'status' => 'C', 'lower' => array(11346)); /* GLAGOLITIC CAPITAL LETTER SPIDERY HA */ +$config['2c00_2c5f'][] = array('upper' => 11299, 'status' => 'C', 'lower' => array(11347)); /* GLAGOLITIC CAPITAL LETTER YU */ +$config['2c00_2c5f'][] = array('upper' => 11300, 'status' => 'C', 'lower' => array(11348)); /* GLAGOLITIC CAPITAL LETTER SMALL YUS */ +$config['2c00_2c5f'][] = array('upper' => 11301, 'status' => 'C', 'lower' => array(11349)); /* GLAGOLITIC CAPITAL LETTER SMALL YUS WITH TAIL */ +$config['2c00_2c5f'][] = array('upper' => 11302, 'status' => 'C', 'lower' => array(11350)); /* GLAGOLITIC CAPITAL LETTER YO */ +$config['2c00_2c5f'][] = array('upper' => 11303, 'status' => 'C', 'lower' => array(11351)); /* GLAGOLITIC CAPITAL LETTER IOTATED SMALL YUS */ +$config['2c00_2c5f'][] = array('upper' => 11304, 'status' => 'C', 'lower' => array(11352)); /* GLAGOLITIC CAPITAL LETTER BIG YUS */ +$config['2c00_2c5f'][] = array('upper' => 11305, 'status' => 'C', 'lower' => array(11353)); /* GLAGOLITIC CAPITAL LETTER IOTATED BIG YUS */ +$config['2c00_2c5f'][] = array('upper' => 11306, 'status' => 'C', 'lower' => array(11354)); /* GLAGOLITIC CAPITAL LETTER FITA */ +$config['2c00_2c5f'][] = array('upper' => 11307, 'status' => 'C', 'lower' => array(11355)); /* GLAGOLITIC CAPITAL LETTER IZHITSA */ +$config['2c00_2c5f'][] = array('upper' => 11308, 'status' => 'C', 'lower' => array(11356)); /* GLAGOLITIC CAPITAL LETTER SHTAPIC */ +$config['2c00_2c5f'][] = array('upper' => 11309, 'status' => 'C', 'lower' => array(11357)); /* GLAGOLITIC CAPITAL LETTER TROKUTASTI A */ +$config['2c00_2c5f'][] = array('upper' => 11310, 'status' => 'C', 'lower' => array(11358)); /* GLAGOLITIC CAPITAL LETTER LATINATE MYSLITE */ diff --git a/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2c60_2c7f.php b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2c60_2c7f.php new file mode 100644 index 000000000..299cbdc0b --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2c60_2c7f.php @@ -0,0 +1,49 @@ + 11360, 'status' => 'C', 'lower' => array(11361)); /* LATIN CAPITAL LETTER L WITH DOUBLE BAR */ +$config['2c60_2c7f'][] = array('upper' => 11362, 'status' => 'C', 'lower' => array(619)); /* LATIN CAPITAL LETTER L WITH MIDDLE TILDE */ +$config['2c60_2c7f'][] = array('upper' => 11363, 'status' => 'C', 'lower' => array(7549)); /* LATIN CAPITAL LETTER P WITH STROKE */ +$config['2c60_2c7f'][] = array('upper' => 11364, 'status' => 'C', 'lower' => array(637)); /* LATIN CAPITAL LETTER R WITH TAIL */ +$config['2c60_2c7f'][] = array('upper' => 11367, 'status' => 'C', 'lower' => array(11368)); /* LATIN CAPITAL LETTER H WITH DESCENDER */ +$config['2c60_2c7f'][] = array('upper' => 11369, 'status' => 'C', 'lower' => array(11370)); /* LATIN CAPITAL LETTER K WITH DESCENDER */ +$config['2c60_2c7f'][] = array('upper' => 11371, 'status' => 'C', 'lower' => array(11372)); /* LATIN CAPITAL LETTER Z WITH DESCENDER */ +$config['2c60_2c7f'][] = array('upper' => 11381, 'status' => 'C', 'lower' => array(11382)); /* LATIN CAPITAL LETTER HALF H */ diff --git a/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2c80_2cff.php b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2c80_2cff.php new file mode 100644 index 000000000..3836c6451 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/2c80_2cff.php @@ -0,0 +1,91 @@ + 11392, 'status' => 'C', 'lower' => array(11393)); /* COPTIC CAPITAL LETTER ALFA */ +$config['2c80_2cff'][] = array('upper' => 11394, 'status' => 'C', 'lower' => array(11395)); /* COPTIC CAPITAL LETTER VIDA */ +$config['2c80_2cff'][] = array('upper' => 11396, 'status' => 'C', 'lower' => array(11397)); /* COPTIC CAPITAL LETTER GAMMA */ +$config['2c80_2cff'][] = array('upper' => 11398, 'status' => 'C', 'lower' => array(11399)); /* COPTIC CAPITAL LETTER DALDA */ +$config['2c80_2cff'][] = array('upper' => 11400, 'status' => 'C', 'lower' => array(11401)); /* COPTIC CAPITAL LETTER EIE */ +$config['2c80_2cff'][] = array('upper' => 11402, 'status' => 'C', 'lower' => array(11403)); /* COPTIC CAPITAL LETTER SOU */ +$config['2c80_2cff'][] = array('upper' => 11404, 'status' => 'C', 'lower' => array(11405)); /* COPTIC CAPITAL LETTER ZATA */ +$config['2c80_2cff'][] = array('upper' => 11406, 'status' => 'C', 'lower' => array(11407)); /* COPTIC CAPITAL LETTER HATE */ +$config['2c80_2cff'][] = array('upper' => 11408, 'status' => 'C', 'lower' => array(11409)); /* COPTIC CAPITAL LETTER THETHE */ +$config['2c80_2cff'][] = array('upper' => 11410, 'status' => 'C', 'lower' => array(11411)); /* COPTIC CAPITAL LETTER IAUDA */ +$config['2c80_2cff'][] = array('upper' => 11412, 'status' => 'C', 'lower' => array(11413)); /* COPTIC CAPITAL LETTER KAPA */ +$config['2c80_2cff'][] = array('upper' => 11414, 'status' => 'C', 'lower' => array(11415)); /* COPTIC CAPITAL LETTER LAULA */ +$config['2c80_2cff'][] = array('upper' => 11416, 'status' => 'C', 'lower' => array(11417)); /* COPTIC CAPITAL LETTER MI */ +$config['2c80_2cff'][] = array('upper' => 11418, 'status' => 'C', 'lower' => array(11419)); /* COPTIC CAPITAL LETTER NI */ +$config['2c80_2cff'][] = array('upper' => 11420, 'status' => 'C', 'lower' => array(11421)); /* COPTIC CAPITAL LETTER KSI */ +$config['2c80_2cff'][] = array('upper' => 11422, 'status' => 'C', 'lower' => array(11423)); /* COPTIC CAPITAL LETTER O */ +$config['2c80_2cff'][] = array('upper' => 11424, 'status' => 'C', 'lower' => array(11425)); /* COPTIC CAPITAL LETTER PI */ +$config['2c80_2cff'][] = array('upper' => 11426, 'status' => 'C', 'lower' => array(11427)); /* COPTIC CAPITAL LETTER RO */ +$config['2c80_2cff'][] = array('upper' => 11428, 'status' => 'C', 'lower' => array(11429)); /* COPTIC CAPITAL LETTER SIMA */ +$config['2c80_2cff'][] = array('upper' => 11430, 'status' => 'C', 'lower' => array(11431)); /* COPTIC CAPITAL LETTER TAU */ +$config['2c80_2cff'][] = array('upper' => 11432, 'status' => 'C', 'lower' => array(11433)); /* COPTIC CAPITAL LETTER UA */ +$config['2c80_2cff'][] = array('upper' => 11434, 'status' => 'C', 'lower' => array(11435)); /* COPTIC CAPITAL LETTER FI */ +$config['2c80_2cff'][] = array('upper' => 11436, 'status' => 'C', 'lower' => array(11437)); /* COPTIC CAPITAL LETTER KHI */ +$config['2c80_2cff'][] = array('upper' => 11438, 'status' => 'C', 'lower' => array(11439)); /* COPTIC CAPITAL LETTER PSI */ +$config['2c80_2cff'][] = array('upper' => 11440, 'status' => 'C', 'lower' => array(11441)); /* COPTIC CAPITAL LETTER OOU */ +$config['2c80_2cff'][] = array('upper' => 11442, 'status' => 'C', 'lower' => array(11443)); /* COPTIC CAPITAL LETTER DIALECT-P ALEF */ +$config['2c80_2cff'][] = array('upper' => 11444, 'status' => 'C', 'lower' => array(11445)); /* COPTIC CAPITAL LETTER OLD COPTIC AIN */ +$config['2c80_2cff'][] = array('upper' => 11446, 'status' => 'C', 'lower' => array(11447)); /* COPTIC CAPITAL LETTER CRYPTOGRAMMIC EIE */ +$config['2c80_2cff'][] = array('upper' => 11448, 'status' => 'C', 'lower' => array(11449)); /* COPTIC CAPITAL LETTER DIALECT-P KAPA */ +$config['2c80_2cff'][] = array('upper' => 11450, 'status' => 'C', 'lower' => array(11451)); /* COPTIC CAPITAL LETTER DIALECT-P NI */ +$config['2c80_2cff'][] = array('upper' => 11452, 'status' => 'C', 'lower' => array(11453)); /* COPTIC CAPITAL LETTER CRYPTOGRAMMIC NI */ +$config['2c80_2cff'][] = array('upper' => 11454, 'status' => 'C', 'lower' => array(11455)); /* COPTIC CAPITAL LETTER OLD COPTIC OOU */ +$config['2c80_2cff'][] = array('upper' => 11456, 'status' => 'C', 'lower' => array(11457)); /* COPTIC CAPITAL LETTER SAMPI */ +$config['2c80_2cff'][] = array('upper' => 11458, 'status' => 'C', 'lower' => array(11459)); /* COPTIC CAPITAL LETTER CROSSED SHEI */ +$config['2c80_2cff'][] = array('upper' => 11460, 'status' => 'C', 'lower' => array(11461)); /* COPTIC CAPITAL LETTER OLD COPTIC SHEI */ +$config['2c80_2cff'][] = array('upper' => 11462, 'status' => 'C', 'lower' => array(11463)); /* COPTIC CAPITAL LETTER OLD COPTIC ESH */ +$config['2c80_2cff'][] = array('upper' => 11464, 'status' => 'C', 'lower' => array(11465)); /* COPTIC CAPITAL LETTER AKHMIMIC KHEI */ +$config['2c80_2cff'][] = array('upper' => 11466, 'status' => 'C', 'lower' => array(11467)); /* COPTIC CAPITAL LETTER DIALECT-P HORI */ +$config['2c80_2cff'][] = array('upper' => 11468, 'status' => 'C', 'lower' => array(11469)); /* COPTIC CAPITAL LETTER OLD COPTIC HORI */ +$config['2c80_2cff'][] = array('upper' => 11470, 'status' => 'C', 'lower' => array(11471)); /* COPTIC CAPITAL LETTER OLD COPTIC HA */ +$config['2c80_2cff'][] = array('upper' => 11472, 'status' => 'C', 'lower' => array(11473)); /* COPTIC CAPITAL LETTER L-SHAPED HA */ +$config['2c80_2cff'][] = array('upper' => 11474, 'status' => 'C', 'lower' => array(11475)); /* COPTIC CAPITAL LETTER OLD COPTIC HEI */ +$config['2c80_2cff'][] = array('upper' => 11476, 'status' => 'C', 'lower' => array(11477)); /* COPTIC CAPITAL LETTER OLD COPTIC HAT */ +$config['2c80_2cff'][] = array('upper' => 11478, 'status' => 'C', 'lower' => array(11479)); /* COPTIC CAPITAL LETTER OLD COPTIC GANGIA */ +$config['2c80_2cff'][] = array('upper' => 11480, 'status' => 'C', 'lower' => array(11481)); /* COPTIC CAPITAL LETTER OLD COPTIC DJA */ +$config['2c80_2cff'][] = array('upper' => 11482, 'status' => 'C', 'lower' => array(11483)); /* COPTIC CAPITAL LETTER OLD COPTIC SHIMA */ +$config['2c80_2cff'][] = array('upper' => 11484, 'status' => 'C', 'lower' => array(11485)); /* COPTIC CAPITAL LETTER OLD NUBIAN SHIMA */ +$config['2c80_2cff'][] = array('upper' => 11486, 'status' => 'C', 'lower' => array(11487)); /* COPTIC CAPITAL LETTER OLD NUBIAN NGI */ +$config['2c80_2cff'][] = array('upper' => 11488, 'status' => 'C', 'lower' => array(11489)); /* COPTIC CAPITAL LETTER OLD NUBIAN NYI */ +$config['2c80_2cff'][] = array('upper' => 11490, 'status' => 'C', 'lower' => array(11491)); /* COPTIC CAPITAL LETTER OLD NUBIAN WAU */ diff --git a/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/ff00_ffef.php b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/ff00_ffef.php new file mode 100644 index 000000000..1fbb85d97 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/config/unicode/casefolding/ff00_ffef.php @@ -0,0 +1,67 @@ + 65313, 'status' => 'C', 'lower' => array(65345)); /* FULLWIDTH LATIN CAPITAL LETTER A */ +$config['ff00_ffef'][] = array('upper' => 65314, 'status' => 'C', 'lower' => array(65346)); /* FULLWIDTH LATIN CAPITAL LETTER B */ +$config['ff00_ffef'][] = array('upper' => 65315, 'status' => 'C', 'lower' => array(65347)); /* FULLWIDTH LATIN CAPITAL LETTER C */ +$config['ff00_ffef'][] = array('upper' => 65316, 'status' => 'C', 'lower' => array(65348)); /* FULLWIDTH LATIN CAPITAL LETTER D */ +$config['ff00_ffef'][] = array('upper' => 65317, 'status' => 'C', 'lower' => array(65349)); /* FULLWIDTH LATIN CAPITAL LETTER E */ +$config['ff00_ffef'][] = array('upper' => 65318, 'status' => 'C', 'lower' => array(65350)); /* FULLWIDTH LATIN CAPITAL LETTER F */ +$config['ff00_ffef'][] = array('upper' => 65319, 'status' => 'C', 'lower' => array(65351)); /* FULLWIDTH LATIN CAPITAL LETTER G */ +$config['ff00_ffef'][] = array('upper' => 65320, 'status' => 'C', 'lower' => array(65352)); /* FULLWIDTH LATIN CAPITAL LETTER H */ +$config['ff00_ffef'][] = array('upper' => 65321, 'status' => 'C', 'lower' => array(65353)); /* FULLWIDTH LATIN CAPITAL LETTER I */ +$config['ff00_ffef'][] = array('upper' => 65322, 'status' => 'C', 'lower' => array(65354)); /* FULLWIDTH LATIN CAPITAL LETTER J */ +$config['ff00_ffef'][] = array('upper' => 65323, 'status' => 'C', 'lower' => array(65355)); /* FULLWIDTH LATIN CAPITAL LETTER K */ +$config['ff00_ffef'][] = array('upper' => 65324, 'status' => 'C', 'lower' => array(65356)); /* FULLWIDTH LATIN CAPITAL LETTER L */ +$config['ff00_ffef'][] = array('upper' => 65325, 'status' => 'C', 'lower' => array(65357)); /* FULLWIDTH LATIN CAPITAL LETTER M */ +$config['ff00_ffef'][] = array('upper' => 65326, 'status' => 'C', 'lower' => array(65358)); /* FULLWIDTH LATIN CAPITAL LETTER N */ +$config['ff00_ffef'][] = array('upper' => 65327, 'status' => 'C', 'lower' => array(65359)); /* FULLWIDTH LATIN CAPITAL LETTER O */ +$config['ff00_ffef'][] = array('upper' => 65328, 'status' => 'C', 'lower' => array(65360)); /* FULLWIDTH LATIN CAPITAL LETTER P */ +$config['ff00_ffef'][] = array('upper' => 65329, 'status' => 'C', 'lower' => array(65361)); /* FULLWIDTH LATIN CAPITAL LETTER Q */ +$config['ff00_ffef'][] = array('upper' => 65330, 'status' => 'C', 'lower' => array(65362)); /* FULLWIDTH LATIN CAPITAL LETTER R */ +$config['ff00_ffef'][] = array('upper' => 65331, 'status' => 'C', 'lower' => array(65363)); /* FULLWIDTH LATIN CAPITAL LETTER S */ +$config['ff00_ffef'][] = array('upper' => 65332, 'status' => 'C', 'lower' => array(65364)); /* FULLWIDTH LATIN CAPITAL LETTER T */ +$config['ff00_ffef'][] = array('upper' => 65333, 'status' => 'C', 'lower' => array(65365)); /* FULLWIDTH LATIN CAPITAL LETTER U */ +$config['ff00_ffef'][] = array('upper' => 65334, 'status' => 'C', 'lower' => array(65366)); /* FULLWIDTH LATIN CAPITAL LETTER V */ +$config['ff00_ffef'][] = array('upper' => 65335, 'status' => 'C', 'lower' => array(65367)); /* FULLWIDTH LATIN CAPITAL LETTER W */ +$config['ff00_ffef'][] = array('upper' => 65336, 'status' => 'C', 'lower' => array(65368)); /* FULLWIDTH LATIN CAPITAL LETTER X */ +$config['ff00_ffef'][] = array('upper' => 65337, 'status' => 'C', 'lower' => array(65369)); /* FULLWIDTH LATIN CAPITAL LETTER Y */ +$config['ff00_ffef'][] = array('upper' => 65338, 'status' => 'C', 'lower' => array(65370)); /* FULLWIDTH LATIN CAPITAL LETTER Z */ diff --git a/code/ryzom/tools/server/www/webtt/cake/console/cake b/code/ryzom/tools/server/www/webtt/cake/console/cake new file mode 100755 index 000000000..0c5f60f36 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/cake @@ -0,0 +1,26 @@ +#!/bin/bash +################################################################################ +# +# Bake is a shell script for running CakePHP bake script +# PHP versions 4 and 5 +# +# CakePHP(tm) : Rapid Development Framework (http://cakephp.org) +# Copyright 2005-2010, Cake Software Foundation, Inc. +# +# Licensed under The MIT License +# Redistributions of files must retain the above copyright notice. +# +# @copyright Copyright 2005-2010, Cake Software Foundation, Inc. +# @link http://cakephp.org CakePHP(tm) Project +# @package cake +# @subpackage cake.cake.console +# @since CakePHP(tm) v 1.2.0.5012 +# @license MIT License (http://www.opensource.org/licenses/mit-license.php) +# +################################################################################ +LIB=${0/%cake/} +APP=`pwd` + +exec php -q ${LIB}cake.php -working "${APP}" "$@" + +exit; \ No newline at end of file diff --git a/code/ryzom/tools/server/www/webtt/cake/console/cake.bat b/code/ryzom/tools/server/www/webtt/cake/console/cake.bat new file mode 100644 index 000000000..87ee1c7d9 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/cake.bat @@ -0,0 +1,33 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: +:: Bake is a shell script for running CakePHP bake script +:: PHP versions 4 and 5 +:: +:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org) +:: Copyright 2005-2010, Cake Software Foundation, Inc. +:: +:: Licensed under The MIT License +:: Redistributions of files must retain the above copyright notice. +:: +:: @copyright Copyright 2005-2010, Cake Software Foundation, Inc. +:: @link http://cakephp.org CakePHP(tm) Project +:: @package cake +:: @subpackage cake.cake.console +:: @since CakePHP(tm) v 1.2.0.5012 +:: @license MIT License (http://www.opensource.org/licenses/mit-license.php) +:: +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + +:: In order for this script to work as intended, the cake\console\ folder must be in your PATH + +@echo. +@echo off + +SET app=%0 +SET lib=%~dp0 + +php -q "%lib%cake.php" -working "%CD% " %* + +echo. + +exit /B %ERRORLEVEL% \ No newline at end of file diff --git a/code/ryzom/tools/server/www/webtt/cake/console/cake.php b/code/ryzom/tools/server/www/webtt/cake/console/cake.php new file mode 100644 index 000000000..a0a835568 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/cake.php @@ -0,0 +1,667 @@ +#!/usr/bin/php -q +__initConstants(); + $this->parseParams($args); + $this->_initEnvironment(); + $this->__buildPaths(); + $this->_stop($this->dispatch() === false ? 1 : 0); + } + +/** + * Defines core configuration. + * + * @access private + */ + function __initConstants() { + if (function_exists('ini_set')) { + ini_set('display_errors', '1'); + ini_set('error_reporting', E_ALL & ~E_DEPRECATED); + ini_set('html_errors', false); + ini_set('implicit_flush', true); + ini_set('max_execution_time', 0); + } + + if (!defined('CAKE_CORE_INCLUDE_PATH')) { + define('PHP5', (PHP_VERSION >= 5)); + define('DS', DIRECTORY_SEPARATOR); + define('CAKE_CORE_INCLUDE_PATH', dirname(dirname(dirname(__FILE__)))); + define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); + define('DISABLE_DEFAULT_ERROR_HANDLING', false); + define('CAKEPHP_SHELL', true); + } + require_once(CORE_PATH . 'cake' . DS . 'basics.php'); + } + +/** + * Defines current working environment. + * + * @access protected + */ + function _initEnvironment() { + $this->stdin = fopen('php://stdin', 'r'); + $this->stdout = fopen('php://stdout', 'w'); + $this->stderr = fopen('php://stderr', 'w'); + + if (!$this->__bootstrap()) { + $this->stderr("\nCakePHP Console: "); + $this->stderr("\nUnable to load Cake core:"); + $this->stderr("\tMake sure " . DS . 'cake' . DS . 'libs exists in ' . CAKE_CORE_INCLUDE_PATH); + $this->_stop(); + } + + if (!isset($this->args[0]) || !isset($this->params['working'])) { + $this->stderr("\nCakePHP Console: "); + $this->stderr('This file has been loaded incorrectly and cannot continue.'); + $this->stderr('Please make sure that ' . DIRECTORY_SEPARATOR . 'cake' . DIRECTORY_SEPARATOR . 'console is in your system path,'); + $this->stderr('and check the manual for the correct usage of this command.'); + $this->stderr('(http://manual.cakephp.org/)'); + $this->_stop(); + } + + if (basename(__FILE__) != basename($this->args[0])) { + $this->stderr("\nCakePHP Console: "); + $this->stderr('Warning: the dispatcher may have been loaded incorrectly, which could lead to unexpected results...'); + if ($this->getInput('Continue anyway?', array('y', 'n'), 'y') == 'n') { + $this->_stop(); + } + } + + $this->shiftArgs(); + } + +/** + * Builds the shell paths. + * + * @access private + * @return void + */ + function __buildPaths() { + $paths = array(); + if (!class_exists('Folder')) { + require LIBS . 'folder.php'; + } + $plugins = App::objects('plugin', null, false); + foreach ((array)$plugins as $plugin) { + $pluginPath = App::pluginPath($plugin); + $path = $pluginPath . 'vendors' . DS . 'shells' . DS; + if (file_exists($path)) { + $paths[] = $path; + } + } + + $vendorPaths = array_values(App::path('vendors')); + foreach ($vendorPaths as $vendorPath) { + $path = rtrim($vendorPath, DS) . DS . 'shells' . DS; + if (file_exists($path)) { + $paths[] = $path; + } + } + + $this->shellPaths = array_values(array_unique(array_merge($paths, App::path('shells')))); + } + +/** + * Initializes the environment and loads the Cake core. + * + * @return boolean Success. + * @access private + */ + function __bootstrap() { + + define('ROOT', $this->params['root']); + define('APP_DIR', $this->params['app']); + define('APP_PATH', $this->params['working'] . DS); + define('WWW_ROOT', APP_PATH . $this->params['webroot'] . DS); + if (!is_dir(ROOT . DS . APP_DIR . DS . 'tmp')) { + define('TMP', CORE_PATH . 'cake' . DS . 'console' . DS . 'templates' . DS . 'skel' . DS . 'tmp' . DS); + } + + $includes = array( + CORE_PATH . 'cake' . DS . 'config' . DS . 'paths.php', + CORE_PATH . 'cake' . DS . 'libs' . DS . 'object.php', + CORE_PATH . 'cake' . DS . 'libs' . DS . 'inflector.php', + CORE_PATH . 'cake' . DS . 'libs' . DS . 'configure.php', + CORE_PATH . 'cake' . DS . 'libs' . DS . 'file.php', + CORE_PATH . 'cake' . DS . 'libs' . DS . 'cache.php', + CORE_PATH . 'cake' . DS . 'libs' . DS . 'string.php', + CORE_PATH . 'cake' . DS . 'libs' . DS . 'class_registry.php', + CORE_PATH . 'cake' . DS . 'console' . DS . 'error.php' + ); + + foreach ($includes as $inc) { + if (!require($inc)) { + $this->stderr("Failed to load Cake core file {$inc}"); + return false; + } + } + + Configure::getInstance(file_exists(CONFIGS . 'bootstrap.php')); + + if (!file_exists(APP_PATH . 'config' . DS . 'core.php')) { + include_once CORE_PATH . 'cake' . DS . 'console' . DS . 'templates' . DS . 'skel' . DS . 'config' . DS . 'core.php'; + App::build(); + } + + return true; + } + +/** + * Clear the console + * + * @return void + * @access public + */ + function clear() { + if (empty($this->params['noclear'])) { + if ( DS === '/') { + passthru('clear'); + } else { + passthru('cls'); + } + } + } + +/** + * Dispatches a CLI request + * + * @return boolean + * @access public + */ + function dispatch() { + $arg = $this->shiftArgs(); + + if (!$arg) { + $this->help(); + return false; + } + if ($arg == 'help') { + $this->help(); + return true; + } + + list($plugin, $shell) = pluginSplit($arg); + $this->shell = $shell; + $this->shellName = Inflector::camelize($shell); + $this->shellClass = $this->shellName . 'Shell'; + + $arg = null; + + if (isset($this->args[0])) { + $arg = $this->args[0]; + $this->shellCommand = Inflector::variable($arg); + } + + $Shell = $this->_getShell($plugin); + + if (!$Shell) { + $title = sprintf(__('Error: Class %s could not be loaded.', true), $this->shellClass); + $this->stderr($title . "\n"); + return false; + } + + $methods = array(); + + if (is_a($Shell, 'Shell')) { + $Shell->initialize(); + $Shell->loadTasks(); + + foreach ($Shell->taskNames as $task) { + if (is_a($Shell->{$task}, 'Shell')) { + $Shell->{$task}->initialize(); + $Shell->{$task}->loadTasks(); + } + } + + $task = Inflector::camelize($arg); + + if (in_array($task, $Shell->taskNames)) { + $this->shiftArgs(); + $Shell->{$task}->startup(); + + if (isset($this->args[0]) && $this->args[0] == 'help') { + if (method_exists($Shell->{$task}, 'help')) { + $Shell->{$task}->help(); + } else { + $this->help(); + } + return true; + } + return $Shell->{$task}->execute(); + } + $methods = array_diff(get_class_methods('Shell'), array('help')); + } + $methods = array_diff(get_class_methods($Shell), $methods); + $added = in_array(strtolower($arg), array_map('strtolower', $methods)); + $private = $arg[0] == '_' && method_exists($Shell, $arg); + + if (!$private) { + if ($added) { + $this->shiftArgs(); + $Shell->startup(); + return $Shell->{$arg}(); + } + if (method_exists($Shell, 'main')) { + $Shell->startup(); + return $Shell->main(); + } + } + + $title = sprintf(__('Error: Unknown %1$s command %2$s.', true), $this->shellName, $arg); + $message = sprintf(__('For usage try `cake %s help`', true), $this->shell); + $this->stderr($title . "\n" . $message . "\n"); + return false; + } + +/** + * Get shell to use, either plugin shell or application shell + * + * All paths in the shellPaths property are searched. + * shell, shellPath and shellClass properties are taken into account. + * + * @param string $plugin Optionally the name of a plugin + * @return mixed False if no shell could be found or an object on success + * @access protected + */ + function _getShell($plugin = null) { + foreach ($this->shellPaths as $path) { + $this->shellPath = $path . $this->shell . '.php'; + $pluginShellPath = DS . $plugin . DS . 'vendors' . DS . 'shells' . DS; + + if ((strpos($path, $pluginShellPath) !== false || !$plugin) && file_exists($this->shellPath)) { + $loaded = true; + break; + } + } + if (!isset($loaded)) { + return false; + } + + if (!class_exists('Shell')) { + require CONSOLE_LIBS . 'shell.php'; + } + + if (!class_exists($this->shellClass)) { + require $this->shellPath; + } + if (!class_exists($this->shellClass)) { + return false; + } + $Shell = new $this->shellClass($this); + return $Shell; + } + +/** + * Prompts the user for input, and returns it. + * + * @param string $prompt Prompt text. + * @param mixed $options Array or string of options. + * @param string $default Default input value. + * @return Either the default value, or the user-provided input. + * @access public + */ + function getInput($prompt, $options = null, $default = null) { + if (!is_array($options)) { + $printOptions = ''; + } else { + $printOptions = '(' . implode('/', $options) . ')'; + } + + if ($default === null) { + $this->stdout($prompt . " $printOptions \n" . '> ', false); + } else { + $this->stdout($prompt . " $printOptions \n" . "[$default] > ", false); + } + $result = fgets($this->stdin); + + if ($result === false) { + exit; + } + $result = trim($result); + + if ($default != null && empty($result)) { + return $default; + } + return $result; + } + +/** + * Outputs to the stdout filehandle. + * + * @param string $string String to output. + * @param boolean $newline If true, the outputs gets an added newline. + * @return integer Returns the number of bytes output to stdout. + * @access public + */ + function stdout($string, $newline = true) { + if ($newline) { + return fwrite($this->stdout, $string . "\n"); + } else { + return fwrite($this->stdout, $string); + } + } + +/** + * Outputs to the stderr filehandle. + * + * @param string $string Error text to output. + * @access public + */ + function stderr($string) { + fwrite($this->stderr, $string); + } + +/** + * Parses command line options + * + * @param array $params Parameters to parse + * @access public + */ + function parseParams($params) { + $this->__parseParams($params); + $defaults = array('app' => 'app', 'root' => dirname(dirname(dirname(__FILE__))), 'working' => null, 'webroot' => 'webroot'); + $params = array_merge($defaults, array_intersect_key($this->params, $defaults)); + $isWin = false; + foreach ($defaults as $default => $value) { + if (strpos($params[$default], '\\') !== false) { + $isWin = true; + break; + } + } + $params = str_replace('\\', '/', $params); + + if (isset($params['working'])) { + $params['working'] = trim($params['working']); + } + if (!empty($params['working']) && (!isset($this->args[0]) || isset($this->args[0]) && $this->args[0]{0} !== '.')) { + if (empty($this->params['app']) && $params['working'] != $params['root']) { + $params['root'] = dirname($params['working']); + $params['app'] = basename($params['working']); + } else { + $params['root'] = $params['working']; + } + } + + if ($params['app'][0] == '/' || preg_match('/([a-z])(:)/i', $params['app'], $matches)) { + $params['root'] = dirname($params['app']); + } elseif (strpos($params['app'], '/')) { + $params['root'] .= '/' . dirname($params['app']); + } + + $params['app'] = basename($params['app']); + $params['working'] = rtrim($params['root'], '/'); + if (!$isWin || !preg_match('/^[A-Z]:$/i', $params['app'])) { + $params['working'] .= '/' . $params['app']; + } + + if (!empty($matches[0]) || !empty($isWin)) { + $params = str_replace('/', '\\', $params); + } + + $this->params = array_merge($this->params, $params); + } + +/** + * Helper for recursively parsing params + * + * @return array params + * @access private + */ + function __parseParams($params) { + $count = count($params); + for ($i = 0; $i < $count; $i++) { + if (isset($params[$i])) { + if ($params[$i]{0} === '-') { + $key = substr($params[$i], 1); + $this->params[$key] = true; + unset($params[$i]); + if (isset($params[++$i])) { + if ($params[$i]{0} !== '-') { + $this->params[$key] = str_replace('"', '', $params[$i]); + unset($params[$i]); + } else { + $i--; + $this->__parseParams($params); + } + } + } else { + $this->args[] = $params[$i]; + unset($params[$i]); + } + + } + } + } + +/** + * Removes first argument and shifts other arguments up + * + * @return mixed Null if there are no arguments otherwise the shifted argument + * @access public + */ + function shiftArgs() { + return array_shift($this->args); + } + +/** + * Shows console help + * + * @access public + */ + function help() { + $this->clear(); + $this->stdout("\nWelcome to CakePHP v" . Configure::version() . " Console"); + $this->stdout("---------------------------------------------------------------"); + $this->stdout("Current Paths:"); + $this->stdout(" -app: ". $this->params['app']); + $this->stdout(" -working: " . rtrim($this->params['working'], DS)); + $this->stdout(" -root: " . rtrim($this->params['root'], DS)); + $this->stdout(" -core: " . rtrim(CORE_PATH, DS)); + $this->stdout(""); + $this->stdout("Changing Paths:"); + $this->stdout("your working path should be the same as your application path"); + $this->stdout("to change your path use the '-app' param."); + $this->stdout("Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp"); + + $this->stdout("\nAvailable Shells:"); + $shellList = array(); + foreach ($this->shellPaths as $path) { + if (!is_dir($path)) { + continue; + } + $shells = App::objects('file', $path); + if (empty($shells)) { + continue; + } + if (preg_match('@plugins[\\\/]([^\\\/]*)@', $path, $matches)) { + $type = Inflector::camelize($matches[1]); + } elseif (preg_match('@([^\\\/]*)[\\\/]vendors[\\\/]@', $path, $matches)) { + $type = $matches[1]; + } elseif (strpos($path, CAKE_CORE_INCLUDE_PATH . DS . 'cake') === 0) { + $type = 'CORE'; + } else { + $type = 'app'; + } + foreach ($shells as $shell) { + if ($shell !== 'shell.php') { + $shell = str_replace('.php', '', $shell); + $shellList[$shell][$type] = $type; + } + } + } + if ($shellList) { + ksort($shellList); + if (DS === '/') { + $width = exec('tput cols') - 2; + } + if (empty($width)) { + $width = 80; + } + $columns = max(1, floor($width / 30)); + $rows = ceil(count($shellList) / $columns); + + foreach ($shellList as $shell => $types) { + sort($types); + $shellList[$shell] = str_pad($shell . ' [' . implode ($types, ', ') . ']', $width / $columns); + } + $out = array_chunk($shellList, $rows); + for ($i = 0; $i < $rows; $i++) { + $row = ''; + for ($j = 0; $j < $columns; $j++) { + if (!isset($out[$j][$i])) { + continue; + } + $row .= $out[$j][$i]; + } + $this->stdout(" " . $row); + } + } + $this->stdout("\nTo run a command, type 'cake shell_name [args]'"); + $this->stdout("To get help on a specific command, type 'cake shell_name help'"); + } + +/** + * Stop execution of the current script + * + * @param $status see http://php.net/exit for values + * @return void + * @access protected + */ + function _stop($status = 0) { + exit($status); + } +} +if (!defined('DISABLE_AUTO_DISPATCH')) { + $dispatcher = new ShellDispatcher($argv); +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/error.php b/code/ryzom/tools/server/www/webtt/cake/console/error.php new file mode 100644 index 000000000..e837d1b8d --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/error.php @@ -0,0 +1,265 @@ +stdout = fopen('php://stdout', 'w'); + $this->stderr = fopen('php://stderr', 'w'); + call_user_func_array(array(&$this, $method), $messages); + } + +/** + * Displays an error page (e.g. 404 Not found). + * + * @param array $params Parameters (code, name, and message) + * @access public + */ + function error($params) { + extract($params, EXTR_OVERWRITE); + $this->stderr($code . $name . $message."\n"); + $this->_stop(1); + } + +/** + * Convenience method to display a 404 page. + * + * @param array $params Parameters (url, message) + * @access public + */ + function error404($params) { + extract($params, EXTR_OVERWRITE); + $this->error(array( + 'code' => '404', + 'name' => 'Not found', + 'message' => sprintf(__("The requested address %s was not found on this server.", true), $url, $message) + )); + $this->_stop(1); + } + +/** + * Renders the Missing Controller web page. + * + * @param array $params Parameters (className) + * @access public + */ + function missingController($params) { + extract($params, EXTR_OVERWRITE); + $controllerName = str_replace('Controller', '', $className); + $this->stderr(sprintf(__("Missing Controller '%s'", true), $controllerName)); + $this->_stop(1); + } + +/** + * Renders the Missing Action web page. + * + * @param array $params Parameters (action, className) + * @access public + */ + function missingAction($params) { + extract($params, EXTR_OVERWRITE); + $this->stderr(sprintf(__("Missing Method '%s' in '%s'", true), $action, $className)); + $this->_stop(1); + } + +/** + * Renders the Private Action web page. + * + * @param array $params Parameters (action, className) + * @access public + */ + function privateAction($params) { + extract($params, EXTR_OVERWRITE); + $this->stderr(sprintf(__("Trying to access private method '%s' in '%s'", true), $action, $className)); + $this->_stop(1); + } + +/** + * Renders the Missing Table web page. + * + * @param array $params Parameters (table, className) + * @access public + */ + function missingTable($params) { + extract($params, EXTR_OVERWRITE); + $this->stderr(sprintf(__("Missing database table '%s' for model '%s'", true), $table, $className)); + $this->_stop(1); + } + +/** + * Renders the Missing Database web page. + * + * @param array $params Parameters + * @access public + */ + function missingDatabase($params = array()) { + $this->stderr(__("Missing Database", true)); + $this->_stop(1); + } + +/** + * Renders the Missing View web page. + * + * @param array $params Parameters (file, action, className) + * @access public + */ + function missingView($params) { + extract($params, EXTR_OVERWRITE); + $this->stderr(sprintf(__("Missing View '%s' for '%s' in '%s'", true), $file, $action, $className)); + $this->_stop(1); + } + +/** + * Renders the Missing Layout web page. + * + * @param array $params Parameters (file) + * @access public + */ + function missingLayout($params) { + extract($params, EXTR_OVERWRITE); + $this->stderr(sprintf(__("Missing Layout '%s'", true), $file)); + $this->_stop(1); + } + +/** + * Renders the Database Connection web page. + * + * @param array $params Parameters + * @access public + */ + function missingConnection($params) { + extract($params, EXTR_OVERWRITE); + $this->stderr(__("Missing Database Connection. Try 'cake bake'", true)); + $this->_stop(1); + } + +/** + * Renders the Missing Helper file web page. + * + * @param array $params Parameters (file, helper) + * @access public + */ + function missingHelperFile($params) { + extract($params, EXTR_OVERWRITE); + $this->stderr(sprintf(__("Missing Helper file '%s' for '%s'", true), $file, Inflector::camelize($helper))); + $this->_stop(1); + } + +/** + * Renders the Missing Helper class web page. + * + * @param array $params Parameters (file, helper) + * @access public + */ + function missingHelperClass($params) { + extract($params, EXTR_OVERWRITE); + $this->stderr(sprintf(__("Missing Helper class '%s' in '%s'", true), Inflector::camelize($helper), $file)); + $this->_stop(1); + } + +/** + * Renders the Missing Component file web page. + * + * @param array $params Parameters (file, component) + * @access public + */ + function missingComponentFile($params) { + extract($params, EXTR_OVERWRITE); + $this->stderr(sprintf(__("Missing Component file '%s' for '%s'", true), $file, Inflector::camelize($component))); + $this->_stop(1); + } + +/** + * Renders the Missing Component class web page. + * + * @param array $params Parameters (file, component) + * @access public + */ + function missingComponentClass($params) { + extract($params, EXTR_OVERWRITE); + $this->stderr(sprintf(__("Missing Component class '%s' in '%s'", true), Inflector::camelize($component), $file)); + $this->_stop(1); + } + +/** + * Renders the Missing Model class web page. + * + * @param array $params Parameters (className) + * @access public + */ + function missingModel($params) { + extract($params, EXTR_OVERWRITE); + $this->stderr(sprintf(__("Missing model '%s'", true), $className)); + $this->_stop(1); + } + +/** + * Outputs to the stdout filehandle. + * + * @param string $string String to output. + * @param boolean $newline If true, the outputs gets an added newline. + * @access public + */ + function stdout($string, $newline = true) { + if ($newline) { + fwrite($this->stdout, $string . "\n"); + } else { + fwrite($this->stdout, $string); + } + } + +/** + * Outputs to the stderr filehandle. + * + * @param string $string Error text to output. + * @access public + */ + function stderr($string) { + fwrite($this->stderr, "Error: ". $string . "\n"); + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/acl.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/acl.php new file mode 100644 index 000000000..ddedd74d2 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/acl.php @@ -0,0 +1,602 @@ +params['connection'])) { + $this->connection = $this->params['connection']; + } + + if (!in_array(Configure::read('Acl.classname'), array('DbAcl', 'DB_ACL'))) { + $out = "--------------------------------------------------\n"; + $out .= __("Error: Your current Cake configuration is set to", true) . "\n"; + $out .= __("an ACL implementation other than DB. Please change", true) . "\n"; + $out .= __("your core config to reflect your decision to use", true) . "\n"; + $out .= __("DbAcl before attempting to use this script", true) . ".\n"; + $out .= "--------------------------------------------------\n"; + $out .= sprintf(__("Current ACL Classname: %s", true), Configure::read('Acl.classname')) . "\n"; + $out .= "--------------------------------------------------\n"; + $this->err($out); + $this->_stop(); + } + + if ($this->command && !in_array($this->command, array('help'))) { + if (!config('database')) { + $this->out(__("Your database configuration was not found. Take a moment to create one.", true), true); + $this->args = null; + return $this->DbConfig->execute(); + } + require_once (CONFIGS.'database.php'); + + if (!in_array($this->command, array('initdb'))) { + $this->Acl =& new AclComponent(); + $controller = null; + $this->Acl->startup($controller); + } + } + } + +/** + * Override main() for help message hook + * + * @access public + */ + function main() { + $out = __("Available ACL commands:", true) . "\n"; + $out .= "\t - create\n"; + $out .= "\t - delete\n"; + $out .= "\t - setParent\n"; + $out .= "\t - getPath\n"; + $out .= "\t - check\n"; + $out .= "\t - grant\n"; + $out .= "\t - deny\n"; + $out .= "\t - inherit\n"; + $out .= "\t - view\n"; + $out .= "\t - initdb\n"; + $out .= "\t - help\n\n"; + $out .= __("For help, run the 'help' command. For help on a specific command, run 'help '", true); + $this->out($out); + } + +/** + * Creates an ARO/ACO node + * + * @access public + */ + function create() { + $this->_checkArgs(3, 'create'); + $this->checkNodeType(); + extract($this->__dataVars()); + + $class = ucfirst($this->args[0]); + $parent = $this->parseIdentifier($this->args[1]); + + if (!empty($parent) && $parent != '/' && $parent != 'root') { + $parent = $this->_getNodeId($class, $parent); + } else { + $parent = null; + } + + $data = $this->parseIdentifier($this->args[2]); + if (is_string($data) && $data != '/') { + $data = array('alias' => $data); + } elseif (is_string($data)) { + $this->error(__('/ can not be used as an alias!', true), __("\t/ is the root, please supply a sub alias", true)); + } + + $data['parent_id'] = $parent; + $this->Acl->{$class}->create(); + if ($this->Acl->{$class}->save($data)) { + $this->out(sprintf(__("New %s '%s' created.\n", true), $class, $this->args[2]), true); + } else { + $this->err(sprintf(__("There was a problem creating a new %s '%s'.", true), $class, $this->args[2])); + } + } + +/** + * Delete an ARO/ACO node. + * + * @access public + */ + function delete() { + $this->_checkArgs(2, 'delete'); + $this->checkNodeType(); + extract($this->__dataVars()); + + $identifier = $this->parseIdentifier($this->args[1]); + $nodeId = $this->_getNodeId($class, $identifier); + + if (!$this->Acl->{$class}->delete($nodeId)) { + $this->error(__("Node Not Deleted", true), sprintf(__("There was an error deleting the %s. Check that the node exists", true), $class) . ".\n"); + } + $this->out(sprintf(__("%s deleted", true), $class) . ".\n", true); + } + +/** + * Set parent for an ARO/ACO node. + * + * @access public + */ + function setParent() { + $this->_checkArgs(3, 'setParent'); + $this->checkNodeType(); + extract($this->__dataVars()); + $target = $this->parseIdentifier($this->args[1]); + $parent = $this->parseIdentifier($this->args[2]); + + $data = array( + $class => array( + 'id' => $this->_getNodeId($class, $target), + 'parent_id' => $this->_getNodeId($class, $parent) + ) + ); + $this->Acl->{$class}->create(); + if (!$this->Acl->{$class}->save($data)) { + $this->out(__("Error in setting new parent. Please make sure the parent node exists, and is not a descendant of the node specified.", true), true); + } else { + $this->out(sprintf(__("Node parent set to %s", true), $this->args[2]) . "\n", true); + } + } + +/** + * Get path to specified ARO/ACO node. + * + * @access public + */ + function getPath() { + $this->_checkArgs(2, 'getPath'); + $this->checkNodeType(); + extract($this->__dataVars()); + $identifier = $this->parseIdentifier($this->args[1]); + + $id = $this->_getNodeId($class, $identifier); + $nodes = $this->Acl->{$class}->getPath($id); + + if (empty($nodes)) { + $this->error( + sprintf(__("Supplied Node '%s' not found", true), $this->args[1]), + __("No tree returned.", true) + ); + } + $this->out(__('Path:', true)); + $this->hr(); + for ($i = 0; $i < count($nodes); $i++) { + $this->_outputNode($class, $nodes[$i], $i); + } + } + +/** + * Outputs a single node, Either using the alias or Model.key + * + * @param string $class Class name that is being used. + * @param array $node Array of node information. + * @param integer $indent indent level. + * @return void + * @access protected + */ + function _outputNode($class, $node, $indent) { + $indent = str_repeat(' ', $indent); + $data = $node[$class]; + if ($data['alias']) { + $this->out($indent . "[" . $data['id'] . "] " . $data['alias']); + } else { + $this->out($indent . "[" . $data['id'] . "] " . $data['model'] . '.' . $data['foreign_key']); + } + } + +/** + * Check permission for a given ARO to a given ACO. + * + * @access public + */ + function check() { + $this->_checkArgs(3, 'check'); + extract($this->__getParams()); + + if ($this->Acl->check($aro, $aco, $action)) { + $this->out(sprintf(__("%s is allowed.", true), $aroName), true); + } else { + $this->out(sprintf(__("%s is not allowed.", true), $aroName), true); + } + } + +/** + * Grant permission for a given ARO to a given ACO. + * + * @access public + */ + function grant() { + $this->_checkArgs(3, 'grant'); + extract($this->__getParams()); + + if ($this->Acl->allow($aro, $aco, $action)) { + $this->out(__("Permission granted.", true), true); + } else { + $this->out(__("Permission was not granted.", true), true); + } + } + +/** + * Deny access for an ARO to an ACO. + * + * @access public + */ + function deny() { + $this->_checkArgs(3, 'deny'); + extract($this->__getParams()); + + if ($this->Acl->deny($aro, $aco, $action)) { + $this->out(__("Permission denied.", true), true); + } else { + $this->out(__("Permission was not denied.", true), true); + } + } + +/** + * Set an ARO to inhermit permission to an ACO. + * + * @access public + */ + function inherit() { + $this->_checkArgs(3, 'inherit'); + extract($this->__getParams()); + + if ($this->Acl->inherit($aro, $aco, $action)) { + $this->out(__("Permission inherited.", true), true); + } else { + $this->out(__("Permission was not inherited.", true), true); + } + } + +/** + * Show a specific ARO/ACO node. + * + * @access public + */ + function view() { + $this->_checkArgs(1, 'view'); + $this->checkNodeType(); + extract($this->__dataVars()); + + if (isset($this->args[1])) { + $identity = $this->parseIdentifier($this->args[1]); + + $topNode = $this->Acl->{$class}->find('first', array( + 'conditions' => array($class . '.id' => $this->_getNodeId($class, $identity)) + )); + + $nodes = $this->Acl->{$class}->find('all', array( + 'conditions' => array( + $class . '.lft >=' => $topNode[$class]['lft'], + $class . '.lft <=' => $topNode[$class]['rght'] + ), + 'order' => $class . '.lft ASC' + )); + } else { + $nodes = $this->Acl->{$class}->find('all', array('order' => $class . '.lft ASC')); + } + + if (empty($nodes)) { + if (isset($this->args[1])) { + $this->error(sprintf(__("%s not found", true), $this->args[1]), __("No tree returned.", true)); + } elseif (isset($this->args[0])) { + $this->error(sprintf(__("%s not found", true), $this->args[0]), __("No tree returned.", true)); + } + } + $this->out($class . " tree:"); + $this->hr(); + + $stack = array(); + $last = null; + + foreach ($nodes as $n) { + $stack[] = $n; + if (!empty($last)) { + $end = end($stack); + if ($end[$class]['rght'] > $last) { + foreach ($stack as $k => $v) { + $end = end($stack); + if ($v[$class]['rght'] < $end[$class]['rght']) { + unset($stack[$k]); + } + } + } + } + $last = $n[$class]['rght']; + $count = count($stack); + + $this->_outputNode($class, $n, $count); + } + $this->hr(); + } + +/** + * Initialize ACL database. + * + * @access public + */ + function initdb() { + $this->Dispatch->args = array('schema', 'create', 'DbAcl'); + $this->Dispatch->dispatch(); + } + +/** + * Show help screen. + * + * @access public + */ + function help() { + $head = "-----------------------------------------------\n"; + $head .= __("Usage: cake acl ...", true) . "\n"; + $head .= "-----------------------------------------------\n"; + $head .= __("Commands:", true) . "\n"; + + $commands = array( + 'create' => "create aro|aco \n" . + "\t" . __("Creates a new ACL object under the parent", true) . "\n" . + "\t" . __("specified by , an id/alias.", true) . "\n" . + "\t" . __("The and references can be", true) . "\n" . + "\t" . __("in one of the following formats:", true) . "\n\n" . + "\t\t- " . __(". - The node will be bound to a", true) . "\n" . + "\t\t" . __("specific record of the given model.", true) . "\n\n" . + "\t\t- " . __(" - The node will be given a string alias,", true) . "\n" . + "\t\t" . __(" (or path, in the case of )", true) . "\n" . + "\t\t " . __("i.e. 'John'. When used with ,", true) . "\n" . + "\t\t" . __("this takes the form of an alias path,", true) . "\n" . + "\t\t " . __("i.e. //.", true) . "\n\n" . + "\t" . __("To add a node at the root level,", true) . "\n" . + "\t" . __("enter 'root' or '/' as the parameter.", true) . "\n", + + 'delete' => "delete aro|aco \n" . + "\t" . __("Deletes the ACL object with the given reference", true) . "\n" . + "\t" . __("For more detailed parameter usage info,", true) . "\n" . + "\t" . __("see help for the 'create' command.", true), + + 'setparent' => "setParent aro|aco \n" . + "\t" . __("Moves the ACL object specified by beneath", true) . "\n" . + "\t" . __("the parent ACL object specified by .", true) . "\n" . + "\t" . __("For more detailed parameter usage info,", true) . "\n" . + "\t" . __("see help for the 'create' command.", true), + + 'getpath' => "getPath aro|aco \n" . + "\t" . __("Returns the path to the ACL object specified by . This command", true) . "\n" . + "\t" . __("is useful in determining the inhertiance of permissions for a certain", true) . "\n" . + "\t" . __("object in the tree.", true) . "\n" . + "\t" . __("For more detailed parameter usage info,", true) . "\n" . + "\t" . __("see help for the 'create' command.", true), + + 'check' => "check [] " . __("or", true) . " all\n" . + "\t" . __("Use this command to check ACL permissions.", true) . "\n" . + "\t" . __("For more detailed parameter usage info,", true) . "\n" . + "\t" . __("see help for the 'create' command.", true), + + 'grant' => "grant [] " . __("or", true) . " all\n" . + "\t" . __("Use this command to grant ACL permissions. Once executed, the ARO", true) . "\n" . + "\t" . __("specified (and its children, if any) will have ALLOW access to the", true) . "\n" . + "\t" . __("specified ACO action (and the ACO's children, if any).", true) . "\n" . + "\t" . __("For more detailed parameter usage info,", true) . "\n" . + "\t" . __("see help for the 'create' command.", true), + + 'deny' => "deny []" . __("or", true) . " all\n" . + "\t" . __("Use this command to deny ACL permissions. Once executed, the ARO", true) . "\n" . + "\t" . __("specified (and its children, if any) will have DENY access to the", true) . "\n" . + "\t" . __("specified ACO action (and the ACO's children, if any).", true) . "\n" . + "\t" . __("For more detailed parameter usage info,", true) . "\n" . + "\t" . __("see help for the 'create' command.", true), + + 'inherit' => "inherit []" . __("or", true) . " all\n" . + "\t" . __("Use this command to force a child ARO object to inherit its", true) . "\n" . + "\t" . __("permissions settings from its parent.", true) . "\n" . + "\t" . __("For more detailed parameter usage info,", true) . "\n" . + "\t" . __("see help for the 'create' command.", true), + + 'view' => "view aro|aco []\n" . + "\t" . __("The view command will return the ARO or ACO tree.", true) . "\n" . + "\t" . __("The optional node parameter allows you to return", true) . "\n" . + "\t" . __("only a portion of the requested tree.", true) . "\n" . + "\t" . __("For more detailed parameter usage info,", true) . "\n" . + "\t" . __("see help for the 'create' command.", true), + + 'initdb' => "initdb\n". + "\t" . __("Uses this command : cake schema run create DbAcl", true), + + 'help' => "help []\n" . + "\t" . __("Displays this help message, or a message on a specific command.", true) + ); + + $this->out($head); + if (!isset($this->args[0])) { + foreach ($commands as $cmd) { + $this->out("{$cmd}\n\n"); + } + } elseif (isset($commands[strtolower($this->args[0])])) { + $this->out($commands[strtolower($this->args[0])] . "\n\n"); + } else { + $this->out(sprintf(__("Command '%s' not found", true), $this->args[0])); + } + } + +/** + * Check that first argument specifies a valid Node type (ARO/ACO) + * + * @access public + */ + function checkNodeType() { + if (!isset($this->args[0])) { + return false; + } + if ($this->args[0] != 'aco' && $this->args[0] != 'aro') { + $this->error(sprintf(__("Missing/Unknown node type: '%s'", true), $this->args[0]), __('Please specify which ACL object type you wish to create. Either "aro" or "aco"', true)); + } + } + +/** + * Checks that given node exists + * + * @param string $type Node type (ARO/ACO) + * @param integer $id Node id + * @return boolean Success + * @access public + */ + function nodeExists() { + if (!$this->checkNodeType() && !isset($this->args[1])) { + return false; + } + extract($this->__dataVars($this->args[0])); + $key = is_numeric($this->args[1]) ? $secondary_id : 'alias'; + $conditions = array($class . '.' . $key => $this->args[1]); + $possibility = $this->Acl->{$class}->find('all', compact('conditions')); + if (empty($possibility)) { + $this->error(sprintf(__("%s not found", true), $this->args[1]), __("No tree returned.", true)); + } + return $possibility; + } + +/** + * Parse an identifier into Model.foriegnKey or an alias. + * Takes an identifier determines its type and returns the result as used by other methods. + * + * @param string $identifier Identifier to parse + * @return mixed a string for aliases, and an array for model.foreignKey + */ + function parseIdentifier($identifier) { + if (preg_match('/^([\w]+)\.(.*)$/', $identifier, $matches)) { + return array( + 'model' => $matches[1], + 'foreign_key' => $matches[2], + ); + } + return $identifier; + } + +/** + * Get the node for a given identifier. $identifier can either be a string alias + * or an array of properties to use in AcoNode::node() + * + * @param string $class Class type you want (Aro/Aco) + * @param mixed $identifier A mixed identifier for finding the node. + * @return int Integer of NodeId. Will trigger an error if nothing is found. + */ + function _getNodeId($class, $identifier) { + $node = $this->Acl->{$class}->node($identifier); + if (empty($node)) { + if (is_array($identifier)) { + $identifier = var_export($identifier, true); + } + $this->error(sprintf(__('Could not find node using reference "%s"', true), $identifier)); + } + return Set::extract($node, "0.{$class}.id"); + } + +/** + * get params for standard Acl methods + * + * @return array aro, aco, action + * @access private + */ + function __getParams() { + $aro = is_numeric($this->args[0]) ? intval($this->args[0]) : $this->args[0]; + $aco = is_numeric($this->args[1]) ? intval($this->args[1]) : $this->args[1]; + $aroName = $aro; + $acoName = $aco; + + if (is_string($aro)) { + $aro = $this->parseIdentifier($aro); + } + if (is_string($aco)) { + $aco = $this->parseIdentifier($aco); + } + $action = null; + if (isset($this->args[2])) { + $action = $this->args[2]; + if ($action == '' || $action == 'all') { + $action = '*'; + } + } + return compact('aro', 'aco', 'action', 'aroName', 'acoName'); + } + +/** + * Build data parameters based on node type + * + * @param string $type Node type (ARO/ACO) + * @return array Variables + * @access private + */ + function __dataVars($type = null) { + if ($type == null) { + $type = $this->args[0]; + } + $vars = array(); + $class = ucwords($type); + $vars['secondary_id'] = (strtolower($class) == 'aro') ? 'foreign_key' : 'object_id'; + $vars['data_name'] = $type; + $vars['table_name'] = $type . 's'; + $vars['class'] = $class; + return $vars; + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/api.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/api.php new file mode 100644 index 000000000..0b2c00529 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/api.php @@ -0,0 +1,213 @@ +paths = array_merge($this->paths, array( + 'behavior' => LIBS . 'model' . DS . 'behaviors' . DS, + 'cache' => LIBS . 'cache' . DS, + 'controller' => LIBS . 'controller' . DS, + 'component' => LIBS . 'controller' . DS . 'components' . DS, + 'helper' => LIBS . 'view' . DS . 'helpers' . DS, + 'model' => LIBS . 'model' . DS, + 'view' => LIBS . 'view' . DS, + 'core' => LIBS + )); + } + +/** + * Override main() to handle action + * + * @access public + */ + function main() { + if (empty($this->args)) { + return $this->help(); + } + + $type = strtolower($this->args[0]); + + if (isset($this->paths[$type])) { + $path = $this->paths[$type]; + } else { + $path = $this->paths['core']; + } + + if (count($this->args) == 1) { + $file = $type; + $class = Inflector::camelize($type); + } elseif (count($this->args) > 1) { + $file = Inflector::underscore($this->args[1]); + $class = Inflector::camelize($file); + } + + $objects = App::objects('class', $path); + if (in_array($class, $objects)) { + if (in_array($type, array('behavior', 'component', 'helper')) && $type !== $file) { + if (!preg_match('/' . Inflector::camelize($type) . '$/', $class)) { + $class .= Inflector::camelize($type); + } + } + + } else { + $this->err(sprintf(__("%s not found", true), $class)); + $this->_stop(); + } + + $parsed = $this->__parseClass($path . $file .'.php'); + + if (!empty($parsed)) { + if (isset($this->params['m'])) { + if (!isset($parsed[$this->params['m']])) { + $this->err(sprintf(__("%s::%s() could not be found", true), $class, $this->params['m'])); + $this->_stop(); + } + $method = $parsed[$this->params['m']]; + $this->out($class .'::'.$method['method'] . $method['parameters']); + $this->hr(); + $this->out($method['comment'], true); + } else { + $this->out(ucwords($class)); + $this->hr(); + $i = 0; + foreach ($parsed as $method) { + $list[] = ++$i . ". " . $method['method'] . $method['parameters']; + } + $this->out($list); + + $methods = array_keys($parsed); + while ($number = strtolower($this->in(__('Select a number to see the more information about a specific method. q to quit. l to list.', true), null, 'q'))) { + if ($number === 'q') { + $this->out(__('Done', true)); + $this->_stop(); + } + + if ($number === 'l') { + $this->out($list); + } + + if (isset($methods[--$number])) { + $method = $parsed[$methods[$number]]; + $this->hr(); + $this->out($class .'::'.$method['method'] . $method['parameters']); + $this->hr(); + $this->out($method['comment'], true); + } + } + } + } + } + +/** + * Show help for this shell. + * + * @access public + */ + function help() { + $head = "Usage: cake api [] [-m ]\n"; + $head .= "-----------------------------------------------\n"; + $head .= "Parameters:\n\n"; + + $commands = array( + 'path' => "\t\n" . + "\t\tEither a full path or type of class (model, behavior, controller, component, view, helper).\n". + "\t\tAvailable values:\n\n". + "\t\tbehavior\tLook for class in CakePHP behavior path\n". + "\t\tcache\tLook for class in CakePHP cache path\n". + "\t\tcontroller\tLook for class in CakePHP controller path\n". + "\t\tcomponent\tLook for class in CakePHP component path\n". + "\t\thelper\tLook for class in CakePHP helper path\n". + "\t\tmodel\tLook for class in CakePHP model path\n". + "\t\tview\tLook for class in CakePHP view path\n", + 'className' => "\t\n" . + "\t\tA CakePHP core class name (e.g: Component, HtmlHelper).\n" + ); + + $this->out($head); + if (!isset($this->args[1])) { + foreach ($commands as $cmd) { + $this->out("{$cmd}\n\n"); + } + } elseif (isset($commands[strtolower($this->args[1])])) { + $this->out($commands[strtolower($this->args[1])] . "\n\n"); + } else { + $this->out("Command '" . $this->args[1] . "' not found"); + } + } + +/** + * Parse a given class (located on given file) and get public methods and their + * signatures. + * + * @param object $File File object + * @param string $class Class name + * @return array Methods and signatures indexed by method name + * @access private + */ + function __parseClass($path) { + $parsed = array(); + + $File = new File($path); + if (!$File->exists()) { + $this->err(sprintf(__("%s could not be found", true), $File->name)); + $this->_stop(); + } + + $contents = $File->read(); + + if (preg_match_all('%(/\\*\\*[\\s\\S]*?\\*/)(\\s+function\\s+\\w+)(\\(.*\\))%', $contents, $result, PREG_PATTERN_ORDER)) { + foreach ($result[2] as $key => $method) { + $method = str_replace('function ', '', trim($method)); + + if (strpos($method, '__') === false && $method[0] != '_') { + $parsed[$method] = array( + 'comment' => str_replace(array('/*', '*/', '*'), '', trim($result[1][$key])), + 'method' => $method, + 'parameters' => trim($result[3][$key]) + ); + } + } + } + ksort($parsed); + return $parsed; + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/bake.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/bake.php new file mode 100644 index 000000000..874957268 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/bake.php @@ -0,0 +1,230 @@ +command); + if (isset($this->{$task}) && !in_array($task, array('Project', 'DbConfig'))) { + if (isset($this->params['connection'])) { + $this->{$task}->connection = $this->params['connection']; + } + foreach($this->args as $i => $arg) { + if (strpos($arg, '.')) { + list($this->params['plugin'], $this->args[$i]) = pluginSplit($arg); + break; + } + } + if (isset($this->params['plugin'])) { + $this->{$task}->plugin = $this->params['plugin']; + } + } + } + +/** + * Override main() to handle action + * + * @access public + */ + function main() { + if (!is_dir($this->DbConfig->path)) { + if ($this->Project->execute()) { + $this->DbConfig->path = $this->params['working'] . DS . 'config' . DS; + } else { + return false; + } + } + + if (!config('database')) { + $this->out(__("Your database configuration was not found. Take a moment to create one.", true)); + $this->args = null; + return $this->DbConfig->execute(); + } + $this->out('Interactive Bake Shell'); + $this->hr(); + $this->out('[D]atabase Configuration'); + $this->out('[M]odel'); + $this->out('[V]iew'); + $this->out('[C]ontroller'); + $this->out('[P]roject'); + $this->out('[F]ixture'); + $this->out('[T]est case'); + $this->out('[Q]uit'); + + $classToBake = strtoupper($this->in(__('What would you like to Bake?', true), array('D', 'M', 'V', 'C', 'P', 'F', 'T', 'Q'))); + switch ($classToBake) { + case 'D': + $this->DbConfig->execute(); + break; + case 'M': + $this->Model->execute(); + break; + case 'V': + $this->View->execute(); + break; + case 'C': + $this->Controller->execute(); + break; + case 'P': + $this->Project->execute(); + break; + case 'F': + $this->Fixture->execute(); + break; + case 'T': + $this->Test->execute(); + break; + case 'Q': + exit(0); + break; + default: + $this->out(__('You have made an invalid selection. Please choose a type of class to Bake by entering D, M, V, F, T, or C.', true)); + } + $this->hr(); + $this->main(); + } + +/** + * Quickly bake the MVC + * + * @access public + */ + function all() { + $this->hr(); + $this->out('Bake All'); + $this->hr(); + + if (!isset($this->params['connection']) && empty($this->connection)) { + $this->connection = $this->DbConfig->getConfig(); + } + + if (empty($this->args)) { + $this->Model->interactive = true; + $name = $this->Model->getName($this->connection); + } + + foreach (array('Model', 'Controller', 'View') as $task) { + $this->{$task}->connection = $this->connection; + $this->{$task}->interactive = false; + } + + if (!empty($this->args[0])) { + $name = $this->args[0]; + } + + $modelExists = false; + $model = $this->_modelName($name); + if (App::import('Model', $model)) { + $object = new $model(); + $modelExists = true; + } else { + App::import('Model', 'Model', false); + $object = new Model(array('name' => $name, 'ds' => $this->connection)); + } + + $modelBaked = $this->Model->bake($object, false); + + if ($modelBaked && $modelExists === false) { + $this->out(sprintf(__('%s Model was baked.', true), $model)); + if ($this->_checkUnitTest()) { + $this->Model->bakeFixture($model); + $this->Model->bakeTest($model); + } + $modelExists = true; + } + + if ($modelExists === true) { + $controller = $this->_controllerName($name); + if ($this->Controller->bake($controller, $this->Controller->bakeActions($controller))) { + $this->out(sprintf(__('%s Controller was baked.', true), $name)); + if ($this->_checkUnitTest()) { + $this->Controller->bakeTest($controller); + } + } + if (App::import('Controller', $controller)) { + $this->View->args = array($controller); + $this->View->execute(); + $this->out(sprintf(__('%s Views were baked.', true), $name)); + } + $this->out(__('Bake All complete', true)); + array_shift($this->args); + } else { + $this->err(__('Bake All could not continue without a valid model', true)); + } + $this->_stop(); + } + +/** + * Displays help contents + * + * @access public + */ + function help() { + $this->out('CakePHP Bake:'); + $this->hr(); + $this->out('The Bake script generates controllers, views and models for your application.'); + $this->out('If run with no command line arguments, Bake guides the user through the class'); + $this->out('creation process. You can customize the generation process by telling Bake'); + $this->out('where different parts of your application are using command line arguments.'); + $this->hr(); + $this->out("Usage: cake bake ..."); + $this->hr(); + $this->out('Params:'); + $this->out("\t-app Absolute/Relative path to your app folder.\n"); + $this->out('Commands:'); + $this->out("\n\tbake help\n\t\tshows this help message."); + $this->out("\n\tbake all \n\t\tbakes complete MVC. optional of a Model"); + $this->out("\n\tbake project \n\t\tbakes a new app folder in the path supplied\n\t\tor in current directory if no path is specified"); + $this->out("\n\tbake plugin \n\t\tbakes a new plugin folder in the path supplied\n\t\tor in current directory if no path is specified."); + $this->out("\n\tbake db_config\n\t\tbakes a database.php file in config directory."); + $this->out("\n\tbake model\n\t\tbakes a model. run 'bake model help' for more info"); + $this->out("\n\tbake view\n\t\tbakes views. run 'bake view help' for more info"); + $this->out("\n\tbake controller\n\t\tbakes a controller. run 'bake controller help' for more info"); + $this->out("\n\tbake fixture\n\t\tbakes fixtures. run 'bake fixture help' for more info."); + $this->out("\n\tbake test\n\t\tbakes unit tests. run 'bake test help' for more info."); + $this->out(); + + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/console.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/console.php new file mode 100644 index 000000000..ac7b595bb --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/console.php @@ -0,0 +1,361 @@ +Dispatcher = new Dispatcher(); + $this->models = App::objects('model'); + App::import('Model', $this->models); + + foreach ($this->models as $model) { + $class = Inflector::camelize(str_replace('.php', '', $model)); + $this->models[$model] = $class; + $this->{$class} =& new $class(); + } + $this->out('Model classes:'); + $this->out('--------------'); + + foreach ($this->models as $model) { + $this->out(" - {$model}"); + } + $this->_loadRoutes(); + } + +/** + * Prints the help message + * + * @access public + */ + function help() { + $out = 'Console help:'; + $out .= '-------------'; + $out .= 'The interactive console is a tool for testing parts of your app before you'; + $out .= 'write code.'; + $out .= "\n"; + $out .= 'Model testing:'; + $out .= 'To test model results, use the name of your model without a leading $'; + $out .= 'e.g. Foo->find("all")'; + $out .= "\n"; + $out .= 'To dynamically set associations, you can do the following:'; + $out .= "\tModelA bind ModelB"; + $out .= "where the supported assocations are hasOne, hasMany, belongsTo, hasAndBelongsToMany"; + $out .= "\n"; + $out .= 'To dynamically remove associations, you can do the following:'; + $out .= "\t ModelA unbind ModelB"; + $out .= "where the supported associations are the same as above"; + $out .= "\n"; + $out .= "To save a new field in a model, you can do the following:"; + $out .= "\tModelA->save(array('foo' => 'bar', 'baz' => 0))"; + $out .= "where you are passing a hash of data to be saved in the format"; + $out .= "of field => value pairs"; + $out .= "\n"; + $out .= "To get column information for a model, use the following:"; + $out .= "\tModelA columns"; + $out .= "which returns a list of columns and their type"; + $out .= "\n"; + $out .= "\n"; + $out .= 'Route testing:'; + $out .= "\n"; + $out .= 'To test URLs against your app\'s route configuration, type:'; + $out .= "\n"; + $out .= "\tRoute "; + $out .= "\n"; + $out .= "where url is the path to your your action plus any query parameters,"; + $out .= "minus the application's base path. For example:"; + $out .= "\n"; + $out .= "\tRoute /posts/view/1"; + $out .= "\n"; + $out .= "will return something like the following:"; + $out .= "\n"; + $out .= "\tarray ("; + $out .= "\t [...]"; + $out .= "\t 'controller' => 'posts',"; + $out .= "\t 'action' => 'view',"; + $out .= "\t [...]"; + $out .= "\t)"; + $out .= "\n"; + $out .= 'Alternatively, you can use simple array syntax to test reverse'; + $out .= 'To reload your routes config (config/routes.php), do the following:'; + $out .= "\n"; + $out .= "\tRoutes reload"; + $out .= "\n"; + $out .= 'To show all connected routes, do the following:'; + $out .= "\tRoutes show"; + $this->out($out); + } + +/** + * Override main() to handle action + * + * @access public + */ + function main($command = null) { + while (true) { + if (empty($command)) { + $command = trim($this->in('')); + } + + switch ($command) { + case 'help': + $this->help(); + break; + case 'quit': + case 'exit': + return true; + break; + case 'models': + $this->out('Model classes:'); + $this->hr(); + foreach ($this->models as $model) { + $this->out(" - {$model}"); + } + break; + case (preg_match("/^(\w+) bind (\w+) (\w+)/", $command, $tmp) == true): + foreach ($tmp as $data) { + $data = strip_tags($data); + $data = str_replace($this->badCommandChars, "", $data); + } + + $modelA = $tmp[1]; + $association = $tmp[2]; + $modelB = $tmp[3]; + + if ($this->_isValidModel($modelA) && $this->_isValidModel($modelB) && in_array($association, $this->associations)) { + $this->{$modelA}->bindModel(array($association => array($modelB => array('className' => $modelB))), false); + $this->out("Created $association association between $modelA and $modelB"); + } else { + $this->out("Please verify you are using valid models and association types"); + } + break; + case (preg_match("/^(\w+) unbind (\w+) (\w+)/", $command, $tmp) == true): + foreach ($tmp as $data) { + $data = strip_tags($data); + $data = str_replace($this->badCommandChars, "", $data); + } + + $modelA = $tmp[1]; + $association = $tmp[2]; + $modelB = $tmp[3]; + + // Verify that there is actually an association to unbind + $currentAssociations = $this->{$modelA}->getAssociated(); + $validCurrentAssociation = false; + + foreach ($currentAssociations as $model => $currentAssociation) { + if ($model == $modelB && $association == $currentAssociation) { + $validCurrentAssociation = true; + } + } + + if ($this->_isValidModel($modelA) && $this->_isValidModel($modelB) && in_array($association, $this->associations) && $validCurrentAssociation) { + $this->{$modelA}->unbindModel(array($association => array($modelB))); + $this->out("Removed $association association between $modelA and $modelB"); + } else { + $this->out("Please verify you are using valid models, valid current association, and valid association types"); + } + break; + case (strpos($command, "->find") > 0): + // Remove any bad info + $command = strip_tags($command); + $command = str_replace($this->badCommandChars, "", $command); + + // Do we have a valid model? + list($modelToCheck, $tmp) = explode('->', $command); + + if ($this->_isValidModel($modelToCheck)) { + $findCommand = "\$data = \$this->$command;"; + @eval($findCommand); + + if (is_array($data)) { + foreach ($data as $idx => $results) { + if (is_numeric($idx)) { // findAll() output + foreach ($results as $modelName => $result) { + $this->out("$modelName"); + + foreach ($result as $field => $value) { + if (is_array($value)) { + foreach ($value as $field2 => $value2) { + $this->out("\t$field2: $value2"); + } + + $this->out(); + } else { + $this->out("\t$field: $value"); + } + } + } + } else { // find() output + $this->out($idx); + + foreach ($results as $field => $value) { + if (is_array($value)) { + foreach ($value as $field2 => $value2) { + $this->out("\t$field2: $value2"); + } + + $this->out(); + } else { + $this->out("\t$field: $value"); + } + } + } + } + } else { + $this->out("\nNo result set found"); + } + } else { + $this->out("$modelToCheck is not a valid model"); + } + + break; + case (strpos($command, '->save') > 0): + // Validate the model we're trying to save here + $command = strip_tags($command); + $command = str_replace($this->badCommandChars, "", $command); + list($modelToSave, $tmp) = explode("->", $command); + + if ($this->_isValidModel($modelToSave)) { + // Extract the array of data we are trying to build + list($foo, $data) = explode("->save", $command); + $data = preg_replace('/^\(*(array)?\(*(.+?)\)*$/i', '\\2', $data); + $saveCommand = "\$this->{$modelToSave}->save(array('{$modelToSave}' => array({$data})));"; + @eval($saveCommand); + $this->out('Saved record for ' . $modelToSave); + } + break; + case (preg_match("/^(\w+) columns/", $command, $tmp) == true): + $modelToCheck = strip_tags(str_replace($this->badCommandChars, "", $tmp[1])); + + if ($this->_isValidModel($modelToCheck)) { + // Get the column info for this model + $fieldsCommand = "\$data = \$this->{$modelToCheck}->getColumnTypes();"; + @eval($fieldsCommand); + + if (is_array($data)) { + foreach ($data as $field => $type) { + $this->out("\t{$field}: {$type}"); + } + } + } else { + $this->out("Please verify that you selected a valid model"); + } + break; + case (preg_match("/^routes\s+reload/i", $command, $tmp) == true): + $router =& Router::getInstance(); + if (!$this->_loadRoutes()) { + $this->out("There was an error loading the routes config. Please check that the file"); + $this->out("exists and is free of parse errors."); + break; + } + $this->out("Routes configuration reloaded, " . count($router->routes) . " routes connected"); + break; + case (preg_match("/^routes\s+show/i", $command, $tmp) == true): + $router =& Router::getInstance(); + $this->out(implode("\n", Set::extract($router->routes, '{n}.0'))); + break; + case (preg_match("/^route\s+(\(.*\))$/i", $command, $tmp) == true): + if ($url = eval('return array' . $tmp[1] . ';')) { + $this->out(Router::url($url)); + } + break; + case (preg_match("/^route\s+(.*)/i", $command, $tmp) == true): + $this->out(var_export(Router::parse($tmp[1]), true)); + break; + default: + $this->out("Invalid command\n"); + break; + } + $command = ''; + } + } + +/** + * Tells if the specified model is included in the list of available models + * + * @param string $modelToCheck + * @return boolean true if is an available model, false otherwise + * @access protected + */ + function _isValidModel($modelToCheck) { + return in_array($modelToCheck, $this->models); + } + +/** + * Reloads the routes configuration from config/routes.php, and compiles + * all routes found + * + * @return boolean True if config reload was a success, otherwise false + * @access protected + */ + function _loadRoutes() { + $router =& Router::getInstance(); + + $router->reload(); + extract($router->getNamedExpressions()); + + if (!@include(CONFIGS . 'routes.php')) { + return false; + } + $router->parse('/'); + + foreach (array_keys($router->getNamedExpressions()) as $var) { + unset(${$var}); + } + for ($i = 0, $len = count($router->routes); $i < $len; $i++) { + $router->routes[$i]->compile(); + } + return true; + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/i18n.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/i18n.php new file mode 100644 index 000000000..bdfa378fb --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/i18n.php @@ -0,0 +1,128 @@ +_welcome(); + if (isset($this->params['datasource'])) { + $this->dataSource = $this->params['datasource']; + } + + if ($this->command && !in_array($this->command, array('help'))) { + if (!config('database')) { + $this->out(__('Your database configuration was not found. Take a moment to create one.', true), true); + return $this->DbConfig->execute(); + } + } + } + +/** + * Override main() for help message hook + * + * @access public + */ + function main() { + $this->out(__('I18n Shell', true)); + $this->hr(); + $this->out(__('[E]xtract POT file from sources', true)); + $this->out(__('[I]nitialize i18n database table', true)); + $this->out(__('[H]elp', true)); + $this->out(__('[Q]uit', true)); + + $choice = strtolower($this->in(__('What would you like to do?', true), array('E', 'I', 'H', 'Q'))); + switch ($choice) { + case 'e': + $this->Extract->execute(); + break; + case 'i': + $this->initdb(); + break; + case 'h': + $this->help(); + break; + case 'q': + exit(0); + break; + default: + $this->out(__('You have made an invalid selection. Please choose a command to execute by entering E, I, H, or Q.', true)); + } + $this->hr(); + $this->main(); + } + +/** + * Initialize I18N database. + * + * @access public + */ + function initdb() { + $this->Dispatch->args = array('schema', 'create', 'i18n'); + $this->Dispatch->dispatch(); + } + +/** + * Show help screen. + * + * @access public + */ + function help() { + $this->hr(); + $this->out(__('I18n Shell:', true)); + $this->hr(); + $this->out(__('I18n Shell initializes i18n database table for your application', true)); + $this->out(__('and generates .pot file(s) with translations.', true)); + $this->hr(); + $this->out(__('usage:', true)); + $this->out(' cake i18n help'); + $this->out(' cake i18n initdb [-datasource custom]'); + $this->out(); + $this->hr(); + + $this->Extract->help(); + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/schema.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/schema.php new file mode 100644 index 000000000..8a0c9547d --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/schema.php @@ -0,0 +1,512 @@ +_welcome(); + $this->out('Cake Schema Shell'); + $this->hr(); + } + +/** + * Override startup + * + * @access public + */ + function startup() { + $name = $file = $path = $connection = $plugin = null; + if (!empty($this->params['name'])) { + $name = $this->params['name']; + } elseif (!empty($this->args[0])) { + $name = $this->params['name'] = $this->args[0]; + } + + if (strpos($name, '.')) { + list($this->params['plugin'], $splitName) = pluginSplit($name); + $name = $this->params['name'] = $splitName; + } + + if ($name) { + $this->params['file'] = Inflector::underscore($name); + } + + if (empty($this->params['file'])) { + $this->params['file'] = 'schema.php'; + } + if (strpos($this->params['file'], '.php') === false) { + $this->params['file'] .= '.php'; + } + $file = $this->params['file']; + + if (!empty($this->params['path'])) { + $path = $this->params['path']; + } + + if (!empty($this->params['connection'])) { + $connection = $this->params['connection']; + } + if (!empty($this->params['plugin'])) { + $plugin = $this->params['plugin']; + if (empty($name)) { + $name = $plugin; + } + } + $this->Schema =& new CakeSchema(compact('name', 'path', 'file', 'connection', 'plugin')); + } + +/** + * Override main + * + * @access public + */ + function main() { + $this->help(); + } + +/** + * Read and output contents of schema object + * path to read as second arg + * + * @access public + */ + function view() { + $File = new File($this->Schema->path . DS . $this->params['file']); + if ($File->exists()) { + $this->out($File->read()); + $this->_stop(); + } else { + $file = $this->Schema->path . DS . $this->params['file']; + $this->err(sprintf(__('Schema file (%s) could not be found.', true), $file)); + $this->_stop(); + } + } + +/** + * Read database and Write schema object + * accepts a connection as first arg or path to save as second arg + * + * @access public + */ + function generate() { + $this->out(__('Generating Schema...', true)); + $options = array(); + if (isset($this->params['f'])) { + $options = array('models' => false); + } + + $snapshot = false; + if (isset($this->args[0]) && $this->args[0] === 'snapshot') { + $snapshot = true; + } + + if (!$snapshot && file_exists($this->Schema->path . DS . $this->params['file'])) { + $snapshot = true; + $result = strtolower($this->in("Schema file exists.\n [O]verwrite\n [S]napshot\n [Q]uit\nWould you like to do?", array('o', 's', 'q'), 's')); + if ($result === 'q') { + return $this->_stop(); + } + if ($result === 'o') { + $snapshot = false; + } + } + + $cacheDisable = Configure::read('Cache.disable'); + Configure::write('Cache.disable', true); + + $content = $this->Schema->read($options); + $content['file'] = $this->params['file']; + + Configure::write('Cache.disable', $cacheDisable); + + if ($snapshot === true) { + $Folder =& new Folder($this->Schema->path); + $result = $Folder->read(); + + $numToUse = false; + if (isset($this->params['s'])) { + $numToUse = $this->params['s']; + } + + $count = 1; + if (!empty($result[1])) { + foreach ($result[1] as $file) { + if (preg_match('/schema(?:[_\d]*)?\.php$/', $file)) { + $count++; + } + } + } + + if ($numToUse !== false) { + if ($numToUse > $count) { + $count = $numToUse; + } + } + + $fileName = rtrim($this->params['file'], '.php'); + $content['file'] = $fileName . '_' . $count . '.php'; + } + + if ($this->Schema->write($content)) { + $this->out(sprintf(__('Schema file: %s generated', true), $content['file'])); + $this->_stop(); + } else { + $this->err(__('Schema file: %s generated', true)); + $this->_stop(); + } + } + +/** + * Dump Schema object to sql file + * Use the `write` param to enable and control SQL file output location. + * Simply using -write will write the sql file to the same dir as the schema file. + * If -write contains a full path name the file will be saved there. If -write only + * contains no DS, that will be used as the file name, in the same dir as the schema file. + * + * @access public + */ + function dump() { + $write = false; + $Schema = $this->Schema->load(); + if (!$Schema) { + $this->err(__('Schema could not be loaded', true)); + $this->_stop(); + } + if (isset($this->params['write'])) { + if ($this->params['write'] == 1) { + $write = Inflector::underscore($this->Schema->name); + } else { + $write = $this->params['write']; + } + } + $db =& ConnectionManager::getDataSource($this->Schema->connection); + $contents = "#" . $Schema->name . " sql generated on: " . date('Y-m-d H:i:s') . " : " . time() . "\n\n"; + $contents .= $db->dropSchema($Schema) . "\n\n". $db->createSchema($Schema); + + if ($write) { + if (strpos($write, '.sql') === false) { + $write .= '.sql'; + } + if (strpos($write, DS) !== false) { + $File =& new File($write, true); + } else { + $File =& new File($this->Schema->path . DS . $write, true); + } + + if ($File->write($contents)) { + $this->out(sprintf(__('SQL dump file created in %s', true), $File->pwd())); + $this->_stop(); + } else { + $this->err(__('SQL dump could not be created', true)); + $this->_stop(); + } + } + $this->out($contents); + return $contents; + } + +/** + * Run database create commands. Alias for run create. + * + * @return void + */ + function create() { + list($Schema, $table) = $this->_loadSchema(); + $this->__create($Schema, $table); + } + +/** + * Run database create commands. Alias for run create. + * + * @return void + */ + function update() { + list($Schema, $table) = $this->_loadSchema(); + $this->__update($Schema, $table); + } + +/** + * Prepares the Schema objects for database operations. + * + * @return void + */ + function _loadSchema() { + $name = $plugin = null; + if (isset($this->params['name'])) { + $name = $this->params['name']; + } + if (isset($this->params['plugin'])) { + $plugin = $this->params['plugin']; + } + + if (isset($this->params['dry'])) { + $this->__dry = true; + $this->out(__('Performing a dry run.', true)); + } + + $options = array('name' => $name, 'plugin' => $plugin); + if (isset($this->params['s'])) { + $fileName = rtrim($this->Schema->file, '.php'); + $options['file'] = $fileName . '_' . $this->params['s'] . '.php'; + } + + $Schema =& $this->Schema->load($options); + + if (!$Schema) { + $this->err(sprintf(__('%s could not be loaded', true), $this->Schema->path . DS . $this->Schema->file)); + $this->_stop(); + } + $table = null; + if (isset($this->args[1])) { + $table = $this->args[1]; + } + return array(&$Schema, $table); + } + +/** + * Create database from Schema object + * Should be called via the run method + * + * @access private + */ + function __create(&$Schema, $table = null) { + $db =& ConnectionManager::getDataSource($this->Schema->connection); + + $drop = $create = array(); + + if (!$table) { + foreach ($Schema->tables as $table => $fields) { + $drop[$table] = $db->dropSchema($Schema, $table); + $create[$table] = $db->createSchema($Schema, $table); + } + } elseif (isset($Schema->tables[$table])) { + $drop[$table] = $db->dropSchema($Schema, $table); + $create[$table] = $db->createSchema($Schema, $table); + } + if (empty($drop) || empty($create)) { + $this->out(__('Schema is up to date.', true)); + $this->_stop(); + } + + $this->out("\n" . __('The following table(s) will be dropped.', true)); + $this->out(array_keys($drop)); + + if ('y' == $this->in(__('Are you sure you want to drop the table(s)?', true), array('y', 'n'), 'n')) { + $this->out(__('Dropping table(s).', true)); + $this->__run($drop, 'drop', $Schema); + } + + $this->out("\n" . __('The following table(s) will be created.', true)); + $this->out(array_keys($create)); + + if ('y' == $this->in(__('Are you sure you want to create the table(s)?', true), array('y', 'n'), 'y')) { + $this->out(__('Creating table(s).', true)); + $this->__run($create, 'create', $Schema); + } + $this->out(__('End create.', true)); + } + +/** + * Update database with Schema object + * Should be called via the run method + * + * @access private + */ + function __update(&$Schema, $table = null) { + $db =& ConnectionManager::getDataSource($this->Schema->connection); + + $this->out(__('Comparing Database to Schema...', true)); + $options = array(); + if (isset($this->params['f'])) { + $options['models'] = false; + } + $Old = $this->Schema->read($options); + $compare = $this->Schema->compare($Old, $Schema); + + $contents = array(); + + if (empty($table)) { + foreach ($compare as $table => $changes) { + $contents[$table] = $db->alterSchema(array($table => $changes), $table); + } + } elseif (isset($compare[$table])) { + $contents[$table] = $db->alterSchema(array($table => $compare[$table]), $table); + } + + if (empty($contents)) { + $this->out(__('Schema is up to date.', true)); + $this->_stop(); + } + + $this->out("\n" . __('The following statements will run.', true)); + $this->out(array_map('trim', $contents)); + if ('y' == $this->in(__('Are you sure you want to alter the tables?', true), array('y', 'n'), 'n')) { + $this->out(); + $this->out(__('Updating Database...', true)); + $this->__run($contents, 'update', $Schema); + } + + $this->out(__('End update.', true)); + } + +/** + * Runs sql from __create() or __update() + * + * @access private + */ + function __run($contents, $event, &$Schema) { + if (empty($contents)) { + $this->err(__('Sql could not be run', true)); + return; + } + Configure::write('debug', 2); + $db =& ConnectionManager::getDataSource($this->Schema->connection); + + foreach ($contents as $table => $sql) { + if (empty($sql)) { + $this->out(sprintf(__('%s is up to date.', true), $table)); + } else { + if ($this->__dry === true) { + $this->out(sprintf(__('Dry run for %s :', true), $table)); + $this->out($sql); + } else { + if (!$Schema->before(array($event => $table))) { + return false; + } + $error = null; + if (!$db->execute($sql)) { + $error = $table . ': ' . $db->lastError(); + } + + $Schema->after(array($event => $table, 'errors' => $error)); + + if (!empty($error)) { + $this->out($error); + } else { + $this->out(sprintf(__('%s updated.', true), $table)); + } + } + } + } + } + +/** + * Displays help contents + * + * @access public + */ + function help() { + $help = << ... +--------------------------------------------------------------- +Params: + -connection + set db config . uses 'default' if none is specified + + -path + path to read and write schema.php. + default path: {$this->Schema->path} + + -name + Classname to use. If is Plugin.className, it will + set the plugin and name params. + + -file + file to read and write. + default file: {$this->Schema->file} + + -s + snapshot to use for run. + + -dry + Perform a dry run on create + update commands. + Queries will be output to window instead of executed. + + -f + force 'generate' to create a new schema. + + -plugin + Indicate the plugin to use. + +Commands: + + schema help + shows this help message. + + schema view + read and output contents of schema file. + + schema generate + reads from 'connection' writes to 'path' + To force generation of all tables into the schema, use the -f param. + Use 'schema generate snapshot ' to generate snapshots + which you can use with the -s parameter in the other operations. + + schema dump + Dump database sql based on schema file to stdout. + If you use the `-write` param is used a .sql will be generated. + If `-write` is a filename, then that file name will be generate. + If `-write` is a full path, the schema will be written there. + + schema create + Drop and create tables based on schema file + optional
argument can be used to create only a single + table in the schema. Pass the -s param with a number to use a snapshot. + Use the `-dry` param to preview the changes. + + schema update
+ Alter the tables based on schema file. Optional
+ parameter will only update one table. + To use a snapshot pass the `-s` param with the snapshot number. + To preview the changes that will be done use `-dry`. + To force update of all tables into the schema, use the -f param. +TEXT; + $this->out($help); + $this->_stop(); + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/shell.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/shell.php new file mode 100644 index 000000000..529f1c527 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/shell.php @@ -0,0 +1,647 @@ + 'command'); + + foreach ($vars as $key => $var) { + if (is_string($key)) { + $this->{$var} =& $dispatch->{$key}; + } else { + $this->{$var} =& $dispatch->{$var}; + } + } + + if ($this->name == null) { + $this->name = get_class($this); + } + + if ($this->alias == null) { + $this->alias = $this->name; + } + + ClassRegistry::addObject($this->name, $this); + ClassRegistry::map($this->name, $this->alias); + + if (!PHP5 && isset($this->args[0])) { + if (strpos($this->name, strtolower(Inflector::camelize($this->args[0]))) !== false) { + $dispatch->shiftArgs(); + } + if (strtolower($this->command) == strtolower(Inflector::variable($this->args[0])) && method_exists($this, $this->command)) { + $dispatch->shiftArgs(); + } + } + + $this->Dispatch =& $dispatch; + } + +/** + * Initializes the Shell + * acts as constructor for subclasses + * allows configuration of tasks prior to shell execution + * + * @access public + */ + function initialize() { + $this->_loadModels(); + } + +/** + * Starts up the Shell + * allows for checking and configuring prior to command or main execution + * can be overriden in subclasses + * + * @access public + */ + function startup() { + $this->_welcome(); + } + +/** + * Displays a header for the shell + * + * @access protected + */ + function _welcome() { + $this->Dispatch->clear(); + $this->out(); + $this->out('Welcome to CakePHP v' . Configure::version() . ' Console'); + $this->hr(); + $this->out('App : '. $this->params['app']); + $this->out('Path: '. $this->params['working']); + $this->hr(); + } + +/** + * Loads database file and constructs DATABASE_CONFIG class + * makes $this->DbConfig available to subclasses + * + * @return bool + * @access protected + */ + function _loadDbConfig() { + if (config('database') && class_exists('DATABASE_CONFIG')) { + $this->DbConfig =& new DATABASE_CONFIG(); + return true; + } + $this->err('Database config could not be loaded.'); + $this->out('Run `bake` to create the database configuration.'); + return false; + } + +/** + * if var $uses = true + * Loads AppModel file and constructs AppModel class + * makes $this->AppModel available to subclasses + * if var $uses is an array of models will load those models + * + * @return bool + * @access protected + */ + function _loadModels() { + if ($this->uses === null || $this->uses === false) { + return; + } + + if ($this->uses === true && App::import('Model', 'AppModel')) { + $this->AppModel =& new AppModel(false, false, false); + return true; + } + + if ($this->uses !== true && !empty($this->uses)) { + $uses = is_array($this->uses) ? $this->uses : array($this->uses); + + $modelClassName = $uses[0]; + if (strpos($uses[0], '.') !== false) { + list($plugin, $modelClassName) = explode('.', $uses[0]); + } + $this->modelClass = $modelClassName; + + foreach ($uses as $modelClass) { + list($plugin, $modelClass) = pluginSplit($modelClass, true); + if (PHP5) { + $this->{$modelClass} = ClassRegistry::init($plugin . $modelClass); + } else { + $this->{$modelClass} =& ClassRegistry::init($plugin . $modelClass); + } + } + return true; + } + return false; + } + +/** + * Loads tasks defined in var $tasks + * + * @return bool + * @access public + */ + function loadTasks() { + if ($this->tasks === null || $this->tasks === false || $this->tasks === true || empty($this->tasks)) { + return true; + } + + $tasks = $this->tasks; + if (!is_array($tasks)) { + $tasks = array($tasks); + } + + foreach ($tasks as $taskName) { + $task = Inflector::underscore($taskName); + $taskClass = Inflector::camelize($taskName . 'Task'); + + if (!class_exists($taskClass)) { + foreach ($this->Dispatch->shellPaths as $path) { + $taskPath = $path . 'tasks' . DS . $task . '.php'; + if (file_exists($taskPath)) { + require_once $taskPath; + break; + } + } + } + $taskClassCheck = $taskClass; + if (!PHP5) { + $taskClassCheck = strtolower($taskClass); + } + if (ClassRegistry::isKeySet($taskClassCheck)) { + $this->taskNames[] = $taskName; + if (!PHP5) { + $this->{$taskName} =& ClassRegistry::getObject($taskClassCheck); + } else { + $this->{$taskName} = ClassRegistry::getObject($taskClassCheck); + } + } else { + $this->taskNames[] = $taskName; + if (!PHP5) { + $this->{$taskName} =& new $taskClass($this->Dispatch); + } else { + $this->{$taskName} = new $taskClass($this->Dispatch); + } + } + + if (!isset($this->{$taskName})) { + $this->err("Task `{$taskName}` could not be loaded"); + $this->_stop(); + } + } + + return true; + } + +/** + * Prompts the user for input, and returns it. + * + * @param string $prompt Prompt text. + * @param mixed $options Array or string of options. + * @param string $default Default input value. + * @return Either the default value, or the user-provided input. + * @access public + */ + function in($prompt, $options = null, $default = null) { + if (!$this->interactive) { + return $default; + } + $in = $this->Dispatch->getInput($prompt, $options, $default); + + if ($options && is_string($options)) { + if (strpos($options, ',')) { + $options = explode(',', $options); + } elseif (strpos($options, '/')) { + $options = explode('/', $options); + } else { + $options = array($options); + } + } + if (is_array($options)) { + while ($in == '' || ($in && (!in_array(strtolower($in), $options) && !in_array(strtoupper($in), $options)) && !in_array($in, $options))) { + $in = $this->Dispatch->getInput($prompt, $options, $default); + } + } + if ($in) { + return $in; + } + } + +/** + * Outputs a single or multiple messages to stdout. If no parameters + * are passed outputs just a newline. + * + * @param mixed $message A string or a an array of strings to output + * @param integer $newlines Number of newlines to append + * @return integer Returns the number of bytes returned from writing to stdout. + * @access public + */ + function out($message = null, $newlines = 1) { + if (is_array($message)) { + $message = implode($this->nl(), $message); + } + return $this->Dispatch->stdout($message . $this->nl($newlines), false); + } + +/** + * Outputs a single or multiple error messages to stderr. If no parameters + * are passed outputs just a newline. + * + * @param mixed $message A string or a an array of strings to output + * @param integer $newlines Number of newlines to append + * @access public + */ + function err($message = null, $newlines = 1) { + if (is_array($message)) { + $message = implode($this->nl(), $message); + } + $this->Dispatch->stderr($message . $this->nl($newlines)); + } + +/** + * Returns a single or multiple linefeeds sequences. + * + * @param integer $multiplier Number of times the linefeed sequence should be repeated + * @access public + * @return string + */ + function nl($multiplier = 1) { + return str_repeat("\n", $multiplier); + } + +/** + * Outputs a series of minus characters to the standard output, acts as a visual separator. + * + * @param integer $newlines Number of newlines to pre- and append + * @access public + */ + function hr($newlines = 0) { + $this->out(null, $newlines); + $this->out('---------------------------------------------------------------'); + $this->out(null, $newlines); + } + +/** + * Displays a formatted error message + * and exits the application with status code 1 + * + * @param string $title Title of the error + * @param string $message An optional error message + * @access public + */ + function error($title, $message = null) { + $this->err(sprintf(__('Error: %s', true), $title)); + + if (!empty($message)) { + $this->err($message); + } + $this->_stop(1); + } + +/** + * Will check the number args matches otherwise throw an error + * + * @param integer $expectedNum Expected number of paramters + * @param string $command Command + * @access protected + */ + function _checkArgs($expectedNum, $command = null) { + if (!$command) { + $command = $this->command; + } + if (count($this->args) < $expectedNum) { + $message[] = "Got: " . count($this->args); + $message[] = "Expected: {$expectedNum}"; + $message[] = "Please type `cake {$this->shell} help` for help"; + $message[] = "on usage of the {$this->name} {$command}."; + $this->error('Wrong number of parameters', $message); + } + } + +/** + * Creates a file at given path + * + * @param string $path Where to put the file. + * @param string $contents Content to put in the file. + * @return boolean Success + * @access public + */ + function createFile($path, $contents) { + $path = str_replace(DS . DS, DS, $path); + + $this->out(); + $this->out(sprintf(__("Creating file %s", true), $path)); + + if (is_file($path) && $this->interactive === true) { + $prompt = sprintf(__('File `%s` exists, overwrite?', true), $path); + $key = $this->in($prompt, array('y', 'n', 'q'), 'n'); + + if (strtolower($key) == 'q') { + $this->out(__('Quitting.', true), 2); + $this->_stop(); + } elseif (strtolower($key) != 'y') { + $this->out(sprintf(__('Skip `%s`', true), $path), 2); + return false; + } + } + if (!class_exists('File')) { + require LIBS . 'file.php'; + } + + if ($File = new File($path, true)) { + $data = $File->prepare($contents); + $File->write($data); + $this->out(sprintf(__('Wrote `%s`', true), $path)); + return true; + } else { + $this->err(sprintf(__('Could not write to `%s`.', true), $path), 2); + return false; + } + } + +/** + * Outputs usage text on the standard output. Implement it in subclasses. + * + * @access public + */ + function help() { + if ($this->command != null) { + $this->err("Unknown {$this->name} command `{$this->command}`."); + $this->err("For usage, try `cake {$this->shell} help`.", 2); + } else { + $this->Dispatch->help(); + } + } + +/** + * Action to create a Unit Test + * + * @return boolean Success + * @access protected + */ + function _checkUnitTest() { + if (App::import('vendor', 'simpletest' . DS . 'simpletest')) { + return true; + } + $prompt = 'SimpleTest is not installed. Do you want to bake unit test files anyway?'; + $unitTest = $this->in($prompt, array('y','n'), 'y'); + $result = strtolower($unitTest) == 'y' || strtolower($unitTest) == 'yes'; + + if ($result) { + $this->out(); + $this->out('You can download SimpleTest from http://simpletest.org'); + } + return $result; + } + +/** + * Makes absolute file path easier to read + * + * @param string $file Absolute file path + * @return sting short path + * @access public + */ + function shortPath($file) { + $shortPath = str_replace(ROOT, null, $file); + $shortPath = str_replace('..' . DS, '', $shortPath); + return str_replace(DS . DS, DS, $shortPath); + } + +/** + * Creates the proper controller path for the specified controller class name + * + * @param string $name Controller class name + * @return string Path to controller + * @access protected + */ + function _controllerPath($name) { + return strtolower(Inflector::underscore($name)); + } + +/** + * Creates the proper controller plural name for the specified controller class name + * + * @param string $name Controller class name + * @return string Controller plural name + * @access protected + */ + function _controllerName($name) { + return Inflector::pluralize(Inflector::camelize($name)); + } + +/** + * Creates the proper controller camelized name (singularized) for the specified name + * + * @param string $name Name + * @return string Camelized and singularized controller name + * @access protected + */ + function _modelName($name) { + return Inflector::camelize(Inflector::singularize($name)); + } + +/** + * Creates the proper underscored model key for associations + * + * @param string $name Model class name + * @return string Singular model key + * @access protected + */ + function _modelKey($name) { + return Inflector::underscore($name) . '_id'; + } + +/** + * Creates the proper model name from a foreign key + * + * @param string $key Foreign key + * @return string Model name + * @access protected + */ + function _modelNameFromKey($key) { + return Inflector::camelize(str_replace('_id', '', $key)); + } + +/** + * creates the singular name for use in views. + * + * @param string $name + * @return string $name + * @access protected + */ + function _singularName($name) { + return Inflector::variable(Inflector::singularize($name)); + } + +/** + * Creates the plural name for views + * + * @param string $name Name to use + * @return string Plural name for views + * @access protected + */ + function _pluralName($name) { + return Inflector::variable(Inflector::pluralize($name)); + } + +/** + * Creates the singular human name used in views + * + * @param string $name Controller name + * @return string Singular human name + * @access protected + */ + function _singularHumanName($name) { + return Inflector::humanize(Inflector::underscore(Inflector::singularize($name))); + } + +/** + * Creates the plural human name used in views + * + * @param string $name Controller name + * @return string Plural human name + * @access protected + */ + function _pluralHumanName($name) { + return Inflector::humanize(Inflector::underscore($name)); + } + +/** + * Find the correct path for a plugin. Scans $pluginPaths for the plugin you want. + * + * @param string $pluginName Name of the plugin you want ie. DebugKit + * @return string $path path to the correct plugin. + */ + function _pluginPath($pluginName) { + return App::pluginPath($pluginName); + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/bake.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/bake.php new file mode 100644 index 000000000..8394bb531 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/bake.php @@ -0,0 +1,60 @@ +path; + if (isset($this->plugin)) { + $name = substr($this->name, 0, strlen($this->name) - 4); + $path = $this->_pluginPath($this->plugin) . Inflector::pluralize(Inflector::underscore($name)) . DS; + } + return $path; + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/controller.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/controller.php new file mode 100644 index 000000000..8ef10042b --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/controller.php @@ -0,0 +1,486 @@ +args)) { + return $this->__interactive(); + } + + if (isset($this->args[0])) { + if (!isset($this->connection)) { + $this->connection = 'default'; + } + if (strtolower($this->args[0]) == 'all') { + return $this->all(); + } + + $controller = $this->_controllerName($this->args[0]); + $actions = 'scaffold'; + + if (!empty($this->args[1]) && ($this->args[1] == 'public' || $this->args[1] == 'scaffold')) { + $this->out(__('Baking basic crud methods for ', true) . $controller); + $actions = $this->bakeActions($controller); + } elseif (!empty($this->args[1]) && $this->args[1] == 'admin') { + $admin = $this->Project->getPrefix(); + if ($admin) { + $this->out(sprintf(__('Adding %s methods', true), $admin)); + $actions = $this->bakeActions($controller, $admin); + } + } + + if (!empty($this->args[2]) && $this->args[2] == 'admin') { + $admin = $this->Project->getPrefix(); + if ($admin) { + $this->out(sprintf(__('Adding %s methods', true), $admin)); + $actions .= "\n" . $this->bakeActions($controller, $admin); + } + } + + if ($this->bake($controller, $actions)) { + if ($this->_checkUnitTest()) { + $this->bakeTest($controller); + } + } + } + } + +/** + * Bake All the controllers at once. Will only bake controllers for models that exist. + * + * @access public + * @return void + */ + function all() { + $this->interactive = false; + $this->listAll($this->connection, false); + ClassRegistry::config('Model', array('ds' => $this->connection)); + $unitTestExists = $this->_checkUnitTest(); + foreach ($this->__tables as $table) { + $model = $this->_modelName($table); + $controller = $this->_controllerName($model); + if (App::import('Model', $model)) { + $actions = $this->bakeActions($controller); + if ($this->bake($controller, $actions) && $unitTestExists) { + $this->bakeTest($controller); + } + } + } + } + +/** + * Interactive + * + * @access private + */ + function __interactive() { + $this->interactive = true; + $this->hr(); + $this->out(sprintf(__("Bake Controller\nPath: %s", true), $this->path)); + $this->hr(); + + if (empty($this->connection)) { + $this->connection = $this->DbConfig->getConfig(); + } + + $controllerName = $this->getName(); + $this->hr(); + $this->out(sprintf(__('Baking %sController', true), $controllerName)); + $this->hr(); + + $helpers = $components = array(); + $actions = ''; + $wannaUseSession = 'y'; + $wannaBakeAdminCrud = 'n'; + $useDynamicScaffold = 'n'; + $wannaBakeCrud = 'y'; + + $controllerFile = strtolower(Inflector::underscore($controllerName)); + + $question[] = __("Would you like to build your controller interactively?", true); + if (file_exists($this->path . $controllerFile .'_controller.php')) { + $question[] = sprintf(__("Warning: Choosing no will overwrite the %sController.", true), $controllerName); + } + $doItInteractive = $this->in(implode("\n", $question), array('y','n'), 'y'); + + if (strtolower($doItInteractive) == 'y') { + $this->interactive = true; + $useDynamicScaffold = $this->in( + __("Would you like to use dynamic scaffolding?", true), array('y','n'), 'n' + ); + + if (strtolower($useDynamicScaffold) == 'y') { + $wannaBakeCrud = 'n'; + $actions = 'scaffold'; + } else { + list($wannaBakeCrud, $wannaBakeAdminCrud) = $this->_askAboutMethods(); + + $helpers = $this->doHelpers(); + $components = $this->doComponents(); + + $wannaUseSession = $this->in( + __("Would you like to use Session flash messages?", true), array('y','n'), 'y' + ); + } + } else { + list($wannaBakeCrud, $wannaBakeAdminCrud) = $this->_askAboutMethods(); + } + + if (strtolower($wannaBakeCrud) == 'y') { + $actions = $this->bakeActions($controllerName, null, strtolower($wannaUseSession) == 'y'); + } + if (strtolower($wannaBakeAdminCrud) == 'y') { + $admin = $this->Project->getPrefix(); + $actions .= $this->bakeActions($controllerName, $admin, strtolower($wannaUseSession) == 'y'); + } + + $baked = false; + if ($this->interactive === true) { + $this->confirmController($controllerName, $useDynamicScaffold, $helpers, $components); + $looksGood = $this->in(__('Look okay?', true), array('y','n'), 'y'); + + if (strtolower($looksGood) == 'y') { + $baked = $this->bake($controllerName, $actions, $helpers, $components); + if ($baked && $this->_checkUnitTest()) { + $this->bakeTest($controllerName); + } + } + } else { + $baked = $this->bake($controllerName, $actions, $helpers, $components); + if ($baked && $this->_checkUnitTest()) { + $this->bakeTest($controllerName); + } + } + return $baked; + } + +/** + * Confirm a to be baked controller with the user + * + * @return void + */ + function confirmController($controllerName, $useDynamicScaffold, $helpers, $components) { + $this->out(); + $this->hr(); + $this->out(__('The following controller will be created:', true)); + $this->hr(); + $this->out(sprintf(__("Controller Name:\n\t%s", true), $controllerName)); + + if (strtolower($useDynamicScaffold) == 'y') { + $this->out("var \$scaffold;"); + } + + $properties = array( + 'helpers' => __("Helpers:", true), + 'components' => __('Components:', true), + ); + + foreach ($properties as $var => $title) { + if (count($$var)) { + $output = ''; + $length = count($$var); + foreach ($$var as $i => $propElement) { + if ($i != $length -1) { + $output .= ucfirst($propElement) . ', '; + } else { + $output .= ucfirst($propElement); + } + } + $this->out($title . "\n\t" . $output); + } + } + $this->hr(); + } + +/** + * Interact with the user and ask about which methods (admin or regular they want to bake) + * + * @return array Array containing (bakeRegular, bakeAdmin) answers + */ + function _askAboutMethods() { + $wannaBakeCrud = $this->in( + __("Would you like to create some basic class methods \n(index(), add(), view(), edit())?", true), + array('y','n'), 'n' + ); + $wannaBakeAdminCrud = $this->in( + __("Would you like to create the basic class methods for admin routing?", true), + array('y','n'), 'n' + ); + return array($wannaBakeCrud, $wannaBakeAdminCrud); + } + +/** + * Bake scaffold actions + * + * @param string $controllerName Controller name + * @param string $admin Admin route to use + * @param boolean $wannaUseSession Set to true to use sessions, false otherwise + * @return string Baked actions + * @access private + */ + function bakeActions($controllerName, $admin = null, $wannaUseSession = true) { + $currentModelName = $modelImport = $this->_modelName($controllerName); + $plugin = $this->plugin; + if ($plugin) { + $modelImport = $plugin . '.' . $modelImport; + } + if (!App::import('Model', $modelImport)) { + $this->err(__('You must have a model for this class to build basic methods. Please try again.', true)); + $this->_stop(); + } + + $modelObj =& ClassRegistry::init($currentModelName); + $controllerPath = $this->_controllerPath($controllerName); + $pluralName = $this->_pluralName($currentModelName); + $singularName = Inflector::variable($currentModelName); + $singularHumanName = $this->_singularHumanName($controllerName); + $pluralHumanName = $this->_pluralName($controllerName); + + $this->Template->set(compact('plugin', 'admin', 'controllerPath', 'pluralName', 'singularName', 'singularHumanName', + 'pluralHumanName', 'modelObj', 'wannaUseSession', 'currentModelName')); + $actions = $this->Template->generate('actions', 'controller_actions'); + return $actions; + } + +/** + * Assembles and writes a Controller file + * + * @param string $controllerName Controller name + * @param string $actions Actions to add, or set the whole controller to use $scaffold (set $actions to 'scaffold') + * @param array $helpers Helpers to use in controller + * @param array $components Components to use in controller + * @param array $uses Models to use in controller + * @return string Baked controller + * @access private + */ + function bake($controllerName, $actions = '', $helpers = null, $components = null) { + $isScaffold = ($actions === 'scaffold') ? true : false; + + $this->Template->set('plugin', Inflector::camelize($this->plugin)); + $this->Template->set(compact('controllerName', 'actions', 'helpers', 'components', 'isScaffold')); + $contents = $this->Template->generate('classes', 'controller'); + + $path = $this->getPath(); + $filename = $path . $this->_controllerPath($controllerName) . '_controller.php'; + if ($this->createFile($filename, $contents)) { + return $contents; + } + return false; + } + +/** + * Assembles and writes a unit test file + * + * @param string $className Controller class name + * @return string Baked test + * @access private + */ + function bakeTest($className) { + $this->Test->plugin = $this->plugin; + $this->Test->connection = $this->connection; + $this->Test->interactive = $this->interactive; + return $this->Test->bake('Controller', $className); + } + +/** + * Interact with the user and get a list of additional helpers + * + * @return array Helpers that the user wants to use. + */ + function doHelpers() { + return $this->_doPropertyChoices( + __("Would you like this controller to use other helpers\nbesides HtmlHelper and FormHelper?", true), + __("Please provide a comma separated list of the other\nhelper names you'd like to use.\nExample: 'Ajax, Javascript, Time'", true) + ); + } + +/** + * Interact with the user and get a list of additional components + * + * @return array Components the user wants to use. + */ + function doComponents() { + return $this->_doPropertyChoices( + __("Would you like this controller to use any components?", true), + __("Please provide a comma separated list of the component names you'd like to use.\nExample: 'Acl, Security, RequestHandler'", true) + ); + } + +/** + * Common code for property choice handling. + * + * @param string $prompt A yes/no question to precede the list + * @param sting $example A question for a comma separated list, with examples. + * @return array Array of values for property. + */ + function _doPropertyChoices($prompt, $example) { + $proceed = $this->in($prompt, array('y','n'), 'n'); + $property = array(); + if (strtolower($proceed) == 'y') { + $propertyList = $this->in($example); + $propertyListTrimmed = str_replace(' ', '', $propertyList); + $property = explode(',', $propertyListTrimmed); + } + return array_filter($property); + } + +/** + * Outputs and gets the list of possible controllers from database + * + * @param string $useDbConfig Database configuration name + * @param boolean $interactive Whether you are using listAll interactively and want options output. + * @return array Set of controllers + * @access public + */ + function listAll($useDbConfig = null) { + if (is_null($useDbConfig)) { + $useDbConfig = $this->connection; + } + $this->__tables = $this->Model->getAllTables($useDbConfig); + + if ($this->interactive == true) { + $this->out(__('Possible Controllers based on your current database:', true)); + $this->_controllerNames = array(); + $count = count($this->__tables); + for ($i = 0; $i < $count; $i++) { + $this->_controllerNames[] = $this->_controllerName($this->_modelName($this->__tables[$i])); + $this->out($i + 1 . ". " . $this->_controllerNames[$i]); + } + return $this->_controllerNames; + } + return $this->__tables; + } + +/** + * Forces the user to specify the controller he wants to bake, and returns the selected controller name. + * + * @param string $useDbConfig Connection name to get a controller name for. + * @return string Controller name + * @access public + */ + function getName($useDbConfig = null) { + $controllers = $this->listAll($useDbConfig); + $enteredController = ''; + + while ($enteredController == '') { + $enteredController = $this->in(__("Enter a number from the list above,\ntype in the name of another controller, or 'q' to exit", true), null, 'q'); + + if ($enteredController === 'q') { + $this->out(__("Exit", true)); + $this->_stop(); + } + + if ($enteredController == '' || intval($enteredController) > count($controllers)) { + $this->err(__("The Controller name you supplied was empty,\nor the number you selected was not an option. Please try again.", true)); + $enteredController = ''; + } + } + + if (intval($enteredController) > 0 && intval($enteredController) <= count($controllers) ) { + $controllerName = $controllers[intval($enteredController) - 1]; + } else { + $controllerName = Inflector::camelize($enteredController); + } + return $controllerName; + } + +/** + * Displays help contents + * + * @access public + */ + function help() { + $this->hr(); + $this->out("Usage: cake bake controller ..."); + $this->hr(); + $this->out('Arguments:'); + $this->out(); + $this->out(""); + $this->out("\tName of the controller to bake. Can use Plugin.name"); + $this->out("\tas a shortcut for plugin baking."); + $this->out(); + $this->out('Params:'); + $this->out(); + $this->out('-connection '); + $this->out("\tset db config . uses 'default' if none is specified"); + $this->out(); + $this->out('Commands:'); + $this->out(); + $this->out("controller "); + $this->out("\tbakes controller with var \$scaffold"); + $this->out(); + $this->out("controller public"); + $this->out("\tbakes controller with basic crud actions"); + $this->out("\t(index, view, add, edit, delete)"); + $this->out(); + $this->out("controller admin"); + $this->out("\tbakes a controller with basic crud actions for one of the"); + $this->out("\tConfigure::read('Routing.prefixes') methods."); + $this->out(); + $this->out("controller public admin"); + $this->out("\tbakes a controller with basic crud actions for one"); + $this->out("\tConfigure::read('Routing.prefixes') and non admin methods."); + $this->out("\t(index, view, add, edit, delete,"); + $this->out("\tadmin_index, admin_view, admin_edit, admin_add, admin_delete)"); + $this->out(); + $this->out("controller all"); + $this->out("\tbakes all controllers with CRUD methods."); + $this->out(); + $this->_stop(); + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/db_config.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/db_config.php new file mode 100644 index 000000000..df86d19f2 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/db_config.php @@ -0,0 +1,368 @@ + 'default', 'driver'=> 'mysql', 'persistent'=> 'false', 'host'=> 'localhost', + 'login'=> 'root', 'password'=> 'password', 'database'=> 'project_name', + 'schema'=> null, 'prefix'=> null, 'encoding' => null, 'port' => null + ); + +/** + * String name of the database config class name. + * Used for testing. + * + * @var string + */ + var $databaseClassName = 'DATABASE_CONFIG'; + +/** + * initialization callback + * + * @var string + * @access public + */ + function initialize() { + $this->path = $this->params['working'] . DS . 'config' . DS; + } + +/** + * Execution method always used for tasks + * + * @access public + */ + function execute() { + if (empty($this->args)) { + $this->__interactive(); + $this->_stop(); + } + } + +/** + * Interactive interface + * + * @access private + */ + function __interactive() { + $this->hr(); + $this->out('Database Configuration:'); + $this->hr(); + $done = false; + $dbConfigs = array(); + + while ($done == false) { + $name = ''; + + while ($name == '') { + $name = $this->in("Name:", null, 'default'); + if (preg_match('/[^a-z0-9_]/i', $name)) { + $name = ''; + $this->out('The name may only contain unaccented latin characters, numbers or underscores'); + } else if (preg_match('/^[^a-z_]/i', $name)) { + $name = ''; + $this->out('The name must start with an unaccented latin character or an underscore'); + } + } + + $driver = $this->in('Driver:', array('db2', 'firebird', 'mssql', 'mysql', 'mysqli', 'odbc', 'oracle', 'postgres', 'sqlite', 'sybase'), 'mysql'); + + $persistent = $this->in('Persistent Connection?', array('y', 'n'), 'n'); + if (strtolower($persistent) == 'n') { + $persistent = 'false'; + } else { + $persistent = 'true'; + } + + $host = ''; + while ($host == '') { + $host = $this->in('Database Host:', null, 'localhost'); + } + + $port = ''; + while ($port == '') { + $port = $this->in('Port?', null, 'n'); + } + + if (strtolower($port) == 'n') { + $port = null; + } + + $login = ''; + while ($login == '') { + $login = $this->in('User:', null, 'root'); + } + $password = ''; + $blankPassword = false; + + while ($password == '' && $blankPassword == false) { + $password = $this->in('Password:'); + + if ($password == '') { + $blank = $this->in('The password you supplied was empty. Use an empty password?', array('y', 'n'), 'n'); + if ($blank == 'y') { + $blankPassword = true; + } + } + } + + $database = ''; + while ($database == '') { + $database = $this->in('Database Name:', null, 'cake'); + } + + $prefix = ''; + while ($prefix == '') { + $prefix = $this->in('Table Prefix?', null, 'n'); + } + if (strtolower($prefix) == 'n') { + $prefix = null; + } + + $encoding = ''; + while ($encoding == '') { + $encoding = $this->in('Table encoding?', null, 'n'); + } + if (strtolower($encoding) == 'n') { + $encoding = null; + } + + $schema = ''; + if ($driver == 'postgres') { + while ($schema == '') { + $schema = $this->in('Table schema?', null, 'n'); + } + } + if (strtolower($schema) == 'n') { + $schema = null; + } + + $config = compact('name', 'driver', 'persistent', 'host', 'login', 'password', 'database', 'prefix', 'encoding', 'port', 'schema'); + + while ($this->__verify($config) == false) { + $this->__interactive(); + } + $dbConfigs[] = $config; + $doneYet = $this->in('Do you wish to add another database configuration?', null, 'n'); + + if (strtolower($doneYet == 'n')) { + $done = true; + } + } + + $this->bake($dbConfigs); + config('database'); + return true; + } + +/** + * Output verification message and bake if it looks good + * + * @return boolean True if user says it looks good, false otherwise + * @access private + */ + function __verify($config) { + $config = array_merge($this->__defaultConfig, $config); + extract($config); + $this->out(); + $this->hr(); + $this->out('The following database configuration will be created:'); + $this->hr(); + $this->out("Name: $name"); + $this->out("Driver: $driver"); + $this->out("Persistent: $persistent"); + $this->out("Host: $host"); + + if ($port) { + $this->out("Port: $port"); + } + + $this->out("User: $login"); + $this->out("Pass: " . str_repeat('*', strlen($password))); + $this->out("Database: $database"); + + if ($prefix) { + $this->out("Table prefix: $prefix"); + } + + if ($schema) { + $this->out("Schema: $schema"); + } + + if ($encoding) { + $this->out("Encoding: $encoding"); + } + + $this->hr(); + $looksGood = $this->in('Look okay?', array('y', 'n'), 'y'); + + if (strtolower($looksGood) == 'y') { + return $config; + } + return false; + } + +/** + * Assembles and writes database.php + * + * @param array $configs Configuration settings to use + * @return boolean Success + * @access public + */ + function bake($configs) { + if (!is_dir($this->path)) { + $this->err($this->path . ' not found'); + return false; + } + + $filename = $this->path . 'database.php'; + $oldConfigs = array(); + + if (file_exists($filename)) { + config('database'); + $db = new $this->databaseClassName; + $temp = get_class_vars(get_class($db)); + + foreach ($temp as $configName => $info) { + $info = array_merge($this->__defaultConfig, $info); + + if (!isset($info['schema'])) { + $info['schema'] = null; + } + if (!isset($info['encoding'])) { + $info['encoding'] = null; + } + if (!isset($info['port'])) { + $info['port'] = null; + } + + if ($info['persistent'] === false) { + $info['persistent'] = 'false'; + } else { + $info['persistent'] = ($info['persistent'] == true) ? 'true' : 'false'; + } + + $oldConfigs[] = array( + 'name' => $configName, + 'driver' => $info['driver'], + 'persistent' => $info['persistent'], + 'host' => $info['host'], + 'port' => $info['port'], + 'login' => $info['login'], + 'password' => $info['password'], + 'database' => $info['database'], + 'prefix' => $info['prefix'], + 'schema' => $info['schema'], + 'encoding' => $info['encoding'] + ); + } + } + + foreach ($oldConfigs as $key => $oldConfig) { + foreach ($configs as $key1 => $config) { + if ($oldConfig['name'] == $config['name']) { + unset($oldConfigs[$key]); + } + } + } + + $configs = array_merge($oldConfigs, $configs); + $out = "__defaultConfig, $config); + extract($config); + + $out .= "\tvar \${$name} = array(\n"; + $out .= "\t\t'driver' => '{$driver}',\n"; + $out .= "\t\t'persistent' => {$persistent},\n"; + $out .= "\t\t'host' => '{$host}',\n"; + + if ($port) { + $out .= "\t\t'port' => {$port},\n"; + } + + $out .= "\t\t'login' => '{$login}',\n"; + $out .= "\t\t'password' => '{$password}',\n"; + $out .= "\t\t'database' => '{$database}',\n"; + + if ($schema) { + $out .= "\t\t'schema' => '{$schema}',\n"; + } + + if ($prefix) { + $out .= "\t\t'prefix' => '{$prefix}',\n"; + } + + if ($encoding) { + $out .= "\t\t'encoding' => '{$encoding}'\n"; + } + + $out .= "\t);\n"; + } + + $out .= "}\n"; + $out .= "?>"; + $filename = $this->path . 'database.php'; + return $this->createFile($filename, $out); + } + +/** + * Get a user specified Connection name + * + * @return void + */ + function getConfig() { + App::import('Model', 'ConnectionManager', false); + + $useDbConfig = 'default'; + $configs = get_class_vars($this->databaseClassName); + if (!is_array($configs)) { + return $this->execute(); + } + + $connections = array_keys($configs); + if (count($connections) > 1) { + $useDbConfig = $this->in(__('Use Database Config', true) .':', $connections, 'default'); + } + return $useDbConfig; + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/extract.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/extract.php new file mode 100644 index 000000000..5dc928b04 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/extract.php @@ -0,0 +1,494 @@ +params['files']) && !is_array($this->params['files'])) { + $this->__files = explode(',', $this->params['files']); + } + if (isset($this->params['paths'])) { + $this->__paths = explode(',', $this->params['paths']); + } else { + $defaultPath = $this->params['working']; + $message = sprintf(__("What is the full path you would like to extract?\nExample: %s\n[Q]uit [D]one", true), $this->params['root'] . DS . 'myapp'); + while (true) { + $response = $this->in($message, null, $defaultPath); + if (strtoupper($response) === 'Q') { + $this->out(__('Extract Aborted', true)); + $this->_stop(); + } elseif (strtoupper($response) === 'D') { + $this->out(); + break; + } elseif (is_dir($response)) { + $this->__paths[] = $response; + $defaultPath = 'D'; + } else { + $this->err(__('The directory path you supplied was not found. Please try again.', true)); + } + $this->out(); + } + } + + if (isset($this->params['output'])) { + $this->__output = $this->params['output']; + } else { + $message = sprintf(__("What is the full path you would like to output?\nExample: %s\n[Q]uit", true), $this->__paths[0] . DS . 'locale'); + while (true) { + $response = $this->in($message, null, $this->__paths[0] . DS . 'locale'); + if (strtoupper($response) === 'Q') { + $this->out(__('Extract Aborted', true)); + $this->_stop(); + } elseif (is_dir($response)) { + $this->__output = $response . DS; + break; + } else { + $this->err(__('The directory path you supplied was not found. Please try again.', true)); + } + $this->out(); + } + } + + if (isset($this->params['merge'])) { + $this->__merge = !(strtolower($this->params['merge']) === 'no'); + } else { + $this->out(); + $response = $this->in(sprintf(__('Would you like to merge all domains strings into the default.pot file?', true)), array('y', 'n'), 'n'); + $this->__merge = strtolower($response) === 'y'; + } + + if (empty($this->__files)) { + $this->__searchFiles(); + } + $this->__extract(); + } + +/** + * Extract text + * + * @return void + * @access private + */ + function __extract() { + $this->out(); + $this->out(); + $this->out(__('Extracting...', true)); + $this->hr(); + $this->out(__('Paths:', true)); + foreach ($this->__paths as $path) { + $this->out(' ' . $path); + } + $this->out(__('Output Directory: ', true) . $this->__output); + $this->hr(); + $this->__extractTokens(); + $this->__buildFiles(); + $this->__writeFiles(); + $this->__paths = $this->__files = $this->__storage = array(); + $this->__strings = $this->__tokens = array(); + $this->out(); + $this->out(__('Done.', true)); + } + +/** + * Show help options + * + * @return void + * @access public + */ + function help() { + $this->out(__('CakePHP Language String Extraction:', true)); + $this->hr(); + $this->out(__('The Extract script generates .pot file(s) with translations', true)); + $this->out(__('By default the .pot file(s) will be place in the locale directory of -app', true)); + $this->out(__('By default -app is ROOT/app', true)); + $this->hr(); + $this->out(__('Usage: cake i18n extract ...', true)); + $this->out(); + $this->out(__('Params:', true)); + $this->out(__(' -app [path...]: directory where your application is located', true)); + $this->out(__(' -root [path...]: path to install', true)); + $this->out(__(' -core [path...]: path to cake directory', true)); + $this->out(__(' -paths [comma separated list of paths, full path is needed]', true)); + $this->out(__(' -merge [yes|no]: Merge all domains strings into the default.pot file', true)); + $this->out(__(' -output [path...]: Full path to output directory', true)); + $this->out(__(' -files: [comma separated list of files, full path to file is needed]', true)); + $this->out(); + $this->out(__('Commands:', true)); + $this->out(__(' cake i18n extract help: Shows this help message.', true)); + $this->out(); + } + +/** + * Extract tokens out of all files to be processed + * + * @return void + * @access private + */ + function __extractTokens() { + foreach ($this->__files as $file) { + $this->__file = $file; + $this->out(sprintf(__('Processing %s...', true), $file)); + + $code = file_get_contents($file); + $allTokens = token_get_all($code); + $this->__tokens = array(); + $lineNumber = 1; + + foreach ($allTokens as $token) { + if ((!is_array($token)) || (($token[0] != T_WHITESPACE) && ($token[0] != T_INLINE_HTML))) { + if (is_array($token)) { + $token[] = $lineNumber; + } + $this->__tokens[] = $token; + } + + if (is_array($token)) { + $lineNumber += count(explode("\n", $token[1])) - 1; + } else { + $lineNumber += count(explode("\n", $token)) - 1; + } + } + unset($allTokens); + $this->__parse('__', array('singular')); + $this->__parse('__n', array('singular', 'plural')); + $this->__parse('__d', array('domain', 'singular')); + $this->__parse('__c', array('singular')); + $this->__parse('__dc', array('domain', 'singular')); + $this->__parse('__dn', array('domain', 'singular', 'plural')); + $this->__parse('__dcn', array('domain', 'singular', 'plural')); + } + } + +/** + * Parse tokens + * + * @param string $functionName Function name that indicates translatable string (e.g: '__') + * @param array $map Array containing what variables it will find (e.g: domain, singular, plural) + * @return void + * @access private + */ + function __parse($functionName, $map) { + $count = 0; + $tokenCount = count($this->__tokens); + + while (($tokenCount - $count) > 1) { + list($countToken, $firstParenthesis) = array($this->__tokens[$count], $this->__tokens[$count + 1]); + if (!is_array($countToken)) { + $count++; + continue; + } + + list($type, $string, $line) = $countToken; + if (($type == T_STRING) && ($string == $functionName) && ($firstParenthesis == '(')) { + $position = $count; + $depth = 0; + + while ($depth == 0) { + if ($this->__tokens[$position] == '(') { + $depth++; + } elseif ($this->__tokens[$position] == ')') { + $depth--; + } + $position++; + } + + $mapCount = count($map); + $strings = array(); + while (count($strings) < $mapCount && ($this->__tokens[$position] == ',' || $this->__tokens[$position][0] == T_CONSTANT_ENCAPSED_STRING)) { + if ($this->__tokens[$position][0] == T_CONSTANT_ENCAPSED_STRING) { + $strings[] = $this->__tokens[$position][1]; + } + $position++; + } + + if ($mapCount == count($strings)) { + extract(array_combine($map, $strings)); + if (!isset($domain)) { + $domain = '\'default\''; + } + $string = $this->__formatString($singular); + if (isset($plural)) { + $string .= "\0" . $this->__formatString($plural); + } + $this->__strings[$this->__formatString($domain)][$string][$this->__file][] = $line; + } else { + $this->__markerError($this->__file, $line, $functionName, $count); + } + } + $count++; + } + } + +/** + * Build the translate template file contents out of obtained strings + * + * @return void + * @access private + */ + function __buildFiles() { + foreach ($this->__strings as $domain => $strings) { + foreach ($strings as $string => $files) { + $occurrences = array(); + foreach ($files as $file => $lines) { + $occurrences[] = $file . ':' . implode(';', $lines); + } + $occurrences = implode("\n#: ", $occurrences); + $header = '#: ' . str_replace($this->__paths, '', $occurrences) . "\n"; + + if (strpos($string, "\0") === false) { + $sentence = "msgid \"{$string}\"\n"; + $sentence .= "msgstr \"\"\n\n"; + } else { + list($singular, $plural) = explode("\0", $string); + $sentence = "msgid \"{$singular}\"\n"; + $sentence .= "msgid_plural \"{$plural}\"\n"; + $sentence .= "msgstr[0] \"\"\n"; + $sentence .= "msgstr[1] \"\"\n\n"; + } + + $this->__store($domain, $header, $sentence); + if ($domain != 'default' && $this->__merge) { + $this->__store('default', $header, $sentence); + } + } + } + } + +/** + * Prepare a file to be stored + * + * @return void + * @access private + */ + function __store($domain, $header, $sentence) { + if (!isset($this->__storage[$domain])) { + $this->__storage[$domain] = array(); + } + if (!isset($this->__storage[$domain][$sentence])) { + $this->__storage[$domain][$sentence] = $header; + } else { + $this->__storage[$domain][$sentence] .= $header; + } + } + +/** + * Write the files that need to be stored + * + * @return void + * @access private + */ + function __writeFiles() { + $overwriteAll = false; + foreach ($this->__storage as $domain => $sentences) { + $output = $this->__writeHeader(); + foreach ($sentences as $sentence => $header) { + $output .= $header . $sentence; + } + + $filename = $domain . '.pot'; + $File = new File($this->__output . $filename); + $response = ''; + while ($overwriteAll === false && $File->exists() && strtoupper($response) !== 'Y') { + $this->out(); + $response = $this->in(sprintf(__('Error: %s already exists in this location. Overwrite? [Y]es, [N]o, [A]ll', true), $filename), array('y', 'n', 'a'), 'y'); + if (strtoupper($response) === 'N') { + $response = ''; + while ($response == '') { + $response = $this->in(sprintf(__("What would you like to name this file?\nExample: %s", true), 'new_' . $filename), null, 'new_' . $filename); + $File = new File($this->__output . $response); + $filename = $response; + } + } elseif (strtoupper($response) === 'A') { + $overwriteAll = true; + } + } + $File->write($output); + $File->close(); + } + } + +/** + * Build the translation template header + * + * @return string Translation template header + * @access private + */ + function __writeHeader() { + $output = "# LANGUAGE translation of CakePHP Application\n"; + $output .= "# Copyright YEAR NAME \n"; + $output .= "#\n"; + $output .= "#, fuzzy\n"; + $output .= "msgid \"\"\n"; + $output .= "msgstr \"\"\n"; + $output .= "\"Project-Id-Version: PROJECT VERSION\\n\"\n"; + $output .= "\"POT-Creation-Date: " . date("Y-m-d H:iO") . "\\n\"\n"; + $output .= "\"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\\n\"\n"; + $output .= "\"Last-Translator: NAME \\n\"\n"; + $output .= "\"Language-Team: LANGUAGE \\n\"\n"; + $output .= "\"MIME-Version: 1.0\\n\"\n"; + $output .= "\"Content-Type: text/plain; charset=utf-8\\n\"\n"; + $output .= "\"Content-Transfer-Encoding: 8bit\\n\"\n"; + $output .= "\"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\\n\"\n\n"; + return $output; + } + +/** + * Format a string to be added as a translateable string + * + * @param string $string String to format + * @return string Formatted string + * @access private + */ + function __formatString($string) { + $quote = substr($string, 0, 1); + $string = substr($string, 1, -1); + if ($quote == '"') { + $string = stripcslashes($string); + } else { + $string = strtr($string, array("\\'" => "'", "\\\\" => "\\")); + } + $string = str_replace("\r\n", "\n", $string); + return addcslashes($string, "\0..\37\\\""); + } + +/** + * Indicate an invalid marker on a processed file + * + * @param string $file File where invalid marker resides + * @param integer $line Line number + * @param string $marker Marker found + * @param integer $count Count + * @return void + * @access private + */ + function __markerError($file, $line, $marker, $count) { + $this->out(sprintf(__("Invalid marker content in %s:%s\n* %s(", true), $file, $line, $marker), true); + $count += 2; + $tokenCount = count($this->__tokens); + $parenthesis = 1; + + while ((($tokenCount - $count) > 0) && $parenthesis) { + if (is_array($this->__tokens[$count])) { + $this->out($this->__tokens[$count][1], false); + } else { + $this->out($this->__tokens[$count], false); + if ($this->__tokens[$count] == '(') { + $parenthesis++; + } + + if ($this->__tokens[$count] == ')') { + $parenthesis--; + } + } + $count++; + } + $this->out("\n", true); + } + +/** + * Search files that may contain translateable strings + * + * @return void + * @access private + */ + function __searchFiles() { + foreach ($this->__paths as $path) { + $Folder = new Folder($path); + $files = $Folder->findRecursive('.*\.(php|ctp|thtml|inc|tpl)', true); + $this->__files = array_merge($this->__files, $files); + } + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/fixture.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/fixture.php new file mode 100644 index 000000000..124d61f78 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/fixture.php @@ -0,0 +1,425 @@ +path = $this->params['working'] . DS . 'tests' . DS . 'fixtures' . DS; + } + +/** + * Execution method always used for tasks + * Handles dispatching to interactive, named, or all processess. + * + * @access public + */ + function execute() { + if (empty($this->args)) { + $this->__interactive(); + } + + if (isset($this->args[0])) { + $this->interactive = false; + if (!isset($this->connection)) { + $this->connection = 'default'; + } + if (strtolower($this->args[0]) == 'all') { + return $this->all(); + } + $model = $this->_modelName($this->args[0]); + $this->bake($model); + } + } + +/** + * Bake All the Fixtures at once. Will only bake fixtures for models that exist. + * + * @access public + * @return void + */ + function all() { + $this->interactive = false; + $this->Model->interactive = false; + $tables = $this->Model->listAll($this->connection, false); + foreach ($tables as $table) { + $model = $this->_modelName($table); + $this->bake($model); + } + } + +/** + * Interactive baking function + * + * @access private + */ + function __interactive() { + $this->DbConfig->interactive = $this->Model->interactive = $this->interactive = true; + $this->hr(); + $this->out(sprintf("Bake Fixture\nPath: %s", $this->path)); + $this->hr(); + + $useDbConfig = $this->connection; + if (!isset($this->connection)) { + $this->connection = $this->DbConfig->getConfig(); + } + $modelName = $this->Model->getName($this->connection); + $useTable = $this->Model->getTable($modelName, $this->connection); + $importOptions = $this->importOptions($modelName); + $this->bake($modelName, $useTable, $importOptions); + } + +/** + * Interacts with the User to setup an array of import options. For a fixture. + * + * @param string $modelName Name of model you are dealing with. + * @return array Array of import options. + * @access public + */ + function importOptions($modelName) { + $options = array(); + $doSchema = $this->in(__('Would you like to import schema for this fixture?', true), array('y', 'n'), 'n'); + if ($doSchema == 'y') { + $options['schema'] = $modelName; + } + $doRecords = $this->in(__('Would you like to use record importing for this fixture?', true), array('y', 'n'), 'n'); + if ($doRecords == 'y') { + $options['records'] = true; + } + if ($doRecords == 'n') { + $prompt = sprintf(__("Would you like to build this fixture with data from %s's table?", true), $modelName); + $fromTable = $this->in($prompt, array('y', 'n'), 'n'); + if (strtolower($fromTable) == 'y') { + $options['fromTable'] = true; + } + } + return $options; + } + +/** + * Assembles and writes a Fixture file + * + * @param string $model Name of model to bake. + * @param string $useTable Name of table to use. + * @param array $importOptions Options for var $import + * @return string Baked fixture content + * @access public + */ + function bake($model, $useTable = false, $importOptions = array()) { + if (!class_exists('CakeSchema')) { + App::import('Model', 'CakeSchema', false); + } + $table = $schema = $records = $import = $modelImport = null; + $importBits = array(); + + if (!$useTable) { + $useTable = Inflector::tableize($model); + } elseif ($useTable != Inflector::tableize($model)) { + $table = $useTable; + } + + if (!empty($importOptions)) { + if (isset($importOptions['schema'])) { + $modelImport = true; + $importBits[] = "'model' => '{$importOptions['schema']}'"; + } + if (isset($importOptions['records'])) { + $importBits[] = "'records' => true"; + } + if ($this->connection != 'default') { + $importBits[] .= "'connection' => '{$this->connection}'"; + } + if (!empty($importBits)) { + $import = sprintf("array(%s)", implode(', ', $importBits)); + } + } + + $this->_Schema = new CakeSchema(); + $data = $this->_Schema->read(array('models' => false, 'connection' => $this->connection)); + + if (!isset($data['tables'][$useTable])) { + $this->err('Could not find your selected table ' . $useTable); + return false; + } + + $tableInfo = $data['tables'][$useTable]; + if (is_null($modelImport)) { + $schema = $this->_generateSchema($tableInfo); + } + + if (!isset($importOptions['records']) && !isset($importOptions['fromTable'])) { + $recordCount = 1; + if (isset($this->params['count'])) { + $recordCount = $this->params['count']; + } + $records = $this->_makeRecordString($this->_generateRecords($tableInfo, $recordCount)); + } + if (isset($this->params['records']) || isset($importOptions['fromTable'])) { + $records = $this->_makeRecordString($this->_getRecordsFromTable($model, $useTable)); + } + $out = $this->generateFixtureFile($model, compact('records', 'table', 'schema', 'import', 'fields')); + return $out; + } + +/** + * Generate the fixture file, and write to disk + * + * @param string $model name of the model being generated + * @param string $fixture Contents of the fixture file. + * @return string Content saved into fixture file. + * @access public + */ + function generateFixtureFile($model, $otherVars) { + $defaults = array('table' => null, 'schema' => null, 'records' => null, 'import' => null, 'fields' => null); + $vars = array_merge($defaults, $otherVars); + + $path = $this->getPath(); + $filename = Inflector::underscore($model) . '_fixture.php'; + + $this->Template->set('model', $model); + $this->Template->set($vars); + $content = $this->Template->generate('classes', 'fixture'); + + $this->out("\nBaking test fixture for $model..."); + $this->createFile($path . $filename, $content); + return $content; + } + +/** + * Get the path to the fixtures. + * + * @return void + */ + function getPath() { + $path = $this->path; + if (isset($this->plugin)) { + $path = $this->_pluginPath($this->plugin) . 'tests' . DS . 'fixtures' . DS; + } + return $path; + } + +/** + * Generates a string representation of a schema. + * + * @param array $table Table schema array + * @return string fields definitions + * @access protected + */ + function _generateSchema($tableInfo) { + $schema = $this->_Schema->generateTable('f', $tableInfo); + return substr($schema, 10, -2); + } + +/** + * Generate String representation of Records + * + * @param array $table Table schema array + * @return array Array of records to use in the fixture. + * @access protected + */ + function _generateRecords($tableInfo, $recordCount = 1) { + $records = array(); + for ($i = 0; $i < $recordCount; $i++) { + $record = array(); + foreach ($tableInfo as $field => $fieldInfo) { + if (empty($fieldInfo['type'])) { + continue; + } + switch ($fieldInfo['type']) { + case 'integer': + case 'float': + $insert = $i + 1; + break; + case 'string': + case 'binary': + $isPrimaryUuid = ( + isset($fieldInfo['key']) && strtolower($fieldInfo['key']) == 'primary' && + isset($fieldInfo['length']) && $fieldInfo['length'] == 36 + ); + if ($isPrimaryUuid) { + $insert = String::uuid(); + } else { + $insert = "Lorem ipsum dolor sit amet"; + if (!empty($fieldInfo['length'])) { + $insert = substr($insert, 0, (int)$fieldInfo['length'] - 2); + } + } + $insert = "'$insert'"; + break; + case 'timestamp': + $ts = time(); + $insert = "'$ts'"; + break; + case 'datetime': + $ts = date('Y-m-d H:i:s'); + $insert = "'$ts'"; + break; + case 'date': + $ts = date('Y-m-d'); + $insert = "'$ts'"; + break; + case 'time': + $ts = date('H:i:s'); + $insert = "'$ts'"; + break; + case 'boolean': + $insert = 1; + break; + case 'text': + $insert = "'Lorem ipsum dolor sit amet, aliquet feugiat."; + $insert .= " Convallis morbi fringilla gravida,"; + $insert .= " phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin"; + $insert .= " venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla"; + $insert .= " vestibulum massa neque ut et, id hendrerit sit,"; + $insert .= " feugiat in taciti enim proin nibh, tempor dignissim, rhoncus"; + $insert .= " duis vestibulum nunc mattis convallis.'"; + break; + } + $record[$field] = $insert; + } + $records[] = $record; + } + return $records; + } + +/** + * Convert a $records array into a a string. + * + * @param array $records Array of records to be converted to string + * @return string A string value of the $records array. + * @access protected + */ + function _makeRecordString($records) { + $out = "array(\n"; + foreach ($records as $record) { + $values = array(); + foreach ($record as $field => $value) { + $values[] = "\t\t\t'$field' => $value"; + } + $out .= "\t\tarray(\n"; + $out .= implode(",\n", $values); + $out .= "\n\t\t),\n"; + } + $out .= "\t)"; + return $out; + } + +/** + * Interact with the user to get a custom SQL condition and use that to extract data + * to build a fixture. + * + * @param string $modelName name of the model to take records from. + * @param string $useTable Name of table to use. + * @return array Array of records. + * @access protected + */ + function _getRecordsFromTable($modelName, $useTable = null) { + if ($this->interactive) { + $condition = null; + $prompt = __("Please provide a SQL fragment to use as conditions\nExample: WHERE 1=1 LIMIT 10", true); + while (!$condition) { + $condition = $this->in($prompt, null, 'WHERE 1=1 LIMIT 10'); + } + } else { + $condition = 'WHERE 1=1 LIMIT ' . (isset($this->params['count']) ? $this->params['count'] : 10); + } + App::import('Model', 'Model', false); + $modelObject =& new Model(array('name' => $modelName, 'table' => $useTable, 'ds' => $this->connection)); + $records = $modelObject->find('all', array( + 'conditions' => $condition, + 'recursive' => -1 + )); + $db =& ConnectionManager::getDataSource($modelObject->useDbConfig); + $schema = $modelObject->schema(true); + $out = array(); + foreach ($records as $record) { + $row = array(); + foreach ($record[$modelObject->alias] as $field => $value) { + $row[$field] = $db->value($value, $schema[$field]['type']); + } + $out[] = $row; + } + return $out; + } + +/** + * Displays help contents + * + * @access public + */ + function help() { + $this->hr(); + $this->out("Usage: cake bake fixture "); + $this->hr(); + $this->out('Arguments:'); + $this->out(); + $this->out(""); + $this->out("\tName of the fixture to bake. Can use Plugin.name"); + $this->out("\tas a shortcut for plugin baking."); + $this->out(); + $this->out('Commands:'); + $this->out("\nfixture \n\tbakes fixture with specified name."); + $this->out("\nfixture all\n\tbakes all fixtures."); + $this->out(); + $this->out('Parameters:'); + $this->out("\t-count When using generated data, the number of records to include in the fixture(s)."); + $this->out("\t-connection Which database configuration to use for baking."); + $this->out("\t-plugin CamelCased name of plugin to bake fixtures for."); + $this->out("\t-records Used with -count and /all commands to pull [n] records from the live tables"); + $this->out("\t Where [n] is either -count or the default of 10."); + $this->out(); + $this->_stop(); + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/model.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/model.php new file mode 100644 index 000000000..4324e08e6 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/model.php @@ -0,0 +1,938 @@ +args)) { + $this->__interactive(); + } + + if (!empty($this->args[0])) { + $this->interactive = false; + if (!isset($this->connection)) { + $this->connection = 'default'; + } + if (strtolower($this->args[0]) == 'all') { + return $this->all(); + } + $model = $this->_modelName($this->args[0]); + $object = $this->_getModelObject($model); + if ($this->bake($object, false)) { + if ($this->_checkUnitTest()) { + $this->bakeFixture($model); + $this->bakeTest($model); + } + } + } + } + +/** + * Bake all models at once. + * + * @return void + */ + function all() { + $this->listAll($this->connection, false); + $unitTestExists = $this->_checkUnitTest(); + foreach ($this->_tables as $table) { + if (in_array($table, $this->skipTables)) { + continue; + } + $modelClass = Inflector::classify($table); + $this->out(sprintf(__('Baking %s', true), $modelClass)); + $object = $this->_getModelObject($modelClass); + if ($this->bake($object, false) && $unitTestExists) { + $this->bakeFixture($modelClass); + $this->bakeTest($modelClass); + } + } + } + +/** + * Get a model object for a class name. + * + * @param string $className Name of class you want model to be. + * @return object Model instance + */ + function &_getModelObject($className, $table = null) { + if (!$table) { + $table = Inflector::tableize($className); + } + $object =& new Model(array('name' => $className, 'table' => $table, 'ds' => $this->connection)); + return $object; + } + +/** + * Generate a key value list of options and a prompt. + * + * @param array $options Array of options to use for the selections. indexes must start at 0 + * @param string $prompt Prompt to use for options list. + * @param integer $default The default option for the given prompt. + * @return result of user choice. + */ + function inOptions($options, $prompt = null, $default = null) { + $valid = false; + $max = count($options); + while (!$valid) { + foreach ($options as $i => $option) { + $this->out($i + 1 .'. ' . $option); + } + if (empty($prompt)) { + $prompt = __('Make a selection from the choices above', true); + } + $choice = $this->in($prompt, null, $default); + if (intval($choice) > 0 && intval($choice) <= $max) { + $valid = true; + } + } + return $choice - 1; + } + +/** + * Handles interactive baking + * + * @access private + */ + function __interactive() { + $this->hr(); + $this->out(sprintf("Bake Model\nPath: %s", $this->path)); + $this->hr(); + $this->interactive = true; + + $primaryKey = 'id'; + $validate = $associations = array(); + + if (empty($this->connection)) { + $this->connection = $this->DbConfig->getConfig(); + } + $currentModelName = $this->getName(); + $useTable = $this->getTable($currentModelName); + $db =& ConnectionManager::getDataSource($this->connection); + $fullTableName = $db->fullTableName($useTable); + + if (in_array($useTable, $this->_tables)) { + $tempModel = new Model(array('name' => $currentModelName, 'table' => $useTable, 'ds' => $this->connection)); + $fields = $tempModel->schema(true); + if (!array_key_exists('id', $fields)) { + $primaryKey = $this->findPrimaryKey($fields); + } + } else { + $this->err(sprintf(__('Table %s does not exist, cannot bake a model without a table.', true), $useTable)); + $this->_stop(); + return false; + } + $displayField = $tempModel->hasField(array('name', 'title')); + if (!$displayField) { + $displayField = $this->findDisplayField($tempModel->schema()); + } + + $prompt = __("Would you like to supply validation criteria \nfor the fields in your model?", true); + $wannaDoValidation = $this->in($prompt, array('y','n'), 'y'); + if (array_search($useTable, $this->_tables) !== false && strtolower($wannaDoValidation) == 'y') { + $validate = $this->doValidation($tempModel); + } + + $prompt = __("Would you like to define model associations\n(hasMany, hasOne, belongsTo, etc.)?", true); + $wannaDoAssoc = $this->in($prompt, array('y','n'), 'y'); + if (strtolower($wannaDoAssoc) == 'y') { + $associations = $this->doAssociations($tempModel); + } + + $this->out(); + $this->hr(); + $this->out(__('The following Model will be created:', true)); + $this->hr(); + $this->out("Name: " . $currentModelName); + + if ($this->connection !== 'default') { + $this->out(sprintf(__("DB Config: %s", true), $this->connection)); + } + if ($fullTableName !== Inflector::tableize($currentModelName)) { + $this->out(sprintf(__("DB Table: %s", true), $fullTableName)); + } + if ($primaryKey != 'id') { + $this->out(sprintf(__("Primary Key: %s", true), $primaryKey)); + } + if (!empty($validate)) { + $this->out(sprintf(__("Validation: %s", true), print_r($validate, true))); + } + if (!empty($associations)) { + $this->out(__("Associations:", true)); + $assocKeys = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany'); + foreach ($assocKeys as $assocKey) { + $this->_printAssociation($currentModelName, $assocKey, $associations); + } + } + + $this->hr(); + $looksGood = $this->in(__('Look okay?', true), array('y','n'), 'y'); + + if (strtolower($looksGood) == 'y') { + $vars = compact('associations', 'validate', 'primaryKey', 'useTable', 'displayField'); + $vars['useDbConfig'] = $this->connection; + if ($this->bake($currentModelName, $vars)) { + if ($this->_checkUnitTest()) { + $this->bakeFixture($currentModelName, $useTable); + $this->bakeTest($currentModelName, $useTable, $associations); + } + } + } else { + return false; + } + } + +/** + * Print out all the associations of a particular type + * + * @param string $modelName Name of the model relations belong to. + * @param string $type Name of association you want to see. i.e. 'belongsTo' + * @param string $associations Collection of associations. + * @access protected + * @return void + */ + function _printAssociation($modelName, $type, $associations) { + if (!empty($associations[$type])) { + for ($i = 0; $i < count($associations[$type]); $i++) { + $out = "\t" . $modelName . ' ' . $type . ' ' . $associations[$type][$i]['alias']; + $this->out($out); + } + } + } + +/** + * Finds a primary Key in a list of fields. + * + * @param array $fields Array of fields that might have a primary key. + * @return string Name of field that is a primary key. + * @access public + */ + function findPrimaryKey($fields) { + foreach ($fields as $name => $field) { + if (isset($field['key']) && $field['key'] == 'primary') { + break; + } + } + return $this->in(__('What is the primaryKey?', true), null, $name); + } + +/** + * interact with the user to find the displayField value for a model. + * + * @param array $fields Array of fields to look for and choose as a displayField + * @return mixed Name of field to use for displayField or false if the user declines to choose + */ + function findDisplayField($fields) { + $fieldNames = array_keys($fields); + $prompt = __("A displayField could not be automatically detected\nwould you like to choose one?", true); + $continue = $this->in($prompt, array('y', 'n')); + if (strtolower($continue) == 'n') { + return false; + } + $prompt = __('Choose a field from the options above:', true); + $choice = $this->inOptions($fieldNames, $prompt); + return $fieldNames[$choice]; + } + +/** + * Handles Generation and user interaction for creating validation. + * + * @param object $model Model to have validations generated for. + * @return array $validate Array of user selected validations. + * @access public + */ + function doValidation(&$model) { + if (!is_object($model)) { + return false; + } + $fields = $model->schema(); + + if (empty($fields)) { + return false; + } + $validate = array(); + $this->initValidations(); + foreach ($fields as $fieldName => $field) { + $validation = $this->fieldValidation($fieldName, $field, $model->primaryKey); + if (!empty($validation)) { + $validate[$fieldName] = $validation; + } + } + return $validate; + } + +/** + * Populate the _validations array + * + * @return void + */ + function initValidations() { + $options = $choices = array(); + if (class_exists('Validation')) { + $parent = get_class_methods(get_parent_class('Validation')); + $options = get_class_methods('Validation'); + $options = array_diff($options, $parent); + } + sort($options); + $default = 1; + foreach ($options as $key => $option) { + if ($option{0} != '_' && strtolower($option) != 'getinstance') { + $choices[$default] = strtolower($option); + $default++; + } + } + $choices[$default] = 'none'; // Needed since index starts at 1 + $this->_validations = $choices; + return $choices; + } + +/** + * Does individual field validation handling. + * + * @param string $fieldName Name of field to be validated. + * @param array $metaData metadata for field + * @return array Array of validation for the field. + */ + function fieldValidation($fieldName, $metaData, $primaryKey = 'id') { + $defaultChoice = count($this->_validations); + $validate = $alreadyChosen = array(); + + $anotherValidator = 'y'; + while ($anotherValidator == 'y') { + if ($this->interactive) { + $this->out(); + $this->out(sprintf(__('Field: %s', true), $fieldName)); + $this->out(sprintf(__('Type: %s', true), $metaData['type'])); + $this->hr(); + $this->out(__('Please select one of the following validation options:', true)); + $this->hr(); + } + + $prompt = ''; + for ($i = 1; $i < $defaultChoice; $i++) { + $prompt .= $i . ' - ' . $this->_validations[$i] . "\n"; + } + $prompt .= sprintf(__("%s - Do not do any validation on this field.\n", true), $defaultChoice); + $prompt .= __("... or enter in a valid regex validation string.\n", true); + + $methods = array_flip($this->_validations); + $guess = $defaultChoice; + if ($metaData['null'] != 1 && !in_array($fieldName, array($primaryKey, 'created', 'modified', 'updated'))) { + if ($fieldName == 'email') { + $guess = $methods['email']; + } elseif ($metaData['type'] == 'string' && $metaData['length'] == 36) { + $guess = $methods['uuid']; + } elseif ($metaData['type'] == 'string') { + $guess = $methods['notempty']; + } elseif ($metaData['type'] == 'integer') { + $guess = $methods['numeric']; + } elseif ($metaData['type'] == 'boolean') { + $guess = $methods['boolean']; + } elseif ($metaData['type'] == 'date') { + $guess = $methods['date']; + } elseif ($metaData['type'] == 'time') { + $guess = $methods['time']; + } + } + + if ($this->interactive === true) { + $choice = $this->in($prompt, null, $guess); + if (in_array($choice, $alreadyChosen)) { + $this->out(__("You have already chosen that validation rule,\nplease choose again", true)); + continue; + } + if (!isset($this->_validations[$choice]) && is_numeric($choice)) { + $this->out(__('Please make a valid selection.', true)); + continue; + } + $alreadyChosen[] = $choice; + } else { + $choice = $guess; + } + + if (isset($this->_validations[$choice])) { + $validatorName = $this->_validations[$choice]; + } else { + $validatorName = Inflector::slug($choice); + } + + if ($choice != $defaultChoice) { + if (is_numeric($choice) && isset($this->_validations[$choice])) { + $validate[$validatorName] = $this->_validations[$choice]; + } else { + $validate[$validatorName] = $choice; + } + } + if ($this->interactive == true && $choice != $defaultChoice) { + $anotherValidator = $this->in(__('Would you like to add another validation rule?', true), array('y', 'n'), 'n'); + } else { + $anotherValidator = 'n'; + } + } + return $validate; + } + +/** + * Handles associations + * + * @param object $model + * @return array $assocaitons + * @access public + */ + function doAssociations(&$model) { + if (!is_object($model)) { + return false; + } + if ($this->interactive === true) { + $this->out(__('One moment while the associations are detected.', true)); + } + + $fields = $model->schema(true); + if (empty($fields)) { + return false; + } + + if (empty($this->_tables)) { + $this->_tables = $this->getAllTables(); + } + + $associations = array( + 'belongsTo' => array(), 'hasMany' => array(), 'hasOne'=> array(), 'hasAndBelongsToMany' => array() + ); + $possibleKeys = array(); + + $associations = $this->findBelongsTo($model, $associations); + $associations = $this->findHasOneAndMany($model, $associations); + $associations = $this->findHasAndBelongsToMany($model, $associations); + + if ($this->interactive !== true) { + unset($associations['hasOne']); + } + + if ($this->interactive === true) { + $this->hr(); + if (empty($associations)) { + $this->out(__('None found.', true)); + } else { + $this->out(__('Please confirm the following associations:', true)); + $this->hr(); + $associations = $this->confirmAssociations($model, $associations); + } + $associations = $this->doMoreAssociations($model, $associations); + } + return $associations; + } + +/** + * Find belongsTo relations and add them to the associations list. + * + * @param object $model Model instance of model being generated. + * @param array $associations Array of inprogress associations + * @return array $associations with belongsTo added in. + */ + function findBelongsTo(&$model, $associations) { + $fields = $model->schema(true); + foreach ($fields as $fieldName => $field) { + $offset = strpos($fieldName, '_id'); + if ($fieldName != $model->primaryKey && $fieldName != 'parent_id' && $offset !== false) { + $tmpModelName = $this->_modelNameFromKey($fieldName); + $associations['belongsTo'][] = array( + 'alias' => $tmpModelName, + 'className' => $tmpModelName, + 'foreignKey' => $fieldName, + ); + } elseif ($fieldName == 'parent_id') { + $associations['belongsTo'][] = array( + 'alias' => 'Parent' . $model->name, + 'className' => $model->name, + 'foreignKey' => $fieldName, + ); + } + } + return $associations; + } + +/** + * Find the hasOne and HasMany relations and add them to associations list + * + * @param object $model Model instance being generated + * @param array $associations Array of inprogress associations + * @return array $associations with hasOne and hasMany added in. + */ + function findHasOneAndMany(&$model, $associations) { + $foreignKey = $this->_modelKey($model->name); + foreach ($this->_tables as $otherTable) { + $tempOtherModel = $this->_getModelObject($this->_modelName($otherTable), $otherTable); + $modelFieldsTemp = $tempOtherModel->schema(true); + + $pattern = '/_' . preg_quote($model->table, '/') . '|' . preg_quote($model->table, '/') . '_/'; + $possibleJoinTable = preg_match($pattern , $otherTable); + if ($possibleJoinTable == true) { + continue; + } + foreach ($modelFieldsTemp as $fieldName => $field) { + $assoc = false; + if ($fieldName != $model->primaryKey && $fieldName == $foreignKey) { + $assoc = array( + 'alias' => $tempOtherModel->name, + 'className' => $tempOtherModel->name, + 'foreignKey' => $fieldName + ); + } elseif ($otherTable == $model->table && $fieldName == 'parent_id') { + $assoc = array( + 'alias' => 'Child' . $model->name, + 'className' => $model->name, + 'foreignKey' => $fieldName + ); + } + if ($assoc) { + $associations['hasOne'][] = $assoc; + $associations['hasMany'][] = $assoc; + } + + } + } + return $associations; + } + +/** + * Find the hasAndBelongsToMany relations and add them to associations list + * + * @param object $model Model instance being generated + * @param array $associations Array of inprogress associations + * @return array $associations with hasAndBelongsToMany added in. + */ + function findHasAndBelongsToMany(&$model, $associations) { + $foreignKey = $this->_modelKey($model->name); + foreach ($this->_tables as $otherTable) { + $tempOtherModel = $this->_getModelObject($this->_modelName($otherTable), $otherTable); + $modelFieldsTemp = $tempOtherModel->schema(true); + + $offset = strpos($otherTable, $model->table . '_'); + $otherOffset = strpos($otherTable, '_' . $model->table); + + if ($offset !== false) { + $offset = strlen($model->table . '_'); + $habtmName = $this->_modelName(substr($otherTable, $offset)); + $associations['hasAndBelongsToMany'][] = array( + 'alias' => $habtmName, + 'className' => $habtmName, + 'foreignKey' => $foreignKey, + 'associationForeignKey' => $this->_modelKey($habtmName), + 'joinTable' => $otherTable + ); + } elseif ($otherOffset !== false) { + $habtmName = $this->_modelName(substr($otherTable, 0, $otherOffset)); + $associations['hasAndBelongsToMany'][] = array( + 'alias' => $habtmName, + 'className' => $habtmName, + 'foreignKey' => $foreignKey, + 'associationForeignKey' => $this->_modelKey($habtmName), + 'joinTable' => $otherTable + ); + } + } + return $associations; + } + +/** + * Interact with the user and confirm associations. + * + * @param array $model Temporary Model instance. + * @param array $associations Array of associations to be confirmed. + * @return array Array of confirmed associations + */ + function confirmAssociations(&$model, $associations) { + foreach ($associations as $type => $settings) { + if (!empty($associations[$type])) { + $count = count($associations[$type]); + $response = 'y'; + foreach ($associations[$type] as $i => $assoc) { + $prompt = "{$model->name} {$type} {$assoc['alias']}?"; + $response = $this->in($prompt, array('y','n'), 'y'); + + if ('n' == strtolower($response)) { + unset($associations[$type][$i]); + } elseif ($type == 'hasMany') { + unset($associations['hasOne'][$i]); + } + } + $associations[$type] = array_merge($associations[$type]); + } + } + return $associations; + } + +/** + * Interact with the user and generate additional non-conventional associations + * + * @param object $model Temporary model instance + * @param array $associations Array of associations. + * @return array Array of associations. + */ + function doMoreAssociations($model, $associations) { + $prompt = __('Would you like to define some additional model associations?', true); + $wannaDoMoreAssoc = $this->in($prompt, array('y','n'), 'n'); + $possibleKeys = $this->_generatePossibleKeys(); + while (strtolower($wannaDoMoreAssoc) == 'y') { + $assocs = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany'); + $this->out(__('What is the association type?', true)); + $assocType = intval($this->inOptions($assocs, __('Enter a number',true))); + + $this->out(__("For the following options be very careful to match your setup exactly.\nAny spelling mistakes will cause errors.", true)); + $this->hr(); + + $alias = $this->in(__('What is the alias for this association?', true)); + $className = $this->in(sprintf(__('What className will %s use?', true), $alias), null, $alias ); + $suggestedForeignKey = null; + + if ($assocType == 0) { + $showKeys = $possibleKeys[$model->table]; + $suggestedForeignKey = $this->_modelKey($alias); + } else { + $otherTable = Inflector::tableize($className); + if (in_array($otherTable, $this->_tables)) { + if ($assocType < 3) { + $showKeys = $possibleKeys[$otherTable]; + } else { + $showKeys = null; + } + } else { + $otherTable = $this->in(__('What is the table for this model?', true)); + $showKeys = $possibleKeys[$otherTable]; + } + $suggestedForeignKey = $this->_modelKey($model->name); + } + if (!empty($showKeys)) { + $this->out(__('A helpful List of possible keys', true)); + $foreignKey = $this->inOptions($showKeys, __('What is the foreignKey?', true)); + $foreignKey = $showKeys[intval($foreignKey)]; + } + if (!isset($foreignKey)) { + $foreignKey = $this->in(__('What is the foreignKey? Specify your own.', true), null, $suggestedForeignKey); + } + if ($assocType == 3) { + $associationForeignKey = $this->in(__('What is the associationForeignKey?', true), null, $this->_modelKey($model->name)); + $joinTable = $this->in(__('What is the joinTable?', true)); + } + $associations[$assocs[$assocType]] = array_values((array)$associations[$assocs[$assocType]]); + $count = count($associations[$assocs[$assocType]]); + $i = ($count > 0) ? $count : 0; + $associations[$assocs[$assocType]][$i]['alias'] = $alias; + $associations[$assocs[$assocType]][$i]['className'] = $className; + $associations[$assocs[$assocType]][$i]['foreignKey'] = $foreignKey; + if ($assocType == 3) { + $associations[$assocs[$assocType]][$i]['associationForeignKey'] = $associationForeignKey; + $associations[$assocs[$assocType]][$i]['joinTable'] = $joinTable; + } + $wannaDoMoreAssoc = $this->in(__('Define another association?', true), array('y','n'), 'y'); + } + return $associations; + } + +/** + * Finds all possible keys to use on custom associations. + * + * @return array array of tables and possible keys + */ + function _generatePossibleKeys() { + $possible = array(); + foreach ($this->_tables as $otherTable) { + $tempOtherModel = & new Model(array('table' => $otherTable, 'ds' => $this->connection)); + $modelFieldsTemp = $tempOtherModel->schema(true); + foreach ($modelFieldsTemp as $fieldName => $field) { + if ($field['type'] == 'integer' || $field['type'] == 'string') { + $possible[$otherTable][] = $fieldName; + } + } + } + return $possible; + } + +/** + * Assembles and writes a Model file. + * + * @param mixed $name Model name or object + * @param mixed $data if array and $name is not an object assume bake data, otherwise boolean. + * @access private + */ + function bake($name, $data = array()) { + if (is_object($name)) { + if ($data == false) { + $data = $associations = array(); + $data['associations'] = $this->doAssociations($name, $associations); + $data['validate'] = $this->doValidation($name); + } + $data['primaryKey'] = $name->primaryKey; + $data['useTable'] = $name->table; + $data['useDbConfig'] = $name->useDbConfig; + $data['name'] = $name = $name->name; + } else { + $data['name'] = $name; + } + $defaults = array('associations' => array(), 'validate' => array(), 'primaryKey' => 'id', + 'useTable' => null, 'useDbConfig' => 'default', 'displayField' => null); + $data = array_merge($defaults, $data); + + $this->Template->set($data); + $this->Template->set('plugin', Inflector::camelize($this->plugin)); + $out = $this->Template->generate('classes', 'model'); + + $path = $this->getPath(); + $filename = $path . Inflector::underscore($name) . '.php'; + $this->out("\nBaking model class for $name..."); + $this->createFile($filename, $out); + ClassRegistry::flush(); + return $out; + } + +/** + * Assembles and writes a unit test file + * + * @param string $className Model class name + * @access private + */ + function bakeTest($className) { + $this->Test->interactive = $this->interactive; + $this->Test->plugin = $this->plugin; + $this->Test->connection = $this->connection; + return $this->Test->bake('Model', $className); + } + +/** + * outputs the a list of possible models or controllers from database + * + * @param string $useDbConfig Database configuration name + * @access public + */ + function listAll($useDbConfig = null) { + $this->_tables = $this->getAllTables($useDbConfig); + + if ($this->interactive === true) { + $this->out(__('Possible Models based on your current database:', true)); + $this->_modelNames = array(); + $count = count($this->_tables); + for ($i = 0; $i < $count; $i++) { + $this->_modelNames[] = $this->_modelName($this->_tables[$i]); + $this->out($i + 1 . ". " . $this->_modelNames[$i]); + } + } + return $this->_tables; + } + +/** + * Interact with the user to determine the table name of a particular model + * + * @param string $modelName Name of the model you want a table for. + * @param string $useDbConfig Name of the database config you want to get tables from. + * @return void + */ + function getTable($modelName, $useDbConfig = null) { + if (!isset($useDbConfig)) { + $useDbConfig = $this->connection; + } + App::import('Model', 'ConnectionManager', false); + + $db =& ConnectionManager::getDataSource($useDbConfig); + $useTable = Inflector::tableize($modelName); + $fullTableName = $db->fullTableName($useTable, false); + $tableIsGood = false; + + if (array_search($useTable, $this->_tables) === false) { + $this->out(); + $this->out(sprintf(__("Given your model named '%s',\nCake would expect a database table named '%s'", true), $modelName, $fullTableName)); + $tableIsGood = $this->in(__('Do you want to use this table?', true), array('y','n'), 'y'); + } + if (strtolower($tableIsGood) == 'n') { + $useTable = $this->in(__('What is the name of the table?', true)); + } + return $useTable; + } + +/** + * Get an Array of all the tables in the supplied connection + * will halt the script if no tables are found. + * + * @param string $useDbConfig Connection name to scan. + * @return array Array of tables in the database. + */ + function getAllTables($useDbConfig = null) { + if (!isset($useDbConfig)) { + $useDbConfig = $this->connection; + } + App::import('Model', 'ConnectionManager', false); + + $tables = array(); + $db =& ConnectionManager::getDataSource($useDbConfig); + $db->cacheSources = false; + $usePrefix = empty($db->config['prefix']) ? '' : $db->config['prefix']; + if ($usePrefix) { + foreach ($db->listSources() as $table) { + if (!strncmp($table, $usePrefix, strlen($usePrefix))) { + $tables[] = substr($table, strlen($usePrefix)); + } + } + } else { + $tables = $db->listSources(); + } + if (empty($tables)) { + $this->err(__('Your database does not have any tables.', true)); + $this->_stop(); + } + return $tables; + } + +/** + * Forces the user to specify the model he wants to bake, and returns the selected model name. + * + * @return string the model name + * @access public + */ + function getName($useDbConfig = null) { + $this->listAll($useDbConfig); + + $enteredModel = ''; + + while ($enteredModel == '') { + $enteredModel = $this->in(__("Enter a number from the list above,\ntype in the name of another model, or 'q' to exit", true), null, 'q'); + + if ($enteredModel === 'q') { + $this->out(__("Exit", true)); + $this->_stop(); + } + + if ($enteredModel == '' || intval($enteredModel) > count($this->_modelNames)) { + $this->err(__("The model name you supplied was empty,\nor the number you selected was not an option. Please try again.", true)); + $enteredModel = ''; + } + } + if (intval($enteredModel) > 0 && intval($enteredModel) <= count($this->_modelNames)) { + $currentModelName = $this->_modelNames[intval($enteredModel) - 1]; + } else { + $currentModelName = $enteredModel; + } + return $currentModelName; + } + +/** + * Displays help contents + * + * @access public + */ + function help() { + $this->hr(); + $this->out("Usage: cake bake model "); + $this->hr(); + $this->out('Arguments:'); + $this->out(); + $this->out(""); + $this->out("\tName of the model to bake. Can use Plugin.name"); + $this->out("\tas a shortcut for plugin baking."); + $this->out(); + $this->out('Params:'); + $this->out(); + $this->out('-connection '); + $this->out("\tset db config . uses 'default' if none is specified"); + $this->out(); + $this->out('Commands:'); + $this->out(); + $this->out("model"); + $this->out("\tbakes model in interactive mode."); + $this->out(); + $this->out("model "); + $this->out("\tbakes model file with no associations or validation"); + $this->out(); + $this->out("model all"); + $this->out("\tbakes all model files with associations and validation"); + $this->out(); + $this->_stop(); + } + +/** + * Interact with FixtureTask to automatically bake fixtures when baking models. + * + * @param string $className Name of class to bake fixture for + * @param string $useTable Optional table name for fixture to use. + * @access public + * @return void + * @see FixtureTask::bake + */ + function bakeFixture($className, $useTable = null) { + $this->Fixture->interactive = $this->interactive; + $this->Fixture->connection = $this->connection; + $this->Fixture->plugin = $this->plugin; + $this->Fixture->bake($className, $useTable); + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/plugin.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/plugin.php new file mode 100644 index 000000000..94d9e261c --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/plugin.php @@ -0,0 +1,247 @@ +path = APP . 'plugins' . DS; + } + +/** + * Execution method always used for tasks + * + * @return void + */ + function execute() { + if (empty($this->params['skel'])) { + $this->params['skel'] = ''; + if (is_dir(CAKE_CORE_INCLUDE_PATH . DS . CAKE . 'console' . DS . 'templates' . DS . 'skel') === true) { + $this->params['skel'] = CAKE_CORE_INCLUDE_PATH . DS . CAKE . 'console' . DS . 'templates' . DS . 'skel'; + } + } + $plugin = null; + + if (isset($this->args[0])) { + $plugin = Inflector::camelize($this->args[0]); + $pluginPath = $this->_pluginPath($plugin); + $this->Dispatch->shiftArgs(); + if (is_dir($pluginPath)) { + $this->out(sprintf(__('Plugin: %s', true), $plugin)); + $this->out(sprintf(__('Path: %s', true), $pluginPath)); + } elseif (isset($this->args[0])) { + $this->err(sprintf(__('%s in path %s not found.', true), $plugin, $pluginPath)); + $this->_stop(); + } else { + $this->__interactive($plugin); + } + } else { + return $this->__interactive(); + } + + if (isset($this->args[0])) { + $task = Inflector::classify($this->args[0]); + $this->Dispatch->shiftArgs(); + if (in_array($task, $this->tasks)) { + $this->{$task}->plugin = $plugin; + $this->{$task}->path = $pluginPath . Inflector::underscore(Inflector::pluralize($task)) . DS; + + if (!is_dir($this->{$task}->path)) { + $this->err(sprintf(__("%s directory could not be found.\nBe sure you have created %s", true), $task, $this->{$task}->path)); + } + $this->{$task}->loadTasks(); + return $this->{$task}->execute(); + } + } + } + +/** + * Interactive interface + * + * @access private + * @return void + */ + function __interactive($plugin = null) { + while ($plugin === null) { + $plugin = $this->in(__('Enter the name of the plugin in CamelCase format', true)); + } + + if (!$this->bake($plugin)) { + $this->err(sprintf(__("An error occured trying to bake: %s in %s", true), $plugin, $this->path . Inflector::underscore($pluginPath))); + } + } + +/** + * Bake the plugin, create directories and files + * + * @params $plugin name of the plugin in CamelCased format + * @access public + * @return bool + */ + function bake($plugin) { + $pluginPath = Inflector::underscore($plugin); + + $pathOptions = App::path('plugins'); + if (count($pathOptions) > 1) { + $this->findPath($pathOptions); + } + $this->hr(); + $this->out(sprintf(__("Plugin Name: %s", true), $plugin)); + $this->out(sprintf(__("Plugin Directory: %s", true), $this->path . $pluginPath)); + $this->hr(); + + $looksGood = $this->in(__('Look okay?', true), array('y', 'n', 'q'), 'y'); + + if (strtolower($looksGood) == 'y') { + $verbose = $this->in(__('Do you want verbose output?', true), array('y', 'n'), 'n'); + + $Folder =& new Folder($this->path . $pluginPath); + $directories = array( + 'config' . DS . 'schema', + 'models' . DS . 'behaviors', + 'models' . DS . 'datasources', + 'controllers' . DS . 'components', + 'libs', + 'views' . DS . 'helpers', + 'tests' . DS . 'cases' . DS . 'components', + 'tests' . DS . 'cases' . DS . 'helpers', + 'tests' . DS . 'cases' . DS . 'behaviors', + 'tests' . DS . 'cases' . DS . 'controllers', + 'tests' . DS . 'cases' . DS . 'models', + 'tests' . DS . 'groups', + 'tests' . DS . 'fixtures', + 'vendors', + 'vendors' . DS . 'shells' . DS . 'tasks', + 'webroot' + ); + + foreach ($directories as $directory) { + $dirPath = $this->path . $pluginPath . DS . $directory; + $Folder->create($dirPath); + $File =& new File($dirPath . DS . 'empty', true); + } + + if (strtolower($verbose) == 'y') { + foreach ($Folder->messages() as $message) { + $this->out($message); + } + } + + $errors = $Folder->errors(); + if (!empty($errors)) { + return false; + } + + $controllerFileName = $pluginPath . '_app_controller.php'; + + $out = ""; + $this->createFile($this->path . $pluginPath. DS . $controllerFileName, $out); + + $modelFileName = $pluginPath . '_app_model.php'; + + $out = ""; + $this->createFile($this->path . $pluginPath . DS . $modelFileName, $out); + + $this->hr(); + $this->out(sprintf(__("Created: %s in %s", true), $plugin, $this->path . $pluginPath)); + $this->hr(); + } + + return true; + } + +/** + * find and change $this->path to the user selection + * + * @return void + */ + function findPath($pathOptions) { + $valid = false; + $max = count($pathOptions); + while (!$valid) { + foreach ($pathOptions as $i => $option) { + $this->out($i + 1 .'. ' . $option); + } + $prompt = __('Choose a plugin path from the paths above.', true); + $choice = $this->in($prompt); + if (intval($choice) > 0 && intval($choice) <= $max) { + $valid = true; + } + } + $this->path = $pathOptions[$choice - 1]; + } + +/** + * Help + * + * @return void + * @access public + */ + function help() { + $this->hr(); + $this->out("Usage: cake bake plugin ..."); + $this->hr(); + $this->out('Commands:'); + $this->out(); + $this->out("plugin "); + $this->out("\tbakes plugin directory structure"); + $this->out(); + $this->out("plugin model"); + $this->out("\tbakes model. Run 'cake bake model help' for more info."); + $this->out(); + $this->out("plugin controller"); + $this->out("\tbakes controller. Run 'cake bake controller help' for more info."); + $this->out(); + $this->out("plugin view"); + $this->out("\tbakes view. Run 'cake bake view help' for more info."); + $this->out(); + $this->_stop(); + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/project.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/project.php new file mode 100644 index 000000000..7266dc0a2 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/project.php @@ -0,0 +1,371 @@ +args[0])) { + $project = $this->args[0]; + } + } + + if ($project) { + $this->Dispatch->parseParams(array('-app', $project)); + $project = $this->params['working']; + } + + if (empty($this->params['skel'])) { + $this->params['skel'] = ''; + if (is_dir(CAKE . 'console' . DS . 'templates' . DS . 'skel') === true) { + $this->params['skel'] = CAKE . 'console' . DS . 'templates' . DS . 'skel'; + } + } + + while (!$project) { + $prompt = __("What is the full path for this app including the app directory name?\n Example:", true); + $default = $this->params['working'] . DS . 'myapp'; + $project = $this->in($prompt . $default, null, $default); + } + + if ($project) { + $response = false; + while ($response == false && is_dir($project) === true && file_exists($project . 'config' . 'core.php')) { + $prompt = sprintf(__('A project already exists in this location: %s Overwrite?', true), $project); + $response = $this->in($prompt, array('y','n'), 'n'); + if (strtolower($response) === 'n') { + $response = $project = false; + } + } + } + + if ($this->bake($project)) { + $path = Folder::slashTerm($project); + if ($this->createHome($path)) { + $this->out(__('Welcome page created', true)); + } else { + $this->out(__('The Welcome page was NOT created', true)); + } + + if ($this->securitySalt($path) === true ) { + $this->out(__('Random hash key created for \'Security.salt\'', true)); + } else { + $this->err(sprintf(__('Unable to generate random hash for \'Security.salt\', you should change it in %s', true), CONFIGS . 'core.php')); + } + + if ($this->securityCipherSeed($path) === true ) { + $this->out(__('Random seed created for \'Security.cipherSeed\'', true)); + } else { + $this->err(sprintf(__('Unable to generate random seed for \'Security.cipherSeed\', you should change it in %s', true), CONFIGS . 'core.php')); + } + + $corePath = $this->corePath($path); + if ($corePath === true ) { + $this->out(sprintf(__('CAKE_CORE_INCLUDE_PATH set to %s in webroot/index.php', true), CAKE_CORE_INCLUDE_PATH)); + $this->out(sprintf(__('CAKE_CORE_INCLUDE_PATH set to %s in webroot/test.php', true), CAKE_CORE_INCLUDE_PATH)); + $this->out(__('Remember to check these value after moving to production server', true)); + } elseif ($corePath === false) { + $this->err(sprintf(__('Unable to set CAKE_CORE_INCLUDE_PATH, you should change it in %s', true), $path . 'webroot' .DS .'index.php')); + } + $Folder = new Folder($path); + if (!$Folder->chmod($path . 'tmp', 0777)) { + $this->err(sprintf(__('Could not set permissions on %s', true), $path . DS .'tmp')); + $this->out(sprintf(__('chmod -R 0777 %s', true), $path . DS .'tmp')); + } + + $this->params['working'] = $path; + $this->params['app'] = basename($path); + return true; + } + } + +/** + * Looks for a skeleton template of a Cake application, + * and if not found asks the user for a path. When there is a path + * this method will make a deep copy of the skeleton to the project directory. + * A default home page will be added, and the tmp file storage will be chmod'ed to 0777. + * + * @param string $path Project path + * @param string $skel Path to copy from + * @param string $skip array of directories to skip when copying + * @access private + */ + function bake($path, $skel = null, $skip = array('empty')) { + if (!$skel) { + $skel = $this->params['skel']; + } + while (!$skel) { + $skel = $this->in(sprintf(__("What is the path to the directory layout you wish to copy?\nExample: %s"), APP, null, ROOT . DS . 'myapp' . DS)); + if ($skel == '') { + $this->out(__('The directory path you supplied was empty. Please try again.', true)); + } else { + while (is_dir($skel) === false) { + $skel = $this->in(__('Directory path does not exist please choose another:', true)); + } + } + } + + $app = basename($path); + + $this->out(__('Bake Project', true)); + $this->out(__("Skel Directory: ", true) . $skel); + $this->out(__("Will be copied to: ", true) . $path); + $this->hr(); + + $looksGood = $this->in(__('Look okay?', true), array('y', 'n', 'q'), 'y'); + + if (strtolower($looksGood) == 'y') { + $verbose = $this->in(__('Do you want verbose output?', true), array('y', 'n'), 'n'); + + $Folder = new Folder($skel); + if (!empty($this->params['empty'])) { + $skip = array(); + } + if ($Folder->copy(array('to' => $path, 'skip' => $skip))) { + $this->hr(); + $this->out(sprintf(__("Created: %s in %s", true), $app, $path)); + $this->hr(); + } else { + $this->err(sprintf(__(" '%s' could not be created properly", true), $app)); + return false; + } + + if (strtolower($verbose) == 'y') { + foreach ($Folder->messages() as $message) { + $this->out($message); + } + } + + return true; + } elseif (strtolower($looksGood) == 'q') { + $this->out(__('Bake Aborted.', true)); + } else { + $this->execute(false); + return false; + } + } + +/** + * Writes a file with a default home page to the project. + * + * @param string $dir Path to project + * @return boolean Success + * @access public + */ + function createHome($dir) { + $app = basename($dir); + $path = $dir . 'views' . DS . 'pages' . DS; + $source = CAKE . 'console' . DS . 'templates' . DS .'default' . DS . 'views' . DS . 'home.ctp'; + include($source); + return $this->createFile($path.'home.ctp', $output); + } + +/** + * Generates and writes 'Security.salt' + * + * @param string $path Project path + * @return boolean Success + * @access public + */ + function securitySalt($path) { + $File =& new File($path . 'config' . DS . 'core.php'); + $contents = $File->read(); + if (preg_match('/([\\t\\x20]*Configure::write\\(\\\'Security.salt\\\',[\\t\\x20\'A-z0-9]*\\);)/', $contents, $match)) { + if (!class_exists('Security')) { + require LIBS . 'security.php'; + } + $string = Security::generateAuthKey(); + $result = str_replace($match[0], "\t" . 'Configure::write(\'Security.salt\', \''.$string.'\');', $contents); + if ($File->write($result)) { + return true; + } + return false; + } + return false; + } + + /** + * Generates and writes 'Security.cipherSeed' + * + * @param string $path Project path + * @return boolean Success + * @access public + */ + function securityCipherSeed($path) { + $File =& new File($path . 'config' . DS . 'core.php'); + $contents = $File->read(); + if (preg_match('/([\\t\\x20]*Configure::write\\(\\\'Security.cipherSeed\\\',[\\t\\x20\'A-z0-9]*\\);)/', $contents, $match)) { + if (!class_exists('Security')) { + require LIBS . 'security.php'; + } + $string = substr(bin2hex(Security::generateAuthKey()), 0, 30); + $result = str_replace($match[0], "\t" . 'Configure::write(\'Security.cipherSeed\', \''.$string.'\');', $contents); + if ($File->write($result)) { + return true; + } + return false; + } + return false; + } + +/** + * Generates and writes CAKE_CORE_INCLUDE_PATH + * + * @param string $path Project path + * @return boolean Success + * @access public + */ + function corePath($path) { + if (dirname($path) !== CAKE_CORE_INCLUDE_PATH) { + $File =& new File($path . 'webroot' . DS . 'index.php'); + $contents = $File->read(); + if (preg_match('/([\\t\\x20]*define\\(\\\'CAKE_CORE_INCLUDE_PATH\\\',[\\t\\x20\'A-z0-9]*\\);)/', $contents, $match)) { + $root = strpos(CAKE_CORE_INCLUDE_PATH, '/') === 0 ? " DS . '" : "'"; + $result = str_replace($match[0], "\t\tdefine('CAKE_CORE_INCLUDE_PATH', " . $root . str_replace(DS, "' . DS . '", trim(CAKE_CORE_INCLUDE_PATH, DS)) . "');", $contents); + if (!$File->write($result)) { + return false; + } + } else { + return false; + } + + $File =& new File($path . 'webroot' . DS . 'test.php'); + $contents = $File->read(); + if (preg_match('/([\\t\\x20]*define\\(\\\'CAKE_CORE_INCLUDE_PATH\\\',[\\t\\x20\'A-z0-9]*\\);)/', $contents, $match)) { + $result = str_replace($match[0], "\t\tdefine('CAKE_CORE_INCLUDE_PATH', " . $root . str_replace(DS, "' . DS . '", trim(CAKE_CORE_INCLUDE_PATH, DS)) . "');", $contents); + if (!$File->write($result)) { + return false; + } + } else { + return false; + } + return true; + } + } + +/** + * Enables Configure::read('Routing.prefixes') in /app/config/core.php + * + * @param string $name Name to use as admin routing + * @return boolean Success + * @access public + */ + function cakeAdmin($name) { + $path = (empty($this->configPath)) ? CONFIGS : $this->configPath; + $File =& new File($path . 'core.php'); + $contents = $File->read(); + if (preg_match('%([/\\t\\x20]*Configure::write\(\'Routing.prefixes\',[\\t\\x20\'a-z,\)\(]*\\);)%', $contents, $match)) { + $result = str_replace($match[0], "\t" . 'Configure::write(\'Routing.prefixes\', array(\''.$name.'\'));', $contents); + if ($File->write($result)) { + Configure::write('Routing.prefixes', array($name)); + return true; + } else { + return false; + } + } else { + return false; + } + } + +/** + * Checks for Configure::read('Routing.prefixes') and forces user to input it if not enabled + * + * @return string Admin route to use + * @access public + */ + function getPrefix() { + $admin = ''; + $prefixes = Configure::read('Routing.prefixes'); + if (!empty($prefixes)) { + if (count($prefixes) == 1) { + return $prefixes[0] . '_'; + } + if ($this->interactive) { + $this->out(); + $this->out(__('You have more than one routing prefix configured', true)); + } + $options = array(); + foreach ($prefixes as $i => $prefix) { + $options[] = $i + 1; + if ($this->interactive) { + $this->out($i + 1 . '. ' . $prefix); + } + } + $selection = $this->in(__('Please choose a prefix to bake with.', true), $options, 1); + return $prefixes[$selection - 1] . '_'; + } + if ($this->interactive) { + $this->hr(); + $this->out('You need to enable Configure::write(\'Routing.prefixes\',array(\'admin\')) in /app/config/core.php to use prefix routing.'); + $this->out(__('What would you like the prefix route to be?', true)); + $this->out(__('Example: www.example.com/admin/controller', true)); + while ($admin == '') { + $admin = $this->in(__("Enter a routing prefix:", true), null, 'admin'); + } + if ($this->cakeAdmin($admin) !== true) { + $this->out(__('Unable to write to /app/config/core.php.', true)); + $this->out('You need to enable Configure::write(\'Routing.prefixes\',array(\'admin\')) in /app/config/core.php to use prefix routing.'); + $this->_stop(); + } + return $admin . '_'; + } + return ''; + } + +/** + * Help + * + * @return void + * @access public + */ + function help() { + $this->hr(); + $this->out("Usage: cake bake project "); + $this->hr(); + $this->out('Commands:'); + $this->out(); + $this->out("project "); + $this->out("\tbakes app directory structure."); + $this->out("\tif begins with '/' path is absolute."); + $this->out(); + $this->_stop(); + } + +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/template.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/template.php new file mode 100644 index 000000000..aac544abc --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/template.php @@ -0,0 +1,210 @@ + $path + * + * @var array + */ + var $templatePaths = array(); + +/** + * Initialize callback. Setup paths for the template task. + * + * @access public + * @return void + */ + function initialize() { + $this->templatePaths = $this->_findThemes(); + } + +/** + * Find the paths to all the installed shell themes in the app. + * + * Bake themes are directories not named `skel` inside a `vendors/shells/templates` path. + * + * @return array Array of bake themes that are installed. + */ + function _findThemes() { + $paths = App::path('shells'); + $core = array_pop($paths); + $separator = DS === '/' ? '/' : '\\\\'; + $core = preg_replace('#libs' . $separator . '$#', '', $core); + + $Folder =& new Folder($core . 'templates' . DS . 'default'); + $contents = $Folder->read(); + $themeFolders = $contents[0]; + + $plugins = App::objects('plugin'); + foreach ($plugins as $plugin) { + $paths[] = $this->_pluginPath($plugin) . 'vendors' . DS . 'shells' . DS; + } + $paths[] = $core; + + // TEMPORARY TODO remove when all paths are DS terminated + foreach ($paths as $i => $path) { + $paths[$i] = rtrim($path, DS) . DS; + } + + $themes = array(); + foreach ($paths as $path) { + $Folder =& new Folder($path . 'templates', false); + $contents = $Folder->read(); + $subDirs = $contents[0]; + foreach ($subDirs as $dir) { + if (empty($dir) || preg_match('@^skel$|_skel$@', $dir)) { + continue; + } + $Folder =& new Folder($path . 'templates' . DS . $dir); + $contents = $Folder->read(); + $subDirs = $contents[0]; + if (array_intersect($contents[0], $themeFolders)) { + $templateDir = $path . 'templates' . DS . $dir . DS; + $themes[$dir] = $templateDir; + } + } + } + return $themes; + } + +/** + * Set variable values to the template scope + * + * @param mixed $one A string or an array of data. + * @param mixed $two Value in case $one is a string (which then works as the key). + * Unused if $one is an associative array, otherwise serves as the values to $one's keys. + * @return void + */ + function set($one, $two = null) { + $data = null; + if (is_array($one)) { + if (is_array($two)) { + $data = array_combine($one, $two); + } else { + $data = $one; + } + } else { + $data = array($one => $two); + } + + if ($data == null) { + return false; + } + $this->templateVars = $data + $this->templateVars; + } + +/** + * Runs the template + * + * @param string $directory directory / type of thing you want + * @param string $filename template name + * @param string $vars Additional vars to set to template scope. + * @access public + * @return contents of generated code template + */ + function generate($directory, $filename, $vars = null) { + if ($vars !== null) { + $this->set($vars); + } + if (empty($this->templatePaths)) { + $this->initialize(); + } + $themePath = $this->getThemePath(); + $templateFile = $this->_findTemplate($themePath, $directory, $filename); + if ($templateFile) { + extract($this->templateVars); + ob_start(); + ob_implicit_flush(0); + include($templateFile); + $content = ob_get_clean(); + return $content; + } + return ''; + } + +/** + * Find the theme name for the current operation. + * If there is only one theme in $templatePaths it will be used. + * If there is a -theme param in the cli args, it will be used. + * If there is more than one installed theme user interaction will happen + * + * @return string returns the path to the selected theme. + */ + function getThemePath() { + if (count($this->templatePaths) == 1) { + $paths = array_values($this->templatePaths); + return $paths[0]; + } + if (!empty($this->params['theme']) && isset($this->templatePaths[$this->params['theme']])) { + return $this->templatePaths[$this->params['theme']]; + } + + $this->hr(); + $this->out(__('You have more than one set of templates installed.', true)); + $this->out(__('Please choose the template set you wish to use:', true)); + $this->hr(); + + $i = 1; + $indexedPaths = array(); + foreach ($this->templatePaths as $key => $path) { + $this->out($i . '. ' . $key); + $indexedPaths[$i] = $path; + $i++; + } + $index = $this->in(__('Which bake theme would you like to use?', true), range(1, $i - 1), 1); + $themeNames = array_keys($this->templatePaths); + $this->Dispatch->params['theme'] = $themeNames[$index - 1]; + return $indexedPaths[$index]; + } + +/** + * Find a template inside a directory inside a path. + * Will scan all other theme dirs if the template is not found in the first directory. + * + * @param string $path The initial path to look for the file on. If it is not found fallbacks will be used. + * @param string $directory Subdirectory to look for ie. 'views', 'objects' + * @param string $filename lower_case_underscored filename you want. + * @access public + * @return string filename will exit program if template is not found. + */ + function _findTemplate($path, $directory, $filename) { + $themeFile = $path . $directory . DS . $filename . '.ctp'; + if (file_exists($themeFile)) { + return $themeFile; + } + foreach ($this->templatePaths as $path) { + $templatePath = $path . $directory . DS . $filename . '.ctp'; + if (file_exists($templatePath)) { + return $templatePath; + } + } + $this->err(sprintf(__('Could not find template for %s', true), $filename)); + return false; + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/test.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/test.php new file mode 100644 index 000000000..ed9c7e433 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/test.php @@ -0,0 +1,469 @@ +args)) { + $this->__interactive(); + } + + if (count($this->args) == 1) { + $this->__interactive($this->args[0]); + } + + if (count($this->args) > 1) { + $type = Inflector::underscore($this->args[0]); + if ($this->bake($type, $this->args[1])) { + $this->out('done'); + } + } + } + +/** + * Handles interactive baking + * + * @access private + */ + function __interactive($type = null) { + $this->interactive = true; + $this->hr(); + $this->out(__('Bake Tests', true)); + $this->out(sprintf(__("Path: %s", true), $this->path)); + $this->hr(); + + if ($type) { + $type = Inflector::camelize($type); + if (!in_array($type, $this->classTypes)) { + $this->error(sprintf('Incorrect type provided. Please choose one of %s', implode(', ', $this->classTypes))); + } + } else { + $type = $this->getObjectType(); + } + $className = $this->getClassName($type); + return $this->bake($type, $className); + } + +/** + * Completes final steps for generating data to create test case. + * + * @param string $type Type of object to bake test case for ie. Model, Controller + * @param string $className the 'cake name' for the class ie. Posts for the PostsController + * @access public + */ + function bake($type, $className) { + if ($this->typeCanDetectFixtures($type) && $this->isLoadableClass($type, $className)) { + $this->out(__('Bake is detecting possible fixtures..', true)); + $testSubject =& $this->buildTestSubject($type, $className); + $this->generateFixtureList($testSubject); + } elseif ($this->interactive) { + $this->getUserFixtures(); + } + $fullClassName = $this->getRealClassName($type, $className); + + $methods = array(); + if (class_exists($fullClassName)) { + $methods = $this->getTestableMethods($fullClassName); + } + $mock = $this->hasMockClass($type, $fullClassName); + $construction = $this->generateConstructor($type, $fullClassName); + + $plugin = null; + if ($this->plugin) { + $plugin = $this->plugin . '.'; + } + + $this->Template->set('fixtures', $this->_fixtures); + $this->Template->set('plugin', $plugin); + $this->Template->set(compact('className', 'methods', 'type', 'fullClassName', 'mock', 'construction')); + $out = $this->Template->generate('classes', 'test'); + + $filename = $this->testCaseFileName($type, $className); + $made = $this->createFile($filename, $out); + if ($made) { + return $out; + } + return false; + } + +/** + * Interact with the user and get their chosen type. Can exit the script. + * + * @return string Users chosen type. + * @access public + */ + function getObjectType() { + $this->hr(); + $this->out(__("Select an object type:", true)); + $this->hr(); + + $keys = array(); + foreach ($this->classTypes as $key => $option) { + $this->out(++$key . '. ' . $option); + $keys[] = $key; + } + $keys[] = 'q'; + $selection = $this->in(__("Enter the type of object to bake a test for or (q)uit", true), $keys, 'q'); + if ($selection == 'q') { + return $this->_stop(); + } + return $this->classTypes[$selection - 1]; + } + +/** + * Get the user chosen Class name for the chosen type + * + * @param string $objectType Type of object to list classes for i.e. Model, Controller. + * @return string Class name the user chose. + * @access public + */ + function getClassName($objectType) { + $type = strtolower($objectType); + if ($this->plugin) { + $path = Inflector::pluralize($type); + if ($type === 'helper') { + $path = 'views' . DS . $path; + } elseif ($type === 'component') { + $path = 'controllers' . DS . $path; + } elseif ($type === 'behavior') { + $path = 'models' . DS . $path; + } + $options = App::objects($type, App::pluginPath($this->plugin) . $path, false); + } else { + $options = App::objects($type); + } + $this->out(sprintf(__('Choose a %s class', true), $objectType)); + $keys = array(); + foreach ($options as $key => $option) { + $this->out(++$key . '. ' . $option); + $keys[] = $key; + } + $selection = $this->in(__('Choose an existing class, or enter the name of a class that does not exist', true)); + if (isset($options[$selection - 1])) { + return $options[$selection - 1]; + } + return $selection; + } + +/** + * Checks whether the chosen type can find its own fixtures. + * Currently only model, and controller are supported + * + * @param string $type The Type of object you are generating tests for eg. controller + * @param string $className the Classname of the class the test is being generated for. + * @return boolean + * @access public + */ + function typeCanDetectFixtures($type) { + $type = strtolower($type); + return ($type == 'controller' || $type == 'model'); + } + +/** + * Check if a class with the given type is loaded or can be loaded. + * + * @param string $type The Type of object you are generating tests for eg. controller + * @param string $className the Classname of the class the test is being generated for. + * @return boolean + * @access public + */ + function isLoadableClass($type, $class) { + return App::import($type, $class); + } + +/** + * Construct an instance of the class to be tested. + * So that fixtures can be detected + * + * @param string $type The Type of object you are generating tests for eg. controller + * @param string $class the Classname of the class the test is being generated for. + * @return object And instance of the class that is going to be tested. + * @access public + */ + function &buildTestSubject($type, $class) { + ClassRegistry::flush(); + App::import($type, $class); + $class = $this->getRealClassName($type, $class); + if (strtolower($type) == 'model') { + $instance =& ClassRegistry::init($class); + } else { + $instance =& new $class(); + } + return $instance; + } + +/** + * Gets the real class name from the cake short form. + * + * @param string $type The Type of object you are generating tests for eg. controller + * @param string $class the Classname of the class the test is being generated for. + * @return string Real classname + * @access public + */ + function getRealClassName($type, $class) { + if (strtolower($type) == 'model') { + return $class; + } + return $class . $type; + } + +/** + * Get methods declared in the class given. + * No parent methods will be returned + * + * @param string $className Name of class to look at. + * @return array Array of method names. + * @access public + */ + function getTestableMethods($className) { + $classMethods = get_class_methods($className); + $parentMethods = get_class_methods(get_parent_class($className)); + $thisMethods = array_diff($classMethods, $parentMethods); + $out = array(); + foreach ($thisMethods as $method) { + if (substr($method, 0, 1) != '_' && $method != strtolower($className)) { + $out[] = $method; + } + } + return $out; + } + +/** + * Generate the list of fixtures that will be required to run this test based on + * loaded models. + * + * @param object $subject The object you want to generate fixtures for. + * @return array Array of fixtures to be included in the test. + * @access public + */ + function generateFixtureList(&$subject) { + $this->_fixtures = array(); + if (is_a($subject, 'Model')) { + $this->_processModel($subject); + } elseif (is_a($subject, 'Controller')) { + $this->_processController($subject); + } + return array_values($this->_fixtures); + } + +/** + * Process a model recursively and pull out all the + * model names converting them to fixture names. + * + * @param Model $subject A Model class to scan for associations and pull fixtures off of. + * @return void + * @access protected + */ + function _processModel(&$subject) { + $this->_addFixture($subject->name); + $associated = $subject->getAssociated(); + foreach ($associated as $alias => $type) { + $className = $subject->{$alias}->name; + if (!isset($this->_fixtures[$className])) { + $this->_processModel($subject->{$alias}); + } + if ($type == 'hasAndBelongsToMany') { + $joinModel = Inflector::classify($subject->hasAndBelongsToMany[$alias]['joinTable']); + if (!isset($this->_fixtures[$joinModel])) { + $this->_processModel($subject->{$joinModel}); + } + } + } + } + +/** + * Process all the models attached to a controller + * and generate a fixture list. + * + * @param Controller $subject A controller to pull model names off of. + * @return void + * @access protected + */ + function _processController(&$subject) { + $subject->constructClasses(); + $models = array(Inflector::classify($subject->name)); + if (!empty($subject->uses)) { + $models = $subject->uses; + } + foreach ($models as $model) { + $this->_processModel($subject->{$model}); + } + } + +/** + * Add classname to the fixture list. + * Sets the app. or plugin.plugin_name. prefix. + * + * @param string $name Name of the Model class that a fixture might be required for. + * @return void + * @access protected + */ + function _addFixture($name) { + $parent = get_parent_class($name); + $prefix = 'app.'; + if (strtolower($parent) != 'appmodel' && strtolower(substr($parent, -8)) == 'appmodel') { + $pluginName = substr($parent, 0, strlen($parent) -8); + $prefix = 'plugin.' . Inflector::underscore($pluginName) . '.'; + } + $fixture = $prefix . Inflector::underscore($name); + $this->_fixtures[$name] = $fixture; + } + +/** + * Interact with the user to get additional fixtures they want to use. + * + * @return array Array of fixtures the user wants to add. + * @access public + */ + function getUserFixtures() { + $proceed = $this->in(__('Bake could not detect fixtures, would you like to add some?', true), array('y','n'), 'n'); + $fixtures = array(); + if (strtolower($proceed) == 'y') { + $fixtureList = $this->in(__("Please provide a comma separated list of the fixtures names you'd like to use.\nExample: 'app.comment, app.post, plugin.forums.post'", true)); + $fixtureListTrimmed = str_replace(' ', '', $fixtureList); + $fixtures = explode(',', $fixtureListTrimmed); + } + $this->_fixtures = array_merge($this->_fixtures, $fixtures); + return $fixtures; + } + +/** + * Is a mock class required for this type of test? + * Controllers require a mock class. + * + * @param string $type The type of object tests are being generated for eg. controller. + * @return boolean + * @access public + */ + function hasMockClass($type) { + $type = strtolower($type); + return $type == 'controller'; + } + +/** + * Generate a constructor code snippet for the type and classname + * + * @param string $type The Type of object you are generating tests for eg. controller + * @param string $className the Classname of the class the test is being generated for. + * @return string Constructor snippet for the thing you are building. + * @access public + */ + function generateConstructor($type, $fullClassName) { + $type = strtolower($type); + if ($type == 'model') { + return "ClassRegistry::init('$fullClassName');\n"; + } + if ($type == 'controller') { + $className = substr($fullClassName, 0, strlen($fullClassName) - 10); + return "new Test$fullClassName();\n\t\t\$this->{$className}->constructClasses();\n"; + } + return "new $fullClassName();\n"; + } + +/** + * Make the filename for the test case. resolve the suffixes for controllers + * and get the plugin path if needed. + * + * @param string $type The Type of object you are generating tests for eg. controller + * @param string $className the Classname of the class the test is being generated for. + * @return string filename the test should be created on. + * @access public + */ + function testCaseFileName($type, $className) { + $path = $this->getPath();; + $path .= 'cases' . DS . strtolower($type) . 's' . DS; + if (strtolower($type) == 'controller') { + $className = $this->getRealClassName($type, $className); + } + return $path . Inflector::underscore($className) . '.test.php'; + } + +/** + * Show help file. + * + * @return void + * @access public + */ + function help() { + $this->hr(); + $this->out("Usage: cake bake test "); + $this->hr(); + $this->out('Commands:'); + $this->out(""); + $this->out("test model post\n\tbakes a test case for the post model."); + $this->out(""); + $this->out("test controller comments\n\tbakes a test case for the comments controller."); + $this->out(""); + $this->out('Arguments:'); + $this->out("\t Can be any of the following 'controller', 'model', 'helper',\n\t'component', 'behavior'."); + $this->out("\t Any existing class for the chosen type."); + $this->out(""); + $this->out("Parameters:"); + $this->out("\t-plugin CamelCased name of plugin to bake tests for."); + $this->out(""); + $this->_stop(); + } +} diff --git a/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/view.php b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/view.php new file mode 100644 index 000000000..7ccc74072 --- /dev/null +++ b/code/ryzom/tools/server/www/webtt/cake/console/libs/tasks/view.php @@ -0,0 +1,491 @@ +args)) { + $this->__interactive(); + } + if (empty($this->args[0])) { + return; + } + if (!isset($this->connection)) { + $this->connection = 'default'; + } + $controller = $action = $alias = null; + $this->controllerName = $this->_controllerName($this->args[0]); + $this->controllerPath = $this->_controllerPath($this->controllerName); + + $this->Project->interactive = false; + if (strtolower($this->args[0]) == 'all') { + return $this->all(); + } + + if (isset($this->args[1])) { + $this->template = $this->args[1]; + } + if (isset($this->args[2])) { + $action = $this->args[2]; + } + if (!$action) { + $action = $this->template; + } + if ($action) { + return $this->bake($action, true); + } + + $vars = $this->__loadController(); + $methods = $this->_methodsToBake(); + + foreach ($methods as $method) { + $content = $this->getContent($method, $vars); + if ($content) { + $this->bake($method, $content); + } + } + } + +/** + * Get a list of actions that can / should have views baked for them. + * + * @return array Array of action names that should be baked + */ + function _methodsToBake() { + $methods = array_diff( + array_map('strtolower', get_class_methods($this->controllerName . 'Controller')), + array_map('strtolower', get_class_methods('appcontroller')) + ); + $scaffoldActions = false; + if (empty($methods)) { + $scaffoldActions = true; + $methods = $this->scaffoldActions; + } + $adminRoute = $this->Project->getPrefix(); + foreach ($methods as $i => $method) { + if ($adminRoute && isset($this->params['admin'])) { + if ($scaffoldActions) { + $methods[$i] = $adminRoute . $method; + continue; + } elseif (strpos($method, $adminRoute) === false) { + unset($methods[$i]); + } + } + if ($method[0] === '_' || $method == strtolower($this->controllerName . 'Controller')) { + unset($methods[$i]); + } + } + return $methods; + } + +/** + * Bake All views for All controllers. + * + * @return void + */ + function all() { + $this->Controller->interactive = false; + $tables = $this->Controller->listAll($this->connection, false); + + $actions = null; + if (isset($this->args[1])) { + $actions = array($this->args[1]); + } + $this->interactive = false; + foreach ($tables as $table) { + $model = $this->_modelName($table); + $this->controllerName = $this->_controllerName($model); + $this->controllerPath = Inflector::underscore($this->controllerName); + if (App::import('Model', $model)) { + $vars = $this->__loadController(); + if (!$actions) { + $actions = $this->_methodsToBake(); + } + $this->bakeActions($actions, $vars); + $actions = null; + } + } + } + +/** + * Handles interactive baking + * + * @access private + */ + function __interactive() { + $this->hr(); + $this->out(sprintf("Bake View\nPath: %s", $this->path)); + $this->hr(); + + $this->DbConfig->interactive = $this->Controller->interactive = $this->interactive = true; + + if (empty($this->connection)) { + $this->connection = $this->DbConfig->getConfig(); + } + + $this->Controller->connection = $this->connection; + $this->controllerName = $this->Controller->getName(); + + $this->controllerPath = strtolower(Inflector::underscore($this->controllerName)); + + $prompt = sprintf(__("Would you like bake to build your views interactively?\nWarning: Choosing no will overwrite %s views if it exist.", true), $this->controllerName); + $interactive = $this->in($prompt, array('y', 'n'), 'n'); + + if (strtolower($interactive) == 'n') { + $this->interactive = false; + } + + $prompt = __("Would you like to create some CRUD views\n(index, add, view, edit) for this controller?\nNOTE: Before doing so, you'll need to create your controller\nand model classes (including associated models).", true); + $wannaDoScaffold = $this->in($prompt, array('y','n'), 'y'); + + $wannaDoAdmin = $this->in(__("Would you like to create the views for admin routing?", true), array('y','n'), 'n'); + + if (strtolower($wannaDoScaffold) == 'y' || strtolower($wannaDoAdmin) == 'y') { + $vars = $this->__loadController(); + if (strtolower($wannaDoScaffold) == 'y') { + $actions = $this->scaffoldActions; + $this->bakeActions($actions, $vars); + } + if (strtolower($wannaDoAdmin) == 'y') { + $admin = $this->Project->getPrefix(); + $regularActions = $this->scaffoldActions; + $adminActions = array(); + foreach ($regularActions as $action) { + $adminActions[] = $admin . $action; + } + $this->bakeActions($adminActions, $vars); + } + $this->hr(); + $this->out(); + $this->out(__("View Scaffolding Complete.\n", true)); + } else { + $this->customAction(); + } + } + +/** + * Loads Controller and sets variables for the template + * Available template variables + * 'modelClass', 'primaryKey', 'displayField', 'singularVar', 'pluralVar', + * 'singularHumanName', 'pluralHumanName', 'fields', 'foreignKeys', + * 'belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany' + * + * @return array Returns an variables to be made available to a view template + * @access private + */ + function __loadController() { + if (!$this->controllerName) { + $this->err(__('Controller not found', true)); + } + + $import = $this->controllerName; + if ($this->plugin) { + $import = $this->plugin . '.' . $this->controllerName; + } + + if (!App::import('Controller', $import)) { + $file = $this->controllerPath . '_controller.php'; + $this->err(sprintf(__("The file '%s' could not be found.\nIn order to bake a view, you'll need to first create the controller.", true), $file)); + $this->_stop(); + } + $controllerClassName = $this->controllerName . 'Controller'; + $controllerObj =& new $controllerClassName(); + $controllerObj->plugin = $this->plugin; + $controllerObj->constructClasses(); + $modelClass = $controllerObj->modelClass; + $modelObj =& $controllerObj->{$controllerObj->modelClass}; + + if ($modelObj) { + $primaryKey = $modelObj->primaryKey; + $displayField = $modelObj->displayField; + $singularVar = Inflector::variable($modelClass); + $singularHumanName = $this->_singularHumanName($this->controllerName); + $schema = $modelObj->schema(true); + $fields = array_keys($schema); + $associations = $this->__associations($modelObj); + } else { + $primaryKey = $displayField = null; + $singularVar = Inflector::variable(Inflector::singularize($this->controllerName)); + $singularHumanName = $this->_singularHumanName($this->controllerName); + $fields = $schema = $associations = array(); + } + $pluralVar = Inflector::variable($this->controllerName); + $pluralHumanName = $this->_pluralHumanName($this->controllerName); + + return compact('modelClass', 'schema', 'primaryKey', 'displayField', 'singularVar', 'pluralVar', + 'singularHumanName', 'pluralHumanName', 'fields','associations'); + } + +/** + * Bake a view file for each of the supplied actions + * + * @param array $actions Array of actions to make files for. + * @return void + */ + function bakeActions($actions, $vars) { + foreach ($actions as $action) { + $content = $this->getContent($action, $vars); + $this->bake($action, $content); + } + } + +/** + * handle creation of baking a custom action view file + * + * @return void + */ + function customAction() { + $action = ''; + while ($action == '') { + $action = $this->in(__('Action Name? (use lowercase_underscored function name)', true)); + if ($action == '') { + $this->out(__('The action name you supplied was empty. Please try again.', true)); + } + } + $this->out(); + $this->hr(); + $this->out(__('The following view will be created:', true)); + $this->hr(); + $this->out(sprintf(__('Controller Name: %s', true), $this->controllerName)); + $this->out(sprintf(__('Action Name: %s', true), $action)); + $this->out(sprintf(__('Path: %s', true), $this->params['app'] . DS . $this->controllerPath . DS . Inflector::underscore($action) . ".ctp")); + $this->hr(); + $looksGood = $this->in(__('Look okay?', true), array('y','n'), 'y'); + if (strtolower($looksGood) == 'y') { + $this->bake($action); + $this->_stop(); + } else { + $this->out(__('Bake Aborted.', true)); + } + } + +/** + * Assembles and writes bakes the view file. + * + * @param string $action Action to bake + * @param string $content Content to write + * @return boolean Success + * @access public + */ + function bake($action, $content = '') { + if ($content === true) { + $content = $this->getContent($action); + } + if (empty($content)) { + return false; + } + $path = $this->getPath(); + $filename = $path . $this->controllerPath . DS . Inflector::underscore($action) . '.ctp'; + return $this->createFile($filename, $content); + } + +/** + * Builds content from template and variables + * + * @param string $action name to generate content to + * @param array $vars passed for use in templates + * @return string content from template + * @access public + */ + function getContent($action, $vars = null) { + if (!$vars) { + $vars = $this->__loadController(); + } + + $this->Template->set('action', $action); + $this->Template->set('plugin', $this->plugin); + $this->Template->set($vars); + $template = $this->getTemplate($action); + if ($template) { + return $this->Template->generate('views', $template); + } + return false; + } + +/** + * Gets the template name based on the action name + * + * @param string $action name + * @return string template name + * @access public + */ + function getTemplate($action) { + if ($action != $this->template && in_array($action, $this->noTemplateActions)) { + return false; + } + if (!empty($this->template) && $action != $this->template) { + return $this->template; + } + $template = $action; + $prefixes = Configure::read('Routing.prefixes'); + foreach ((array)$prefixes as $prefix) { + if (strpos($template, $prefix) !== false) { + $template = str_replace($prefix . '_', '', $template); + } + } + if (in_array($template, array('add', 'edit'))) { + $template = 'form'; + } elseif (preg_match('@(_add|_edit)$@', $template)) { + $template = str_replace(array('_add', '_edit'), '_form', $template); + } + return $template; + } + +/** + * Displays help contents + * + * @access public + */ + function help() { + $this->hr(); + $this->out("Usage: cake bake view ..."); + $this->hr(); + $this->out('Arguments:'); + $this->out(); + $this->out(""); + $this->out("\tName of the controller views to bake. Can use Plugin.name"); + $this->out("\tas a shortcut for plugin baking."); + $this->out(); + $this->out(""); + $this->out("\tName of the action view to bake"); + $this->out(); + $this->out('Commands:'); + $this->out(); + $this->out("view "); + $this->out("\tWill read the given controller for methods"); + $this->out("\tand bake corresponding views."); + $this->out("\tUsing the -admin flag will only bake views for actions"); + $this->out("\tthat begin with Routing.admin."); + $this->out("\tIf var scaffold is found it will bake the CRUD actions"); + $this->out("\t(index,view,add,edit)"); + $this->out(); + $this->out("view "); + $this->out("\tWill bake a template. core templates: (index, add, edit, view)"); + $this->out(); + $this->out("view