owner
stringclasses 603
values | repo
stringclasses 778
values | repo_dir
stringclasses 830
values | file_rel_repo
stringlengths 6
222
| file_rel_outdir
stringlengths 16
235
| size
int64 0
2.36M
| mtime
int64 1.76B
1.76B
| lang
stringclasses 10
values | content
stringlengths 0
2.36M
| updated_at
stringdate 2025-09-24 14:46:58
2025-09-24 14:46:58
|
---|---|---|---|---|---|---|---|---|---|
hoppscotch
|
hoppscotch
|
hoppscotch__hoppscotch
|
README.md
|
hoppscotch__hoppscotch/README.md
| 11,659 | 1,758,620,342 |
en
|
<div align="center">
<a href="https://hoppscotch.io">
<img
src="https://avatars.githubusercontent.com/u/56705483"
alt="Hoppscotch"
height="64"
/>
</a>
<h3>
<b>
Hoppscotch
</b>
</h3>
<b>
Open Source API Development Ecosystem
</b>
<p>
[](CODE_OF_CONDUCT.md) [](https://hoppscotch.io) [](https://github.com/hoppscotch/hoppscotch/actions) [](https://twitter.com/share?text=%F0%9F%91%BD%20Hoppscotch%20%E2%80%A2%20Open%20source%20API%20development%20ecosystem%20-%20Helps%20you%20create%20requests%20faster,%20saving%20precious%20time%20on%20development.&url=https://hoppscotch.io&hashtags=hoppscotch&via=hoppscotch_io)
</p>
<p>
<sub>
Built with ❤︎ by
<a href="https://github.com/hoppscotch/hoppscotch/graphs/contributors">
contributors
</a>
</sub>
</p>
<br />
<p>
<a href="https://hoppscotch.io">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./packages/hoppscotch-common/public/images/banner-dark.png">
<source media="(prefers-color-scheme: light)" srcset="./packages/hoppscotch-common/public/images/banner-light.png">
<img alt="Hoppscotch" src="./packages/hoppscotch-common/public/images/banner-dark.png">
</picture>
</a>
</p>
</div>
_We highly recommend you take a look at the [**Hoppscotch Documentation**](https://docs.hoppscotch.io) to learn more about the app._
#### **Support**
[](https://hoppscotch.io/discord) [](https://hoppscotch.io/telegram) [](https://github.com/hoppscotch/hoppscotch/discussions)
### **Features**
❤️ **Lightweight:** Crafted with minimalistic UI design.
⚡️ **Fast:** Send requests and get responses in real time.
🗄️ **HTTP Methods:** Request methods define the type of action you are requesting to be performed.
- `GET` - Requests retrieve resource information
- `POST` - The server creates a new entry in a database
- `PUT` - Updates an existing resource
- `PATCH` - Very similar to `PUT` but makes a partial update on a resource
- `DELETE` - Deletes resource or related component
- `HEAD` - Retrieve response headers identical to those of a GET request, but without the response body.
- `CONNECT` - Establishes a tunnel to the server identified by the target resource
- `OPTIONS` - Describe the communication options for the target resource
- `TRACE` - Performs a message loop-back test along the path to the target resource
- `<custom>` - Some APIs use custom request methods such as `LIST`. Type in your custom methods.
🌈 **Theming:** Customizable combinations for background, foreground, and accent colors — [customize now](https://hoppscotch.io/settings).
- Choose a theme: System preference, Light, Dark, and Black
- Choose accent colors: Green, Teal, Blue, Indigo, Purple, Yellow, Orange, Red, and Pink
- Distraction-free Zen mode
_Customized themes are synced with your cloud/local session._
🔥 **PWA:** Install as a [Progressive Web App](https://web.dev/progressive-web-apps) on your device.
- Instant loading with Service Workers
- Offline support
- Low RAM/memory and CPU usage
- Add to Home Screen
- Desktop PWA
🚀 **Request:** Retrieve response from endpoint instantly.
1. Choose `method`
2. Enter `URL`
3. Send
- Copy/share public "Share URL"
- Generate/copy request code snippets for 10+ languages and frameworks
- Import `cURL`
- Label requests
🔌 **WebSocket:** Establish full-duplex communication channels over a single TCP connection.
📡 **Server-Sent Events:** Receive a stream of updates from a server over an HTTP connection without resorting to polling.
🌩 **Socket.IO:** Send and Receive data with the SocketIO server.
🦟 **MQTT:** Subscribe and Publish to topics of an MQTT Broker.
🔮 **GraphQL:** GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data.
- Set endpoint and get schema
- Multi-column docs
- Set custom request headers
- Query schema
- Get query response
🔐 **Authorization:** Allows to identify the end-user.
- None
- Basic
- Bearer Token
- OAuth 2.0
- OIDC Access Token/PKCE
📢 **Headers:** Describes the format the body of your request is being sent in.
📫 **Parameters:** Use request parameters to set varying parts in simulated requests.
📃 **Request Body:** Used to send and receive data via the REST API.
- Set `Content Type`
- FormData, JSON, and many more
- Toggle between key-value and RAW input parameter list
📮 **Response:** Contains the status line, headers, and the message/response body.
- Copy the response to the clipboard
- Download the response as a file
- View response headers
- View raw and preview HTML, image, JSON, and XML responses
⏰ **History:** Request entries are synced with your cloud/local session storage.
📁 **Collections:** Keep your API requests organized with collections and folders. Reuse them with a single click.
- Unlimited collections, folders, and requests
- Nested folders
- Export and import as a file or GitHub gist
_Collections are synced with your cloud/local session storage._
📜 **Pre-Request Scripts:** Snippets of code associated with a request that is executed before the request is sent.
- Set environment variables
- Include timestamp in the request headers
- Send a random alphanumeric string in the URL parameters
- Any JavaScript functions
👨👩👧👦 **Teams:** Helps you collaborate across your teams to design, develop, and test APIs faster.
- Create unlimited teams
- Create unlimited shared collections
- Create unlimited team members
- Role-based access control
- Cloud sync
- Multiple devices
👥 **Workspaces:** Organize your personal and team collections environments into workspaces. Easily switch between workspaces to manage multiple projects.
- Create unlimited workspaces
- Switch between personal and team workspaces
⌨️ **Keyboard Shortcuts:** Optimized for efficiency.
> **[Read our documentation on Keyboard Shortcuts](https://docs.hoppscotch.io/documentation/features/shortcuts)**
🌐 **Proxy:** Enable Proxy Mode from Settings to access blocked APIs.
- Hide your IP address
- Fixes [`CORS`](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) (Cross-Origin Resource Sharing) issues
- Access APIs served in non-HTTPS (`http://`) endpoints
- Use your Proxy URL
_Official proxy server is hosted by Hoppscotch - **[GitHub](https://github.com/hoppscotch/proxyscotch)** - **[Privacy Policy](https://docs.hoppscotch.io/support/privacy)**._
🌎 **i18n:** Experience the app in your language.
Help us to translate Hoppscotch. Please read [`TRANSLATIONS`](TRANSLATIONS.md) for details on our [`CODE OF CONDUCT`](CODE_OF_CONDUCT.md) and the process for submitting pull requests to us.
☁️ **Auth + Sync:** Sign in and sync your data in real-time across all your devices.
**Sign in with:**
- GitHub
- Google
- Microsoft
- Email
- SSO (Single Sign-On)[^EE]
**🔄 Synchronize your data:** Handoff to continue tasks on your other devices.
- Workspaces
- History
- Collections
- Environments
- Settings
✅ **Post-Request Tests:** Write tests associated with a request that is executed after the request's response.
- Check the status code as an integer
- Filter response headers
- Parse the response data
- Set environment variables
- Write JavaScript code
🌱 **Environments:** Environment variables allow you to store and reuse values in your requests and scripts.
- Unlimited environments and variables
- Initialize through the pre-request script
- Export as / import from GitHub gist
<details>
<summary><i>Use-cases</i></summary>
---
- By storing a value in a variable, you can reference it throughout your request section
- If you need to update the value, you only have to change it in one place
- Using variables increases your ability to work efficiently and minimizes the likelihood of error
---
</details>
🚚 **Bulk Edit:** Edit key-value pairs in bulk.
- Entries are separated by newline
- Keys and values are separated by `:`
- Prepend `#` to any row you want to add but keep disabled
🎛️ **Admin dashboard:** Manage your team and invite members.
- Insights
- Manage users
- Manage teams
📦 **Add-ons:** Official add-ons for hoppscotch.
- **[Hoppscotch CLI](https://github.com/hoppscotch/hoppscotch/tree/main/packages/hoppscotch-cli)** - Command-line interface for Hoppscotch.
- **[Proxy](https://github.com/hoppscotch/proxyscotch)** - A simple proxy server created for Hoppscotch.
- **[Browser Extensions](https://github.com/hoppscotch/hoppscotch-extension)** - Browser extensions that enhance your Hoppscotch experience.
[ **Firefox**](https://addons.mozilla.org/en-US/firefox/addon/hoppscotch) | [ **Chrome**](https://chrome.google.com/webstore/detail/hoppscotch-extension-for-c/amknoiejhlmhancpahfcfcfhllgkpbld)
> **Extensions fix `CORS` issues.**
_Add-ons are developed and maintained under **[Hoppscotch Organization](https://github.com/hoppscotch)**._
**For a complete list of features, please read our [documentation](https://docs.hoppscotch.io).**
## **Demo**
- Web : [hoppscotch.io](https://hoppscotch.io)
- Windows/Linux/macOS : [Desktop Apps](https://docs.hoppscotch.io/documentation/clients/desktop#download-hoppscotch-desktop-app)
## Usage
1. Provide your API endpoint in the URL field
2. Click "Send" to simulate the request
3. View the response
## Developing
Follow our [self-hosting documentation](https://docs.hoppscotch.io/documentation/self-host/getting-started) to get started with the development environment.
## Contributing
Please contribute using [GitHub Flow](https://guides.github.com/introduction/flow). Create a branch, add commits, and [open a pull request](https://github.com/hoppscotch/hoppscotch/compare).
Please read [`CONTRIBUTING`](CONTRIBUTING.md) for details on our [`CODE OF CONDUCT`](CODE_OF_CONDUCT.md), and the process for submitting pull requests to us.
## Continuous Integration
We use [GitHub Actions](https://github.com/features/actions) for continuous integration. Check out our [build workflows](https://github.com/hoppscotch/hoppscotch/actions).
## Changelog
See the [`CHANGELOG`](CHANGELOG.md) file for details.
## Authors
This project owes its existence to the collective efforts of all those who contribute — [contribute now](CONTRIBUTING.md).
<div align="center">
<a href="https://github.com/hoppscotch/hoppscotch/graphs/contributors">
<img src="https://opencollective.com/hoppscotch/contributors.svg?width=840&button=false"
alt="Contributors"
width="100%" />
</a>
</div>
## License
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT) — see the [`LICENSE`](LICENSE) file for details.
[^EE]: Enterprise edition feature. [Learn more](https://docs.hoppscotch.io/documentation/self-host/getting-started).
|
2025-09-24T14:46:58.085215
|
Mintplex-Labs
|
anythingllm-docs
|
Mintplex-Labs__anythingllm-docs
|
README.md
|
Mintplex-Labs__anythingllm-docs/README.md
| 1,723 | 1,758,118,064 |
la
|
<a name="readme-top"></a>
<p align="center">
<a href="https://anythingllm.com"><img src="https://github.com/Mintplex-Labs/anything-llm/blob/master/images/wordmark.png?raw=true" alt="AnythingLLM logo"></a>
</p>
## Project Structure
```
├── public/
│ ├── images/
│ │ ├── anythingllm-setup/
│ │ ├── cloud/
│ │ ├── faq/
│ │ ├── features/
│ │ ├── getting-started/
│ │ ├── guides/
│ │ ├── home/
│ │ ├── legal/
│ │ ├── product/
│ │ └── thumbnails/
│ ├── favicon.png
│ ├── licence.txt
│ └── robots.txt
├── pages/
│ ├── agent/
│ ├── api/
│ ├── changelog/
│ ├── cloud/
│ ├── features/
│ ├── installation/
│ ├── setup/
│ ├── _meta.json
│ └── index.mdx
├── components/
│ └── icons/
├── next-env.d.ts
├── next.config.js
├── package.json
├── pull-request-template.md
├── README.md
├── theme.config.tsx
└── tsconfig.json
```
## Setup for Local Development
1. Clone this Repository to your local machine using git clone:
```sh
git clone https://github.com/Mintplex-Labs/anythingllm-docs.git
```
2. Install dependencies using yarn:
```sh
yarn
```
3. Start the development server:
```sh
yarn dev
```
## Contributing
- Create issue
- Create PR with branch name format of `<issue number>-<short name>`
- yee haw let's merge
## License
This project is licensed under the MIT License.
_special thanks to [@ShadowArcanist](https://github.com/ShadowArcanist) for the migration to NextJS_
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
README.md
|
CherryHQ__cherry-studio/README.md
| 21,328 | 1,758,620,022 |
en
|
<div align="right" >
<details>
<summary >🌐 Language</summary>
<div>
<div align="right">
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=en">English</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=zh-CN">简体中文</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=zh-TW">繁體中文</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=ja">日本語</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=ko">한국어</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=hi">हिन्दी</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=th">ไทย</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=fr">Français</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=de">Deutsch</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=es">Español</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=it">Italiano</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=ru">Русский</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=pt">Português</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=nl">Nederlands</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=pl">Polski</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=ar">العربية</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=fa">فارسی</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=tr">Türkçe</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=vi">Tiếng Việt</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=id">Bahasa Indonesia</a></p>
</div>
</div>
</details>
</div>
<h1 align="center">
<a href="https://github.com/CherryHQ/cherry-studio/releases">
<img src="https://github.com/CherryHQ/cherry-studio/blob/main/build/icon.png?raw=true" width="150" height="150" alt="banner" /><br>
</a>
</h1>
<p align="center">English | <a href="./docs/README.zh.md">中文</a> | <a href="https://cherry-ai.com">Official Site</a> | <a href="https://docs.cherry-ai.com/cherry-studio-wen-dang/en-us">Documents</a> | <a href="./docs/dev.md">Development</a> | <a href="https://github.com/CherryHQ/cherry-studio/issues">Feedback</a><br></p>
<div align="center">
[![][deepwiki-shield]][deepwiki-link]
[![][twitter-shield]][twitter-link]
[![][discord-shield]][discord-link]
[![][telegram-shield]][telegram-link]
</div>
<div align="center">
[![][github-release-shield]][github-release-link]
[![][github-nightly-shield]][github-nightly-link]
[![][github-contributors-shield]][github-contributors-link]
[![][license-shield]][license-link]
[![][commercial-shield]][commercial-link]
[![][sponsor-shield]][sponsor-link]
</div>
<div align="center">
<a href="https://hellogithub.com/repository/1605492e1e2a4df3be07abfa4578dd37" target="_blank" style="text-decoration: none"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=1605492e1e2a4df3be07abfa4578dd37" alt="Featured|HelloGitHub" width="220" height="55" /></a>
<a href="https://trendshift.io/repositories/14318" target="_blank" style="text-decoration: none"><img src="https://trendshift.io/api/badge/repositories/14318" alt="CherryHQ%2Fcherry-studio | Trendshift" width="220" height="55" /></a>
<a href="https://www.producthunt.com/posts/cherry-studio?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-cherry-studio" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=496640&theme=light" alt="Cherry Studio - AI Chatbots, AI Desktop Client | Product Hunt" width="220" height="55" /></a>
</div>
# 🍒 Cherry Studio
Cherry Studio is a desktop client that supports multiple LLM providers, available on Windows, Mac and Linux.
👏 Join [Telegram Group](https://t.me/CherryStudioAI)|[Discord](https://discord.gg/wez8HtpxqQ) | [QQ Group(575014769)](https://qm.qq.com/q/lo0D4qVZKi)
❤️ Like Cherry Studio? Give it a star 🌟 or [Sponsor](docs/sponsor.md) to support the development!
# 🌠 Screenshot



# 🌟 Key Features
1. **Diverse LLM Provider Support**:
- ☁️ Major LLM Cloud Services: OpenAI, Gemini, Anthropic, and more
- 🔗 AI Web Service Integration: Claude, Perplexity, Poe, and others
- 💻 Local Model Support with Ollama, LM Studio
2. **AI Assistants & Conversations**:
- 📚 300+ Pre-configured AI Assistants
- 🤖 Custom Assistant Creation
- 💬 Multi-model Simultaneous Conversations
3. **Document & Data Processing**:
- 📄 Supports Text, Images, Office, PDF, and more
- ☁️ WebDAV File Management and Backup
- 📊 Mermaid Chart Visualization
- 💻 Code Syntax Highlighting
4. **Practical Tools Integration**:
- 🔍 Global Search Functionality
- 📝 Topic Management System
- 🔤 AI-powered Translation
- 🎯 Drag-and-drop Sorting
- 🔌 Mini Program Support
- ⚙️ MCP(Model Context Protocol) Server
5. **Enhanced User Experience**:
- 🖥️ Cross-platform Support for Windows, Mac, and Linux
- 📦 Ready to Use - No Environment Setup Required
- 🎨 Light/Dark Themes and Transparent Window
- 📝 Complete Markdown Rendering
- 🤲 Easy Content Sharing
# 📝 Roadmap
We're actively working on the following features and improvements:
1. 🎯 **Core Features**
- Selection Assistant with smart content selection enhancement
- Deep Research with advanced research capabilities
- Memory System with global context awareness
- Document Preprocessing with improved document handling
- MCP Marketplace for Model Context Protocol ecosystem
2. 🗂 **Knowledge Management**
- Notes and Collections
- Dynamic Canvas visualization
- OCR capabilities
- TTS (Text-to-Speech) support
3. 📱 **Platform Support**
- HarmonyOS Edition (PC)
- Android App (Phase 1)
- iOS App (Phase 1)
- Multi-Window support
- Window Pinning functionality
4. 🔌 **Advanced Features**
- Plugin System
- ASR (Automatic Speech Recognition)
- Assistant and Topic Interaction Refactoring
Track our progress and contribute on our [project board](https://github.com/orgs/CherryHQ/projects/7).
Want to influence our roadmap? Join our [GitHub Discussions](https://github.com/CherryHQ/cherry-studio/discussions) to share your ideas and feedback!
# 🌈 Theme
- Theme Gallery: <https://cherrycss.com>
- Aero Theme: <https://github.com/hakadao/CherryStudio-Aero>
- PaperMaterial Theme: <https://github.com/rainoffallingstar/CherryStudio-PaperMaterial>
- Claude dynamic-style: <https://github.com/bjl101501/CherryStudio-Claudestyle-dynamic>
- Maple Neon Theme: <https://github.com/BoningtonChen/CherryStudio_themes>
Welcome PR for more themes
# 🤝 Contributing
We welcome contributions to Cherry Studio! Here are some ways you can contribute:
1. **Contribute Code**: Develop new features or optimize existing code.
2. **Fix Bugs**: Submit fixes for any bugs you find.
3. **Maintain Issues**: Help manage GitHub issues.
4. **Product Design**: Participate in design discussions.
5. **Write Documentation**: Improve user manuals and guides.
6. **Community Engagement**: Join discussions and help users.
7. **Promote Usage**: Spread the word about Cherry Studio.
Refer to the [Branching Strategy](docs/branching-strategy-en.md) for contribution guidelines
## Getting Started
1. **Fork the Repository**: Fork and clone it to your local machine.
2. **Create a Branch**: For your changes.
3. **Submit Changes**: Commit and push your changes.
4. **Open a Pull Request**: Describe your changes and reasons.
For more detailed guidelines, please refer to our [Contributing Guide](CONTRIBUTING.md).
Thank you for your support and contributions!
# 🔧 Developer Co-creation Program
We are launching the Cherry Studio Developer Co-creation Program to foster a healthy and positive-feedback loop within the open-source ecosystem. We believe that great software is built collaboratively, and every merged pull request breathes new life into the project.
We sincerely invite you to join our ranks of contributors and shape the future of Cherry Studio with us.
## Contributor Rewards Program
To give back to our core contributors and create a virtuous cycle, we have established the following long-term incentive plan.
**The inaugural tracking period for this program will be Q3 2025 (July, August, September). Rewards for this cycle will be distributed on October 1st.**
Within any tracking period (e.g., July 1st to September 30th for the first cycle), any developer who contributes more than **30 meaningful commits** to any of Cherry Studio's open-source projects on GitHub will be eligible for the following benefits:
- **Cursor Subscription Sponsorship**: Receive a **$70 USD** credit or reimbursement for your [Cursor](https://cursor.sh/) subscription, making AI your most efficient coding partner.
- **Unlimited Model Access**: Get **unlimited** API calls for the **DeepSeek** and **Qwen** models.
- **Cutting-Edge Tech Access**: Enjoy occasional perks, including API access to models like **Claude**, **Gemini**, and **OpenAI**, keeping you at the forefront of technology.
## Growing Together & Future Plans
A vibrant community is the driving force behind any sustainable open-source project. As Cherry Studio grows, so will our rewards program. We are committed to continuously aligning our benefits with the best-in-class tools and resources in the industry. This ensures our core contributors receive meaningful support, creating a positive cycle where developers, the community, and the project grow together.
**Moving forward, the project will also embrace an increasingly open stance to give back to the entire open-source community.**
## How to Get Started?
We look forward to your first Pull Request!
You can start by exploring our repositories, picking up a `good first issue`, or proposing your own enhancements. Every commit is a testament to the spirit of open source.
Thank you for your interest and contributions.
Let's build together.
# 🏢 Enterprise Edition
Building on the Community Edition, we are proud to introduce **Cherry Studio Enterprise Edition**—a privately-deployable AI productivity and management platform designed for modern teams and enterprises.
The Enterprise Edition addresses core challenges in team collaboration by centralizing the management of AI resources, knowledge, and data. It empowers organizations to enhance efficiency, foster innovation, and ensure compliance, all while maintaining 100% control over their data in a secure environment.
## Core Advantages
- **Unified Model Management**: Centrally integrate and manage various cloud-based LLMs (e.g., OpenAI, Anthropic, Google Gemini) and locally deployed private models. Employees can use them out-of-the-box without individual configuration.
- **Enterprise-Grade Knowledge Base**: Build, manage, and share team-wide knowledge bases. Ensures knowledge retention and consistency, enabling team members to interact with AI based on unified and accurate information.
- **Fine-Grained Access Control**: Easily manage employee accounts and assign role-based permissions for different models, knowledge bases, and features through a unified admin backend.
- **Fully Private Deployment**: Deploy the entire backend service on your on-premises servers or private cloud, ensuring your data remains 100% private and under your control to meet the strictest security and compliance standards.
- **Reliable Backend Services**: Provides stable API services and enterprise-grade data backup and recovery mechanisms to ensure business continuity.
## ✨ Online Demo
> 🚧 **Public Beta Notice**
>
> The Enterprise Edition is currently in its early public beta stage, and we are actively iterating and optimizing its features. We are aware that it may not be perfectly stable yet. If you encounter any issues or have valuable suggestions during your trial, we would be very grateful if you could contact us via email to provide feedback.
**🔗 [Cherry Studio Enterprise](https://www.cherry-ai.com/enterprise)**
## Version Comparison
| Feature | Community Edition | Enterprise Edition |
| :---------------- | :----------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------- |
| **Open Source** | ✅ Yes | ⭕️ Partially released to customers |
| **Cost** | Free for Personal Use / Commercial License | Buyout / Subscription Fee |
| **Admin Backend** | — | ● Centralized **Model** Access<br>● **Employee** Management<br>● Shared **Knowledge Base**<br>● **Access** Control<br>● **Data** Backup |
| **Server** | — | ✅ Dedicated Private Deployment |
## Get the Enterprise Edition
We believe the Enterprise Edition will become your team's AI productivity engine. If you are interested in Cherry Studio Enterprise Edition and would like to learn more, request a quote, or schedule a demo, please feel free to contact us.
- **For Business Inquiries & Purchasing**:
**📧 [bd@cherry-ai.com](mailto:bd@cherry-ai.com)**
# 🔗 Related Projects
- [one-api](https://github.com/songquanpeng/one-api): LLM API management and distribution system supporting mainstream models like OpenAI, Azure, and Anthropic. Features a unified API interface, suitable for key management and secondary distribution.
- [ublacklist](https://github.com/iorate/ublacklist): Blocks specific sites from appearing in Google search results
# 🚀 Contributors
<a href="https://github.com/CherryHQ/cherry-studio/graphs/contributors">
<img src="https://contrib.rocks/image?repo=CherryHQ/cherry-studio" />
</a>
<br /><br />
# 📊 GitHub Stats

# ⭐️ Star History
<a href="https://www.star-history.com/#CherryHQ/cherry-studio&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=CherryHQ/cherry-studio&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=CherryHQ/cherry-studio&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=CherryHQ/cherry-studio&type=Date" />
</picture>
</a>
<!-- Links & Images -->
[deepwiki-shield]: https://img.shields.io/badge/Deepwiki-CherryHQ-0088CC?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNy45MyAzMiI+PHBhdGggZD0iTTE5LjMzIDE0LjEyYy42Ny0uMzkgMS41LS4zOSAyLjE4IDBsMS43NCAxYy4wNi4wMy4xMS4wNi4xOC4wN2guMDRjLjA2LjAzLjEyLjAzLjE4LjAzaC4wMmMuMDYgMCAuMTEgMCAuMTctLjAyaC4wM2MuMDYtLjAyLjEyLS4wNS4xNy0uMDhoLjAybDMuNDgtMi4wMWMuMjUtLjE0LjQtLjQxLjQtLjdWOC40YS44MS44MSAwIDAgMC0uNC0uN2wtMy40OC0yLjAxYS44My44MyAwIDAgMC0uODEgMEwxOS43NyA3LjdoLS4wMWwtLjE1LjEyLS4wMi4wMnMtLjA3LjA5LS4xLjE0VjhhLjQuNCAwIDAgMC0uMDguMTd2LjA0Yy0uMDMuMDYtLjAzLjEyLS4wMy4xOXYyLjAxYzAgLjc4LS40MSAxLjQ5LTEuMDkgMS44OC0uNjcuMzktMS41LjM5LTIuMTggMGwtMS43NC0xYS42LjYgMCAwIDAtLjIxLS4wOGMtLjA2LS4wMS0uMTItLjAyLS4xOC0uMDJoLS4wM2MtLjA2IDAtLjExLjAxLS4xNy4wMmgtLjAzYy0uMDYuMDItLjEyLjA0LS4xNy4wN2gtLjAybC0zLjQ3IDIuMDFjLS4yNS4xNC0uNC40MS0uNC43VjE4YzAgLjI5LjE1LjU1LjQuN2wzLjQ4IDIuMDFoLjAyYy4wNi4wNC4xMS4wNi4xNy4wOGguMDNjLjA1LjAyLjExLjAzLjE3LjAzaC4wMmMuMDYgMCAuMTIgMCAuMTgtLjAyaC4wNGMuMDYtLjAzLjEyLS4wNS4xOC0uMDhsMS43NC0xYy42Ny0uMzkgMS41LS4zOSAyLjE3IDBzMS4wOSAxLjExIDEuMDkgMS44OHYyLjAxYzAgLjA3IDAgLjEzLjAyLjE5di4wNGMuMDMuMDYuMDUuMTIuMDguMTd2LjAycy4wOC4wOS4xMi4xM2wuMDIuMDJzLjA5LjA4LjE1LjExYzAgMCAuMDEgMCAuMDEuMDFsMy40OCAyLjAxYy4yNS4xNC41Ni4xNC44MSAwbDMuNDgtMi4wMWMuMjUtLjE0LjQtLjQxLjQtLjd2LTQuMDFhLjgxLjgxIDAgMCAwLS40LS43bC0zLjQ4LTIuMDFoLS4wMmMtLjA1LS4wNC0uMTEtLjA2LS4xNy0uMDhoLS4wM2EuNS41IDAgMCAwLS4xNy0uMDNoLS4wM2MtLjA2IDAtLjEyIDAtLjE4LjAyLS4wNy4wMi0uMTUuMDUtLjIxLjA4bC0xLjc0IDFjLS42Ny4zOS0xLjUuMzktMi4xNyAwYTIuMTkgMi4xOSAwIDAgMS0xLjA5LTEuODhjMC0uNzguNDItMS40OSAxLjA5LTEuODhaIiBzdHlsZT0iZmlsbDojNWRiZjlkIi8+PHBhdGggZD0ibS40IDEzLjExIDMuNDcgMi4wMWMuMjUuMTQuNTYuMTQuOCAwbDMuNDctMi4wMWguMDFsLjE1LS4xMi4wMi0uMDJzLjA3LS4wOS4xLS4xNGwuMDItLjAyYy4wMy0uMDUuMDUtLjExLjA3LS4xN3YtLjA0Yy4wMy0uMDYuMDMtLjEyLjAzLS4xOVYxMC40YzAtLjc4LjQyLTEuNDkgMS4wOS0xLjg4czEuNS0uMzkgMi4xOCAwbDEuNzQgMWMuMDcuMDQuMTQuMDcuMjEuMDguMDYuMDEuMTIuMDIuMTguMDJoLjAzYy4wNiAwIC4xMS0uMDEuMTctLjAyaC4wM2MuMDYtLjAyLjEyLS4wNC4xNy0uMDdoLjAybDMuNDctMi4wMmMuMjUtLjE0LjQtLjQxLjQtLjd2LTRhLjgxLjgxIDAgMCAwLS40LS43bC0zLjQ2LTJhLjgzLjgzIDAgMCAwLS44MSAwbC0zLjQ4IDIuMDFoLS4wMWwtLjE1LjEyLS4wMi4wMi0uMS4xMy0uMDIuMDJjLS4wMy4wNS0uMDUuMTEtLjA3LjE3di4wNGMtLjAzLjA2LS4wMy4xMi0uMDMuMTl2Mi4wMWMwIC43OC0uNDIgMS40OS0xLjA5IDEuODhzLTEuNS4zOS0yLjE4IDBsLTEuNzQtMWEuNi42IDAgMCAwLS4yMS0uMDhjLS4wNi0uMDEtLjEyLS4wMi0uMTgtLjAyaC0uMDNjLS4wNiAwLS4xMS4wMS0uMTcuMDJoLS4wM2MtLjA2LjAyLS4xMi4wNS0uMTcuMDhoLS4wMkwuNCA3LjcxYy0uMjUuMTQtLjQuNDEtLjQuNjl2NC4wMWMwIC4yOS4xNS41Ni40LjciIHN0eWxlPSJmaWxsOiM0NDY4YzQiLz48cGF0aCBkPSJtMTcuODQgMjQuNDgtMy40OC0yLjAxaC0uMDJjLS4wNS0uMDQtLjExLS4wNi0uMTctLjA4aC0uMDNhLjUuNSAwIDAgMC0uMTctLjAzaC0uMDNjLS4wNiAwLS4xMiAwLS4xOC4wMmgtLjA0Yy0uMDYuMDMtLjEyLjA1LS4xOC4wOGwtMS43NCAxYy0uNjcuMzktMS41LjM5LTIuMTggMGEyLjE5IDIuMTkgMCAwIDEtMS4wOS0xLjg4di0yLjAxYzAtLjA2IDAtLjEzLS4wMi0uMTl2LS4wNGMtLjAzLS4wNi0uMDUtLjExLS4wOC0uMTdsLS4wMi0uMDJzLS4wNi0uMDktLjEtLjEzTDguMjkgMTlzLS4wOS0uMDgtLjE1LS4xMWgtLjAxbC0zLjQ3LTIuMDJhLjgzLjgzIDAgMCAwLS44MSAwTC4zNyAxOC44OGEuODcuODcgMCAwIDAtLjM3LjcxdjQuMDFjMCAuMjkuMTUuNTUuNC43bDMuNDcgMi4wMWguMDJjLjA1LjA0LjExLjA2LjE3LjA4aC4wM2MuMDUuMDIuMTEuMDMuMTYuMDNoLjAzYy4wNiAwIC4xMiAwIC4xOC0uMDJoLjA0Yy4wNi0uMDMuMTItLjA1LjE4LS4wOGwxLjc0LTFjLjY3LS4zOSAxLjUtLjM5IDIuMTcgMHMxLjA5IDEuMTEgMS4wOSAxLjg4djIuMDFjMCAuMDcgMCAuMTMuMDIuMTl2LjA0Yy4wMy4wNi4wNS4xMS4wOC4xN2wuMDIuMDJzLjA2LjA5LjEuMTRsLjAyLjAycy4wOS4wOC4xNS4xMWguMDFsMy40OCAyLjAyYy4yNS4xNC41Ni4xNC44MSAwbDMuNDgtMi4wMWMuMjUtLjE0LjQtLjQxLjQtLjdWMjUuMmEuODEuODEgMCAwIDAtLjQtLjdaIiBzdHlsZT0iZmlsbDojNDI5M2Q5Ii8+PC9zdmc+
[deepwiki-link]: https://deepwiki.com/CherryHQ/cherry-studio
[twitter-shield]: https://img.shields.io/badge/Twitter-CherryStudioApp-0088CC?logo=x
[twitter-link]: https://twitter.com/CherryStudioHQ
[discord-shield]: https://img.shields.io/badge/Discord-@CherryStudio-0088CC?logo=discord
[discord-link]: https://discord.gg/wez8HtpxqQ
[telegram-shield]: https://img.shields.io/badge/Telegram-@CherryStudioAI-0088CC?logo=telegram
[telegram-link]: https://t.me/CherryStudioAI
<!-- Links & Images -->
[github-release-shield]: https://img.shields.io/github/v/release/CherryHQ/cherry-studio?logo=github
[github-release-link]: https://github.com/CherryHQ/cherry-studio/releases
[github-nightly-shield]: https://img.shields.io/github/actions/workflow/status/CherryHQ/cherry-studio/nightly-build.yml?label=nightly%20build&logo=github
[github-nightly-link]: https://github.com/CherryHQ/cherry-studio/actions/workflows/nightly-build.yml
[github-contributors-shield]: https://img.shields.io/github/contributors/CherryHQ/cherry-studio?logo=github
[github-contributors-link]: https://github.com/CherryHQ/cherry-studio/graphs/contributors
<!-- Links & Images -->
[license-shield]: https://img.shields.io/badge/License-AGPLv3-important.svg?logo=gnu
[license-link]: https://www.gnu.org/licenses/agpl-3.0
[commercial-shield]: https://img.shields.io/badge/License-Contact-white.svg?logoColor=white&logo=telegram&color=blue
[commercial-link]: mailto:license@cherry-ai.com?subject=Commercial%20License%20Inquiry
[sponsor-shield]: https://img.shields.io/badge/Sponsor-FF6699.svg?logo=githubsponsors&logoColor=white
[sponsor-link]: https://github.com/CherryHQ/cherry-studio/blob/main/docs/sponsor.md
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/README.zh.md
|
CherryHQ__cherry-studio/docs/README.zh.md
| 16,221 | 1,758,202,168 |
en
|
<div align="right" >
<details>
<summary >🌐 Language</summary>
<div>
<div align="right">
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=en">English</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=zh-CN">简体中文</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=zh-TW">繁體中文</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=ja">日本語</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=ko">한국어</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=hi">हिन्दी</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=th">ไทย</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=fr">Français</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=de">Deutsch</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=es">Español</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=it">Italiano</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=ru">Русский</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=pt">Português</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=nl">Nederlands</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=pl">Polski</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=ar">العربية</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=fa">فارسی</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=tr">Türkçe</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=vi">Tiếng Việt</a></p>
<p><a href="https://openaitx.github.io/view.html?user=CherryHQ&project=cherry-studio&lang=id">Bahasa Indonesia</a></p>
</div>
</div>
</details>
</div>
<h1 align="center">
<a href="https://github.com/CherryHQ/cherry-studio/releases">
<img src="https://github.com/CherryHQ/cherry-studio/blob/main/build/icon.png?raw=true" width="150" height="150" alt="banner" /><br>
</a>
</h1>
<p align="center">
<a href="https://github.com/CherryHQ/cherry-studio">English</a> | 中文 | <a href="https://cherry-ai.com">官方网站</a> | <a href="https://docs.cherry-ai.com/cherry-studio-wen-dang/zh-cn">文档</a> | <a href="./dev.md">开发</a> | <a href="https://github.com/CherryHQ/cherry-studio/issues">反馈</a><br>
</p>
<!-- 题头徽章组合 -->
<div align="center">
[![][deepwiki-shield]][deepwiki-link]
[![][twitter-shield]][twitter-link]
[![][discord-shield]][discord-link]
[![][telegram-shield]][telegram-link]
</div>
<div align="center">
[![][github-release-shield]][github-release-link]
[![][github-contributors-shield]][github-contributors-link]
[![][license-shield]][license-link]
[![][commercial-shield]][commercial-link]
[![][sponsor-shield]][sponsor-link]
</div>
<div align="center">
<a href="https://hellogithub.com/repository/1605492e1e2a4df3be07abfa4578dd37" target="_blank" style="text-decoration: none"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=1605492e1e2a4df3be07abfa4578dd37" alt="Featured|HelloGitHub" width="220" height="55" /></a>
<a href="https://trendshift.io/repositories/11772" target="_blank" style="text-decoration: none"><img src="https://trendshift.io/api/badge/repositories/11772" alt="kangfenmao%2Fcherry-studio | Trendshift" width="220" height="55" /></a>
<a href="https://www.producthunt.com/posts/cherry-studio?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-cherry-studio" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=496640&theme=light" alt="Cherry Studio - AI Chatbots, AI Desktop Client | Product Hunt" width="220" height="55" /></a>
</div>
# 🍒 Cherry Studio
Cherry Studio 是一款支持多个大语言模型(LLM)服务商的桌面客户端,兼容 Windows、Mac 和 Linux 系统。
👏 欢迎加入 [Telegram 群组](https://t.me/CherryStudioAI)|[Discord](https://discord.gg/wez8HtpxqQ) | [QQ群(575014769)](https://qm.qq.com/q/lo0D4qVZKi)
❤️ 喜欢 Cherry Studio? 点亮小星星 🌟 或 [赞助开发者](sponsor.md)! ❤️
# 📖 使用教程
https://docs.cherry-ai.com
# 🌠 界面



# 🌟 主要特性
1. **多样化 LLM 服务支持**:
- ☁️ 支持主流 LLM 云服务:OpenAI、Gemini、Anthropic、硅基流动等
- 🔗 集成流行 AI Web 服务:Claude、Perplexity、Poe、腾讯元宝、知乎直答等
- 💻 支持 Ollama、LM Studio 本地模型部署
2. **智能助手与对话**:
- 📚 内置 300+ 预配置 AI 助手
- 🤖 支持自定义创建专属助手
- 💬 多模型同时对话,获得多样化观点
3. **文档与数据处理**:
- 📄 支持文本、图片、Office、PDF 等多种格式
- ☁️ WebDAV 文件管理与数据备份
- 📊 Mermaid 图表可视化
- 💻 代码高亮显示
4. **实用工具集成**:
- 🔍 全局搜索功能
- 📝 话题管理系统
- 🔤 AI 驱动的翻译功能
- 🎯 拖拽排序
- 🔌 小程序支持
- ⚙️ MCP(模型上下文协议) 服务
5. **优质使用体验**:
- 🖥️ Windows、Mac、Linux 跨平台支持
- 📦 开箱即用,无需配置环境
- 🎨 支持明暗主题与透明窗口
- 📝 完整的 Markdown 渲染
- 🤲 便捷的内容分享功能
# 📝 开发计划
我们正在积极开发以下功能和改进:
1. 🎯 **核心功能**
- 选择助手 - 智能内容选择增强
- 深度研究 - 高级研究能力
- 全局记忆 - 全局上下文感知
- 文档预处理 - 改进文档处理能力
- MCP 市场 - 模型上下文协议生态系统
2. 🗂 **知识管理**
- 笔记与收藏功能
- 动态画布可视化
- OCR 光学字符识别
- TTS 文本转语音支持
3. 📱 **平台支持**
- 鸿蒙版本 (PC)
- Android 应用(第一期)
- iOS 应用(第一期)
- 多窗口支持
- 窗口置顶功能
4. 🔌 **高级特性**
- 插件系统
- ASR 语音识别
- 助手与话题交互重构
在我们的[项目面板](https://github.com/orgs/CherryHQ/projects/7)上跟踪进展并参与贡献。
想要影响开发计划?欢迎加入我们的 [GitHub 讨论区](https://github.com/CherryHQ/cherry-studio/discussions) 分享您的想法和反馈!
# 🌈 主题
- 主题库:https://cherrycss.com
- Aero 主题:https://github.com/hakadao/CherryStudio-Aero
- PaperMaterial 主题:https://github.com/rainoffallingstar/CherryStudio-PaperMaterial
- 仿 Claude 主题:https://github.com/bjl101501/CherryStudio-Claudestyle-dynamic
- 霓虹枫叶主题:https://github.com/BoningtonChen/CherryStudio_themes
欢迎 PR 更多主题
# 🤝 贡献
我们欢迎对 Cherry Studio 的贡献!您可以通过以下方式贡献:
1. **贡献代码**:开发新功能或优化现有代码
2. **修复错误**:提交您发现的错误修复
3. **维护问题**:帮助管理 GitHub 问题
4. **产品设计**:参与设计讨论
5. **撰写文档**:改进用户手册和指南
6. **社区参与**:加入讨论并帮助用户
7. **推广使用**:宣传 Cherry Studio
参考[分支策略](branching-strategy-zh.md)了解贡献指南
## 入门
1. **Fork 仓库**:Fork 并克隆到您的本地机器
2. **创建分支**:为您的更改创建分支
3. **提交更改**:提交并推送您的更改
4. **打开 Pull Request**:描述您的更改和原因
有关更详细的指南,请参阅我们的 [贡献指南](CONTRIBUTING.zh.md)
感谢您的支持和贡献!
# 🔧 开发者共创计划
我们正在启动 Cherry Studio 开发者共创计划,旨在为开源生态系统构建一个健康、正向反馈的循环。我们相信,优秀的软件是通过协作构建的,每一个合并的拉取请求都为项目注入新的生命力。
我们诚挚地邀请您加入我们的贡献者队伍,与我们一起塑造 Cherry Studio 的未来。
## 贡献者奖励计划
为了回馈我们的核心贡献者并创造良性循环,我们建立了以下长期激励计划。
**该计划的首个跟踪周期将是 2025 年第三季度(7月、8月、9月)。此周期的奖励将在 10月1日 发放。**
在任何跟踪周期内(例如,首个周期的 7月1日 至 9月30日),任何为 Cherry Studio 在 GitHub 上的开源项目贡献超过 **30 个有意义提交** 的开发者都有资格获得以下福利:
- **Cursor 订阅赞助**:获得 **70 美元** 的 [Cursor](https://cursor.sh/) 订阅积分或报销,让 AI 成为您最高效的编码伙伴。
- **无限模型访问**:获得 **DeepSeek** 和 **Qwen** 模型的 **无限次** API 调用。
- **前沿技术访问**:享受偶尔的特殊福利,包括 **Claude**、**Gemini** 和 **OpenAI** 等模型的 API 访问权限,让您始终站在技术前沿。
## 共同成长与未来规划
活跃的社区是任何可持续开源项目背后的推动力。随着 Cherry Studio 的发展,我们的奖励计划也将随之发展。我们致力于持续将我们的福利与行业内最优秀的工具和资源保持一致。这确保我们的核心贡献者获得有意义的支持,创造一个开发者、社区和项目共同成长的正向循环。
**展望未来,该项目还将采取越来越开放的态度来回馈整个开源社区。**
## 如何开始?
我们期待您的第一个拉取请求!
您可以从探索我们的仓库开始,选择一个 `good first issue`,或者提出您自己的改进建议。每一个提交都是开源精神的体现。
感谢您的关注和贡献。
让我们一起建设。
# 🏢 企业版
在社区版的基础上,我们自豪地推出 **Cherry Studio 企业版**——一个为现代团队和企业设计的私有部署 AI 生产力与管理平台。
企业版通过集中管理 AI 资源、知识和数据,解决了团队协作中的核心挑战。它赋能组织提升效率、促进创新并确保合规,同时在安全环境中保持对数据的 100% 控制。
## 核心优势
- **统一模型管理**:集中整合和管理各种基于云的大语言模型(如 OpenAI、Anthropic、Google Gemini)和本地部署的私有模型。员工可以开箱即用,无需单独配置。
- **企业级知识库**:构建、管理和分享全团队的知识库。确保知识得到保留且一致,使团队成员能够基于统一准确的信息与 AI 交互。
- **细粒度访问控制**:通过统一的管理后台轻松管理员工账户,并为不同模型、知识库和功能分配基于角色的权限。
- **完全私有部署**:在您的本地服务器或私有云上部署整个后端服务,确保您的数据 100% 私有且在您的控制之下,满足最严格的安全和合规标准。
- **可靠的后端服务**:提供稳定的 API 服务、企业级数据备份和恢复机制,确保业务连续性。
## ✨ 在线演示
> 🚧 **公开测试版通知**
>
> 企业版目前处于早期公开测试阶段,我们正在积极迭代和优化其功能。我们知道它可能还不够完全稳定。如果您在试用过程中遇到任何问题或有宝贵建议,我们非常感谢您能通过邮件联系我们提供反馈。
**🔗 [Cherry Studio 企业版](https://www.cherry-ai.com/enterprise)**
## 版本对比
| 功能 | 社区版 | 企业版 |
| :----------- | :---------------------- | :--------------------------------------------------------------------------------------------- |
| **开源** | ✅ 是 | ⭕️ 部分开源,对客户开放 |
| **成本** | 个人使用免费 / 商业授权 | 买断 / 订阅费用 |
| **管理后台** | — | ● 集中化**模型**访问<br>● **员工**管理<br>● 共享**知识库**<br>● **访问**控制<br>● **数据**备份 |
| **服务器** | — | ✅ 专用私有部署 |
## 获取企业版
我们相信企业版将成为您团队的 AI 生产力引擎。如果您对 Cherry Studio 企业版感兴趣,希望了解更多信息、请求报价或安排演示,请联系我们。
- **商业咨询与购买**:
**📧 [bd@cherry-ai.com](mailto:bd@cherry-ai.com)**
# 🔗 相关项目
- [one-api](https://github.com/songquanpeng/one-api):LLM API 管理及分发系统,支持 OpenAI、Azure、Anthropic 等主流模型,统一 API 接口,可用于密钥管理与二次分发。
- [ublacklist](https://github.com/iorate/ublacklist):屏蔽特定网站在 Google 搜索结果中显示
# 🚀 贡献者
<a href="https://github.com/CherryHQ/cherry-studio/graphs/contributors">
<img src="https://contrib.rocks/image?repo=CherryHQ/cherry-studio" />
</a>
<br /><br />
# 📊 GitHub 统计

# ⭐️ Star 记录
<a href="https://www.star-history.com/#CherryHQ/cherry-studio&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=CherryHQ/cherry-studio&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=CherryHQ/cherry-studio&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=CherryHQ/cherry-studio&type=Date" />
</picture>
</a>
<!-- Links & Images -->
[deepwiki-shield]: https://img.shields.io/badge/Deepwiki-CherryHQ-0088CC
[deepwiki-link]: https://deepwiki.com/CherryHQ/cherry-studio
[twitter-shield]: https://img.shields.io/badge/Twitter-CherryStudioApp-0088CC?logo=x
[twitter-link]: https://twitter.com/CherryStudioHQ
[discord-shield]: https://img.shields.io/badge/Discord-@CherryStudio-0088CC?logo=discord
[discord-link]: https://discord.gg/wez8HtpxqQ
[telegram-shield]: https://img.shields.io/badge/Telegram-@CherryStudioAI-0088CC?logo=telegram
[telegram-link]: https://t.me/CherryStudioAI
<!-- 项目统计徽章 -->
[github-release-shield]: https://img.shields.io/github/v/release/CherryHQ/cherry-studio
[github-release-link]: https://github.com/CherryHQ/cherry-studio/releases
[github-contributors-shield]: https://img.shields.io/github/contributors/CherryHQ/cherry-studio
[github-contributors-link]: https://github.com/CherryHQ/cherry-studio/graphs/contributors
<!-- 许可和赞助徽章 -->
[license-shield]: https://img.shields.io/badge/License-AGPLv3-important.svg?logo=gnu
[license-link]: https://www.gnu.org/licenses/agpl-3.0
[commercial-shield]: https://img.shields.io/badge/商用授权-联系-white.svg?logoColor=white&logo=telegram&color=blue
[commercial-link]: mailto:license@cherry-ai.com?subject=商业授权咨询
[sponsor-shield]: https://img.shields.io/badge/赞助支持-FF6699.svg?logo=githubsponsors&logoColor=white
[sponsor-link]: https://github.com/CherryHQ/cherry-studio/blob/main/docs/sponsor.md
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/branching-strategy-zh.md
|
CherryHQ__cherry-studio/docs/branching-strategy-zh.md
| 2,362 | 1,758,202,168 |
en
|
# 🌿 分支策略
Cherry Studio 采用结构化的分支策略来维护代码质量并简化开发流程。
## 主要分支
- `main`:主开发分支
- 包含最新的开发代码
- 禁止直接提交 - 所有更改必须通过拉取请求(Pull Request)
- 此分支上的代码可能包含正在开发的功能,不一定完全稳定
- `release/*`:发布分支
- 从 `main` 分支创建
- 包含准备发布的稳定代码
- 只接受文档更新和 bug 修复
- 经过完整测试后可以发布到生产环境
关于测试计划所使用的`testplan`分支,请查阅[测试计划](testplan-zh.md)。
## 贡献分支
在为 Cherry Studio 贡献代码时,请遵循以下准则:
1. **功能开发分支:**
- 从 `main` 分支创建
- 命名格式:`feature/issue-number-brief-description`
- 完成后提交 PR 到 `main` 分支
2. **Bug 修复分支:**
- 从 `main` 分支创建
- 命名格式:`fix/issue-number-brief-description`
- 完成后提交 PR 到 `main` 分支
3. **文档更新分支:**
- 从 `main` 分支创建
- 命名格式:`docs/brief-description`
- 完成后提交 PR 到 `main` 分支
4. **紧急修复分支:**
- 从 `main` 分支创建
- 命名格式:`hotfix/issue-number-brief-description`
- 完成后需要同时合并到 `main` 和相关的 `release` 分支
5. **发布分支:**
- 从 `main` 分支创建
- 命名格式:`release/version-number`
- 用于版本发布前的最终准备工作
- 只允许合并 bug 修复和文档更新
- 完成测试和准备工作后,将代码合并回 `main` 分支并打上版本标签
## 工作流程

## 拉取请求(PR)指南
- 除非是修复生产环境的关键问题,否则所有 PR 都应该提交到 `main` 分支
- 提交 PR 前确保你的分支已经同步了最新的 `main` 分支内容
- 在 PR 描述中包含相关的 issue 编号
- 确保所有测试通过,且代码符合我们的质量标准
- 如果你添加了新功能或修改了 UI 组件,请附上更改前后的截图
## 版本标签管理
- 主要版本发布:v1.0.0、v2.0.0 等
- 功能更新发布:v1.1.0、v1.2.0 等
- 补丁修复发布:v1.0.1、v1.0.2 等
- 紧急修复发布:v1.0.1-hotfix 等
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/dev.md
|
CherryHQ__cherry-studio/docs/dev.md
| 893 | 1,758,202,168 |
en
|
# 🖥️ Develop
## IDE Setup
- Editor: [Cursor](https://www.cursor.com/), etc. Any VS Code compatible editor.
- Linter: [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
- Formatter: [Biome](https://marketplace.visualstudio.com/items?itemName=biomejs.biome)
## Project Setup
### Install
```bash
yarn
```
### Development
### Setup Node.js
Download and install [Node.js v20.x.x](https://nodejs.org/en/download)
### Setup Yarn
```bash
corepack enable
corepack prepare yarn@4.6.0 --activate
```
### Install Dependencies
```bash
yarn install
```
### ENV
```bash
copy .env.example .env
```
### Start
```bash
yarn dev
```
### Debug
```bash
yarn debug
```
Then input chrome://inspect in browser
### Test
```bash
yarn test
```
### Build
```bash
# For windows
$ yarn build:win
# For macOS
$ yarn build:mac
# For Linux
$ yarn build:linux
```
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/branching-strategy-en.md
|
CherryHQ__cherry-studio/docs/branching-strategy-en.md
| 2,421 | 1,758,202,168 |
en
|
# 🌿 Branching Strategy
Cherry Studio implements a structured branching strategy to maintain code quality and streamline the development process.
## Main Branches
- `main`: Main development branch
- Contains the latest development code
- Direct commits are not allowed - changes must come through pull requests
- Code may contain features in development and might not be fully stable
- `release/*`: Release branches
- Created from `main` branch
- Contains stable code ready for release
- Only accepts documentation updates and bug fixes
- Thoroughly tested before production deployment
For details about the `testplan` branch used in the Test Plan, please refer to the [Test Plan](testplan-en.md).
## Contributing Branches
When contributing to Cherry Studio, please follow these guidelines:
1. **Feature Branches:**
- Create from `main` branch
- Naming format: `feature/issue-number-brief-description`
- Submit PR back to `main`
2. **Bug Fix Branches:**
- Create from `main` branch
- Naming format: `fix/issue-number-brief-description`
- Submit PR back to `main`
3. **Documentation Branches:**
- Create from `main` branch
- Naming format: `docs/brief-description`
- Submit PR back to `main`
4. **Hotfix Branches:**
- Create from `main` branch
- Naming format: `hotfix/issue-number-brief-description`
- Submit PR to both `main` and relevant `release` branches
5. **Release Branches:**
- Create from `main` branch
- Naming format: `release/version-number`
- Used for final preparation work before version release
- Only accepts bug fixes and documentation updates
- After testing and preparation, merge back to `main` and tag with version
## Workflow Diagram

## Pull Request Guidelines
- All PRs should be submitted to the `main` branch unless fixing a critical production issue
- Ensure your branch is up to date with the latest `main` changes before submitting
- Include relevant issue numbers in your PR description
- Make sure all tests pass and code meets our quality standards
- Add before/after screenshots if you add a new feature or modify a UI component
## Version Tag Management
- Major releases: v1.0.0, v2.0.0, etc.
- Feature releases: v1.1.0, v1.2.0, etc.
- Patch releases: v1.0.1, v1.0.2, etc.
- Hotfix releases: v1.0.1-hotfix, etc.
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/testplan-en.md
|
CherryHQ__cherry-studio/docs/testplan-en.md
| 5,872 | 1,758,202,168 |
en
|
# Test Plan
To provide users with a more stable application experience and faster iteration speed, Cherry Studio has launched the "Test Plan".
## User Guide
The Test Plan is divided into the RC channel and the Beta channel, with the following differences:
- **RC (Release Candidate)**: The features are stable, with fewer bugs, and it is close to the official release.
- **Beta**: Features may change at any time, and there may be more bugs, but users can experience future features earlier.
Users can enable the "Test Plan" and select the version channel in the software's `Settings` > `About`. Please note that the versions in the "Test Plan" cannot guarantee data consistency, so be sure to back up your data before using them.
Users are welcome to submit issues or provide feedback through other channels for any bugs encountered during testing. Your feedback is very important to us.
## Developer Guide
### Participating in the Test Plan
Developers should submit `PRs` according to the [Contributor Guide](../CONTRIBUTING.md) (and ensure the target branch is `main`). The repository maintainers will evaluate whether the `PR` should be included in the Test Plan based on factors such as the impact of the feature on the application, its importance, and whether broader testing is needed.
If the `PR` is added to the Test Plan, the repository maintainers will:
- Notify the `PR` submitter.
- Set the PR to `draft` status (to avoid accidental merging into `main` before testing is complete).
- Set the `milestone` to the specific Test Plan version.
- Modify the `PR` title.
During participation in the Test Plan, `PR` submitters should:
- Keep the `PR` branch synchronized with the latest `main` (i.e., the `PR` branch should always be based on the latest `main` code).
- Ensure the `PR` branch is conflict-free.
- Actively respond to comments & reviews and fix bugs.
- Enable maintainers to modify the `PR` branch to allow for bug fixes at any time.
Inclusion in the Test Plan does not guarantee the final merging of the `PR`. It may be shelved due to immature features or poor testing feedback.
### Test Plan Lead
A maintainer will be assigned as the lead for a specific version (e.g., `1.5.0-rc`). The responsibilities of the Test Plan lead include:
- Determining whether a `PR` meets the Test Plan requirements and deciding whether it should be included in the current Test Plan.
- Modifying the status of `PRs` added to the Test Plan and communicating relevant matters with the `PR` submitter.
- Before the Test Plan release, merging the branches of `PRs` added to the Test Plan (using squash merge) into the corresponding version branch of `testplan` and resolving conflicts.
- Ensuring the `testplan` branch is synchronized with the latest `main`.
- Overseeing the Test Plan release.
## In-Depth Understanding
### About `PRs`
A `PR` is a collection of a specific branch (and commits), comments, reviews, and other information, and it is the **smallest management unit** of the Test Plan.
Compared to submitting all features to a single branch, the Test Plan manages features through `PRs`, which offers greater flexibility and efficiency:
- Features can be added or removed between different versions of the Test Plan without cumbersome `revert` operations.
- Clear feature boundaries and responsibilities are established. Bug fixes are completed within their respective `PRs`, isolating cross-impact and better tracking progress.
- The `PR` submitter is responsible for resolving conflicts with the latest `main`. The Test Plan lead is responsible for resolving conflicts between `PR` branches. However, since features added to the Test Plan are relatively independent (in other words, if a feature has broad implications, it should be independently included in the Test Plan), conflicts are generally few or simple.
### The `testplan` Branch
The `testplan` branch is a **temporary** branch used for Test Plan releases.
Note:
- **Do not develop based on this branch**. It may change or even be deleted at any time, and there is no guarantee of commit completeness or order.
- **Do not submit `commits` or `PRs` to this branch**, as they will not be retained.
- The `testplan` branch is always based on the latest `main` branch (not on a released version), with features added on top.
#### RC Branch
Branch name: `testplan/rc/x.y.z`
Used for RC releases, where `x.y.z` is the target version number. Note that whether it is rc.1 or rc.5, as long as the major version number is `x.y.z`, it is completed in this branch.
Generally, the version number for releases from this branch is named `x.y.z-rc.n`.
#### Beta Branch
Branch name: `testplan/beta/x.y.z`
Used for Beta releases, where `x.y.z` is the target version number. Note that whether it is beta.1 or beta.5, as long as the major version number is `x.y.z`, it is completed in this branch.
Generally, the version number for releases from this branch is named `x.y.z-beta.n`.
### Version Rules
The application version number for the Test Plan is: `x.y.z-CHA.n`, where:
- `x.y.z` is the conventional version number, referred to here as the **target version number**.
- `CHA` is the channel code (Channel), currently divided into `rc` and `beta`.
- `n` is the release number, starting from `1`.
Examples of complete version numbers: `1.5.0-rc.3`, `1.5.1-beta.1`, `1.6.0-beta.6`.
The **target version number** of the Test Plan points to the official version number where these features are expected to be added. For example:
- `1.5.0-rc.3` means this is a preview of the `1.5.0` official release (the current latest official release is `1.4.9`, and `1.5.0` has not yet been officially released).
- `1.5.1-beta.1` means this is a beta version of the `1.5.1` official release (the current latest official release is `1.5.0`, and `1.5.1` has not yet been officially released).
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/testplan-zh.md
|
CherryHQ__cherry-studio/docs/testplan-zh.md
| 4,738 | 1,758,202,168 |
en
|
# 测试计划
为了给用户提供更稳定的应用体验,并提供更快的迭代速度,Cherry Studio推出“测试计划”。
## 用户指南
测试计划分为RC版通道和Beta版通道吗,区别在于:
- **RC版(预览版)**:RC即Release Candidate,功能已经稳定,BUG较少,接近正式版
- **Beta版(测试版)**:功能可能随时变化,BUG较多,可以较早体验未来功能
用户可以在软件的`设置`-`关于`中,开启“测试计划”并选择版本通道。请注意“测试计划”的版本无法保证数据的一致性,请使用前一定要备份数据。
用户在测试过程中发现的BUG,欢迎提交issue或通过其他渠道反馈。用户的反馈对我们非常重要。
## 开发者指南
### 参与测试计划
开发者按照[贡献者指南](CONTRIBUTING.zh.md)要求正常提交`PR`(并注意提交target为`main`)。仓库维护者会综合考虑(例如该功能对应用的影响程度,功能的重要性,是否需要更广泛的测试等),决定该`PR`是否应加入测试计划。
若该`PR`加入测试计划,仓库维护者会做如下操作:
- 通知`PR`提交人
- 设置PR为`draft`状态(避免在测试完成前意外并入`main`)
- `milestone`设置为具体测试计划版本
- 修改`PR`标题
`PR`提交人在参与测试计划过程中,应做到:
- 保持`PR`分支与最新`main`同步(即`PR`分支总是应基于最新`main`代码)
- 保持`PR`分支为无冲突状态
- 积极响应 comments & reviews,修复bug
- 开启维护者可以修改`PR`分支的权限,以便维护者能随时修改BUG
加入测试计划并不保证`PR`的最终合并,也有可能由于功能不成熟或测试反馈不佳而搁置
### 测试计划负责人
某个维护者会被指定为某个版本期间(例如`1.5.0-rc`)的测试计划负责人。测试计划负责人的工作为:
- 判断某个`PR`是否符合测试计划要求,并决定是否应合入当期测试计划
- 修改加入测试计划的`PR`状态,并与`PR`提交人沟通相关事宜
- 在测试计划发版前,将加入测试计划的`PR`分支逐一合并(采用squash merge)至`testplan`对应版本分支,并解决冲突
- 保证`testplan`分支与最新`main`同步
- 负责测试计划发版
## 深入理解
### 关于`PR`
`PR`是特定分支(及commits)、comments、reviews等各种信息的集合,也是测试计划的**最小管理单元**。
相比将所有功能都提交到某个分支,测试计划通过`PR`来管理功能,这可以带来极大的灵活度和效率:
- 测试计划的各个版本间,可以随意增减功能,而无需繁琐的`revert`操作
- 明确了功能边界和负责人,bug修复在各自`PR`中完成,隔离了交叉影响,也能更好观察进度
- `PR`提交人负责与最新`main`之间的冲突;测试计划负责人负责各`PR`分支之间的冲突,但因加入测试计划的各功能相对比较独立(话句话说,如果功能牵涉较广,则应独立上测试计划),冲突一般比较少或简单。
### `testplan`分支
`testplan`分支是用于测试计划发版所用的**临时**分支。
注意:
- **请勿基于该分支开发**。该分支随时会变化甚至删除,且并不保证commit的完整和顺序。
- **请勿向该分支提交`commit`及`PR`**,将不会得到保留
- `testplan`分支总是基于最新`main`分支(而不是基于已发布版本),在其之上添加功能
#### RC版分支
分支名称:`testplan/rc/x.y.z`
用于RC版的发版,x.y.z为目标版本号,注意无论是rc.1还是rc.5,只要主版本号为x.y.z,都在该分支完成。
一般而言,该分支发版的版本号命名为`x.y.z-rc.n`
#### Beta版分支
分支名称:`testplan/beta/x.y.z`
用于Beta版的发版,x.y.z为目标版本号,注意无论是beta.1还是beta.5,只要主版本号为x.y.z,都在该分支完成。
一般而言,该分支发版的版本号命名为`x.y.z-beta.n`
### 版本规则
测试计划的应用版本号为:`x.y.z-CHA.n`,其中:
- `x.y.z`为一般意义上的版本号,在这里称为**目标版本号**
- `CHA`为通道号(Channel),现在分为`rc`和`beta`
- `n`为发版编号,从`1`计数
完整的版本号举例:`1.5.0-rc.3`、`1.5.1-beta.1`、`1.6.0-beta.6`
测试计划的**目标版本号**指向希望添加这些功能的正式版版本号。例如:
- `1.5.0-rc.3`是指,这是`1.5.0`正式版的预览版(当前最新正式版是`1.4.9`,而`1.5.0`正式版还未发布)
- `1.5.1-beta.1`是指,这是`1.5.1`正式版的测试版(当前最新正式版是`1.5.0`,而`1.5.1`正式版还未发布)
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/CONTRIBUTING.zh.md
|
CherryHQ__cherry-studio/docs/CONTRIBUTING.zh.md
| 4,802 | 1,758,202,168 |
en
|
# Cherry Studio 贡献者指南
[**English**](../CONTRIBUTING.md) | [**中文**](CONTRIBUTING.zh.md)
欢迎来到 Cherry Studio 的贡献者社区!我们致力于将 Cherry Studio 打造成一个长期提供价值的项目,并希望邀请更多的开发者加入我们的行列。无论您是经验丰富的开发者还是刚刚起步的初学者,您的贡献都将帮助我们更好地服务用户,提升软件质量。
## 如何贡献
以下是您可以参与的几种方式:
1. **贡献代码**:帮助我们开发新功能或优化现有代码。请确保您的代码符合我们的编码标准,并通过所有测试。
2. **修复 BUG**:如果您发现了 BUG,欢迎提交修复方案。请在提交前确认问题已被解决,并附上相关测试。
3. **维护 Issue**:协助我们管理 GitHub 上的 issue,帮助标记、分类和解决问题。
4. **产品设计**:参与产品设计讨论,帮助我们改进用户体验和界面设计。
5. **编写文档**:帮助我们完善用户手册、API 文档和开发者指南。
6. **社区维护**:参与社区讨论,帮助解答用户问题,促进社区活跃。
7. **推广使用**:通过博客、社交媒体等渠道推广 Cherry Studio,吸引更多用户和开发者。
## 开始之前
请确保阅读了[行为准则](../CODE_OF_CONDUCT.md)和[LICENSE](../LICENSE)。
## 开始贡献
为了让您更熟悉代码,建议您处理一些标记有以下标签之一或多个的问题:[good-first-issue](https://github.com/CherryHQ/cherry-studio/labels/good%20first%20issue)、[help-wanted](https://github.com/CherryHQ/cherry-studio/labels/help%20wanted) 或 [kind/bug](https://github.com/CherryHQ/cherry-studio/labels/kind%2Fbug)。任何帮助都会收到欢迎。
### 测试
未经测试的功能等同于不存在。为确保代码真正有效,应通过单元测试和功能测试覆盖相关流程。因此,在考虑贡献时,也请考虑可测试性。所有测试均可本地运行,无需依赖 CI。请参阅[开发者指南](dev.md#test)中的“Test”部分。
### 拉取请求的自动化测试
自动化测试会在 Cherry Studio 组织成员开启的拉取请求(PR)上触发,草稿 PR 除外。新贡献者开启的 PR 最初会标记为 needs-ok-to-test 标签且不自动测试。待 Cherry Studio 组织成员在 PR 上添加 /ok-to-test 后,测试通道将被创建。
### 考虑将您的拉取请求作为草稿打开
并非所有拉取请求在创建时就准备好接受审查。这可能是因为作者想发起讨论,或者他们不完全确定更改是否朝着正确的方向发展,甚至可能是因为更改尚未完成。请考虑将这些 PR 创建为[草稿拉取请求](https://github.blog/2019-02-14-introducing-draft-pull-requests/)。草稿 PR 会被CI跳过,从而节省CI资源。这也意味着审阅者不会被自动分配,社区会理解此 PR 尚未准备好接受审阅。
在您将草稿拉取请求标记为准备审核后,审核人员将被分配
### 贡献者遵守项目条款
我们要求每位贡献者证明他们有权合法地为我们的项目做出贡献。贡献者通过有意识地签署他们的提交来表达这一点,并通过这一行为表明他们遵守许可证[LICENSE](LICENSE)。
签名提交是指提交信息中包含以下内容的提交:
```
Signed-off-by: Your Name <your.email@example.com>
```
您可以通过以下命令[git commit --signoff](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff)生成签名提交:
```
git commit --signoff -m "Your commit message"
```
### 获取代码审查/合并
维护者在此帮助您在合理时间内实现您的用例。他们会尽力在合理时间内审查您的代码并提供建设性反馈。但如果您在审查过程中受阻,或认为您的 Pull Request 未得到应有的关注,请通过 Issue 中的评论或者[社群](README.zh.md#-community)联系我们
### 参与测试计划
测试计划旨在为用户提供更稳定的应用体验和更快的迭代速度,详细情况请参阅[测试计划](testplan-zh.md)。
### 其他建议
- **联系开发者**:在提交 PR 之前,您可以先和开发者进行联系,共同探讨或者获取帮助。
- **成为核心开发者**:如果您能够稳定为项目贡献,恭喜您可以成为项目核心开发者,获取到项目成员身份。请查看我们的[成员指南](https://github.com/CherryHQ/community/blob/main/membership.md)
## 联系我们
如果您有任何问题或建议,欢迎通过以下方式联系我们:
- 微信:kangfenmao
- [GitHub Issues](https://github.com/CherryHQ/cherry-studio/issues)
感谢您的支持和贡献!我们期待与您一起将 Cherry Studio 打造成更好的产品。
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/sponsor.md
|
CherryHQ__cherry-studio/docs/sponsor.md
| 168 | 1,758,202,168 |
en
|
# Sponsor
<div align="center">
<img src="https://github.com/user-attachments/assets/4665f07f-5ecc-4bd8-8727-ae00f35d6d98" alt="Buy Me a Coffee" width="280"/>
</div>
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/features/memory-guide-zh.md
|
CherryHQ__cherry-studio/docs/features/memory-guide-zh.md
| 7,126 | 1,758,202,168 |
en
|
# Cherry Studio 记忆功能指南
## 功能介绍
Cherry Studio 的记忆功能是一个强大的工具,能够帮助 AI 助手记住对话中的重要信息、用户偏好和上下文。通过记忆功能,您的 AI 助手可以:
- 📝 **记住重要信息**:自动从对话中提取并存储关键事实和信息
- 🧠 **个性化响应**:基于存储的记忆提供更加个性化和相关的回答
- 🔍 **智能检索**:在需要时自动搜索相关记忆,增强对话的连贯性
- 👥 **多用户支持**:为不同用户维护独立的记忆上下文
记忆功能特别适用于需要长期保持上下文的场景,例如个人助手、客户服务、教育辅导等。
## 如何启用记忆功能
### 1. 全局配置(首次设置)
在使用记忆功能之前,您需要先进行全局配置:
1. 点击侧边栏的 **记忆** 图标(记忆棒图标)进入记忆管理页面
2. 点击右上角的 **更多** 按钮(三个点),选择 **设置**
3. 在设置弹窗中配置以下必要项:
- **LLM 模型**:选择用于处理记忆的语言模型(推荐使用 GPT-4 或 Claude 等高级模型)
- **嵌入模型**:选择用于生成向量嵌入的模型(如 text-embedding-3-small)
- **嵌入维度**:输入嵌入模型的维度(通常为 1536)
4. 点击 **确定** 保存配置
> ⚠️ **注意**:嵌入模型和维度一旦设置后无法更改,请谨慎选择。
### 2. 为助手启用记忆
完成全局配置后,您可以为特定助手启用记忆功能:
1. 进入 **助手** 页面
2. 选择要启用记忆的助手,点击 **编辑**
3. 在助手设置中找到 **记忆** 部分
4. 打开记忆功能开关
5. 保存助手设置
启用后,该助手将在对话过程中自动提取和使用记忆。
## 使用方法
### 查看记忆
1. 点击侧边栏的 **记忆** 图标进入记忆管理页面
2. 您可以看到所有存储的记忆卡片,包括:
- 记忆内容
- 创建时间
- 所属用户
### 添加记忆
手动添加记忆有两种方式:
**方式一:在记忆管理页面添加**
1. 点击右上角的 **添加记忆** 按钮
2. 在弹窗中输入记忆内容
3. 点击 **添加** 保存
**方式二:在对话中自动提取**
- 当助手启用记忆功能后,系统会自动从对话中提取重要信息并存储为记忆
### 编辑记忆
1. 在记忆卡片上点击 **更多** 按钮(三个点)
2. 选择 **编辑**
3. 修改记忆内容
4. 点击 **保存**
### 删除记忆
1. 在记忆卡片上点击 **更多** 按钮
2. 选择 **删除**
3. 确认删除操作
## 记忆搜索
记忆管理页面提供了强大的搜索功能:
1. 在页面顶部的搜索框中输入关键词
2. 系统会实时过滤显示匹配的记忆
3. 搜索支持模糊匹配,可以搜索记忆内容的任何部分
## 用户管理
记忆功能支持多用户,您可以为不同的用户维护独立的记忆库:
### 切换用户
1. 在记忆管理页面,点击右上角的用户选择器
2. 选择要切换到的用户
3. 页面会自动加载该用户的记忆
### 添加新用户
1. 点击用户选择器
2. 选择 **添加新用户**
3. 输入用户 ID(支持字母、数字、下划线和连字符)
4. 点击 **添加**
### 删除用户
1. 切换到要删除的用户
2. 点击右上角的 **更多** 按钮
3. 选择 **删除用户**
4. 确认删除(注意:这将删除该用户的所有记忆)
> 💡 **提示**:默认用户(default-user)无法删除。
## 设置说明
### LLM 模型
- 用于处理记忆提取和更新的语言模型
- 建议选择能力较强的模型以获得更好的记忆提取效果
- 可随时更改
### 嵌入模型
- 用于将文本转换为向量,支持语义搜索
- 一旦设置后无法更改(为了保证现有记忆的兼容性)
- 推荐使用 OpenAI 的 text-embedding 系列模型
### 嵌入维度
- 嵌入向量的维度,需要与选择的嵌入模型匹配
- 常见维度:
- text-embedding-3-small: 1536
- text-embedding-3-large: 3072
- text-embedding-ada-002: 1536
### 自定义提示词(可选)
- **事实提取提示词**:自定义如何从对话中提取信息
- **记忆更新提示词**:自定义如何更新现有记忆
## 最佳实践
### 1. 合理组织记忆
- 保持记忆简洁明了,每条记忆专注于一个具体信息
- 使用清晰的语言描述事实,避免模糊表达
- 定期审查和清理过时或不准确的记忆
### 2. 多用户场景
- 为不同的使用场景创建独立用户(如工作、个人、学习等)
- 使用有意义的用户 ID,便于识别和管理
- 定期备份重要用户的记忆数据
### 3. 模型选择建议
- **LLM 模型**:GPT-4、Claude 3 等高级模型能更准确地提取和理解信息
- **嵌入模型**:选择与您的主要使用语言匹配的模型
### 4. 性能优化
- 避免存储过多冗余记忆,这可能影响搜索性能
- 定期整理和合并相似的记忆
- 对于大量记忆的场景,考虑按主题或时间进行分类管理
## 常见问题
### Q: 为什么我无法启用记忆功能?
A: 请确保您已经完成全局配置,包括选择 LLM 模型和嵌入模型。
### Q: 记忆会自动同步到所有助手吗?
A: 不会。每个助手的记忆功能需要单独启用,且记忆是按用户隔离的。
### Q: 如何导出我的记忆数据?
A: 目前系统暂不支持直接导出功能,但所有记忆都存储在本地数据库中。
### Q: 删除的记忆可以恢复吗?
A: 删除操作是永久的,无法恢复。建议在删除前仔细确认。
### Q: 记忆功能会影响对话速度吗?
A: 记忆功能在后台异步处理,不会明显影响对话响应速度。但过多的记忆可能会略微增加搜索时间。
### Q: 如何清空所有记忆?
A: 您可以删除当前用户并重新创建,或者手动删除所有记忆条目。
## 注意事项
### 隐私保护
- 所有记忆数据都存储在您的本地设备上,不会上传到云端
- 请勿在记忆中存储敏感信息(如密码、私钥等)
- 定期审查记忆内容,确保没有意外存储的隐私信息
### 数据安全
- 记忆数据存储在本地数据库中
- 建议定期备份重要数据
- 更换设备时请注意迁移记忆数据
### 使用限制
- 单条记忆的长度建议不超过 500 字
- 每个用户的记忆数量建议控制在 1000 条以内
- 过多的记忆可能影响系统性能
## 技术细节
记忆功能使用了先进的 RAG(检索增强生成)技术:
1. **信息提取**:使用 LLM 从对话中智能提取关键信息
2. **向量化存储**:通过嵌入模型将文本转换为向量,支持语义搜索
3. **智能检索**:在对话时自动搜索相关记忆,提供给 AI 作为上下文
4. **持续学习**:随着对话进行,不断更新和完善记忆库
---
💡 **提示**:记忆功能是 Cherry Studio 的高级特性,合理使用可以大大提升 AI 助手的智能程度和用户体验。如有更多问题,欢迎查阅文档或联系支持团队。
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/code-execution.md
|
CherryHQ__cherry-studio/docs/technical/code-execution.md
| 6,737 | 1,758,202,168 |
en
|
# 代码执行功能
本文档说明了代码块的 Python 代码执行功能。该实现利用 [Pyodide][pyodide-link] 在浏览器环境中直接运行 Python 代码,并将其置于 Web Worker 中,以避免阻塞主 UI 线程。
整个实现分为三个主要部分:UI 层、服务层和 Worker 层。
## 执行流程图
```mermaid
sequenceDiagram
participant 用户
participant CodeBlockView (UI)
participant PyodideService (服务)
participant PyodideWorker (Worker)
用户->>CodeBlockView (UI): 点击“运行”按钮
CodeBlockView (UI)->>PyodideService (服务): 调用 runScript(code)
PyodideService (服务)->>PyodideWorker (Worker): 发送 postMessage({ id, python: code })
PyodideWorker (Worker)->>PyodideWorker (Worker): 加载 Pyodide 和相关包
PyodideWorker (Worker)->>PyodideWorker (Worker): (按需)注入垫片并合并代码
PyodideWorker (Worker)->>PyodideWorker (Worker): 执行合并后的 Python 代码
PyodideWorker (Worker)-->>PyodideService (服务): 返回 postMessage({ id, output })
PyodideService (服务)-->>CodeBlockView (UI): 返回 { text, image } 对象
CodeBlockView (UI)->>用户: 在状态栏中显示文本和/或图像输出
```
## 1. UI 层
面向用户的代码执行组件是 [CodeBlockView][codeblock-view-link]。
### 关键机制:
- **运行按钮**:当代码块语言为 `python` 且 `codeExecution.enabled` 设置为 true 时,`CodeToolbar` 中会条件性地渲染一个“运行”按钮。
- **事件处理**:运行按钮的 `onClick` 事件会触发 `handleRunScript` 函数。
- **服务调用**:`handleRunScript` 调用 `pyodideService.runScript(code)`,将代码块中的 Python 代码传递给服务。
- **状态管理与输出显示**:使用 `executionResult` 来管理所有执行输出,只要有任何结果(文本或图像),[StatusBar][statusbar-link] 组件就会被渲染以统一显示。
```typescript
// src/renderer/src/components/CodeBlockView/view.tsx
const [executionResult, setExecutionResult] = useState<{ text: string; image?: string } | null>(null)
const handleRunScript = useCallback(() => {
setIsRunning(true)
setExecutionResult(null)
pyodideService
.runScript(children, {}, codeExecution.timeoutMinutes * 60000)
.then((result) => {
setExecutionResult(result)
})
.catch((error) => {
console.error('Unexpected error:', error)
setExecutionResult({
text: `Unexpected error: ${error.message || 'Unknown error'}`
})
})
.finally(() => {
setIsRunning(false)
})
}, [children, codeExecution.timeoutMinutes]);
// ... 在 JSX 中
{isExecutable && executionResult && (
<StatusBar>
{executionResult.text}
{executionResult.image && (
<ImageOutput>
<img src={executionResult.image} alt="Matplotlib plot" />
</ImageOutput>
)}
</StatusBar>
)}
```
## 2. 服务层
服务层充当 UI 组件和运行 Pyodide 的 Web Worker 之间的桥梁。其逻辑封装在位于单例类 [PyodideService][pyodide-service-link]。
### 主要职责:
- **Worker 管理**:初始化、管理并与 Pyodide Web Worker 通信。
- **请求处理**:使用 `resolvers` Map 管理并发请求,通过唯一 ID 匹配请求和响应。
- **为 UI 提供 API**:向 UI 提供 `runScript(script, context, timeout)` 方法。此方法的返回值已修改为 `Promise<{ text: string; image?: string }>`,以支持包括图像在内的多种输出类型。
- **输出处理**:从 Worker 接收包含文本、错误和可选图像数据的 `output` 对象。它将文本和错误格式化为对用户友好的单个字符串,然后连同图像数据一起包装成对象返回给 UI 层。
- **IPC 端点**:该服务还提供了一个 `python-execution-request` IPC 端点,允许主进程请求执行 Python 代码,展示了其灵活的架构。
## 3. Worker 层
核心的 Python 执行发生在 [pyodide.worker.ts][pyodide-worker-link] 中定义的 Web Worker 内部。这确保了计算密集的 Python 代码不会冻结用户界面。
### Worker 逻辑:
- **Pyodide 加载**:Worker 从 CDN 加载 Pyodide 引擎,并设置处理器以捕获 Python 的 `stdout` 和 `stderr`。
- **动态包安装**:使用 `pyodide.loadPackagesFromImports()` 自动分析并安装代码中导入的依赖包。
- **按需执行垫片代码**:Worker 会检查传入的代码中是否包含 "matplotlib" 字符串。如果是,它会先执行一段 Python“垫片”代码确保图像输出到全局命名空间。
- **结果序列化**:执行结果通过 `.toJs()` 等方法被递归转换为可序列化的标准 JavaScript 对象。
- **返回结构化输出**:执行后,Worker 将一个包含 `id` 和 `output` 对象的-消息发回服务层。`output` 对象是一个结构化对象,包含 `result`、`text`、`error` 以及一个可选的 `image` 字段(用于 Base64 图像数据)。
### 数据流
最终的数据流如下:
1. **UI 层 ([CodeBlockView][codeblock-view-link])**: 用户点击“运行”按钮。
2. **服务层 ([PyodideService][pyodide-service-link])**:
- 接收到代码执行请求。
- 调用 Web Worker ([pyodide.worker.ts][pyodide-worker-link]),传递用户代码。
3. **Worker 层 ([pyodide.worker.ts][pyodide-worker-link])**:
- 加载 Pyodide 运行时。
- 动态安装代码中 `import` 语句声明的依赖包。
- **注入 Matplotlib 垫片**: 如果代码中包含 `matplotlib`,则在用户代码前拼接垫片代码,强制使用 `AGG` 后端。
- **执行代码并捕获输出**: 在代码执行后,检查 `matplotlib.pyplot` 的所有 figure,如果存在图像,则将其保存到内存中的 `BytesIO` 对象,并编码为 Base64 字符串。
- **结构化返回**: 将捕获的文本输出和 Base64 图像数据封装在一个 JSON 对象中 (`{ "text": "...", "image": "data:image/png;base64,..." }`) 返回给主线程。
4. **服务层 ([PyodideService][pyodide-service-link])**:
- 接收来自 Worker 的结构化数据。
- 将数据原样传递给 UI 层。
5. **UI 层 ([CodeBlockView][codeblock-view-link])**:
- 接收包含文本和图像数据的对象。
- 使用一个 `useState` 来管理执行结果 (`executionResult`)。
- 在界面上分别渲染文本输出和图像(如果存在)。
<!-- Link Definitions -->
[pyodide-link]: https://pyodide.org/
[codeblock-view-link]: /src/renderer/src/components/CodeBlockView/view.tsx
[pyodide-service-link]: /src/renderer/src/services/PyodideService.ts
[pyodide-worker-link]: /src/renderer/src/workers/pyodide.worker.ts
[statusbar-link]: /src/renderer/src/components/CodeBlockView/StatusBar.tsx
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/how-to-i18n-zh.md
|
CherryHQ__cherry-studio/docs/technical/how-to-i18n-zh.md
| 4,804 | 1,758,202,168 |
en
|
# 如何优雅地做好 i18n
## 使用i18n ally插件提升开发体验
i18n ally是一个强大的VSCode插件,它能在开发阶段提供实时反馈,帮助开发者更早发现文案缺失和错译问题。
项目中已经配置好了插件设置,直接安装即可。
### 开发时优势
- **实时预览**:翻译文案会直接显示在编辑器中
- **错误检测**:自动追踪标记出缺失的翻译或未使用的key
- **快速跳转**:可通过key直接跳转到定义处(Ctrl/Cmd + click)
- **自动补全**:输入i18n key时提供自动补全建议
### 效果展示



## i18n 约定
### **绝对避免使用flat格式**
绝对避免使用flat格式,如`"add.button.tip": "添加"`。应采用清晰的嵌套结构:
```json
// 错误示例 - flat结构
{
"add.button.tip": "添加",
"delete.button.tip": "删除"
}
// 正确示例 - 嵌套结构
{
"add": {
"button": {
"tip": "添加"
}
},
"delete": {
"button": {
"tip": "删除"
}
}
}
```
#### 为什么要使用嵌套结构
1. **自然分组**:通过对象结构天然能将相关上下文的文案分到一个组别中
2. **插件要求**:i18n ally 插件需要嵌套或flat格式其一的文件才能正常分析
### **避免在`t()`中使用模板字符串**
**强烈建议避免使用模板字符串**进行动态插值。虽然模板字符串在JavaScript开发中非常方便,但在国际化场景下会带来一系列问题。
1. **插件无法跟踪**
i18n ally等工具无法解析模板字符串中的动态内容,导致:
- 无法正确显示实时预览
- 无法检测翻译缺失
- 无法提供跳转到定义的功能
```javascript
// 不推荐 - 插件无法解析
const message = t(`fruits.${fruit}`)
```
2. **编辑器无法实时渲染**
在IDE中,模板字符串会显示为原始代码而非最终翻译结果,降低了开发体验。
3. **更难以维护**
由于插件无法跟踪这样的文案,编辑器中也无法渲染,开发者必须人工确认语言文件中是否存在相应的文案。
### 推荐做法
为了避免键的缺失,所有需要动态翻译的文本都应当先维护一个`FooKeyMap`,再通过函数获取翻译文本。
例如:
```ts
// src/renderer/src/i18n/label.ts
const themeModeKeyMap = {
dark: 'settings.theme.dark',
light: 'settings.theme.light',
system: 'settings.theme.system'
} as const
export const getThemeModeLabel = (key: string): string => {
return themeModeKeyMap[key] ? t(themeModeKeyMap[key]) : key
}
```
通过避免模板字符串,可以获得更好的开发体验、更可靠的翻译检查以及更易维护的代码库。
## 自动化脚本
项目中有一系列脚本来自动化i18n相关任务:
### `check:i18n` - 检查i18n结构
此脚本会检查:
- 所有语言文件是否为嵌套结构
- 是否存在缺失的key
- 是否存在多余的key
- 是否已经有序
```bash
yarn check:i18n
```
### `sync:i18n` - 同步json结构与排序
此脚本以`zh-cn.json`文件为基准,将结构同步到其他语言文件,包括:
1. 添加缺失的键。缺少的翻译内容会以`[to be translated]`标记
2. 删除多余的键
3. 自动排序
```bash
yarn sync:i18n
```
### `auto:i18n` - 自动翻译待翻译文本
次脚本自动将标记为待翻译的文本通过机器翻译填充。
通常,在`zh-cn.json`中添加所需文案后,执行`sync:i18n`即可自动完成翻译。
使用该脚本前,需要配置环境变量,例如:
```bash
API_KEY="sk-xxx"
BASE_URL="https://dashscope.aliyuncs.com/compatible-mode/v1/"
MODEL="qwen-plus-latest"
```
你也可以通过直接编辑`.env`文件来添加环境变量。
```bash
yarn auto:i18n
```
### `update:i18n` - 对象级别翻译更新
对`src/renderer/src/i18n/translate`中的语言文件进行对象级别的翻译更新,保留已有翻译,只更新新增内容。
**不建议**使用该脚本,更推荐使用`auto:i18n`进行翻译。
```bash
yarn update:i18n
```
### 工作流
1. 开发阶段,先在`zh-cn.json`中添加所需文案
2. 确认在中文环境下显示无误后,使用`yarn sync:i18n`将文案同步到其他语言文件
3. 使用`yarn auto:i18n`进行自动翻译
4. 喝杯咖啡,等翻译完成吧!
## 最佳实践
1. **以中文为源语言**:所有开发首先使用中文,再翻译为其他语言
2. **提交前运行检查脚本**:使用`yarn check:i18n`检查i18n是否有问题
3. **小步提交翻译**:避免积累大量未翻译文本
4. **保持key语义明确**:key应能清晰表达其用途,如`user.profile.avatar.upload.error`
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/how-to-use-logger-zh.md
|
CherryHQ__cherry-studio/docs/technical/how-to-use-logger-zh.md
| 10,841 | 1,758,202,168 |
en
|
# 如何使用日志 LoggerService
这是关于如何使用日志的开发者文档。
CherryStudio使用统一的日志服务来打印和记录日志,**若无特殊原因,请勿使用`console.xxx`来打印日志**。
以下是详细说明。
## 在`main`进程中使用
### 引入
```typescript
import { loggerService } from '@logger'
```
### 设置module信息(规范要求)
在import头之后,设置:
```typescript
const logger = loggerService.withContext('moduleName')
```
- `moduleName`是当前文件模块的名称,命名可以以文件名、主类名、主函数名等,原则是清晰明了
- `moduleName`会在终端中打印出来,也会在文件日志中体现,方便筛选
### 设置`CONTEXT`信息(可选)
在`withContext`中,也可以设置其他`CONTEXT`信息:
```typescript
const logger = loggerService.withContext('moduleName', CONTEXT)
```
- `CONTEXT`为`{ key: value, ... }`
- `CONTEXT`信息不会在终端中打印出来,但是会在文件日志中记录,方便筛选
### 记录日志
在代码中,可以随时调用 `logger` 来记录日志,支持的级别有:`error`, `warn`, `info`, `verbose`, `debug`, `silly`。
各级别的含义,请参考后面的章节。
以下支持的记录日志的参数(以 `logger.LEVEL` 举例如何使用,`LEVEL`指代为上述级别):
```typescript
logger.LEVEL(message)
logger.LEVEL(message, CONTEXT)
logger.LEVEL(message, error)
logger.LEVEL(message, error, CONTEXT)
```
**只支持上述四种调用方式**。
| 参数 | 类型 | 说明 |
| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `message` | `string` | 必填项。这是日志的核心字段,记录的重点内容 |
| `CONTEXT` | `object` | 可选。其他需要再日志文件中记录的信息,建议为`{ key: value, ...}`格式 |
| `error` | `Error` | 可选。同时会打印错误堆栈信息。<br />注意`catch(error)`所捕获的`error`是`unknown`类型,按照`Typescript`最佳实践,请先用`instanceof`进行类型判断,如果确信一定是`Error`类型,也可用断言`as Error`。 |
#### 记录非`object`类型的上下文信息
```typescript
const foo = getFoo()
logger.debug(`foo ${foo}`)
```
### 记录级别
- 开发环境下,所有级别的日志都会打印到终端,并且记录到文件日志中
- 生产环境下,默认记录级别为`info`,日志只会记录到文件,不会打印到终端
更改日志记录级别:
- 可以通过 `logger.setLevel('newLevel')` 来更改日志记录级别
- `logger.resetLevel()` 可以重置为默认级别
- `logger.getLevel()` 可以获取当前记录记录级别
**注意** 更改日志记录级别是全局生效的,请不要在代码中随意更改,除非你非常清楚自己在做什么
## 在`renderer`进程中使用
在`renderer`进程中使用,_引入方法_、_设置`module`信息_、*设置`context`信息的方法*和`main`进程中是**完全一样**的。
下面着重讲一下不同之处。
### `initWindowSource`
`renderer`进程中,有不同的`window`,在开始使用`logger`之前,我们必须设置`window`信息:
```typescript
loggerService.initWindowSource('windowName')
```
原则上,我们将在`window`的`entryPoint.tsx`中进行设置,这可以保证`windowName`在开始使用前已经设置好了。
- 未设置`windowName`会报错,`logger`将不起作用
- `windowName`只能设置一次,重复设置将不生效
- `windowName`不会在`devTool`的`console`中打印出来,但是会在`main`进程的终端和文件日志中记录
- `initWindowSource`返回的是LoggerService的实例,因此可以做链式调用
### 记录级别
- 开发环境下,默认所有级别的日志都会打印到`devTool`的`console`
- 生产环境下,默认记录级别为`info`,日志会打印到`devTool`的`console`
- 在开发和生产环境下,默认`warn`和`error`级别的日志,会传输给`main`进程,并记录到文件日志
- 开发环境下,`main`进程终端中也会打印传输过来的日志
#### 更改日志记录级别
和`main`进程中一样,你可以通过`setLevel('level')`、`resetLevel()`和`getLevel()`来管理日志记录级别。
同样,该日志记录级别也是全局调整的。
#### 更改传输到`main`的级别
将`renderer`的日志发送到`main`,并由`main`统一管理和记录到文件(根据`main`的记录到文件的级别),默认只有`warn`和`error`级别的日志会传输到`main`
有以下两种方式,可以更改传输到`main`的日志级别:
##### 全局更改
以下方法可以分别设置、重置和获取传输到`main`的日志级别
```typescript
logger.setLogToMainLevel('newLevel')
logger.resetLogToMainLevel()
logger.getLogToMainLevel()
```
**注意** 该方法是全局生效的,请不要在代码中随意更改,除非你非常清楚自己在做什么
##### 单条更改
在日志记录的最末尾,加上`{ logToMain: true }`,即可将本条日志传输到`main`(不受全局日志级别限制),例如:
```typescript
logger.info('message', { logToMain: true })
```
## 关于`worker`线程
- 现在不支持`main`进程中的`worker`的日志。
- 支持`renderer`中起的`worker`的日志,但是现在该日志不会发送给`main`进行记录。
### 如何在`renderer`的`worker`中使用日志
由于`worker`线程是独立的,在其中使用LoggerService,等同于在一个新`renderer`窗口中使用。因此也必须先`initWindowSource`。
如果`worker`比较简单,只有一个文件,也可以使用链式语法直接使用:
```typescript
const logger = loggerService.initWindowSource('Worker').withContext('LetsWork')
```
## 使用环境变量来筛选要显示的日志
在开发环境中,可以通过环境变量的定义,来筛选要显示的日志的级别和module。开发者可以专注于自己的日志,提高开发效率。
环境变量可以在终端中自行设置,或者在开发根目录的`.env`文件中进行定义,可以定义的变量如下:
| 变量名 | 含义 |
| -------------------------------- | ----------------------------------------------------------------------------------------------- |
| `CSLOGGER_MAIN_LEVEL` | 用于`main`进程的日志级别,低于该级别的日志将不显示 |
| `CSLOGGER_MAIN_SHOW_MODULES` | 用于`main`进程的日志module筛选,用`,`分隔,区分大小写。只有在该列表中的module的日志才会显示 |
| `CSLOGGER_RENDERER_LEVEL` | 用于`renderer`进程的日志级别,低于该级别的日志将不显示 |
| `CSLOGGER_RENDERER_SHOW_MODULES` | 用于`renderer`进程的日志module筛选,用`,`分隔,区分大小写。只有在该列表中的module的日志才会显示 |
示例:
```bash
CSLOGGER_MAIN_LEVEL=verbose
CSLOGGER_MAIN_SHOW_MODULES=MCPService,SelectionService
```
注意:
- 环境变量仅在开发环境中生效
- 该变量仅会改变在终端或在devTools中显示的日志,不会影响文件日志和`logToMain`的记录逻辑
## 日志级别的使用规范
日志有很多级别,什么时候应该用哪个级别,下面是在CherryStudio中应该遵循的规范:
(按日志级别从高到低排列)
| 日志级别 | 核心定义与使用场景 | 示例 |
| :------------ | :------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`error`** | **严重错误,导致程序崩溃或核心功能无法使用。** <br> 这是最高优的日志,通常需要立即上报或提示用户。 | - 主进程或渲染进程崩溃。 <br> - 无法读写用户关键数据文件(如数据库、配置文件),导致应用无法运行。<br> - 所有未捕获的异常。 |
| **`warn`** | **潜在问题或非预期情况,但不影响程序核心功能。** <br> 程序可以从中恢复或使用备用方案。 | - 配置文件 `settings.json` 缺失,已使用默认配置启动。 <br> - 自动更新检查失败,但不影响当前版本使用。<br> - 某个非核心插件加载失败。 |
| **`info`** | **记录应用生命周期和关键用户行为。** <br> 这是发布版中默认应记录的级别,用于追踪用户的主要操作路径。 | - 应用启动、退出。<br> - 用户成功打开/保存文件。 <br> - 主窗口创建/关闭。<br> - 开始执行一项重要任务(如“开始导出视频”)。 |
| **`verbose`** | **比 `info` 更详细的流程信息,用于追踪特定功能。** <br> 在诊断特定功能问题时开启,帮助理解内部执行流程。 | - 正在加载 `Toolbar` 模块。 <br> - IPC 消息 `open-file-dialog` 已从渲染进程发送。<br> - 正在应用滤镜 'Sepia' 到图像。 |
| **`debug`** | **开发和调试时使用的详细诊断信息。** <br> **严禁在发布版中默认开启**,因为它可能包含敏感数据并影响性能。 | - 函数 `renderImage` 的入参: `{ width: 800, ... }`。<br> - IPC 消息 `save-file` 收到的具体数据内容。<br> - 渲染进程中 Redux/Vuex 的 state 变更详情。 |
| **`silly`** | **最详尽的底层信息,仅用于极限调试。** <br> 几乎不在常规开发中使用,仅为解决棘手问题。 | - 鼠标移动的实时坐标 `(x: 150, y: 320)`。<br> - 读取文件时每个数据块(chunk)的大小。<br> - 每一次渲染帧的耗时。 |
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/KnowledgeService.md
|
CherryHQ__cherry-studio/docs/technical/KnowledgeService.md
| 6,020 | 1,758,202,168 |
en
|
我来详细介绍 KnowledgeService 中控制并发处理的项目数量和工作负载的部分。
## 并发控制与工作负载管理机制
KnowledgeService 实现了一个精细的任务队列系统,用于控制并发处理的项目数量和工作负载。这个系统主要通过以下几个关键部分实现:
### 1. 关键变量和限制
```typescript
private workload = 0
private processingItemCount = 0
private knowledgeItemProcessingQueueMappingPromise: Map<LoaderTaskOfSet, () => void> = new Map()
private static MAXIMUM_WORKLOAD = 1024 * 1024 * 80 // 约80MB
private static MAXIMUM_PROCESSING_ITEM_COUNT = 30
```
- `workload`: 跟踪当前正在处理的总工作量(以字节为单位)
- `processingItemCount`: 跟踪当前正在处理的项目数量
- `MAXIMUM_WORKLOAD`: 设置最大工作负载为80MB
- `MAXIMUM_PROCESSING_ITEM_COUNT`: 设置最大并发处理项目数为30个
### 2. 工作负载评估
每个任务都有一个评估工作负载的机制,通过 `evaluateTaskWorkload` 属性来表示:
```typescript
interface EvaluateTaskWorkload {
workload: number
}
```
不同类型的任务有不同的工作负载评估方式:
- 文件任务:使用文件大小作为工作负载 `{ workload: file.size }`
- URL任务:使用固定值 `{ workload: 1024 * 1024 * 2 }` (约2MB)
- 网站地图任务:使用固定值 `{ workload: 1024 * 1024 * 20 }` (约20MB)
- 笔记任务:使用文本内容的字节长度 `{ workload: contentBytes.length }`
### 3. 任务状态管理
任务通过状态枚举来跟踪其生命周期:
```typescript
enum LoaderTaskItemState {
PENDING, // 等待处理
PROCESSING, // 正在处理
DONE // 已完成
}
```
### 4. 任务队列处理核心逻辑
核心的队列处理逻辑在 `processingQueueHandle` 方法中:
```typescript
private processingQueueHandle() {
const getSubtasksUntilMaximumLoad = (): QueueTaskItem[] => {
const queueTaskList: QueueTaskItem[] = []
that: for (const [task, resolve] of this.knowledgeItemProcessingQueueMappingPromise) {
for (const item of task.loaderTasks) {
if (this.maximumLoad()) {
break that
}
const { state, task: taskPromise, evaluateTaskWorkload } = item
if (state !== LoaderTaskItemState.PENDING) {
continue
}
const { workload } = evaluateTaskWorkload
this.workload += workload
this.processingItemCount += 1
item.state = LoaderTaskItemState.PROCESSING
queueTaskList.push({
taskPromise: () =>
taskPromise().then(() => {
this.workload -= workload
this.processingItemCount -= 1
task.loaderTasks.delete(item)
if (task.loaderTasks.size === 0) {
this.knowledgeItemProcessingQueueMappingPromise.delete(task)
resolve()
}
this.processingQueueHandle()
}),
resolve: () => {},
evaluateTaskWorkload
})
}
}
return queueTaskList
}
const subTasks = getSubtasksUntilMaximumLoad()
if (subTasks.length > 0) {
const subTaskPromises = subTasks.map(({ taskPromise }) => taskPromise())
Promise.all(subTaskPromises).then(() => {
subTasks.forEach(({ resolve }) => resolve())
})
}
}
```
这个方法的工作流程是:
1. 遍历所有待处理的任务集合
2. 对于每个任务集合中的每个子任务:
- 检查是否已达到最大负载(通过 `maximumLoad()` 方法)
- 如果任务状态为 PENDING,则:
- 增加当前工作负载和处理项目计数
- 将任务状态更新为 PROCESSING
- 将任务添加到待执行队列
3. 执行所有收集到的子任务
4. 当子任务完成时:
- 减少工作负载和处理项目计数
- 从任务集合中移除已完成的任务
- 如果任务集合为空,则解析相应的 Promise
- 递归调用 `processingQueueHandle()` 以处理更多任务
### 5. 负载检查
```typescript
private maximumLoad() {
return (
this.processingItemCount >= KnowledgeService.MAXIMUM_PROCESSING_ITEM_COUNT ||
this.workload >= KnowledgeService.MAXIMUM_WORKLOAD
)
}
```
这个方法检查当前是否已达到最大负载,通过两个条件:
- 处理项目数量达到上限(30个)
- 总工作负载达到上限(80MB)
### 6. 任务添加与执行流程
当添加新任务时,流程如下:
1. 创建任务(根据类型不同创建不同的任务)
2. 通过 `appendProcessingQueue` 将任务添加到队列
3. 调用 `processingQueueHandle` 开始处理队列中的任务
```typescript
private appendProcessingQueue(task: LoaderTask): Promise<LoaderReturn> {
return new Promise((resolve) => {
this.knowledgeItemProcessingQueueMappingPromise.set(loaderTaskIntoOfSet(task), () => {
resolve(task.loaderDoneReturn!)
})
})
}
```
## 并发控制的优势
这种并发控制机制有几个重要优势:
1. **资源使用优化**:通过限制同时处理的项目数量和总工作负载,避免系统资源过度使用
2. **自动调节**:当任务完成时,会自动从队列中获取新任务,保持资源的高效利用
3. **灵活性**:不同类型的任务有不同的工作负载评估,更准确地反映实际资源需求
4. **可靠性**:通过状态管理和Promise解析机制,确保任务正确完成并通知调用者
## 实际应用场景
这种并发控制在处理大量数据时特别有用,例如:
- 导入大型目录时,可能包含数百个文件
- 处理大型网站地图,可能包含大量URL
- 处理多个用户同时添加知识库项目的请求
通过这种机制,系统可以平滑地处理大量请求,避免资源耗尽,同时保持良好的响应性。
总结来说,KnowledgeService 实现了一个复杂而高效的任务队列系统,通过精确控制并发处理的项目数量和工作负载,确保系统在处理大量数据时保持稳定和高效。
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/db.translate_languages.md
|
CherryHQ__cherry-studio/docs/technical/db.translate_languages.md
| 1,023 | 1,758,202,168 |
en
|
# `translate_languages` 表技术文档
## 📄 概述
`translate_languages` 记录用户自定义的的语言类型(`Language`)。
### 字段说明
| 字段名 | 类型 | 是否主键 | 索引 | 说明 |
| ---------- | ------ | -------- | ---- | ------------------------------------------------------------------------ |
| `id` | string | ✅ 是 | ✅ | 唯一标识符,主键 |
| `langCode` | string | ❌ 否 | ✅ | 语言代码(如:`zh-cn`, `en-us`, `ja-jp` 等,均为小写),支持普通索引查询 |
| `value` | string | ❌ 否 | ❌ | 语言的名称,用户输入 |
| `emoji` | string | ❌ 否 | ❌ | 语言的emoji,用户输入 |
> `langCode` 虽非主键,但在业务层应当避免重复插入相同语言代码。
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/how-to-use-messageBlock.md
|
CherryHQ__cherry-studio/docs/technical/how-to-use-messageBlock.md
| 6,426 | 1,758,202,168 |
en
|
# messageBlock.ts 使用指南
该文件定义了用于管理应用程序中所有 `MessageBlock` 实体的 Redux Slice。它使用 Redux Toolkit 的 `createSlice` 和 `createEntityAdapter` 来高效地处理规范化的状态,并提供了一系列 actions 和 selectors 用于与消息块数据交互。
## 核心目标
- **状态管理**: 集中管理所有 `MessageBlock` 的状态。`MessageBlock` 代表消息中的不同内容单元(如文本、代码、图片、引用等)。
- **规范化**: 使用 `createEntityAdapter` 将 `MessageBlock` 数据存储在规范化的结构中(`{ ids: [], entities: {} }`),这有助于提高性能和简化更新逻辑。
- **可预测性**: 提供明确的 actions 来修改状态,并通过 selectors 安全地访问状态。
## 关键概念
- **Slice (`createSlice`)**: Redux Toolkit 的核心 API,用于创建包含 reducer 逻辑、action creators 和初始状态的 Redux 模块。
- **Entity Adapter (`createEntityAdapter`)**: Redux Toolkit 提供的工具,用于简化对规范化数据的 CRUD(创建、读取、更新、删除)操作。它会自动生成 reducer 函数和 selectors。
- **Selectors**: 用于从 Redux store 中派生和计算数据的函数。Selectors 可以被记忆化(memoized),以提高性能。
## State 结构
`messageBlocks` slice 的状态结构由 `createEntityAdapter` 定义,大致如下:
```typescript
{
ids: string[]; // 存储所有 MessageBlock ID 的有序列表
entities: { [id: string]: MessageBlock }; // 按 ID 存储 MessageBlock 对象的字典
loadingState: 'idle' | 'loading' | 'succeeded' | 'failed'; // (可选) 其他状态,如加载状态
error: string | null; // (可选) 错误信息
}
```
## Actions
该 slice 导出以下 actions (由 `createSlice` 和 `createEntityAdapter` 自动生成或自定义):
- **`upsertOneBlock(payload: MessageBlock)`**:
- 添加一个新的 `MessageBlock` 或更新一个已存在的 `MessageBlock`。如果 payload 中的 `id` 已存在,则执行更新;否则执行插入。
- **`upsertManyBlocks(payload: MessageBlock[])`**:
- 添加或更新多个 `MessageBlock`。常用于批量加载数据(例如,加载一个 Topic 的所有消息块)。
- **`removeOneBlock(payload: string)`**:
- 根据提供的 `id` (payload) 移除单个 `MessageBlock`。
- **`removeManyBlocks(payload: string[])`**:
- 根据提供的 `id` 数组 (payload) 移除多个 `MessageBlock`。常用于删除消息或清空 Topic 时清理相关的块。
- **`removeAllBlocks()`**:
- 移除 state 中的所有 `MessageBlock` 实体。
- **`updateOneBlock(payload: { id: string; changes: Partial<MessageBlock> })`**:
- 更新一个已存在的 `MessageBlock`。`payload` 需要包含块的 `id` 和一个包含要更改的字段的 `changes` 对象。
- **`setMessageBlocksLoading(payload: 'idle' | 'loading')`**:
- (自定义) 设置 `loadingState` 属性。
- **`setMessageBlocksError(payload: string)`**:
- (自定义) 设置 `loadingState` 为 `'failed'` 并记录错误信息。
**使用示例 (在 Thunk 或其他 Dispatch 的地方):**
```typescript
import { upsertOneBlock, removeManyBlocks, updateOneBlock } from './messageBlock'
import store from './store' // 假设这是你的 Redux store 实例
// 添加或更新一个块
const newBlock: MessageBlock = {
/* ... block data ... */
}
store.dispatch(upsertOneBlock(newBlock))
// 更新一个块的内容
store.dispatch(updateOneBlock({ id: blockId, changes: { content: 'New content' } }))
// 删除多个块
const blockIdsToRemove = ['id1', 'id2']
store.dispatch(removeManyBlocks(blockIdsToRemove))
```
## Selectors
该 slice 导出由 `createEntityAdapter` 生成的基础 selectors,并通过 `messageBlocksSelectors` 对象访问:
- **`messageBlocksSelectors.selectIds(state: RootState): string[]`**: 返回包含所有块 ID 的数组。
- **`messageBlocksSelectors.selectEntities(state: RootState): { [id: string]: MessageBlock }`**: 返回块 ID 到块对象的映射字典。
- **`messageBlocksSelectors.selectAll(state: RootState): MessageBlock[]`**: 返回包含所有块对象的数组。
- **`messageBlocksSelectors.selectTotal(state: RootState): number`**: 返回块的总数。
- **`messageBlocksSelectors.selectById(state: RootState, id: string): MessageBlock | undefined`**: 根据 ID 返回单个块对象,如果找不到则返回 `undefined`。
**此外,还提供了一个自定义的、记忆化的 selector:**
- **`selectFormattedCitationsByBlockId(state: RootState, blockId: string | undefined): Citation[]`**:
- 接收一个 `blockId`。
- 如果该 ID 对应的块是 `CITATION` 类型,则提取并格式化其包含的引用信息(来自网页搜索、知识库等),进行去重和重新编号,最后返回一个 `Citation[]` 数组,用于在 UI 中显示。
- 如果块不存在或类型不匹配,返回空数组 `[]`。
- 这个 selector 封装了处理不同引用来源(Gemini, OpenAI, OpenRouter, Zhipu 等)的复杂逻辑。
**使用示例 (在 React 组件或 `useSelector` 中):**
```typescript
import { useSelector } from 'react-redux'
import { messageBlocksSelectors, selectFormattedCitationsByBlockId } from './messageBlock'
import type { RootState } from './store'
// 获取所有块
const allBlocks = useSelector(messageBlocksSelectors.selectAll)
// 获取特定 ID 的块
const specificBlock = useSelector((state: RootState) => messageBlocksSelectors.selectById(state, someBlockId))
// 获取特定引用块格式化后的引用列表
const formattedCitations = useSelector((state: RootState) => selectFormattedCitationsByBlockId(state, citationBlockId))
// 在组件中使用引用数据
// {formattedCitations.map(citation => ...)}
```
## 集成
`messageBlock.ts` slice 通常与 `messageThunk.ts` 中的 Thunks 紧密协作。Thunks 负责处理异步逻辑(如 API 调用、数据库操作),并在需要时 dispatch `messageBlock` slice 的 actions 来更新状态。例如,当 `messageThunk` 接收到流式响应时,它会 dispatch `upsertOneBlock` 或 `updateOneBlock` 来实时更新对应的 `MessageBlock`。同样,删除消息的 Thunk 会 dispatch `removeManyBlocks`。
理解 `messageBlock.ts` 的职责是管理**状态本身**,而 `messageThunk.ts` 负责**触发状态变更**的异步流程,这对于维护清晰的应用架构至关重要。
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/Message.md
|
CherryHQ__cherry-studio/docs/technical/Message.md
| 59 | 1,758,202,168 |
en
|
# 消息的生命周期

|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/CodeBlockView-zh.md
|
CherryHQ__cherry-studio/docs/technical/CodeBlockView-zh.md
| 4,524 | 1,758,202,168 |
en
|
# CodeBlockView 组件结构说明
## 概述
CodeBlockView 是 Cherry Studio 中用于显示和操作代码块的核心组件。它支持多种视图模式和特殊语言的可视化预览,提供丰富的交互工具。
## 组件结构
```mermaid
graph TD
A[CodeBlockView] --> B[CodeToolbar]
A --> C[SourceView]
A --> D[SpecialView]
A --> E[StatusBar]
B --> F[CodeToolButton]
C --> G[CodeEditor / CodeViewer]
D --> H[MermaidPreview]
D --> I[PlantUmlPreview]
D --> J[SvgPreview]
D --> K[GraphvizPreview]
F --> L[useCopyTool]
F --> M[useDownloadTool]
F --> N[useViewSourceTool]
F --> O[useSplitViewTool]
F --> P[useRunTool]
F --> Q[useExpandTool]
F --> R[useWrapTool]
F --> S[useSaveTool]
```
## 核心概念
### 视图类型
- **preview**: 预览视图,非源代码的是特殊视图
- **edit**: 编辑视图
### 视图模式
- **source**: 源代码视图模式
- **special**: 特殊视图模式(Mermaid、PlantUML、SVG)
- **split**: 分屏模式(源代码和特殊视图并排显示)
### 特殊视图语言
- mermaid
- plantuml
- svg
- dot
- graphviz
## 组件详细说明
### CodeBlockView 主组件
主要负责:
1. 管理视图模式状态
2. 协调源代码视图和特殊视图的显示
3. 管理工具栏工具
4. 处理代码执行状态
### 子组件
#### CodeToolbar 工具栏
- 显示在代码块右上角的工具栏
- 包含核心(core)和快捷(quick)两类工具
- 根据上下文动态显示相关工具
#### CodeEditor/CodeViewer 源代码视图
- 可编辑的代码编辑器或只读的代码查看器
- 根据设置决定使用哪个组件
- 支持多种编程语言高亮
#### 特殊视图组件
- **MermaidPreview**: Mermaid 图表预览
- **PlantUmlPreview**: PlantUML 图表预览
- **SvgPreview**: SVG 图像预览
- **GraphvizPreview**: Graphviz 图表预览
所有特殊视图组件共享通用架构,以确保一致的用户体验和功能。有关这些组件及其实现的详细信息,请参阅 [图像预览组件文档](./ImagePreview-zh.md)。
#### StatusBar 状态栏
- 显示 Python 代码执行结果
- 可显示文本和图像结果
## 工具系统
CodeBlockView 使用基于 hooks 的工具系统:
```mermaid
graph TD
A[CodeBlockView] --> B[useCopyTool]
A --> C[useDownloadTool]
A --> D[useViewSourceTool]
A --> E[useSplitViewTool]
A --> F[useRunTool]
A --> G[useExpandTool]
A --> H[useWrapTool]
A --> I[useSaveTool]
B --> J[ToolManager]
C --> J
D --> J
E --> J
F --> J
G --> J
H --> J
I --> J
J --> K[CodeToolbar]
```
每个工具 hook 负责注册特定功能的工具按钮到工具管理器,工具管理器再将这些工具传递给 CodeToolbar 组件进行渲染。
### 工具类型
- **core**: 核心工具,始终显示在工具栏
- **quick**: 快捷工具,当数量大于1时通过下拉菜单显示
### 工具列表
1. **复制(copy)**: 复制代码或图像
2. **下载(download)**: 下载代码或图像
3. **查看源码(view-source)**: 在特殊视图和源码视图间切换
4. **分屏(split-view)**: 切换分屏模式
5. **运行(run)**: 运行 Python 代码
6. **展开/折叠(expand)**: 控制代码块的展开/折叠
7. **换行(wrap)**: 控制代码的自动换行
8. **保存(save)**: 保存编辑的代码
## 状态管理
CodeBlockView 通过 React hooks 管理以下状态:
1. **viewMode**: 当前视图模式 ('source' | 'special' | 'split')
2. **isRunning**: Python 代码执行状态
3. **executionResult**: Python 代码执行结果
4. **tools**: 工具栏工具列表
5. **expandOverride/unwrapOverride**: 用户展开/换行的覆盖设置
6. **sourceScrollHeight**: 源代码视图滚动高度
## 交互流程
```mermaid
sequenceDiagram
participant U as User
participant CB as CodeBlockView
participant CT as CodeToolbar
participant SV as SpecialView
participant SE as SourceEditor
U->>CB: 查看代码块
CB->>CB: 初始化状态
CB->>CT: 注册工具
CB->>SV: 渲染特殊视图(如果适用)
CB->>SE: 渲染源码视图
U->>CT: 点击工具按钮
CT->>CB: 触发工具回调
CB->>CB: 更新状态
CB->>CT: 重新注册工具(如果需要)
```
## 特殊处理
### HTML 代码块
HTML 代码块会被特殊处理,使用 HtmlArtifactsCard 组件显示。
### Python 代码执行
支持执行 Python 代码并显示结果,使用 Pyodide 在浏览器中运行 Python 代码。
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/CodeBlockView-en.md
|
CherryHQ__cherry-studio/docs/technical/CodeBlockView-en.md
| 4,733 | 1,758,202,168 |
en
|
# CodeBlockView Component Structure
## Overview
CodeBlockView is the core component in Cherry Studio for displaying and manipulating code blocks. It supports multiple view modes and visual previews for special languages, providing rich interactive tools.
## Component Structure
```mermaid
graph TD
A[CodeBlockView] --> B[CodeToolbar]
A --> C[SourceView]
A --> D[SpecialView]
A --> E[StatusBar]
B --> F[CodeToolButton]
C --> G[CodeEditor / CodeViewer]
D --> H[MermaidPreview]
D --> I[PlantUmlPreview]
D --> J[SvgPreview]
D --> K[GraphvizPreview]
F --> L[useCopyTool]
F --> M[useDownloadTool]
F --> N[useViewSourceTool]
F --> O[useSplitViewTool]
F --> P[useRunTool]
F --> Q[useExpandTool]
F --> R[useWrapTool]
F --> S[useSaveTool]
```
## Core Concepts
### View Types
- **preview**: Preview view, where non-source code is displayed as special views
- **edit**: Edit view
### View Modes
- **source**: Source code view mode
- **special**: Special view mode (Mermaid, PlantUML, SVG)
- **split**: Split view mode (source code and special view displayed side by side)
### Special View Languages
- mermaid
- plantuml
- svg
- dot
- graphviz
## Component Details
### CodeBlockView Main Component
Main responsibilities:
1. Managing view mode state
2. Coordinating the display of source code view and special view
3. Managing toolbar tools
4. Handling code execution state
### Subcomponents
#### CodeToolbar
- Toolbar displayed at the top-right corner of the code block
- Contains core and quick tools
- Dynamically displays relevant tools based on context
#### CodeEditor/CodeViewer Source View
- Editable code editor or read-only code viewer
- Uses either component based on settings
- Supports syntax highlighting for multiple programming languages
#### Special View Components
- **MermaidPreview**: Mermaid diagram preview
- **PlantUmlPreview**: PlantUML diagram preview
- **SvgPreview**: SVG image preview
- **GraphvizPreview**: Graphviz diagram preview
All special view components share a common architecture for consistent user experience and functionality. For detailed information about these components and their implementation, see [Image Preview Components Documentation](./ImagePreview-en.md).
#### StatusBar
- Displays Python code execution results
- Can show both text and image results
## Tool System
CodeBlockView uses a hook-based tool system:
```mermaid
graph TD
A[CodeBlockView] --> B[useCopyTool]
A --> C[useDownloadTool]
A --> D[useViewSourceTool]
A --> E[useSplitViewTool]
A --> F[useRunTool]
A --> G[useExpandTool]
A --> H[useWrapTool]
A --> I[useSaveTool]
B --> J[ToolManager]
C --> J
D --> J
E --> J
F --> J
G --> J
H --> J
I --> J
J --> K[CodeToolbar]
```
Each tool hook is responsible for registering specific function tool buttons to the tool manager, which then passes these tools to the CodeToolbar component for rendering.
### Tool Types
- **core**: Core tools, always displayed in the toolbar
- **quick**: Quick tools, displayed in a dropdown menu when there are more than one
### Tool List
1. **Copy**: Copy code or image
2. **Download**: Download code or image
3. **View Source**: Switch between special view and source code view
4. **Split View**: Toggle split view mode
5. **Run**: Run Python code
6. **Expand/Collapse**: Control code block expansion/collapse
7. **Wrap**: Control automatic line wrapping
8. **Save**: Save edited code
## State Management
CodeBlockView manages the following states through React hooks:
1. **viewMode**: Current view mode ('source' | 'special' | 'split')
2. **isRunning**: Python code execution status
3. **executionResult**: Python code execution result
4. **tools**: Toolbar tool list
5. **expandOverride/unwrapOverride**: User override settings for expand/wrap
6. **sourceScrollHeight**: Source code view scroll height
## Interaction Flow
```mermaid
sequenceDiagram
participant U as User
participant CB as CodeBlockView
participant CT as CodeToolbar
participant SV as SpecialView
participant SE as SourceEditor
U->>CB: View code block
CB->>CB: Initialize state
CB->>CT: Register tools
CB->>SV: Render special view (if applicable)
CB->>SE: Render source view
U->>CT: Click tool button
CT->>CB: Trigger tool callback
CB->>CB: Update state
CB->>CT: Re-register tools (if needed)
```
## Special Handling
### HTML Code Blocks
HTML code blocks are specially handled using the HtmlArtifactsCard component.
### Python Code Execution
Supports executing Python code and displaying results using Pyodide to run Python code in the browser.
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/how-to-use-useMessageOperations.md
|
CherryHQ__cherry-studio/docs/technical/how-to-use-useMessageOperations.md
| 6,600 | 1,758,202,168 |
en
|
# useMessageOperations.ts 使用指南
该文件定义了一个名为 `useMessageOperations` 的自定义 React Hook。这个 Hook 的主要目的是为 React 组件提供一个便捷的接口,用于执行与特定主题(Topic)相关的各种消息操作。它封装了调用 Redux Thunks (`messageThunk.ts`) 和 Actions (`newMessage.ts`, `messageBlock.ts`) 的逻辑,简化了组件与消息数据交互的代码。
## 核心目标
- **封装**: 将复杂的消息操作逻辑(如删除、重发、重新生成、编辑、翻译等)封装在易于使用的函数中。
- **简化**: 让组件可以直接调用这些操作函数,而无需直接与 Redux `dispatch` 或 Thunks 交互。
- **上下文关联**: 所有操作都与传入的 `topic` 对象相关联,确保操作作用于正确的主题。
## 如何使用
在你的 React 函数组件中,导入并调用 `useMessageOperations` Hook,并传入当前活动的 `Topic` 对象。
```typescript
import React from 'react';
import { useMessageOperations } from '@renderer/hooks/useMessageOperations';
import type { Topic, Message, Assistant, Model } from '@renderer/types';
interface MyComponentProps {
currentTopic: Topic;
currentAssistant: Assistant;
}
function MyComponent({ currentTopic, currentAssistant }: MyComponentProps) {
const {
deleteMessage,
resendMessage,
regenerateAssistantMessage,
appendAssistantResponse,
getTranslationUpdater,
createTopicBranch,
// ... 其他操作函数
} = useMessageOperations(currentTopic);
const handleDelete = (messageId: string) => {
deleteMessage(messageId);
};
const handleResend = (message: Message) => {
resendMessage(message, currentAssistant);
};
const handleAppend = (existingMsg: Message, newModel: Model) => {
appendAssistantResponse(existingMsg, newModel, currentAssistant);
}
// ... 在组件中使用其他操作函数
return (
<div>
{/* Component UI */}
<button onClick={() => handleDelete('some-message-id')}>Delete Message</button>
{/* ... */}
</div>
);
}
```
## 返回值
`useMessageOperations(topic)` Hook 返回一个包含以下函数和值的对象:
- **`deleteMessage(id: string)`**:
- 删除指定 `id` 的单个消息。
- 内部调用 `deleteSingleMessageThunk`。
- **`deleteGroupMessages(askId: string)`**:
- 删除与指定 `askId` 相关联的一组消息(通常是用户提问及其所有助手回答)。
- 内部调用 `deleteMessageGroupThunk`。
- **`editMessage(messageId: string, updates: Partial<Message>)`**:
- 更新指定 `messageId` 的消息的部分属性。
- **注意**: 目前主要用于更新 Redux 状态
- 内部调用 `newMessagesActions.updateMessage`。
- **`resendMessage(message: Message, assistant: Assistant)`**:
- 重新发送指定的用户消息 (`message`),这将触发其所有关联助手响应的重新生成。
- 内部调用 `resendMessageThunk`。
- **`resendUserMessageWithEdit(message: Message, editedContent: string, assistant: Assistant)`**:
- 在用户消息的主要文本块被编辑后,重新发送该消息。
- 会先查找消息的 `MAIN_TEXT` 块 ID,然后调用 `resendUserMessageWithEditThunk`。
- **`clearTopicMessages(_topicId?: string)`**:
- 清除当前主题(或可选的指定 `_topicId`)下的所有消息。
- 内部调用 `clearTopicMessagesThunk`。
- **`createNewContext()`**:
- 发出一个全局事件 (`EVENT_NAMES.NEW_CONTEXT`),通常用于通知 UI 清空显示,准备新的上下文。不直接修改 Redux 状态。
- **`displayCount`**:
- (非操作函数) 从 Redux store 中获取当前的 `displayCount` 值。
- **`pauseMessages()`**:
- 尝试中止当前主题中正在进行的消息生成(状态为 `processing` 或 `pending`)。
- 通过查找相关的 `askId` 并调用 `abortCompletion` 来实现。
- 同时会 dispatch `setTopicLoading` action 将加载状态设为 `false`。
- **`resumeMessage(message: Message, assistant: Assistant)`**:
- 恢复/重新发送一个用户消息。目前实现为直接调用 `resendMessage`。
- **`regenerateAssistantMessage(message: Message, assistant: Assistant)`**:
- 重新生成指定的**助手**消息 (`message`) 的响应。
- 内部调用 `regenerateAssistantResponseThunk`。
- **`appendAssistantResponse(existingAssistantMessage: Message, newModel: Model, assistant: Assistant)`**:
- 针对 `existingAssistantMessage` 所回复的**同一用户提问**,使用 `newModel` 追加一个新的助手响应。
- 内部调用 `appendAssistantResponseThunk`。
- **`getTranslationUpdater(messageId: string, targetLanguage: string, sourceBlockId?: string, sourceLanguage?: string)`**:
- **用途**: 获取一个用于逐步更新翻译块内容的函数。
- **流程**:
1. 内部调用 `initiateTranslationThunk` 来创建或获取一个 `TRANSLATION` 类型的 `MessageBlock`,并获取其 `blockId`。
2. 返回一个**异步更新函数**。
- **返回的更新函数 `(accumulatedText: string, isComplete?: boolean) => void`**:
- 接收累积的翻译文本和完成状态。
- 调用 `updateOneBlock` 更新 Redux 中的翻译块内容和状态 (`STREAMING` 或 `SUCCESS`)。
- 调用 `throttledBlockDbUpdate` 将更新(节流地)保存到数据库。
- 如果初始化失败(Thunk 返回 `undefined`),则此函数返回 `null`。
- **`createTopicBranch(sourceTopicId: string, branchPointIndex: number, newTopic: Topic)`**:
- 创建一个主题分支,将 `sourceTopicId` 主题中 `branchPointIndex` 索引之前的消息克隆到 `newTopic` 中。
- **注意**: `newTopic` 对象必须是调用此函数**之前**已经创建并添加到 Redux 和数据库中的。
- 内部调用 `cloneMessagesToNewTopicThunk`。
## 依赖
- **`topic: Topic`**: 必须传入当前操作上下文的主题对象。Hook 返回的操作函数将始终作用于这个主题的 `topic.id`。
- **Redux `dispatch`**: Hook 内部使用 `useAppDispatch` 获取 `dispatch` 函数来调用 actions 和 thunks。
## 相关 Hooks
在同一文件中还定义了两个辅助 Hook:
- **`useTopicMessages(topic: Topic)`**:
- 使用 `selectMessagesForTopic` selector 来获取并返回指定主题的消息列表。
- **`useTopicLoading(topic: Topic)`**:
- 使用 `selectNewTopicLoading` selector 来获取并返回指定主题的加载状态。
这些 Hook 可以与 `useMessageOperations` 结合使用,方便地在组件中获取消息数据、加载状态,并执行相关操作。
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/how-to-write-middlewares.md
|
CherryHQ__cherry-studio/docs/technical/how-to-write-middlewares.md
| 13,069 | 1,758,202,168 |
en
|
# 如何为 AI Provider 编写中间件
本文档旨在指导开发者如何为我们的 AI Provider 框架创建和集成自定义中间件。中间件提供了一种强大而灵活的方式来增强、修改或观察 Provider 方法的调用过程,例如日志记录、缓存、请求/响应转换、错误处理等。
## 架构概览
我们的中间件架构借鉴了 Redux 的三段式设计,并结合了 JavaScript Proxy 来动态地将中间件应用于 Provider 的方法。
- **Proxy**: 拦截对 Provider 方法的调用,并将调用引导至中间件链。
- **中间件链**: 一系列按顺序执行的中间件函数。每个中间件都可以处理请求/响应,然后将控制权传递给链中的下一个中间件,或者在某些情况下提前终止链。
- **上下文 (Context)**: 一个在中间件之间传递的对象,携带了关于当前调用的信息(如方法名、原始参数、Provider 实例、以及中间件自定义的数据)。
## 中间件的类型
目前主要支持两种类型的中间件,它们共享相似的结构但针对不同的场景:
1. **`CompletionsMiddleware`**: 专门为 `completions` 方法设计。这是最常用的中间件类型,因为它允许对 AI 模型的核心聊天/文本生成功能进行精细控制。
2. **`ProviderMethodMiddleware`**: 通用中间件,可以应用于 Provider 上的任何其他方法(例如,`translate`, `summarize` 等,如果这些方法也通过中间件系统包装)。
## 编写一个 `CompletionsMiddleware`
`CompletionsMiddleware` 的基本签名(TypeScript 类型)如下:
```typescript
import { AiProviderMiddlewareCompletionsContext, CompletionsParams, MiddlewareAPI } from './AiProviderMiddlewareTypes' // 假设类型定义文件路径
export type CompletionsMiddleware = (
api: MiddlewareAPI<AiProviderMiddlewareCompletionsContext, [CompletionsParams]>
) => (
next: (context: AiProviderMiddlewareCompletionsContext, params: CompletionsParams) => Promise<any> // next 返回 Promise<any> 代表原始SDK响应或下游中间件的结果
) => (context: AiProviderMiddlewareCompletionsContext, params: CompletionsParams) => Promise<void> // 最内层函数通常返回 Promise<void>,因为结果通过 onChunk 或 context 副作用传递
```
让我们分解这个三段式结构:
1. **第一层函数 `(api) => { ... }`**:
- 接收一个 `api` 对象。
- `api` 对象提供了以下方法:
- `api.getContext()`: 获取当前调用的上下文对象 (`AiProviderMiddlewareCompletionsContext`)。
- `api.getOriginalArgs()`: 获取传递给 `completions` 方法的原始参数数组 (即 `[CompletionsParams]`)。
- `api.getProviderId()`: 获取当前 Provider 的 ID。
- `api.getProviderInstance()`: 获取原始的 Provider 实例。
- 此函数通常用于进行一次性的设置或获取所需的服务/配置。它返回第二层函数。
2. **第二层函数 `(next) => { ... }`**:
- 接收一个 `next` 函数。
- `next` 函数代表了中间件链中的下一个环节。调用 `next(context, params)` 会将控制权传递给下一个中间件,或者如果当前中间件是链中的最后一个,则会调用核心的 Provider 方法逻辑 (例如,实际的 SDK 调用)。
- `next` 函数接收当前的 `context` 和 `params` (这些可能已被上游中间件修改)。
- **重要的是**:`next` 的返回类型通常是 `Promise<any>`。对于 `completions` 方法,如果 `next` 调用了实际的 SDK,它将返回原始的 SDK 响应(例如,OpenAI 的流对象或 JSON 对象)。你需要处理这个响应。
- 此函数返回第三层(也是最核心的)函数。
3. **第三层函数 `(context, params) => { ... }`**:
- 这是执行中间件主要逻辑的地方。
- 它接收当前的 `context` (`AiProviderMiddlewareCompletionsContext`) 和 `params` (`CompletionsParams`)。
- 在此函数中,你可以:
- **在调用 `next` 之前**:
- 读取或修改 `params`。例如,添加默认参数、转换消息格式。
- 读取或修改 `context`。例如,设置一个时间戳用于后续计算延迟。
- 执行某些检查,如果不满足条件,可以不调用 `next` 而直接返回或抛出错误(例如,参数校验失败)。
- **调用 `await next(context, params)`**:
- 这是将控制权传递给下游的关键步骤。
- `next` 的返回值是原始的 SDK 响应或下游中间件的结果,你需要根据情况处理它(例如,如果是流,则开始消费流)。
- **在调用 `next` 之后**:
- 处理 `next` 的返回结果。例如,如果 `next` 返回了一个流,你可以在这里开始迭代处理这个流,并通过 `context.onChunk` 发送数据块。
- 基于 `context` 的变化或 `next` 的结果执行进一步操作。例如,计算总耗时、记录日志。
- 修改最终结果(尽管对于 `completions`,结果通常通过 `onChunk` 副作用发出)。
### 示例:一个简单的日志中间件
```typescript
import {
AiProviderMiddlewareCompletionsContext,
CompletionsParams,
MiddlewareAPI,
OnChunkFunction // 假设 OnChunkFunction 类型被导出
} from './AiProviderMiddlewareTypes' // 调整路径
import { ChunkType } from '@renderer/types' // 调整路径
export const createSimpleLoggingMiddleware = (): CompletionsMiddleware => {
return (api: MiddlewareAPI<AiProviderMiddlewareCompletionsContext, [CompletionsParams]>) => {
return (next: (context: AiProviderMiddlewareCompletionsContext, params: CompletionsParams) => Promise<any>) => {
return async (context: AiProviderMiddlewareCompletionsContext, params: CompletionsParams): Promise<void> => {
const startTime = Date.now()
// 从 context 中获取 onChunk (它最初来自 params.onChunk)
const onChunk = context.onChunk
logger.debug(
`[LoggingMiddleware] Request for ${context.methodName} with params:`,
params.messages?.[params.messages.length - 1]?.content
)
try {
// 调用下一个中间件或核心逻辑
// `rawSdkResponse` 是来自下游的原始响应 (例如 OpenAIStream 或 ChatCompletion 对象)
const rawSdkResponse = await next(context, params)
// 此处简单示例不处理 rawSdkResponse,假设下游中间件 (如 StreamingResponseHandler)
// 会处理它并通过 onChunk 发送数据。
// 如果这个日志中间件在 StreamingResponseHandler 之后,那么流已经被处理。
// 如果在之前,那么它需要自己处理 rawSdkResponse 或确保下游会处理。
const duration = Date.now() - startTime
logger.debug(`[LoggingMiddleware] Request for ${context.methodName} completed in ${duration}ms.`)
// 假设下游已经通过 onChunk 发送了所有数据。
// 如果这个中间件是链的末端,并且需要确保 BLOCK_COMPLETE 被发送,
// 它可能需要更复杂的逻辑来跟踪何时所有数据都已发送。
} catch (error) {
const duration = Date.now() - startTime
logger.error(`[LoggingMiddleware] Request for ${context.methodName} failed after ${duration}ms:`, error)
// 如果 onChunk 可用,可以尝试发送一个错误块
if (onChunk) {
onChunk({
type: ChunkType.ERROR,
error: { message: (error as Error).message, name: (error as Error).name, stack: (error as Error).stack }
})
// 考虑是否还需要发送 BLOCK_COMPLETE 来结束流
onChunk({ type: ChunkType.BLOCK_COMPLETE, response: {} })
}
throw error // 重新抛出错误,以便上层或全局错误处理器可以捕获
}
}
}
}
}
```
### `AiProviderMiddlewareCompletionsContext` 的重要性
`AiProviderMiddlewareCompletionsContext` 是在中间件之间传递状态和数据的核心。它通常包含:
- `methodName`: 当前调用的方法名 (总是 `'completions'`)。
- `originalArgs`: 传递给 `completions` 的原始参数数组。
- `providerId`: Provider 的 ID。
- `_providerInstance`: Provider 实例。
- `onChunk`: 从原始 `CompletionsParams` 传入的回调函数,用于流式发送数据块。**所有中间件都应该通过 `context.onChunk` 来发送数据。**
- `messages`, `model`, `assistant`, `mcpTools`: 从原始 `CompletionsParams` 中提取的常用字段,方便访问。
- **自定义字段**: 中间件可以向上下文中添加自定义字段,以供后续中间件使用。例如,一个缓存中间件可能会添加 `context.cacheHit = true`。
**关键**: 当你在中间件中修改 `params` 或 `context` 时,这些修改会向下游中间件传播(如果它们在 `next` 调用之前修改)。
### 中间件的顺序
中间件的执行顺序非常重要。它们在 `AiProviderMiddlewareConfig` 的数组中定义的顺序就是它们的执行顺序。
- 请求首先通过第一个中间件,然后是第二个,依此类推。
- 响应(或 `next` 的调用结果)则以相反的顺序"冒泡"回来。
例如,如果链是 `[AuthMiddleware, CacheMiddleware, LoggingMiddleware]`:
1. `AuthMiddleware` 先执行其 "调用 `next` 之前" 的逻辑。
2. 然后 `CacheMiddleware` 执行其 "调用 `next` 之前" 的逻辑。
3. 然后 `LoggingMiddleware` 执行其 "调用 `next` 之前" 的逻辑。
4. 核心SDK调用(或链的末端)。
5. `LoggingMiddleware` 先接收到结果,执行其 "调用 `next` 之后" 的逻辑。
6. 然后 `CacheMiddleware` 接收到结果(可能已被 LoggingMiddleware 修改的上下文),执行其 "调用 `next` 之后" 的逻辑(例如,存储结果)。
7. 最后 `AuthMiddleware` 接收到结果,执行其 "调用 `next` 之后" 的逻辑。
### 注册中间件
中间件在 `src/renderer/src/providers/middleware/register.ts` (或其他类似的配置文件) 中进行注册。
```typescript
// register.ts
import { AiProviderMiddlewareConfig } from './AiProviderMiddlewareTypes'
import { createSimpleLoggingMiddleware } from './common/SimpleLoggingMiddleware' // 假设你创建了这个文件
import { createCompletionsLoggingMiddleware } from './common/CompletionsLoggingMiddleware' // 已有的
const middlewareConfig: AiProviderMiddlewareConfig = {
completions: [
createSimpleLoggingMiddleware(), // 你新加的中间件
createCompletionsLoggingMiddleware() // 已有的日志中间件
// ... 其他 completions 中间件
],
methods: {
// translate: [createGenericLoggingMiddleware()],
// ... 其他方法的中间件
}
}
export default middlewareConfig
```
### 最佳实践
1. **单一职责**: 每个中间件应专注于一个特定的功能(例如,日志、缓存、转换特定数据)。
2. **无副作用 (尽可能)**: 除了通过 `context` 或 `onChunk` 明确的副作用外,尽量避免修改全局状态或产生其他隐蔽的副作用。
3. **错误处理**:
- 在中间件内部使用 `try...catch` 来处理可能发生的错误。
- 决定是自行处理错误(例如,通过 `onChunk` 发送错误块)还是将错误重新抛出给上游。
- 如果重新抛出,确保错误对象包含足够的信息。
4. **性能考虑**: 中间件会增加请求处理的开销。避免在中间件中执行非常耗时的同步操作。对于IO密集型操作,确保它们是异步的。
5. **可配置性**: 使中间件的行为可通过参数或配置进行调整。例如,日志中间件可以接受一个日志级别参数。
6. **上下文管理**:
- 谨慎地向 `context` 添加数据。避免污染 `context` 或添加过大的对象。
- 明确你添加到 `context` 的字段的用途和生命周期。
7. **`next` 的调用**:
- 除非你有充分的理由提前终止请求(例如,缓存命中、授权失败),否则**总是确保调用 `await next(context, params)`**。否则,下游的中间件和核心逻辑将不会执行。
- 理解 `next` 的返回值并正确处理它,特别是当它是一个流时。你需要负责消费这个流或将其传递给另一个能够消费它的组件/中间件。
8. **命名清晰**: 给你的中间件和它们创建的函数起描述性的名字。
9. **文档和注释**: 对复杂的中间件逻辑添加注释,解释其工作原理和目的。
### 调试技巧
- 在中间件的关键点使用 `logger.debug` 或调试器来检查 `params`、`context` 的状态以及 `next` 的返回值。
- 暂时简化中间件链,只保留你正在调试的中间件和最简单的核心逻辑,以隔离问题。
- 编写单元测试来独立验证每个中间件的行为。
通过遵循这些指南,你应该能够有效地为我们的系统创建强大且可维护的中间件。如果你有任何疑问或需要进一步的帮助,请咨询团队。
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/how-to-i18n-en.md
|
CherryHQ__cherry-studio/docs/technical/how-to-i18n-en.md
| 5,398 | 1,758,202,168 |
en
|
# How to Do i18n Gracefully
> [!WARNING]
> This document is machine translated from Chinese. While we strive for accuracy, there may be some imperfections in the translation.
## Enhance Development Experience with the i18n Ally Plugin
i18n Ally is a powerful VSCode extension that provides real-time feedback during development, helping developers detect missing or incorrect translations earlier.
The plugin has already been configured in the project — simply install it to get started.
### Advantages During Development
- **Real-time Preview**: Translated texts are displayed directly in the editor.
- **Error Detection**: Automatically tracks and highlights missing translations or unused keys.
- **Quick Navigation**: Jump to key definitions with Ctrl/Cmd + click.
- **Auto-completion**: Provides suggestions when typing i18n keys.
### Demo



## i18n Conventions
### **Avoid Flat Structure at All Costs**
Never use flat structures like `"add.button.tip": "Add"`. Instead, adopt a clear nested structure:
```json
// Wrong - Flat structure
{
"add.button.tip": "Add",
"delete.button.tip": "Delete"
}
// Correct - Nested structure
{
"add": {
"button": {
"tip": "Add"
}
},
"delete": {
"button": {
"tip": "Delete"
}
}
}
```
#### Why Use Nested Structure?
1. **Natural Grouping**: Related texts are logically grouped by their context through object nesting.
2. **Plugin Requirement**: Tools like i18n Ally require either flat or nested format to properly analyze translation files.
### **Avoid Template Strings in `t()`**
**We strongly advise against using template strings for dynamic interpolation.** While convenient in general JavaScript development, they cause several issues in i18n scenarios.
#### 1. **Plugin Cannot Track Dynamic Keys**
Tools like i18n Ally cannot parse dynamic content within template strings, resulting in:
- No real-time preview
- No detection of missing translations
- No navigation to key definitions
```javascript
// Not recommended - Plugin cannot resolve
const message = t(`fruits.${fruit}`)
```
#### 2. **No Real-time Rendering in Editor**
Template strings appear as raw code instead of the final translated text in IDEs, degrading the development experience.
#### 3. **Harder to Maintain**
Since the plugin cannot track such usages, developers must manually verify the existence of corresponding keys in language files.
### Recommended Approach
To avoid missing keys, all dynamically translated texts should first maintain a `FooKeyMap`, then retrieve the translation text through a function.
For example:
```ts
// src/renderer/src/i18n/label.ts
const themeModeKeyMap = {
dark: 'settings.theme.dark',
light: 'settings.theme.light',
system: 'settings.theme.system'
} as const
export const getThemeModeLabel = (key: string): string => {
return themeModeKeyMap[key] ? t(themeModeKeyMap[key]) : key
}
```
By avoiding template strings, you gain better developer experience, more reliable translation checks, and a more maintainable codebase.
## Automation Scripts
The project includes several scripts to automate i18n-related tasks:
### `check:i18n` - Validate i18n Structure
This script checks:
- Whether all language files use nested structure
- For missing or unused keys
- Whether keys are properly sorted
```bash
yarn check:i18n
```
### `sync:i18n` - Synchronize JSON Structure and Sort Order
This script uses `zh-cn.json` as the source of truth to sync structure across all language files, including:
1. Adding missing keys, with placeholder `[to be translated]`
2. Removing obsolete keys
3. Sorting keys automatically
```bash
yarn sync:i18n
```
### `auto:i18n` - Automatically Translate Pending Texts
This script fills in texts marked as `[to be translated]` using machine translation.
Typically, after adding new texts in `zh-cn.json`, run `sync:i18n`, then `auto:i18n` to complete translations.
Before using this script, set the required environment variables:
```bash
API_KEY="sk-xxx"
BASE_URL="https://dashscope.aliyuncs.com/compatible-mode/v1/"
MODEL="qwen-plus-latest"
```
Alternatively, add these variables directly to your `.env` file.
```bash
yarn auto:i18n
```
### `update:i18n` - Object-level Translation Update
Updates translations in language files under `src/renderer/src/i18n/translate` at the object level, preserving existing translations and only updating new content.
**Not recommended** — prefer `auto:i18n` for translation tasks.
```bash
yarn update:i18n
```
### Workflow
1. During development, first add the required text in `zh-cn.json`
2. Confirm it displays correctly in the Chinese environment
3. Run `yarn sync:i18n` to propagate the keys to other language files
4. Run `yarn auto:i18n` to perform machine translation
5. Grab a coffee and let the magic happen!
## Best Practices
1. **Use Chinese as Source Language**: All development starts in Chinese, then translates to other languages.
2. **Run Check Script Before Commit**: Use `yarn check:i18n` to catch i18n issues early.
3. **Translate in Small Increments**: Avoid accumulating a large backlog of untranslated content.
4. **Keep Keys Semantically Clear**: Keys should clearly express their purpose, e.g., `user.profile.avatar.upload.error`
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/how-to-use-logger-en.md
|
CherryHQ__cherry-studio/docs/technical/how-to-use-logger-en.md
| 13,295 | 1,758,202,168 |
en
|
# How to use the LoggerService
This is a developer document on how to use the logger.
CherryStudio uses a unified logging service to print and record logs. **Unless there is a special reason, do not use `console.xxx` to print logs**.
The following are detailed instructions.
## Usage in the `main` process
### Importing
```typescript
import { loggerService } from '@logger'
```
### Setting module information (Required by convention)
After the import statements, set it up as follows:
```typescript
const logger = loggerService.withContext('moduleName')
```
- `moduleName` is the name of the current file's module. It can be named after the filename, main class name, main function name, etc. The principle is to be clear and understandable.
- `moduleName` will be printed in the terminal and will also be present in the file log, making it easier to filter.
### Setting `CONTEXT` information (Optional)
In `withContext`, you can also set other `CONTEXT` information:
```typescript
const logger = loggerService.withContext('moduleName', CONTEXT)
```
- `CONTEXT` is an object of the form `{ key: value, ... }`.
- `CONTEXT` information will not be printed in the terminal, but it will be recorded in the file log, making it easier to filter.
### Logging
In your code, you can call `logger` at any time to record logs. The supported levels are: `error`, `warn`, `info`, `verbose`, `debug`, and `silly`.
For the meaning of each level, please refer to the subsequent sections.
The following are the supported parameters for logging (using `logger.LEVEL` as an example, where `LEVEL` represents one of the levels mentioned above):
```typescript
logger.LEVEL(message)
logger.LEVEL(message, CONTEXT)
logger.LEVEL(message, error)
logger.LEVEL(message, error, CONTEXT)
```
**Only the four calling methods above are supported**.
| Parameter | Type | Description |
| --------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `message` | `string` | Required. This is the core field of the log, containing the main content to be recorded. |
| `CONTEXT` | `object` | Optional. Additional information to be recorded in the log file. It is recommended to use the `{ key: value, ...}` format. |
| `error` | `Error` | Optional. The error stack trace will also be printed.<br />Note that the `error` caught by `catch(error)` is of the `unknown` type. According to TypeScript best practices, you should first use `instanceof` for type checking. If you are certain it is an `Error` type, you can also use a type assertion like `as Error`. |
#### Recording non-`object` type context information
```typescript
const foo = getFoo()
logger.debug(`foo ${foo}`)
```
### Log Levels
- In the development environment, all log levels are printed to the terminal and recorded in the file log.
- In the production environment, the default log level is `info`. Logs are only recorded to the file and are not printed to the terminal.
Changing the log level:
- You can change the log level with `logger.setLevel('newLevel')`.
- `logger.resetLevel()` resets it to the default level.
- `logger.getLevel()` gets the current log level.
**Note:** Changing the log level has a global effect. Please do not change it arbitrarily in your code unless you are very clear about what you are doing.
## Usage in the `renderer` process
Usage in the `renderer` process for _importing_, _setting module information_, and _setting context information_ is **exactly the same** as in the `main` process.
The following section focuses on the differences.
### `initWindowSource`
In the `renderer` process, there are different `window`s. Before starting to use the `logger`, we must set the `window` information:
```typescript
loggerService.initWindowSource('windowName')
```
As a rule, we will set this in the `window`'s `entryPoint.tsx`. This ensures that `windowName` is set before it's used.
- An error will be thrown if `windowName` is not set, and the `logger` will not work.
- `windowName` can only be set once; subsequent attempts to set it will have no effect.
- `windowName` will not be printed in the `devTool`'s `console`, but it will be recorded in the `main` process terminal and the file log.
- `initWindowSource` returns the LoggerService instance, allowing for method chaining.
### Log Levels
- In the development environment, all log levels are printed to the `devTool`'s `console` by default.
- In the production environment, the default log level is `info`, and logs are printed to the `devTool`'s `console`.
- In both development and production environments, `warn` and `error` level logs are, by default, transmitted to the `main` process and recorded in the file log.
- In the development environment, the `main` process terminal will also print the logs transmitted from the renderer.
#### Changing the Log Level
Same as in the `main` process, you can manage the log level using `setLevel('level')`, `resetLevel()`, and `getLevel()`.
Similarly, changing the log level is a global adjustment.
#### Changing the Level Transmitted to `main`
Logs from the `renderer` are sent to `main` to be managed and recorded to a file centrally (according to `main`'s file logging level). By default, only `warn` and `error` level logs are transmitted to `main`.
There are two ways to change the log level for transmission to `main`:
##### Global Change
The following methods can be used to set, reset, and get the log level for transmission to `main`, respectively.
```typescript
logger.setLogToMainLevel('newLevel')
logger.resetLogToMainLevel()
logger.getLogToMainLevel()
```
**Note:** This method has a global effect. Please do not change it arbitrarily in your code unless you are very clear about what you are doing.
##### Per-log Change
By adding `{ logToMain: true }` at the end of the log call, you can force a single log entry to be transmitted to `main` (bypassing the global log level restriction), for example:
```typescript
logger.info('message', { logToMain: true })
```
## About `worker` Threads
- Currently, logging is not supported for workers in the `main` process.
- Logging is supported for workers started in the `renderer` process, but currently these logs are not sent to `main` for recording.
### How to Use Logging in `renderer` Workers
Since worker threads are independent, using LoggerService in them is equivalent to using it in a new `renderer` window. Therefore, you must first call `initWindowSource`.
If the worker is relatively simple (just one file), you can also use method chaining directly:
```typescript
const logger = loggerService.initWindowSource('Worker').withContext('LetsWork')
```
## Filtering Logs with Environment Variables
In a development environment, you can define environment variables to filter displayed logs by level and module. This helps developers focus on their specific logs and improves development efficiency.
Environment variables can be set in the terminal or defined in the `.env` file in the project's root directory. The available variables are as follows:
| Variable Name | Description |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `CSLOGGER_MAIN_LEVEL` | Log level for the `main` process. Logs below this level will not be displayed. |
| `CSLOGGER_MAIN_SHOW_MODULES` | Filters log modules for the `main` process. Use a comma (`,`) to separate modules. The filter is case-sensitive. Only logs from modules in this list will be displayed. |
| `CSLOGGER_RENDERER_LEVEL` | Log level for the `renderer` process. Logs below this level will not be displayed. |
| `CSLOGGER_RENDERER_SHOW_MODULES` | Filters log modules for the `renderer` process. Use a comma (`,`) to separate modules. The filter is case-sensitive. Only logs from modules in this list will be displayed. |
Example:
```bash
CSLOGGER_MAIN_LEVEL=verbose
CSLOGGER_MAIN_SHOW_MODULES=MCPService,SelectionService
```
Note:
- Environment variables are only effective in the development environment.
- These variables only affect the logs displayed in the terminal or DevTools. They do not affect file logging or the `logToMain` recording logic.
## Log Level Usage Guidelines
There are many log levels. The following are the guidelines that should be followed in CherryStudio for when to use each level:
(Arranged from highest to lowest log level)
| Log Level | Core Definition & Use case | Example |
| :------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`error`** | **Critical error causing the program to crash or core functionality to become unusable.** <br> This is the highest-priority log, usually requiring immediate reporting or user notification. | - Main or renderer process crash. <br> - Failure to read/write critical user data files (e.g., database, configuration files), preventing the application from running. <br> - All unhandled exceptions. |
| **`warn`** | **Potential issue or unexpected situation that does not affect the program's core functionality.** <br> The program can recover or use a fallback. | - Configuration file `settings.json` is missing; started with default settings. <br> - Auto-update check failed, but does not affect the use of the current version. <br> - A non-essential plugin failed to load. |
| **`info`** | **Records application lifecycle events and key user actions.** <br> This is the default level that should be recorded in a production release to trace the user's main operational path. | - Application start, exit. <br> - User successfully opens/saves a file. <br> - Main window created/closed. <br> - Starting an important task (e.g., "Start video export"). |
| **`verbose`** | **More detailed flow information than `info`, used for tracing specific features.** <br> Enabled when diagnosing issues with a specific feature to help understand the internal execution flow. | - Loading `Toolbar` module. <br> - IPC message `open-file-dialog` sent from the renderer process. <br> - Applying filter 'Sepia' to the image. |
| **`debug`** | **Detailed diagnostic information used during development and debugging.** <br> **Must not be enabled by default in production releases**, as it may contain sensitive data and impact performance. | - Parameters for function `renderImage`: `{ width: 800, ... }`. <br> - Specific data content received by IPC message `save-file`. <br> - Details of Redux/Vuex state changes in the renderer process. |
| **`silly`** | **The most detailed, low-level information, used only for extreme debugging.** <br> Rarely used in regular development; only for solving very difficult problems. | - Real-time mouse coordinates `(x: 150, y: 320)`. <br> - Size of each data chunk when reading a file. <br> - Time taken for each rendered frame. |
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/db.settings.md
|
CherryHQ__cherry-studio/docs/technical/db.settings.md
| 527 | 1,758,202,168 |
en
|
# 数据库设置字段
此文档包含部分字段的数据类型说明。
## 字段
| 字段名 | 类型 | 说明 |
| ------------------------------ | ------------------------------ | ------------ |
| `translate:target:language` | `LanguageCode` | 翻译目标语言 |
| `translate:source:language` | `LanguageCode` | 翻译源语言 |
| `translate:bidirectional:pair` | `[LanguageCode, LanguageCode]` | 双向翻译对 |
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/ImagePreview-en.md
|
CherryHQ__cherry-studio/docs/technical/ImagePreview-en.md
| 5,564 | 1,758,202,168 |
en
|
# Image Preview Components
## Overview
Image Preview Components are a set of specialized components in Cherry Studio for rendering and displaying various diagram and image formats. They provide a consistent user experience across different preview types with shared functionality for loading states, error handling, and interactive controls.
## Supported Formats
- **Mermaid**: Interactive diagrams and flowcharts
- **PlantUML**: UML diagrams and system architecture
- **SVG**: Scalable vector graphics
- **Graphviz/DOT**: Graph visualization and network diagrams
## Architecture
```mermaid
graph TD
A[MermaidPreview] --> D[ImagePreviewLayout]
B[PlantUmlPreview] --> D
C[SvgPreview] --> D
E[GraphvizPreview] --> D
D --> F[ImageToolbar]
D --> G[useDebouncedRender]
F --> H[Pan Controls]
F --> I[Zoom Controls]
F --> J[Reset Function]
F --> K[Dialog Control]
G --> L[Debounced Rendering]
G --> M[Error Handling]
G --> N[Loading State]
G --> O[Dependency Management]
```
## Core Components
### ImagePreviewLayout
A common layout wrapper that provides the foundation for all image preview components.
**Features:**
- **Loading State Management**: Shows loading spinner during rendering
- **Error Display**: Displays error messages when rendering fails
- **Toolbar Integration**: Conditionally renders ImageToolbar when enabled
- **Container Management**: Wraps preview content with consistent styling
- **Responsive Design**: Adapts to different container sizes
**Props:**
- `children`: The preview content to be displayed
- `loading`: Boolean indicating if content is being rendered
- `error`: Error message to display if rendering fails
- `enableToolbar`: Whether to show the interactive toolbar
- `imageRef`: Reference to the container element for image manipulation
### ImageToolbar
Interactive toolbar component providing image manipulation controls.
**Features:**
- **Pan Controls**: 4-directional pan buttons (up, down, left, right)
- **Zoom Controls**: Zoom in/out functionality with configurable increments
- **Reset Function**: Restore original pan and zoom state
- **Dialog Control**: Open preview in expanded dialog view
- **Accessible Design**: Full keyboard navigation and screen reader support
**Layout:**
- 3x3 grid layout positioned at bottom-right of preview
- Responsive button sizing
- Tooltip support for all controls
### useDebouncedRender Hook
A specialized React hook for managing preview rendering with performance optimizations.
**Features:**
- **Debounced Rendering**: Prevents excessive re-renders during rapid content changes (default 300ms delay)
- **Automatic Dependency Management**: Handles dependencies for render and condition functions
- **Error Handling**: Catches and manages rendering errors with detailed error messages
- **Loading State**: Tracks rendering progress with automatic state updates
- **Conditional Rendering**: Supports pre-render condition checks
- **Manual Controls**: Provides trigger, cancel, and state management functions
**API:**
```typescript
const { containerRef, error, isLoading, triggerRender, cancelRender, clearError, setLoading } = useDebouncedRender(
value,
renderFunction,
options
)
```
**Options:**
- `debounceDelay`: Customize debounce timing
- `shouldRender`: Function for conditional rendering logic
## Component Implementations
### MermaidPreview
Renders Mermaid diagrams with special handling for visibility detection.
**Special Features:**
- Syntax validation before rendering
- Visibility detection to handle collapsed containers
- SVG coordinate fixing for edge cases
- Integration with mermaid.js library
### PlantUmlPreview
Renders PlantUML diagrams using the online PlantUML server.
**Special Features:**
- Network error handling and retry logic
- Diagram encoding using deflate compression
- Support for light/dark themes
- Server status monitoring
### SvgPreview
Renders SVG content using Shadow DOM for isolation.
**Special Features:**
- Shadow DOM rendering for style isolation
- Direct SVG content injection
- Minimal processing overhead
- Cross-browser compatibility
### GraphvizPreview
Renders Graphviz/DOT diagrams using the viz.js library.
**Special Features:**
- Client-side rendering with viz.js
- Lazy loading of viz.js library
- SVG element generation
- Memory-efficient processing
## Shared Functionality
### Error Handling
All preview components provide consistent error handling:
- Network errors (connection failures)
- Syntax errors (invalid diagram code)
- Server errors (external service failures)
- Rendering errors (library failures)
### Loading States
Standardized loading indicators across all components:
- Spinner animation during processing
- Progress feedback for long operations
- Smooth transitions between states
### Interactive Controls
Common interaction patterns:
- Pan and zoom functionality
- Reset to original view
- Full-screen dialog mode
- Keyboard accessibility
### Performance Optimizations
- Debounced rendering to prevent excessive updates
- Lazy loading of heavy libraries
- Memory management for large diagrams
- Efficient re-rendering strategies
## Integration with CodeBlockView
Image Preview Components integrate seamlessly with CodeBlockView:
- Automatic format detection based on language tags
- Consistent toolbar integration
- Shared state management
- Responsive layout adaptation
For more information about the overall CodeBlockView architecture, see [CodeBlockView Documentation](./CodeBlockView-en.md).
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/ImagePreview-zh.md
|
CherryHQ__cherry-studio/docs/technical/ImagePreview-zh.md
| 4,849 | 1,758,202,168 |
en
|
# 图像预览组件
## 概述
图像预览组件是 Cherry Studio 中用于渲染和显示各种图表和图像格式的专用组件集合。它们为不同预览类型提供一致的用户体验,具有共享的加载状态、错误处理和交互控制功能。
## 支持格式
- **Mermaid**: 交互式图表和流程图
- **PlantUML**: UML 图表和系统架构
- **SVG**: 可缩放矢量图形
- **Graphviz/DOT**: 图形可视化和网络图表
## 架构
```mermaid
graph TD
A[MermaidPreview] --> D[ImagePreviewLayout]
B[PlantUmlPreview] --> D
C[SvgPreview] --> D
E[GraphvizPreview] --> D
D --> F[ImageToolbar]
D --> G[useDebouncedRender]
F --> H[平移控制]
F --> I[缩放控制]
F --> J[重置功能]
F --> K[对话框控制]
G --> L[防抖渲染]
G --> M[错误处理]
G --> N[加载状态]
G --> O[依赖管理]
```
## 核心组件
### ImagePreviewLayout 图像预览布局
为所有图像预览组件提供基础的通用布局包装器。
**功能特性:**
- **加载状态管理**: 在渲染期间显示加载动画
- **错误显示**: 渲染失败时显示错误信息
- **工具栏集成**: 启用时有条件地渲染 ImageToolbar
- **容器管理**: 使用一致的样式包装预览内容
- **响应式设计**: 适应不同的容器尺寸
**属性:**
- `children`: 要显示的预览内容
- `loading`: 指示内容是否正在渲染的布尔值
- `error`: 渲染失败时显示的错误信息
- `enableToolbar`: 是否显示交互式工具栏
- `imageRef`: 用于图像操作的容器元素引用
### ImageToolbar 图像工具栏
提供图像操作控制的交互式工具栏组件。
**功能特性:**
- **平移控制**: 4方向平移按钮(上、下、左、右)
- **缩放控制**: 放大/缩小功能,支持可配置的增量
- **重置功能**: 恢复原始平移和缩放状态
- **对话框控制**: 在展开对话框中打开预览
- **无障碍设计**: 完整的键盘导航和屏幕阅读器支持
**布局:**
- 3x3 网格布局,位于预览右下角
- 响应式按钮尺寸
- 所有控件的工具提示支持
### useDebouncedRender Hook 防抖渲染钩子
用于管理预览渲染的专用 React Hook,具有性能优化功能。
**功能特性:**
- **防抖渲染**: 防止内容快速变化时的过度重新渲染(默认 300ms 延迟)
- **自动依赖管理**: 处理渲染和条件函数的依赖项
- **错误处理**: 捕获和管理渲染错误,提供详细的错误信息
- **加载状态**: 跟踪渲染进度并自动更新状态
- **条件渲染**: 支持预渲染条件检查
- **手动控制**: 提供触发、取消和状态管理功能
**API:**
```typescript
const { containerRef, error, isLoading, triggerRender, cancelRender, clearError, setLoading } = useDebouncedRender(
value,
renderFunction,
options
)
```
**选项:**
- `debounceDelay`: 自定义防抖时间
- `shouldRender`: 条件渲染逻辑函数
## 组件实现
### MermaidPreview Mermaid 预览
渲染 Mermaid 图表,具有可见性检测的特殊处理。
**特殊功能:**
- 渲染前语法验证
- 可见性检测以处理折叠的容器
- 边缘情况的 SVG 坐标修复
- 与 mermaid.js 库集成
### PlantUmlPreview PlantUML 预览
使用在线 PlantUML 服务器渲染 PlantUML 图表。
**特殊功能:**
- 网络错误处理和重试逻辑
- 使用 deflate 压缩的图表编码
- 支持明/暗主题
- 服务器状态监控
### SvgPreview SVG 预览
使用 Shadow DOM 隔离渲染 SVG 内容。
**特殊功能:**
- Shadow DOM 渲染实现样式隔离
- 直接 SVG 内容注入
- 最小化处理开销
- 跨浏览器兼容性
### GraphvizPreview Graphviz 预览
使用 viz.js 库渲染 Graphviz/DOT 图表。
**特殊功能:**
- 使用 viz.js 进行客户端渲染
- viz.js 库的懒加载
- SVG 元素生成
- 内存高效处理
## 共享功能
### 错误处理
所有预览组件提供一致的错误处理:
- 网络错误(连接失败)
- 语法错误(无效的图表代码)
- 服务器错误(外部服务失败)
- 渲染错误(库失败)
### 加载状态
所有组件的标准化加载指示器:
- 处理期间的动画
- 长时间操作的进度反馈
- 状态间的平滑过渡
### 交互控制
通用交互模式:
- 平移和缩放功能
- 重置到原始视图
- 全屏对话框模式
- 键盘无障碍访问
### 性能优化
- 防抖渲染以防止过度更新
- 重型库的懒加载
- 大型图表的内存管理
- 高效的重新渲染策略
## 与 CodeBlockView 的集成
图像预览组件与 CodeBlockView 无缝集成:
- 基于语言标签的自动格式检测
- 一致的工具栏集成
- 共享状态管理
- 响应式布局适应
有关整体 CodeBlockView 架构的更多信息,请参阅 [CodeBlockView 文档](./CodeBlockView-zh.md)。
|
2025-09-24T14:46:58.085215
|
CherryHQ
|
cherry-studio
|
CherryHQ__cherry-studio
|
docs/technical/how-to-use-messageThunk.md
|
CherryHQ__cherry-studio/docs/technical/how-to-use-messageThunk.md
| 7,604 | 1,758,202,168 |
en
|
# messageThunk.ts 使用指南
该文件包含用于管理应用程序中消息流、处理助手交互以及同步 Redux 状态与 IndexedDB 数据库的核心 Thunk Action Creators。主要围绕 `Message` 和 `MessageBlock` 对象进行操作。
## 核心功能
1. **发送/接收消息**: 处理用户消息的发送,触发助手响应,并流式处理返回的数据,将其解析为不同的 `MessageBlock`。
2. **状态管理**: 确保 Redux store 中的消息和消息块状态与 IndexedDB 中的持久化数据保持一致。
3. **消息操作**: 提供删除、重发、重新生成、编辑后重发、追加响应、克隆等消息生命周期管理功能。
4. **Block 处理**: 动态创建、更新和保存各种类型的 `MessageBlock`(文本、思考过程、工具调用、引用、图片、错误、翻译等)。
## 主要 Thunks
以下是一些关键的 Thunk 函数及其用途:
1. **`sendMessage(userMessage, userMessageBlocks, assistant, topicId)`**
- **用途**: 发送一条新的用户消息。
- **流程**:
- 保存用户消息 (`userMessage`) 及其块 (`userMessageBlocks`) 到 Redux 和 DB。
- 检查 `@mentions` 以确定是单模型响应还是多模型响应。
- 创建助手消息(们)的存根 (Stub)。
- 将存根添加到 Redux 和 DB。
- 将核心处理逻辑 `fetchAndProcessAssistantResponseImpl` 添加到该 `topicId` 的队列中以获取实际响应。
- **Block 相关**: 主要处理用户消息的初始 `MessageBlock` 保存。
2. **`fetchAndProcessAssistantResponseImpl(dispatch, getState, topicId, assistant, assistantMessage)`**
- **用途**: (内部函数) 获取并处理单个助手响应的核心逻辑,被 `sendMessage`, `resend...`, `regenerate...`, `append...` 等调用。
- **流程**:
- 设置 Topic 加载状态。
- 准备上下文消息。
- 调用 `fetchChatCompletion` API 服务。
- 使用 `createStreamProcessor` 处理流式响应。
- 通过各种回调 (`onTextChunk`, `onThinkingChunk`, `onToolCallComplete`, `onImageGenerated`, `onError`, `onComplete` 等) 处理不同类型的事件。
- **Block 相关**:
- 根据流事件创建初始 `UNKNOWN` 块。
- 实时创建和更新 `MAIN_TEXT` 和 `THINKING` 块,使用 `throttledBlockUpdate` 和 `throttledBlockDbUpdate` 进行节流更新。
- 创建 `TOOL`, `CITATION`, `IMAGE`, `ERROR` 等类型的块。
- 在事件完成时(如 `onTextComplete`, `onToolCallComplete`)将块状态标记为 `SUCCESS` 或 `ERROR`,并使用 `saveUpdatedBlockToDB` 保存最终状态。
- 使用 `handleBlockTransition` 管理非流式块(如 `TOOL`, `CITATION`)的添加和状态更新。
3. **`loadTopicMessagesThunk(topicId, forceReload)`**
- **用途**: 从数据库加载指定主题的所有消息及其关联的 `MessageBlock`。
- **流程**:
- 从 DB 获取 `Topic` 及其 `messages` 列表。
- 根据消息 ID 列表从 DB 获取所有相关的 `MessageBlock`。
- 使用 `upsertManyBlocks` 将块更新到 Redux。
- 将消息更新到 Redux。
- **Block 相关**: 负责将持久化的 `MessageBlock` 加载到 Redux 状态。
4. **删除 Thunks**
- `deleteSingleMessageThunk(topicId, messageId)`: 删除单个消息及其所有 `MessageBlock`。
- `deleteMessageGroupThunk(topicId, askId)`: 删除一个用户消息及其所有相关的助手响应消息和它们的所有 `MessageBlock`。
- `clearTopicMessagesThunk(topicId)`: 清空主题下的所有消息及其所有 `MessageBlock`。
- **Block 相关**: 从 Redux 和 DB 中移除指定的 `MessageBlock`。
5. **重发/重新生成 Thunks**
- `resendMessageThunk(topicId, userMessageToResend, assistant)`: 重发用户消息。会重置(清空 Block 并标记为 PENDING)所有与该用户消息关联的助手响应,然后重新请求生成。
- `resendUserMessageWithEditThunk(topicId, originalMessage, mainTextBlockId, editedContent, assistant)`: 用户编辑消息内容后重发。先更新用户消息的 `MAIN_TEXT` 块内容,然后调用 `resendMessageThunk`。
- `regenerateAssistantResponseThunk(topicId, assistantMessageToRegenerate, assistant)`: 重新生成单个助手响应。重置该助手消息(清空 Block 并标记为 PENDING),然后重新请求生成。
- **Block 相关**: 删除旧的 `MessageBlock`,并在重新生成过程中创建新的 `MessageBlock`。
6. **`appendAssistantResponseThunk(topicId, existingAssistantMessageId, newModel, assistant)`**
- **用途**: 在已有的对话上下文中,针对同一个用户问题,使用新选择的模型追加一个新的助手响应。
- **流程**:
- 找到现有助手消息以获取原始 `askId`。
- 创建使用 `newModel` 的新助手消息存根(使用相同的 `askId`)。
- 添加新存根到 Redux 和 DB。
- 将 `fetchAndProcessAssistantResponseImpl` 添加到队列以生成新响应。
- **Block 相关**: 为新的助手响应创建全新的 `MessageBlock`。
7. **`cloneMessagesToNewTopicThunk(sourceTopicId, branchPointIndex, newTopic)`**
- **用途**: 将源主题的部分消息(及其 Block)克隆到一个**已存在**的新主题中。
- **流程**:
- 复制指定索引前的消息。
- 为所有克隆的消息和 Block 生成新的 UUID。
- 正确映射克隆消息之间的 `askId` 关系。
- 复制 `MessageBlock` 内容,更新其 `messageId` 指向新的消息 ID。
- 更新文件引用计数(如果 Block 是文件或图片)。
- 将克隆的消息和 Block 保存到新主题的 Redux 状态和 DB 中。
- **Block 相关**: 创建 `MessageBlock` 的副本,并更新其 ID 和 `messageId`。
8. **`initiateTranslationThunk(messageId, topicId, targetLanguage, sourceBlockId?, sourceLanguage?)`**
- **用途**: 为指定消息启动翻译流程,创建一个初始的 `TRANSLATION` 类型的 `MessageBlock`。
- **流程**:
- 创建一个状态为 `STREAMING` 的 `TranslationMessageBlock`。
- 将其添加到 Redux 和 DB。
- 更新原消息的 `blocks` 列表以包含新的翻译块 ID。
- **Block 相关**: 创建并保存一个占位的 `TranslationMessageBlock`。实际翻译内容的获取和填充需要后续步骤。
## 内部机制和注意事项
- **数据库交互**: 通过 `saveMessageAndBlocksToDB`, `updateExistingMessageAndBlocksInDB`, `saveUpdatesToDB`, `saveUpdatedBlockToDB`, `throttledBlockDbUpdate` 等辅助函数与 IndexedDB (`db`) 交互,确保数据持久化。
- **状态同步**: Thunks 负责协调 Redux Store 和 IndexedDB 之间的数据一致性。
- **队列 (`getTopicQueue`)**: 使用 `AsyncQueue` 确保对同一主题的操作(尤其是 API 请求)按顺序执行,避免竞态条件。
- **节流 (`throttle`)**: 对流式响应中频繁的 Block 更新(文本、思考)使用 `lodash.throttle` 优化性能,减少 Redux dispatch 和 DB 写入次数。
- **错误处理**: `fetchAndProcessAssistantResponseImpl` 内的回调函数(特别是 `onError`)处理流处理和 API 调用中可能出现的错误,并创建 `ERROR` 类型的 `MessageBlock`。
开发者在使用这些 Thunks 时,通常需要提供 `dispatch`, `getState` (由 Redux Thunk 中间件注入),以及如 `topicId`, `assistant` 配置对象, 相关的 `Message` 或 `MessageBlock` 对象/ID 等参数。理解每个 Thunk 的职责和它如何影响消息及块的状态至关重要。
|
2025-09-24T14:46:58.085215
|
lapce
|
lapce
|
lapce__lapce
|
README.md
|
lapce__lapce/README.md
| 3,978 | 1,758,620,375 |
en
|
<h1 align="center">
<a href="https://lapce.dev" target="_blank">
<img src="extra/images/logo.png" width=200 height=200/><br>
Lapce
</a>
</h1>
<h4 align="center">Lightning-fast And Powerful Code Editor</h4>
<div align="center">
<a href="https://github.com/lapce/lapce/actions/workflows/ci.yml" target="_blank">
<img src="https://github.com/lapce/lapce/actions/workflows/ci.yml/badge.svg" />
</a>
<a href="https://discord.gg/n8tGJ6Rn6D" target="_blank">
<img src="https://img.shields.io/discord/946858761413328946?logo=discord" />
</a>
<a href="https://docs.lapce.dev" target="_blank">
<img src="https://img.shields.io/static/v1?label=Docs&message=docs.lapce.dev&color=blue" alt="Lapce Docs">
</a>
<a href="https://wiki.mutable.ai/lapce/lapce" target="_blank">
<img src="https://img.shields.io/static/v1?label=Code Wiki&message=Mutable.ai&color=blue" alt="Mutable.ai Auto Wiki">
</a>
</div>
<br/>
Lapce (IPA: /læps/) is written in pure Rust, with a UI in [Floem](https://github.com/lapce/floem). It is designed with [Rope Science](https://xi-editor.io/docs/rope_science_00.html) from the [Xi-Editor](https://github.com/xi-editor/xi-editor), enabling lightning-fast computation, and leverages [wgpu](https://github.com/gfx-rs/wgpu) for rendering. More information about the features of Lapce can be found on the [main website](https://lapce.dev) and user documentation can be found on [GitBook](https://docs.lapce.dev/).

## Features
* Built-in LSP ([Language Server Protocol](https://microsoft.github.io/language-server-protocol/)) support to give you intelligent code features such as: completion, diagnostics and code actions
* Modal editing support as first class citizen (Vim-like, and toggleable)
* Built-in remote development support inspired by [VSCode Remote Development](https://code.visualstudio.com/docs/remote/remote-overview). Enjoy the benefits of a "local" experience, and seamlessly gain the full power of a remote system. We also have [Lapdev](https://lap.dev/) which can help manage your remote dev environments.
* Plugins can be written in programming languages that can compile to the [WASI](https://wasi.dev/) format (C, Rust, [AssemblyScript](https://www.assemblyscript.org/))
* Built-in terminal, so you can execute commands in your workspace, without leaving Lapce.
## Installation
You can find pre-built releases for Windows, Linux and macOS [here](https://github.com/lapce/lapce/releases), or [installing with a package manager](docs/installing-with-package-manager.md).
If you'd like to compile from source, you can find the [guide](docs/building-from-source.md).
## Contributing
<a href="https://ws.lap.dev/#https://github.com/lapce/lapce" target="_blank">
<img src="https://lap.dev/images/open-in-lapdev.svg?version=8" alt="Open in Lapdev">
</a>
[Lapdev](https://lap.dev/), developed by the Lapce team, is a cloud dev env service similar to GitHub Codespaces. By clicking the button above, you'll be taken to a fully set up Lapce dev env where you can browse the code and start developing. All dependencies are pre-installed, so you can get straight to code.
Guidelines for contributing to Lapce can be found in [`CONTRIBUTING.md`](CONTRIBUTING.md).
## Feedback & Contact
The most popular place for Lapce developers and users is on the [Discord server](https://discord.gg/n8tGJ6Rn6D).
Or, join the discussion on [Reddit](https://www.reddit.com/r/lapce/) where we are just getting started.
There is also a [Matrix Space](https://matrix.to/#/#lapce-editor:matrix.org), which is linked to the content from the Discord server.
## License
Lapce is released under the Apache License Version 2, which is an open source license. You may contribute to this project, or use the code as you please as long as you adhere to its conditions. You can find a copy of the license text here: [`LICENSE`](LICENSE).
|
2025-09-24T14:46:58.085215
|
lapce
|
lapce
|
lapce__lapce
|
docs/building-from-source.md
|
lapce__lapce/docs/building-from-source.md
| 2,703 | 1,758,206,896 |
en
|
## Building from source
It is easy to build Lapce from source on a GNU/Linux distribution. Cargo handles the build process, all you need to do, is ensure the correct dependencies are installed.
1. Install the Rust compiler and Cargo using [`rustup.rs`](https://rustup.rs/). If you already have the toolchain, ensure you are using latest Rust version.
2. Install dependencies for your operating system:
#### Ubuntu
```sh
sudo apt install clang libxkbcommon-x11-dev pkg-config libvulkan-dev libwayland-dev xorg-dev libxcb-shape0-dev libxcb-xfixes0-dev
```
#### Fedora
```sh
sudo dnf install clang libxkbcommon-x11-devel libxcb-devel vulkan-loader-devel wayland-devel openssl-devel pkgconf
```
#### Void Linux
```sh
sudo xbps-install -S base-devel clang libxkbcommon-devel vulkan-loader wayland-devel
```
3. Clone this repository (this command will clone to your home directory):
```sh
git clone https://github.com/lapce/lapce.git ~/lapce
```
4. `cd` into the repository, and run the build command with the release flag
```sh
cd ~/lapce
```
```sh
cargo install --path . --bin lapce --profile release-lto --locked
```
> If you use a different distribution, and are having trouble finding appropriate dependencies, let us know in an issue!
Once Lapce is compiled, the executable will be available in `$HOME/.cargo/bin/lapce` and should be available in `PATH` automatically.
## Building using Docker or Podman
Packages available in releases are built using containers based on multi-stage Dockerfiles. To easily orchestrate builds, there is a `docker-bake.hcl` manifest in root of repository that defines all stages and targets.
If you want to build all packages for ubuntu, you can run `RELEASE_TAG_NAME=nightly docker buildx bake ubuntu` (`RELEASE_TAG_NAME` is a required environment variable used to tell what kind of release is being built as well as baking in the version itself).
To scope in to specific distribution version, you can define target with it's version counterpart from matrix, e.g. to build only Ubuntu Focal package, you can run `RELEASE_TAG_NAME=nightly docker buildx bake ubuntu-focal`.
Additionally to building multiple OS versions at the same time, Docker-based builds will also try to cross-compile Lapce for other architectures.
This does not require QEMU installed as it's done via true cross-compilation meaning `HOST` will run your native OS/CPU architecture and `TARGET` will be the wanted architecture, instead of spawning container that's running OS using `TARGET` architecture.
> ![WARNING]
> Do not run plain targets like `ubuntu` or `fedora` if you don't have very powerful machine, as it will spawn many concurrent jobs
> which will take a long time to build.
|
2025-09-24T14:46:58.085215
|
lapce
|
lapce
|
lapce__lapce
|
docs/why-lapce.md
|
lapce__lapce/docs/why-lapce.md
| 3,549 | 1,758,206,896 |
en
|
I'm a Vim fan. After years of using it, I started to customize it like everybody else. I thought I had something that worked quite well until I hit one problem. My linter sometimes took seconds to check the code, and it would freeze Vim because Vim didn't have asynchronous support. I looked around; I found NeoVim and problem solved. Happy days.
But there was always this one thing I couldn't solve. I want to make Vim pretty. I tried all kinds of themes. Tried all kinds of status bar plugins with icons in it. File explorers with file icons in them. But no, I also wanted a 1px vertical split bar, not the thick colored one or the dashed line drawn with pipe characters. After hours and hours of search, it occurred to me that it's impossible to do. Again NeoVim was the savior. It introduced external UI. The idea was that NeoVim splits the UI and the backend. The backend emits events to the UI, and the UI draws them. I couldn't wait to try it out with writing a UI in Electron, with the hope that I could solve my vertical split bar dream. But I didn't because it emits the drawing events treating it as a whole canvas, and I don't get the boundary of each splits. I started to hack NeoVim code. I made it to emit split sizes and positions, and I finally can draw the bars in the UI. With joy, I also looked at emits the command modes to the UI, so I could put the command in the middle of the window. And then echo messages, status line, etc. I pushed a PR for the hacky solution(https://github.com/neovim/neovim/pull/5686). Then I hit performance issues in Electron because Javascript was not fast enough to deserialize the drawing events from NeoVim. So I wrote another UI in Go with Qt binding(https://github.com/dzhou121/gonvim).
I wanted to external more and more components in NeoVim, but I found it harder and harder, and I spotted Xi-Editor. I started to write a UI for it straightaway. Creating a code editor with Vim editing experience was the plan. There were things missing that I had to add in Xi. And working on it was so much easier because Xi was built to be the UI/backend architecture without the heritage(burden) of (Neo)Vim.
Then one day, I experienced VSCode's remote development feature, and it felt so "local". I wanted to add the feature to my code editor. Then I realized that it can't be done with NeoVim or Xi's UI/backend architecture. The reason was that (Neo)Vim/Xi backends are the editing engine, so when you put the backend to a remote machine, every keyboard input needs to be sent to it, and the backend emits the drawing events to you, which will include the network latency in everything you type. That wouldn't work. The editing logic must be tightly bound with the UI to give the best editing experience.
So the new architecture I came up with was like this:
UI
Reads file from Proxy<br>
Handle keyboard/mouse events and do the edits on the file buffer<br>
Send the file editing delta to the proxy to keep the file in sync<br>
Proxy
Receive save event from UI and flush the file buffer to disk<br>
proxy the events between UI and the plugins<br>
Plugin
Communicate with UI through proxy<br>
UI sits locally. Proxy and Plugin will be in the remote box when doing remote development. With this architecture, I can make sure the editing experience is always the best, with other considerations like syntax highlighting being done in a different thread, so nothing blocks the main thread at any time. I finally had a lightning-fast and powerful code editor. (which can be beautiful as well)
|
2025-09-24T14:46:58.085215
|
lapce
|
lapce
|
lapce__lapce
|
docs/installing-with-package-manager.md
|
lapce__lapce/docs/installing-with-package-manager.md
| 622 | 1,758,206,896 |
en
|
## Installation With Package Manager
Lapce is available in below software repositories:
[](https://repology.org/project/lapce/versions)
Lapce is also additionally available via:
- [Flatpak](https://flathub.org/apps/details/dev.lapce.lapce)
- [Scoop](https://scoop.sh/#/apps?q=lapce)
For Fedora Linux, Lapce is (unofficially) available via dnf RPM package manager, using nightly as of 2024.01:
- [copr](https://copr.fedorainfracloud.org/coprs/titaniumtown/lapce/)
```bash
sudo dnf copr enable titaniumtown/lapce
sudo dnf install lapce
```
|
2025-09-24T14:46:58.085215
|
alibaba
|
spring-cloud-alibaba
|
alibaba__spring-cloud-alibaba
|
README.md
|
alibaba__spring-cloud-alibaba/README.md
| 10,585 | 1,758,620,076 |
en
|
# Spring Cloud Alibaba
[](https://circleci.com/gh/alibaba/spring-cloud-alibaba/tree/2023.x)
[](https://search.maven.org/search?q=g:com.alibaba.cloud%20AND%20a:spring-cloud-alibaba-dependencies)
[](https://www.apache.org/licenses/LICENSE-2.0.html)
[](https://github.com/alibaba/spring-cloud-alibaba/actions)
[](https://opensource.alibaba.com/contribution_leaderboard/details?projectValue=sca)
A project maintained by Alibaba.
See the [中文文档](https://github.com/alibaba/spring-cloud-alibaba/blob/2023.x/README-zh.md) for Chinese readme.
Spring Cloud Alibaba provides a one-stop solution for distributed application development. It contains all the components required to develop distributed applications, making it easy for you to develop your applications using Spring Cloud.
With Spring Cloud Alibaba, you only need to add some annotations and a small amount of configurations to connect Spring Cloud applications to the distributed solutions of Alibaba, and build a distributed application system with Alibaba middleware.
## Features
* **Flow control and service degradation**: Flow control for HTTP services is supported by default. You can also customize flow control and service degradation rules using annotations. The rules can be changed dynamically.
* **Service registration and discovery**: Service can be registered and clients can discover the instances using Spring-managed beans. Load balancing is consistent with that supported by the corresponding Spring Cloud.
* **Distributed configuration**: Support for externalized configuration in a distributed system, auto refresh when configuration changes.
* **Event-driven**: Support for building highly scalable event-driven microservices connected with shared messaging systems.
* **Distributed Transaction**: Support for distributed transaction solution with high performance and ease of use.
* **Alibaba Cloud Object Storage**: Massive, secure, low-cost, and highly reliable cloud storage services. Support for storing and accessing any type of data in any application, anytime, anywhere.
* **Alibaba Cloud SchedulerX**: Accurate, highly reliable, and highly available scheduled job scheduling services with response time within seconds.
* **Alibaba Cloud SMS**: A messaging service that covers the globe, Alibaba SMS provides convenient, efficient, and intelligent communication capabilities that help businesses quickly contact their customers.
For more features, please refer to [Roadmap](https://github.com/alibaba/spring-cloud-alibaba/blob/2023.x/Roadmap.md).
In addition to the above-mentioned features, for the needs of enterprise users' scenarios, [Microservices Engine (MSE)](https://www.aliyun.com/product/aliware/mse?spm=github.spring.com.topbar) of Spring Cloud Alibaba's enterprise version provides an enterprise-level microservices governance center, which includes more powerful governance capabilities such as Grayscale Release, Service Warm-up, Lossless Online and Offline and Outlier Ejection. At the same time, it also provides a variety of products and solutions such as enterprise-level Nacos registration / configuration center, enterprise-level cloud native gateway.
## Components
**[Sentinel](https://github.com/alibaba/Sentinel)**: Sentinel takes "traffic flow" as the breakthrough point, and provides solutions in areas such as flow control, concurrency, circuit breaking, and load protection to protect service stability.
**[Nacos](https://github.com/alibaba/Nacos)**: An easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
**[RocketMQ](https://rocketmq.apache.org/)**: A distributed messaging and streaming platform with low latency, high performance and reliability, trillion-level capacity and flexible scalability.
**[Seata](https://github.com/seata/seata)**: A distributed transaction solution with high performance and ease of use for microservices architecture.
**[Alibaba Cloud OSS](https://www.aliyun.com/product/oss)**: An encrypted and secure cloud storage service which stores, processes and accesses massive amounts of data from anywhere in the world.
**[Alibaba Cloud SMS](https://www.aliyun.com/product/sms)**: A messaging service that covers the globe, Alibaba SMS provides convenient, efficient, and intelligent communication capabilities that help businesses quickly contact their customers.
**[Alibaba Cloud SchedulerX](https://www.aliyun.com/aliware/schedulerx?spm=5176.10695662.784137.1.4b07363dej23L3)**: Accurate, highly reliable, and highly available scheduled job scheduling services with response time within seconds.
For more features please refer to [Roadmap](https://github.com/alibaba/spring-cloud-alibaba/blob/2023.x/Roadmap.md).
## How to build
* **2023.x branch**: Corresponds to Spring Cloud 2023 & Spring Boot 3.2.x, JDK 17 or later versions are supported.
* **2022.x branch**: Corresponds to Spring Cloud 2022 & Spring Boot 3.0.x, JDK 17 or later versions are supported.
* **2021.x branch**: Corresponds to Spring Cloud 2021 & Spring Boot 2.6.x. JDK 1.8 or later versions are supported.
* **2020.0 branch**: Corresponds to Spring Cloud 2020 & Spring Boot 2.4.x. JDK 1.8 or later versions are supported.
* **2.2.x branch**: Corresponds to Spring Cloud Hoxton & Spring Boot 2.2.x. JDK 1.8 or later versions are supported.
* **greenwich branch**: Corresponds to Spring Cloud Greenwich & Spring Boot 2.1.x. JDK 1.8 or later versions are supported.
* **finchley branch**: Corresponds to Spring Cloud Finchley & Spring Boot 2.0.x. JDK 1.8 or later versions are supported.
* **1.x branch**: Corresponds to Spring Cloud Edgware & Spring Boot 1.x, JDK 1.7 or later versions are supported.
Spring Cloud uses Maven for most build-related activities, and you should be able to get off the ground quite quickly by cloning the project you are interested in and typing:
```bash
./mvnw install
```
## How to Use
### Add maven dependency
These artifacts are available from Maven Central and Spring Release repository via BOM:
```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>2023.0.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
```
add the module in `dependencies`. If you want to choose an older version, you can refer to the [Release Notes](https://github.com/alibaba/spring-cloud-alibaba/wiki/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E).
## Examples
A `spring-cloud-alibaba-examples` module is included in our project for you to get started with Spring Cloud Alibaba quickly. It contains an example, and you can refer to the readme file in the example project for a quick walkthrough.
Examples:
[Sentinel Example](https://github.com/alibaba/spring-cloud-alibaba/tree/2023.x/spring-cloud-alibaba-examples/sentinel-example/sentinel-core-example/readme.md)
[Nacos Example](https://github.com/alibaba/spring-cloud-alibaba/blob/2023.x/spring-cloud-alibaba-examples/nacos-example/readme.md)
[RocketMQ Example](https://github.com/alibaba/spring-cloud-alibaba/blob/2023.x/spring-cloud-alibaba-examples/rocketmq-example/readme.md)
[Alibaba Cloud OSS Example](https://github.com/alibaba/aliyun-spring-boot/tree/master/aliyun-spring-boot-samples/aliyun-oss-spring-boot-sample)
## Version control guidelines
The version number of the project is in the form of x.x.x, where x is a number, starting from 0, and is not limited to the range 0~9. When the project is in the incubator phase, the version number is 0.x.x.
As the interfaces and annotations of Spring Boot 1 and Spring Boot 2 have been changed significantly in the Actuator module, and spring-cloud-commons is also changed quite a lot from 1.x.x to 2.0.0, we take the same version rule as SpringBoot version number.
* 1.5.x for Spring Boot 1.5.x
* 2.0.x for Spring Boot 2.0.x
* 2.1.x for Spring Boot 2.1.x
* 2.2.x for Spring Boot 2.2.x
* 2020.x for Spring Boot 2.4.x
* 2021.x for Spring Boot 2.6.x
* 2022.x for Spring Boot 3.0.x
* 2023.x for Spring Boot 3.2.x
## Code of Conduct
This project is a sub-project of Spring Cloud, it adheres to the Contributor Covenant [code of conduct](https://sca.aliyun.com/en-us/community/developer/contributor-guide/new-contributor-guide_dev/). By participating, you are expected to uphold this code. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.
## Code Conventions and Housekeeping
None of these is essential for a pull request, but they will all help. They can also be added after the original pull request but before a merge.
Use the Spring Framework code format conventions. If you use Eclipse you can import formatter settings using the eclipse-code-formatter.xml file from the Spring Cloud Build project. If using IntelliJ, you can use the Eclipse Code Formatter Plugin to import the same file.
Make sure all new .java files to have a simple Javadoc class comment with at least an @author tag identifying you, and preferably at least a paragraph on what the class is for.
Add the ASF license header comment to all new .java files (copy from existing files in the project)
Add yourself as an @author to the .java files that you modify substantially (more than cosmetic changes).
Add some Javadocs and, if you change the namespace, some XSD doc elements.
A few unit tests would help a lot as well —— someone has to do it.
If no-one else is using your branch, please rebase it against the current 2023.x (or other target branch in the main project).
When writing a commit message please follow these conventions, if you are fixing an existing issue please add Fixes gh-XXXX at the end of the commit message (where XXXX is the issue number).
## Contact Us
Mailing list is recommended for discussing almost anything related to spring-cloud-alibaba.
spring-cloud-alibaba@googlegroups.com: You can ask questions here if you encounter any problem when using or developing spring-cloud-alibaba.
|
2025-09-24T14:46:58.085215
|
hacksider
|
Deep-Live-Cam
|
hacksider__Deep-Live-Cam
|
README.md
|
hacksider__Deep-Live-Cam/README.md
| 15,937 | 1,758,620,332 |
en
|
<h1 align="center">Deep-Live-Cam</h1>
<p align="center">
Real-time face swap and video deepfake with a single click and only a single image.
</p>
<p align="center">
<a href="https://trendshift.io/repositories/11395" target="_blank"><img src="https://trendshift.io/api/badge/repositories/11395" alt="hacksider%2FDeep-Live-Cam | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
</p>
<p align="center">
<img src="media/demo.gif" alt="Demo GIF" width="800">
</p>
## Disclaimer
This deepfake software is designed to be a productive tool for the AI-generated media industry. It can assist artists in animating custom characters, creating engaging content, and even using models for clothing design.
We are aware of the potential for unethical applications and are committed to preventative measures. A built-in check prevents the program from processing inappropriate media (nudity, graphic content, sensitive material like war footage, etc.). We will continue to develop this project responsibly, adhering to the law and ethics. We may shut down the project or add watermarks if legally required.
- Ethical Use: Users are expected to use this software responsibly and legally. If using a real person's face, obtain their consent and clearly label any output as a deepfake when sharing online.
- Content Restrictions: The software includes built-in checks to prevent processing inappropriate media, such as nudity, graphic content, or sensitive material.
- Legal Compliance: We adhere to all relevant laws and ethical guidelines. If legally required, we may shut down the project or add watermarks to the output.
- User Responsibility: We are not responsible for end-user actions. Users must ensure their use of the software aligns with ethical standards and legal requirements.
By using this software, you agree to these terms and commit to using it in a manner that respects the rights and dignity of others.
Users are expected to use this software responsibly and legally. If using a real person's face, obtain their consent and clearly label any output as a deepfake when sharing online. We are not responsible for end-user actions.
## Exclusive v2.2 Quick Start - Pre-built (Windows/Mac Silicon)
<a href="https://deeplivecam.net/index.php/quickstart"> <img src="media/Download.png" width="285" height="77" />
##### This is the fastest build you can get if you have a discrete NVIDIA or AMD GPU or Mac Silicon, And you'll receive special priority support.
###### These Pre-builts are perfect for non-technical users or those who don't have time to, or can't manually install all the requirements. Just a heads-up: this is an open-source project, so you can also install it manually.
## TLDR; Live Deepfake in just 3 Clicks

1. Select a face
2. Select which camera to use
3. Press live!
## Features & Uses - Everything is in real-time
### Mouth Mask
**Retain your original mouth for accurate movement using Mouth Mask**
<p align="center">
<img src="media/ludwig.gif" alt="resizable-gif">
</p>
### Face Mapping
**Use different faces on multiple subjects simultaneously**
<p align="center">
<img src="media/streamers.gif" alt="face_mapping_source">
</p>
### Your Movie, Your Face
**Watch movies with any face in real-time**
<p align="center">
<img src="media/movie.gif" alt="movie">
</p>
### Live Show
**Run Live shows and performances**
<p align="center">
<img src="media/live_show.gif" alt="show">
</p>
### Memes
**Create Your Most Viral Meme Yet**
<p align="center">
<img src="media/meme.gif" alt="show" width="450">
<br>
<sub>Created using Many Faces feature in Deep-Live-Cam</sub>
</p>
### Omegle
**Surprise people on Omegle**
<p align="center">
<video src="https://github.com/user-attachments/assets/2e9b9b82-fa04-4b70-9f56-b1f68e7672d0" width="450" controls></video>
</p>
## Installation (Manual)
**Please be aware that the installation requires technical skills and is not for beginners. Consider downloading the quickstart version.**
<details>
<summary>Click to see the process</summary>
### Installation
This is more likely to work on your computer but will be slower as it utilizes the CPU.
**1. Set up Your Platform**
- Python (3.11 recommended)
- pip
- git
- [ffmpeg](https://www.youtube.com/watch?v=OlNWCpFdVMA) - ```iex (irm ffmpeg.tc.ht)```
- [Visual Studio 2022 Runtimes (Windows)](https://visualstudio.microsoft.com/visual-cpp-build-tools/)
**2. Clone the Repository**
```bash
git clone https://github.com/hacksider/Deep-Live-Cam.git
cd Deep-Live-Cam
```
**3. Download the Models**
1. [GFPGANv1.4](https://huggingface.co/hacksider/deep-live-cam/resolve/main/GFPGANv1.4.pth)
2. [inswapper\_128\_fp16.onnx](https://huggingface.co/hacksider/deep-live-cam/resolve/main/inswapper_128_fp16.onnx)
Place these files in the "**models**" folder.
**4. Install Dependencies**
We highly recommend using a `venv` to avoid issues.
For Windows:
```bash
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
```
For Linux:
```bash
# Ensure you use the installed Python 3.10
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```
**For macOS:**
Apple Silicon (M1/M2/M3) requires specific setup:
```bash
# Install Python 3.11 (specific version is important)
brew install python@3.11
# Install tkinter package (required for the GUI)
brew install python-tk@3.10
# Create and activate virtual environment with Python 3.11
python3.11 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
```
** In case something goes wrong and you need to reinstall the virtual environment **
```bash
# Deactivate the virtual environment
rm -rf venv
# Reinstall the virtual environment
python -m venv venv
source venv/bin/activate
# install the dependencies again
pip install -r requirements.txt
# gfpgan and basicsrs issue fix
pip install git+https://github.com/xinntao/BasicSR.git@master
pip uninstall gfpgan -y
pip install git+https://github.com/TencentARC/GFPGAN.git@master
```
**Run:** If you don't have a GPU, you can run Deep-Live-Cam using `python run.py`. Note that initial execution will download models (~300MB).
### GPU Acceleration
**CUDA Execution Provider (Nvidia)**
1. Install [CUDA Toolkit 12.8.0](https://developer.nvidia.com/cuda-12-8-0-download-archive)
2. Install [cuDNN v8.9.7 for CUDA 12.x](https://developer.nvidia.com/rdp/cudnn-archive) (required for onnxruntime-gpu):
- Download cuDNN v8.9.7 for CUDA 12.x
- Make sure the cuDNN bin directory is in your system PATH
3. Install dependencies:
```bash
pip install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
pip uninstall onnxruntime onnxruntime-gpu
pip install onnxruntime-gpu==1.21.0
```
3. Usage:
```bash
python run.py --execution-provider cuda
```
**CoreML Execution Provider (Apple Silicon)**
Apple Silicon (M1/M2/M3) specific installation:
1. Make sure you've completed the macOS setup above using Python 3.10.
2. Install dependencies:
```bash
pip uninstall onnxruntime onnxruntime-silicon
pip install onnxruntime-silicon==1.13.1
```
3. Usage (important: specify Python 3.10):
```bash
python3.10 run.py --execution-provider coreml
```
**Important Notes for macOS:**
- You **must** use Python 3.10, not newer versions like 3.11 or 3.13
- Always run with `python3.10` command not just `python` if you have multiple Python versions installed
- If you get error about `_tkinter` missing, reinstall the tkinter package: `brew reinstall python-tk@3.10`
- If you get model loading errors, check that your models are in the correct folder
- If you encounter conflicts with other Python versions, consider uninstalling them:
```bash
# List all installed Python versions
brew list | grep python
# Uninstall conflicting versions if needed
brew uninstall --ignore-dependencies python@3.11 python@3.13
# Keep only Python 3.11
brew cleanup
```
**CoreML Execution Provider (Apple Legacy)**
1. Install dependencies:
```bash
pip uninstall onnxruntime onnxruntime-coreml
pip install onnxruntime-coreml==1.21.0
```
2. Usage:
```bash
python run.py --execution-provider coreml
```
**DirectML Execution Provider (Windows)**
1. Install dependencies:
```bash
pip uninstall onnxruntime onnxruntime-directml
pip install onnxruntime-directml==1.21.0
```
2. Usage:
```bash
python run.py --execution-provider directml
```
**OpenVINO™ Execution Provider (Intel)**
1. Install dependencies:
```bash
pip uninstall onnxruntime onnxruntime-openvino
pip install onnxruntime-openvino==1.21.0
```
2. Usage:
```bash
python run.py --execution-provider openvino
```
</details>
## Usage
**1. Image/Video Mode**
- Execute `python run.py`.
- Choose a source face image and a target image/video.
- Click "Start".
- The output will be saved in a directory named after the target video.
**2. Webcam Mode**
- Execute `python run.py`.
- Select a source face image.
- Click "Live".
- Wait for the preview to appear (10-30 seconds).
- Use a screen capture tool like OBS to stream.
- To change the face, select a new source image.
## Command Line Arguments (Unmaintained)
```
options:
-h, --help show this help message and exit
-s SOURCE_PATH, --source SOURCE_PATH select a source image
-t TARGET_PATH, --target TARGET_PATH select a target image or video
-o OUTPUT_PATH, --output OUTPUT_PATH select output file or directory
--frame-processor FRAME_PROCESSOR [FRAME_PROCESSOR ...] frame processors (choices: face_swapper, face_enhancer, ...)
--keep-fps keep original fps
--keep-audio keep original audio
--keep-frames keep temporary frames
--many-faces process every face
--map-faces map source target faces
--mouth-mask mask the mouth region
--video-encoder {libx264,libx265,libvpx-vp9} adjust output video encoder
--video-quality [0-51] adjust output video quality
--live-mirror the live camera display as you see it in the front-facing camera frame
--live-resizable the live camera frame is resizable
--max-memory MAX_MEMORY maximum amount of RAM in GB
--execution-provider {cpu} [{cpu} ...] available execution provider (choices: cpu, ...)
--execution-threads EXECUTION_THREADS number of execution threads
-v, --version show program's version number and exit
```
Looking for a CLI mode? Using the -s/--source argument will make the run program in cli mode.
## Press
**We are always open to criticism and are ready to improve, that's why we didn't cherry-pick anything.**
- [*"Deep-Live-Cam goes viral, allowing anyone to become a digital doppelganger"*](https://arstechnica.com/information-technology/2024/08/new-ai-tool-enables-real-time-face-swapping-on-webcams-raising-fraud-concerns/) - Ars Technica
- [*"Thanks Deep Live Cam, shapeshifters are among us now"*](https://dataconomy.com/2024/08/15/what-is-deep-live-cam-github-deepfake/) - Dataconomy
- [*"This free AI tool lets you become anyone during video-calls"*](https://www.newsbytesapp.com/news/science/deep-live-cam-ai-impersonation-tool-goes-viral/story) - NewsBytes
- [*"OK, this viral AI live stream software is truly terrifying"*](https://www.creativebloq.com/ai/ok-this-viral-ai-live-stream-software-is-truly-terrifying) - Creative Bloq
- [*"Deepfake AI Tool Lets You Become Anyone in a Video Call With Single Photo"*](https://petapixel.com/2024/08/14/deep-live-cam-deepfake-ai-tool-lets-you-become-anyone-in-a-video-call-with-single-photo-mark-zuckerberg-jd-vance-elon-musk/) - PetaPixel
- [*"Deep-Live-Cam Uses AI to Transform Your Face in Real-Time, Celebrities Included"*](https://www.techeblog.com/deep-live-cam-ai-transform-face/) - TechEBlog
- [*"An AI tool that "makes you look like anyone" during a video call is going viral online"*](https://telegrafi.com/en/a-tool-that-makes-you-look-like-anyone-during-a-video-call-is-going-viral-on-the-Internet/) - Telegrafi
- [*"This Deepfake Tool Turning Images Into Livestreams is Topping the GitHub Charts"*](https://decrypt.co/244565/this-deepfake-tool-turning-images-into-livestreams-is-topping-the-github-charts) - Emerge
- [*"New Real-Time Face-Swapping AI Allows Anyone to Mimic Famous Faces"*](https://www.digitalmusicnews.com/2024/08/15/face-swapping-ai-real-time-mimic/) - Digital Music News
- [*"This real-time webcam deepfake tool raises alarms about the future of identity theft"*](https://www.diyphotography.net/this-real-time-webcam-deepfake-tool-raises-alarms-about-the-future-of-identity-theft/) - DIYPhotography
- [*"That's Crazy, Oh God. That's Fucking Freaky Dude... That's So Wild Dude"*](https://www.youtube.com/watch?time_continue=1074&v=py4Tc-Y8BcY) - SomeOrdinaryGamers
- [*"Alright look look look, now look chat, we can do any face we want to look like chat"*](https://www.youtube.com/live/mFsCe7AIxq8?feature=shared&t=2686) - IShowSpeed
- [*"They do a pretty good job matching poses, expression and even the lighting"*](https://www.youtube.com/watch?v=wnCghLjqv3s&t=551s) - TechLinked (LTT)
- [*"Als Sean Connery an der Redaktionskonferenz teilnahm"*](https://www.golem.de/news/deepfakes-als-sean-connery-an-der-redaktionskonferenz-teilnahm-2408-188172.html) - Golem.de (German)
## Credits
- [ffmpeg](https://ffmpeg.org/): for making video-related operations easy
- [deepinsight](https://github.com/deepinsight): for their [insightface](https://github.com/deepinsight/insightface) project which provided a well-made library and models. Please be reminded that the [use of the model is for non-commercial research purposes only](https://github.com/deepinsight/insightface?tab=readme-ov-file#license).
- [havok2-htwo](https://github.com/havok2-htwo): for sharing the code for webcam
- [GosuDRM](https://github.com/GosuDRM): for the open version of roop
- [pereiraroland26](https://github.com/pereiraroland26): Multiple faces support
- [vic4key](https://github.com/vic4key): For supporting/contributing to this project
- [kier007](https://github.com/kier007): for improving the user experience
- [qitianai](https://github.com/qitianai): for multi-lingual support
- and [all developers](https://github.com/hacksider/Deep-Live-Cam/graphs/contributors) behind libraries used in this project.
- Footnote: Please be informed that the base author of the code is [s0md3v](https://github.com/s0md3v/roop)
- All the wonderful users who helped make this project go viral by starring the repo ❤️
[](https://github.com/hacksider/Deep-Live-Cam/stargazers)
## Contributions

## Stars to the Moon 🚀
<a href="https://star-history.com/#hacksider/deep-live-cam&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=hacksider/deep-live-cam&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=hacksider/deep-live-cam&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=hacksider/deep-live-cam&type=Date" />
</picture>
</a>
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
README.md
|
NARKOZ__silverstripe-doc-restructuring/README.md
| 3,930 | 1,758,118,090 |
en
|
# SilverStripe Documentation Restructuring Project
This is a temporary repository for developer documentation about the SilverStripe framework, currently located at [http://doc.silverstripe.org].
*Note: This repository is used for collaboration during the restructuring phase, and will move elsewhere afterwards*
* [Mailinglist](http://groups.google.com/group/silverstripe-documentation)
* [Planning wiki page](http://doc.silverstripe.org/tmp:documentation-restructuring)
* [TODO list and bugtracker](http://open.silverstripe.org/query?status=inprogress&status=new&status=replyneeded&status=reviewed&component=Documentation&order=priority&col=id&col=summary&col=status&col=type&col=priority&col=milestone&col=component)
## Contact
* Documentation questions: Ingo Schommer (ingo at silverstripe dot com)
* Markdown Conversion: Mark Stephens (mark at silverstripe dot com)
## Contributing
### Requirements
You'll need to [install git](http://help.github.com/git-installation-redirect), which is quite straightforward on most operating systems.
To edit the files, you just need a text editor. They're written in [Markdown](http://daringfireball.net/projects/markdown/), which many editors have syntax highlighting for (e.g. through the [Textmate plugin](http://github.com/textmate/markdown.tmbundle)).
To preview changes, you will need to run a local webserver capable of running SilverStripe. [XAMPP](http://www.apachefriends.org/en/xampp.html) is a good option.
### Folders
* `master`: The new markdown files - please edit in here
* `scripts`: Helper scripts for conversion and file management
### Forking the project
You can **fork** this project within github, as described on [help.github.com](http://help.github.com/forking/).
This fork will show up on your own github profile, and can be checked out to your local machine.
You don't need a webserver on there, or run any project-specific scripts. Merging back *pull requests* can
either be done [straight on github](http://github.com/chillu/silverstripe-doc-restructuring/forkqueue) (for simple cases), or through `git pull` commands (see [guide](http://github.com/guides/pull-requests)).
### Documentation Guidelines
Its important to read the [documentation guidelines](http://github.com/chillu/silverstripe-doc-restructuring/blob/master/master/cms/docs/en/misc/contributing.md), in order to keep a consistent
writing and formatting style.
We use a customized version of [Markdown](http://daringfireball.net/projects/markdown/syntax) and [Markdown Extra](http://michelf.com/projects/php-markdown/extra/) called "[ss-markdown](http://github.com/chillu/silverstripe-doc-restructuring/blob/master/master/cms/docs/en/misc/ss-markdown.md)"
### Previewing your changes
The preview/ directory contains a SilverStripe site that you can visit to preview what the documentation site will look like. You will need to create a `_ss_environment.php` file in the root of your project or in the directory above.
Here is a minimal one. Alter the database settings to suit your set-up.
<?php
define('SS_ENVIRONMENT_TYPE', 'dev');
define('SS_DATABASE_SERVER', 'localhost');
define('SS_DATABASE_USERNAME', 'root');
define('SS_DATABASE_PASSWORD', '');
If you have check out silverstripe-doc-restructuring into your webroot, you should be able to visit a URL such as http://localhost/silverstripe-doc-restructuring/preview/ to preview your changes.
### Contributing your changes
After **pushing your changes** to your own github fork, you can send us **pull requests**.
## Obsolete actions
The following scripts should no longer be used, as they were designed for an earlier stage in the project.
### Import DokuWiki files
Note: This is only possible by SilverStripe staff.
scp -P 2222 -R <username>@doc.silverstripe.org:/sites/ss2doc/www/assets/data/pages/ input/
### Convert to Markdown files
cd scripts
php TranslateSSDocs.php
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
preview/cms/tests/salad/README.md
|
NARKOZ__silverstripe-doc-restructuring/preview/cms/tests/salad/README.md
| 739 | 1,758,118,091 |
en
|
# Tests #
Given I click on the "Tab Name" tab
Given I close window and go back to clean state
Given I fill out the log in form with user "user" and password "password"
Given I get a permission denied error
Given I go to the draft site
Given I log in as Fred
Given I log in as user
Given I log into the CMS as Fred@example.com
Given I log out
Given I visit admin/security
Given I wait for a status message
Given I wait for a success message
Given a "Blog" page called "News" as a child of "Blogs"
Given a "Publishers" group
Given a top-level "BlogPage" page called "News"
Given a user called "Fred" in the "Authors" group
Given the "News" page can be edited by the "Publishers" group
Given the site can be edited by the "Publishers" group
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
preview/sapphire/thirdparty/behaviour/README.md
|
NARKOZ__silverstripe-doc-restructuring/preview/sapphire/thirdparty/behaviour/README.md
| 3,664 | 1,758,118,092 |
en
|
# Introduction
Behaviour-driven JavaScript library, customized for usage in SilverStripe CMS.
Caution: Seriously outdated, consider using [http://github.com/hafriedlander/jquery.entwine](jQuery.entwine) and [http://api.jquery.com/live/](jQuery.live) instead.
# Author
* Sam Minnee (sam at silverstripe dot com)
# Requirements
* Custom Prototype 1.4 RC3 (see `sapphire/thirdparty/prototype/prototype.js`)
# Tutorial
In Sapphire, I've tried to make Javascript development a lot more well-structured. It's very easy to write spaghetti, but this ultimately prevents maintainability. This page is a guide to better Javascript. (hopefully).
## Required includes
To use everything mentioned here, first include jsparty/behaviour.js and jsparty/prototype.js. This is a lot of overhead, I know, and producing a leaner core file is definitely on the to do list!
## Class creation and inheritance
Classes in Javascript are normally too voodoo to be consistently applied. I've created some libraries to help this.
* Class.create() will return a new class.
* Class.extend(parentClassName) will return a class that extends form the parent class.
* Class.extend(parentClass1).extend(parentClass2) will perform multiple inheritance.
Once we've created our classes, then what? You should define the prototype, as indicated below. The initialize method acts as the constructor. The parent constructor is automatically called **before** the child constructor.
If you would like to access a parent class' method within a child class, you can refer to this.ParentClassName.methodName(). This is useful if you've overloaded the method but want to base its functionality on the parent method.
### Automatic instantiation
This is where things get a even more fruity. We have the power to automatically configure DOM objects - the tags within your HTML - to automatically act as your. This lets you build "intelligence" into the elements on your page - not only overriding event handlers, but creating methods that can be called by other objects throughout the application. Although my experience so far is a little limited, it seems as though this is a much cleaner way of coding our javascript.
The thing to remember - the thing which differs from many other Javascript coding styles - is that the DOM object and the "control" object **are one and the same**.
Each class will have an applyTo() method. This method can be passed either a **CSS selector** or an element. If you call applyTo() before the page is loaded, the class will be applied in the window.onload() event.
#### Example
here's how you roll it all together in an example.
Resizable = Class.create();
onmousedown : function() {
...
},
onmouseup : function() {
...
}
}
SidePanel = Class.create();
SidePanel.prototype = {
initialize : function() {
...
},
onshow : function() {
...
},
onresize : function() {
...
},
ajaxGetPanel : function(onComplete) {
...
},
afterPanelLoaded : function() {
}
}
VersionList = Class.extend('SidePanel').extend('Resizable');
VersionList.prototype = {
afterPanelLoaded : function() {
...
}
}
VersionItem.applyTo('#versions//holder tbody tr');
VersionAction.applyTo('#versions//holder p.pane//actions');
VersionList.applyTo('#versions//holder');
CAUTION: If you want to to have true instance-variables, specify them in initialize() instead of making a new object-property.
Resizable = Class.create();
staticVar: "the same in each instance",
initialize: function() {
this.instanceVar = "current dom-id: " + this.id;
}
}
Resizable.applyTo("div.multipleElements");
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
preview/sapphire/javascript/tree/README.md
|
NARKOZ__silverstripe-doc-restructuring/preview/sapphire/javascript/tree/README.md
| 3,644 | 1,758,118,091 |
en
|
# JavaScript Tree Control
## Maintainers
* Sam Minnee (sam at silverstripe dot com)
## Features
* Build trees using semantic HTML and unobtrusive JavaScript.
* Style the tree to suit your application you with CSS.
* Demo: http://www.silverstripe.org/assets/tree/demo.html
## Usage
The first thing to do is include the appropriate JavaScript and CSS files:
<code html>
<link rel="stylesheet" type="text/css" media="all" href="tree.css" />
<script type="text/javascript" src="tree.js"></script>
</code>
Then, create the HTML for you tree. This is basically a nested set of bullet pointed links. The "tree" class at the top is what the script will look for. Note that you can make a tree node closed to begin with by adding `class="closed"`.
Here's the HTML code that I inserted to create the demo tree above.
<code html>
<ul class="tree">
<li><a href="#">item 1</a>
<ul>
<li><a href="#">item 1.1</a></li>
<li class="closed"><a href="#">item 1.2</a>
<ul>
<li><a href="#">item 1.2.1</a></li>
<li><a href="#">item 1.2.2</a></li>
<li><a href="#">item 1.2.3</a></li>
</ul>
</li>
<li><a href="#">item 1.3</a></li>
</ul>
</li>
<li><a href="#">item 2</a>
<ul>
<li><a href="#">item 2.1</a></li>
<li><a href="#">item 2.2</a></li>
<li><a href="#">item 2.3</a></li>
</ul>
</li>
</ul>
</code>
Your tree is now complete!
## How it works
Obviously, this isn't a complete detail of everything that's going on, but it gives you an insight into the overall process.
### Starting the script
In simple situations, creating an auto-loading script is a simple matter of setting window.onload to a function. But what if there's more than one script? To this end, we created an appendLoader() function that will execute multiple loader functions, including a previously defined loader function
### Finding the tree content
Rather than write a piece of script to define where your tree is, we've tried to make the script as automatic as possible - it finds all ULs with a class name containing "tree".
### Augmenting the HTML
Unfortunately, an LI containing an A isn't sufficient for doing all of the necessary tree styling. Rather than force people to put non-semantic HTML into their file, the script generates extra `<span>` tags.
So, the following HTML:
<code html>
<li>
<a href="#">My item</a>
</li>
</code>
Is turned into the more ungainly, and yet more easily styled:
<code html>
<li>
<span class="a"><span class="b"><span class="c">
<a href="#">My item</a>
</span></span></span>
</li>
</code>
Additionally, some helper classes are applied to the `<li>` and `<span class="a">` elements:
* `"last"` is applied to the last node of any subtree.
* `"children"` is applied to any node that has children.
### Styling it up
Why the heck do we need 5 styling elements? Basically, because there are 5 background-images to apply:
* li: A repeating vertical line is shown. Nested <li> tags give us the multiple vertical lines that we need.
* span.a: We overlay the vertical line with 'L' and 'T' elements as needed.
* span.b: We overlay '+' or '-' signs on nodes with children.
* span.c: This is needed to fix up the vertical line.
* a: Finally, we apply the page icon.
### Opening / closing nodes
Having come this far, the "dynamic" aspect of the tree control is very trivial. We set a "closed" class on the `<li>` and `<span class="a">` elements, and our CSS takes care of hiding the children, changing the - to a + and changing the folder icon.
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
preview/sapphiredocs/README.md
|
NARKOZ__silverstripe-doc-restructuring/preview/sapphiredocs/README.md
| 541 | 1,758,118,094 |
en
|
# Documentation Viewer Module
## Maintainer Content
* Will Rossiter (Nickname: willr, wrossiter) <will@silverstripe.com>
## Requirements
* Tested on 2.4 and trunk
## Summary
Read nested documentation files from the /docs/ folder in modules. To read documentation go to yoursite.com/dev/docs/.
It is likely this will be integrated into the core in future versions once it is polished.
For more documentation on how to use the module please read /docs/Writing-Documentation.md (or via this in /dev/docs/sapphiredocs/Writing-Documentation)
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
preview/sapphiredocs/tests/docs/en/test.md
|
NARKOZ__silverstripe-doc-restructuring/preview/sapphiredocs/tests/docs/en/test.md
| 346 | 1,758,118,094 |
en
|
## english test
test
1.0
[link: subfolder index](subfolder/)
[link: subfolder page](subfolder/subpage)
[link: with anchor](/test#anchor)
[link: http](http://silverstripe.org)
[link: api](api:DataObject)
[api:DataObject::$has_one]
:::php
code block
with multiple
lines
Normal text after code block
code block
without formatting prefix
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
preview/sapphiredocs/tests/docs/en/index.md
|
NARKOZ__silverstripe-doc-restructuring/preview/sapphiredocs/tests/docs/en/index.md
| 27 | 1,758,118,094 |
en
|
## english test
index
1.0
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
preview/sapphiredocs/tests/docs/en/subfolder/subpage.md
|
NARKOZ__silverstripe-doc-restructuring/preview/sapphiredocs/tests/docs/en/subfolder/subpage.md
| 297 | 1,758,118,094 |
en
|
[link: absolute index](/)
[link: absolute index with name](/index)
[link: relative index](../)
[link: relative parent page](../test)
[link: absolute parent page](/test)



|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
preview/sapphiredocs/tests/docs/en/subfolder/subsubfolder/subsubpage.md
|
NARKOZ__silverstripe-doc-restructuring/preview/sapphiredocs/tests/docs/en/subfolder/subsubfolder/subsubpage.md
| 169 | 1,758,118,094 |
en
|
[link: absolute index](/)
[link: relative index](../)
[link: relative parent page](../subpage)
[link: relative grandparent page](../../test)
[link: absolute page](/test)
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
preview/sapphiredocs/tests/docs/de/test.md
|
NARKOZ__silverstripe-doc-restructuring/preview/sapphiredocs/tests/docs/de/test.md
| 25 | 1,758,118,094 |
en
|
## german test
test
1.0
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
preview/sapphiredocs/tests/docs/de/index.md
|
NARKOZ__silverstripe-doc-restructuring/preview/sapphiredocs/tests/docs/de/index.md
| 26 | 1,758,118,094 |
en
|
## german test
index
1.0
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
preview/sapphiredocs/tests/docs-2/en/test.md
|
NARKOZ__silverstripe-doc-restructuring/preview/sapphiredocs/tests/docs-2/en/test.md
| 0 | 1,758,118,094 |
en
|
2025-09-24T14:46:58.085215
|
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
preview/sapphiredocs/tests/docs-2/en/index.md
|
NARKOZ__silverstripe-doc-restructuring/preview/sapphiredocs/tests/docs-2/en/index.md
| 27 | 1,758,118,094 |
en
|
## english test
index
2.0
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
preview/sapphiredocs/docs/en/index.md
|
NARKOZ__silverstripe-doc-restructuring/preview/sapphiredocs/docs/en/index.md
| 982 | 1,758,118,094 |
en
|
# Sapphire Documentation Module
This module has been developed to read and display content from markdown files in webbrowser. It is an easy
way to bundle end user documentation within a SilverStripe installation.
See [Writing Documentation](dev/docs/en/sapphiredocs/writing-documentation) for more information on how to write markdown files which
are available here.
To include your docs file here create a __docs/en/index.md__ file. You can also include custom paths and versions. To configure the documentation system the configuration information is available on the [Configurations](dev/docs/en/sapphiredocs/configuration-options)
page.
## Setup
By default, the documentation is available in `dev/docs`. If you want it to live on the webroot instead of a subfolder,
add the following configuration to your `mysite/_config.php`:
DocumentationViewer::set_link_base('');
Director::addRules(1, array(
'$Action' => 'DocumentationViewer',
'' => 'DocumentationViewer'
));
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
preview/sapphiredocs/docs/en/Configuration-Options.md
|
NARKOZ__silverstripe-doc-restructuring/preview/sapphiredocs/docs/en/Configuration-Options.md
| 1,013 | 1,758,118,094 |
en
|
# Helpful Configuration Options
DocumentationService::set_ignored_files(array());
If you want to ignore (hide) certain file types from being included.
DocumentationService::set_automatic_registration(false);
By default the documentation system will parse all the directories in your project and
include the documentation. If you want to only specify a few folders you can disable it
with the above.
DocumentationService::register($module, $path, $version = 'current', $lang = 'en', $major_release = false)
Registers a module to be included in the system (if automatic registration is off or you need
to load a module outside a documentation path).
DocumentationService::unregister($module, $version = false, $lang = false)
Unregister a module (removes from documentation list). You can specify the module, the version
and the lang. If no version is specified then all folders of that lang are removed. If you do
not specify a version or lang the whole module will be removed from the documentation.
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
preview/sapphiredocs/docs/en/Writing-Documentation.md
|
NARKOZ__silverstripe-doc-restructuring/preview/sapphiredocs/docs/en/Writing-Documentation.md
| 1,259 | 1,758,118,094 |
en
|
# Writing Documentation #
Your documentation needs to go in the specific modules docs folder which it refers mostly too. For example if you want to document
a feature of your custom module 'MyModule' you need to create markdown files in mymodule/docs/.
The files have to end with the __.md__ extension. The documentation viewer will automatically replace hyphens (-) with spaces (since you cannot
have spaces web / file systems).
Also docs folder should be localized. Even if you do not plan on using multiple languages you should at least write your documentation
in a 'en' subfolder
/module/docs/en/
## Syntax ##
This uses a customized markdown extra parser. To view the syntax for page formatting check out [Daring Fireball](http://daringfireball.net/projects/markdown/syntax)
## Creating Hierarchy ##
The document viewer supports folder structure. There is a 9 folder limit on depth / number of sub categories you can create.
Each level deep it will generate the nested urls.
## Directory Listing ##
Each folder you create should also contain a __index.md__ file (see sapphiredocs/doc/en/index.md) which contains an overview of the
module and related links.
## Table of Contents ##
The table of contents on each module page is generated
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/server-requirements.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/server-requirements.md
| 5,295 | 1,758,118,090 |
en
|
# Introduction
We try to be as wide as possible in our server requirements. However, there are some limitations.
Please check our [suggested-web-hosts](http://doc.silverstripe.org/suggested-web-hosts) (and add your host if the installation was successful).
If you're running Windows, we recommend using the [Windows Platform Installer](/topics/installation/installation-on-windows-pi) or
[WAMP](/topics/installation/installation-on-windows-wamp).
If you're using Mac OS X, we recommend the [MAMP package](http://www.mamp.info/en/mamp.html), see
[silverstripe-on-mamp](/topics/installation/silverstripe-on-mamp) for instructions on installation. If you are using any other packages or
setups, or you are on linux, please pay careful attention to the requirements below.
### PHP
PHP5 is required. The following are further details and recommendations for how to properly set up PHP for use with
SilverStripe.
* **PHP 5.2.0+ recommended**, PHP as low as 5.1.0 have been known to work, but for best results 5.2.0+ is recommended.
(see http://www.gophp5.org)
* Required modules. Most of the time these modules can just be enabled in the php.ini, however support for these need
to be compiled into PHP, which may not be the case if you are not using [WAMP](http://www.wampserver.com/en/) or
[MAMP](http://www.mamp.info/en/mamp.html).
* dom
* gd2
* hash
* iconv
* mbstring
* mysql or pgsql, if you use one of these databases
* session
* simplexml
* tokenizer
* xml
* Set the maximum memory to at least 48 mb. SilverStripe can be resource hungry for some intensive operations. Note:
You can sometimes increase the maximum memory by adding a "ini_set("memory_limit","48M");" line to sapphire/main.php
* Using a PHP accelerator or opcode cache //(e.g. [xcache](http://trac.lighttpd.net/xcache/))// is **strongly**
recommended to for performance reasons - SilverStripe creates large cache files as PHP code that are quite slow to open
without an opcode cache.
* Gentoo Linux distribution USE-Flags ([related forum
topic](http://silverstripe.org/installing-silverstripe/show/281700)): `berkdb bzip2 cgi cli crypt ctype curl exif
flatfile ftp gd gdbm hash iconv imap ipv6 mysql mysqli ncurses nls pcre readline reflection session simplexml snmp spell
spl ssl threads tokenizer truetype unicode xml xmlreader xmlwriter xpm zip zlib`
* PHP safe mode off.
If you need information on your PHP configuration, create a php file with the following content:
:::php
<?php
phpinfo();
If you visit this file in your web browser, it will give a full list of the configuration of PHP.
### Database
* **MySQL 5.0+** (out of the box)
* **PostgreSQL 8.3+** ([download](http://www.silverstripe.org/postgresql-module/))
* **SQLite 3+** ([download](http://silverstripe.org/sqlite-database/))
* **SQL Server 2008** ([download](http://www.silverstripe.org/microsoft-sql-server-database))
Note: MySQL 4.1 has been known to work, but is no longer supported.
### HTTP Server
SilverStripe will work on the following web servers:
* Apache with mod_rewrite and "AllowOverride All" set
* IIS 7.x with [URL Rewrite Module](http://www.iis.net/expand/URLRewrite) (installer supported in SilverStripe 2.4+)
SilverStripe *may* work on the following, but it has not been tested by the core team:
* IIS 5 and 6
* lighttpd
Some detailed notes on web server setup:
* Apache 1.3+/2.0+/2.2+ with [mod_rewrite](http://www.workingwith.me.uk/articles/scripting/mod_rewrite), and the
ability to set rewriting rules in .htaccess files via "Allow Override".
* The following is an example of the Directory directive from the Apache configuration file:
:::apache
<Directory "/location/of/silverstripe">
Options FollowSymLinks SymLinksifOwnerMatch
AllowOverride All
Order allow,deny
Allow from all
</Directory>
* The Apache server needs to be restarted for the configuration changes to take effect.
* We suggest using mod_deflate/gzip to compress HTML/CSS/JS etc and thus improve page loading times *this applies to
any website constructed , not just to SilverStripe*
* lighttpd 1.4+ with access to the server configuration. (See [installation-on-lighttpd](/topics/installation/installation-on-lighttpd)
* Silverstripe makes uses the geoiplookup to get the visitors' location (with an ip2country function). In order for
this to work, you must have the geoiplookup application installed on your server. Silverstripe will run fine without it.
### Operating System
SilverStripe can run on OS X, Windows, Linux and BSD.
* Windows XP SP3+ (Windows 7 or Server 2008 is recommended)
* Mac OS X 10.4+. Earlier versions may work but we haven't tested them and can't provide support.
* Linux/BSD. The kernel doesn't really matter as long as you're running the correct HTTP server.
* File permissions: To install and run SilverStripe, You need to be able to set some files (e.g. the 'assets'
folder) to be writable by the user the webserver is running as (e.g. wwwrun). Having shell access or a control panel (or
an FTP server that allows file permission changing) is helpful.
### Browser
Make sure that Cookies have been enabled for the web site for the installation and management of the SilverStripe CMS.
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/index.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/index.md
| 4,220 | 1,758,118,090 |
en
|
# Welcome to the SilverStripe developer documentation wiki
This wiki documents high-level features of the [SilverStripe open source platform](http://www.silverstripe.org), aimed
at developers.
If you would like to contribute, you can [register](http://doc.silverstripe.com/doku.php?id=start&do=register) and then
[login](http://doc.silverstripe.com/doku.php?do=login&id=start).
### Getting support
* Use our [support forum](http://www.silverstripe.com/silverstripe-forum/) and [irc channel](http://silverstripe.org/irc)
* See [userhelp](http://userhelp.silverstripe.com) for end-user documentation
### Overview
* [Why SilverStripe?](http://silverstripe.com/overview/): Find out about our unique features as a new entrant in a
crowded market
* [Feature Overview](http://silverstripe.com/overview/): Find out how many capabilities hide behind the simple
interface
* [Contributing](http://www.silverstripe.com/how-to-contribute/) and [Contributors](Contributors)
* [Changelog](changelog)
* [Roadmap](http://open.silverstripe.com/roadmap)
* **[API documentation](http://api.silverstripe.org/current)**
### Books
[](http://www.silverstripe.org/silverstripe-book)
* [Official book on SilverStripe in English](http://www.silverstripe.org/silverstripe-book)
([Errata](http://doc.silverstripe.org/silverstripe-book-errata)).
* [Official book on SilverStripe in German](http://www.silverstripe.org/das-silverstripe-buch).
### Installation
* **[Installing](installation)** and [Upgrading](upgrading)
* [Server-requirements](server-requirements)
* [Suggested-web-hosts](http://doc.silverstripe.org/suggested-web-hosts)
### Level 1: Building your first SilverStripe website
* **[Tutorials](tutorials):**
- [Building a basic site](tutorials/1-building-a-basic-site)
- [Extending a basic site](tutorials/2-extending-a-basic-site)
- [Forms](tutorials/3-forms)
- [Site Search](tutorials/4-site-search)
- [Relationships](tutorials/5-dataobject-relationship-management)
* [Introduction to PHP5](http://devzone.zend.com/node/view/id/627)
* [Common Problems](topics/common-problems)
### Level 2: SilverStripe fundamentals
* [Templates](reference/templates): SilverStripe has its own templating engine
* [Themes](topics/themes): How to customize your site with themes
* [Controllers](topics/controllers): Coordination from a URL-request to finding the controller-class
* [Pagetypes](topics/page-types): Clarifying the relationship between a page-object and a silverstripe-class
* **[Datamodel](topics/datamodel)**: Object-relational database model with MVC
* [Database Structure](reference/database-structure): Breakdown of a typical SilverStripe database
* [Datatypes](topics/data-types): Casting database-columns
* [Forms](topics/forms): Sophisticated form generation and processing
* [Formfield Types](reference/form-field-types): Simple and complex form-elements with built-in validation
* [Javascript](topics/javascript)
* [Widgets](topics/widgets)
* [Configuration](topics/configuration)
### Level 3: The less obvious features
* [Execution Pipeline](reference/execution-pipeline): Tracking a request from director to template-rendering
* [Email](topics/email)
* [RSS Feeds](reference/rssfeed)
* [Debugging](topics/debugging)
* [Errorhandling](topics/error-handling)
* [Testing Guide](testing/testing-guide): Framework for automated testing like Unittests
* [Security](topics/security)
* [Built-in Page Controls](reference/built-in-page-controls)
### Level 4: Contributing to the SilverStripe core
* Share your [Recipes](http://doc.silverstripe.org/recipes)
* [Coding Conventions](http://doc.silverstripe.org/coding-conventions)
### Modules
* [Overview](topics/modules)
If you're interested in how work is being done on the SilverStripe documentation, you can see a [high-level view of the
number of changes here](http://doc.silverstripe.com/changegraph.php). If you are a customer of SilverStripe and are
looking for our company website, please visit [www.silverstripe.com](http://www.silverstripe.com). [Contact
us](http://www.silverstripe.com/contact).
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/installation.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/installation.md
| 1,728 | 1,758,118,090 |
en
|
# How to install SilverStripe
## Download
SilverStripe is a web application. This means that you will need to have a web server meeting SilverStripe's
[requirements](server-requirements) running.
The installation instructions below will take you through setting up an appropriate web server on your system. The
installation instructions will set you up with a SilverStripe website very similar to our [our demo
site](http://demo.silverstripe.com/) uses.
You can [download](http://silverstripe.org/download) SilverStripe as a *.tar.gz archive or from subversion.
If you already have an installed version of SilverStripe, please see our [upgrading](upgrading) guide.
## Windows
We recommend that you use [Microsoft's free Web Platform installer](topics/installation/installation-on-windows-pi).
The more technically inclined can install using
[Apache/WAMP](topics/installation/installation-on-windows-wamp) or [IIS](topics/installation/installation-on-windows-manual-iis).
## Mac OS X
Mac OS X comes with a built-in webserver, but we recommend that you [install SilverStripe using MAMP](topics/installation/installation-on-mac-osx).
## Linux/Unix
If you run Linux/Unix, we generally assume that you know how to get a web-server going.
* [Apache](topics/installation/installation-on-webserver) - our preferred platform
* [Lighttpd (lighty)](topics/installation/installation-on-lighttpd) - fast, but a bit tricker to get going
* [Nginx](topics/installation/installation-on-nginx)
## Troubleshooting
If you run into trouble, see [common-problems](topics/common-problems) or post to [the SilverStripe
forum](http://silverstripe.com/silverstripe-forum/).
## Module Installation
See [modules](topics/modules).
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/upgrading.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/upgrading.md
| 2,103 | 1,758,118,091 |
en
|
# Introduction
Usually an update or upgrade your SilverStripe installation just means overwriting files and updating your
database-schema. Please see your [upgrade notes and changelogs](/changelogs).
# Related
* [Release Announcements](http://groups.google.com/group/silverstripe-announce/)
* [Blog posts about releases on silverstripe.org](http://silverstripe.org/blog/tag/release)
# Process
* Check if any modules (e.g. blog or forum) in your installation are compatible and need to be upgraded as
well
* Backup your database
* Backup your webroot
* Download the new release and uncompress it to a temporary folder
* Leave custom folders like *mysite* or *themes* in place.
* Identify system folders in your webroot (//cms//, *sapphire* and any additional modules).
* Delete existing system folders (or move them outside of your webroot)
* Extract and replace system folders from your download (//Deleting instead of "copying over" existing folders
ensures that files removed from the new SilverStripe release are not persisting in your installation//)
* Visit http://yoursite.com/dev/build/?flush=1 (adds new fields/tables to the database, and empties your template
cache)
* Check if you need to adapt your code to changed APIs
* Check if you need to adapt your code to changed CSS/HTML/JS
* See [common-problems](/topics/common-problems) for a list of likely mistakes that could happen during an upgrade.
# Decision Helpers
How easy will it be to update my project? It's a fair question, and sometimes a difficult one to answer. This page is
intended to help you work out how hard it will be to upgrade your site.
* If you've made custom branches of the core, or of a module, it's going to be harder to upgrade.
* The more custom features you have, the harder it will be to upgrade. You will have to re-test all of those features
and some of them may have broken.
* Customisations of a well defined type - such as custom page types or custom blog widgets - are going to be easier to
upgrade than customisations that use sneaky tricks, such as the subsites module.
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/recover-admin-passwords.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/recover-admin-passwords.md
| 1,051 | 1,758,118,090 |
en
|
This tells you how to access the CMS when you've forgotten your password, and when you cannot use 'reset password
function.' (E.g. if your email is different/unknown.). It requires file-system/FTP access to the website.
You cannot actually retrieve your current password, only set it to something new.
1. Edit your mysite/_config.php
2. Add the following line, replacing 'username' and 'password' with something temporary. `Security::setDefaultAdmin('ussername', 'password');`
1. Log in to the CMS (http://www.yourwebsite.com/admin ) using the username and password above.
2. You are now logged in as one of the admin accounts stored in the system.
3. Visit the Security section of CMS.
4. Edit or add Administrator accounts as appropriate to set credentials you can then use. You cannot retrieve the
password; only set it to something new.
5. Test you've resolved the situation. Log out and then log in as an administrator account you've created/restored.
6. Remove the line from step 2 in _config.php. This removes the potential backdoor.
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/redirect-to-first-child-page.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/redirect-to-first-child-page.md
| 654 | 1,758,118,090 |
en
|
# Howto: Redirect to first child page
If you want to make a page redirect to the first child page, below is a simple recipe to do so. index() is called
automatically when the page is viewed - so you can do your redirection here.
:::php
class PageName_Controller extends Page_Controller {
function index() {
if($children = $this->Children()) {
if($firstChild = $children->First()) {
Director::redirect($firstChild->Link());
}
}
}
}
It's very simple. It takes the first child - ''$this->Children()->First()'' if there are children of this page and
redirects to that given first child page.
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/database-abstraction.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/database-abstraction.md
| 2,208 | 1,758,118,090 |
en
|
# Building apps to work across databases
This page is intended to be a guide to SilverStripe developers wanting to make their applications database-agnostic.
#### SQL syntax
The following guidelines should be applied to the SQL that you generate, either directly or in your arguments to
''DataObject::get''.
* Use " instead of ` to escape field and table names.
* Escape all table and field names, not just reserved ones. This is needed for PostgreSQL support.
* Don't use ''INSERT INTO Table SET Field = 'value' '' syntax - it's not supported by all databases.
* Use ''CASE WHEN (cond) THEN (true) ELSE (false) END'' instead of ''IF(cond,true,false)''.
* Use ''LIMIT count OFFSET offset'' instead of ''LIMIT offset,count''.
[This document from Drupal's wiki is also helpful](http://drupal.org/node/555514)
#### Writing DataObject queries to be compatible with both SilverStripe 2.3 and 2.4
The database abstraction work in SilverStripe 2.4 mean that tables need to be escaped with ''"'' instead of ''`''.
However, this new escaping syntax isn't compatible with SilverStripe 2.3. If you're trying to make a module that will
run on both, this is a problem.
The only way around this is to introduce code into your module to switch between two different query syntaxes. We can't
introduce a method to do this check for us, because the method wouldn't exist in the older versions of SilverStripe.
Instead, we have introduced a class constant, ''Database::USE_ANSI_SQL'', that you can check for the presence of this to
switch between the two query syntaxes
:::php
if(defined('DB::USE_ANSI_SQL')) $filter = '"BlogEntry"`.Date > NOW() - INTERVAL 3 MONTH';
else $filter = '`BlogEntry`.Date > NOW() - INTERVAL 3 MONTH)';
If you are building up a query in a more complex manner, it might be clearer to use a custom string-replacement method
for switching the query:
:::php
$filter = "(`BlogEntry`.Date > NOW() - INTERVAL 3 MONTH)";
if(isset($_GET['AuthorID'] && is_numeric($_GET['AuthorID'])) {
$filter .= "AND (`BlogEntry`.AuthorID = '" . Convert::raw2sql($_GET['AuthorID') . "')";
}
if(defined('DB::USE_ANSI_SQL')) $filter = str_replace('`BlogEntry`', '"BlogEntry"', $filter);
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/search-dataobjects.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/search-dataobjects.md
| 7,231 | 1,758,118,090 |
en
|
In the recipe below, we manage a dataobject (table, piece of information) called House, which lists houses (name) and a
type(small or large). We then list these houses in a housepage and allow them to be searched. This is a silly example,
but you can use the same code for more meaningful purposes.
Also see: [http://doc.silverstripe.com/doku.php?id=searchcontext](http://doc.silverstripe.com/doku.php?id=searchcontext)
This is just an example (not necessarily the best way) on how to do this:
## DataObject
First of all, we create a dataobject:
:::php
class House extends DataObject {
// Properties
static $db = array(
'House' => 'Varchar',
'Type' => "Enum('small','large','small')"
);
// Relations
// - Explictly defined to allow static access
// from extensions
static $has_one = array();
static $has_many = array();
static $many_many = array();
static $belongs_many_many = array();
static $casting = array();
static $defaults = array();
// Model Admin utilities
static $searchable_fields = array(
'House',
'Type'
);
static $summary_fields = array(
'House',
'Type'
);
static $singular_name = 'House';
static $plural_name = 'Houses';
static $default_sort = 'House ASC';
// Other Services
static $api_access = false;
// Methods
function getCMSFields() {
$fields = parent::getCMSFields();
return $fields;
}
}
## Managing the Data Object in the CMS
Next, we create a modeladmin (section in the CMS) to manage the House DataObject:
:::php
class HouseAdmin extends ModelAdmin {
public static $managed_models = array(
'House'
);
static $url_segment = 'Houses'; // will be linked as /admin/products
static $menu_title = 'House Admin';
}
## The House Page
Next, we create a page that allows searching of these houses.
:::php
class HousePage extends Page {
static $db = array(
"HousesPerPage" => "Int"
);
public function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldsToTab('Root.Content.DomainList',array(
new NumericField('HousesPerPage','Houses Per Page'),
));
return $fields;
}
}
class HousesPage_Controller extends Page_Controller {
static $number_per_page = 7;
function index () {
return $this->HouseSelection();
}
function HouseSelection($where = '1 = 1') {
if(!isset($_GET["start"])) {
$_GET["start"] = 0;
}
if(!$this->HousesPerPage) {
$this->HousesPerPage = self::$number_per_page;
}
if(Session::get("HouseSearch.where")) {
$where = Session::get("HouseSearch.where");
}
$obj = DataObject::get('House', $where, null, null, $limit = $_GET["start"].",".$this->HousesPerPage);
if($obj) {
$count = $obj->TotalItems();
$obj->setPageLength($this->HousesPerPage);//$obj->setPageLimits($_GET["$this->HousesPerPage);
}
else {
$count = 0;
}
if(is_object(Session::get("HouseSearch.humanQueryDefinition"))) {
$HouseQuery = Session::get("HouseSearch.humanQueryDefinition");
}
else {
$HouseQuery = null;
}
$_GET["start"]+$this->HousesPerPage > $count ? $end = $count : $end = $_GET["start"]+$this->HousesPerPage;
return array(
"Houses" => $obj,
"HouseCount" => $count,
"HouseQuery" => $HouseQuery,
"HouseStart" => $_GET["start"],
"HouseStart" => $_GET["start"]+1,
"HouseEnd" => $end
);
}
function resetsearch() {
Session::set("HouseSearch.where", "");
Session::set("HouseSearch.House", "");
Session::set("HouseSearch.type", "both");
Session::set("HouseSearch.humanQueryDefinition", null);
Director::redirect($this->Link());
}
function HouseSearchForm() {
$request = $this->getRequest();
if($House = $request->requestVar('House')) {
Session::set("HouseSearch.House", $House);
}
else {
$House = Session::get("HouseSearch.House");
}
if($type = $request->requestVar('Type')) {
Session::set("HouseSearch.type", $type);
}
else {
if(!Session::get("HouseSearch.type")) {
Session::set("HouseSearch.type", "both");
}
$type = Session::get("HouseSearch.type");
}
//$category = $request->requestVar('Category') ? $request->requestVar('Category') : 'Both';
$fields = new FieldSet();
$fields->push(new TextField('House','Keyword (optional)',$House));
$values = array('small'=>'small Houses','large'=>'large Houses','Both'=>'Both');
$fields->push(new OptionsetField('Type','', $values,$type));
$actions = new FieldSet(
new FormAction('doSearch','Search')
);
return new Form($this, 'HouseSearchForm', $fields, $actions);
}
function doSearch ($data, $form, $request) {
//Debug::show($data);
$filter = array();
$humanQueryDefinition = array();
if (isset($data['House']) && $data['House'] != "") {
$Houses = explode(' ', Convert::raw2sql($data['House']));
foreach ($Houses as $d) {
$filter[] = "(House LIKE '%$d%')";
}
$humanQueryDefinition["Keywords"] = $data['House'];
Session::set("HouseSearch.House", $Houses);
}
if (isset($data['Type']) && $data['Type'] != 'Both') {
$type = Convert::raw2sql($data['Type']);
$filter[] = "(Type = '$type')";
$humanQueryDefinition["Type"] = $type;
Session::set("HouseSearch.type", $data['Type']);
}
if(count($filter)){
$filter = implode(' AND ',$filter);
Session::set("HouseSearch.where", $filter);
Session::set("HouseSearch.humanQueryDefinition", new ArrayData($humanQueryDefinition));
}
else {
$filter = '';
}
Director::redirect($this->Link());
}
}
## Template
Now, we have all the PHP code in place, we create a template (add to your existing
themes/mythemes/templates/Layout/HousePage.ss
file):
:::html
<div id="housesearchform">
$HouseSearchForm
<ul class="SearchDefinition">
<% if HouseCount %><li>Total listed: $HouseCount <% if Houses.MoreThanOnePage %>(showing from $HouseStart to $HouseEnd)</li><% end_if %> <% end_if %>
<% if HouseQuery %>
<% control HouseQuery %>
<% if Keywords %><li>Keyword(s): $Keywords</li><% end_if %>
<% if Type %><li>Type: $Type</li><% end_if %>
<% end_control %>
<% if HouseCount %><li><a href="$Link/resetsearch">Reset search</a><% end_if %>
<% end_if %>
</ul>
<% if Houses.MoreThanOnePage %>
<div id="PageNumbers">
<% if Houses.NotFirstPage %>
<a class="prev" href="$Houses.PrevLink" title="View the previous page">Prev</a>
<% end_if %>
<span class="number">
<% control Houses.PaginationSummary(5) %>
<% if CurrentBool %>
$PageNum
<% else %>
<a href="$Link" title="View page number $PageNum">$PageNum</a>
<% end_if %>
<% end_control %>
</span>
<% if Houses.NotLastPage %>
<a class="next" href="$Houses.NextLink" title="View the next page">Next</a>
<% end_if %>
</div>
<% end_if %>
<% if Houses %>
<ul class="HouseResults">
<% control Houses %>
<li>$House</li>
<% end_control %>
</ul>
<% else %>
<p id="NoResult">Sorry, your search did not return any results. <a href="$Link/resetsearch">Search Again?</a></p>
<% end_if %>
</div>
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/image-upload.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/image-upload.md
| 5,773 | 1,758,118,090 |
en
|
# Creating a simple image uploader
Creating a simple image uploader in SilverStripe is relatively easy. In this example we want to create a banner image
that will extend across all pages of our site, this banner will be able to be different on each page of the site.
### Step 1: Set up the Database!
First we need to add an image field to our page so we have somewhere to store our image. Open up the Page type you want
to add the image uploader to. For example we will use Page.php which is located in mysite/code/. So go ahead and open
that up.
If we want to add an Image to our database we need to add it in the $has_one array (at the top) of a type 'Image'
** mysite/code/Page.php **
:::php
static $has_one = array(
'BannerImage' => 'Image'
);
Now visit yoursite.com/dev/build and recreate our database.
### Step 2: Add an image form to the CMS
We need to add a field to the CMS so that we can upload a image. So underneath that $db array we need to add this
getCMSFields function which overloads the CMS so we can add our field
** mysite/code/Page.php **
:::php
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.MyBannerImage", new ImageField("BannerImage"));
return $fields;
}
Now reload the admin panel and you should be able to click a page and you should have a MyImage Tab
### Step 3: Mod the Template to output the image
If you upload the image at the correct size all you need to do to output that image is to add a $MyImage varible to the
template file.
** themes/blackcandy/templates/Page.ss **
:::php
..
$BannerImage
..
Thats all you need to do to create an image upload form and to output it in your template. But perhaps you want to do
some more fancy stuff with that image? Like dynamically resize it? Read on
## More Advanced Uses
We defined the Image field in the $has_one array as a type of Image. Now we can extend Image using our very own class
for that image field. Its really simple even though we declared it as a **Image** it is actually a class
NameOfPageClass_ImageName.
How does that work? well we created a Image field in the Page class called 'BannerImage' so in Page.php we can define
another class called Page_BannerImage which extends Image. This enables us to add methods to image. Eg generate
different versions of that same image!. In the example below we want our banner to be a set size without touching the
original image.
** mysite/code/Page.php **
:::php
class Page_Controller extends ContentController {
...
}
class Page_BannerImage extends Image {
function generatePageBanner($gd) {
$gd->setQuality(100);
return $gd->paddedResize(619,154);
}
}
Now, we need to change the has_one relation for the image:
** mysite/code/Page.php **
:::php
static $has_one = array(
'BannerImage' => 'Page_BannerImage'
);
Lets step through this:
First we define a new class of Page_BannerImage. Remember the class is in the form of PageClass_ImageFieldName, in case
of this, a field of BannerImage in Page. *If you want to create an Image extention class that is not in this form it
must go into its own file, for example a class called 'BannerImage' would need to go into a file called
BannerImage.php.*
You can create any generate function, eg. function generateThumbnail, or function generateBanner. This allows us to
create multiple versions of the same image, for example thumbnails and large versions for a news feed.
$gd->setQuality defines the JPEG compression of the image. 100 being the best and taking the most space, 0 being the
worst and using the least space. 85% is convidered very high quality, 70% high, 50% ok, 30% poor. About 70-60% should be
good for most images.
return $gd->paddedResize is telling the GD libraries to resize at this size, padded (so that nothing of the image is
cropped). You can also use 'croppedResize' over 'paddedResize', so that it crops the image to the specified dimensions
if the image is large. (619,154) in this example means the image will be 619px in width, and 154px in height. See
http://doc.silverstripe.com/doku.php?id=gd for the various methods you can call.
## Using it in your template
:::html
<% if BannerImage.PageBanner %>
<img class="headerImage" src="$BannerImage.PageBanner.URL" alt="Header banner" />
<% else %>
<% control Page(home) %>
<img class="headerImage" src="$BannerImage.PageBanner.URL" alt="Header banner" />
<% end_control %>
<% end_if %>
Above is an example of using the BannerImage code that I wrote above in the Page.ss template.
$BannerImage is taken from the name of the image field, and PageBanner is the generated image (from the method
generatePageBanner). If I was to have another one called generateThumbnail then I would call it like this:
$Banner.Thumbnail.URL
This goes inside your `<img>` tag as the src attribute.
You may also notice that there is else logic in this statement. What this does it use the banner from the Home page if
subsequent pages don't have one uploaded yet. This is a simple way of making the template fall back to using a 'default'
banner.
You can also call [GD functions](http://doc.silverstripe.com/doku.php?id=gd) from the template, which will call the same
image generation functions.
:::html
<div id"Image">
<% control Image %>
<% control ResizedImage(150,50) %>
<img src="$URL" alt="My resized Image" width="150px" height"50px" />
<% end_control %>
<% end_control %>
</div>
## Template Image Resizing Functions
There is alot of functions available on the image class to make your life easier and cleaner. For a list of functions
that you can call see http://doc.silverstripe.com/doku.php?id=gd
## Form Image Upload
See [api:SimpleImageField]
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/dynamic-default-fields.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/dynamic-default-fields.md
| 1,200 | 1,758,118,090 |
en
|
Dynamic Default Values
======================
The [api:DataObject::$defaults] array allows you to specify simple static values to be the default value for when a
record is created, but in many situations default values needs to be dynamically calculated. In order to do this, the
[api:DataObjectSet->populateDefaults()] method will need to be overloaded.
This method is called whenever a new record is instantiated, and you must be sure to call the method on the parent
object!
A simple example is to set a field to the current date and time:
:::php
/**
* Sets the Date field to the current date.
*/
public function populateDefaults() {
$this->Date = date('Y-m-d');
parent::populateDefaults();
}
It's also possible to get the data from any other source, or another object, just by using the usual data retrieval
methods. For example:
:::php
/**
* This method combines the Title of the parent object with the Title of this
* object in the FullTitle field.
*/
public function populateDefaults() {
if($parent = $this->Parent()) {
$this->FullTitle = $parent->Title . ': ' . $this->Title;
} else {
$this->FullTitle = $this->Title;
}
parent::populateDefaults();
}
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/multilevel-menus.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/multilevel-menus.md
| 1,593 | 1,758,118,090 |
en
|
Below is a good example of a menu. It can be used for two levels of nesting. Beyond that, you'll probably need to create
functionality to recursively generate templating based on the level your pages are in.
What's special about this? We're using `<% if LinkingMode = current %>` to find out what the current page you're on in
the menu is. We then make that item in the menu a `<span>` element, so it isn't clickable (since you shouldn't be able
to click on the page you're currently on).
Menu items are also abstracted, so you're not relying on a certain element to be there, like a `<span>` or `<a>`. The
abstracted item has a class name of `.item`, so you style menu items using the class instead of the element.
:::html
<% if Menu(2) %>
<ul id="Menu2">
<% control Menu(2) %>
<li class="$LinkingMode<% if FirstLast %> $FirstLast<% end_if %>">
<% if LinkingMode = current %>
<span class="item selected">$MenuTitle</span>
<% else %>
<a class="item" href="$Link" title="View more on $Title">$MenuTitle</a>
<% end_if %>
<% if Children %>
<% if LinkingMode = section %>
<ul id="Menu3">
<% control Children %>
<li class="$LinkingMode<% if FirstLast %> $FirstLast<% end_if %>">
<% if LinkingMode = current %>
<span class="item selected">$MenuTitle</span>
<% else %>
<a class="item" href="$Link" title="View more on $Title">$MenuTitle</a>
<% end_if %>
</li>
<% end_control %>
</ul>
<% end_if %>
<% end_if %>
</li>
<% end_control %>
</ul>
<% end_if %>
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/database-troubleshooting.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/database-troubleshooting.md
| 874 | 1,758,118,090 |
en
|
## Orphaned data in sub-tables
**Symptom:** You try and add a new record and when you have it you get a "Duplicate ID ### in table subtable" error.
Occurs most frequently with SiteTree subclasses, due to their heavy use of the inheritance feature.
What's happened is that data has been deleted from the SiteTree table, but not from related tables, such as Page.
* The highest ID in SiteTree is 31, so 32 is chosen as the next ID.
* ID #32 is inserted into SiteTree successfully.
* ID #32 is inserted into Page, however, Page already contains ID #32.
* We get an error "Can't insert duplicate ID 32 into Page".
**Solution:**
* Remove the orphaned records from sub-tables such as Page manually. Don't forget to remove them Page_Live as well.
**Long term solutions:**
* We should stop the system from recycling ID #s.
* We should enforce relational integrity.
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/grouping-dataobjectsets.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/grouping-dataobjectsets.md
| 4,052 | 1,758,118,090 |
en
|
Grouping Data Object Sets
=========================
The [api:DataObjectSet] class has a number of methods useful for grouping objects by fields. Together with sorting this
can be used to break up long lists of data into more manageable sub-sections.
The [api:DataObjectSet->groupBy()] method takes a field name as the single argument, and breaks the set up into a number
of arrays, where each array contains only objects with the same value of that field. The [api:DataObjectSet->GroupedBy()]
method builds on this and returns the same data in a template-friendly format.
Grouping Sets By First Letter
-----------------------------
This example deals with breaking up a [api:DataObjectSet] into sub-headings by the first letter.
Let's say you have a set of Module objects, each representing a SilverStripe module, and you want to output a list of
these in alphabetical order, with each letter as a heading; something like the following list:
* B
* Blog
* C
* CMS Workflow
* Custom Translations
* D
* Database Plumber
* ...
The first step is to set up the basic data model, along with a method that returns the first letter of the title. This
will be used both for grouping and for the title in the template.
:::php
class Module extends DataObject {
public static $db = array(
'Title' => 'Varchar(255)'
);
// ...
/**
* Returns the first letter of the module title, used for grouping.
*
* @return string
*/
public function getTitleFirstLetter() {
return $this->Title[0];
}
}
The next step is to create a method or variable that will contain/return all the Module objects, sorted by title. For
this example this will be a method on the Page class.
:::php
class Page extends SiteTree {
// ...
/**
* Returns all modules, sorted by their title.
*
* @return DataObjectSet
*/
public function getModules() {
return DataObject::get('Module', null, '"Title"');
}
}
The final step is to render this into a template. The [api:DataObjectSet->GroupedBy()] method breaks up the set into
a number of sets, grouped by the field that is passed as the parameter. In this case, the getTitleFirstLetter method
defined earlier is used to break them up.
:::ss
<h2>Modules</h2>
<% control Modules.GroupedBy(TitleFirstLetter) %>
<h3>$TitleFirstLetter</h3>
<ul>
<% control Children %>
<li>$Title</li>
<% end_control %>
</ul>
<% end_control %>
Grouping Sets By Month
----------------------
Grouping a set by month is a very similar process. The only difference would be to sort the records by month name, and
then create a method on the DataObject that returns the month name, and pass that to the [api:DataObjectSet->GroupedBy()]
call.
Again, the first step is to create a method on the class in question that will be displayed in a list. For this example,
a [api:DataObject] called NewsItem will be used. This will have a method which returns the month it was posted in:
:::php
class NewsItem extends DataObject {
public static $db = array(
'Title' => 'Varchar(255)',
'Date' => 'Date'
);
// ...
/**
* Returns the month name this news item was posted in.
*
* @return string
*/
public function getMonthPosted() {
return date('F', strtotime($this->Date));
}
}
The next step is to create a method that will return all the News records that exist, sorted by month name from
January to December. This can be accomplshed by sorting by the Date field:
:::php
class Page extends SiteTree {
/**
* Returns all news items, sorted by the month they were posted
*
* @return DataObjectSet
*/
public function getNewsItems() {
return DataObject::get('NewsItem', null, '"Date"');
}
}
The final step is the render this into the template using the [api:DataObjectSet->GroupedBy()] method.
:::ss
<h2>Modules</h2>
<% control NewsItems.GroupedBy(MonthPosted) %>
<h3>$MonthPosted</h3>
<ul>
<% control Children %>
<li>$Title ($Date.Nice)</li>
<% end_control %>
</ul>
<% end_control %>
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/comments.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/comments.md
| 2,871 | 1,758,118,090 |
en
|
# Enabling Comments for Pages
All SilverStripe pages can have a simple comment interface added to them, simply by checking the checkbox in the CMS.
Technically, comments are managed through the [api:PageComment] and
[PageCommentInterface](api:PageCommentInterface) classes.
## Administration
Comments can either be reviewed in-place (when logged in with the correct permissions), or through a dedicated
interface at `admin/comments`. Comments in the CMS interface are seperated into three tables - "Approved", "Awaiting
Moderation", and "Spam". The table allow mass deletion and reclassification of comments. By default all comments not
detected as spam go into the "Approved" folder.
You can add `PageComment::enableModeration()` into your `mysite/_config.php` to enable moderation, which means all new
comments go into the Awaiting Moderation folder. Comments awaiting moderation will not be shown on the front end page
unless the user is an administrator.
## Spam Protection
The comment form (as well as any other form in SilverStripe) can be protected against spam,
usually caused by automated scripts. There are different ways to approach this problem,
all with varying success rates as well as impacts on user experiences.
### Math Question
Adding `MathSpamProtection::setEnabled()` to your `mysite/_config.php` enables the spam protection question for creating
comments within SilverStripe. An example question is "What is four plus five?". The question automatically updates if
the question is answered right or wrong.
### Akismet
The SSAkismet class provides spam detection for comments using [http://akismet.com/](http://akismet.com/). In order to
use it, you must get an API key, which you can get free for non-commercial use by signing up for a
[WordPress](http://www.wordpress.com) account. Commercial keys can be bought [here](http://akismet.com/commercial/).
To enable spam detection, set your API key in `mysite/_config.php`.
:::php
SSAkismet::setAPIKey('insertkeyhere');
If you want to save spam into the database so you can review them later, enable it in _config.php like so:
:::php
SSAkismet::setSaveSpam(true);
You can then view spam for a page by appending `?showspam=1` to the url.
Additional resources:
* [Demo of SSAkismet in action](http://demo.silverstripe.com/blog)
* Forum discussion: [Comments - additions and spam protection](http://www.silverstripe.com/feature-requests/flat/534)
### Mollom
[Mollom](http://mollom.com/) is a third-party hosted service for spam detection and CAPTCHA services. It is implemented
through the [mollom module](http://silverstripe.org/mollom-module).
### Recaptcha
[Recatpcha](http://recaptcha.net) does not directly detect spam, but provides high-quality CAPTCHA challenges to the
user. It is implemented through the [recatpcha module](http://silverstripe.org/recaptcha-module),
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/cache-control.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/cache-control.md
| 1,528 | 1,758,118,090 |
en
|
# Cache control
By default, PHP add caching headers that make the page appear "purely dynamic". This isn't usually appropriate for most
sites, even ones that are updated reasonably frequently. In particular, the default PHP cache-control settings prevent
sites from appearing in the internet archive. SilverStripe overrides the default settings with the following:
Default setting:
* The Last-Modified date is set to be most recent modification date of any database record queried in the generation of
the page.
* The Expiry date is set by taking the age of the page and adding that to the current time.
* Cache-Control is set to max-age=86400, must-revalidate
* Since a visitor cookie is set, the site won't be cached by proxies
* Ajax requests are never cached.
Overriding these defaults
* HTTP::set_cache_age($age) can be used to set the max-age component of the cache-control line, in seconds. Set it to
0 to disable caching; the "no-cache" clause in Cache-Control and Pragma will be included.
* HTTP::register_modification_date($dateString) can be used to set the modification date to something more recent than
the default.
* You can also override these settings while working in dev mode in your _config.php file by using;
:::php
if (Director::isDev()) {SSViewer::flush_template_cache();}
How it works:
* DataObject::__construct() calls HTTP::register_modification_date() whenever a record comes from the database
* Controllers::run() calls HTTP::add_cache_headers() before outputting the page
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/ssl.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/ssl.md
| 2,268 | 1,758,118,090 |
en
|
# Introduction
Switching between SSL and Non-SSL is handled by the [api:Director] class.
**Note:** Director::forceSSL() does not work if your site is in Dev mode, see ticket
[#4509](http://open.silverstripe.org/ticket/4509) if you need to test in Dev.
# Recipes
## Force SSL Redirection on all pages
For some sites, you will want everyone to access them using SSL / HTTPS. To facilitate this, put the following line
into _config.php:
Director::forceSSL();
This will automatically every http:// request to https://
**Note:** You won't notice the redirection when accessing the URL using the Development Server hostname.
## Force SSL Redirection on certain page types
This technique forces SSL on some page types, while the base page type makes sure to redirect to non-SSL if need be. It
will not do simply to call Director::setBaseURL with the non-SSL URL as the base, because this will cause your secure
page to link to graphics, CSS, and other assets insecurely. More than that, your secure form will post insecurely. Such
a setup will make modern browsers complain. So we will modify Page as well as MyPage, as shown below.
### Custom page type forcing SSL
:::php
class MySecurePage extends Page {
/* ... */
}
class MySecurePage_Controller extends Page_Controller {
function init() {
parent::init();
// causes an HTTP Redirect if in Non-SSL mode
Director::forceSSL();
}
function SecurePage() {
return true;
}
}
### Page class modifications to return non-secure pages to HTTP
:::php
class Page_Controller extends ContentController {
function init() {
parent::init();
if ( !$this->SecurePage() ) {
$this->force_HTTP();
}
}
function SecurePage() {
return false;
}
// if we are on https, redirect to the http version of this page's URL
function force_HTTP() {
$page_url = Director::absoluteURL( $_SERVER['REQUEST_URI'] );
$https_regex = '{^https:}';
if ( preg_match( $https_regex, $page_url ) ) {
$new_url = preg_replace( $https_regex, 'http:', $page_url );
Director::redirect($new_url);
}
}
}
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/phpunit-configuration.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/phpunit-configuration.md
| 5,972 | 1,758,118,090 |
en
|
# How to configure PHPUnit for your project
This guide helps you to run [PHPUnit](http://phpunit.de) tests in your SilverStripe project.
See "[Testing](/topics/testing)" for an overview on how to create unit tests.
## Executing through "sake dev/tests" or "phpunit"?
Short answer: Both are valid ways.
The `sake` executable that comes with SilverStripe can trigger a customized
"[api:TestRunner]" class that handles the PHPUnit configuration and output formatting.
It's tyically invoked to run all tests through `sake dev/tests/all`,
a single test with `sake dev/tests/MyTestClass`, or tests for a module with `sake dev/tests/module/mymodulename`.
While the custom test runner a handy tool, its also more limited than using `phpunit` directly,
particularly around formatting test output.
The `phpunit` executable uses a SilverStripe bootstrapper to autoload classes,
but handles its own test class retrieval, output formatting and other configuration.
It can format output in common structured formats used by "continuous integration" servers.
If you're using [phpUnderControl](http://phpundercontrol.org/) or a similar tool,
you will most likely need the `--log-junit` and `--coverage-xml` flags that are not available through `sake`.
All command-line arguments are documented on [phpunit.de](http://www.phpunit.de/manual/current/en/textui.html).
## Usage of "phpunit" executable
* `phpunit`: Runs all tests in all folders
* `phpunit sapphire/tests/`: Run all tests of the sapphire module
* `phpunit sapphire/tests/filesystem`: Run all filesystem tests within the sapphire module
* `phpunit sapphire/tests/filesystem/FolderTest.php`: Run a single test
## Coverage reports
* `phpunit --coverage-html assets/coverage-report`: Generate coverage report for the whole project
* `phpunit --coverage-html assets/coverage-report mysite/tests/`: Generate coverage report for the "mysite" module
## Customizing phpunit.xml.dist
The `phpunit` executable can be configured by commandline arguments or through an XML file.
File-based configuration has the advantage of enforcing certain rules across
test executions (e.g. excluding files from code coverage reports), and of course this
information can be version controlled and shared with other team members.
SilverStripe comes with a default `phpunit.xml.dist` that you can use as a starting point.
Copy the file into a new `phpunit.xml` and customize to your needs - PHPUnit will auto-detect
its existence, and prioritize it over the default file.
There's nothing stopping you from creating multiple XML files (see the `--configuration` flag in [PHPUnit documentation](http://www.phpunit.de/manual/current/en/textui.html)).
For example, you could have a `phpunit-unit-tests.xml` and `phpunit-functional-tests.xml` file (see below).
## Running unit and functional tests separately
You can use the filesystem structure of your unit tests to split
different aspects. In the simplest form, you can limit your test exeuction
to a specific directory by passing in a directory argument (`phpunit mymodule/tests`).
To specify multiple directories, you have to use the XML configuration file.
This can be useful to only run certain parts of your project
on continous integration, or produce coverage reports separately
for unit and functional tests.
Example `phpunit-unittests-only.xml`:
<phpunit bootstrap="/sapphire/tests/bootstrap.php" colors="true">
<testsuites>
<testsuite>
<directory>mysite/tests/unit</directory>
<directory>othermodule/tests/unit</directory>
<!-- ... -->
</testsuite>
</testsuites>
<!-- ... -->
</phpunit>
You can run with this XML configuration simply by invoking `phpunit --configuration phpunit-unittests-only.xml`.
The same effect can be achieved with the `--group` argument and some PHPDoc (see [phpunit.de](http://www.phpunit.de/manual/current/en/appendixes.configuration.html#appendixes.configuration.groups)).
## Adding/removing files for code coverage reports
Not all PHP code in your project should be regarded when producing [code coverage reports](http://www.phpunit.de/manual/current/en/code-coverage-analysis.html).
This applies for all thirdparty code
<filter>
<blacklist>
<directory suffix=".php">sapphire/dev/</directory>
<directory suffix=".php">sapphire/thirdparty/</directory>
<directory suffix=".php">cms/thirdparty/</directory>
<!-- Add your custom rules here -->
<directory suffix=".php">mysite/thirdparty/</directory>
</blacklist>
</filter>
See [phpunit.de](http://www.phpunit.de/manual/current/en/appendixes.configuration.html#appendixes.configuration.blacklist-whitelist) for more information.
## Speeding up your test execution with the SQLite3 module
Test execution can easily take a couple of minutes for a full run,
particularly if you have a lot of database write operations.
This is a problem when you're trying to to "[Test Driven Development](http://en.wikipedia.org/wiki/Test-driven_development)".
To speed things up a bit, you can simply use a faster database just for executing tests.
The sapphire database layer makes this relatively easy, most likely
you won't need to adjust any project code or alter SQL statements.
The [SQLite3 module](http://www.silverstripe.org/sqlite-database/) provides an interface
to a very fast database that requires minimal setup and is fully file-based.
It should give you up to 4x speed improvements over running tests in MySQL or other
more "heavy duty" relational databases.
Example `mysite/_config.php`:
// Customized configuration for running with different database settings.
// Ensure this code comes after ConfigureFromEnv.php
if(Director::isDev()) {
if($db = @$_GET['db']) {
global $databaseConfig;
if($db == 'sqlite3') $databaseConfig['type'] = 'SQLite3Database';
}
}
Note: It is recommended that you still run your tests with the original
database driver (at least on continuous integration) to ensure a realistic test scenario.
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/site-news.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/site-news.md
| 1,642 | 1,758,118,090 |
en
|
## Database set up
Create data-object types, NewsArticle and NewsSection. Give NewsArticle fields called Date and Abstract. Abstract could be generated from a content summary, if preferred.
:::php
class NewsSection extends Page {
static $allowed_children = array("NewsSection", "NewsArticle");
static $default_child = "NewsArticle";
}
class NewsSection_Controller extends Page_Controller {
}
:::php
class NewsArticle extends Page {
static $db = array(
"Date" => "Date",
"Abstract" => "Text",
);
static $allowed_children = 'none';
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Main", new DateField("Date","Date"), "Content");
$fields->addFieldToTab("Root.Content.Main", new TextareaField("Abstract","Abstract",4), "Content");
return $fields;
}
}
class NewsArticle_Controller extends Page_Controller {
}
### News feed on the homepage
Set the class to 'latest-news'
A few examples:
Date / Title list:
:::ss
<% if LatestNews %>
<h2>Latest news</h2>
<ul class="latest-news">
<% control LatestNews %>
<li><a href="$Link"><span>$Date.Nice</span> - $Title</a></li>
<% end_control %>
</ul>
<% end_if %>
:::ss
<% if LatestNews %>
<h2>Latest news</h2>
<ul class="latest-news">
<% control LatestNews %>
<li>
<a href="$Link">$Date.Nice - $Title</a>
<div class="description">$Description</a
</li>
<% end_control %>
</ul>
<% end_if %>
:::ss
<ul class="latest-news">
<% control LatestNews %>
<li><a href="$Link">$Date.Nice - $Title</a></li>
<% end_control %>
</ul>
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/print-stylesheets.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/print-stylesheets.md
| 1,177 | 1,758,118,090 |
en
|
# Adding a Print Stylesheet
You can add a print stylesheet to you site by adding a Stylesheet to the css folder in your theme and including it via
the [Requirements](http://doc.silverstripe.com/doku.php?id=requirements) class in your code files.
First task is to create a __MyPrintFile.css__ file in __themes/yourtheme/css/__.
** themes/yourtheme/css/MyPrintFile.css **
:::css
/* Print Stylesheet */
/* Do Things! */
You then need to open **mysite/code/Page.php** and add a Requirements::themedCSS() call to your css file.
** mysite/code/Page.php **
:::php
<?php
...
class Page_Controller extends ContentController {
function init() {
parent::init();
...
Requirements::themedCSS('MyPrintFile', 'print');
}
}
?>
[Requirements::themedCSS](http://doc.silverstripe.com/doku.php?id=requirements) will go to the folder
themes/yourtheme/css and load the filename (first argument - 'MyPrintFile') and then the second argument - 'print'
refers to the media type for the stylesheet - in this case we want a media="print" but you can use any of the media
types available - http://www.w3.org/TR/REC-CSS2/media.html
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/custom-content-placeholders.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/custom-content-placeholders.md
| 1,845 | 1,758,118,090 |
en
|
# Introduction
Sometimes, you will want the content that appears in your template to be slightly different from the content entered
into the CMS.
For example, you might want to let your author position a dynamic element, such as a paypal button, by entering a
special token such as $Paypal into the content.
What we need to do then is to load the content. Look through it for the token ($Paypal) and replace it with something
else. Luckily in PHP its simple
:::php
str_replace('$Paypal', $this->PaypalButton(), $this->Content);
How do we get the template to use this as the content, without affecting the CMS? We define a method called Content()
in the Page.php file in the Page_Controller class.
:::php
function Content() {
return str_replace('$Paypal', $this->PaypalButton(), $this->Content);
}
// see the $this->PaypalButton() string up 2 lines? well that calls the Paypal() method below
function PaypalButton() {
return "This could be HTML/Text/Images or PHP";
}
* The Content field will be used by the CMS to populate the WYSIWYG editor - it ignores any Content() method that
exists.
* The Content() method will be used in preference to the Content field by the template processor.
This technique of creating a function the same name as a field can be used to set up special behaviour for a field when
it is referenced within a template.
You can also extend this idea and include a whole separate template by using renderWith()
:::php
function Content() {
return str_replace('$Paypal', $this->PaypalButton(), $this->Content);
}
// see the $this->PaypalButton() string up 2 lines? well that calls the Paypal() method below
function PaypalButton() {
return $this->renderWith("Paypal");
}
** themes/blackcandy/templates/Includes/Paypal.ss **
:::html
<p>This could be HTML/Text/Images or PHP</p>
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/csv-import.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/csv-import.md
| 5,905 | 1,758,118,090 |
en
|
# Howto: Import CSV data
## Introduction
CSV import can be easily achieved through PHP's built-in `fgetcsv()` method,
but this method doesn't know anything about your datamodel. In SilverStripe,
this can be handled through the a specialized CSV importer class that can
be customized to fit your data.
## The CsvBulkLoader class
The [api:CsvBulkLoader] class facilitate complex CSV-imports by defining column-mappings and custom converters.
It uses PHP's built-in `fgetcsv()` function to process CSV input, and accepts a file handle as an input.
Feature overview:
* Custom column mapping
* Auto-detection of CSV-header rows
* Duplicate detection based on custom criteria
* Automatic generation of relations based on one or more columns in the CSV-Data
* Definition of custom import methods (e.g. for date conversion or combining multiple columns)
* Optional deletion of existing records if they're not present in the CSV-file
* Results grouped by "imported", "updated" and "deleted"
## Usage
You can use the CsvBulkLoader without subclassing or other customizations, if the column names
in your CSV file match `$db` properties in your dataobject. E.g. a simple import for the
`[api:Member]` class could have this data in a file:
:::csv
FirstName,LastName,Email
Donald,Duck,donald@disney.com
Daisy,Duck,daisy@disney.com
The loader would be triggered through the `load()` method:
:::php
$loader = new CsvBulkLoader('Member');
$result = $loader->load('<my-file-path>');
By the way, you can import `[api:Member]` and `[api:Group]` data through `http://localhost/admin/security`
interface out of the box.
## Import through ModelAdmin
The simplest way to use [api:CsvBulkLoader] is through a [api:ModelAdmin] interface - you get an upload form out of the box.
:::php
<?php
class PlayerAdmin extends ModelAdmin {
static $managed_models = array(
'Player'
);
static $model_importers = array(
'Player' => 'PlayerCsvBulkLoader',
);
static $url_segment = 'players';
}
?>
The new admin interface will be available under `http://localhost/admin/players`, the import form is located
below the search form on the left.
## Import through a custom controller
You can have more customized logic and interface feedback through a custom controller. Let's create a simple upload form (which is used for `MyDataObject` instances). You can access it through `http://localhost/MyController/?flush=all`.
:::php
<?php
class MyController extends Controller {
protected $template = "BlankPage";
function Link($action = null) {
return Controller::join_links('MyController', $action);
}
function Form() {
$form = new Form(
$this,
'Form',
new FieldSet(
new FileField('CsvFile', false)
),
new FieldSet(
new FormAction('doUpload', 'Upload')
),
new RequiredFields()
);
return $form;
}
function doUpload($data, $form) {
$loader = new CsvBulkLoader('MyDataObject');
$results = $loader->load($_FILES['CsvFile']['tmp_name']);
$messages = array();
if($results->CreatedCount()) $messages[] = sprintf('Imported %d items', $results->CreatedCount());
if($results->UpdatedCount()) $messages[] = sprintf('Updated %d items', $results->UpdatedCount());
if($results->DeletedCount()) $messages[] = sprintf('Deleted %d items', $results->DeletedCount());
if(!$messages) $messages[] = 'No changes';
$form->sessionMessage(implode(', ', $messages), 'good');
return $this->redirectBack();
}
}
Note: This interface is not secured, consider using [api:Permission::check()] to limit the controller to users
with certain access rights.
## Column mapping and relation import
We're going to use our knowledge from the previous example to import a more sophisticated CSV file.
Sample CSV Content
:::csv
"SpielerNummer","Name","Geburtsdatum","Gruppe"
11,"John Doe",1982-05-12,"FC Bayern"
12,"Jane Johnson", 1982-05-12,"FC Bayern"
13,"Jimmy Dole",,"Schalke 04"
Datamodel for Player
:::php
<?php
class Player extends DataObject {
static $db = array(
'PlayerNumber' => 'Int',
'FirstName' => 'Text',
'LastName' => 'Text',
'Birthday' => 'Date',
);
static $has_one = array(
'Team' => 'FootballTeam'
);
}
?>
Datamodel for FootballTeam:
:::php
<?php
class FootballTeam extends DataObject {
static $db = array(
'Title' => 'Text',
);
static $has_many = array(
'Players' => 'Player'
);
}
?>
Sample implementation of a custom loader. Assumes a CSV-file in a certain format (see below).
* Converts property names
* Splits a combined "Name" fields from the CSV-data into ''FirstName'' and ''Lastname'' by a custom importer method
* Avoids duplicate imports by a custom ''$duplicateChecks'' definition
* Creates ''Team'' relations automatically based on the ''Gruppe'' colum in the CSV data
:::php
<?php
class PlayerCsvBulkLoader extends CsvBulkLoader {
public $columnMap = array(
'Number' => 'PlayerNumber',
'Name' => '->importFirstAndLastName',
'Geburtsdatum' => 'Birthday',
'Gruppe' => 'Team.Title',
);
public $duplicateChecks = array(
'SpielerNummer' => 'PlayerNumber'
);
public $relationCallbacks = array(
'Team.Title' => array(
'relationname' => 'Team',
'callback' => 'getTeamByTitle'
)
);
static function importFirstAndLastName(&$obj, $val, $record) {
$parts = explode(' ', $val);
if(count($parts) != 2) return false;
$obj->FirstName = $parts[0];
$obj->LastName = $parts[1];
}
static function getTeamByTitle(&$obj, $val, $record) {
$SQL_val = Convert::raw2sql($val);
return DataObject::get_one(
'FootballTeam', "Title = '{$SQL_val}'"
);
}
}
?>
## Related
* [api:CsvParser]
* [api:ModelAdmin]
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/site-map.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/site-map.md
| 6,668 | 1,758,118,090 |
en
|
# ** Site Map Module Released **
A module has been released that supersedes the code used in this tutorial and makes it even simpler to create a
human-readable HTML site map page for your website. You can easily configure the Title, URL, page types to hide and
permissions check. It also includes 2 themes out of the box and more can be added.
Check it out here: http://silverstripe.org/site-map-module-module/
If you have any queries, amendments or new themes to discuss, you can find the module maintainer DesignCity on IRC most
weeks.
# Overview
This is a short tutorial demonstrating how to quickly add a Site Map to a SilverStripe site. While it is recommended
that you have completed the earlier tutorials, you should be able to simply copy/paste your way through this. You can
add the Site Map to a fresh install or to the tutorial site.
# What are we working towards?
We are going to add a site map to your site. The site map will contain a list of all of the pages on your site, even if
you have deselected the "Show in menus?" option on the Behaviour tab (To obey your "Show in menus?" option for top-level
pages, uncomment line 26 in SiteTree.php) . The site map will also ignore all pages with the ErrorPage type.

# Step 1: Creating the page type
We now need to create a page type so we can display the site map. Navigate to your */mysite/code* directory and create a
new file called **SiteMap.php**. SiteMap.php should contain the following:
:::php
<?php
class SiteMap extends Page {
static $db = array(
);
static $has_one = array(
);
}
class SiteMap_Controller extends Page_Controller {
/**
* This function will return a unordered list of all pages on the site.
* Watch for the switch between $page and $child in the second line of the foreach().
*
* Note that this will only skip ErrorPage's at the top/root level of the site.
* If you have an ErrorPage class somewhere else in the hierarchy, it will be displayed.
*/
function SiteMap() {
$rootLevel = DataObject::get("Page", "ParentID = 0"); // Pages at the root level only
$output = "";
$output = $this->makeList($rootLevel);
return $output;
}
private function makeList($pages) {
$output = "";
if(count($pages)) {
$output = '
<ul id="sitemap-list">';
foreach($pages as $page) {
if(!($page instanceof ErrorPage) && $page->ShowInMenus && $page->Title != $this->Title){
$output .= '
<li><a href="'.$page->URLSegment.'" title="Go to the '.Convert::raw2xml($page->Title).' page">'.Convert::raw2xml($page->MenuTitle).'</a>';
$whereStatement = "ParentID = ".$page->ID;
//$childPages = new DataObjectSet();
$childPages = DataObject::get("Page", $whereStatement);
$output .= $this->makeList($childPages);
$output .= '
</li>';
}
}
$output .= '
</ul>';
}
return $output;
}
}
?>
# Step 2: Rebuild the Database
Before continuing, we need to flush the database so that SilverStripe knows that we've just added a new page type. Visit
*http:*yoursite.com/dev/build //. You should be presented with a screen that looks like the following:

# Step 3: Creating the site map in the CMS
Now we need to create a new page in the CMS.
Launch the CMS (or refresh if the CMS was open when you rebuilt the database) and create a new SiteMap page. Save &
Publish and we're done in the CMS. You don't need to enter anything into the Content box.

# Step 4: Create the template for the site map
Next we need to create the template used to display the site map. You need to create a file called **SiteMap.ss** in the
following location: */mysite/templates/Layout/SiteMap.ss*. You'll know that you have the right directory becuase there
should already be a Page.ss file in there. If you're following the turotials, you might find
/tutorial/templates/Layout/SiteMap.ss will work for you.
SiteMap needs to include "**$SiteMap**" where you want the site map to appear. Here's an example from the Blackcandy
theme:
:::php
<div class="typography">
<% if Menu(2) %>
<% include SideBar %>
<div id="Content">
<% end_if %>
<% if Level(2) %>
<% include BreadCrumbs %>
<% end_if %>
<h2>$Title</h2>
$Content
$SiteMap
$Form
$PageComments
<% if Menu(2) %>
</div>
<% end_if %>
</div>
If you don't have any experience using the templates, use the contents of mysite/templates/Layout/Page.ss as a base and
add in "**$SiteMap**" below "$Content".
# Look mum, a site map!
That's it. You should now be able to navigate to the sitemap from your home page, and behold its respendid beauty.

Don't think it's so beautiful? The next section will give you some CSS to help you make it more attractive!
# Step 5: Styling your site map
There are plenty of resources for how to style a site map well:
* Try A List Apart's article "Spruced-Up Site Maps" (http://www.alistapart.com/articles/sprucemaps)
* Or BeTech's CSS Sitemap (http://betech.virginia.edu/index.php/2007/10/03/css-sitemap/)
* Or Zab Design's work (http://www.zabdesign.de/pro/public/sitemap/sitemap-styled.html)
* Or make it really easy for yourself and design it exactly like Silverstripe's Tree with two simple includes
(http://www.silverstripe.com/tree-control/)
However, if you're looking to get it the way you want it, there's nothing to do other than get your hands dirty. Here's
some code that can get you started:
:::css
/************************
SITEMAP
************************/
#sitemap-list {padding:0 0 0 10px; margin:0; list-style:none; font-weight:bold; line-height:150%} /*1st level list*/
#sitemap-list li {padding:10px; margin-top:10px; font-size:13px; background:#f0f0f0;} /*1st level items*/
#sitemap-list ul {margin:5px 10px 5px 10px; padding:5px 10px; font-weight:normal; background:#f8f8f8;} /*2nd level lists*/
#sitemap-list li li {padding:0; margin:0; list-style:none; font-weight:bold; font-size:11px; line-height:18px; background:none} /*2nd level items*/
#sitemap-list ul ul {margin-left:10px;padding:5px 10px; background:#fff;} /*3rd level lists*/
#sitemap-list li li li {font-size:11px; font-weight:normal;} /*3rd level items*/
And Voila!

# Summary
This tutorial has shown how easy it is to have SilverStripe create a site map for you on your next SilverStripe project.
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/file-to-page-linking.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/file-to-page-linking.md
| 1,796 | 1,758,118,090 |
en
|
# Adding a file to a page
This will add a file to a page very simply
### Step 1: Set up the Database!
First we need to add a file field to our page so we have somewhere to store our file. Open up the Page type you want to
add the file uploader to. For example we will use Page.php which is located in mysite/code/. So go ahead and open that
up.
If we want to add an File to our database we need to add it in the $has_one array (at the top) of a type 'File'
** mysite/code/Page.php **
:::php
static $has_one = array(
'Document' => 'File'
);
Now visit yoursite.com/db/build?flush=1 and recreate our database.
### Step 2: Add a file uploader to the CMS
We need to add a field to the CMS so that we can upload a file. So underneath that $db array we need to add this
getCMSFields function which overloads the CMS so we can add our field
** mysite/code/Page.php **
:::php
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Main", new FileIFrameField("Document"));
return $fields;
}
Now reload the admin panel and you should be able to click a page and see a document uploader.
### Step 3: Mod the Template to output the document
If you upload the file inside the CMS, all you need to do to output that file is to add a $Document variable to the
template file.
** themes/blackcandy/templates/Page.ss **
:::php
..
<a href="$Document.Link">$Document.Title</a>
..
Thats all you need to do to create an file upload form and to output it in your template.
The variable $Document uses the extensions from the file sapphire/Filesystem/Field.php. Some others you can use are
listed below:
$Document.Name
$Document.Title
$Document.Filename
$Document.Content
$Document.FileType
$Document.Size
$Document.AbsoluteURL
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/howto/customize-tinymce.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/howto/customize-tinymce.md
| 4,516 | 1,758,118,090 |
en
|
# HTML Editor Config
To customize the default tinymce configuration you can use HTMLEditorConfig class.
**Note this functionality is likely to be changed in future releases.** and should only be considered as a temporary way
of modifying the editor.
## How to Use
You can customize the installation by adding the following examples to your getCMSFields(). This will normally be found
in /mysite/code/Page.php, chances are if it's not there, you know where to find it.
Or if you want to apply the TinyMCE changes over all the text area fields you can add the code to your
mysite/_config.php file.
:::php
// mysite/code/Page.php
public function getCMSFields() {
$fields = parent::getCMSFields();
HtmlEditorConfig::get('cms')->setOption('verify_html', 'false');
return $fields;
}
// or in your mysite/_config.php
HtmlEditorConfig::get('cms')->setOption('verify_html', 'false');
## Enabling a Custom Plugin
:::php
// mysite/_config.php
HtmlEditorConfig::get('cms')->enablePlugins('../../tinymce_ssmacron'); // enables plugin
HtmlEditorConfig::get('cms')->insertButtonsAfter('charmap', 'ssmacron'); // positions plugin
## Setting TinyMCE Options (eg valid elements)
You can customize any of the [TinyMCE](http://wiki.moxiecode.com/index.php/TinyMCE:Configuration) options by calling
setOption('optionname', 'value').
### Customizing allowed HTML
If you want to extend the HTML that the textarea can support you can do so by adding the elements to the valid_elements
or extended_valid_elements list. If the HTML you want to insert is not in one of these arrays it will be stripped out.
For example if you wanted to allow an html element `<foo>` you can add it to the list
:::php
// mysite/_config.php or in your specific form
HtmlEditorConfig::get('cms')->setOptions(array(
'valid_elements' => "@[id|class|style|title],#a[id|rel|rev|dir|tabindex|accesskey|type|name|href|target|title|class],-strong/-b[class],-em/-i[class],-strike[class],-u[class],#p[id|dir|class|align|style],-ol[class],-ul[class],-li[class],br,img[id|dir|longdesc|usemap|class|src|border|alt=|title|width|height|align],-sub[class],-sup[class],-blockquote[dir|class],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|dir|id|style],-tr[id|dir|class|rowspan|width|height|align|valign|bgcolor|background|bordercolor|style],tbody[id|class|style],thead[id|class|style],tfoot[id|class|style],#td[id|dir|class|colspan|rowspan|width|height|align|valign|scope|style],-th[id|dir|class|colspan|rowspan|width|height|align|valign|scope|style],caption[id|dir|class],-div[id|dir|class|align|style],-span[class|align|style],-pre[class|align],address[class|align],-h1[id|dir|class|align|style],-h2[id|dir|class|align|style],-h3[id|dir|class|align|style],-h4[id|dir|class|align|style],-h5[id|dir|class|align|style],-h6[id|dir|class|align|style],hr[class],dd[id|class|title|dir],dl[id|class|title|dir],dt[id|class|title|dir],@[id,style,class]",
'extended_valid_elements' => "foo,img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|usemap],iframe[src|name|width|height|align|frameborder|marginwidth|marginheight|scrolling],object[width|height|data|type],param[name|value],map[class|name|id],area[shape|coords|href|target|alt]"
));
The [ ] define what attributes you can add to `<foo>` for example `<foo class="baz" title="Bar">` would be represented as
foo[class|title]
### Allowing javascript in the content editor
A common situation is a page requires its own javascript to be added in the cms. You can extend the valid options to
allow for javascript by adding this to your mysite/_config file
:::php
HtmlEditorConfig::get('cms')->setOption('extended_valid_elements', "script[type|src],img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|usemap],iframe[src|name|width|height|align|frameborder|marginwidth|marginheight|scrolling],object[width|height|data|type],param[name|value],map[class|name|id],area[shape|coords|href|target|alt]");
### Turning off all HTML Validation
By default TinyMCE provides a restrictive set of HTML which it deems as 'safe'. Please remember that malformed or
malicious HTML is a very real threat so disabling HTML validation for fields which accept user contributed content is
risky. You should only disable validation and extend valid elements as a last resort.
:::php
// mysite/_config.php
HtmlEditorConfig::get('cms')->setOption('verify_html', 'false'); // turn off html validation
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/misc/index.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/misc/index.md
| 0 | 1,758,118,090 |
en
|
2025-09-24T14:46:58.085215
|
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/misc/contributing.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/misc/contributing.md
| 8,688 | 1,758,118,090 |
en
|
# Contributing
Any open source product is only as good as the
community behind it. You can participate by sharing
code, ideas, or simply helping others. No matter what
your skill level is, every contribution counts.
See http://silverstripe.org/contributing-to-silverstripe for a highlevel overview
on how you can help out.
## Sharing your Opinion
* [silverstripe.org/forums](http://silverstripe.org/forums): Forums on silverstripe.org
* [silverstripe-dev](http://groups.google.com/group/silverstripe-dev): Core development mailinglist
* [silverstripe-documentation](http://groups.google.com/group/silverstripe-documentation): Documentation team mailinglist
## Submitting Patches
If you have created a patch to fix a bug in one the modules - thank you so much! :D To submit the patch,
[register](http://open.silverstripe.com/register) and attach the patch to the appropriate ticket. Please include in the
comment the revision number that the patch is applicable for and a brief outline of what you fixed and how.
Only use the provided link to submit patches, as it prefills information about owner and ticket-type:
[Submit a patch (requires account on
open.silverstripe.org)](http://open.silverstripe.com/newticket?field_type=patch&field_owner=ischommer&attachment=1)
The core team is responsible for reviewing the patches and deciding if they will make it into core. If
there are any problems they will assign the ticket back to you, so make sure you have an email address loaded into Trac
so that it will notify you! The Trac report [Active Patches](http://open.silverstripe.com/report/10) will let you see
where all the patches are at.
You can create a patch file through the svn diff-command on the command-line.
More info in the [svn redbook](http://svnbook.red-bean.com/en/1.1/ch03s05.html#svn-ch-3-sect-5.3.2).
Note: Your code-editor might have a GUI for creating patches.
# in a working copy folder (e.g /myproject)
svn diff sapphire/ > ~/patch.diff
* Submit your patch in *diff -u* or *diff -c format*.
* **Check your patches against a svn checkout of the [current trunk](http://open.silverstripe.com/browser/modules)**.
Please not that the latest stable release will often not be sufficient! (of all modules)
* If your patch is extensive, discuss it first on the [silverstripe
forum]([[http///www.silverstripe.com/silverstripe-forum/) (optimally before doing any serious coding)
* Adhere to our [coding conventions](http://doc.silverstripe.com/doku.php?id=coding-conventions)
* Provide complete [unit test coverage](/topics/testing) - depending on the complexity of your work, this is a required
step.
* Describe specifics on how to test the effects of the patch
* It's better to submit multiple patches with separate bits of functionality than a big patch containing lots of
changes
* If your patch involves new files, create a compressed archive for them (including any required directory-structures)
* Create patches relative to the working copy (//sapphire/main.php// instead of */Users/myuser/sapphire/main.php*)
* Document your code inline through [PHPDoc](http://en.wikipedia.org/wiki/PHPDoc) syntax. See our [API
documentation](http://api.silverstripe.org/trunk) for good examples.
* Also check and refer to wiki documentation on [doc.silverstripe.com](http://doc.silverstripe.com ) which needs
changes. Check for any references to functionality deprecated or extended through your patch. Please don't alter the
documentation before your patch is integrated.
* Remember the [shortcomings](http://subversion.tigris.org/project_tasks.html#svn-augmented-diff) of *svn diff*: Please
document moved files and created/deleted directories separately
## Reporting Security Issues
Report security issues to [security@silverstripe.com](mailto/security@silverstripe.com). Please don't file security
issues in our [bugtracker](http://open.silverstripe.org). In the event of a confirmed vulnerability in SilverStripe
core, we will take the following actions:
* Acknowledge to the reporter that we’ve received the report and that a fix is forthcoming. We’ll give a rough
timeline and ask the reporter to keep the issue confidential until we announce it.
* Halt all other development as long as is needed to develop a fix, including patches against the current and one
previous major release (if applicable).
* We will inform you about resolution and [announce](http://groups.google.com/group/silverstripe-announce) a [new
release](http://silverstripe.org/security-releases/) publically.
You can help us determine the problem and speed up responses by providing us with more information on how to reproduce
the issue: SilverStripe version (incl. any installed modules), PHP/webserver version and configuration, anonymized
webserver access logs (if a hack is suspected), any other services and web packages running on the same server.
## Writing Documentation
### Repositories
* End-user: [userhelp.silverstripe.com](http://userhelp.silverstripe.com):
* Developer Guides: [doc.silverstripe.com](http://doc.silverstripe.com)
* Developer API Docuumentation: [api.silverstripe.com](http://api.silverstripe.com)
### What to write
* **API Docs**: Written alongside source code, this documents the low-level, technical usage of a class, method or property.
Not suited for longer textual descriptions, due to the limited support of PHPDoc formatting for headlines.
* **Tutorials**: The first contact for new users, guiding them step-by-step through achievable projects, in a book-like style.
*Example: Building a basic site*
* **Topics**: Provides an overview on how things fit togehter, the "conceptual glue" between APIs and features.
This is where most documentation should live, and is the natural "second step" after finishing the tutorials.
*Example: Templates, Testing, Datamodel*
* **Howto**: Recipes that solve a specific task or problem, rather than describing a feature.
*Example: Export DataObjects as CSV, Customizing TinyMCE in the CMS*
* **Reference**: Complements API docs in providing deeper introduction into a specific API. Most documentation
should fit elsewhere. *Example: ModelAdmin*
* **Misc**: "Meta" documentation like coding conventions that doesn't directly relate to a feature or API.
See [What to write (jacobian.org)](http://jacobian.org/writing/great-documentation/what-to-write/) for an excellent
introduction to the different types of documentation.
### Structure
* Don't duplicate: Search for existing places to put your documentation. Do you really require a new page, or just a new paragraph
of text somewhere?
* Use PHPDoc in source code: Leave lowlevel technical documentation to code comments within PHP, in [PHPDoc](http://en.wikipedia.org/wiki/PHPDoc) format.
* Use Markdown in Developer Guides: We have a slightly customized version of Markdown called [SSMarkdown][ss-markdown]
* API and Developer Guides complement each other: Both forms of documenting sourcecode (API and Developer Guides) are valueable ressources.
* Provide context: Give API documentation the "bigger picture" by referring to Developer Guides inside your PHPDoc.
* Make your documentation findable: Documentation lives by interlinking content, so please make sure your contribution doesn't become an
inaccessible island. Your page should at least be linked on the index page in the same folder. It can also appear
as "related content" on other resource (e.g. [topics/search](/topics/search) might link to [howto/search-dataobjects](/howto/search-dataobjects)).
* Avoid FAQs: FAQs are not a replacement of a coherent, well explained documentation. If you've done a good job
documenting, there shouldn't be any "frequently asked questions" left ;)
* Commit early and often: You don't need to completely finish documentation, as long as you mark areas needing refinement.
* Every file should have exactly one `<h1>` headline, roughly matching the filename. It should be short enough to be
used in table of content lists.
### Writing Style
* Write in second plural form: Use "we" instead of "I". It gives the text an instructive and collaborative style.
* Its okay to address the reader: For example "First you'll install a webserver" is good style.
* Write in an active and direct voice
* Mark up correctly: Use preformatted text, emphasis and bold to make technical writing more "scannable".
### Further reading
* [Writing great documentation (jacobian.org)](http://jacobian.org/writing/great-documentation/)
* [How tech writing sucks: Five Sins](http://www.slash7.com/articles/2006/11/15/tech-writing-the-five-sins)
* [What is good documentation?](http://www.techscribe.co.uk/techw/whatis.htm)
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/misc/ss-markdown.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/misc/ss-markdown.md
| 4,613 | 1,758,118,090 |
en
|
# SilverStripe Markdown Syntax
As Markdown by default is quite limited and not well suited for technical documentation,
the SilverStripe project relies on certain syntax additions. As a base syntax, we use
the [Markdown Extra](http://michelf.com/projects/php-markdown/extra/) format, which provides us
with support for tables, definition lists, code blocks and inline HTML.
**Please read the [Markdown](http://daringfireball.net/projects/markdown/syntax) and
[Markdown Extra](http://michelf.com/projects/php-markdown/extra/) documentation for a syntax overview**
On top of that, we have added syntax that is only resolved by our custom parser.
The goal is to keep the customization to a necessary minimum,
and HTML output should still be readable with our custom markup unparsed.
## Rendering
While most of the Markdown syntax is parseable by all common implementations,
the special syntax is relying on a custom SilverStripe project that powers `http://doc.silverstripe.org`.
The website a standard SilverStripe installation with the [sapphiredocs](http://open.silverstripe.org/browser/modules/sapphiredocs/trunk)
module installed (see module [README](http://open.silverstripe.org/browser/modules/sapphiredocs/trunk/README.md) and
[documentation](http://open.silverstripe.org/browser/modules/sapphiredocs/trunk/docs/en)).
## Syntax
### Relative Links
Relative links can point to other markdown pages in the same module.
They are always referred to **without** the `.md` file extension.
"Absolute" links relate to the root of a certain module,
not the webroot of the renderer project or the filesystem root.
* link to folder on same level: `[title](sibling/)`
* link to page on same level: `[title](sibling)`
* link to parent folder: `[title](../parent/)`
* link to page in parent folder: `[title](../parent/page)`
* link to root folder: `[title](/)`
* link to root page: `[title](/rootpage)`
Don't forget the trailing slash for directory links,
it is important to distinguish files from directories.
Note: It is recommended to use absolute links over relative links
to make files easier to move around without changing all links.
### API Links
You can link to API documentation from within the markup by pseudo-links.
These are automatically resolved to the right URL on `http://api.silverstripe.org`.
API links are automatically wrapped in `<code>` blocks by the formatter.
* Link to class: `[api:DataObject]`
* Link to static method: `[api:DataObject::has_one()]`
* Link to instance method: `[api:DataObject->write()]`
* Link to static property: `[api:DataObject::$searchable_fields]`
* Link to instance property: `[api:DataObject->changedFields]`
* Custom titles: `[my title](api:DataObject)`
There's some gotchas:
* This notation can't be used in code blocks.
* If you want to use API links to other modules or versions of the same module, you'll have to use the full `http://` URL.
* You can't mark API links in backticks to trigger `<pre>` formatting, as it will stop the link parsing.
The backticks are automatically added by the parser.
### Code Blocks with Highlighting
Code blocks can optionally contain language hints that a syntax highlighter can
pick up. Use the first line in the block to add a language identifier, prefixed by three colons (`:::`), for example `:::php`.
We're currently using the [syntaxhighlighter](http://code.google.com/p/syntaxhighlighter/) JavaScript implementation.
See a [list of supported languages](http://code.google.com/p/syntaxhighlighter/wiki/Languages).
Example for PHP:
:::php
class Page extends SiteTree {
function myFunction() {
// ...
}
}
For SilverStripe templates, please use `:::ss` as a brush.
### Images
As a convention, referenced images in a Markdown formatted page should always be stored
in an `_images/` folder on the same level as the page itself. Try to keep the image size
small, as we typically package the documentation with the source code download, and
need to keep the file size small.
You can link to absolute image URLs as well, of course.
## FAQs
### How do I preview my own SS Markdown?
Thats only possible with the `sapphiredocs` module - we don't have a standalone parser.
### Can I run my own documentation server?
Yes, the `sapphiredocs` module just requires a default SilverStripe installation (2.4+).
### Can I generate SS Markdown other formats?
Currently this is not supported, as all HTML is generated on the fly.
### Can I contribute to the parser and rendering project?
Of course, the `sapphiredocs` code is BSD licensed - we're looking forward to your contributions!
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/misc/coding-conventions.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/misc/coding-conventions.md
| 5,689 | 1,758,118,090 |
en
|
# Coding Conventions
This document provides guidelines for code formatting and documentation
to developers contributing to SilverStripe. It applies to all PHP files
in the sapphire/ and cms/ modules, as well as any supported additional modules.
Coding standards are an important aspect for every software project,
and facilitate collaboration by making code more consistent and readable.
If you are unsure about a specific standard, imitate existing SilverStripe code.
## Indentation
Always use hard tabs rather then spaces for indentation, with one tab per nesting level.
Spaces are not allowed.
:::php
class CorrectIndentationExample {
function foo() {
return true;
}
}
## Class and Method Naming
Class and filenames are in `UpperCamelCase` format:
:::php
class MyClass {}
Static methods should be in `lowercase_with_underscores()` format:
:::php
static function my_static_method() {}
Action handlers on controllers should be in `completelylowercase()` format without spaces or underscore.
This is because they go into the controller URL in the same format (eg, `home/successfullyinstalled`).
:::php
function mycontrolleraction() {}
Object methods that will be callable from templates should be in `$this->UpperCamelCase()` format.
Alternatively, `$this->getUpperCamelCase()` will work the same way in templates -
you can access both coding styles as `$UpperCamelCase`.
Other instance methods should be in `$this->lowerCamelCase()` format:
:::php
function myInstanceMethod() {}
## Variable Naming
Static variables should be `self::$lowercase_with_underscores`
:::php
self::$my_static_variable = 'foo';
Object variables should be `$this->lowerCamelCase`
:::php
$this->myObjectVariable = 'foo';
Constants should be `UPPERCASE_WITH_UNDERSCORES`
:::php
define('INTEREST_RATE', 0.19);
## File Naming and Directory Structure
Classes need to be in a file of the same name. If a class name has an underscore, then the file name has to be the text before the underscore.
For example `MyClass` and `MyClass_Controller` will both need to be placed into `MyClass.php`.
Example: `mysite/code/MyClass.php`
:::php
<?php
class MyClass {}
class MyClass_Controller {}
class MyClass_OtherRelatedClass {}
To help with namespacing common class names (like Database) it is recommended to use a prefix convention `SS_ClassName` but the filename will remain `ClassName.php`.
See [/topics/directory-structure](directory-structure) for more information.
## Coding
Start all your php script files with `<?php`. Don't use `<?`.
Don't end your PHP file with `?>`. Leave it blank. This prevents any whitespace which can generate errors in your code
Keep the opening brace on the same line as the statement.
:::php
function foo() {
// good
}
function bar()
{
// bad
}
Try to avoid using PHP's ability to mix HTML into the code.
:::php
// PHP code
function getTitle() {
return "<h2>Bad Example</h2>";
}
// Template code
$Title
Better: Keep HTML in template files:
:::php
// PHP code
function getTitle() {
return "Better Example";
}
// Template code
<h2>$Title</h2>
Check for value before stepping into a foreach-loop
:::php
if($A_authors) {
foreach($A_authors as $author) {}
}
## Comments
Use [phpdoc](http://phpdoc.org/) syntax before each definition (see [tutorial](http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.quickstart.pkg.html)
and [tag overview](http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.pkg.html)).
* All class definitions and PHP files should have `@package` and `@subpackage`.
* Methods should include at least `@param` and `@return`.
* Include a blank line after the description.
* Use `{@link MyOtherClass}` and `{@link MyOtherClass->otherMethod}` for inline references.
* Denote preformatted code examples in `<code></code>` blocks.
* Always start block-level comments containing phpdoc with two asterisks (`/** ... */`).
Example:
:::php
/**
* My short description for this class.
* My longer description with
* multiple lines and richer formatting.
*
* Usage:
* <code>
* $c = new MyClass();
* $c->myMethod();
* </code>
*
* @package custom
*/
class MyClass extends Class {
/**
* My Method.
* This method returns something cool. {@link MyParentMethod} has other cool stuff in it.
*
* @param string $colour The colour of cool things that you want
* @return DataObjectSet A list of everything cool
*/
public function myMethod($foo) {}
}
## Class Member Ordering
Put code into the classes in the following order (where applicable).
* Static variables
* Object variables
* Static methods
* Data-model definition static variables. (`$db`, `$has_one`, `$many_many`, etc)
* Commonly used methods like `getCMSFields()`
* Accessor methods (`getMyField()` and `setMyField()`)
* Controller action methods
* Template data-access methods (methods that will be called by a `$MethodName` or `<% control MethodName %>` construct in a template somewhere)
* Object methods
## SQL
### Escaping Values
Always convert values you get from the user before you do SQL queries.
:::php
$value = Convert::raw2sql($value);
### Writing Queries for Database Abstraction
To make sure your code works across databases make sure you escape your queries like below,
with the column or table name escaped with double quotes and values with single quotes.
:::php
DataObject::get("MyClass", "\"Title\" = 'my title'");
## Security
See [secure-development](secure-development) for conventions related to handing security permissions.
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/tutorials/2-extending-a-basic-site.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/tutorials/2-extending-a-basic-site.md
| 23,396 | 1,758,118,090 |
en
|
# Overview
In the [first tutorial](/tutorials/1-building-a-basic-site) we learned how to create a basic site using SilverStripe. This
tutorial builds on what you have learned in [the first tutorial](/tutorials/1-building-a-basic-site), so it is recommended
that you complete it first.
In this tutorial you will explore extending SilverStripe by creating your own page types. In doing this you will get a
good overview of how SilverStripe works.
# What are we working towards?
Throughout this tutorial we are going to work on adding two new sections to the site we built in the first tutorial. The
first is a news section, with a recent news listing on the homepage and an RSS feed. The second is a staff section,
which demonstrates more complex database structures by associating an image with each staff member.

# The SilverStripe data model
A large part of designing complex SilverStripe sites is the creation of your own page types. Before we progress any
further, it is important to understand what a page type is, and how the SilverStripe data model works.
SilverStripe is based on the "Model-View-Controller" design pattern. This means that SilverStripe attempts to separate
data, logic and presentation as much as possible. Every page has three separate parts which are combined to give you the
final page.
The "view" is the presentation of your site. As we have already seen, the templates SilverStripe uses to render a page
is dependent on the page type. Using both your templates and css, you are able to have full control over the
presentation of your site.
All content on your site is stored in a database. There is a table in the database corresponding for every class that is
a child of the `[api:DataObject]` class. Every object of that class corresponds to a row in that table -
this is your "data object", the "model" of Model-View-Controller. A page type has a data object that represents all the
data for your page - rather than inheriting directly from `[api:DataObject]` it inherits from
`[api:SiteTree]`. We generally create a "Page" data object, and subclass this for the rest of the page types.
This allows us to define behavior that is consistent across all pages in our site.
A page type also has a *controller*. A controller contains all the code used to manipulate your data before it is
rendered. For example, suppose you were making an auction site, and you only wanted to display the auctions closing in
the next ten minutes. You would implement this in the controller. The controller for a page should inherit from
`[api:ContentController]`. Just as we create a "Page" data object and subclass it for the rest of the
site, we also create a "Page_Controller" that is subclassed.
Creating a new page type simply requires creating these three things. You can then have full control over presentation,
the database, which fields can be edited in the CMS, and can use code to make our pages do much more clever things. A
more in-depth introduction of Model-View-Controller can be found
[here](http://www.slash7.com/articles/2005/02/22/mvc-the-most-vexing-conundrum).

# Creating the news section page types
Let's make our news section. We'll need two new page types for this. The first one is obvious: we need an *ArticlePage*
page type. The second is a little less obvious: we need an *ArticleHolder* page type that contains our articles.
We'll start with the *ArticlePage* page type. First we create the model, a class called "ArticlePage". We put the
*ArticlePage* class into a file called "ArticlePage.php" inside *mysite/code*. We also put the controller,
*ArticlePage_Controller*, in here. Any other classes that are related to *ArticlePage* – for example, the class
*ArticlePage_AnythingElse* - will also go into "ArticlePage.php".
**mysite/code/ArticlePage.php**
:::php
<?php
/**
* Defines the ArticlePage page type
*/
class ArticlePage extends Page {
static $db = array(
);
static $has_one = array(
);
}
class ArticlePage_Controller extends Page_Controller {
}
?>
Here we've created our data object/controller pair, but we haven't actually extended them at all. Don't worry about the
*$db* and *$has_one* arrays just yet, we'll explain them soon, as well as other ways in which you can extend your page
types. SilverStripe will use the template for the *Page* page type as explained in the first tutorial, so we don't need
to specifically create the view for this page type.
Let's create the *ArticleHolder* page type.
**mysite/code/ArticleHolder.php**
:::php
<?php
/**
* Defines the ArticleHolder page type
*/
class ArticleHolder extends Page {
static $db = array(
);
static $has_one = array(
);
static $allowed_children = array('ArticlePage');
}
class ArticleHolder_Controller extends Page_Controller {
}
?>
Here we have done something interesting: the *$allowed_children* field. This is one of a number of static fields we can
define to change the properties of a page type. The *$allowed_children* field is an array of page types that are allowed
to be children of the page in the site tree. As we only want news articles in the news section, we only want
*ArticlePage* pages for children. We can enforce this in the CMS by setting the *$allowed_children* field.
We will be introducing other fields like this as we progress; there is a full list in the documentation for
`[api:SiteTree]`.
Now that we have created our page types, we need to let SilverStripe rebuild the database. Go to
[http://localhost/dev/build?flush=1](http://localhost/dev/build?flush=1). SilverStripe will detect that there are two
new page types and add them to the list of page types in the database.
[note]
It is SilverStripe convention to suffix general page types with "Page", and page types that hold other page types with
"Holder". This is to ensure that we don't have URLs with the same name as a page type; if we named our *ArticleHolder*
page type "News", it would conflict with the page name also called "News".
[/note]
# Adding date and author fields
Now that we have an *ArticlePage* page type, let's make it a little more useful. Remember the *$db* array? We can use
this array to add extra fields to the database. It would be nice to know when each article was posted, and who posted
it. Change the *$db* array in the *ArticlePage* class so it looks like this:
:::php
<?php
class ArticlePage extends Page {
static $db = array(
'Date' => 'Date',
'Author' => 'Text'
);
// .....
}
Every entry in the array is a key-value pair. The key is the name of the field, and the value is the type. We have a
//`[api:Date]` for a complete list of different data types.
Note: The names chosen for the fields you add must not already be used. Be careful using field names such as Title,
Content etc. as these may already be defined in the page types your new page is extending from.
If we rebuild the database, we will see that now the *ArticlePage* table is created. Even though we had an *ArticlePage*
page type before, the table was not created because we had no fields that were unique to the article page type. We now
have the extra fields in the database, but still no way of changing them. To add these fields to the CMS we have to
override the *getCMSFields()* method, which is called by the CMS when it creates the form to edit a page. Add the
method to the *ArticlePage* class.
:::php
<?php
class ArticlePage extends Page {
// ...
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new DateField('Date'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Author'), 'Content');
return $fields;
}
}
// ...
Let's walk through this method.
:::php
$fields = parent::getCMSFields();
Firstly, we get the fields from the parent class; we want to add fields, not replace them. The *$fields* variable
returned is a //`[api:FieldSet]`// object.
:::php
$fields->addFieldToTab('Root.Content.Main', new DateField('Date'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Author'), 'Content');
We can then add our new fields with *addFieldToTab*. The first argument is the tab on which we want to add the field to:
"Root.Content.Main" is the tab which the content editor is on. The second argument is the field to add; this is not a
database field, but a //`[api:FormField]`// documentation for more details.
:::php
return $fields;
Finally, we return the fields to the CMS. If we flush the cache (//?flush=1//), we will be able to edit the fields in
the CMS.
Now that we have created our page types, let's add some content. Go into the CMS and create an *ArticleHolder* page
named "News", and create some *ArticlePage*s inside it.

# Creating the templates
We can already look at the content of news pages on our site, because the article holder page and the article pages
inherit their templates from Page. But we're not getting the author and date fields displayed in either case.
So let's create a template for each of our new page types. We'll put these in *themes/tutorial/templates/Layout* so we
only have to define the page specific parts: SilverStripe will use *themes/tutorial/templates/Page.ss* for the basic
page layout.
First, the template for displaying a single article:
** themes/tutorial/templates/Layout/ArticlePage.ss **
:::html
<% if Menu(2) %>
<ul id="Menu2">
<% control Menu(2) %>
<li class="$LinkingMode"><a href="$Link" title="Go to the $Title page">$MenuTitle</a></li>
<% end_control %>
</ul>
<% end_if %>
<div id="Content" class="typography">
<% if Level(2) %>
<div class="breadcrumbs">
$Breadcrumbs
</div>
<% end_if %>
<h1>$Title</h1>
$Content
<div class="newsDetails">
Posted on $Date.Nice by $Author
</div>
</div>
The first block of code is our regular second level menu; we also have our regular breadcrumbs code here. We will see
how to remove these blocks of repetitive code in a bit.
We use *$Date* and *$Author* to access the new fields. In fact, all template variables and page controls come from
either the data object or the controller for the page being displayed. The *$Breadcrumbs* variable comes from the
*Breadcrumbs()* method of the //`[api:SiteTree]`// class. *$Date* and *$Author* come from the *Article* table through
your data object. *$Content* comes from the *SiteTree* table through the same data object. The data for your page is
spread across several tables in the database matched by id - e.g. *Content* is in the *SiteTree* table, and *Date* and
*Author* are in the *Article* table. SilverStripe matches these records by their ids and collates them into the single
data object.

Rather than using *$Date* directly, we use *$Date.Nice*. If we look in the //`[api:Date]`// documentation, we can see
that the *Nice* function returns the date in *dd/mm/yyyy* format, rather than the *yyyy-mm-dd* format stored in the
database.

Now we'll create a template for the article holder: we want our news section to show a list of news items, each with a
summary.
**themes/tutorial/templates/Layout/ArticleHolder.ss**
:::html
<div id="Content" class="typography">
$Content
<ul id="NewsList">
<% control Children %>
<li class="newsDateTitle"><a href="$Link" title="Read more on "{$Title}"">$Title</a></li>
<li class="newsDateTitle">$Date.Nice</li>
<li class="newsSummary">$Content.FirstParagraph <a href="$Link" title="Read more on "{$Title}"">Read more >></a></li>
<% end_control %>
</ul>
</div>
Here we use the page control *Children*. As the name suggests, this control allows you to iterate over the children of a
page, which in this case is our news articles. The *$Link* variable will give the address of the article which we can
use to create a link, and the *FirstParagraph* function of the `[api:HTMLText]` field gives us a nice summary of the
article.

Remember that the visual styles are not part of the CMS, they are defined in the tutorial CSS file.
# Using include files in templates
The second level menu is something we want in most, but not all, pages so we can't put it in the base template. By
putting it in a separate file in the *tutorial/templates/Includes* folder, we can use `<% include templatename %>` to
include it in our other templates. Separate the second level menu into a new file
*themes/tutorial/templates/Includes/Menu2.ss*.
** themes/tutorial/templates/Includes/Menu2.ss **
:::html
<% if Menu(2) %>
<ul id="Menu2">
<% control Menu(2) %>
<li class="$LinkingMode"><a href="$Link" title="Go to the $Title page">$MenuTitle</a></li>
<% end_control %>
</ul>
<% end_if %>
And then replace the second level menu with `<% include Menu2 %>` in *Page.ss* and *ArticlePage.ss* like so:
** themes/tutorial/templates/Layout/Page.ss**, ** themes/tutorial/templates/Layout/ArticlePage.ss**
:::html
<% include Menu2 %>
<div id="Content" class="typography">
...
Do the same with the breadcrumbs:
** themes/tutorial/templates/Includes/Breadcrumbs.ss **
:::html
<% if Level(2) %>
<div class="breadcrumbs">
$Breadcrumbs
</div>
<% end_if %>
** themes/tutorial/templates/Layout/Page.ss**, ** themes/tutorial/templates/Layout/ArticlePage.ss**
:::html
...
<div id="Content" class="typography">
<% include Breadcrumbs %>
...
You can make your templates more modular and easier to maintain by separating commonly-used pieces into include files.
# Changing the icons of pages in the CMS
Let's now make a purely cosmetic change that nevertheless helps to make the information presented in the CMS clearer.
Add the following field to the *ArticleHolder* and *ArticlePage* classes:
:::php
static $icon = "themes/tutorial/images/treeicons/news";
And this one to the *HomePage* class:
:::php
static $icon = "themes/tutorial/images/treeicons/home";
This will change the icons for the pages in the CMS. *Note* that the corresponding filename to the path given for $icon
will end with **-file.gif**, e.g. when you specify *news* above, the filename will be *news-file.gif*.

# Allowing comments on news articles
A handy feature built into Silverstripe is the ability for guests to your site to leave comments on pages. We can turn
this on for an article simply by ticking the box in the behaviour tab of a page in the CMS. Enable this for all your
*ArticlePage*s.

We then need to include *$PageComments* in our template, which will insert the comment form as well as all comments left
on the page.
** themes/tutorial/templates/Layout/ArticlePage.ss **
:::php
...
<div class="newsDetails">
Posted on $Date.Nice by $Author
</div>
$PageComments
...
You should also prepare the *Page* template in the same manner, so comments can be enabled at a later point on any page.

It would be nice to have comments on for all articles by default. We can do this with the *$defaults* array. Add this to
the *ArticlePage* class:
:::php
static $defaults = array(
'ProvideComments' => true
);
You can set defaults for any of the fields in your data object. *ProvideComments* is defined in *SiteTree*, so it is
part of our *ArticlePage* data object.
# Showing the latest news on the homepage
It would be nice to greet page visitors with a summary of the latest news when they visit the homepage. This requires a
little more code though - the news articles are not direct children of the homepage, so we can't use the *Children*
control. We can get the data for the news articles by implementing our own function in *HomePage_Controller*.
** mysite/code/HomePage.php **
:::php
...
function LatestNews($num=5) {
$news = DataObject::get_one("ArticleHolder");
return ($news) ? DataObject::get("ArticlePage", "ParentID = $news->ID", "Date DESC", "", $num) : false;
}
...
This function simply runs a database query that gets the latest news articles from the database. By default, this is
five, but you can change it by passing a number to the function. See the //`[api:DataObject]`// documentation for
details. We can reference this function as a page control in our *HomePage* template:
** themes/tutorial/templates/Layout/Homepage.ss **
:::html
...
$Content
<ul id="NewsList">
<% control LatestNews %>
<li class="newsDateTitle"><a href="$Link" title="Read more on "{$Title}"">$Title</a></li>
<li class="newsDateTitle">$Date.Nice</li>
<li class="newsSummary">$Content.FirstParagraph<a href="$Link" title="Read more on "{$Title}"">Read more >></a></li>
<% end_control %>
</ul>
...
When SilverStripe comes across a variable or page control it doesn't recognize, it first passes control to the
controller. If the controller doesn't have a function for the variable or page control, it then passes control to the
data object. If it has no matching functions, it then searches its database fields. Failing that it will return nothing.
The controller for a page is only created when page is actually visited, while the data object is available when the
page is referenced in other pages, eg by page controls. A good rule of thumb is to put all functions specific to the
page currently being viewed in the controller; only if a function needs to be used in another page should you put it in
the data object.

# Creating a RSS feed
An RSS feed is something that no news section should be without. SilverStripe makes it easy to create RSS feeds by
providing an //`[api:RSSFeed]`// class to do all the hard work for you. Create the following function in the
*ArticleHolder_Controller*:
:::php
function rss() {
$rss = new RSSFeed($this->Children(), $this->Link(), "The coolest news around");
$rss->outputToBrowser();
}
This function simply creates an RSS feed of all the news articles, and outputs it to the browser. If you go to
[http://localhost:3000/news/rss](http://localhost:3000/news/rss) you will see our RSS feed. What happens here is that
when there is more to a URL after the page's base URL - "rss" in this case - SilverStripe will call the function with
that name on the controller if it exists.
Depending on your browser, you should see something like the picture below. If your browser doesn't support RSS, you
will most likely see the XML output instead.

Now all we need is to let the user know that our RSS feed exists. The //`[api:RSSFeed]`// in your controller, it will be
called when the page is requested. Add this function to *ArticleHolder_Controller*:
:::php
function init() {
RSSFeed::linkToFeed($this->Link() . "rss");
parent::init();
}
This automatically generates a link-tag in the header of our template. The *init* function is then called on the parent
class to ensure any initialization the parent would have done if we hadn't overridden the *init* function is still
called. In Firefox you can see the RSS feed link in the address bar:

# Adding a staff section
Now that we have a complete news section, let's move on to the staff section. We need to create *StaffHolder* and
*StaffPage* page types, for an overview on all staff members and a detail-view for a single member. First let's start
with the *StaffHolder* page type.
** mysite/code/StaffHolder.php **
:::php
<?php
class StaffHolder extends Page {
static $db = array(
);
static $has_one = array(
);
static $allowed_children = array('StaffPage');
}
class StaffHolder_Controller extends Page_Controller {
}
?>
Nothing here should be new. The *StaffPage* page type is more interesting though. Each staff member has a portrait
image. We want to make a permanent connection between this image and the specific *StaffPage* (otherwise we could simply
insert an image in the *$Content* field).
** mysite/code/StaffPage.php **
:::php
<?php
class StaffPage extends Page {
static $db = array(
);
static $has_one = array(
'Photo' => 'Image'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Images", new ImageField('Photo'));
return $fields;
}
}
class StaffPage_Controller extends Page_Controller {
}
?>
Instead of adding our *Image* as a field in *$db*, we have used the *$has_one* array. This is because an *Image* is not
a simple database field like all the fields we have seen so far, but has its own database table. By using the *$has_one*
array, we create a relationship between the *StaffPage* table and the *Image* table by storing the id of the respective
*Image* in the *StaffPage* table.
We add an *ImageField* in the *getCMSFields* function to the tab "Root.Content.Images". Since this tab doesn't exist,
the *addFieldToTab* function will create it for us. The *ImageField* allows us to select an image or upload a new one in
the CMS.

Rebuild the database ([http://localhost/dev/build?flush=1](http://localhost/dev/build?flush=1)) and open the CMS. Create
a new *StaffHolder* called "Staff" in the "About Us" section, and create some *StaffPage*s in it.

# Creating the staff section templates
The staff section templates aren't too difficult to create, thanks to the utility methods provided by the *Image* class.
** themes/tutorial/templates/Layout/StaffHolder.ss **
:::html
<% include Menu2 %>
<div id="Content" class="typography">
<% include Breadcrumbs %>
$Content
<ul id="StaffList">
<% control Children %>
<li>
<div class="staffname"><a href="$Link">$Title</a></div>
<div class="staffphoto">$Photo.SetWidth(50)</div>
<div class="staffdescription"><p>$Content.FirstSentence</p></div>
</li>
<% end_control %>
</ul>
</div>
This template is very similar to the *ArticleHolder* template. The *FirstSentence* method of the //`[api:Text]`// class
will resize the image before sending it to the browser. The resized image is cached, so the server doesn't have to
resize the image every time the page is viewed.

The *StaffPage* template is also very straight forward.
** themes/tutorial/templates/Layout/StaffPage.ss **
:::html
<% include Menu2 %>
<div id="Content" class="typography">
<% include Breadcrumbs %>
<div id="StaffPhoto">
$Photo.SetWidth(150)
</div>
$Content
</div>
Here we also use the *SetWidth* function to get a different sized image from the same source image. You should now have
a complete staff section.

# Summary
In this tutorial we have explored the concept of page types. In the process of creating and extending page types you
have been introduced to many of the concepts required to build a site with SilverStripe.
[Next Tutorial >>](tutorial/3-forms)
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/tutorials/index.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/tutorials/index.md
| 1,563 | 1,758,118,091 |
en
|
# Written Tutorials
* [Tutorial 1: Building a basic site](1-building-a-basic-site): An introduction to building a site with
SilverStripe
* [Tutorial 2: Extending a basic site](2-extending-a-basic-site): A tutorial that builds on "Building a basic
site"
* [Tutorial 3: Forms](3-forms): An introduction to forms in SilverStripe.
* [Tutorial 4: Site Search](4-site-search): Learn how to add search to your site.
* [Tutorial 5: Dataobject Relationship Management](5-dataobject-relationship-management): Learn how to create
a simple data relationships
Please suggest improvements or further tutorials by [registering to our issue
tracker](http://open.silverstripe.com/register) and [adding a concise and clear request, with "Documentation" listed as
the category](http://open.silverstripe.com/newticket).
# Brief video tutorials
* [Installing on linux](http://silverstripe.org/assets/screencasts/Tutorial-InstallingLinux-DM08.swf)
* [Installing on Apple Macintosh (using
MAMP)](http://silverstripe.org/assets/screencasts/Tutorial-InstallingMAMP-SW08.swf)
* [Installing a module (e.g. a
blog)](http://silverstripe.org/assets/screencasts/Tutorial-InstallingBlogModule-DM08.swf)
* [Customising the CMS (Adding new
fields)](http://silverstripe.org/assets/screencasts/Tutorial-ChangingFields-DM08.swf)
# Help
If you get stuck;
* [Common Problems](/topics/common-problems): Review some existing solutions to common problems.
* [SilverStripe Forums](http://www.silverstripe.com/silverstripe-forum/): Head over to the forums and ask the community
for help
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/tutorials/5-dataobject-relationship-management.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/tutorials/5-dataobject-relationship-management.md
| 23,877 | 1,758,118,090 |
en
|
# Overview
In the [second tutorial](/tutorials/2-extending-a-basic-site) we have learned how to add extrafields to a page type thanks
to the *$db* array and how to add an image using the *$has_one* array and so create a relationship between a table and
the *Image* table by storing the id of the respective *Image* in the first table. This tutorial explores all this
relations between [DataObjects](/topics/datamodel#relations) and the way to manage them easily.
# What are we working towards?
To simulate these relations between objects, we are going to simulate the management via the CMS of the **[Google Summer
Of Code 2007](http://www.silverstripe.com/google-summer-of-code-2007-we-are-in/)** that SilverStripe was part of.
To do this, we are gonna use the following objects :
* Project : Project on SilverStripe system for the GSOC
* Student : Student involved in the project
* Mentor : SilverStripe developer
* Module : Module used for the project
This is a table which sums up the relations between them :
| Project | Student | Mentor | Modules |
| ------- | ------- | ------ | ------------------
| i18n Multi-Language | Bernat Foj Capell | Ingo Schommer | Cms, Sapphire, i18n, Translation |
| Image Manipulation | Mateusz Ujma | Sam Minnee | Cms, Sapphire, ImageManipulation |
| Google Maps | Ofir Picazo Navarro | Hayden Smith | Cms, Sapphire, Maps |
| Mashups | Lakshan Perera | Matt Peel | Cms, Sapphire, MashUps |
| Multiple Databases | Philipp Krenn | Brian Calhoun | Cms, Sapphire, MultipleDatabases |
| Reporting | Quin Hoxie | Sam Minnee | Cms, Sapphire, Reporting |
| Security & OpenID | Markus Lanthaler | Hayden Smith | Cms, Sapphire, auth_openid |
| SEO | Will Scott | Brian Calhoun | Cms, Sapphire, googleadwords, googleanalytics |
| Usability | Elijah Lofgren | Sean Harvey | Cms, Sapphire, UsabilityElijah |
| Safari 3 Support | Meg Risen | Sean Harvey | Cms, Sapphire, UsabilityMeg |
You can also play with the table display on the
//[demo](http://demo.silverstripe.com/gsoc-projects)// website of Silverstripe.
# GSOC Projects
Before starting the relations management, we need to create a *ProjectsHolder* class where we will save the GSOC Project
pages.
** tutorial/code/ProjectsHolder.php **
:::php
class ProjectsHolder extends Page {
static $allowed_children = array( 'Project' );
}
class ProjectsHolder_Controller extends Page_Controller {
}
# Project - Student relation
**A project can only be done by one student.**
**A student has only one project.**
This relation is called a **1-to-1** relation.
The first step is to create the student and project objects.
** tutorial/code/Student.php **
:::php
class Student extends DataObject {
static $db = array(
'FirstName' => 'Text',
'Lastname' => 'Text',
'Nationality' => 'Text'
);
function getCMSFields_forPopup() {
$fields = new FieldSet();
$fields->push( new TextField( 'FirstName', 'First Name' ) );
$fields->push( new TextField( 'Lastname' ) );
$fields->push( new TextField( 'Nationality' ) );
return $fields;
}
}
** tutorial/code/Project.php **
:::php
class Project extends Page {
static $has_one = array(
'MyStudent' => 'Student'
);
}
This code will create a relationship between the *Project* table and the *Student* table by storing the id of the
respective *Student* in the *Project* table.
The second step is to add the table in the method *getCMSFields* which will allow you to manage the *has_one* relation.
:::php
class Project extends Page {
...
function getCMSFields() {
$fields = parent::getCMSFields();
$tablefield = new HasOneComplexTableField(
$this,
'MyStudent',
'Student',
array(
'FirstName' => 'First Name',
'Lastname' => 'Family Name',
'Nationality' => 'Nationality'
),
'getCMSFields_forPopup'
);
$tablefield->setParentClass('Project');
$fields->addFieldToTab( 'Root.Content.Student', $tablefield );
return $fields;
}
}
Let’s walk through the parameters of the *HasOneComplexTableField* constructor.
1. **$this** : The first object concerned by the relation
2. **'MyStudent'** : The name of the second object of the relation
3. **'Student'** : The type of the second object of the relation
4. **array(...)** : The fields of the second object which will be in the table
5. **'getCMSFields_forPopup'** : The method which will be called to add, edit or only show a second object
You can also directly replace the last parameter by this code :
:::php
new FieldSet(
new TextField( 'FirstName', 'First Name' ),
new TextField( 'Lastname' ),
new TextField( 'Nationality' )
),
Don't forget to rebuild the database using
[http://localhost:3000/db/build?flush=1](http://localhost:3000/db/build?flush=1) before you proceed to the next part of
this tutorial.
Now that we have created our *Project* page type and *Student* data object, let’s add some content. Go into the CMS
and create one *Project* page for each project listed
[above](#What_are_we_working_towards?) under a *ProjectsHolder* page named
**GSOC Projects** for instance.

As you can see in the tab panel *Student*, the adding functionality is titled *Add Student*. However, if you want to
modify this title, you have to add this code in the *getCMSFields* method of the *Project* class :
:::php
$tablefield->setAddTitle( 'A Student' );
Select now one of the *Project* page that you have created, go in the tab panel *Student* and add all the students
listed [above](#What_are_we_working_towards?) by clicking on the link **Add
A Student** of your *HasOneComplexTableField* table.

After having added all the students, you will see that, in the tab panel *Student* of all the *Project* pages, the
*HasOneComplexTableField* tables have the same content.
For each *Project* page, you can now affect **one and only one** student to it ( see the
[list](#What_are_we_working_towards?) ).

You will also notice, that you have the possibility to **unselect** a student which will make your *Project* page
without any student affected to it.
**At the moment, the *HasOneComplexTableField* table doesn't manage totally the *1-to-1* relation because you can easily
select the same student for two ( or more ) differents *Project* pages which corresponds to a *1-to-many* relation.**
To use your *HasOneComplexTableField* table for a **1-to-1** relation, make this modification in the class *Project* :
:::php
class Project extends Page {
...
function getCMSFields() {
...
$tablefield->setOneToOne();
$fields->addFieldToTab( 'Root.Content.Student', $tablefield );
return $fields;
}
}
Now, you will notice that by checking a student in a *Project* page, you will be unable to select him again in any other
*Project* page which is the definition of a **1-to-1** relation.
# Student - Mentor relation
**A student has one mentor.**
**A mentor has several students.**
This relation is called a **1-to-many** relation.
The first step is to create the mentor object and set the relation with the *Student* data object.
** tutorial/code/Mentor.php **
:::php
class Mentor extends Page {
static $db = array(
'FirstName' => 'Text',
'Lastname' => 'Text',
'Nationality' => 'Text'
);
static $has_many = array(
'Students' => 'Student'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab( 'Root.Content.Main', new TextField( 'FirstName' ) );
$fields->addFieldToTab( 'Root.Content.Main', new TextField( 'Lastname' ) );
$fields->addFieldToTab( 'Root.Content.Main', new TextField( 'Nationality' ) );
return $fields;
}
}
:::php
class Student extends DataObject {
...
static $has_one = array(
'MyMentor' => 'Mentor'
);
}
This code will create a relationship between the *Student* table and the *Mentor* table by storing the id of the
respective *Mentor* in the *Student* table.
The second step is to add the table in the method *getCMSFields* which will allow you to manage the *has_many* relation.
:::php
class Mentor extends Page {
...
function getCMSFields() {
$fields = parent::getCMSFields();
...
$tablefield = new HasManyComplexTableField(
$this,
'Students',
'Student',
array(
'FirstName' => 'FirstName',
'Lastname' => 'Family Name',
'Nationality' => 'Nationality'
),
'getCMSFields_forPopup'
);
$tablefield->setAddTitle( 'A Student' );
$fields->addFieldToTab( 'Root.Content.Students', $tablefield );
return $fields;
}
}
To know more about the parameters of the *HasManyComplexTableField* constructor,
[check](#project_-_student_relation) those of the *HasOneComplexTableField*
constructor.
Don't forget to rebuild the database using
[http://localhost:3000/db/build?flush=1](http://localhost:3000/db/build?flush=1) before you proceed to the next part of
this tutorial.
Now that we have created our *Mentor* page type, go into the CMS and create one *Mentor* page for each mentor listed
[above](#What_are_we_working_towards?) under a simple *Page* named
**Mentors** for instance.

For each *Mentor* page, you can now affect **many** students created previously ( see the
[list](#What_are_we_working_towards?) ) by going in the tab panel
*Students*.

You will also notice, that by checking a student in a *Mentor* page, you will be unable to select him again in any other
*Mentor* page which is the definition of a **1-to-many** relation.
As the *HasOneComplexTableField* table, you also have the possibility not to select any student which will make your
*Mentor* page without any student affected to it.
# Project - Module relation
**A project uses several modules.**
**A module is used by several projects.**
This relation is called a **many-to-many** relation.
The first step is to create the module object and set the relation with the *Project* page type.
** tutorial/code/Module.php **
:::php
class Module extends DataObject {
static $db = array(
'Name' => 'Text'
);
static $belongs_many_many = array(
'Projects' => 'Project'
);
function getCMSFields_forPopup() {
$fields = new FieldSet();
$fields->push( new TextField( 'Name' ) );
return $fields;
}
}
:::php
class Project extends Page {
...
static $many_many = array(
'Modules' => 'Module'
);
}
This code will create a relationship between the *Project* table and the *Module* table by storing the ids of the
respective *Project* and *Module* in a another table named **Project_Modules**.
The second step is to add the table in the method *getCMSFields* which will allow you to manage the *many_many*
relation.
:::php
class Project extends Page {
...
function getCMSFields() {
$fields = parent::getCMSFields();
...
$modulesTablefield = new ManyManyComplexTableField(
$this,
'Modules',
'Module',
array(
'Name' => 'Name'
),
'getCMSFields_forPopup'
);
$modulesTablefield->setAddTitle( 'A Module' );
$fields->addFieldToTab( 'Root.Content.Modules', $modulesTablefield );
return $fields;
}
}
To know more about the parameters of the *ManyManyComplexTableField* constructor,
[check](#project_-_student_relation) those of the *HasOneComplexTableField*
constructor.
Don't forget to rebuild the database using
[http://localhost:3000/db/build?flush=1](http://localhost:3000/db/build?flush=1) before you proceed to the next part of
this tutorial.
Select now one of the *Project* page, go in the tab panel *Modules* and add all the modules listed
[above](#What_are_we_working_towards?) by clicking on the link **Add A
Module** of your *ManyManyComplexTableField* table.

For each *Project* page, you can now affect **many** modules created previously ( see the
[list](#What_are_we_working_towards?) ) by going in the tab panel
*Modules*.

You will also notice, that you are able to select several times a *Module* on different *Project* pages which is the
definition of a **many-to-many** relation.
As the *HasOneComplexTableField* and *HasManyComplexTableField* table, you also have the possibility not to select any
module which will make your *Project* page without any module affected to it.
# Displaying the data on your website
Now that we have created all the *Page* and *DataObject* classes necessary and the [RelationTables](/relationtable) to
manage the [relations](../topics/datamodel#relations) between them, we would like to see these relations on the website.
We will see in this section how to display all these relations but also how to create a template for a *DataObject*.
For every kind of *Page* or *DataObject*, you can access to their relations thanks to the **control** loop.
**__1. GSOC Projects__**
Let's start with the *ProjectsHolder* page created before. For this template, we are will display the same table than
[above](#What_are_we_working_towards?).

** tutorial/templates/Layout/ProjectsHolder.ss **
:::html
<div class="typography">
<% if Menu(2) %>
<% include SideBar %>
<div id="Content">
<% end_if %>
<% if Level(2) %>
<% include BreadCrumbs %>
<% end_if %>
<h2>$Title</h2>
$Content
<table>
<thead>
<tr>
<th>Project</th>
<th>Student</th>
<th>Mentor</th>
<th>Modules</th>
</tr>
</thead>
<tbody>
<% control Children %>
<tr>
<td>$Title</td>
<td>
<% if MyStudent %>
<% control MyStudent %>
$FirstName $Lastname
<% end_control %>
<% else %>
No Student
<% end_if %>
</td>
<td>
<% if MyStudent %>
<% control MyStudent %>
<% if MyMentor %>
<% control MyMentor %>
$FirstName $Lastname
<% end_control %>
<% else %>
No Mentor
<% end_if %>
<% end_control %>
<% else %>
No Mentor
<% end_if %>
</td>
<td>
<% if Modules %>
<% control Modules %>
$Name
<% end_control %>
<% else %>
No Modules
<% end_if %>
</td>
</tr>
<% end_control %>
</tbody>
</table>
$Form
$PageComments
<% if Menu(2) %>
</div>
<% end_if %>
</div>
** tutorial/templates/Includes/SideBar.ss **
You might want to move the include above the typography div in your layouts to get rid of the bullets.
:::html
<% if Menu(2) %>
<ul id="Menu2">
<% control Menu(2) %>
<li class="$LinkingMode"><a href="$Link" title="Go to the "{$Title}" page">$MenuTitle</a></li>
<% end_control %>
</ul>
<% end_if %>
**__2. Project__**
We know now how to easily access and show [relations](../topics/datamodel#relations) between *DataObject* in a template.
We can now do the same for every *Project* page by creating its own template.

** tutorial/templates/Layout/Project.ss **
:::html
<div class="typography">
<% if Menu(2) %>
<% include SideBar %>
<div id="Content">
<% end_if %>
<% if Level(2) %>
<% include BreadCrumbs %>
<% end_if %>
<h2>$Title</h2>
$Content
<h3>Student</h3>
<% if MyStudent %>
<% control MyStudent %>
<p>First Name: <strong>$FirstName</strong></p>
<p>Lastname: <strong>$Lastname</strong></p>
<p>Nationality: <strong>$Nationality</strong></p>
<h3>Mentor</h3>
<% if MyMentor %>
<% control MyMentor %>
<p>First Name: <strong>$FirstName</strong></p>
<p>Lastname: <strong>$Lastname</strong></p>
<p>Nationality: <strong>$Nationality</strong></p>
<% end_control %>
<% else %>
<p>This student doesn't have any mentor.</p>
<% end_if %>
<% end_control %>
<% else %>
<p>There is no any student working on this project.</p>
<% end_if %>
<h3>Modules</h3>
<% if Modules %>
<ul>
<% control Modules %>
<li>$Name</li>
<% end_control %>
</ul>
<% else %>
<p>This project has not used any modules.</p>
<% end_if %>
$Form
$PageComments
<% if Menu(2) %>
</div>
<% end_if %>
</div>
What we would like now is to create a special template for the *DataObject* *Student* and the *Page* *Mentor* which will
be used when we will call directly the variable in the *Project* template. In our case, we will use the same template
because these two classes have the same fields ( FirstName, Surname and Nationality ).
** tutorial/templates/Includes/GSOCPerson.ss **
:::html
<p>First Name: <strong>$FirstName</strong></p>
<p>Lastname: <strong>$Lastname</strong></p>
<p>Nationality: <strong>$Nationality</strong></p>
Now the template is created, we need to establish the link between the *Student* and *Mentor* classes with their common
template.
To do so, add this code in the two classes.
** tutorial/code/Student.php, tutorial/code/Mentor.php **
:::php
function forTemplate() {
$template = 'GSOCPerson';
return $this->renderWith( $template );
}
We can now modify the *Project* template.
:::html
...
<% if MyStudent %>
$MyStudent
<h3>Mentor</h3>
<% control MyStudent %>
<% if MyMentor %>
$MyMentor
<% else %>
<p>This student doesn't have any mentor.</p>
<% end_if %>
<% end_control %>
<% else %>
<p>There is no any student working on this project.</p>
<% end_if %>
...
In the *Project* template, it has been really easy to display the **1-to-1** relation with a *Student* object just by
calling the variable **$MyStudent**. This has been made possible thanks to the code below present in the *Project*
class.
:::php
static $has_one = array(
'MyStudent' => 'Student'
);
However, in the *Student* class, there is no any code relating to the **1-to-1** relation with a *Project* *Page*. So
how to access it from a *Student* *DataObject* ?
**__3. Mentor__**
In this template, we are gonna try to access the *Project* details from a *Student* *DataObject*.
What we want to do is to access to the *Project* page in the same way than we have done for the other relations
**without modifying the relations between *Page* and *DataObject* and the database structure**.

To do so, we have to create a function in the *Student* class which will return the *Project* linked with it. Let's call
it *MyProject* for instance.
:::php
class Student extends DataObject {
...
function MyProject() {
return DataObject::get( 'Project', "`MyStudentID` = '{$this->ID}'" );
}
}
We can now use this value in the same way that we have used the other relations.
That's how we can use this function in the *Mentor* template.
** tutorial/templates/Layout/Mentor.ss **
:::html
<div class="typography">
<% if Menu(2) %>
<% include SideBar %>
<div id="Content">
<% end_if %>
<% if Level(2) %>
<% include BreadCrumbs %>
<% end_if %>
<h2>$Title</h2>
$Content
<h3>Personal Details</h3>
<p>First Name: <strong>$FirstName</strong></p>
<p>Lastname: <strong>$Lastname</strong></p>
<p>Nationality: <strong>$Nationality</strong></p>
<h3>Students</h3>
<% if Students %>
<table>
<thead>
<tr>
<th>Student</th>
<th>Project</th>
</tr>
</thead>
<tbody>
<% control Students %>
<tr>
<td>$FirstName $Lastname</td>
<td>
<% if MyProject %>
<% control MyProject %>
$Title
<% end_control %>
<% else %>
No Project
<% end_if %>
</td>
</tr>
<% end_control %>
</tbody>
</table>
<% else %>
<p>There is no any student working with this mentor.</p>
<% end_if %>
$Form
$PageComments
<% if Menu(2) %>
</div>
<% end_if %>
</div>
# Summary
This tutorial has demonstrated how easy it is to manage all the type of relations between *DataObject* objects in the
CMS and how to display them on the website.
# Download the code
You can download all the  of this tutorial.
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/tutorials/1-building-a-basic-site.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/tutorials/1-building-a-basic-site.md
| 22,036 | 1,758,118,090 |
en
|
# Overview
Welcome to the first in this series of tutorials on the SilverStripe Content Management System (CMS).
These tutorials are designed to take you from an absolute beginner to being able to build large, complex websites with
SilverStripe. We assume to begin with, that you have some XHTML, CSS and PHP knowledge. This first tutorial provides an absolute
introduction to building a simple website using SilverStripe. It will also teach you how to use the content management system at a basic level.
# What are we working towards?
We are going to create a site in which all the content can be edited in the SilverStripe CMS. It will have a two-level
navigation system, which will be generated on the fly to include all pages you add in the CMS. We will use two different
templates - one for the home page, and one for the rest of the site.

# Installation
You need to [download the SilverStripe software](http://www.silverstripe.org/stable-download) and install it to your local
machine or to a webserver.
For more infomation about installing and configuring a webserver read the [Installation instructions and
videos](../installation).
If you want to follow this tutorial please choose "empty template" when installing SilverStripe. If you want a fully
featured theme then select the 'BlackCandy' option.
# Exploring the installation
After installation, open up the folder where you installed SilverStripe. If you installed on windows with WAMP, it will
likely be at *c:\wamp\wwww*.
Let's have a look at the folder structure.
| Directory | | Description |
| --------- | | ----------- |
| assets/ | | Contains images and other files uploaded via the SilverStripe CMS. You can also place your own content inside it, and link to it from within the content area of the CMS. |
| cms/ | | Contains all the files that form the CMS area of your site. It’s structure is similiar to the mysite/ directory, so if you find something interesting, it should be easy enough to look inside and see how it was built. |
| sapphire/ | | The framework that builds both your own site and as the CMS that powers it. You’ll be utilizing files in this directory often, both directly and indirectly. |
| mysite/ | | Contains all your sites code (mainly PHP and JavaScript) |
| themes/ | | Combines all images, stylesheets and templates powering your website into a reusable "theme" |
When designing your site you should only need to modify the *mysite*, *themes* and *assets* folders. The rest of the folders contain files and data that are not specific to any site.
# Using the CMS
The CMS is the area in which you can manage your site content. You can access the cms at http://localhost/admin. You
will be presented with a login screen. You can login with the details you provided at installation. After logging in you
should be greeted with the CMS, pictured below (we've entered some test content).

1. These buttons allow you to move between the different sections in the CMS. There are three core sections in the CMS - Site Content, Files & Images and Security. Modules may have their own sections here as well, if any are installed. In this tutorial we will be focusing on the Site Content section.
2. All the pages in the site are laid out in the site tree. You can add, delete and reorganize the pages using the buttons at the top. Clicking on a page will open it in the editor on the right.
3. This section allows you to edit the content for the currently selected page, as well as changing other properties of the page such as the page name and URL. The content editor has full [WYSIWYG](http://en.wikipedia.org/wiki/WYSIWYG) abilities, allow you to change formatting and insert links, images and tables.
4. There are two copies of each page: draft & published. These buttons allow you to save your changes to the draft copy, publish your draft copy, or revert your draft copy to the published copy. By having separate draft & published copies, we can preview draft changes in the site before publishing them to the live site.
5. The navigator will open the current page in the CMS, the draft site, or the published site.
## Try it
There are three pages already created for you - "Home", "About Us" and "Contact Us", as well as a 404 page. Experiment
with the editor - try different formatting, tables and images. When you are done, click "Save" to save the page or "Save
& Publish" to post the content to the live site. In our screenshot we've entered some test content.
> Don't worry that we currently have no way of navigating from page to page without using the CMS - we will build a navigation system soon.
When you create a new page, you are given a drop down that allows you to select the page type of the page. The page type
specifies the templates used to render the page, the fields that are able to be edited in the CMS, and page specific
behavior. We will explain page types in more depth as we progress; for now, make all pages of the type "Page".

**SilverStripe's virtual URLs**
While you are on the draft or live SilverStripe site, you may notice the URLs point to files that don't exist, e.g.
http://localhost/contact. SilverStripe uses the URL field on the Meta-Data tab of the editor to look up the appropriate
page in the database.

When you create a new page, SilverStripe automatically creates an appropriate URL for it. For example, *About Us* will
become *about-us*. You are able to change it yourself so that you can make long titles more usable or descriptive. For
example, *Employment Opportunities* could be shortened to *jobs*. The ability to generate easy to type, descriptive URLs
for SilverStripe pages improves accessibility for humans and search engines.
You should ensure the URL for the home page is *home*. By default, SilverStripe loads the page with the URL *home*.
# Templates
All pages on a SilverStripe site are rendered using a template. A template is an HTML file augmented with special
control codes. Because of this, you can have as much control of your site’s HTML code as you like.
Every page in your site has a **page type**. We will briefly talk about page types later, and go into much more detail
in tutorial two; right now all our pages will be of the page type *Page*. When rendering a page, SilverStripe will look
for a template file in the *tutorial/templates* folder, with the name `<PageType>`.ss - in our case *Page.ss*.
Open *themes/tutorial/templates/Page.ss*. It uses standard HTML with three exceptions: `<% base_tag %>`, *$Content* and
*$SilverStripeNavigator*. These template markers are processed by SilverStripe into HTML before being sent to your
browser.
`<% base_tag %>` is replaced with the HTML [base element](http://www.w3.org/TR/html401/struct/links.html#h-12.4). This
ensures the browser knows where to locate your site's images and css files.
*$Content* is replaced with the content of the page currently being viewed. This allows you to make all changes to
your site's content in the CMS.
*$SilverStripeNavigator* inserts the HTML for the navigator at the bottom of the page, which allows you to move
quickly between the CMS and the draft and published version of your page.

**Flushing the cache**
Whenever we edit a template file, we need to append *?flush=1* onto the end of the URL, e.g.
http://localhost/home/?flush=1. SilverStripe stores template files in a cache for quicker load times. Whenever there are
changes to the template, we must flush the cache in order for the changes to take effect.
# Inserting the page title
Let's introduce two new template variables - *$Title* and *$MetaTags*.
*$Title* is simply replaced with the name of the page ('Page name' on the 'Main' tab in the editor).
Open *themes/tutorial/templates/Page.ss* and find the following code:
:::html
<div id="Header">
<h1> </h1>
</div>
and replace it with
:::html
<div id="Header">
<h1>$Title</h1>
</div>
*$MetaTags* adds meta tags for search engines, as well as the page title ('Title' on the 'Meta-data' tab in the
editor). You can define your metatags in the meta-data tab off the content editor in the CMS.
Add *$MetaTags* to the head so that it looks like this:
:::html
<head>
<% base_tag %>
$MetaTags
<% require themedCSS(layout) %>
<% require themedCSS(typography) %>
<% require themedCSS(form) %>
</head>
> Don't forget to flush the cache each time you change a template by adding *?flush=1* onto the end of the URL.
Your page should now look something like this (with your own content of course):

# Making a Navigation System
So far we have made several pages, but we have no way to navigate between them. We can create a menu for our site using
a **control block**. Control blocks allow us to iterate over a data set, and render each item using a sub-template. The
**page control** *Menu(1)* returns the set of the first level menu items. We can then use the template variable
*$MenuTitle* to show the title of the page we are linking to.
Open up *themes/tutorial/templates/Page.ss*, and insert the following code inside `<div id="Main">`:
:::html
<ul id="Menu1">
<% control Menu(1) %>
<li><a href="#">$MenuTitle</a></li>
<% end_control %>
</ul>
Here we've created an unordered list called *Menu1*, which *themes/tutorial/css/layout.css* will style into the menu.
Then, using a control block over the page control *Menu(1)*, we add a link to the list for each menu item.
All going to plan, your page should look like this:

The menu isn't really very useful until each button links to the relevant page. We can get the link for the menu item in
question by using the *$Link* template variable.
Replace the list item line with this one:
:::html
<li><a href="$Link" title="Go to the "{$Title}" page">$MenuTitle</a></li>
> $Title refers to *Page Name* in the CMS, whereas $MenuTitle refers to (the often shorter) *Navigation label*
# Highlighting the current page
A useful feature is highlighting the current page the user is looking at. We can do this with the template variable
*$LinkingMode*. *$LinkingMode* returns one of three values:
* *current* - This page is being visited, and should be highlighted
* *link* - The page is not currently being visited, so shouldn't be highlighted
* *section* - A page under this page is being visited so you probably want to highlight it.
> For example: if you were visiting a staff member such as "Home > Company > Staff > Bob Smith", you would want to highlight 'Company' to say you are in that section.
Highlighting the current page is easy, simply assign a css class based on the value of *$LinkingMode*. Then provide a different style for current/section in css, as has been provided for you in *tutorial/css/layout.css*.
Change the list item line in *Page.ss* so it looks like this:
:::html
<li class="$LinkingMode">
<a href="$Link" title="Go to the "{$Title}" page">$MenuTitle</a>
</li>
You should now have a fully functional top menu

# Adding a second level
Although we have a fully functional navigation system, it is currently quite restrictive. Currently there is no way to
nest pages, we have a completely flat site. Adding a second level in SilverStripe is easy. First, let's add some pages. The "About Us" section could use some expansion.
Select "About Us", and create two new pages "What we do" and "Our History" of the type "Page" inside. You can also create the pages elsewhere on the site tree, and use the reorganize button to drag and drop the pages into place.
Either way, your site tree should now look something like this:

Great, we now have a hierarchical site structure, but we still have no way of getting to these second level pages.
Adding a second level menu is very similar to adding the first level menu.
Open up our *Page.ss* template, and find the `<div id="ContentContainer">` tag. Underneath it, add the following code:
:::html
<ul id="Menu2">
<% control Menu(2) %>
<li class="$LinkingMode"><a href="$Link" title="Go to the "{$Title}" page">$MenuTitle</a></li>
<% end_control %>
</ul>
This should look very familiar. It is exactly the same as our first menu, except we have named our linked list *Menu2*
and we are using the control *Menu(2)* instead of *Menu(1)*. As we can see here, the *Menu* control takes a single
argument - the level of the menu we want to get. Our css file will style this linked list into the second level menu,
using our usual *$LinkingMode* technique to highlight the current page.
We now have our second level menu, but we also have a problem. The menu is displayed on every page, even those that
don't have any nested pages. We can solve this problem with an **if block**. Simply surround the menu with an if block
like this:
:::html
<% if Menu(2) %>
<ul id="Menu2">
<% control Menu(2) %>
<li class="$LinkingMode"><a href="$Link" title="Go to the "{$Title}" page">$MenuTitle</a></li>
<% end_control %>
</ul>
<% end_if %>
The if block only includes the code inside it if the condition is true. In this case, it checks for the existence of
*Menu(2)*. If it exists then the code inside will be processed and the menu will be shown. Otherwise the code will not
be processed and the menu will not be shown.
Now that we have two levels of navigation, it would also be useful to include some "breadcrumbs".
Find *`<div id="Content" class="typography">`* and underneath it add:
:::html
<div class="breadcrumbs">
$Breadcrumbs
</div>
Breadcrumbs are only useful on pages that aren't in the top level. We can ensure that we only show them if we aren't in
the top level with another if statement.
:::html
<% if Level(2) %>
<div class="breadcrumbs">
$Breadcrumbs
</div>
<% end_if %>
The *Level* page control allows you to get data from the page's parents, eg if you used *Level(1)*, you could use
*$Level(1).Title* to get the top level page title. In this case, we merely use it to check the existence of a second
level page; if one exists then we include the breadcrumbs.
We now have a fully functioning two level navigation system. Both menus should be updating and highlighting as you move
from page to page. They will also mirror changes done in the SilverStripe CMS, such as renaming pages or moving them
around.

# Using a different template for the home page
So far, a single template *Page.ss* is being used for the entire site. This is useful for the purpose of this
tutorial, but in a finished website we can expect there to be several page layouts.
To illustrate how we do this, we will create a new template for the homepage. This template will have a large graphical
banner to welcome visitors.
## Creating a new page type
Earlier we stated that every page in a SilverStripe site has a **page type**, and that SilverStripe will look for a
template corresponding to the page type. Therefore, the first step to get the homepage using a different template is to
create a new page type.
Each page type is represented by two php classes: a *data object* and a *controller*. Don't worry about the details of page
types right now, we will go into much more detail in tutorial two.
Create a new file *HomePage.php* in *mysite/code*. Copy the following code into it:
:::php
<?php
/**
* Defines the HomePage page type
*/
class HomePage extends Page {
static $db = array(
);
static $has_one = array(
);
}
class HomePage_Controller extends Page_Controller {
}
Every page type also has a database table corresponding to it. Every time we modify the database, we need to rebuild it.
We can do this by going to [http://localhost/dev/build?flush=1](http://localhost/dev/build?flush=1). It may take a
moment, so be patient. This add tables and fields needed by your site, and modifies any structures that have changed. It
does this non-destructively - it will never delete your data.
As we have just created a new page type, SilverStripe will add this to the list of page types in the database.
## Changing the page type of the Home page
After building the database, we can change the page type of the homepage in the CMS.
Under the "Behaviour" tab. Change it to *HomePage*, and click "Save Draft" and "Publish".

Our homepage is now of the page type *HomePage*. However, even though it is of the *HomePage* page type, it is still
rendered with the *Page* template. SilverStripe still renders the homepage using the *Page* template because when we
created the *HomePage* page type, we inherited from *Page*. So when SilverStripe cannot find a *HomePage* template, it
will use the *Page* template. SilverStripe always attempts to use the most specific template first, and then falls back
to the template of the page type's parents.
## Creating a new template
To create a new template, create a copy of *Page.ss* (found in *themes/tutorial/templates*) and call it *HomePage.ss*. If we flush the cache (*?flush=1*), SilverStripe should now be using *HomePage.ss* for the homepage, and *Page.ss* for the rest of the site. Now let's customize the *HomePage* template.
First, remove the breadcrumbs and the secondary menu; we don't need them for the homepage. Let's replace the title with our image. Add this line above the *Content* div:
:::html
<div id="Banner">
<img src="themes/tutorial/images/welcome.png" alt="Homepage image" />
</div>

## Using a subtemplate
Having two templates is good, but we have a lot of identical code in the two templates. Rather than having two
completely separate templates, we can use subtemplates to specify only the part of the template that has changed.
If we compare *Page.ss* and *HomePage.ss*, we can see the only differences are within the *ContentContainer* div.
Copy the contents of the *ContentContainer* div from *themes/tutorial/templates/Page.ss* to a new file
*themes/tutorial/templates/Layout/Page.ss*, and do the same from *themes/tutorial/templates/HomePage.ss* to
*themes/tutorial/templates/Layout/HomePage.ss*.
The files should look like this:
**themes/tutorial/templates/Layout/Page.ss**
:::html
<% if Menu(2) %>
<ul id="Menu2">
<% control Menu(2) %>
<li class="$LinkingMode"><a href="$Link" title="Go to the "{$Title}" page">$MenuTitle</a></li>
<% end_control %>
</ul>
<% end_if %>
<div id="Content" class="typography">
<% if Level(2) %>
<div class="breadcrumbs">
$Breadcrumbs
</div>
<% end_if %>
$Content
$Form
</div>
**themes/tutorial/templates/Layout/HomePage.ss**
:::html
<div id="Banner">
<img src="themes/tutorial/images/welcome.png" alt="Homepage image" />
</div>
<div id="Content" class="typography">
$Content
</div>
We can then delete *themes/tutorial/templates/HomePage.ss*, as it is no longer needed.
Replace the code we just copied out of *themes/tutorial/templates/Page.ss* with *$Layout*, so it looks like this:
**themes/tutorial/templates/Page.ss**
:::html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<% base_tag %>
$MetaTags
<% require themedCSS(layout) %>
<% require themedCSS(typography) %>
<% require themedCSS(form) %>
</head>
<body>
<div id="Main">
<ul id="Menu1">
<% control Menu(1) %>
<li class="$LinkingMode"><a href="$Link" title="Go to the "{$Title}" page">$MenuTitle</a></li>
<% end_control %>
</ul>
<div id="Header">
<h1>$Title</h1>
</div>
<div id="ContentContainer">
$Layout
</div>
<div id="Footer">
<span>Visit <a href="http://www.silverstripe.com" title="Visit www.silverstripe.com">www.silverstripe.com</a> to download the CMS</span>
</div>
</div>
$SilverStripeNavigator
</body>
</html>
> As you have just done a few template changes, remember to add *?flush=1* in your URL to flush the cache so see your changes in the browser
SilverStripe first searches for a template in the *themes/tutorial/templates* folder. Since there is no *HomePage.ss*,
it will use the *Page.ss* for both *Page* and *HomePage* page types. When it comes across the *$Layout* tag, it will
then descend into the *themes/tutorial/templates/Layout* folder, and will use *Page.ss* for the *Page* page type, and
*HomePage.ss* for the *HomePage* page type.

# Summary
Starting from a basic template, we have introduced template variables, controls and if blocks, and we have used these
to build a basic but fully functional site. You have also been briefly introduced to page types, and seen how they
correspond to templates and subtemplates. By using these templates, you have seen how to customize the site content
according to the page type of the page you are displaying.
In the next tutorial, [Extending a Basic Site](2-extending-a-basic-site), we will explore page types on a
deeper level, and see how you can customize your own page types to extend SilverStripe to do much more interesting
things.
[Next Tutorial >>](2-extending-a-basic-site)
# Books on SilverStripe
* [Official book on SilverStripe in English](http://www.silverstripe.org/silverstripe-book).
* [Official book on SilverStripe in German](http://www.silverstripe.org/das-silverstripe-buch).

|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/tutorials/4-site-search.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/tutorials/4-site-search.md
| 6,976 | 1,758,118,090 |
en
|
# Overview
This is a short tutorial demonstrating how to add search functionality to a SilverStripe site. It is recommended that
you have completed the earlier tutorials, especially the tutorial on forms, before attempting this tutorial. While this
tutorial will add search functionality to the site built in the previous tutorials, it should be straight forward to
follow this tutorial on any site of your own. If you are adding the search form to the tutorial site, please get
 and place it in *themes/tutorial/css* (as layout.css) and this
 search file tree icon and place it in *themes/tutorial/images/treeicons* (as
search-file.gif).
# What are we working towards?
We are going to add a search box on the top of the page. When a user types something in the box, they are taken to a
results page.

# Creating the search form
The Search Form functionality has been altered over time. Please use the section which applies to your SilverStripe
version.
## 2.4 and newer
SilverStripe 2.4 does not come bundled with the search engine enabled. To enable the search engine you need to include
the following code in your mysite/_config.php file
:::php
FulltextSearchable::enable();
After including that in your _config.php you will need to rebuild the database by visiting http://yoursite.com/dev/build
in your web browser. This will add the fulltext search columns.
The actual search form code is already provided in FulltextSearchable so when you add the enable line above to your
_config you can add your form as $SearchForm.
## 2.3
SilverStripe 2.3 came bundled with the code as well as a MySQL Search engine. If you are using the blackcandy theme you
should have everything you need already to have a search. If you are using the tutorial theme then you can simply skip
down to 'Adding the search form' as the PHP code is already provided in Page.php. If it is not then you can follow the
instructions below as well.
## 2.2
If you are using SilverStripe 2.2 or earlier then you need to define your own code. The first step in implementing
search on your site is to create a form for the user to type their query. Create a function named *SearchForm* on the
*Page_Controller* class (//mysite/code/Page.php//).
:::php
class Page_Controller extends ContentController {
function SearchForm() {
$searchText = isset($this->Query) ? $this->Query : 'Search';
$fields = new FieldSet(
new TextField("Search", "", $searchText)
);
$actions = new FieldSet(
new FormAction('results', 'Go')
);
return new SearchForm($this, "SearchForm", $fields, $actions);
}
}
# Adding the search form
We then just need to add the search form to the template. Add *$SearchForm* to the 'Header' div in
*themes/tutorial/templates/Page.ss*.
*themes/tutorial/templates/Page.ss*
:::html
<div id="Header">
$SearchForm
<h1>$Title</h1>
</div>

# Showing the results
Next we need to create the *results* function.
*mysite/code/Page.php*
:::php
class Page_Controller extends ContentController {
...
function results($data, $form){
$data = array(
'Results' => $form->getResults(),
'Query' => $form->getSearchQuery(),
'Title' => 'Search Results'
);
$this->Query = $form->getSearchQuery();
return $this->customise($data)->renderWith(array('Page_results', 'Page'));
}
}
First we populate an array with the data we wish to pass to the template - the search results, query and title of the
page. The final line is a little more complicated.
When we call a function by its url (eg http://localhost/home/results), SilverStripe will look for a template with the
name *PageType*_//function//.ss. As we are implementing the *results* function on the *Page* page type, we create our
results page template as *Page_results.ss*. Unfortunately this doesn't work when we are using page types that are
children of the *Page* page type. For example, if someone used the search on the homepage, it would be rendered with
*Homepage.ss* rather than *Page_results.ss*. SilverStripe always looks for the template from the most specific page type
first, so in this case it would use the first template it finds in this list:
* HomePage_results.ss
* HomePage.ss
* Page_results.ss
* Page.ss
We can override this list by using the *renderWith* function. The *renderWith* function takes an array of the names of
the templates you wish to render the page with. Here we first add the data to the page by using the 'customise'
function, and then attempt to render it with *Page_results.ss*, falling back to *Page.ss* if there is no
*Page_results.ss*.
# Creating the template
Lastly we need to create the template for the search page. This template uses all the same techniques used in previous
tutorials. It also uses a number of pagination variables, which are provided by the `[api:DataObjectSet]`
class.
*themes/tutorial/templates/Layout/Page_results.ss*
:::html
<div id="Content" class="searchResults">
<h2>$Title</h2>
<% if Query %>
<p class="searchQuery"><strong>You searched for "{$Query}"</strong></p>
<% end_if %>
<% if Results %>
<ul id="SearchResults">
<% control Results %>
<li>
<a class="searchResultHeader" href="$Link">
<% if MenuTitle %>
$MenuTitle
<% else %>
$Title
<% end_if %>
</a>
<p>$Content.LimitWordCountXML</p>
<a class="readMoreLink" href="$Link" title="Read more about "{$Title}"">Read more about "{$Title}"...</a>
</li>
<% end_control %>
</ul>
<% else %>
<p>Sorry, your search query did not return any results.</p>
<% end_if %>
<% if Results.MoreThanOnePage %>
<div id="PageNumbers">
<% if Results.NotLastPage %>
<a class="next" href="$Results.NextLink" title="View the next page">Next</a>
<% end_if %>
<% if Results.NotFirstPage %>
<a class="prev" href="$Results.PrevLink" title="View the previous page">Prev</a>
<% end_if %>
<span>
<% control Results.Pages %>
<% if CurrentBool %>
$PageNum
<% else %>
<a href="$Link" title="View page number $PageNum">$PageNum</a>
<% end_if %>
<% end_control %>
</span>
<p>Page $Results.CurrentPage of $Results.TotalPages</p>
</div>
<% end_if %>
</div>

# Summary
This tutorial has demonstrated how easy it is to have full text searching on your site. To add search to a SilverStripe
site, only a search form and a results page need to be created.
[Next Tutorial >>](/tutorials/site-map)
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/tutorials/3-forms.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/tutorials/3-forms.md
| 13,224 | 1,758,118,090 |
en
|
# Overview
This tutorial is intended to be a continuation of the first two tutorials, and will build on the site produced in those
two tutorials.
This tutorial explores forms in SilverStripe. It will look at coded forms. Forms which need to be written in PHP.
Another method which allows you to construct forms via the CMS is by using the [userforms module](http://silverstripe.org/user-forms-module). A
UserDefinedForm is much quicker to implement, but lacks the flexibility of a coded form.
# What are we working towards?
We will create a poll on the home page that asks the user their favourite web browser, and displays a bar graph of the
results.

## Creating the form
We will be creating a form for a poll on the home page.
The poll will ask the user's name and favourite web browser, and then collate the results into a bar graph. We create
the form in a method on *HomePage_Controller*.
*mysite/code/HomePage.php*
:::php
...
class HomePage_Controller extends Page_Controller {
...
function BrowserPollForm() {
// Create fields
$fields = new FieldSet(
new TextField('Name'),
new OptionsetField('Browser', 'Your Favourite Browser', array(
'Firefox' => 'Firefox',
'Internet Explorer' => 'Internet Explorer',
'Safari' => 'Safari',
'Opera' => 'Opera',
'Lynx' => 'Lynx'
))
);
// Create actions
$actions = new FieldSet(
new FormAction('doBrowserPoll', 'Submit')
);
return new Form($this, 'BrowserPollForm', $fields, $actions);
}
...
}
...
Let's step through this code.
:::php
// Create fields
$fields = new FieldSet(
new TextField('Name'),
new OptionsetField('Browser', 'Your Favourite Browser', array(
'Firefox' => 'Firefox',
'Internet Explorer' => 'Internet Explorer',
'Safari' => 'Safari',
'Opera' => 'Opera',
'Lynx' => 'Lynx'
))
);
First we create our form fields.
We do this by creating a `[api:FieldSet]` and passing our fields as arguments. The first field is a new
`[api:TextField]` with the name 'Name'.
There is a second argument when creating a field which specifies the text on the label of the field. If no second
argument is passed, as in this case, it is assumed the label is the same as the name of the field.
The second field we create is an `[api:OptionsetField]`. This is a dropdown, and takes a third argument - an
array mapping the values to the options listed in the dropdown.
:::php
$actions = new FieldSet(
new FormAction('doBrowserPoll', 'Submit');
);
After creating the fields, we create the form actions. Form actions appear as buttons at the bottom of the form.
The first argument is the name of the function to call when the button is pressed, and the second is the label of the
button.
Here we create a 'Submit' button which calls the 'doBrowserPoll' method, which we will create later.
All the form actions (in this case only one) are collected into a `[api:FieldSet]` object the same way we did with
the fields.
:::php
return new Form($this, 'BrowserPollForm', $fields, $actions);
Finally we create the `[api:Form]` object and return it.
The first argument is the controller that contains the form, in most cases '$this'. The second is the name of the method
that returns the form, which is 'BrowserPollForm' in our case. The third and fourth arguments are the
`[api:FieldSet]`s containing the fields and form actions respectively.
After creating the form function, we need to add the form to our home page template.
Add the following code to the home page template, just before the `</div>` that ends the ContentContainer DIV element:
*themes/tutorial/templates/Layout/HomePage.ss*
:::html
...
<div id="ContentContainer">
...
<div id="BrowserPoll">
<h2>Browser Poll</h2>
$BrowserPollForm
</div>
</div>
The CSS files will ensure that it is formatted and positioned correctly. All going according to plan, if you visit
[http://localhost/home?flush=1](http://localhost/home?flush=1) it should look something like below.

## Processing the form
Great! We now have a browser poll form, but it doesn't actually do anything. In order to make the form work, we have to
implement the 'doBrowserPoll' method that we told it about.
First, we need some way of saving the poll submissions to the database, so we can retrieve the results later. We can do
this by creating a new object that extends from `[api:DataObject]`.
If you recall, in tutorial two we said that all objects that inherit from DataObject and that add fields are stored in
the database. Also recall that all pages extend DataObject indirectly through `[api:SiteTree]`. Here instead of
extending SiteTree (or `[api:Page]`) to create a page type, we extend DataObject directly.
*mysite/code/BrowserPollSubmission.php*
:::php
<?php
class BrowserPollSubmission extends DataObject {
static $db = array(
'Name' => 'Text',
'Browser' => 'Text'
);
}
?>
If we then rebuild the database ([http://localhost/db/build?flush=1](http://localhost/db/build?flush=1)), we will see
that the *BrowserPollSubmission* table is created. Now we just need to define 'doBrowserPoll' on *HomePage_Controller*.
*mysite/code/HomePage.php*
:::php
...
class HomePage_Controller extends Page_Controller {
...
function doBrowserPoll($data, $form) {
$submission = new BrowserPollSubmission();
$form->saveInto($submission);
$submission->write();
Director::redirectBack();
}
...
}
...
A function that processes a form submission takes two arguments - the first is the data in the form, the second is the
[:Form](/Form) object.
In our function we create a new *BrowserPollSubmission* object. Since the name of our form fields and the name of the
database fields are the same we can save the form directly into the data object.
We call the 'write' method to write our data to the database, and 'Director::redirectBack()' will redirect the user back
to the home page.
## Form validation
SilverStripe forms all have automatic validation on fields where it is logical. For example, all email fields check that
they contain a valid email address. You can write your own validation by subclassing the *Validator* class.
SilverStripe provides the *RequiredFields* validator, which ensures that the fields specified are filled in before the
form is submitted. To use it we create a new *RequiredFields* object with the name of the fields we wish to be required
as the arguments, then pass this as a fifth argument to the Form constructor.
Change the end of the 'BrowserPollForm' function so it looks like this:
** mysite/code/HomePage.php **
:::php
function BrowserPollForm() {
...
// Create validator
$validator = new RequiredFields('Name', 'Browser');
return new Form($this, 'BrowserPollForm', $fields, $actions, $validator);
}
If we then open the homepage and attempt to submit the form without filling in the required fields an error will be
shown.

## Showing the poll results
Now that we have a working form, we need some way of showing the results.
The first thing to do is make it so a user can only vote once per session. If the user hasn't voted, show the form,
otherwise show the results.
We can do this using a session variable. The `api:Session` class handles all session variables in SilverStripe.
First modify the 'doBrowserPoll' to set the session variable 'BrowserPollVoted' when a user votes.
*mysite/code/HomePage.php*
:::php
...
HomePage_Controller extends Page_Controller {
...
function doBrowserPoll($data, $form) {
$submission = new BrowserPollSubmission();
$form->saveInto($submission);
$submission->write();
Session::set('BrowserPollVoted', true);
Director::redirectBack();
}
...
}
Then we simply need to check if the session variable has been set in 'BrowserPollForm()', and to not return the form if
it is.
:::php
function BrowserPollForm() {
if(Session::get('BrowserPollVoted')) {
return false;
}
...
If you visit the home page now you will see you can only vote once per session; after that the form won't be shown. You
can start a new session by closing and reopening your browser (or if you're using Firefox and have installed the [Web
Developer](http://chrispederick.com/work/web-developer/) extension, you can use its Clear Session Cookies command).
Although the form is not shown, you'll still see the 'Browser Poll' heading. We'll leave this for now: after we've built
the bar graph of the results, we'll modify the template to show the graph instead of the form if the user has already
voted.
We now need some way of getting the data from the database into the template.
In the second tutorial we got the latest news articles for the home page by using the 'DataObject::get' function. We
can't use the 'DataObject::get' function here directly as we wish to count the total number of votes for each browser.
By looking at the documentation for 'DataObject::get', we can see that it returns a `[api:DataObjectSet]`
object. In fact, all data that can be iterated over in a template with a page control is contained in a DataObjectSet.
A `[api:DataObjectSet]` is a set of not just DataObjects, but of ViewableData, which the majority of
SilverStripe's classes (including DataObject) inherit from. We can create a DataObjectSet, fill it with our data, and
then create our graph using a page control in the template. Create the function 'BrowserPollResults' on the
*HomePage_Controller* class.
** mysite/code/HomePage.php **
:::php
function BrowserPollResults() {
$submissions = DataObject::get('BrowserPollSubmission');
$total = $submissions->Count();
$doSet = new DataObjectSet();
foreach($submissions->groupBy('Browser') as $browser => $data) {
$percentage = (int) ($data->Count() / $total * 100);
$record = array(
'Browser' => $browser,
'Percentage' => $percentage
);
$doSet->push(new ArrayData($record));
}
return $doSet;
}
This introduces a few new concepts, so let's step through it.
:::php
$submissions = DataObject::get('BrowserPollSubmission');
First we get all of the *BrowserPollSubmission*s from the database. This returns the submissions as a
DataObjectSet, which contains the submissions as *BrowserPollSubmission* objects.
:::php
$total = $submissions->Count();
We get the total number of submissions, which is needed to calculate the percentages.
:::php
$doSet = new DataObjectSet();
foreach($submissions->groupBy('Browser') as $browser => $data) {
$percentage = (int) ($data->Count() / $total * 100);
$record = array(
'Browser' => $browser,
'Percentage' => $percentage
);
$doSet->push(new ArrayData($record));
}
Now we create an empty DataObjectSet to hold our data. The 'groupBy' method of
DataObjectSet splits our DataObjectSet by the field passed to it, in this case the
'Browser' field. It puts these new DataObjectSets into an array indexed by the value of the field,
which we can then iterate over. We can then calculate the percentage for each browser using the size of the
DataObjectSet.
The `[api:ArrayData]` class wraps an array into a ViewableData object, so we simply put our data in an array and
create a new ArrayData object, which we can add to our DataObjectSet of results.
:::php
return $doSet;
After we have iterated through all the browsers, the DataObjectSet contains all the results, which is
returned.
The final step is to create the template to display our data. Change the 'BrowserPoll' div in
*themes/tutorial/templates/Layout/HomePage.ss* to the below.
:::html
<div id="BrowserPoll">
<h2>Browser Poll</h2>
<% if BrowserPollForm %>
$BrowserPollForm
<% else %>
<ul>
<% control BrowserPollResults %>
<li>
<div class="browser">$Browser: $Percentage%</div>
<div class="bar" style="width:$Percentage%"> </div>
</li>
<% end_control %>
</ul>
<% end_if %>
</div>
Here we first check if the *BrowserPollForm* is returned, and if it is display it. Otherwise the user has already voted,
and the poll results need to be displayed.
We use the normal tactic of putting the data into an unordered list and using CSS to style it, except here we use inline
styles to display a bar that is sized proportionate to the number of votes the browser has received. You should now have
a complete poll.

# Summary
In this tutorial we have explored forms, and seen the different approaches to creating and using forms. Whether you
decide to use the [userforms module](http://silverstripe.org/user-forms-module) or create a form in PHP depends on the situation and flexibility
required.
[Next Tutorial >>](/tutorials/4-site-search)data
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/changelogs/2.0.2.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/changelogs/2.0.2.md
| 8,429 | 1,758,118,090 |
en
|
# 2.0.2 (2007-07-14)
SilverStripe 2.0.2 was released on '''14 July 2007''' and had the following changes:
## Overview
* BlackCandy is the new default theme
* Added pagination for page comments
* Updated date field in CMS-edited forms to use CalendarDateField
* Added 'open in new window' checkbox to link inserter
* Added dimension fields when inserting images
## Features and Enhancements
* Much more API Documentation
* Modules must now have _config.php files in order to be loaded
* New Classes
* PermissionProvider
* Improved Classes
* CalendarDateField
* Added a calendar icon
* CheckboxSetField
* Prepared for use editing a many-many join in the CMS, popualted with a SQLMap object
* ClassInfo
* Added implementorsOf()
* ContentNegotiator
* Added set_encoding() to choose a character set other than utf-8
* DatabaseAdmin
* Removed populate() as it was a security risk, the initial content is now loaded via requireDefaultRecords()
* DataObject
* Added add_extension() for adding decorators in _config.php
* DataObjectDecorator
* Added extraDBFields() for modifying the decorated data objects, adding extra database fields
* Email
* Added send_all_emails_to()
* Added cc_all_emails_to()
* Added bcc_all_emails_to()
* Replaced sentLiveErrorsTo() with send_errors_to(), for more flexibility
* Form
* Added current_action()
* Added single_field_required()
* FormField
* Added Required(), so that you can put asterisks into a form template if you wish
* GenericDataAdmin
* Updated to use new permission model
* LeftAndMain
* Added second argument to setApplicationName() so that the name in the top corner and the name shown elsewhere can be 2 different strings
* Permission
* Added get_codes()
* Profiler
* Added trace argument to show()
* Added profiling scaffolds
* Added ?profile_trace=1 url variable tool to show a trace on the profiler
* Sorted the output of profiler
* Improvements to profiling information
* TableField
* Added option to aid putting TableFields inside the ComplexTableField popup
* TreeDropdownField
* Added setTreeBaseID(), for showing a sub-tree in your field
* Javascript
* Added event.setStyle to prototype_improvements.js
* Add class text field to image properties dialog in TinyMCE
* Added ?debug_behaviour=1 URL option for debugging behaviour calls with Firebug
## Bugfixes
* CMS
* Forms in newsletter & security section were incorrectly submitting when enter was pressed
* Fixed search in MemberTableField
* Don't show popup when validation fails in Security section
* Fixed bug where scrollbars aren't shown in the CMS
* Let CMSMain be used to manage objects without Sort
* The help button now redirects to http://userhelp.silverstripe.com
* Version displayed in CMS now works correctly
* Fixed CMS action button support when text size increases
* Added message when report is empty
* fixed (overrides) to CSS to avoid larger font-size due to em values
* Fixed tree scrolling and resizing issues
* Fixed sizing issues with CMS right content area
* Fixed bug with image insertion
* Fixed bug where new pages weren't being highlighted in the CMS
* Fixed bug where the last page in the site tree wasn't being highlighted in the CMS
* Fixed reordering of groups in security section
* Improvements to image inserter
* Sapphire
* Reduced warnings when E_NOTICE is enabled
* Fixed validation of date fields in a user defined form
* Fixed multiple security groups being created when logging in with default admin
* Fixed permissions for administrating page comments
* Fixed ContentController::PageComments() method to die if spammers are POSTing form data when comments are disabled
* Fixed permission checking on PHP 5.0.5
* Fixed 'cannot access protected property' error in Security section on PHP 5.0.5
* Fixed javascript validation of forms
* Fixed error when asp_tags = On
* Fixed bug where you have a non-required field with numeric validation
* Added a limit of 20 steps in Breadcrumbs generation
* Changed SiteTree.Title length from 100 to 255
* Fixed random password generator in Member::createNewPassword()
* Fixed BatchProcess to not display an error if no objects could be processed
* Fixed a bug where a user is redirected incorrectly after logging in
* Changed temp-folder selection to not leave temp files lying around, and put silverstripe temp files into a silverstripe-cache folder
* Made guid of PageComments in rss feed unique
* Removed duplicate XML class
* Fixed bugs caused by missing html elements
* Fixed code to remove need for short_open_tag
* Fixed FileSize generation for sizes of just over 1 meg
* only show $messageBlock in FormField::FieldHolder() if $Message is existing
* fixed rightTitle and id in FormField::FieldHolder()
* Fixed ?isDev=1 mode
* Set default of sendWarnings on Debug::send_errors_to
* Fixed formatting of error emails sent from ajax requests
* Removed debug plumbing from the results of Debug::backtrace()
* Simplified return data of htmlEmail, an inconsequential internal optimisation
* Create assets folder if it doesn't exist when uploading a file
* Fixed bug in SiteTree::NestedTitle()
* Don't append /home to the home page URL
* Small fix for windows installations
* Fixed efficiency problems in Versioned::get_latest_version
* Fixed File::sync(), to let it recurse into new directories in a single execution
* Fixed bug with getting form action that was breaking form submission and complextablefield pop-up
* Fixed SQLMap iteration
* Simplified EmailField validation error message
* Fixed some bugs in the debug emailer
* Reduced amount of ajax-refetching that the TreeSelectorFields do
* Fix macron support in reports
* Improved debug message (remove big blocks of redundant data)
* Allow for the disabling of default buttons. Apply this to CMSMain and GenericDataAdmin in the administration, so that we don't default to clicking the *DELETE* button.
* Added default value to first arg of permissionFailure(); it's not actually used!
* Improved handling of EditableFormFields on new UserDefinedForms
* Improved search results message shown on first load
* Made calendar control register a date change when the calendar is used
* Set some good defaults in DataObjectSet::TotalPages() if they have not been set
* Changes to support forum
* Require authenficiation to do a db/build on live sites
* Close directories before trying to remove them
* Fixed a bug where CheckboxSetField wouldn't save if there was a method the same as the field name
* Fix multiple "broken" in class attribute of HTML Content
* Fixed bug with TreeDropdownField when you clicked the expand link 3 or more times, it wouldn't close
* Fixed bug when editing properties of new text fields
* Fixed duplicate of UserDefinedForm objects
* JSParty
* Fixed a bug where you couldn't always edit the bottom of an WYSIWYG editor field
* Ensure that WYSIWYG context menu always appears on the screen
* Javascript performance improvements
* Fix weird bug in behaviour to do with class.applyToChildren
* Improved console.log alternative
* Installer
* Added option of installing either the default template, or the tutorial template
* mod_rewrite check now works with http authentification
* Workaround for 'URL file-access is disabled in the server configuration' using curl for mod_rewrite test
* Better error message if the installer can't detect the web server
* Added an alternative .htaccess configuration
* Less file permissions required by the installer
* Made deleting the installer files more prominent, it now deletes all the installations files, not just php.
* MySQL password is now a hidden field.
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/changelogs/2.3.7.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/changelogs/2.3.7.md
| 780 | 1,758,118,090 |
en
|
# 2.3.7 (2010-03-18)
## Changelog
### Bugfixes
* [rev:101229] Don't delete index.php after successful installation - in ContentController->deleteinstallfiles(). URL routing might rely on it without mod_rewrite.
* [rev:101229] Require ADMIN permissions for ContentController->deleteinstallfiles() - together with retaining index.php this removed a vulnerability where unauthenticated users can disrupt mod_rewrite-less URL routing. (from r101227)
* [rev:100744] Fixing Member_ProfileForm to validate for existing members via Member_Validator to avoid CMS users to switch to another existing user account by using their email address (from r100704) (from r100717)
Created with:
{}
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/changelogs/2.3.0.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/changelogs/2.3.0.md
| 190,894 | 1,758,118,090 |
en
|
# 2.3.0 (2009-02-23)
## Upgrading
### Translatable Problems
**Don't use Translatable for multilingual database content. Don't upgrade to 2.3.0 if you're already using
Translatable.**
The [Translatable extension](http://doc.silverstripe.com/doku.php?id=multilingualcontent) is currently marked as
unstable for the initial 2.3 release. **If your site uses more than one language for page content, don't upgrade to this
release.** We're working on bugfixes which will be contained in a minor 2.3.x release soon. Check our [release
announcements](http://groups.google.com/group/silverstripe-announce) for updates on Translatable bugfixes.
### BasicAuth disabled on test sites by default
Basic auth isn't enabled by default on test sites. If you need this, put this in your _config.php
if(Director::isTest()) BasicAuth::enable();
### /silverstripe and /cms no longer work as aliases to /admin
Removed certain URL aliases for CMS interface to allow for common page URLs like "silverstripe" or "cms". Please use
/admin as the main URL to access the CMS. See http://open.silverstripe.com/ticket/3267
### SiteTree Access tab now lets you select multiple groups
In order to do this, ''SiteTree->ViewersGroup'' and ''SiteTree->EditorsGroup'' have been changed from has_one relations
to many_many relations.
Your group-assignements for "Who can view this page" and "Who can edit this page" should be automatically migrated upon
calling ''dev/build''. See [#2847](http://open.silverstripe.com/ticket/2847)
### Newsletter moved into new module
Newsletter functionality has been moved into its own module called **[newsletter](modules/newsletter)**. If you were
previously using this as a feature out of the box with SilverStripe, then you will need to download the userforms module
to continue using it.
If you **don't** require the functionality, it's safe to delete these database tables:
* Newsletter
* NewsletterType
* SubscribeForm
* UnsubscribeRecord
#### auth_openid removed from default installation
The auth_openid module has been removed from default installation. Please install the module separately from
[silverstripe.org](http://silverstripe.org/auth-openid-module/)
### GenericDataAdmin and RelatedDataEditor moved into new module
GenericDataAdmin functionality has been moved into its own module called
**[genericdataadmin](modules/genericdataadmin)**. If you were previously using this as a feature out of the box with
SilverStripe, then you will need to download this module to continue using it.
### User Defined Form moved into new module
User Defined Form has been moved into its own module called **[userforms](modules/userforms)**. If you were previously
using this as a feature out of the box with SilverStripe, then you will need to download the userforms module to
continue using it.
//Important note: If you **do** have an existing page of User Defined Form type in your CMS site tree, it's best to
install the module first as shown above. If you run dev/build?flush=1 without installing userforms, you'll lose the User
Defined Form page type until you install it then run dev/build?flush=1.//
If you **don't** require the User Defined Form functionality, it's safe to delete these database tables:
* EditableCheckbox
* EditableCheckboxOption
* EditableDropdownOption
* EditableEmailField
* EditableFileField
* EditableFormField
* EditableMemberListField
* EditableRadioOption
* EditableTextField
* SubmittedFileField
* SubmittedForm
* SubmittedFormField
* UserDefinedForm
* UserDefinedForm_Live
* UserDefinedForm_versions
### PostBackup
PostBackup has been moved into a module. See [postbackup
module](http://open.silverstripe.com/browser/modules/postbackup/trunk).
### /db/build/?flush=1 is now called /dev/build
Flushing the manifest with ''?flush=1'' doesn't need to be explicitly added.
### Core API Changes
* Removed ViewableData->setVal(), use ViewableData->setValue() ===
* Removed Director::isLiveMode(), use Director::isLive() ===
* Removed DataObjectSet->append(), use DataObjectSet->push() or DataObjectSet->merge()
* Removed Controller->LinkTo(), use Controller->join_links()
* Removed DataObject->getLastWriteFields(), use DataObject->getChangedFields()
* Removed Convert::raw2attr(), use Convert::raw2att()
* Removed Member->isAdmin(), use Permission::check('ADMIN')
* Removed Debug::warning(), use user_error("your message", E_USER_WARNING)
* Removed SiteTree->canView_page(), Use instance-specific SiteTree->canView() instead by checking for ''$this->ID''.
* Deprecated URL parameter ?buildmanifest=1 (please use ?flush=1)
* i18ntextcollector is executed from a new URL. Use http://mysite.com/dev/task/i18nTextCollectorTask instead of
http://mysite.com/i18ntextcollector
### Director::addRules()
If you have made your own custom director rules with ''Director::addRules'', you will need to add a double-slash into
the rule, to separate the part of the URL that specifies "this is how I get to this controller" from the part that
specifies "these are arguments to the controller".
In other words, change this:
:::php
Director::addRules(50, array(
'admin/ImageEditor/$Action' => 'ImageEditor',
));
To this:
:::php
Director::addRules(50, array(
'admin/ImageEditor//$Action' => 'ImageEditor',
));
### Decorators
* Renamed DataObjectDecorator->extraDBFields() to extraStatics() (see
[r65065](http://open.silverstripe.com/changeset/65065))
* DataObjectDecorator->updateCMSFields() is now called from DataObject->getCMSFields(), instead of only SiteTree
instances
* Changed return values for DataObjectDecorator->updateCMSActions() to FieldSet, rather than an array.
### Data Model
* Removed Datetime class, use SSDatetime instead (it was conflicting with PHP 5.2 integrated classes)
* Removed Text->Att(), use Text->ATT_val() instead
### Forms
* Removed NoScriptField, use LiteralField
* Removed EncryptField, use PasswordField
* Removed NamedLabelField, use LabelField
* Removed NoScriptFormAction, use unobtrusive scripting
* Removed FormField->setExtraClass(), use FormField->addExtraClass()
* Removed deprecated ComplexRequiredFields, ''RequiredFields'' and custom javascript instead
* If you have created your own FormField classes, FormField::performReadonlyTransformation() and
FormField::performDisabledTransformation() must return new form fields, e.g., cloned instances, or unit tests will fail.
### Templates
* '''$Top''' in templates has changed its behaviour; if you call $Top from inside a template that is rendered
separately (eg, a Form template), it will point to the top element of that template execution (in this case, the Form
object) rather than the top element of the outermost template (which would presumably be the page in question). This
was a bug that we have fixed, but some people may rely on it. See http://open.silverstripe.com/ticket/2781
* A `<legend>` element has been added before any `<fieldset>` in all SilverStripe forms. SearchForm.ss and Form.ss are
where it has been added. This now validates the form HTML for W3C compliance. Please verify that your forms visually
look okay after upgrading. Legend can be set by calling ''->setLegend('my legend here')'' on your Form object.
### CMS menu API
We have deprecated the LeftAndMain menu customisation API.
* Don't set any menu-item static variables any more.
* For the most part, you won't need to add anything to _config.php to add CMS menu items; just define the static
variables ''$menu_title'' and ''$url_segment'' on your ''LeftAndMain'' subclasses.
* If you want to add a menu item that's not a subclass of ''LeftAndMain'' (eg, help or a link to a webstats package),
use ''CMSMenu::add_menu_item()''
* To remove a menu item, use ''CMSMenu::remove_menu_item()''. It identifies items by classname rather than arbitrary
$code value.
### ContentNegotatior is now disabled by default, mostly
The ContentNegotatior system was a bit of voodoo that confused a lot of people, so we have disabled it by default for
regular templates. It will still enabled by default for templates that include the `<?xml ?>` header, because these
are the only templates that benefit from it significantly.
If you want to enable it for your HTML4 templates, then you can do so by calling ''ContentNegotiator::enable()''. Note
also that the DOCTYPE altering, which was a frequent cause of pain, only executes if your original template had the
`<?xml ?>` header.
### Other API Changes
* Removed deprecated File::loadallcontent(), use Upload class
* Image->URL returns relative instead of absolute URL. Use Image->AbsoluteURL instead.
* Moved DataReport and SQLReport into the ecommerce module. If you're using these classes, please download the
[ecommerce module](modules/ecommerce).
### Default mysite/_config.php
The installer includes a default configuration file: *mysite/_config.php*. If you have already have your own
*mysite/_config.php*, you can safely keep your own version and disregard the new file.
### Default validators for Form instances (PHP and JavaScript)
Enforcing usage of a Validator instance in Forms if its not explicitly passed to the Form constructor. By default a new
RequiredField instance is used without any fields marked as required. This was necessary because some FormField
implementations rely on their validate() method, sometimes as a wrongly placed processing hook, but mostly for security
reasons. One example are file extension checks in FileField subclasses.
In most cases this won't have any effect on existing forms, although you might get additional JavaScript dependencies
like Validator.js and behaviour.js. If you want to disable JavaScript validation across forms, add the following to your
_config.php:
:::php
Validator::set_javascript_validation_handler('none');
See http://open.silverstripe.com/changeset/69688
## New Features
* ![rev:71761] Allow combined files to be disabled
* ![rev:70697] CRM Security with two levels: viewable and writeable.
* ![rev:70422] added silverstripe version number to meta generator tag
* ![rev:70142] add permission control for AddForm and EditForm
* ![rev:69687] added Smiliey support to BBCode / forum. Now BBCode supports :) :P :D :( 8-) and :^). Yays for icons. Should move from BBCodeParser to TextParser so its available in tinymce but this will do for the forum
* ![rev:66163] #1531 - Allow moving files in root assets file (hamish)
* ![rev:65904] #1614: Allow use of admin/addpage?ParentID=(ID)&PageType=(Class) url to quick-add pages
* ![rev:65690] #594: Added javascript-on-demand support
* ![rev:65689] #594: Added javascript-on-demand support
* ![rev:65688] #594: Added javascript-on-demand support
* ![rev:65555] #2767 wakeless: Allow popuplation of non-DataObject tables with YamlFixture
* ![rev:65351] merged back patch for image editor. Currently completely broken on trunk this patch does nothing to fix it sadly. I think its a prototype thing
* ![rev:65095] Added CMSMenu and CMSMenuItem and adjusted existing LeftAndMain subclasses to use new notation.See #2872 (thanks to hamish for the patch!)
* ![rev:64881] Making DataObject attributes translatable through i18n class, e.g. $db and all relation statics. Use DataObject->fieldLabels() to access translated attributes.
* ![rev:64877] Added JavaScript unit tests with jQuery QUnit. Can be viewed similiarly to PHPUnit tests through dev/jstests URL. Uses an `<iframe>` to include all tests.
* ![rev:64758] Update to TinyMCE 3.2 - CMS changes
* ![rev:64492] Support for i18n entity namespaces in templates
* ![rev:64480] Added support for 'sake dev/tests/all --showslow' to list slow tests
* ![rev:64473] Added ?debug_memory=1 flag
* ![rev:64461] Show max memory usage on dev/tests/all
* ![rev:64444] Flush template cache before running tests
* ![rev:64417] Added SiteTreeMaintenanceTask
* ![rev:64345] #2956 seaeagle1: Added If-Modified-Since support to HTTP::add_cache_headers() [16:00:18]
* ![rev:64308] Allowing for field-level permissions in DataObject::$api_access - respecting those permissions for reading and writing in RestfulServer (#2918)
* ![rev:64307] Allowing for field-level permissions in DataObject::$api_access - respecting those permissions for reading and writing in RestfulServer (#2918)
* ![rev:64231] #2951 simon_w: Use 301 redirect on Director::forceWWW()
* ![rev:64157] Added FormScaffolder for more flexible scaffolding of FieldSets from DataObject metadata
* ![rev:64103] #2601 - More template handlers
* ![rev:63679] Added HTTP method override support to HTTPRequest and Form (through $_POST['_method'] or $_SERVER['X-HTTP-Method-Override']), incl. unit tests
* ![rev:63659] Frontend CRUD scaffolding with RecordController and CollectionController (not fully functional yet, needs correct Link() methods)
* ![rev:63637] Added coloured output to dev/tests/all
* ![rev:63623] Added DataObject->getFormFields() - uses DataObject->scaffoldFormFields() by default. Added DataObjectDecorator->updateFormFields() for easy customization
* ![rev:63462] Added Email::obfuscate()
* ![rev:62477] Including Firebug Lite when requested by ?debug_firebug=1 for easy debugging in IE/Opera/Safari- otherwise including fake-objects with FirebugX by default to enable usage of console.* commands without javascript errors
* ![rev:62472] Added GoogleSitemap::enable()
* ![rev:62467] Formatting MySQL error messages with newlines through new SQLFormatter class (used in MySQLDatabase)
* ![rev:62458] Allow Use of ?fields=ID,Name,OtherField,RelName get variable on RESTful server queries, to restrict the fields and relations returned int the data set
* ![rev:62396] Added BulkLoader_Result for better inspection of import results, replacing the simple numeric count result format.
* ![rev:62333] TableListField's TRs can now have class=loading added to them to show a loading icon. (Used by ModelAdmin)
* ![rev:62286] Allow customisation of HTTPResponse status text, as well as status code
* ![rev:62284] Files & Images tree now shows filename rather than meta-data title, to make it easier to find the file you're looking for
* ![rev:62211] #1403 - addFieldToTab(), push(), insertBefore(), etc will allow duplicates - the old field is replaced with the new.
* ![rev:61824] #2594 - Allow decoration of getCMSActions() (simon_w)
* ![rev:61605] relate groups with column selections in SearchForm of CRM Admin
* ![rev:61444] xml2array now works with recursion so it will actually work with most xml files. Unit tests to comei
* ![rev:60396] Added configurable Requirements::$write_js_to_body for performance improvements (turned off by default)
* ![rev:60368] Improved debugging view on CLI interface, by having a separate DebugView subclass that takes care of error output for this situation.
* ![rev:60220] Merged in CompositeDBField
## API Change
* ![rev:70697] add Group::canView() so that give group object a different level of security control.
* ![rev:70150] we move the filedata generation part of export() function to a new function generateExportFileData, so that, a child class could reuse the function when overload export function
* ![rev:70057] Decimal->requireField now includes 'not null' constraint, as Sapphire doesn't expect the value to be null. MySQL switches null values to 0.00 on build.
* ![rev:69730] Removed access to broken image editor feature
* ![rev:69688] Enforcing usage of a Validator instance in Forms if its not explicitly passed to the Form constructor. By default a new RequiredField instance is used without any fields marked as required. This was necessary because some FormField implementations rely on their validate() method, sometimes as a wrongly placed processing hook, but mostly for security reasons. One example are file extension checks in FileField subclasses.
* ![rev:69363] Added ModelAdmin_CollectionController::columsnAvailable() and ModelAdmin_CollectionController::columnsSelectedByDefault() that can be overridden to customise the fields available in the column selection control.
* ![rev:69360] Add keyField and titleField arguments to SQLMap
* ![rev:68484] ContentNegotiator is now disabled by default, unless you include the xml header in your template. (merged from r68482)
* ![rev:67426] Added SSViewer::set_source_file_comments() to allow disabling of comments in SSViewer output
* ![rev:67380] Deprecated Email->setFormat()
* ![rev:66894] Move some of the installer into the sapphire directory.
* ![rev:66394]
* ![rev:66392] if a DataObject has getCMSActions, its model admin should be able to add them.
* ![rev:66268] Deprecated Controller::PastVisitor(), it generates a lot of unused cookies
* ![rev:66266] Improve encapsulation of cookies in Director::test()
* ![rev:66264] Revamped CMSMenu system to not instantiate any objects, so that _config.php doesn't get fskd
* ![rev:66175] Moving GoogleSitemap functionality into new "googlesitemaps" module
* ![rev:65744] make CreateForm be able to disable
* ![rev:65742] introduce SearchFilter::getDbFormattedValue() and GreateThanFilter will used this method to make the qurey so that it can apply to a field that input format is different that its db format, such as CalendarDateField.
* ![rev:65669] even when no results found, the HTTPResponse should return a "200" HTTPResponse rather than "404" HTTPResponse, otherwise, the right panel didn't refresh the result table, and the error message shows up.
* ![rev:65581] Deprecated CompositeField->insertBeforeRecursive(), use CompositeField->insertBefore()
* ![rev:65554] tidy up NewsletterAdmin.
* ![rev:65454] Deprecated DataObjectDecorator->augmentInit(), use LeftAndMainDecorator->init()
* ![rev:65453] Deprecated DataObjectDecorator->alternateCanCreate(), use DataObjectDecorator->canCreate()
* ![rev:65452] Removed Folder->userCan*() and File->userCan*()permissions and added more consistent behaviour with Folder->can*() and File->can*()
* ![rev:65451] Don't include NULL returns in decorated methods called through Object->extend(), meaning empty method bodies in decorators won't confuse permission checks through $myObj->extend('canView') etc.
* ![rev:65388] make DataObject::getField() visible to the public
* ![rev:65385] Removed manifest's dependency on database, by removing hastable information [17:47:04]
* ![rev:65229] Use return value of alternateCanPublish()
* ![rev:65150] Changed SiteTree->EditorsGroup has_one relationship to SiteTree->EditorGroups has_many relationship (see #2847)
* ![rev:65095] Removed LeftAndMain::add_menu_item(), LeftAndMain::remove_menu_item(), LeftAndMain::replace_menu_item(), LeftAndMain::clear_menu()
* ![rev:65068] Removed DataObjectSet->consolidate(), use DataObjectSet->toNestedArray()
* ![rev:65066] Removed DataObjectSet->consolidateString()
* ![rev:65065] Renamed DataObjectDecorator->extraDBFields() to extraStatics()
* ![rev:65060] Moved DataObject::get_by_url() to SiteTree::get_by_url()
* ![rev:65059] Marked DataObject->filledOut() deprecated
* ![rev:64958] #2922: RequestHandler:: now inherit
* ![rev:64954] #2857 - Renamed RequestHandlingData to RequestHandler
* ![rev:64953] #2857 - Renamed RequestHandlingData to RequestHandler
* ![rev:64951] #2698 ajshort: URL handler only passes control to subclasses of RequestHandlingData
* ![rev:64807] Added LastChange() method to BulkLoader_Result
* ![rev:64806] Updated CsvBulkLoader to have hasHeaderRow = true by default, even when a columnMap is specified
* ![rev:64805] add updateFieldLabels() to DataObjectDecorator, so as that a dataobject could update fieldLables by its decorator.
* ![rev:64792] A Text db field, by default, should be rendered as a TextareaField in its scaffoldForm
* ![rev:64528] delete GenericDataAdmin, RelatedDataEditor, DropdownField_WithAdd and their related code (js, css, etc) from cms, sapphire, "GenericDataAdmin" name space has also been deleted from lang files. They are all added in the new module "genericdataadmin"
* ![rev:64504] Changed HTMLVarchar->scaffoldFormField() to use HtmlEditorField instead of HtmlOneLineField, which does not work.
* ![rev:64428] Moved CheckboxFieldDisabled class to more common CheckboxField_Disabled notation
* ![rev:64426] Removed NoScriptField, please use LiteralField
* ![rev:64425] Removed EncryptField, use PasswordField
* ![rev:64421] Moved setAllowHTML() to DataLessField
* ![rev:64420] Removed NamedLabelField, use LabelField
* ![rev:64416] Removed SiteTree->makelinksunique() and SiteTree->makelinksuniquequick() - use new SiteTreeMaintenanceTask
* ![rev:64407] Removed NoScriptFormAction, use unobtrusive scripting
* ![rev:64402] Removed deprecated File::loadallcontent(), use Upload class
* ![rev:64401] Removed Filesystem::moverootfilesto()
* ![rev:64399] Removed deprecated ComplexRequiredFields, use RequiredFields and custom javascript instead
* ![rev:64398] Removed SecurityAdmin->listmembers()
* ![rev:64394] Removed deprecated Datetime class, use SSDatetime instead (was conflicting with PHP 5.2 integrated classes)
* ![rev:64384] Removed Email_Template, use Email
* ![rev:64383] Removed ViewableData->setVal(), use ViewableData->setValue()
* ![rev:64381] Removed Debug::mailBuffer()
* ![rev:64380] Removed Director::isLiveMode(), use Director::isLive()
* ![rev:64379] Removed FormField->setExtraClass(), use FormField->addExtraClass()
* ![rev:64378] Removed DataObjectSet->append(), use DataObjectSet->push() or DataObjectSet->merge()
* ![rev:64377] Removed Controller->LinkTo(), use Controller->join_links()
* ![rev:64376] Removed Image->transferlegacycontent()
* ![rev:64375] Removed DataObject->getLastWriteFields(), use DataObject->getChangedFields()
* ![rev:64374] Removed Convert::raw2attr(), use Convert::raw2att()
* ![rev:64373] Removed deprecated RestfulService->connect(), use RestfulService->request()
* ![rev:64372] Removed deprecated CustomValidator class
* ![rev:64371] Removed deprecated EditForm classa
* ![rev:64351] #551: Move code from CMSMain to SiteTree
* ![rev:64350] #551: Move code from CMSMain to SiteTree
* ![rev:64332] Removed deprecated methods related to CanCMS and CanCMSAdmin which are now removed from the Group class in favour of the Permission system
* ![rev:64330] Removed deprecated method isAdmin() on Member - use Permission::check('ADMIN') instead
* ![rev:64327] Removed references to CanCMS and CanCMSAdmin in Group, including references to it in Member. See ticket #2959 for more details.
* ![rev:64157] Added third optional parameter $object to DBField::create() to comply with ForeignKey and PrimaryKey constructors
* ![rev:63997] Deprecated GhostPage
* ![rev:63922] Added support for dot syntax to FieldSet::fieldByName()
* ![rev:63827] Added initial CMS tests to the system. These will execute tests on the data model provided by a user's project code
* ![rev:63764] Deprecated Form->loadNonBlankDataFrom() - it was duplicating loadDataFrom() without allowing for the same options, and it was buggy in its definition of "blank" by doing non-typesafe checks with if($value) $field->setValue($value) which resulted in '0' strings not being loaded
* ![rev:63759] Moved PostBackup class to module (see r63758)
* ![rev:63637] Added SSCli class to help with outputting coloured text on the command line
* ![rev:63579] Deprecated HTTP::sendFileToBrowser() in favour of more testable HTTPRequest::send_file()
* ![rev:63563] Created CSVParser class and updated CSVBulkLoader to use it
* ![rev:63468] Deprecated Form->resetData() - use Form->resetField()
* ![rev:63465] Changed parameters for Debug::friendlyError()
* ![rev:63337] Deprecated DataObject->listOfFields() - use custom code instead
* ![rev:63310] Removed SiteTree->canView_page() - originally created under the false assumption that SiteTree->can('view_page') is still valid. Every canView() can be instance specific. Original patch by simon_w in r53183 and #2198
* ![rev:63182] Deprecated URL parameter ?buildmanifest=1 (please use ?flush=1)
* ![rev:63177] Removed Text->Att(), use Text->ATT_val() instead
* ![rev:63176] Deprecated Varchar->Attr(), use Varchar->ATT_val() instead
* ![rev:63077] Removed useless File->test() method
* ![rev:62883] TableListField::sourceFilter() can be overloaded to change the querying logic.
* ![rev:62847] Deprecated Member::isInGroup() - use Member::inGroup() instead
* ![rev:62846] Deprecated Member::isInGroup() - use Member::inGroup() instead
* ![rev:62843] Removed Debug::warning()
* ![rev:62325] Moved DataReport and SQLReport into the ecommerce module, since this is the only place it is used, plus it's going to be deprecated soon anyway
* ![rev:62324] Moved DataReport and SQLReport into the ecommerce module, since this is the only place it is used, plus it's going to be deprecated soon anyway
* ![rev:62316] Deprecated LabelledLiteralField by adding a @deprecated note with alternate approaches, and added a PHP notice for people currently using it
* ![rev:62309] Moved ProgressBar and support files to newsletter/trunk module, as this is the module where it's used
* ![rev:61683] TableListField::ajax_refresh is deprecated. Removed all calls to it from the core, instead getting HTML fragments by visiting the field's URL.
* ![rev:61632] BasicAuth is now disabled by default on test sites
* ![rev:61505] Allow definition of DataObject::getCMSAddFormFields() to alter modeladmin step 1
* ![rev:61485] Deprecated GroupedDropdownField, DropdownField should now be used instead
* ![rev:60894] Added Validator::set_javascript_validation_handler() and ->setJavscriptValidatorHandler(), to choose a different way of dealing with javascript validation. Currently 'none' and 'prototype' are the only legal options, but 'jquery' would be an obvious thing to implement.
* ![rev:60711] Template precedence changed. Page_results now takes precedence over HomePage. That is, all action templates of parent classes take precedence over the actionless templates.
* ![rev:60665] TableListField utility links no longer have target=_blank
* ![rev:60405] Removed merged USZipCode field - should be custom code until we figure out proper localization
* ![rev:60392] Renamed static Member::autologinhash() to static Member::member_from_autloginhash() to be more in line with naming convnetions, and not conflict with Member.AutoLoginHash in the database
* ![rev:60376] Allow the definition of SS_ERROR_LOG in _ss_environment.php to set up Debug::log_errors_to().
* ![rev:60368] Added Debug::log_errors_to(), to log errors to a file.
## Bugfixes
* ![rev:71923] In SSViewer::parseTemplateContent($content, $template=""), when the $content is a xml template, we should not wrap anything around it, for web browser able to correct parse the xml
* ![rev:71872] #3491 - Fix nonexistant plugin stopping tinymce from working in safari.
* ![rev:71846] #3481 - Check if classes exist before trying to instantiate a singleton on database build, to work around stale manifest errors
* ![rev:71841] #2723 - Allow more than more subclass of RelationComplexTableField on a page at a time.
* ![rev:71797] removed doubled up pipes and border on switch view links in footer.
* ![rev:71764] Fix wrong conditional
* ![rev:71709] BUGFIX Fixed redirection to external URLs through Security/login with BackURL parameter (merged from trunk
* ![rev:71642] Disable DataObject validation temporarily while importing yaml fixtures
* ![rev:71568] CRM "select all" and "select none" doesn't work when the crm manages multiple models.
* ![rev:71499] i18n::include_by_locale() should skip check the web root level and ../webroot level for language file, this is not only "not necessary" but also "must" because some server configuration prevent from any file access above the site root folder.
* ![rev:71436] Error adding custom header in Email because of non-existant array key. Thanks ed! Ticket #3485
* ![rev:71348] Removed unused ComplexTableField->unpagedSourceItems - was already commented out in r70956, and doesn't seem to be used across parent- or subclasses. Added ticket #3484 to re-enable popup pagination, which was broken and disabled due to the deprecation of $unpagedSourceItems (see r53830)
* ![rev:71250] fixed site page restoration
* ![rev:71177] cms ui, fixed loading spinner style
* ![rev:71024] #3429: Fixed CMS change detection
* ![rev:71023] #3443: Fixed refreshing of relation CTFs after editing data
* ![rev:71018] #3442: Fix pagination in HasManyComplexTable, HasOneComplexTableField, ManyManyComplexTable
* ![rev:70997] #3441 funkygibbon: Stop ThumbnailStripField breaking on orphaned images
* ![rev:70994] CMS UI site content > search > add criteria select element now returns back to prompt & tweaked layout
* ![rev:70935] adjust positioning of SilverStripeNavigator published/draft message
* ![rev:70895] Ensure string "0" is not considered a NULL value when CsvBulkLoader imports values from a CSV file
* ![rev:70893] reinstating silverstripe navigator and restyling to match cms ui
* ![rev:70891] removed extra colon appearing in SilverStripeNavigator
* ![rev:70848] Removed reference to Requirements::javascript() for including jquery as it's already included, and causes JS errors in MemberLoginForm
* ![rev:70847] Fixed correct path to jquery.js in MemberLoginForm
* ![rev:70832] $hide_ancestor hides Page as well when set from multiple subclasses of Page. Thanks dio5!
* ![rev:70784] #3415 ajshort: Requesting root page via ajax now preserves isAjax value.
* ![rev:70781] #3430 page versions don't appear automatically in Safari - versions DOM panel was floated behind the edit form
* ![rev:70775] Fixed "cancel" button for inline "create folder" functionality (was not stopping event in IE7)
* ![rev:70773] Disabled faulty usage of setStyle() with object literals instead of strings in SWFUpload
* ![rev:70766] Removed hack that hid the Avatar field for the forum
* ![rev:70750] Fix incorrect URL when adding a new Member via the MemberTableField
* ![rev:70747]
* ![rev:70743] 1. TableListField exportfunality random bug. 2. make Email_BounceRecord::canCreate() return false; so that it can not be manully create from CRM, instead, it should create through email buncing system.
* ![rev:70741]
* ![rev:70729] Add EditForm to list of allowed actions
* ![rev:70725]
* ![rev:70724] Fixed loader_frame.html scrollbar madness. Removed hacked CSS and tidied up popup to work in IE6/7 and Firefox consistently
* ![rev:70698] Group::AllChildrenIncludingDeleted() should filter on canEdit() rather than a can() call
* ![rev:70695] $_POST[$this->Name] in TableField::SubmittedFieldSet are not always set
* ![rev:70691] show flash icon and box if flash file exists. MINOR: created a default editor.css file which has base css styles for the CMS.
* ![rev:70683] cms ui added colon to image upload prompt (inline with other step)
* ![rev:70682] cms ui remove errant dashed borders in IE6
* ![rev:70681] cms ui text size in righthand image panel
* ![rev:70680] Fixed behaviour.reapply() call in TableListField->refresh() javascript to applyToParent (the actual DOM container). Otherwise methods of the TableListField prototypes aren't properly attached to the DOM nodes, which causes problems like #3377
* ![rev:70671] Fixed newsletter send button alignment
* ![rev:70616] stopped double scrollbars on popups in IE7 (IE6 still broken)
* ![rev:70613] Fixed styling for "Delete selected files" in the left-hand tree actions for AssetAdmin. Thanks ajshort!
* ![rev:70609] Defined jsValidation() and validate() so that inherited validation from DateField doesn't break PopupDateTimeField - this still needs fixing, and PopupDateTimeField shouldn't inherit from CalendarDateField
* ![rev:70604] autocomplete style change.
* ![rev:70603] cms ui fix files & images upload images styling
* ![rev:70602] cms ui fix files & images table styling
* ![rev:70601] cms ui removed backgound from delete button on files & images
* ![rev:70583] cms ui fixing up treetool
* ![rev:70573] cms ui removed extra padding from bottom of tools
* ![rev:70572] cms ui fix styling of tools on files & images section
* ![rev:70567] cms ui fix styling of tools on files & images section
* ![rev:70566] reverted previous tree tool change
* ![rev:70565] when the total number of rows is 0 the pagination says 1 to 0 of 0
* ![rev:70563] cms ui fix styling of tools on files & images section
* ![rev:70561] cms ui padding on tree
* ![rev:70545] Hidden field needs to exist for DateField_Disabled in order for validation to pass correctly
* ![rev:70541] cms ui padding on tree in right pane (eg. image selector)
* ![rev:70508] cms ui tidying up tree tools
* ![rev:70507] cms ui tidying up tree tools
* ![rev:70497] merged patch from ajshort. Fixed getURL() so it preserved the extension
* ![rev:70496] cms ui tidying up padding of tree tools elements
* ![rev:70495] cms ui fix specifivity of alignment of radio buttons and labels in right pane
* ![rev:70486] cms ui fix alignment of radio buttons and labels in right pane
* ![rev:70481] If __form.elements.ID is not defined, don't cause an error in the CMS under certain circumstances
* ![rev:70479] cms ui site tree tools style fix
* ![rev:70474] Fixed float issue caused by change in r70303
* ![rev:70445] fixed size of popup on 1024x768 resolutions
* ![rev:70441] added scroll bars
* ![rev:70404] site tree form element alignment
* ![rev:70397] stopped swfupload div appearing behind cms ui in firefox 2 on windows
* ![rev:70396] cms ui sitetree tools padding
* ![rev:70395] IE6 cms login remember me alignment
* ![rev:70393] cms ui sitetree padding across cms sections
* ![rev:70392] centered GreyBox popup in the CMS
* ![rev:70390] cms ui form site tree input alignments
* ![rev:70389] cms ui form site tree input alignments
* ![rev:70388] cms ui fixed width of tools at top of site tree
* ![rev:70377] fixed site tree padding issue
* ![rev:70376] URL input validation for RestfulServer
* ![rev:70356] fixed positioning on site tree actions on left tree for Security and comment tags
* ![rev:70172] due to changeset 65289 by phalkunz, the ImportForm() and import() functions need to move from CRMAdmin class to CRMAdmin_CollectionController class, fix relative bugs by the move.
* ![rev:70160] Add workaround for PHP bug #46753
* ![rev:70135] Fixed spacing at the top of right forms in the CMS caused by the `<legend>` element. Fixed by hiding it via CSS instead of removing it completely
* ![rev:70130] Fixed issue of not enough space in the AssetAdmin "Upload" tab for multiple file uploading, mostly affecting IE6/7
* ![rev:70127] Changed the FieldHolder method to use explicit functionality instead of statically calling FormField::FieldHolder()
* ![rev:70117] Fixed clearing issue in IE7 for the left hand tree
* ![rev:70077] Removed ANSI compatible SQL that shouldn't be in branches/2.3 - this feature is available in trunk
* ![rev:70063] Removed ID for back links table which is ambiguous, unncessary and caused the CSV export to break
* ![rev:70052] Deleted setting of $content variable that broke HTTP::findByTagAndAttribute()
* ![rev:70049] Strip out any "~" characters that may stop the staging link from working in IE6/IE7
* ![rev:70046] Check for form object before calling observe() on the element. The CheckBoxRange constructor allows for a null form, so a check for a form object is essential.
* ![rev:70026] Disallow execution from DailyTask and HourlyTask by website visitors.
* ![rev:69988] `<% end_if %>` was breaking the template where it should've been a `<% end_control %>`. This fixes the export link in #3333
* ![rev:69986] Added page-limiting back to CMS tree querying
* ![rev:69975] Fixed FileField->getFolderName() - it was not returning $this->folderName, instead it was returning an undefined variable in error
* ![rev:69973] error when creating a form
* ![rev:69951] More solid string-parsing through regular expressions in SQLQuery->filtersOnID() and SQLQuery->filtersOnFK(), incl. unit tests
* ![rev:69943] #3329: Improved speed of folder creation in files + images
* ![rev:69931] Fixed flash HTML that gets inserted into the content so it's cross browser compatible with browsers that don't support the `<object>` tag (`<embed>` is added inside)
* ![rev:69930] Checkbox "Remeber me next time?" now works because of a missing method call logIn() on Member
* ![rev:69927] #3024 - Stopped style dropdowns from getting stuck by making them regular dropdowns. Not as pretty but more stable.
* ![rev:69921] Fixed minor error on dev/buildcache
* ![rev:69910] Allowing to pass $context into Hierarchy->markPartialTree() and Hierarchy->markChildren()
* ![rev:69909] Making sure a valid DataObjectSet is returned from Hierarchy->stageChildren()
* ![rev:69899] Explicitly setting "lang" as a GET var when getting a page within the CMS (if the language chooser DOM object is available, hence translation mode is enabled). Used in CMSMain->init() to set the "current language". (merged from branches/translatable in r64523, thanks wakeless!)
* ![rev:69894] Using baseDataClass() in Translatable::get_existing_content_languages()
* ![rev:69893] Added extension point for augmentAllChildrenIncludingDeleted(), augmentNumChildrenCountQuery(), augmentStageChildren() in Hierarchy (merged from branches/translatable in r64523, thanks wakeless!)
* ![rev:69891] Using SQL DISTINCT in get_existing_content_languages()
* ![rev:69879] Fixed label positioning in CompositeFields for original language fields in translation mode (was shifted left before)
* ![rev:69878] Fixed $add_action behaviour for SiteTree classes (through i18n_singular_name() method). Deprecated in favour of "`<myclassname>`.TITLE" entity to enable localized page titles. Limited add_action behaviour to SiteTree (was implemented on DataObject before)
* ![rev:69872] Fixed status checking in SiteTree->getIsDeletedFromStage()/getIsModifiedOnStage()/getIsAddedToStage() for new pages with non-numeric IDs
* ![rev:69870] Fixed use of undefined constant error, and undefined variable error in TableField stopping CMS user from adding records to a TableField
* ![rev:69832] #3235: Fixed linking of images and other HTML tags
* ![rev:69830] #3219: dev/buildcache showing up in static links
* ![rev:69828] Fixed styling for caption checkbox field on the right hand image panel in CMSMain
* ![rev:69803] If TreeDropdownField source object is "Folder", don't show "File" tree items unless the marking filter function is explicitly set. This fixes the bug where files were appearing for selecting a folder in the thumbnailstrip field in CMS
* ![rev:69752] somtimes +/- icons hidden. ticket #893
* ![rev:69728] #3254 - Fixed fatal errors when creating subclass of member
* ![rev:69720] #3199: No longer warned about saving changes if you have actually pressed save.
* ![rev:69718] #2550 - Fixed bug with draggability of newly created nodes.
* ![rev:69715] #2342: Database names with hyphens and other special characters can now be used.
* ![rev:69700] #3224 ajshort: Get HTTP::setGetVar() working with variables that contain array indexes
* ![rev:69697] #3165 nicolaas: Fixed Director::history() in some cases.
* ![rev:69696] #3248: Fixed TreeDropdownField when using non-ID key field
* ![rev:69695] #3188: Fixed default HeaderField name to be non-conflicting with other fields, for backward compat
* ![rev:69694] #3097: Removed buggy template feature
* ![rev:69693] #3249: Allow altering of encryption algorithm
* ![rev:69690] #3081 simon_w: Fixed pagination on spam comments
* ![rev:69689] Don't include Validator.js if Validator->javascriptValidationHandler is set to 'none' (in Validator::__construct()).
* ![rev:69681] Fixed HTML insertion through TinyMCE in Safari - TextArea fallback for lacking Codepress-support wasn't working. Known bug in Codepress JS Highlighter, see http://sourceforge.net/tracker/index.php?func=detail&aid=1913725&group_id=186981&atid=919470
* ![rev:69657] Fixed js error due to inlined inclusion of CMSMain_upload.js which was conflicting with inline initialization. Disabled initializiation as the flash uploader was pulled out a while ago anyway (see #3251)
* ![rev:69504] Fixed SiteTreeHandlers.loadTree_url url concatenation
* ![rev:69442] Fixed permissions in CMSMain->revert() - only needs edit permissions, not publish permissions
* ![rev:69378] CountryDropdownField now allows for title to be optional, which uses the name of the field if not set. This makes it consistent with DropdownField
* ![rev:69377] Added check before foreach() to fix potential HMCTF bugs
* ![rev:69360] Get DrodpownField::$emptyString working when used with a SQLMap source
* ![rev:69321] Added `<td class="action">` to AssetTableField.ss to comply with template semantics of parent classes (necessary to detect javascript actions)
* ![rev:69222] Strip potential whitespace from the beginning and end of string before limiting word count in Text->LimitWordCount(), fixing potential interference with truncation process
* ![rev:69220] Fixed Text->LimitWordCount() not returning the correct number of words in the truncated text.
* ![rev:69204] Making Password formfield in Member->getCMSFields() translatable
* ![rev:69203] Making "Main" tab in FormScaffolder translatable
* ![rev:69065] Fixed notice-level error in no-get-var URL processing when there is no querystring.
* ![rev:68999] Make sure the website URL that the commenter posts has a correct "http://" or "http://" bit at the start of the string
* ![rev:68940] Fixed bug in SQLQuery::unlimitedRowCount() when used with grouped queries, that should fix a lot of pagination situations.
* ![rev:68935] Fixed PHP notice potential error in MemberTableField->addtogroup()
* ![rev:68921] Turned english text into translatable entity for PageCommentInterface link for RSS feed of all comments for all pages
* ![rev:68890] "console not defined" error in IE in en_US.js, check typeof(console) is not undefined before calling console.error()
* ![rev:68881] remove Debug::message
* ![rev:68875] Fix uglyness when title is longer than the tree dropdown field
* ![rev:68858] Added closing tags to relation XML in XMLDataFormatter. Was relying on ContentNegotiator fixing self-closing tags automatically, but this form of content parsing is disabled for xml content by default now (see r68484)
* ![rev:68834] Make sure date is a string before trying to use strtotime
* ![rev:68817] Fixed sprintf detection bug in SiteTree->getClassDropdown()
* ![rev:68810] Making only formfields readonly (not formactions) when comparing versions and showing historical versions within CMSMain
* ![rev:68809] Check hasChanged method exists before calling it
* ![rev:68764] Fixed translation of CommentAdmin_SiteTree.ss
* ![rev:68762] Fixed label spacing in Date->TimeDiff()
* ![rev:68757] Fixed additional tabs for image popus in AssetTableField. They we're not being generated in non-english interfaces due to the translated title being used as the tab identifier
* ![rev:68754] Limiting readonly transformation of form in CMSMain->EditForm() to fields only (excluding actions). FormAction readonly transformations were fixed a while ago, which meant that they were actually enforced now, causing unavailable cms actions in certain scenarios (e.g. with a page deleted from live, which should make the fields readonly, but leave buttons functional)
* ![rev:68752] Fixed TranslatableTest to instanciate Page instead of SiteTree fixtures - pages in the database should never have ClassName=SiteTree. This was causing failing tests due to the changes in SiteTree->getClassDropdown()
* ![rev:68751] Including all translated language tables by default in i18n::_t() instead of selectively including modules based on filename. This caused bugs where entities were located in language tables in a different module than their filepath would suggest. Example: Page.SINGULARNAME is stored in sapphire/lang/en_US.php, while Page.php is stored in mysite/Page.php
* ![rev:68746] Don't overwrite existing module arrays in i18nTextcollector - fixing bug with entities for "foreign modules" being reset during parsing
* ![rev:68702] Updated CMS to support HtmlEditorField changes in r68701
* ![rev:68662] #3166 jam13: Fixed caching in RestfulService
* ![rev:68628] Fixed HasManyComplexTableField/ManyManyComplexTableField issue with source items which broke from changes in r66080. Thanks hamish!
* ![rev:68627] Fixed javascript error in the CMS
* ![rev:68626] Fixed javascript error in the CMS
* ![rev:68603] Fixed new searchform changes for Live/Stage
* ![rev:68515] Making sure phpinstaller works on subdomains (see #3167)
* ![rev:68463] Fixed PHP notice in RebuildStaticCacheTask
* ![rev:68331] Fixed ModelAdmin import success message (too few arguments for sprintf())
* ![rev:68194] Allowing FormAction instances to be readonly by setting disabled="disabled". Adding CSS class "disabled".
* ![rev:68177] Moved creation of "help" menu entry from cms/_config.php to LeftAndMain::init() to get localized titles (locale isn't set at _config.php level)
* ![rev:68176] Fixed i18n display of menu titles rendered by CMSMenu in LeftAndMain->MainMenu()
* ![rev:68170] Escape table name in versioned to allow creation of page type classes with the same names as SQL reserved words
* ![rev:68159] Changing i18n entity format in CMSMenu->provideI18nEntities() to have actual class as namespace (related: r66264)
* ![rev:68155] Added stub PDODatabase->renameField() implementation to avoid errors when batch-instanciating singletons
* ![rev:68130] Supporting URLs with folder-structure in "sake -start `<myprocessname>` `<myurl>`"
* ![rev:68039] Improved DataObjectSet->PaginationSummary() to show full context (instead of halved) when on first or last page
* ![rev:68027] Don't show template comments in RSSFeed, or it'll break the XML document
* ![rev:68026] Fixed undefined variable $matches in SSViewer::parseTemplateContent()
* ![rev:68024] SSViewer::set_source_file_comments(false) wasn't working because of lack of checking if enabled.
* ![rev:67777] Added check ot i18n::include_by_class() to prevent repeated calls.
* ![rev:67681] Add a unique identifier to the "direction" method for Email::obfuscate() to avoid duplicate custom CSS being included in the page header
* ![rev:67678] Method not found error. Requirements::customCSS() should be calling self::backend()->customCSS() not custom()
* ![rev:67609] #3182 - Fix URL fixing on machines where url is case insensitive (hamish)
* ![rev:67605] #3204 - Broken link tracking is broken (ajshort)
* ![rev:67587] #3174 - Unable to drop widgets into widget areas in CMS (marcink)
* ![rev:67584] #3218 - Spelling mistake in RestfulService (hamish)
* ![rev:67582] Fixed a check for CSV field formatting.
* ![rev:67580] Fixed an aliasing problem when saving popup items, and a bug with when associating a new record with the parent ID associated with the field.
* ![rev:67530] SSDatetime can handle being given a NZ date in dd/mm/yyyy format
* ![rev:67529] Only setting LockedOutUntil to NULL in Member->logIn() if the column is actually present in the database. Otherwise this setting will case an UPDATE Member SQL query to fail on the first /dev/build call on a 2.2->2.3 upgrade if not in dev-mode (=requiring login) (see #3171)
* ![rev:67526] Added $CurrentLink to templates of AssetTableField and MemberTableField in order to support auto-refreshing after popup-close (see #2925)
* ![rev:67520] Fixed i18n::get_owner_module() to detect template paths in themes (array notation) correctly (see #3022)
* ![rev:67519] Added GoogleSitemap.ss from sapphire
* ![rev:67506] Avoid ugly border in CMS forms by adding "border: none" in CSS to cms/css/layout.css
* ![rev:67503] disabling template comments for xml output like sitemap.xml
* ![rev:67455] Fixed incorrect parameter variable name in Mailer->sendPlain()
* ![rev:67417] Added `<legend>` element immediately after `<fieldset>` for SearchForm and Form templates. This is required to validate these templates as W3C compliant
* ![rev:67401] Moving Requirements::combine_files() calls from cms/_config.php to LeftAndMain->init() to avoid side-effects in non-CMS contexts. Examples:
* ![rev:67363] $allowHTML argument was not passed to DatalessField::__construct
* ![rev:67304] Since ModelAsController->handleRequest() expects a URLSegment, we make the ErrorPage Link() return a relative URLSegment in ErrorPage->publish()
* ![rev:67299] Changed Director::test($this->URLSegment) to Director::test($this->Link()) in ErrorPage->publish() to be more robust
* ![rev:67290] Added parent::setUp() and parent::tearDown() calls to various tests, in preparation for push/pop a mock controller the controller-stack
* ![rev:67271] dev/build should function even when new classes are referenced in _config.php
* ![rev:67268] Filter on the baseclassid in Hierachy, not the class id, in case the class doesnt have a table (aoneil)
* ![rev:67221] Save default locale for new members, so the profile form doesn't show first available locale in dropdown because its defaults are overwritten by Member->Locale = NULL (see #3159)
* ![rev:67201] Declared behaviour.js variables as local for better recursive functionality
* ![rev:67199] Fixed incorrect permission checking when the current member isn't being used
* ![rev:67162] Scrollbars didn't appear properly in CMS without resizing the window manually, so used jQuery to properly detect when document is ready before attempting resize. Ticket #3089
* ![rev:67150] Checking for "$this instanceof VirtualPage" instead of "$this->class == 'VirtualPage' to support subclassing in VirtualPage->onBeforeWrite()
* ![rev:67147] Fix requirements not being restored after an email is sent
* ![rev:67140] Checking for existence of $this->record in VirtualPage_Controller->init()
* ![rev:67137] Fix publishing of error pages
* ![rev:67083] Fixed StaticExporter output format
* ![rev:67078] Put the order of save and publish buttons back to normal (so save and publish are next to eachother)
* ![rev:67045] Fixed Enum::scaffoldSearchForm() to always include an (All) option
* ![rev:67035] Fixed error in javascript (because of commented out code) that broke IE6/7 in the CMS
* ![rev:66946] Fixing tests
* ![rev:66940] Fixed warning on AssetAdmin (merged from trunk)
* ![rev:66922] #3100: Graceful degradation for codepress in safari
* ![rev:66918] #3115 ajshort: Fixed backslashes in temp folder location in manifest builder
* ![rev:66894] Friendlier error when you have a site running on a PHP4 server, or a server without PHP.
* ![rev:66891] Don't make blank dates show 1/1/1970
* ![rev:66888] Better generation of PastMember cookie when you have stale login info
* ![rev:66828] Fixed sortWidgets() function in WidgetAreaEditor not working because it was picking up comment nodes
* ![rev:66820] Added extension to email address when accessing Security/passwordsent since the . (dots) are split into extensions when the URL is parsed
* ![rev:66799] Fixed importer not working because of i18n_singular_name(), just use the class name of the model instead
* ![rev:66793] Made use of Convert::raw2att() before returning the ModelName for Import spec fields
* ![rev:66791] Fixed "Show specification..." link not working because ModelName had spaces in it
* ![rev:66784] Only including ModelAdmin->ImportForm() if an actual importer was specified
* ![rev:66740] Passing through $member param from SiteTree->canPublish() to SiteTree->canEdit()
* ![rev:66723] fixed typo in filesystem
* ![rev:66707] Fixed notice-level errors in PhoneNumberField
* ![rev:66701] Add LeftAndMain:$url_rule to minimise bugs in modules
* ![rev:66698] Fixed sake bug when checking for an argument in bash script. Ticket #3112. Thanks simon_w.
* ![rev:66638] Fixed flaw logic checking for $member variable, since it's always set the alternative for choosing Member::currentUser() would never work.
* ![rev:66635] Fixed SiteTree->getCMSActions() so it returns a FieldSet, instead of a DataObjectSet. This makes it consistent with DataObject->getCMSActions() as well as SiteTree->getCMSFields()
* ![rev:66632] Fixed SiteTree->getCMSActions() not extending properly because it was passing an array to the extend() 2nd argument, which expected a FieldSet object
* ![rev:66629] Fixed incorrect class name in user_error message for deprecated function HTTP::sendFileToBrowser()
* ![rev:66608] ModelAdmin clear search now preserves the result column selection
* ![rev:66505] Consistenly returning cloned instances for all FormField classes when calling performReadonlyTransformation() or performDisabledTransformation(). Making sure that these instances are actually flagged as readyonly/disabled. Addd unit tests to dynamically instanciate most FormField classes to check for this behaviour. Originally, this bugfix was necessary to avoid changed FormField state when recursively calling replaceField() on FieldSet->dataFields() in Translatable->updateCMSFields()
* ![rev:66431] Removed SearchForm->FormMethod() and used $this->setFormMethod() in SearchForm constructor instead which is a nicer solution instead of overloading a Form method
* ![rev:66334] Hiding "change password" fields by default in admin/myprofile, they shouldn't validate the input by default. Replaced with a link to toggle those fields (#3106)
* ![rev:66332] Include jquery_improvements.js whenever jquery.js is required, so jQuery.noConflict() is set. This is required to ensure $() behaves in the prototypey way (alias for document.getElementByID()) rather than jQuery style (document.getElementsBySelector())
* ![rev:66331] Removed overloaded $() function which added support for multiple string arguments in behaviour.js - was conflicting with argument usage in jQuery when not in noConflict() mode. As far as i can tell, multiple string arguments in $() were never used anyway.
* ![rev:66319] Removed dependency on ComplexTableField JS in LeftAndMain for "My Profile" popup
* ![rev:66318] Check if $member variable isn't empty before looking for first name in MemberLoginForm
* ![rev:66317] Fixed call to incorrect case of function name, Member::currentUser() should be used
* ![rev:66313] Fixed ForeignKey->scaffoldFormField() usage of model class instead of relation class to generate dropdown list
* ![rev:66309] Fixed far too small height and width of "Profile" popup in CMS, popupHeight and popupWidth should be defaultPopupHeight and defaultPopupWidth instead according to the ComplexTableField prototype
* ![rev:66306] Fixed HasManyComplexTableField, and subclass fields HasOneComplexTableField and ManyManyComplexTableField saving bug because javascript wasn't being included properly
* ![rev:66305] Fixed recursion bug with FieldSet::fieldPosition
* ![rev:66274] Improved reliability of LeftAndMain->CMSVersion() - not failing on empty $URL$ placeholder with subversion path to determine version numbers
* ![rev:66269] Merged from trunk; fix DataObject::hasDatabaseFields()
* ![rev:66266] Fix test/cookie conflict in ErrorPage rendering
* ![rev:66252] Immediately apply behaviours that are added after the Behaviour.apply() call, in Behaviour.register() calls as well as Class.applyTo() calls
* ![rev:66251] Removed unnecessary and bug-causing Behaviour.apply() call.
* ![rev:66250] Made Behaviour.apply calls more specific
* ![rev:66229] Added flash button to tinymce_ssbuttons
* ![rev:66196] #2714 - Cookie::set doesn't operate correctly with expiryDays 0 (wakeless)
* ![rev:66195] #2694 - Mathspam question clear
* ![rev:66194] Fixed draggable bug in AssetTableField - thanks for ajshort for the patch - ticket #3051
* ![rev:66162] #118 - Fixed count of marked pages (hamish)
* ![rev:66137] Fixed editable formfields not showing up in translation mode (#3083). Updated Translatable->updateCMSFields() by partially merging wakeless' patch from (r64523)
* ![rev:66136] Disabled js code in CMSMain->switchlanguage() which was assuming wrong DOM structure (TODO: Replace with more robust selectors)
* ![rev:66135] Fixed field labels for original readonly fields in translation mode
* ![rev:66107] Fixed PHP variable initialization in SiteTree->getClassDropdown() which broke class dropdown in behaviour tab (regression from r66092)
* ![rev:66091] $cache flag wasn't passend through from ViewableData_Customised->XML_val() to ViewableData->XML_val()
* ![rev:66079] #3051 ajshort: Improved layout of assettablefield drag icon
* ![rev:66070] Fixed HTTP->findByTagAndAttribute missing variable error causing HtmlEditorField to break since it used HTTP::getLinksIn()
* ![rev:66067] #3065: Fixed restore page
* ![rev:66066] #3012 jam13: Fixed tabstrip default tab selection when working with querystrings
* ![rev:66065] Fixed security tabs for JSoD code
* ![rev:66062] #3063: Allow old-school method of adding menu items to LeftAndMiain:
* ![rev:66052] #3087 simon_w: Added ResfulService::connect() back, for backward compatability
* ![rev:66049] Fixed unescaped html display in DevelopmentAdmin (#3080)
* ![rev:66044] Fixed `<% require %>` call in ModelAdmin_left.ss
* ![rev:66043] Fix PHP notice where variable with array didn't exist in HTTP->findByTagAndAttribute()
* ![rev:66029] use a undefined variable $member.
* ![rev:66027] Fixed incorrect call to Permission::checkMember() - missing second argument, first argument should've been a Member object or Member ID
* ![rev:66026] Fixed PHP notice level error in some circumstances in DataObject->buildDataObjectSet()
* ![rev:65944] #3073: Fixed LeftAndMain::deleteitems()
* ![rev:65923] #3066: Fix ?isDev=1 option
* ![rev:65900] #2868: Fix after-popup-close behaviour on security member table
* ![rev:65899] #2820: Fixed use of buggy reflection in Object::uninherited()
* ![rev:65896] #2706: Fixed JS error in multi-nested pages deletion
* ![rev:65895] #2232: Prevent requirements from breaking ErrorPage publication
* ![rev:65894] #1721: Fixed del/ins styling in page comparison
* ![rev:65881] Don't let permission errors on assets/ folder completely prevent javascript from loading
* ![rev:65865] Fixed tabstrip JS error in ReportAdmin
* ![rev:65863] Ensure that menu items of the same priority show the first added item closes to the left
* ![rev:65860] Fixed JS error in ReportAdmin
* ![rev:65851] #3062: Fixed ondemand support for jQuery responses as well as prototype
* ![rev:65850] Alow decoration of Member with has_many relationships
* ![rev:65843] #3062: Fixed ondemand support for jQuery responses as well as prototype
* ![rev:65842] #3061: Text.FirstSentence returns '.' instead of empty string on an empty field
* ![rev:65827] Fixed flash uploader not searching for the correct files, due to changes in r65820
* ![rev:65825] Tidied up messages in flash uploader right hand panel in CMS
* ![rev:65769] Fixed deletion of RedirectorPage
* ![rev:65763] Missing variable in some circumstances caused Requirements::include_in_response() to break
* ![rev:65761] Missing variable in some circumstances caused Requirements::include_in_response() to break
* ![rev:65711] Added support for CSS media types to CSS on demand
* ![rev:65680] there is no horizontal scroll bar for Model Admin right panel if the results table is long.
* ![rev:65671] temp fix for flash inserter.
* ![rev:65616] Fixed searching on sapphire/trunk due to Form changes - FormAction was useless on SearchForm anyway
* ![rev:65612] Removed offending $this->canEdit() which returned a boolean, not appropriate to be passed into Member::mapInCMSGroups()
* ![rev:65583] Adjusted Translatable to api changes from r65581
* ![rev:65554] a lot of methods in this class now passed $params as HTTPRequest object, rather than as a array if the function is called from Ajax or top-level of front-end, some method is called in both manner, ie. called from Ajax and called internally as well, so we need to check $params type and do further process. This is a partial fix of open source ticket #3035
* ![rev:65539] Setting correct user locale in ImageField and FileIframeField - the controller is separate from the CMS context, so wasn't initialized with i18n (see #1727)
* ![rev:65538] Using 'SiteTree' classname instead of 'Page' in UpgradeSiteTreePermissionSchemaTask to avoid clashes in schema when Page.php has its own tables
* ![rev:65536] Making Metadata fields writeable in translation mode (see #2993)
* ![rev:65518] Removed project-specific hack in DataObject->getManyManyComponentsQuery() as it was breaking Translatable saving
* ![rev:65517] Fixed breadcrumb exploding in DebugView when base-URL is "/" - was confusing the str_replace() logic
* ![rev:65515] Fixed Translatable::default_lang() call in CMSMain
* ![rev:65512] Fixed SiteTreeMaintenanceTask from extending unkown class Task to extending Controller
* ![rev:65510] #3015: Fixed close buttons on tinymce side panels
* ![rev:65502] Fixed bug with // placement in CMSMenu Director rule generation
* ![rev:65469] Better initial-site-setup boundary condition checking needed after the manifest builder update
* ![rev:65462] Setting Director::set_site_mode('site') in RootURLController in newly added init() method, which fixes Translatable::choose_site_lang(). The original bug was a wrong selected language in the `<meta>` tags through SiteTree->MetaTags()
* ![rev:65456] Using uncached DataObject::get_one() calls in ModelAsController to avoid stale data with subsequent Director::test() calls which alter the page relations inbetween
* ![rev:65424] #2987 - IE8 support via IE7 compatability mode
* ![rev:65394] Fixed broken dev/build compilation of manifest
* ![rev:65361] Added SSViwer support for i18n namespaces in templates with `<% _t('MyNamespace.MyEntity', ... %>`, to work around magically added namespaces from the parsed template file. Those auto-namespaces were logically not working in includes, as the parsing context is always the including template. Legacy support for auto-namespaces is still present due to its high usage.
* ![rev:65336] Making ModelAdmin labels in left panel translatable again (regression from moving them into one common panel)
* ![rev:65335] Respecting $dontEscape in FormAction
* ![rev:65293] Using empty title in TreeDropdownField->Field() if the related DataObject cannot be found
* ![rev:65291] Reverted text replacement performance improvement in SQLQuery - it was replacing more ocurrences via str_replace() than the previous implementation based on arrays, which broke queries augmented by Translatable (originally committed in r60468 and r54044)
* ![rev:65282] Fixed page comment javascript to suit new Form name
* ![rev:65275] #2243: Fixed ViewableData::Odd
* ![rev:65271] #2630 - Removed notice-level error
* ![rev:65269] #2954 - Fixed support for negative numbers in decimal fields
* ![rev:65250] #2992: Fixed T_PAAMAYIM_NEKUDOTAYIM error in RequestHandler
* ![rev:65242] fixed canPublish() so it actually got the member if none was passed and fixed notice with $results not existing
* ![rev:65232] #2056: Removed all references to deprecated Member::isAdmin()
* ![rev:65229] Allow DBField::__construct() without a name
* ![rev:65214] Remove LeftAndMain entry from CMSMenu (#3014). Thanks to hamish for the patch!
* ![rev:65213] Only enforcing record-level permissions in LeftAndMain if passed ID is numeric to avoid breaking AssetAdmin with string-based IDs (regression from r65152). See #3017
* ![rev:65212] Calling parent constructor in ComplexTableField_ItemRequest, was confusing RequestHandler
* ![rev:65180] Add magic methods on ModelAdmin to $allowed_actions (regression from r64988)
* ![rev:65174] MemberTableField use of sourceFilter should be treated as a string, not an array as per the API of TableListField
* ![rev:65152] Enforce permission checks in LeftAndMain and CMSMain through SiteTree->canView()/canEdit()/canAddChildren()/canPublish()/canDelete() (see #2701)
* ![rev:65151] Fixed SiteTreeAccess.js DOM IDs to field changes made in r65150
* ![rev:65150] Disallow SiteTree->canEdit() if SiteTree->canView() is not granted
* ![rev:65148] Fixed js error in LeftAndMain_right.js when displaying readonly pages
* ![rev:65141] TableField delete row inconsistency with TableListField which caused table fields to not fade the row out
* ![rev:65135] Fixed call to Member function that didn't exist
* ![rev:65127] Fix potential PHP notice opening a ComplexTableField popup
* ![rev:65123] Fixed bug with ID-less generation of YamlFixture entries that trigger $this->write() in setters
* ![rev:65106] Setting menu titles for CMSMenu items in LeftAndMain::init() to get translated values for the current user locale (see #2873)
* ![rev:65104] Fixed menu titles entity references in CMSMain and AssetAdmin
* ![rev:65094] Fixed SearchContextTest to comply to new scaffolded searchfield in Text DBFIeld
* ![rev:65071] Reverted auto-detection of i18n statics like $db in DataObject through provideI18nEntities() - was getting too complicated with decorated properties. Overload DataObject->fieldLabels() or DataObjectDecorator->updateFieldLabels() instead
* ![rev:65063] Checking for array existence before iterating through DataObjectDecorator->provideI18nEntities()
* ![rev:65062] Dont instanciate abstract classes in i18nTextCollector
* ![rev:65061] Using SiteTree::get_by_url() (see r65060)
* ![rev:65057] Collecting i18n entities for decorators separately from the decorated classes, as decorated properties like $db have to be stored in the module of the decorated, not in the module of the decorated class.
* ![rev:65030] Different class_implements() usage without instanciating the class in i18nTextCollector - not all classes are instanciatable without arguments. This raises the minimum requirement for text collection to PHP 5.1+
* ![rev:65028] Fixed SecurityAdminTest to work with i18n enabled
* ![rev:65026] Fixed CsvBulkLoaderTest to comply to hasHeaderRow API change (r64806)
* ![rev:65024] Fixed CMSMainTest to check for translated entities to avoid failing tests with i18n enabled
* ![rev:65023] Changed i18nTextCollectorTest to only trigger _t() calls in instance methods (they don't fully work in __construct()). Manually adding ClassInfo state for the fakewebroot needed to test textcollection - ManifestBuilder/ClassInfo currently don't support setting of other webroots, or flexible inclusion/exclusion of certain subfolders which would be necessary to do this without hacks.
* ![rev:64981] Don't allow calling of magically added methods via URL unless explicitly listed in allowed_actions
* ![rev:64976] Fixed wrong case of class names for ImageIFrameField causing errors
* ![rev:64879] Fixed title-handling in FormAction, regression from r64410
* ![rev:64878] Fixed missing $H() reference in i18n.js (#2989)
* ![rev:64850] Avoid ajax evaluator errors by checking if $resizedImage actually exists before calling relativePath() on it
* ![rev:64812] Content wasn't saving on subsequent page loads, after TinyMCE3 upgrade
* ![rev:64798] Fix DataObject::write() with a specified ID and forceInsert to be true
* ![rev:64788] in IE, overflow left pane is hidden and cannot enable scrollbar
* ![rev:64771] Made ContentController work properly if it doesn't have a dataRecord
* ![rev:64770] merged patch from ajshort to fix checkbox fields in the cms
* ![rev:64754] Fixed old references to GenericDataAdmin in ModelAdmin.php and ModelAdmin_Results.ss
* ![rev:64739] Security->passwordsent() didn't get the "Email" variable from the URL properly, because of updates to HTTPRequest
* ![rev:64736] Fixed non-object or not null error in TreeSelectorField
* ![rev:64732] New folders weren't getting their name set correctly, instead they would just be called "NewFolder". This occurred in the Site Content section of the CMS, creating a folder using the right hand panel in that section.
* ![rev:64604] Fixed incorrectly reverted methods related to sizing of the popup.
* ![rev:64601] Fixed extra class addition on various FormField->Field() methods
* ![rev:64562] Using include_once() instead of include() for _ss_environment.php in install.php and Core.php to avoid PHP notice errors about double constant defines (see r64561)
* ![rev:64506] Renamed "Save & Publish" to "Save and Publish" since this value is used in the value attribute of input elements, properly parsed, this would produce & instead of &
* ![rev:64494] Fixed distribution of textcollector files to modules (was collecting all entities into all modules before) - added unit tests
* ![rev:64491] Fixed wrongly formatted _t() call in Security class
* ![rev:64490] Fixed $module parameter for i18nTextCollectorTask
* ![rev:64471] Fix issue with language files not being included
* ![rev:64467] Removed duplicate setValue() method on Time (was supposed to be deleted instead of renamed from setVal() to setValue())
* ![rev:64466] posix_isatty sometimes returns a benign error
* ![rev:64462] Don't run migration code for permissions if the old field doesn't exist.
* ![rev:64443] Fixed RestfulServerTest fixture path
* ![rev:64440] Unit tests for RestfulServer (see r64439)
* ![rev:64439] Returning 409 Conflict HTTP Header when trying to create a resource on an existing URL through RestfulServer
* ![rev:64438] Removed $headingLevel reference from LabelField (was supposed to go into HeaderField)
* ![rev:64437] Second constructor argument $title for HeaderField should be optional for legacy reasons
* ![rev:64427] Using PasswordField instead of deprecated EncryptField
* ![rev:64423] Adjusted HeaderField and LabelField implementation to new constructor arguments (see r64421)
* ![rev:64422] Adjusted HeaderField and LabelField implementation to new constructor arguments (see r64421)
* ![rev:64361] #2963 - Fix RSSFeed to work with new add_cache_headers
* ![rev:64334] Reverted Member->isAdmin() removal since it's being used in a lot of places, we shouldn't deprecated it... yet.
* ![rev:64329] correct wrong syntax of TableField class in its frontend javascript
* ![rev:64328] avoid a CSSClass is added to a veiwable data twice.
* ![rev:64325] $this->extraData is not alway set for an TableField_Item
* ![rev:64320] If DropdownField->Field() lack of source checking before looping through it
* ![rev:64318] Fixed DropdownField handling of Iterator objects rather than arrays in the newly created getSource()
* ![rev:64314] If ajaxActionsOnTop is called twice, the actions are removed.
* ![rev:64313] Don't use singleton() to create DataFormatter instances, as it will cause weird side-effects with multiple formatter instances with different parameters (broke subsequent test runs of RestfulServerTest and SoapModelAccessTest) - all aboard the failboat!
* ![rev:64310] Unsetting $_SERVER globals in RestfulServerTest to avoid side-effects across unit tests
* ![rev:64309] Added RestfulServerTest->testApiAccessBoolean()
* ![rev:64307] Fixed RestfulServerTest->testAuthenticatedGET()
* ![rev:64275] fixed default_country_value so that it will actually call the default country if IP lookup doesnt work
* ![rev:64263] Fix disappearing fields when a field without a name was being pushed onto a FieldSet (eg a CompositeField)
* ![rev:64251] Fixed ComplexTableField->saveComplexTableField() success message object link - was assuming same context as ComplexTableField_ItemRequest
* ![rev:64239] Adjusted ForeignKey->scaffoldFormField() to new scaffolding notation ("ajaxSafe" instead of "ajax")
* ![rev:64237] Fixed FormScaffolder string literal parsing FALE in getFieldSet()
* ![rev:64229] Storing HTTP "Referer" header from $_SERVER in Director::direct() and passing it along in Director::test()
* ![rev:64228] Checking for an empty array for $postVars in Director::test() to determine HTTP method - an existing array should cause POST rather than GET, even if its empty
* ![rev:64227] Fixed stupid ommission from r64223 which caused HTTPRequest to construct without a proper URL
* ![rev:64224] Using fieldLabel() for $has_one relationships in FormScaffolder
* ![rev:64173] Fixed wrong call to scaffoldCMSFields() in Member->getCMSFields(), removed addScaffoldRelationFields() call as this is done by the newly called parent::getCMSFields() already
* ![rev:64153] #2906 - Fixed manifest conflict in web-tests
* ![rev:64142] fixed ss.i18n.sprintf() call in Validator.js
* ![rev:64124] #2936: Define STDOUT if it's not already defined...
* ![rev:64109] Fixed order of arguments.
* ![rev:64099] Bad XHTML in en_US language file (#2624) - thanks tiwoc!
* ![rev:64098] Director::fileExists() fails on windows with absolute paths (#2935) - thanks to ajshort!
* ![rev:64097] Fixed CSSContentParser to only use tidy on CLI mode if its available, and first check for existence of PHP tidy extension. Fixes failing unit tests on standard WAMP windows installations.
* ![rev:64096] Fixed CSVParser assumptions about absolute unix-style filepaths - using Director::absFile() instead now
* ![rev:64081] Consistent usage of ss.i18n.sprintf() instead of ss.i18n.printf() - the method is returning a string rather than outputting directly, so should be sprintf()
* ![rev:64077] Fixing AssetAdmin translations which were previously moved to Folder.php - i18n::include_by_class() doesn't like filenames/namespaces which are in a different folder than the language file they're referenced in (see #2359) - started in r64076
* ![rev:64076] Fixing AssetAdmin translations which were previously moved to Folder.php - i18n::include_by_class() doesn't like filenames/namespaces which are in a different folder than the language file they're referenced in (see #2359)
* ![rev:64074] Fixed AssetTableField javascript errors caused by r64049
* ![rev:64072] Fixed DebugView Breadcrumbs to not include query string as separate link, and don't append an arrow after the last element
* ![rev:64049] fix the bug that add some rules for summary columns even when they are not there.
* ![rev:64042] Using _t() to check content strings in unit tests and avoid tests failing when i18n is enabled
* ![rev:64038] Removed $_ALL_CLASSES in ReportAdmin::has_reports() - this doesn't need to be here anymore, due to changes in ManifestBuilder
* ![rev:64013] Limited error message scope on invalid classname for TestRunner
* ![rev:64011] Ignore TestOnly classes when collecting permissions
* ![rev:64010] Removed dependency of ss.i18n.js on other libraries by replacing $$ with document.getElementsByTagName() and implementing a custom event attacher - see #2927
* ![rev:64007] Making less assumptions about object structure in FieldSet->addFieldToTab() error messages
* ![rev:64005] YamlFixture->saveIntoDatabase(): In order to support reflexive relations which need a valid object ID, the record is written twice: first after populating all non-relational fields, then again after populating all relations (has_one, has_many, many_many). Fixes a bug where FileTest was testing onBeforeWrite() behaviour
* ![rev:64004] Writing record from yml before parsing relations in YamlFixture->saveIntoDatabase() to avoid missing lookups for reflexive relations on the same object
* ![rev:64002] Moved RecordController and CollectionController to external module (see r63905)
* ![rev:64001] Adjusted FormTest->testLoadDataFromObject() to new assumptions about changed behaviour on loadDataFrom() from $loadBlanks to $clearMissingFields - which means that form fields are cleared regardless if they have blank values in the passed object or not
* ![rev:64000] Making sure that DataObject->has*Field() methods always return an array, in order not to fail any array_key_exists() checks
* ![rev:63999] Fixing DataObject->hasField() to detect dynamic getters by using hasMethod("get$fieldName")
* ![rev:63998] Fixed Form->loadDataFrom() to properly populate FormField->setValue() when an object is passed as the first parameter (needed e.g. for CheckboxSetField->setValue()) - see mailinglist discussion at http://groups.google.com/group/silverstripe-dev/browse_thread/thread/717bada8ccafdd70
* ![rev:63983] Fixes so ?flush=1 doesn't stop showing the Reports tab in CMS
* ![rev:63981] Allow use of ClassInfo methods in _config.php when manifest is being rebuilt
* ![rev:63945] Added missing slash in TableListField_Item->Link()
* ![rev:63939] Improved RedirectorPage's handling of invalid configuration options to prevent infinite loops and segfaults
* ![rev:63927] Improved detection of CLI colour support
* ![rev:63920] Fix broken breadcrumbs
## Bugfixes
* ![rev:63915] #2588 Fix issue with IIS not stripping GET variables from the URL (mackeyn)
* ![rev:63909] Prevent misconfigured redirector pages from breaking static publishing
* ![rev:63890] Validation result was ignoring the $valid flag passed as the first argument.
* ![rev:63858] Fixed js i18n entity names for TableField (see #2916)
* ![rev:63857] Properly merging different dictionaries for javascript i18n implementation (see #2916)
* ![rev:63839] Added missing default english text to i18n call in TableField and TableListField javascript
* ![rev:63828] MemberTableField_Popup had an odd way of overloading saveComplexTableField() - this should be on MemberTableField instead, since that's the direct subclass of ComplexTableField for where saveComplexTableField() is defined. This broke the "Add Member" button in CMS Security, probably due to the way the form URLs have been changed. See ticket #2907 for the reported problem.
* ![rev:63825] Don't let Director::test() clobber current stage
* ![rev:63824] Fix FieldSet::replaceField() so that it doesn't clobber tabs
* ![rev:63823] SiteTree::onAfterPublish() will still pass an object to the handlers on the first publish
* ![rev:63819] Fixed pagination in TableListField after hsmith's changes
* ![rev:63813] Fixed array_key_exists check in DataObject->setField that was failing when DataObject->record was not yet initialised by DataObject->setField.
* ![rev:63809] PHP Notice in InlineFormAction_Readonly
* ![rev:63804] Side reports weren't working on initial opening of the side tab
* ![rev:63799] Fixed blatant error where $SNG_member wasn't defined
* ![rev:63797] Member->getCMSFields() should use scaffoldCMSFields() instead of scaffoldFormFields() - currently it is operating in the wrong context.
* ![rev:63793] MemberTableField->AddLink() was calling &methodName=add - this should be just "add", as per changes to the forum URLs in sapphire
* ![rev:63786] Removed query that was causing issues displaying members in the security groups. Open ticket #2591
* ![rev:63785] URLs to security groups in CMS were not linked correctly. Removed Director::link() references and replaced with strings. Director::link() is deprecated and shouldn't be used.
* ![rev:63769] Fixed paths to CSV fixtures for case-sensitive file systems.
* ![rev:63768] Fixed $fixture_file for Ext2fs and other case-sensitive file systems.
* ![rev:63748] Use of getOwnerID() in ReportAdmin which doesn't make sense, since ID() is sufficient.
* ![rev:63739] Fixed bug in getCMSFields scaffolding of relations
* ![rev:63716] Fixed createTag for proper generation of DropdownField blank items
* ![rev:63698] Only include i18n.js if javascript files are included - and to be safe, include the required prototype.js along with the library
* ![rev:63691] Removed old reference to ?executeForm=EditForm
* ![rev:63681] Requiring a parentController for RecordController
* ![rev:63649] Fixed unclear SQL escaping responsibilities in SearchFilter subclasses - it now expects unescaped data, and escapes automatically when adding to the query)
* ![rev:63647] Making "add %s" translatable for ComplexTableField
* ![rev:63640] Automatically including sapphire/javascript/i18n.js in Requirements::process_i18n_javascript() to avoid errors when Requirements are manually overwritten
* ![rev:63635] #2901 - RootURLController didn't properly manipulate the Controller stack
* ![rev:63634] Reverted earlier change to ModelAdmin.js statusMessage() display
* ![rev:63629] Translated Member formfields through fieldLabels()
* ![rev:63627] php notice in CountryDropdownField
* ![rev:63622] Disabled user_error in ComplexTableField->sourceID() when no formfield 'ID' is found in ComplexTableField->$detailFormFields - not strictly required as we can deduce it from the URL. It was causing conflicts with DataObject->scaffoldFormFields() not returning an 'ID' field
* ![rev:63621] Making sure that Dataobject->getManyManyJoin() inserts a valid database table for the relation - not all component classes returned by ComponentSet->ownerClass are valid tables (see r54797 and r60909 for previous commits on this issue)
* ![rev:63618] Escaping added database columns in queries for TableListField
* ![rev:63611] typo mentioned in #2775
* ![rev:63602] Fixed bounce-address generation so that it doesn't have a human component to the email address
* ![rev:63593] #1816: Added a little padding to page version table
* ![rev:63581] Fixed ComplexTableField export
* ![rev:63571] typo in js file
* ![rev:63570] typo in js file
* ![rev:63549] Updated TreeSelectorField to work properly within CTF popups
* ![rev:63527] Removed notice-level errors in ListboxField
* ![rev:63525] #2883 - Remove use of short tag
* ![rev:63509] Fixed DataObject::dbObject() operation with CompositeDbFields
* ![rev:63467] Fixed Upload->isValidExtension() - was checking array keys instead of array values ....
* ![rev:63464] Fixed hardcoded HTTP protocol information in BasicAuth
* ![rev:63457] AssetAdmin->Link() returned a trailing slash that was not necessary. See ticket #2884
* ![rev:63452] Fixed ReportAdmin breakages - changes to HTTPRequest required that show($params) be changes to show($request) and then check $request->allParams() for the URL parameters - this caused major breakages as this code was not updated to reflect the new URL handling changes.
* ![rev:63432] #2753: Couldn't have fields named the same as methods
* ![rev:63304] #2529: Fixed HTTP/1.0 support
* ![rev:63297] Fixed loading indicator in for add form in ModelAdmin.js
* ![rev:63296] wrong jsparty PATH references
* ![rev:63295] wrong jsparty PATH references
* ![rev:63294] Fixed ModelAdmin Requirements path references
* ![rev:63291] Don't try to use HTTP_HOST environment variable if its not set in Director::protocolAndHost(). Throw a warning, then return false - before if script execution was not set to stop on WARNING, you'll get a NOTICE as well.
* ![rev:63290] Moved *_PATH and PR_*constants from main.php/cli-script.php back to Core.php - was causing problems with installer (directly includes Core.php, but doesn't run through main.php) - see ticket #2867 for improvement suggestions in bootstrapping code to avoid these bugs
* ![rev:63204] Moved TEMP_FOLDER define back from main.php/cli-script.php to Core.php, as it was causing problems with the installer
* ![rev:63157] Reverted Director class using BASE_PATH instead of dirname(dirname(['SCRIPT_FILENAME'])), originally committed in r63154
* ![rev:63079] decrease width of elements in image/flash/link panel on right-hand side to avoid close-button being shoved off to the void (#1669)
* ![rev:62910] #2390: Not indexed pages are removed from sitemap.xml
* ![rev:62909] Fixed bug introduced into AssetTableField by previous CTF change
* ![rev:62892] #2721 - Show decent preview on FileIFrameField
* ![rev:62885] Fixed a number of really basic problems with a number of date fields - got basic loading and saving working across them all
* ![rev:62875] More robust setting of defaults; necessary due to altered ViewableData::__isset()
* ![rev:62868] #2697 - Removed junk slash from login message
* ![rev:62701] Changed URL format for password sent confirmation display, to avoid issues with new request handling trying to detect the email-TLD as a pseudo-file-extension (which resulted in truncated email-addresses in display). Old: /Security/passwordsent/myemailaddress. New: Security/passwordsent/?email=myemailaddress
* ![rev:62490] createTag() on FormField subclasses should use getTabIndex() instead of getTabIndexHTML() as createTag() is responsible for generating the HTML, and all we need is the tabindex value
* ![rev:62471] Allowing HTTPRequest::match() to match rules with extensions (e.g. /sitemap.xml used for GoogleSitemap)
* ![rev:62463] Pushing current controller into stack in RootURLController->handleRequest to Session-usage in Translatable if enabled. Session::get() is dependent on controllers, and is needed to determine the current language for any Translatable queries (like RootURLController::get_homepage_urlsegment())
* ![rev:62381] Type checking problem in LookupField->Field(), merged in from r62387
* ![rev:62325] Removed DataReport.js calls in LeftAndMain until we figure out a better way of doing
* ![rev:62324] Removed DataReport.js calls in LeftAndMain until we figure out a better way of doing
* ![rev:62320] Allow creation of a tab and a field of the same name; bug cause by the duplicate field merging code introduced recently.
* ![rev:61975] not all decorators has a summary_fields defined, so the code need to deal with this.
* ![rev:61699] Fixed bulk loader constructor
* ![rev:61686] Fixed styling, searching, and pagination of CommentTableField
* ![rev:61505] Fix direct access of (class)/(id)/edit on the ModelAdmiN
* ![rev:61395] SetHeight() was calling SetWidth using getFormattedImage()
* ![rev:61292] fixed ManyMany relation for same object
* ![rev:61202] Reverted change r61158 which stopped scrollbars working
* ![rev:61195] Asset area in CMS refused to load because of error in code from r60920 - #2751
* ![rev:61162] sourceFilter should be a string, not an array
* ![rev:61155] HtmlEditorField_Toolbar->LinkForm() for editing a link inside an HtmlEditorField instance was showing page titles using the "Title"
* ![rev:61151] ComplexTableField_popup.css "overflow: auto" should only be applied to the container HTML element instead of HTML and BODY which can
* ![rev:60920] #1458 - GEOIP now does not return any error if it cannot look up the ip address (as it uses a shell command this is not enabled on many WAMP systems)
* ![rev:60897] fixed Member name not being saved in database with ReadonlyField()
* ![rev:60757] Fixed TableListField->Link() to allow for instanciation without a form/controller (e.g. for unit tests)
* ![rev:60756] Fixed ScaffoldINGComplexTableField file name
* ![rev:60726] Fixed DataObject::fieldLabels() to detect labels on inherited database fields
* ![rev:60723] Fixed partial merge from nzct (originally from r47039, partially merged in r60440)
* ![rev:60712] Fixed ModelAdmin typo in $searchCriteria method parameter
* ![rev:60710] Fixed $this reference in static Member call
* ![rev:60643] Reinstated error_handling(E_ALL) for dev environments in main.php after clarifying with sam - we want to force developers to recard notice-level errors unless they expicitly opt-out in their _config.php
* ![rev:60636] Disabled mandatory override of default PHP error handler to E_ALL when in dev mode (which means you have no way of overriding error_reporting() in your _config.php, and by that no way of disabling e.g. E_NOTICE level errors)
* ![rev:60635] Fixed CMSMainTest to use /admin/crm as a standard URL rather than /admin (which could be overloaded by other admins for application-like interfaces without CMS components)
* ![rev:60573] Fixed bug with unpaginated TableListFields. Added tests for TableListField pagination
* ![rev:60415] Added Requirements::path_for_file() to support external URLs in required paths (incl. unit test)
* ![rev:60413] Fixed RequirementsTest combine_files() testing to accept new javascript inclusion format with added modified flags
* ![rev:60412] Fixed JSON.php include path in Convert.php
* ![rev:60410] Fixed test runner's handling of errors
* ![rev:60404] Further fixes to Director::test()
* ![rev:60397] Changes to DataObject::get_one() caching to try and fix segfaults
* ![rev:60393] Fixed superglobal masquerading in Director::test()
* ![rev:60388] Fixed Yaml fixtures for SapphireTest
* ![rev:60382] Re-added additional GroupTest tests (merge error from branches/roa)
* ![rev:60378] Removed duplicate GroupTest.php files
* ![rev:60224] Fixed merge error in ModelAsController
* ![rev:60219] Fixed reverted access checks in Controller->handleAction() due to merge error
* ![rev:60213] Javascript error in ComplexTableField_popup.js - missing a comma in an object literal which broke ajax updates in the CMS
* ![rev:60092] Using $extraClass in AutocompleteTextField
* ![rev:59340] Fixed TableListField->setClick_PopupLoad() to parse ID-value out of new `<td>` identifiers
* ![rev:59285] Changed span.middleColumn to .middleColumn in cms_right.css in preparation for building proper HTML/XHTML nesting in formfields
* ![rev:59284] Changed span.middleColumn to .middleColumn in cms_right.css in preparation for building proper HTML/XHTML nesting in formfields
* ![rev:59283] Fixed i18n namespacing issue in TableListField_Item.ss - was using _t('Form.DELETE'), but templates don't allow to re-use variables outside their own namespace
* ![rev:59282] Removed duplicate SecurityID fields on each row of a TableField (calls $myForm->Fields() which by default will include more than the actual form fields passed to the constructor)
* ![rev:59281] Fixed colspan on `<td class="actions">` in MemberTableField.ss
## Enhancement
* ![rev:71650] Applying the asynch request patch to our tag field. We use a simple queue management idea to keep only the latest ajax request is valid, ie, we abort all requests before the current request is submitted, so that there is only at most one request spanning in the client side, so no early request's response cover late request's response, also greatly enhance the performance of both sides, especially in case of complicated operations in server side and complicated post-events in client side.
* ![rev:71597] delete button keep spinning when cancel a deletion operation from the confirm window.
* ![rev:70956] Ticket 2756: Newsletter performance problem, run out of memory.
* ![rev:70861] Allow selection of the unique identifier field on Member by setting Member::set_unique_identifier_field(AnotherField). Default is "Email".
* ![rev:70846] When MemberLoginForm controller page has loaded, focus on the Email input field so the user doesn't have to focus the field themselves. Ticket #3418
* ![rev:70809] Removed blacklist newsletter specific code out of core and into newsletter module
* ![rev:70783] Export to CSV data of MemberTableField gets all fields on the member from the db array, instead of just FirstName, Surname and Email
* ![rev:70775] Removed BrowserDetect javascript library which was randomly placed in Security_login.js and just included in AssetAdmin. Reverted to regex-matching for simple browser detection for now
* ![rev:70465] Allow Member::getCMSFields() to be extended via DataObjectDecorator->updateCMSFields()
* ![rev:70190] Added nicer (and more useful) error message if ErrorPage cannot open the error HTML file for writing
* ![rev:70131] Creation of a new page type now uses a consistent source of classes that respect $hide_ancestor on SiteTree.
* ![rev:70064] Default to "Page" for new page type dropdown
* ![rev:70060] Added a table for showing linked pages in the Report -> BackLinks tab
* ![rev:69954] Calling augmentSQL() on decorators in DataObject::get(), which is necessary (among others) to limit ContentController->getMenu() with Translatable enabled to the currently active language. Was previously just implemented in DataObject::get_one()
* ![rev:69953] Passing through same arguments in SiteTree::get_by_url() than in the wrapped DataObject::get_one()
* ![rev:69952] Removing specialized routing for Translatable from Director->currentPage() and ModelAsController->getNestedController. Calls SiteTree::get_by_url() now, which abstracts out the Translatable handling.
* ![rev:69924] #3313 gigtech: Added ComplexTableField::setAddTitle()
* ![rev:69909] Allowing for passing of $context in Hierarchy->markChildren()
* ![rev:69896] Allowing more arguments in Object->extend() (merged from branches/translatable in r64523, thanks wakeless!)
* ![rev:69895] Added SQLQuery->filtersOnFK() (merged from branches/translatable in r64523, thanks wakeless!)
* ![rev:69891] Moved i18n::get_existing_content_languages() to correct namespace in Translatable::get_existing_content_languages().
* ![rev:69888] Added DataObjectSet->replace()
* ![rev:69864] Allow selection of parent page with adding page through URL - Ticket #3177. Thanks simon_w!
* ![rev:69833] Separated the class name for captioned images to normal images, so styling can be separately applied
* ![rev:69824] Caption support for the HtmlEditorField in the SS CMS. Ticket #2937
* ![rev:69823] Caption support for the TinyMCE editor in the SS CMS. Ticket #2937
* ![rev:69821] #3180: Added RsyncMultiHostPubilsher to 2.3 from trunk
* ![rev:69734] Allow specifying application URL for the top right logo instead of hardcoded silverstripe.com. Thanks hamish!
* ![rev:69661] Removed /cms URL alias for CMS interface to allow for pages named "cms" (see #3267)
* ![rev:69660] Removed /silverstripe URL alias for CMS interface to allow for pages named "silverstripe" (see #3267)
* ![rev:69449] Added .message styles to cms/css/layout.css
* ![rev:69370] Add a `<span class="highlight">` around all keywords (space delimited) and not just the entire search phrase
* ![rev:69360] Update ForeignKey and Primary key default fields to use SQLMap for their dropdown source for better performance.
* ![rev:69323] Added styling for "form .message.notice" in sapphire/css/Form.css
* ![rev:69322] More readable (and linked) output of "you are comparing..." message when viewing version of a page
* ![rev:69244] Added renameField() to FieldSet
* ![rev:69224] Allow choosing ellipsis for truncated text on Text->LimitWordCountXML()
* ![rev:69218] Added ability to define the ellipsis for LimitWordCount() setting "..." as the default
* ![rev:69207] Changed order of array merging in DataObject->db() - contains fields from subclasses at end of the array instead of the beginning. Important because db() is used by FormScaffolder, which shoved custom fields on the front of auto-generated forms. Shouldn't have any effect on the actual content of returned array
* ![rev:69204] Hiding Member->BlacklistedEmail field in getCMSFields() by default - only relevant in newsletter/bounce context at the moment
* ![rev:68860] Added RestfulServerTest->testGETRelationshipsXML()
* ![rev:68818] Appending classnames to translated pagetype titles in CMSMain->getPageTypes() when the cms is loaded in a non-english version - see inline comment
* ![rev:68817] Appending classnames to translated pagetype titles in SiteTree->getClassDropdown() when the cms is loaded in a non-english version - see inline comment
* ![rev:68771] Improved display of class permissions in /admin/security by using the menu title in addition to the classname (users won't necessarily know which classname an admin area corresponds to). Also using "Access to all CMS interfaces" as a permission description for CMS_ACCESS_LeftAndMain
* ![rev:68761] Making Date->Ago() translatable
* ![rev:68747] Using i18nEntityProvider on SiteTree to ensure entities in "Page" namespace get stored on sapphire instead of the "module folder" for Page.php - we can't make those properties translatable within core if they are in a custom folder
* ![rev:68745] Allowing textcollection of multiple modules selectively
* ![rev:68701] Allow HtmlEditorField on front-end forms
* ![rev:68508] Checking for $_FILE_TO_URL_MAPPING in DevelopmentAdmin if called in CLI mode to avoid nasty bugs e.g. during FunctionalTest sessions (Example: Controller stack was failing for some weird reason in LeftAndMainTest)
* ![rev:68460] Added CMSMenu::get_viewable_menu_items() and using it in LeftAndMain->MainMenu()
* ![rev:68193] Added Email->setTemplate() and Email->getTemplate() (as the Email_Template class is deprecated)
* ![rev:68160] Added support for specifying target module in i18nEntitityProvider->provideEntities()
* ![rev:68156] Added support for specifying target module in i18nEntitityProvider->provideEntities()
* ![rev:67984] Documented and improved DataObjectSet->PaginationSummary(). Removed DataObjectSet->paginationSummaryDots
* ![rev:67675] Fixed Email::obfuscate() to include custom CSS for reversing the email address using the "direction" method
* ![rev:67638] Added "reverse" method to Email::obfuscate() to reverse the email address in PHP, then CSS can be used to reverse it back to normal to avoid email harvesting
* ![rev:67502] Added SSViewer::get_source_file_comments()
* ![rev:67422] Allow setting of the legend value in the Form template by use of Form->setLegend('my legend')
* ![rev:67398] Added ability to include a blockquote in the CMS WYSIWYG editor
* ![rev:67345] Allowing custom methods in DataObjectSet->column()
* ![rev:67321] Only showing import form in ModelAdmin if an importer is set
* ![rev:67294] Added SITETREE_GRANT_ACCESS permission code to SiteTree to control editability of the "Access" tab (incl. unit tests)
* ![rev:67292] Supporting object parameter in FieldSet->makeFieldReadonly()
* ![rev:67291] Added mock controller instances to each FunctionalTest, which passes the existing mock session object into the controller stack. This means Sesssion::get()/set() in application code will use the test session. Helpful mainly for overriding login information used by Member::currentUser().
* ![rev:67242] Make it easier to create pageless subclasses of Page_Controller
* ![rev:67224] Adding "close popup" link after saving /admin/myprofile (see #3195)
* ![rev:67139] Added TreeDropdownField->refresh() js method
* ![rev:67138] Allowing usage of extraClass() in TreeDropdownField
* ![rev:67083] Using TEMP_FOLDER for StaticExporter
* ![rev:67072] Disallowing CMSMain->revert() if SiteTree->canPublish() is not granted (used to be SiteTree->canEdit()). If a user isn't allowed to publish, he shouldn't be allowed to revert the live state of a page either.
* ![rev:67061] Moving "save" and "delete" cms actions from CMSMain->EditForm() into SiteTree->getCMSActions() to make them decoratable (e.g. disallow delete action) and easier to cover with unit tests. Leaving fallback "save" and "delete" actions in CMSMain in case no actions are defined (necessary e.g. for Group class in SecurityAdmin)
* ![rev:66958] Added SearchForm->setPageLength() and SearchForm->getPageLength()
* ![rev:66946] Add `<%-- --%>` comments
* ![rev:66830] Disabled sending of warnings through Debug::send_errors_to() by default. If you need extended error reporting including warnings (e.g. for a site which is still in active development), use Debug::send_errors_to('example@example.com', true) or Debug::send_warnings_to('example@example.com')
* ![rev:66803] Just redirect back after "import" action called, and set the session message on the Form object instead of hardcoded ID
* ![rev:66654] Renamed tab "Meta-data" to "Metadata" for better readability (see #3142)
* ![rev:66646] Fixed default level in HeaderField - was duplicating defaults already present in two other places (see r66639)
* ![rev:66625] Allow CheckboxSetField to use extra classes as other FormField classes do. Also dded test for this behaviour in CheckboxSetFieldTest.
* ![rev:66622] Sort test class list by alphabetical order so it's easier to read
* ![rev:66596] Defaulting to show all columns in ModelAdmin CSV export, ignoring user selection of result table columns (users can always limit CSV columns by manually deleting them e.g. in Excel)
* ![rev:66583] Added experimental support using (relname)Query methods to pass complex relations (those defined by methods) into searchfilter
* ![rev:66343] Added comments in rendered templates to indicate the source .ss files, on dev sites only:
* ![rev:66333] Added ConfirmedPasswordField->setShowOnClickTitle()
* ![rev:66323] If there are no files in a folder in AssetAdmin, show a message
* ![rev:66322] Added SearchFormTest
* ![rev:66320] Added more known file extensions (tiff, js, html, css, ico) to File->getFileType()
* ![rev:66312] Added support for $relationCallbacks on the importer class (in addition to methods on the model class)
* ![rev:66173] Moving GoogleSitemap functionality (priority dropdown and database fields) from SiteTree to GoogleSitemapDecorator
* ![rev:66168] Removed GoogleSitemap references in SiteTree (moving to decorator implementation)
* ![rev:66137] Added TranslatableTest with minimal assertions about existing form fields in translation mode
* ![rev:66045] Added support for custom importer methods in CsvBulkLoader
* ![rev:65827] Added error messages to flash uploader panel, to be consistent with the image uploader one
* ![rev:65582] Using actual classname in DataObjectSet->debug()
* ![rev:65581] Added unit tests for FieldSet->insertBefore()/insertAfter()
* ![rev:65513] Using currently used content languages for options in the TinyMCE spellchecker (see http://open.silverstripe.com/ticket/2498#comment:2)
* ![rev:65508] Added language tables for tinymce_ssbuttons Plugin, incl. German translation
* ![rev:65495] Calling UpgradeSiteTreePermissionSchemaTask from SiteTree->requireDefaultRecords as a temporary workaround for missing migration infrastructure. This means that upgrading the schema for 2.3 can be done without manual task triggers, just the usual dev/build (see http://open.silverstripe.com/ticket/2847#comment:4)
* ![rev:65494] Added DatabaseTest
* ![rev:65464] Better CLI output for browsing dev/tests
* ![rev:65463] Allowing strings instead of arrays in ModelAdmin::$managed_models to make it less error-prone for beginners
* ![rev:65457] Allowing to pass strings instead of arrays into FunctionalTest->assert*() methods, and convert them internally to arrays
* ![rev:65455] Adjusted AssetAdmin to Folder->can*() changes
* ![rev:65454] Added LeftAndMainDecorator
* ![rev:65453] Added stub methods to DataObjectDecorator for documentation purposes
* ![rev:65452] Allowing decoration of can*() methods in File and Folder
* ![rev:65361] Added unit tests for i18n template parsing
* ![rev:65266] Folder name can now be used for uploading files. Ticket #3026 - Thanks simon_w!
* ![rev:65181] Updated LeftAndMain->getMenuTitle() to use classname as fallback if $menu_title is not defined - one less thing to specify in a minimalist ModelAdmin subclass
* ![rev:65173] Refactored CSS applied to filter boxes by using common selector
* ![rev:65153] Added UpgradeSiteTreePermissionSchemaTask as a manual migration of SiteTree schema upgrades in 2.3 (see #2847)
* ![rev:65150] Added unit tests for SiteTree permissions
* ![rev:65147] Only logging out users on Security::permissionFailure() is called in non-ajax context. For ajax requests, we now return a 403 HTTP Status in a HTTPResponse Object, with a ":NOTLOGGEDIN" body for backwards compatibility. If a logout+redirection is required after an ajax-request, this should be handled by the clientside.
* ![rev:65125] Added a "strict-mode" for Member->inGroup() and Member->inGroups() to determine true membership to a group (without inheritance)
* ![rev:65092] Scaffolding TextField instead of TextareaField in Text DBField due to size
* ![rev:65073] Added fieldLabels() overloading to various DataObject subclasses. Use this method instead of directly calling _t() in getCMSFields(), and use fieldLabel('MyField') to get the label for a specific FormField. This way, we can transparently support formfield scaffolding and re-use the labels for search fields automatically.
* ![rev:65072] Added fieldLabels() overloading to various DataObject subclasses. Use this method instead of directly calling _t() in getCMSFields(), and use fieldLabel('MyField') to get the label for a specific FormField. This way, we can transparently support formfield scaffolding and re-use the labels for search fields automatically.
* ![rev:65056] Removed DataObjectDecorator->updateSummaryFieldsExcludeExtra() - was a straight copy of updateSummaryFields()...
* ![rev:65055] More solid fulltext checks against master language tables in i18nTextCollectorTest
* ![rev:65054] Using eval() in textcollector to test for valid PHP syntax
* ![rev:65051] Added unit tests for i18nTextCollector handling of newlines in entity values
* ![rev:65029] Using namespaces for filenames in RequirementsTest
* ![rev:65027] Using safer get_by_id() call in SecurityAdmin->getMemberForm()
* ![rev:65022] Added i18nEntityProvider interface (see comments in #1625) incl. unit tests
* ![rev:65020] Allowing translation of some static properties on DataObject and subclasses through DataObject->fieldLabels(). Part of the provideI18nEntities() work which was started in r64881 (see #1625)
* ![rev:64881] Ignoring entity-names with $ signs (most likely dynamic properties) in i18nTextCollector->collectFromCode()
* ![rev:64878] Added unit tests for i18n.js
* ![rev:64682] Changed FormField->Field() to make use of FormField->createTag() over complicated dynamic string building
* ![rev:64596] Allow use of RestfulService->setQueryString() and test to support it. Patch from ticket #2973. Thanks to simon_w!
* ![rev:64558] Used _t() entity instead of hardcoded "not set" string in TextareaField->Field()
* ![rev:64556] Clearer indication of setting disabled attribute in DropdownField->Field() since the disabled attribute shouldn't be set if the field isn't to be disabled
* ![rev:64553] Clearer indication of setting disabled attribute in CheckboxField->Field() since the disabled attribute shouldn't be set if the field isn't to be disabled
* ![rev:64552] If TextField->disabled has been set to true, then add the "disabled" attribute to the input type text attribute list
* ![rev:64551] Made use of FormField->createTag() functionality for creating a textarea field in TextareaField->Field()
* ![rev:64494] Using ksort() in textcollector to get alphabetized language master files (=easier to compare and debug)
* ![rev:64493] Made _t() global function in Core.php an alias for the new i18n::_t() method
* ![rev:64492] Refactored i18nTextCollector and added unit tests
* ![rev:64489] Added ClassInfo::classes_for_file()
* ![rev:64447] Moving i18n->textcollector() and related methods to new class i18nTextCollector and i18nTextCollectorTask - enabling running textcollector through CLI, refactored to instance methods for better testability
* ![rev:64446] Improved TaskRunner and BuildTask metadata and styling
* ![rev:64421] Using createTag() to create HeaderField and LabelField, which adds support for HTML id attributes and extra css classes through addExtraClass()
* ![rev:64410] Made use of createTag() on FormAction->Field()
* ![rev:64408] Added ID to allow CSS styling of forgot password link on MemberLoginForm
* ![rev:64406] Added a message if no email address was specified, for user feedback purposes on MemberLoginForm->forgotPassword()
* ![rev:64405] Changed the "I've lost my password" action to a link instead, since the button is too prominent, and usability is poor having this as a form submit button.
* ![rev:64397] Versioned::get_one_by_stage() and Versioned::get_by_stage() were missing parameters from their get_one() and get() counterparts in DataObject. Those parameters have been added. See ticket #2965 for the origin of this patch.
* ![rev:64366] Pulled out Newsletter specific stuff from Member, the changes in the newsletter module were done on r64365
* ![rev:64356] Added additional known file types, for audio and video files
* ![rev:64311] Added unit tests for Silverstripe's custom static handling (with lots of commented out failing tests)
* ![rev:64306] is_array() checks in DataFormatter to respect empty arrays as a form of denying permissions on fields
* ![rev:64305] Added BankAccountField::is_valid_array_structure() to avoid PHP Notices when converting empty array values
* ![rev:64304] Added DropdownFieldTest
* ![rev:64252] Making confirmation message in ConfirmedFormAction translatable
* ![rev:64238] Showing image thumb before input field in a separate block `<div class="thumbnail">` in SimpleImageField
* ![rev:64236] Added unit tests for form session messages and session validation, FormTest->testSessionValidationMessage() and FormTest->testSessionSuccessMessage()
* ![rev:64229] Storing a "fake referer" in TestSession->lastURL to allow for redirectBack() calls, e.g. after failed form validation
* ![rev:64224] Disrecard $includeRelations setting when scaffolding $has_one relationships in FormScaffolder - use $restrictFields to limit instead
* ![rev:64223] Making URL accessible through HTTPRequest->getURL()
* ![rev:64157] Added $params parameter to all DBField->scaffoldFormField() subclasses
* ![rev:64144] Setting default level for ContentController->getMenu($level = 1) to allow for calls without arguments
* ![rev:64078] Using $locale in _t() instead of repeatedly calling i18n::get_locale()
* ![rev:64075] Replaced hardcoded "en_US" references in i18n class with $default_locale
* ![rev:64073] Supporting titles in FieldSet->findOrMakeTab()
* ![rev:64071] Added german translation for ModelAdmin
* ![rev:64067] Using i18n fieldlabels for column-headlines in TableListField
* ![rev:64041] Re-enabled RSSFeedTest - seems to work now due to Director::baseURL() fixes (#2861)
* ![rev:64012] Improved error message on invalid classname for TestRunner
* ![rev:64003] Added DataFormatter->setCustomRelations()
* ![rev:64001] Made FormTest fixtures more expressive
* ![rev:63999] Re-enabled two test cases in DataObjectSet as a result of the above fixes
* ![rev:63996] Added unit test CheckboxSetFieldTest?->testLoadDataFromObject()
* ![rev:63995] Using fixtures in CheckboxSetFieldTest?, restructured from hard-to-debug manymany-join on self to a Article`<->`Tag relation
* ![rev:63955] Pulled out Report::has_reports() which was hardcoded into LeftAndMain, and put into cms/_config.php which makes more sense
* ![rev:63763] Reformatted and documented Form->loadDataFrom() - no functionality changed
* ![rev:63762] Added unit tests for "_unchanged" handling in Form->loadDataFrom()
* ![rev:63761] Added unit tests for Form->loadDataFrom()
* ![rev:63748] Added missing "abstract" Report class to compliment ReportAdmin. Currently it is unclear what abstract base class you're supposed to implement from.
* ![rev:63681] Custom getViewer() methods to use Page main templates if CollectionController is nested in a ContentController
* ![rev:63680] Added SSViewer->getTemplateFileByType() and SSViewer->setTemplateFile()
* ![rev:63679] Added HTTPRequest::detect_method()
* ![rev:63653] Added Controller->getRequest()
* ![rev:63652] Added Controller->render($params) as a shortcut for Controller->customise($params)->renderWith(array('MyTemplate','MySubTemplate')) - templates are auto-detected by Controller->getViewer() and Controller->getAction()
* ![rev:63651] Consistently allowing for $restrictFields and $fieldClasses parameters passed to DataObject->scaffoldFormFields(), DataObject->scaffoldSearchFields(), DataObject->scaffoldCMSFields()
* ![rev:63650] Added RequestHandlingTest->testNestedBase()
* ![rev:63648] Added support for customize parameters to ViewableData->renderWith() to avoid unnecessary chaining ($this->customize($params)->renderWith($template))
* ![rev:63633] Better i18n for TableField and ComplexTableField
* ![rev:63632] Using DataObject->Title for has_one dropdowns generated in DataObject->scaffoldFormFields()
* ![rev:63630] Added DataObject->fieldLabel() and removed $fieldname parameter from DataObject->fieldLabels($fieldName) to simplify overloading of fieldLabels() for i18n
* ![rev:63628] Added FieldSet->hasTabSet() incl. unit test
* ![rev:63626] Removed overloaded MemberTableField->DetailForm() and reduced overloaded constructor logic - same behaviour found in parent classes
* ![rev:63624] Scaffolding Member->getCMSFields() to allow for easy extension
* ![rev:63623] Calling DataObjectDecorator->updateCMSFields() in DataObject->getCMSFields() - was previously only called in SiteTree instances
* ![rev:63620] Only list ID field in DataObject->summaryFields() if no summaryfields are defined (or can be autodetected). Listing all fields was not feasible, as some subclasses have more fields than fits the column layout
* ![rev:63619] Added ObjectTest->testSingletonCreation()
* ![rev:63615] Added FieldSetTest->testRemoveTab()
* ![rev:63614] Updated translations from translate.silverstripe.com
* ![rev:63613] Updated translations from translate.silverstripe.com
* ![rev:63572] Removed project-specific requirements from CMSMain
* ![rev:63569] Started using ss.i18n clientside javascript in LeftAndMain classes (only a fraction made translatable)
* ![rev:63567] Using ss.i18n in all sapphire form fields with clientside language strings
* ![rev:63566] Added javascript i18n support through Requirements::process_i18n_javascript() and ss.i18n javascript lib
* ![rev:63565] Added ViewableData->i18nLocale, used in LeftAndMain.ss to determine interface language through meta tags (see r63564)
* ![rev:63564] Added ViewableData->i18nLocale, used in LeftAndMain.ss to determine interface language through meta tags
* ![rev:63554] Checking for instanceof DataObject instead of has_one() in DataObject->update() to support virtual relations as well (fix to r63531)
* ![rev:63528] #1848 - Select the title field for new pages
* ![rev:63526] #2875: Make CLI execution more robust when FILE_TO_URL_MAPPING not set
* ![rev:63493] Added support for dot syntax to DataObject::update()
* ![rev:63470] Setting SimpleImageField->allowedExtensions to sensible defaults
* ![rev:63468] Added Form->resetField()
* ![rev:63465] Showing contact information in Debug::friendlyError() from Email::getAdminEmail()
* ![rev:63463] Added Director::get_environment_type()
* ![rev:63452] Better URL handling. Instead of "admin/showreport/something", we do "admin/report/show/something", which is more consistent with the rest of the CMS.
* ![rev:63388] Director::forceWWW() now does a 301 redirect for SEO (to be consistent with Director::forceSSL())
* ![rev:63337] Added DataObjectTest test cases for checking various field existence levels
* ![rev:63327] #2172: Added counts to comment admin submenu items
* ![rev:63321] Updated cli-script handling to be more in line with web calls, and improved Director::setBaseURL() calls.
* ![rev:63289] Tidied up DropdownField->Field() by making use of FormField->createTag() as other FormField subclasses such as TextField do
* ![rev:63249] Moved UserDefinedForm and related code, templates, CSS and javascript out of cms and sapphire classes into userforms/trunk
* ![rev:63198] Added user_error() if RebuildStaticCacheTask is called without a Page->allPagesToCache() method defined
* ![rev:63182] Added ManifestBuilder::$cache_expiry_mins
* ![rev:63181] Using HTTP Status 301 for RedirectorPage class, to be nice to search engines and improve SEO (with 200 page rank gets split between pages, with 301 its all transferred to the target page)
* ![rev:63175] Introduced constants for system paths like /sapphire in preparation for a more flexible directory reorganisation. Instead of hardcoding your path, please use the following constants: BASE_PATH, BASE_URL, SAPPHIRE_DIR, SAPPHIRE_PATH, CMS_DIR, CMS_PATH, THIRDPARTY_DIR, THIRDPARTY_PATH, ASSETS_DIR, ASSETS_PATH, THEMES_DIR, THEMES_PATH
* ![rev:63154] Introduced constants for system paths like /sapphire in preparation for a more flexible directory reorganisation. Instead of hardcoding your path, please use the following constants: BASE_PATH, BASE_URL, SAPPHIRE_DIR, SAPPHIRE_PATH, CMS_DIR, CMS_PATH, THIRDPARTY_DIR, THIRDPARTY_PATH, ASSETS_DIR, ASSETS_PATH, THEMES_DIR, THEMES_PATH
* ![rev:63153] Moved procedural bootstrapping code hiding away between function definitions in Core.php to main.php and cli-script.php (TEMP_FOLDER and PR_* constants)
* ![rev:63057] Updated argument handling for sake
* ![rev:63025] Better CLI output of 'sake dev'
* ![rev:63022] #2853 - Added dev/build as a the new name for db/build; prettied it up
* ![rev:62995] Prevent CMS session timing out and losing content - Added a ping to Security/ping every 5 mins, and altered the onSessionLost behaviour to open login form in a pop-up instead of closing the CMS (see #2242)
* ![rev:62994] Prevent CMS session timing out and losing content - Added Security/ping as a destination for session-preserving ajax pings
* ![rev:62894] #2700 - Added section title to CMS title tag
* ![rev:62883] ComplexTableFilters used to edit relations have their filter automatically set, as well as the foreign key on new records.
* ![rev:62867] #2417: Replaced http://www.yoursite.com with the actual base URL
* ![rev:62848] Allowing to specify dropdown title field in TypeDropdown->setTitleFieldName() - patch by nicolaas (#2689)
* ![rev:62847] Allowing usage of ID, Code-String or Object as $group parameter in Member::inGroup()
* ![rev:62844] Allowing usage of $member parameter for Member::check() as ID, Code or Object
* ![rev:62843] Added Debug::send_warnings_to()
* ![rev:62841] Using optional $member parameter for DataObject::can*() methods
* ![rev:62477] Improved ajax error display within the CMS: Using Firebug (or Firebug Lite) for plaintext output instead of cramming everything into the CMS-status field
* ![rev:62468] In Debug::showError(), if error is displayed through ajax with CliDebugView, use plaintext output
* ![rev:62467] Removed "ERROR:" prefix hack for ajax error responses - clientside evaluation should inspect HTTP status codes instead
* ![rev:62397] Adjusted ModelAdmin->import() to new BulkLoader_Result API (see r62403)
* ![rev:62267] Added DBFieldTest to test prepValueForDB()
* ![rev:61685] You can now use Controller::join_links() to add querystring arguments to a URL
* ![rev:61627] Added dev/tests/startsession and dev/tests/endsession to allow the use of fixtures with external test frameworks, such as Windmill
* ![rev:61618] wakeless - Added SQLQuery::filtersOnID()
* ![rev:61485] DropdownField now allows for `<optgroup>` elements in the field source by passing in a two dimensional array - this was taken from GroupedDropdownField
* ![rev:61420] RequiredFields->php() uses quotes around title of field, falling back to the name of the field if title isn't available
* ![rev:61415] Added LowerCase() to DBField to return the raw2xml converted value as lower case for any type of field if applicable
* ![rev:61394] Added SetHeight() to the Image class, so we can call it from the templates
* ![rev:61392] Added SetSize() to the Image class so we can use it in the templates
* ![rev:61166] Consistent styling of TypeDropdown in the CMS
* ![rev:61165] Added h3, h4 and h5 CSS styles
* ![rev:61157] Added FieldSet->removeFieldsFromTab() which does exactly what removeFieldFromTab() does, but with an array of field names
* ![rev:61154] Director::forceSSL() redirects are now 301 instead of 302 redirects, which is better for SEO
* ![rev:61153] ErrorPage:: should also list ShowInSearch as 0, since it is not required to be searched
* ![rev:61149] Added getter method for CompositeField->children
* ![rev:61147] If title not passed into TextareaField constructor, it defaults to the name value
* ![rev:60724] Removed recently added DataObject::$result_permissions and replaced with more specific TableListField::permissions_for_object()
* ![rev:60645] Added Maori to i18n::$common_languages
* ![rev:60637] Showing error level in custom error handlers on DebugView and CliDebugView
* ![rev:60635] Added default /admin/cms route to cms/_config.php to clear default namespace for other controllers
* ![rev:60395] Using Requirements instead of hardcoded template logic to include some LeftAndMain js/css
* ![rev:59286] Added `<div class=""middleColumn">` around TableListField templates and all subclasses
## Minor changes
* ![rev:71706] Make FirstName and Surname of Member table be indexed.
* ![rev:71621] Allow setting page size for MemberTableField
* ![rev:71569] some label, texture change for AHIP project SC #99
* ![rev:71345] added user friendly labels - should really be _t compatible I guess
* ![rev:71292] Fixed tab-spacing in cms/upload js files
* ![rev:71194] Fixed CSVParserTest with encoding issues
* ![rev:70960] Added basic tests for Date and DateField
* ![rev:70953] Code formatting fix in DateField
* ![rev:70895] Updated tests to check boolean values in CsvBulkLoaderTest
* ![rev:70843] Added phpDoc comments for documentation that needs to be written explaining the different source data that can be used with CheckboxSetField
* ![rev:70833] Ensure that $result is defined before calling array functions on it in SiteTree::getClassDropdown()
* ![rev:70807] Code formatting cleanup in Member
* ![rev:70799] Code formatting fix in SecurityAdmin_left.ss
* ![rev:70783] Code formatting fix
* ![rev:70769] Defensive handling of events in TreeSelectorField->hideTree
* ![rev:70761] Added important piece of information for where the callback method should be defined for duplicate checks in BulkLoader
* ![rev:70693] fixing flash insertion and removing console log messages
* ![rev:70678] Use FormResponse instead of echoing strings as JS
* ![rev:70677] Removed hard-to-debug error trap in SecurityAdmin_right.js
* ![rev:70666] merged r70665 from trunk
* ![rev:70664] removed dulicate css code
* ![rev:70663] merged r70323 from trunk
* ![rev:70662] tinymce toolbar improvements. Fixed gradient image and border issue
* ![rev:70657] #3416 MCE Editor Minor Beautification (thanks ajshort!)
* ![rev:70647] Changed $title parameter to HtmlEditorField constructor to null to be consistent with TextareaField and so title is derived based on the name of the field if no title is given.
* ![rev:70635] Patch from ajshort. changed site tree shortcut icon to transparent.
* ![rev:70608] Code formatting fix in FormField
* ![rev:70598] ticket 1846. Changed Action to title case
* ![rev:70596] ticket 1846. changed logout text to title case
* ![rev:70591] merged patch from simon_w. Fixed language in model admin
* ![rev:70587] fix for ticket 3384. Instead of messing round with added requirements back if you cannot merge them just return
* ![rev:70571] in-line documentation correction
* ![rev:70548] Added default english text for "Email" in Secrity->LostPasswordForm()
* ![rev:70540] Added default english text for "Email" and "Password" fields in MemberLoginForm
* ![rev:70530] merged patch from keeny. Put comment data into Cookie and load if user fails maths spam question. Clear comment cookie on successful posting
* ![rev:70498] Fixed incorrect parameters breaking PasswordField HTML validity because maxlength and size were being populated by non-numeric characters
* ![rev:70494] merged patch from simon_w. Removed unnesscary comments
* ![rev:70493] merged patch from simon_w. Changed can*() methods to check they are sent valid member objects rather then arrays
* ![rev:70484] merged patch from rjmackay. Fixed inclusion of BBCode filters and reported error supression
* ![rev:70483] merged patch from simon_w: added check to Children() to make sure user has canView() rights
* ![rev:70411] added empty statics for decoration
* ![rev:70409] added empty statics to allow decoration
* ![rev:70408] added empty statics to PageComment to allow for decoration
* ![rev:70400] SilverStripeNavigator toolbar is now i18n friendy
* ![rev:70360] removed Gallery Module code from AssetTableField
* ![rev:70355] CSS hover background fix. Merged from ticket #3264. Thanks gigtech
* ![rev:70269] Update ResetFormAction to make use of createTag() method instead of patching together strings to make the form input
* ![rev:70257] Fixed undefined variable error in TableListField->generateExportFileData()
* ![rev:70255] Whitespace removal at end of DataObjectDecorator class
* ![rev:70252] Update phpDoc for DataObject->getFrontEndFields()
* ![rev:70251] Renamed DataObjectDecorator->updateFormFields() to updateFrontEndFields() to be more accurate to the extended method
* ![rev:70238] Removed "Groups" field that wasn't used in Member::getCMSFields()
* ![rev:70236] Code tidy up and coding style fixes for MemberTableField
* ![rev:70188] If the error-404.html or error-500.html file can't be opened, supress the warning so an error isn't shown in the CMS
* ![rev:70154] phpDoc for Varchar->getName()
* ![rev:70153] Removed redundant code from Varchar
* ![rev:70133] Fix potential undefined variable errors in Query->column() and Query->keyedColumn() by always returning an array, even if it's empty. This now conforms to the phpDoc for these two functions, instead of returning null if there's no $column variable set
* ![rev:70132] Defined $column as an array so "undefined variable" error is supressed
* ![rev:70070] tidied up padding in headings complextablefields with long titles
* ![rev:70065] Removed redundant code in CMSMain->AddPageOptionsForm()
* ![rev:70061] Removed redundant code
* ![rev:70059] Code formatting fixes in HtmlEditorField
* ![rev:70053] Added test for HTTP::getLinksIn() which subsequently tests HTTP::findByTagAndAttribute()
* ![rev:70048] fix on-line documentation syntax so that phpDocumentor can creating automatically the API doc
* ![rev:70032] fix on-line documentation syntax so that phpDocumentor can creating automatically the API doc
* ![rev:69955] Passing context object through in LeftAndMain->getSiteTreeFor() (necessary for Translatable)
* ![rev:69939] Removed "edit image" button since the image editor has been removed
* ![rev:69890] Updated language tables
* ![rev:69889] Added Extension->getOwner()
* ![rev:69883] Fixed alignment of "Create translation" button in CMS - removed unnecessary horizontal floating and removed background
* ![rev:69871] merged r69857 from trunk
* ![rev:69865] Removed old references to check-php, which has since been removed
* ![rev:69843] Moved form session error set up from Form constructor to method so it can be used again if need be
* ![rev:69840] Added SiteTreeActionsTest
* ![rev:69839] Merged r69410 from trunk
* ![rev:69838] Merged r69409 and r69410 from trunk
* ![rev:69749] Fixed Sitetree expand and collapse icons alignment in FF3
* ![rev:69717] added support for :-) as well as :) in the Similes
* ![rev:69706] search interface design improvements
* ![rev:69686] Updated correct HTTPRequest class for @deprecated notice on HTTP::sendFileToBrowser()
* ![rev:69611] Updated cms master tables
* ![rev:69592] Added french translation (see #3290)
* ![rev:69591] Added french translation (see #3290)
* ![rev:69562] merge patch from ajshort: allow db build without running requireDefaultRecords
* ![rev:69514] fixed ModelAdmin right tab layout. Removed scrollbar off the tab strip. Ticket #2900
* ![rev:69419] Code syntax tidy up
* ![rev:69369] Removed @todo from Text->ContextSummary as it's already done
* ![rev:69368] Added phpDoc to Text->ContextSummary() $string argument
* ![rev:69348] Added todo and phpDoc to Text->ContextSummary()
* ![rev:69249] Disable caching in RestfulService test
* ![rev:69248] Removed debug message
* ![rev:69244] Added test for FieldSet->renameField() to test method behaviour
* ![rev:69226] Added tests for Text->LimitWordCountXML()
* ![rev:69225] Added phpDoc to Convert::raw2xml() and Convert::raw2js()
* ![rev:69221] Removed comment that isn't appropriate
* ![rev:69220] Added TextTest for testing Text class methods
* ![rev:69219] Updated phpDoc cautionary message on Text->LimitCharacters()
* ![rev:69218] Added documentation to various Text class methods for limiting field values
* ![rev:69206] logical bug in FormScaffolder
* ![rev:69205] translation
* ![rev:68973] reorganized layout of bbcode list elements to move longer ones to bottom row for BBCode popouts
* ![rev:68858] renamed $json to $xml in XMLDataFormatter
* ![rev:68853] added link to all Comments feed in Page Comments
* ![rev:68771] Updated language tables
* ![rev:68763] translation
* ![rev:68760] Making Folder->getCMSFields() translatable
* ![rev:68759] translation
* ![rev:68758] Making CTF save button translatable
* ![rev:68753] translation
* ![rev:68749] translation
* ![rev:68748] translation
* ![rev:68747] translation
* ![rev:68743] Translation
* ![rev:68742] Translation
* ![rev:68741] translation
* ![rev:68600] Removed debug message
* ![rev:68534] Hardcoded yoursite.com in assets treeview (see #3230)
* ![rev:68531] fixed javascript initialization bug in SecurityAdmin_left.js (see #3211)
* ![rev:68526] Hiding border around `<fieldset>`s in ModelAdmin add form (see #3214)
* ![rev:68517] fixed php notices on AssetAdmin (see #3187)
* ![rev:68457] formatting in Security.php
* ![rev:68195] Styling for input.disabled
* ![rev:68178] updated translations
* ![rev:68162] Updated language master table
* ![rev:68161] Updated language master table
* ![rev:68147] Updated cms lang master table
* ![rev:68029] Added whitespace after <!-- end include to be consistent
* ![rev:67705] formatting
* ![rev:67689] Documented ClassInfo::subclassesFor() and added unit tests
* ![rev:67682] Updated phpDoc for Requirements::customCSS() and Requirements_Backend::customCSS()
* ![rev:67676] Code formatting cleanup
* ![rev:67675] Code formatting cleanup
* ![rev:67468] Removed whitespace after ?> end PHP tag
* ![rev:67467] Removed whitespace after ?> end PHP tag
* ![rev:67424] Tidy up of Form.ss template in sapphire/templates/Includes
* ![rev:67380] Documentation in Email class
* ![rev:67327] Added test for ErrorPage
* ![rev:67301] Declared Director::direct() and Director::test() as static functions to avoid confusion
* ![rev:67300] Code formatting improvements for Director->test()
* ![rev:67295] Re-enabled calls to updateCMSFields() accidentally disabled in r67294
* ![rev:67293] Removing custom mock controller from SearchFormTest, now handled in FunctionalTest (see r67291)
* ![rev:67230] ImageEditor indentation
* ![rev:67213] Merged r66794 from trunk (related to #3192)
* ![rev:67188] fixed typo in email_template docblock and added note from sean
* ![rev:67176] Reverted r64384 and re-added Email_Template (see #3183)
* ![rev:67083] Documentation for StaticExporter
* ![rev:67075] removed debug code
* ![rev:66958] Deprecated internal property SearchForm->$numPerPage, use $pageLength instead
* ![rev:66944] merged from trunk
* ![rev:66942] merged r66670 from trunk
* ![rev:66939] Merged r66681 from trunk
* ![rev:66819] Code formatting conventions in HTTPRequest->param()
* ![rev:66803] phpDoc comments for ModelAdmin->import()
* ![rev:66800] Added code example of $model_importers array item
* ![rev:66751] Reverted replacement of jQuery.js with minified version, we're doing minification on the fly, and there's jQuery-packed.js as a readymade alternative (see r66708)
* ![rev:66748] Revered jquery/orig folder, not necessary as we have an unminified jQuery.js anyway (see r66717)
* ![rev:66747] Reverted reference to jquery-packed.js which causes problems by double minification in cms (see r66735)
* ![rev:66745] Revered accidental deletion of jQuery.js in r66719
* ![rev:66736] Formatting in Permission::checkMember()
* ![rev:66735] fixed path include for jquery
* ![rev:66700] merged r66672 from trunk
* ![rev:66643] Removed unused action "waitingon" from CMSMain::$allowed_actions
* ![rev:66642] Removed TaskList remnants of old cms workflow code
* ![rev:66640] Removed redundant code
* ![rev:66637] Code formatting of !isset($member) on SiteTree->canAddChildren() for consistency with other can*() methods
* ![rev:66636] Renamed to correct updateCMSActions() in php comment
* ![rev:66631] Removed unused private static $dataobject_select in File
* ![rev:66630] phpDoc comments for File->getAbsoluteSize()
* ![rev:66628] Code formatting cleanup on CheckboxSetField->Field()
* ![rev:66624] Added tests for checking extra class was added to DropdownField
* ![rev:66623] Added tests for checking extra class was added to FormField subclasses (TextField, EmailField and OptionsetField)
* ![rev:66615] Readd of end php tag as per coding conventions
* ![rev:66614] Added missing end php tag for ImageEditor, as per coding conventions
* ![rev:66613] Removed whitespace after end php tag for AssetTableField
* ![rev:66612] Removed commented out code that shouldn't be lying around
* ![rev:66542] actually allow youtube / blip videos to be embedded into the cms content area
* ![rev:66426] added setter function to write_js_on_body() so I can override the settings
* ![rev:66386] SecurityAdmin code formatting cleanup
* ![rev:66385] Removed old references to "rightbottom", which is now obsolete and caused a big box to appear in the CMS sometimes
* ![rev:66373] Tidied up messy template syntax in LeftAndMain.ss
* ![rev:66333] Documentation for ConfirmedPasswordField
* ![rev:66322] Documentation for SearchForm
* ![rev:66318] Coding conventions, inconsistent use of tabs and spaces
* ![rev:66317] Code conventions (spaces should be between operator characters)
* ![rev:66311] Removed old references from workflow in SiteTree and VirtualPage (AssignedToID and RequestedByID were old properites of a workflow page type)
* ![rev:66310] Removed old workflow instances in the cms module. See ticket #3044
* ![rev:66302] Added isset($_SERVER['HTTP_HOST']) checks to Director->isDev() and Director->isTest() - these environment variables are not available in CLI mode, and show up as PHP notices in a default cli-script/sake execution
* ![rev:66270] Code formatting in FormField
* ![rev:66167] Fixed class naming in LeftAndMainDecorator.php
* ![rev:66093] Removed debug code in AjaxUniqueTextField
* ![rev:66092] Fixed PHP Notice in SiteTree
* ![rev:66024] Removed debug code committed in r65554
* ![rev:65616] Removed unused code from SearchForm, commented out junk etc
* ![rev:65537] removed debug commits from r65523 in Folder.php
* ![rev:65516] Updated merge-info
* ![rev:65485] type enviroment -> environment
* ![rev:65484] Removed obsolete code from MySQLDatabase
* ![rev:65458] Removed duplicate dev/simpletest, already present in thirdparty/simpletest
* ![rev:65457] PHPDoc for FunctionalTest
* ![rev:65446] Tidied up ThumbnailStripField->getimages() formatting
* ![rev:65445] Tidied up ThumbnailStripField->getflash() formatting
* ![rev:65444] Tidied up ThumbnailStripField->getimages() formatting
* ![rev:65443] Tidied up formatting - spaces to tabs
* ![rev:65437] Changed die() to user_error() so that correct error level is returned
* ![rev:65418] Tidied up messy code formatting
* ![rev:65409] Tidied up AssetAdmin->SiteTreeAsUL()
* ![rev:65398] images for the new imageeditor which didnt get included in the patch
* ![rev:65292] JS translations in LeftAndMain
* ![rev:65233] Removed redundant code
* ![rev:65205] phpDoc of HtmlEditorField
* ![rev:65190] Improve robustness of some of the widget definition
* ![rev:65149] Moved tasks from sapphire/cli to new folder sapphire/tasks
* ![rev:65146] Fixed PHP Notices in Member.php
* ![rev:65145] Fixed PHP Notices in TreeMultiSelectField
* ![rev:65135] Check if OldPassword data exists before running checkPassword()
* ![rev:65127] Code formatting in ComplexTableField
* ![rev:65126] Code formatting in CMSMenuItem
* ![rev:65124] Formatting in Group.php
* ![rev:65095] Disabled LeftAndMainTest, now covered by CMSMenuTest
* ![rev:65075] Updated master language tables
* ![rev:65074] Updated master language tables
* ![rev:65067] formatting
* ![rev:65058] Restructured code in Object.php to consistently have properties and important methods like __call() at the top of definitions (no logic changes). Added minor documentation.
* ![rev:65052] rearranged methods in i18nTextCollector
* ![rev:65043] Collecting entities for language master table with new i18nTextCollector functionality. The table is now sorted alphabetically by namespace and entity. Entities now include more translatable statics from DataObject subclasses like $db, $has_one etc.
* ![rev:65035] Collecting entities for language master table with new i18nTextCollector functionality. The table is now sorted alphabetically by namespace and entity. Entities now include more translatable statics from DataObject subclasses like $db, $has_one etc.
* ![rev:65025] Moved i18n tests into sapphire/tests/i18n subfolder
* ![rev:65022] documentation for i18nTextCollector
* ![rev:65021] package information for ModuleManager
* ![rev:65019] Moved js unit tests from sapphire/javascript/tests to sapphire/tests/javascript to have a consistent location for all tests on server- and clientside
* ![rev:64986] Renamed variable to avoid confusion in SecurityAdmin->SiteTreeAsUL()
* ![rev:64982] Tests for r64981
* ![rev:64871] Code formatting in TextareaField->Field()
* ![rev:64850] Code formatting cleanup
* ![rev:64786] Added deprecated note to ConfirmedFormAction
* ![rev:64771] phpDoc update for ContentController->getMenu()
* ![rev:64733] Code formatting cleanup in AssetAdmin->addfolder()
* ![rev:64560] Temporarily disabled Debug::message() calls in i18nTextCollector as they're disturbing unit test output and we currently dont have context switches for this
* ![rev:64559] Adjusted i18nTextCollector to use DataObject->i18nCollectStatics()
* ![rev:64557] Unnecessary check of trim() twice on TextareaField->Field()
* ![rev:64555] whitespace removal
* ![rev:64551] Documentation tweaks in TextareaField
* ![rev:64550] Convert::raw2att() isn't required because FormField->createTag() already does this
* ![rev:64505] Added to @deprecated note for TypeDropdown about why this class shouldn't be used
* ![rev:64503] phpDoc changes in LeftAndMain - removal of @usedby which doesn't exist, replaced with @uses on the remote function
* ![rev:64502] Code formatting changes to be more consistent
* ![rev:64498] Moved CollectionController_Results template into genericviews module
* ![rev:64460] documenting my new method, correct a coding convention about whitespace
* ![rev:64442] moved RestfulServerTest from cms to sapphire module, same as the actual RestfulServer class
* ![rev:64441] moved RestfulServerTest from cms to sapphire module, same as the actual RestfulServer class
* ![rev:64429] deprecation notes
* ![rev:64419] Misc deprecation notes
* ![rev:64418] Changed visibility of SiteTree->getClassDropdown()
* ![rev:64415] documentation
* ![rev:64414] Removed unused DatabaseAdmin->makeURL()
* ![rev:64413] documentation
* ![rev:64412] Marked some Convert methods as deprecated, as their purpose is unclear, they're neither documented nor tested. Stuff like Convert::xml2js() is just way too fuzzy
* ![rev:64411] phpDoc comment error fix
* ![rev:64409] Changed visibility of Convert::recursiveXMLToArray
* ![rev:64406] Tidied up code formatting for MemberLoginForm->forgotPassword() to be clearer
* ![rev:64404] Security->LostPasswordForm() code formatting changes for clarity
* ![rev:64403] Moved Controller::init() to top of file
* ![rev:64400] Misc deprecation notes
* ![rev:64397] phpDoc for Versioned::get_by_stage() to be consistent with Versioned::get_one_by_stage()
* ![rev:64396] Removed deprecated method addmember() from CMSMain - this should be contained on SecurityAdmin instead
* ![rev:64395] Removed commented out code in CMSMain->PageTypes()
* ![rev:64385] Misc deprecation fixes
* ![rev:64382] Misc deprecation notices
* ![rev:64369] Removed Group_Unsecure which was never used
* ![rev:64364] Removed Director::addRules() item for Unsubscribe_Controller that should will be done by the Newsletter _config.php file instead
* ![rev:64362] Fixed FileTest for changes to getFileType() on the File class
* ![rev:64356] Tweaked text of file type descriptions slightly
* ![rev:64344] Whitespace changes in TextField
* ![rev:64338] delete some unnecessary duplicated variable in a assignment statement.
* ![rev:64322] Removed useless comment and commented out code that went along with it in Group class
* ![rev:64319] fixed php notice error in DataObject
* ![rev:64312] Todos for ObjectTest
* ![rev:64301] Added mergeinfo
* ![rev:64300] Added mergeinfo
* ![rev:64261] Moved HTTPRequest constructor to beginning of method definitions
* ![rev:64079] Documentation in i18n class
* ![rev:64068] Removed CollectionController language strings from master table
* ![rev:64020] Removed subtree mergeinfo
* ![rev:64014] Formatting
* ![rev:64009] Swapped $mainFields and $fields assignments in Member->getCMSFields() to reflect what they're actually containing
* ![rev:64008] Syntax fix in CliTestReporter which was causing wrong array indices
* ![rev:64006] Fixed PHP notice in CLITestReporter
* ![rev:63985] Documentation
* ![rev:63982] Removed unnecessary $this->extend() on SSReport->getCMSFields()
* ![rev:63961] Updated inconsistent documentation on SSReport
* ![rev:63959] Updated SSReport class documentation to make sense
* ![rev:63958] Documentation and @package phpDoc code additions to ReportAdmin and SSReport
* ![rev:63937] Reformatting
* ![rev:63898] Add warning for deprecated function.
* ![rev:63897] Change memory limit to -1 on publishall to stop sapphire running out of memory on unit tests.
* ![rev:63873] Updated entities from translate.silverstripe.com
* ![rev:63869] Updated entities from translate.silverstripe.com
* ![rev:63864] Updated language master table
* ![rev:63861] Updated language master table
* ![rev:63856] Reverted manual setting of i18n fallback strings in r63839, fixed original problem (wrong entity name)
* ![rev:63840] Renamed Report to SSReport as it was conflicting with project code
* ![rev:63822] Fix to SiteTreeTest's data fixtures
* ![rev:63815] Tidied up argument list for Object::create() in ComplexTableField->AddForm()
* ![rev:63802] Fixed JS undefined errors with 'addgroup' and 'deletegroup' elements
* ![rev:63801] Fixed JS undefined error with 'Loading' element
* ![rev:63790] Line break between static variables on SecurityAdmin
* ![rev:63766] removed subtree mergeinfo on ModelAdmin_Results.ss in preparation for client branch merge
* ![rev:63760] Documentation for Form class
* ![rev:63753] Code formatting cleanup
* ![rev:63752] Very minor whitespace change
* ![rev:63747] Removed PageTypes directory from cms which is not used anymore
* ![rev:63680] Documentation and formatting in SSViewer and Controller
* ![rev:63657] Documentation for HTTPRequest and RequestHandlingData
* ![rev:63655] Documentation for HTTPRequest and RequestHandlingData
* ![rev:63632] Removed scaffolded header field in DataObject->scaffoldFormFields()
* ![rev:63617] Documentation
* ![rev:63616] Documentation
* ![rev:63608] fixed formatting on no images found
* ![rev:63568] Documentation
* ![rev:63531] Documentation in DataObject
* ![rev:63530] Reverted my email address with something more spambot safe from r63489 ;)
* ![rev:63492] removed `< and >` characters from @author phpdoc token
* ![rev:63491] phpdoc tweaks
* ![rev:63490] phpdoc tweaks
* ![rev:63489] Filled in Ingo's email for phpdoc since he failed to do it himself
* ![rev:63469] Formatting in Member
* ![rev:63468] Documentation for Form
* ![rev:63466] Documentation in ErrorPage
* ![rev:63459] Code formatting inconsistency
* ![rev:63458] Added TODOs for areas of code that needs some work, either in documentation or code cleanup.
* ![rev:63456] Committed missing files related to r63452
* ![rev:63453] Fixed wrong position of return array() in ReportAdmin->showWithEditForm()
* ![rev:63452] Documentation and TODO for ReportAdmin methods
* ![rev:63449] Fix undefined variable error in ManifestBuilder::get_manifest_info()
* ![rev:63420] Code formatting changes for readability and consistency in DropdownField->Field()
* ![rev:63390] Ticket #2869 Fixed PHP notice in Director::forceWWW()
* ![rev:63388] Fix PHP notice in checking $_SERVER['HTTPS']
* ![rev:63385] Fixed PHP notices in ListboxField->Field() by defining the variables first
* ![rev:63370] documentation
* ![rev:63355] allow tinymce to suck down script code at least in tinymce
* ![rev:63339] todos for DataObjectTest
* ![rev:63293] Documentation
* ![rev:63180] Added externals for thirdparty JSON library
* ![rev:63179] Moved JSON library to thirdparty externals
* ![rev:63178] Reverted accidental commit to main.php from r63177
* ![rev:63174] Documentation for image uploads
* ![rev:63156] Reverted accidental disabling of ManifestBuilderTest cleanup code
* ![rev:63155] Temporarily disabled RSSFeedTest as its overriding environment variables that should be handled by Director class with Director::setBaseURL() (which is currently not fully working). Added stub-tests for Director.
* ![rev:63127] Fix phpdoc parsing error
* ![rev:63125] Fix phpdoc parsing error
* ![rev:63124] Fix phpdoc parsing error
* ![rev:63123] Fix phpdoc parsing error
* ![rev:63122] Fix phpdoc parsing error
* ![rev:63121] Fix phpdoc parsing error
* ![rev:63081] Added CMS->SiteTreeAsUL() to $allowed_actions (#2733)
* ![rev:63080] Removed stale version number from `<meta name="generator">` tag (#1908)
* ![rev:62877] Added some more api doku for DataObject::
* ![rev:62845] Added documentation and TODOs for RestfulServer
* ![rev:62843] Documentation and formatting for Debug class
* ![rev:62842] Documentation
* ![rev:62841] Added documentation to DataObject about permission handling
* ![rev:62484] Changed console.log() to console.error() in ajax error handling
* ![rev:62470] documentation
* ![rev:62462] documentation
* ![rev:62461] documentation
* ![rev:62424] FileField->Field() code formatting changes
* ![rev:62313] HTMLVarchar->scaffoldFormField() was referencing a class name of different case that didn't exist (change it to the correct one to be sure)
* ![rev:61840] fixed comment on MathSpamProtection
* ![rev:61826] #2696 - Add message when trying to load the CMS with javascript
* ![rev:61825] Fixed PHP notice
* ![rev:61702] Remove commented out code
* ![rev:61484] added @deprecated note in PHPdoc to show that Email_Template is deprecated
* ![rev:61483] phpdoc of @package and @subpackage to reflect the actual package and subpackage
* ![rev:61482] comment changes to allow better readability of comments of what we're testing
* ![rev:61481] Additions to FieldSetTest to test removeByName() and removeFieldsFromTab()
* ![rev:61217] setRelationAutoSetting function adding
* ![rev:61164] Fixed PHP notice in CheckboxSetField when transforming to readonly
* ![rev:61161] PHPdoc for FieldSet->replaceField()
* ![rev:61160] PHP notice fix for FileIFrameField->Field()
* ![rev:60949] Added FieldSetTest to the test library
* ![rev:60409] Re-activated tabstrip.js in LeftAndMain (merge error?)
* ![rev:60408] Renamed jquery_improvement.js to plural form (consistent with prototype_improvements.js)
* ![rev:60407] Re-enabled DataObjectDecoratorTest
* ![rev:60406] Moved sapphire/misc* to sapphire/thirdparty and sapphire/integration
* ![rev:60401] Moved ScaffoldComplexTableField to separate file
* ![rev:60400] Removed DataObject->mapRelationshipObjects() - incomplete functionality
* ![rev:60398] Removed sapphire/tools
* ![rev:60371] Documentation
* ![rev:60370] Removed debug code from Member.php
* ![rev:60367] removed obsolete code from DataObject.php
* ![rev:60217] syntax error
* ![rev:60216] syntax error
* ![rev:60210] Documentation
* ![rev:60157] Fix php notice
* ![rev:59518] Fixed crazy messed up indentation in TableField
* ![rev:59279] wording for "IP Range" description
## Other
* ![rev:71921] Undo the change committed in r71918 since the commit message is missing
* ![rev:71758] Improved DataObject validation tests to use PHPUnit's setExpectedException stuff.
* ![rev:71755] Disable xdebug in the test runner, because it has a habit of causing bus errors
* ![rev:71170] BUGIX: CMS UI search spinner style tweak
* ![rev:71169] BUGIX: CMS UI changed search spinner, hide search button while processing (better interaction feedback)
* ![rev:71035] Include the media widget into the CMS
* ![rev:71034] Removed media plugin code that got copied into ssbuttons
* ![rev:70995] Disable basicauth in RestfulServiceTest
* ![rev:70900] BUGIFX tweak to navigator layout and tidying up unnecessary styles
* ![rev:70894] BUGIFX tweak to navigator layout
* ![rev:70860] Made selection of custom security templates easier
* ![rev:70845] Don't let content negotiator clobber the mime types of things other than HTML & XHTML
* ![rev:70844] Replaced HTTPReponse settings of Content-type header with Content-Type, to match RestfulServer
* ![rev:70747] 2. make Email_BounceRecord::canCreate() return false; so that it can not be manully create from CRM, instead, it should create through email buncing system.
* ![rev:70740] Undoing change committed in r 70734
* ![rev:70738] Undoing change committed in r 70734
* ![rev:70725] 2. Not all DataObject has a 'Title' database field, but all DataObject has a 'Title' field due to function DataObject::getTitle() exists.
* ![rev:70702] Merged patch submitted by ajshort that calls loadDataForm on a newly created object in ModelAdmin so that properties of the object are loaded properly
* ![rev:70372] fixed ajax button alignment
* ![rev:70303] cms ui: site tree tools visual update
* ![rev:70240] cms ui: fixed line background to drop down from root node
* ![rev:70239] cms ui: fixed line background for open nested lists
* ![rev:70237] cms ui fix: styles for uniform site tree line
* ![rev:70235] cms ui fix: make site tree hierarchy line uniformly dotted
* ![rev:70206] cms ui fix: adding separator above allow drag and drop
* ![rev:70143] IE6 ui fixe for search filter date input width
* ![rev:70141] IE6 ui fixes for calendar in search filters (positioning and when sidebar is expanded)
* ![rev:70136] ui fixes for calendar in search filters (positioning and when sidebar is expanded)
* ![rev:70127]
* ![rev:70091] stopped null properties being added when images inserted in cms (hspace, vspace, align)
* ![rev:70090] Added missing Decimal->nullValue method.
* ![rev:69983] Removed unnecessary db query in CMS tree generation
* ![rev:69982] Pre-cache page version numbers when querying CMS tree for query efficiency
* ![rev:69981] Added Versioned::prepopulate_versionnumber_cache() to allow for querying efficiencies
* ![rev:69977] Added cache to Permission::checkMember() to reduce the number of queries
* ![rev:69933] Reverted change because it wasn't necessary
* ![rev:69925] EHANCEMENT #3326 hamish: Added Image::getOrientation()
* ![rev:69815] Added getter to retrieve alternative database name.
* ![rev:69731] Better error messages when HasManyComplexTableField can't configure itself properly.
* ![rev:69681] See #3275
* ![rev:69382] Fixed label of back button
* ![rev:69350] Simplified implementation of FieldSet::makeReadonlyField()
* ![rev:69349] Simplified implementation of FieldSet::makeReadonlyField()
* ![rev:69052] Fixed URL in the list of tasks.
* ![rev:68945] Fixed loading of CMS toolbar with the HtmlEditorField
* ![rev:68873] Improved rendering of [php] tags in BBCode view
* ![rev:68700] Made CalendarDataField JS more self-suffficient
* ![rev:68598] Added SearchForm::classesToSearch() to set the classes that you want it to search. Still limited to SiteTree and File but you can exclude one of those.
* ![rev:68474] Merged r67482 to branches/2.3 - let db/build add auto_increment
* ![rev:68326] Added ability for comment authors to leave a URL as a separate form field
* ![rev:67877] PaginationSummary return all pages by default
* ![rev:67793] Added PaginationSummary function that enable DataObjectSet to display a portion of page list
* ![rev:67776] Added headers_sent() check to header() call in main.php to stop it from being so brittle.
* ![rev:67583] Restore requirements after sending email
* ![rev:67432] Improved graphs displayed on dev/viewmodel
* ![rev:67427] Added diagrams to dev/viewmodel
* ![rev:67414] Added simple model viewer at dev/viewmodel
* ![rev:67401] - including greybox.js had caused the screen to become unscrollable because of an (unrelated) inclusion of LeftAndMain.js which sets `<body>` to overflow:hidden on javascript page load
* ![rev:67194] Merged r67152 from trunk
* ![rev:67169] Add TableListField::setFieldList()
* ![rev:67165] Added ModelAdmin:: for changing the class used to generate results tables
* ![rev:67131] Moved LegacyIDs from BlogEntry and File to Decorators
* ![rev:67114] Added LegacyID for keeping orginal ID. Used for site migration
* ![rev:66941] Fixed SiteTreePermissionsTest login failure tests
* ![rev:66923] #1885: Fixed safari bold, italic, underline by removing HTML scrubbing.
* ![rev:66889] Better checking of tabstrip stuff
* ![rev:66834] Removed call-time pass by reference from CsvBulkLoader
* ![rev:66824] Removed unnecessary updateCMSFields call; DataObject::getCMSFields does this for us
* ![rev:66719] getting things tidied up
* ![rev:66717] trying to get jquery to stick
* ![rev:66712] packed jquery
* ![rev:66708] packed jquery and jquery ui
* ![rev:66645] DataObject::relObject() throws an exception rather than an error so that it can be caught
* ![rev:66639] Set default level for HeaderField
* ![rev:66634] Added white background for tabs in all places; not just the right frame
* ![rev:66626] Allow passing of columns to ColumnSelectionField() and allow different ColumnSelectionField() values to influence the result columsn
* ![rev:66582] Added support to DataObject::relObject() for looking at $casting to get information about the relation - good for dynamic relations
* ![rev:66546] Fix incorrect logic in r66544
* ![rev:66544] Make sure only fields that exist can be autocompleted on MemberTableFields, and never autocomplete on password.
* ![rev:66431]
* ![rev:66394] 1. Add note to each record in 1-many relation. Add the tab "Notes" for showing/editing/deleting notes of a record.
* ![rev:66356] Merged pre-2.3-oct08 into 2.3 (via trunk)
* ![rev:66353] Merge pre-2.3-oct08 into 2.3 (via trunk)
* ![rev:66350] Fix to LeftAndMain to ensure that jquery doesn't break other admin sections
* ![rev:66304] Fixed bug in test makefile
* ![rev:66296] Build database before testing, for RestfulService test, etc
* ![rev:66267] Return an HTTPResponse consistently from controllers
* ![rev:66265] Fixed RequirementsTest
* ![rev:66225] #2771: Fix SQLQuery::filtersOnID() (wakeless)
* ![rev:66192] #2635 - More informative errors in DataObject (simon_w)
* ![rev:66103] FIX: permission migrator for missing groups
* ![rev:66086] Merged pre-2.3-oct08 into branches/2.3 (via trunk)
* ![rev:66084] Merged pre-2.3-oct08 into branches/2.3 (via trunk)
* ![rev:66008] Boundary condition check for top-level pages with 'inherit' permission
* ![rev:65981] Update sapphire so that it can run with the default .htaccess and mysite/_config.php files provided in the phpinstaller. If database config is missing, then redirect to install.php
* ![rev:65971] Include tabstrip js and css for modeladmin
* ![rev:65970] Fixed WYSIWYG styling
* ![rev:65967] Added validation for DataObject::db, has_one, has_many, many_many, belongs_many_many properties, so that improper use of the array syntax doesn't raise strange bugs elsewhere.
* ![rev:65959] #3068 - Fixed memory issue in IE
* ![rev:65939] Replace source view with one based on codepress
* ![rev:65938] Added advcode tinymce plugin that is a wrapper around codepress
* ![rev:65915] Set default view/edit permissions
* ![rev:65913] Added light blue colouring to notinmenu items
* ![rev:65912] Added notinmenu class to CMS tree items that aren't in menus
* ![rev:65861] Fixed dropdown-based ModelAdmin navigation
* ![rev:65859] Fixed root node not displaying correctly
* ![rev:65828] Removed console debug messages for ThumbnailStripField
* ![rev:65824] Merged in image search capabilities from trunk version - r65820, r65823
* ![rev:65802] Fixes for IE support of script tags being down the bottom
* ![rev:65789] #2991 - Fixed change detection in mce fields
* ![rev:65783] Fixed fatal error in CommentTableField:
* ![rev:65782] New test for old URL redirection
* ![rev:65781] #2679: Auto-redirect renamed pages
* ![rev:65778] Get sapphire to self-allocate at least 64M of memory, if possible.
* ![rev:65735] Fixed media-type selection on demand in IE
* ![rev:65718] Added livequery to leftandmain install
* ![rev:65717] Refactored tabstrip.js to use livequery for loading
* ![rev:65716] Refactored tabstrip.js to use livequery for loading
* ![rev:65709] Removed time limit when minifying files and disabled processing of multiple files if on dev.
* ![rev:65673] Change back to english on teardown
* ![rev:65530] No execution time limit on test runner
* ![rev:65529] Replaced 300-second 'long execution' times with unlimited
* ![rev:65524] Merged branches/2.2
* ![rev:65523] Merged from branches/2.2
* ![rev:65507] Ensure that Requirements backend instance is preserved between tests
* ![rev:65506] Reformatted memory usage to be more concise
* ![rev:65503] #2997 - Added `<% require %>` tag to SSViewer
* ![rev:65471] Added default for HTTP_USER_AGENT
* ![rev:65465] Cleaned up the commented-code
* ![rev:65438] Bugfixes to Requirements alterations
* ![rev:65436] ARCHITECTURE #3034 wakeless: Make Requirements mockable by pushing the meat of the functionality to Requirements_Backend
* ![rev:65407] Removed redundant code
* ![rev:65397] Removed redundant code
* ![rev:65385] dquote> API CHANGE: Simplified Core.php manifest include to just call ManifestBuilder::include_manifest() - manifest takes care of its own cache file
* ![rev:65332] IMPROVEMENT Fix tab display and button position when adding a record (ticket #3029)
* ![rev:65289] IMPROVEMENT moved managed models' forms to one panel (ticket #2898)
* ![rev:65287] #2135 - Disallow XSS bug in development RestfulService use
* ![rev:65252] Added deprecation method for LeftAndMain::add_menu_item()
* ![rev:65229] API CAHNGE: Allow augmentPopulateDefaults on data object decorators
* ![rev:65189] Added spellchecker to CMS
* ![rev:65175] Reverted previous change, as MemberTableField has it's own use of sourceFilter - not the most documentation situation however.
* ![rev:65173]
* ![rev:65150] Note: Use dev/tasks/UpgradeSiteTreePermissionSchemaTask/run to migrate legacy data to the new schema as outlined above
* ![rev:65140] Simplified CliTestReporter output so that buildbot can read it
* ![rev:64952] Text scaffolds to a TextareaField, not a TextField
* ![rev:64947] #2975 - Malformed javascript language string (ajshort)
* ![rev:64896] In general all Form Fields should imply with this rule if a page contain mulitiple forms, but this is not under our current developing cycle, since our form fields validation is changing to use jQuery.
* ![rev:64880] Deleted SmallerThanFilter - please use LessThanFilter
* ![rev:64863] Changed default # of rows on HTMLEditorField from 15 to 30
* ![rev:64862] Fixed TinyMCE stylihg
* ![rev:64839] Fixed CMS uploading
* ![rev:64814] call $this->extend('updateFieldLabels', $labels) in FieldLabels() to get its decorator's customized field labels
* ![rev:64778] Removed scrubbing of the HTML
* ![rev:64768] #2957 - Fixed entity decoding in Convert::html2raw
* ![rev:64760] Fixed bug in tinymce_ssbuttons plugin inclusion
* ![rev:64759] Added LinkText field to link inserter
* ![rev:64684] Removed sapphire/images/fe_icons - these will be put in the userforms module instead, where the FieldEditor
* ![rev:64470] Removed junk text from CSSContentParserTest
* ![rev:64368] HTTP:add_cache_headers() - don't throw warning when not passed
* ![rev:64345] dquote> API CHANGE: HTTP::add_cache_headers() now designed to manipulate an HTTPResponse object rather than add headers directly
* ![rev:64343] Removed TextField_Disabled - this is unnecessary
* ![rev:64340] Included jquery.js before prototype.
* ![rev:64339] Implemented a jQuery based version of documents.getElementsBySelector
* ![rev:64326] API: add CurrencyField_Readonly
* ![rev:64325] API: add funcion TableField_Item::IsAddRow()
* ![rev:64324] Feature: attach extraClasses to a FormField when it is transform to readonly
* ![rev:64323] API: add TextField_Disabled
* ![rev:64152] Removed #! entry from cli-script.php; its unreliable and cli-script.php should be called as 'php cli-script.php' instead
* ![rev:64070] ENHANCMENT Making ModelAdmin translatable (#2874)
* ![rev:63938] Improved backtrace generation in test reporter, to limit the amount of unnecessary waffle.
* ![rev:63912] BGFIX: #2587 Fix HTTPS detection on IIS (mackeyn)
* ![rev:63904] BGFIX: #2527 - Fix mysql version detection on hosts with custom mysql version names (HakTom)
* ![rev:63892] Added PHP doc for the ValidationException thrown by DataObject::write
* ![rev:63891] DataObject::write now throws a ValidationException rather than calling user_error if the call to DataObject::validate fails. This allows the validation exception to be caught and handled by tests or other controllers.
* ![rev:63883] Added missing TableListField_printable.ss template.
* ![rev:63882] Corrected reverted merge. ComplexTableField::setPopupSize is now present.
* ![rev:63843] Removed legacy Report.php
* ![rev:63842] BUGF Renamed Report class to SSReport, file name wasn't altered but class name was
* ![rev:63837] Updated Member's getCMSFields() to consistently work with fields in a tab
* ![rev:63821] Moved error_reporting setting from main.php to Core.php
* ![rev:63820] Removed relational CTFs reliance on DataObject->ClassName
* ![rev:63807] Merged from branches/nzct-trunk. Use 'svn log -c `<changeset>` -g' for full commit message. Merge includes stability fixes and minor refactor of TableListField and ComplexTableField.
* ![rev:63806] Merged from branches/nzct-trunk. Use 'svn log -c `<changeset>` -g' for full commit message. Merge includes stability fixes and minor refactor of TableListField and ComplexTableField.
* ![rev:63748]
* ![rev:63745] Updated Member::isInGroup() to function as well as being deprecated
* ![rev:63733] Added get data to a form submission of SearchForm/search, so that ResultAssembly is passed
* ![rev:63715] Updated errorMessage() call in ModelAdmin to actually show the message to the user. For example, 404s return messages of the form 'your search returned no results'
* ![rev:63636] Added instructions to try and prevent #2901 issues reoccurring
* ![rev:63625] ENHANCMENT Using errorMessage() instead of statusMessage('bad') for ModelAdmin.js
* ![rev:63594] Fixed FormField::createTag() generation for empty `<select>` tag, which meant that page version history was displayed in single-language mode
* ![rev:63583] Updated file functions to use HTTPRequest::send_file
* ![rev:63582] Added tests for security group export
* ![rev:63580] Break sake dev/tests/all status dots onto lines of 80
* ![rev:63552] Updated BankAccountField to allow setting it to blank without a notice-level error
* ![rev:63548] #2397 - Fixed HTMLEditorField style dropdown
* ![rev:63546] Added groups field on member details, so that you can add members to other group
* ![rev:63545] Added dev/modules/remove and cleaned up rebuilding code on add and remove module
* ![rev:63537] Fixed dumb error in my makeRelative change
* ![rev:63535] Added security for experimental module manager
* ![rev:63534] Added initial module manager API, with the capability of adding a module to svn:externals
* ![rev:63532] Secured SapphireInfo
* ![rev:63531] ENHANCMENT Checking for valid has_one relationship on dot-notation-usage in DataObject->update
* ![rev:63506] Don't claim that there's an invalid password if no password is set - members may be created for newsletters, etc.
* ![rev:63488] fixed fix position of action area (status message and ajax action buttons) in IE6 using javascript
* ![rev:63452]
* ![rev:63431] Fixed bug in cli-script argument parsing
* ![rev:63389] Reverted r63388
* ![rev:63388]
* ![rev:63383] removed debug::show
* ![rev:63382] - commented out this.style.position = "absolute"; in LeftAndMain.js
* ![rev:63251] Reverted en_US.php changes from r63249
* ![rev:63113] Turned dos line endings into unix
* ![rev:63078] Link Editor: Close button dissapears in Firefox 3 (#2478)
* ![rev:63020] EHANCEMENT #2853 - You can now use db/build instead of db/build?flush=1
* ![rev:62998] Fixed bug with ComplexTableField inappropriately referencing a relation field that doesn't exist
* ![rev:62912] Added status notifications to cli test runs
* ![rev:62866] Corrected layout of field groups
* ![rev:62865] Replaced alert()s in UniqueFields.js with statusMessage()s, to be less obnoxious
* ![rev:62756] Fixed bug publishing homepage using Director::test
* ![rev:62692] Added CountryDropdownField::defaultToVisitorCountry(false):
* ![rev:62689] Removed save button from add form
* ![rev:62654] Update test runner so that password validation config isn't tested by default
* ![rev:62653] This results in more reliable log-in redirection
* ![rev:62648] Fixed bug with preivous CheckboxSetField change
* ![rev:62641] Fixed loadDataFrom for CheckboxSetFields that are used to edit a many-many relation, if loadBlanks is set to true
* ![rev:62599] comment Debug.traceback that occur when the field is a tab
* ![rev:62386] Added empty string as a default (first item)
* ![rev:62335] Improved ModelAdmin.js - removed formData and showRecord, creating .fn('loadForm') instead; used livequery more to reduce the amount of behaviour reapplication that was necesary.
* ![rev:62334] Updated ModelAdmin's javascript to provide more status indicator (loading icons, success/failure messages), using HTTP status codes and custom status text.
* ![rev:62331] Fixed ConfirmedPasswordField validation for min password length
* ![rev:62325]
* ![rev:62324]
* ![rev:62322] Merged branches/roa into trunk
* ![rev:62321] Merged branches/roa into trunk
* ![rev:62318] Add another test for addFieldToTab when creating tabs
* ![rev:62312] SearchContext generates SELECT DISTINCT query rather than SELECT, so that duplicate records aren't shown as a result of certain search filters
* ![rev:62311] MemberTableField delete just removes the member from the group
* ![rev:62310] Fixed MemberTableField ajax actions after a search
* ![rev:62295] Allow MetaTags to be extended by a decorator.
* ![rev:62287] Introduce notion of using HTTP status text to pass status message to the end user
* ![rev:62278] Reorganised ModelAdmin javascript to be better structured
* ![rev:62268] Fixed bugs with #1403 changes made in r62218.
* ![rev:62267]
* ![rev:62213] Made allowed_actions case insensitive
* ![rev:62188] Null values fixed for PHP 5.3
* ![rev:62184] Multiple 'protected' variable declaration fixed
* ![rev:61826] disabled (simon_w)
* ![rev:61721] Show result-assembly columns so that you read down the column instead of zigzagging
* ![rev:61720] Removed Created from member summary fields
* ![rev:61714] adding ?flush=all option which clears all cached templates from the LOLCACHE
* ![rev:61698] Updated CSV bulk loader to import unix/windows files on a mac server
* ![rev:61685] TESTS: Added tests for Controller::join_links()
* ![rev:61634] Windmill test - whacked up timeout on CMS load for slow build slave
* ![rev:61631] Fixed setup of windmill admin tests
* ![rev:61630] Disabled across-the-board use of windmill tests in continuous integration; instead a specific build is set up for it
* ![rev:61629] Included windmill testing in the continous integration again
* ![rev:61628] Fixed glitch in test
* ![rev:61626] Updated windmill tests to use python syntax, as this will scale better
* ![rev:61614] Fixed bugs in MemberTableField search
* ![rev:61613] Fixed bug in TableListField::ajax_refresh
* ![rev:61578] added a call to magic method to check extra (crm) permission
* ![rev:61525] Added EPMU's process control sake
* ![rev:61523] add Created as summary_fields
* ![rev:61511] The searchCriteria will be added as $_GET to the form action, rather than that TableListField's extraLinkParams
* ![rev:61509] getSummaryFields() will also get those summary fields defined in Member's decorator applied to the results and export
* ![rev:61497] Reverted r61492
* ![rev:61462] Improved File tests
* ![rev:61461] Fixed coverage reporting on test runner
* ![rev:61411] Fixed saving of TableField and added tests
* ![rev:61410] Better error message if you have forgotten to set fixture_file
* ![rev:61370] Undeprecated a critical feature of TableField, and reimplemented in the Group's permission field. Cleaned up its implementation to be more in line with TableListField
* ![rev:61351] Fixed display of Permission dropdown in SecurityAdmin
* ![rev:61344] Fixed bug with manifest generation
* ![rev:61184] Merged branches/kiwiselect into trunk
* ![rev:61155] field, changed to "MenuTitle" to be consistent with the main CMS site tree and to avoid confusion
* ![rev:61152] Work to decouple the ManifestBuilder from the database, so that you can run manifest builder tests without an active database existing
* ![rev:61151] introduce double scrolling and thus poor usability
* ![rev:61136] Fixed bug with CsvBulkLoader
* ![rev:61135] uncommmented processRecord that process each record because it was mistakenly commented previously
* ![rev:61123] $resultsCount now gets int value from loader directly instead of DataObjectSet
* ![rev:61122] change the return type of processAll of CsvBulkLoader from DataObjectSet to int, the number of affected row
* ![rev:61120] modified csv import function documention. It returns number of affected records.
* ![rev:61067] Made some methods on SearchFilter public so that SearchFilters can be co-opted for other purposes. Really, moving the magic to a DataQuery object would be better
* ![rev:61066] Fixed action handlers on fields of ResultsForm (notably the TableListField) by adding querystring arguments to the Link() of the form.
* ![rev:61065] Fixed bug in TableListField sort links
* ![rev:61064] Fix FormField::Link() to allow querystrings in the form's action
* ![rev:61063] Turn off default caching
* ![rev:61056] Added back button to ModelAdmin detail views
* ![rev:60937] Removed double quoute from the from fields as it means field terminator
* ![rev:60913] Updated AssetTableField to work with ComplexTableField updates
* ![rev:60912] Fixed bug in Member::mapInCMSGroups()
* ![rev:60911] Reverted Folder::CanEdit() to its original behaviour; that of returning a many-many join. Note that this conflicts with DataObject::CanEdit() now.
* ![rev:60910] Added ComplexTableField::getCustomFieldsFor() that you can overload in subclasses of ComplexTableField to create alternative pop-up forms
* ![rev:60909] Added table references to many-many join used by scaffolder, to remove 'ambiguous column' bugs
* ![rev:60907] replaced `<br />` with newline for CSV export
* ![rev:60886] Removed memory limit for publication
* ![rev:60885] Added warnings for parts of Member that require the newsletter module. Note that this code should really be moved to the newsletter module at some stage.
* ![rev:60874] Made all sapphire/thirdparty classes _manifest_exclude'd
* ![rev:60873] Renamed illegal function that was hiding in Time.php
* ![rev:60870] Removed time-limit for publication process
* ![rev:60841] Fixed page comment system for new URL handler
* ![rev:60830] Fixed saving of blank values to the has_one relations on versioned objects
* ![rev:60829] Fixed HasManyComplexTableField and ManyManyComplexTableField in trunk
* ![rev:60789] Fixed layout of CMS RHS panel to suit new form HTML structure
* ![rev:60779] Fixed bugs with Image upload fields
* ![rev:60778] Trap potential data-integrity bug
* ![rev:60717] Ensure that a theme template is tried before getting a non-theme template
* ![rev:60711] Added logging of SSViewer and Controller behaviour when using ?debug_request=1
* ![rev:60664] Added tests for CheckboxSetField
* ![rev:60612] Removed notice level error when ArrayLib::valuekey() is passed an empty array
* ![rev:60608] Correct line numbers in error source fragment view
* ![rev:60607] Ensure that MySQLDatabase::tableList() always returns an array
* ![rev:60606] Fix error in Geoip when REMOTE_ADDR isn't set
* ![rev:60605] Include full traces in unit test failures, for easier debugging
* ![rev:60604] Removed unnecessary chatter from test runner
* ![rev:60603] Improved db/build output for CLI
* ![rev:60602] Removed junk output from stderr
* ![rev:60601] Added Debug::get_rendered_backtrace() for rendering backtraces from other contexts (such as exceptions)
* ![rev:60597] Improved performance of testrunner so that it doesn't create a new database for each test, instead only once per test run.
* ![rev:60592] Removed warning when session_regenerate_id can't be set. It's not strictly necessary and just causes testing headaches
* ![rev:60586] Passed controller argument to ChangedPasswordForm constructor
* ![rev:60582] Fixed MemberAuthenticator::authenticationFailedUnknownUser code
* ![rev:60581] Improve CLI use of Debugging tools and test execution.
* ![rev:60579] Removed code that used 2nd arg as HTTP_HOST value, in favour of more robust $_FILE_TO_URL_MAPPING
* ![rev:60578] Add checks to see if REMOTE_ADDR is set before making use of it.
* ![rev:60577] Improvements to better allow for CLI-based testing
* ![rev:60575] Ensure that IP-based security can't be bypassed if an IP address isn't set.
* ![rev:60572] Improved DataObjectTest to use more helpful assertions
* ![rev:60571] Blocked [rev:47113].
* ![rev:60570] Merged [rev:47110]: Hack fix for an email validation problem. Needs better solution.
* ![rev:60569] Blocked [rev:47109].
* ![rev:60568] Merged [rev:47108]: Ajax requests no longer trigger the audit trail hook in LeftAndMain::init.
* ![rev:60567] Merged [rev:47107]: Added audit logging hook.
* ![rev:60563] Fixed bug in Requirements::clear()
* ![rev:60561] Blocked [rev:47106].
* ![rev:60560] Merged [rev:47105]: Fixed a typo.
* ![rev:60558] Blocked [rev:47104].
* ![rev:60557] Merged [rev:47103]: MemberTableField.js now uses named sheets.
* ![rev:60556] Merged [rev:47102]: Optimization for Behaviour sheets that allows you to provide a unique identifier so that duplicate sheets aren't applied twice.
* ![rev:60555] Changed Debug::loadErrorHandlers to use value returned by error_reporting() rather than E_ALL. This way, the user can adjust the error handler screens with the error_reporting function.
* ![rev:60548] Merged [rev:47101]: Adds class=action to action cells in MemberTableField.
* ![rev:60546] Merged [rev:47094]: Fixes Session IP addresses in reverse order.
* ![rev:60544] Blocked [rev:47093].
* ![rev:60543] Refactored [rev:47092]: Add TableListField::getCastedValue
* ![rev:60536] Merged [rev:47091]: Added Round and NiceRound to Float.
* ![rev:60529] Refactored [rev:47088]: File::getFullPath now compares the filename with Director::baseFolder and returns filename if the filename stars with Director::baseFolder.
* ![rev:60526] Blocked [rev:47084]: Needs refactoring for new Sapphire code which provides similar functionality.
* ![rev:60522] Refactored [rev:47082]: Modified Member::mapInCMSGroups to make use of CMSMain::providePermissions.
* ![rev:60515] Merged [rev:47081]: Modified construction of manifest to allow custom definition of MANIFEST_FILE constant filename in _config.php.
* ![rev:60514] Merged [rev:47080]: Fix for pagination when using customSourceItems in TableListField.
* ![rev:60512] Merged [rev:47079]: Fix for template logic.
* ![rev:60511] Refactored [rev:47078]: AccessLogEntry will be created via an object extension.
* ![rev:60510] Blocked [rev:47074] to [rev:47077].
* ![rev:60509] Merged [rev:47074]: Added register and unregister as aliases to Authenticator.
* ![rev:60508] Merged [rev:47073]: Fix for pagination in TableListField::sourceItems.
* ![rev:60507] Blocked [rev:47072]: Changeset needs to be refactored so Session logging isn't strictly required.
* ![rev:60506] Merged [rev:47071]: Added Session::get_timeout.
* ![rev:60505] Blocked [rev:47070].
* ![rev:60504] Merged [rev:47069]: Replaced explicit calls to AccessLogEntry::create with more flexible calls to extensions. AccessLogEntry to be refactored into separate module.
* ![rev:60498] Refactored [rev:47068]: Member::logOut now calls memberLoggedOut on any extensions on Member.
* ![rev:60491] Blocked [rev:47065] to [rev:47067].
* ![rev:60490] Merged [rev:47064]: Set 'show' as the default action for ComplexTableField.
* ![rev:60488] Blocked [rev:47062].
* ![rev:60487] Merged [rev:47061].
* ![rev:60486] Merged [rev:47060].
* ![rev:60485] Merged [rev:47059]: Session expiry times can now be set based on the client's IP address.
* ![rev:60481] Blocked [rev:47057] to [rev:47058].
* ![rev:60480] Merged [rev:47056]: Adds unique identifier when creating Behaviour rule sheets to prevent duplicate behaviours from being applied repeatedly.
* ![rev:60479] Merged [rev:47055]: Modified FormResponse to append Behaviour rules last.
* ![rev:60478] Blocked [rev:47047] to [rev:47054].
* ![rev:60477] Merged [rev:47046]: Minor optimisation to BankAccountField and added methods to get specific parts of the account number.
* ![rev:60474] Reverted accidental change
* ![rev:60473] Included regression test
* ![rev:60470] Ability to lock down comments to logged-in members only
* ![rev:60469] Merged [rev:47044]: Introduces modifications to Sapphire's form handling that allows it to ignore fields marked as Disabled when saving the contents of a form's fields to a DataObject.
* ![rev:60468] Merged changes from 2.2.2-assets - everything except the asset refactoring
* ![rev:60448] Allow object-methods to be used as columns in TableListField
* ![rev:60446] Fixed js error when defaultAction isn't set
* ![rev:60442] Reverted Hierarchy::extraDBFields() because it interfered with normal generation of the site hierarchy. Note that children(), stageChildren(), and liveChildren() cannot be simply labelled as relations because they are methods with a different semantic meaning. I recommend the use of something similar to to enable access to information beyond relations via the data formatters
* ![rev:60440] Refactored [rev:47041] to [rev:47043]: Moved to project-specific PhoneNumberField.
* ![rev:60437] Refactored [rev:47040]: Functionality moved to project-specific Member subclass.
* ![rev:60433] Merged [rev:47039]: Introduces custom actions to TableListField and ComplexTableField. By default, the show, edit and delete actions are included.
* ![rev:60431] API Change: Turned Requirements::clear_combined_files() into Requirements::delete_combined_files() and Requirements::clear_combined_files()
* ![rev:60428] Fix test runner to show errors as well as assertion failures
* ![rev:60427] Updated SecurityTest to use new FunctionalTest system consistently
* ![rev:60426] Added FunctionalTest->autoFollowRedirection, so that redirection following can be disabled on a test by test basis
* ![rev:60425] Improved error checking in TestSession
* ![rev:60411] Fixed call to badly named static method
* ![rev:60394] Update SecurityTest to use the FunctionalTest base-class
* ![rev:60391] Improved robustness of MemberTest
* ![rev:60390] Improved Debug::backtrace() output
* ![rev:60385] Blocked [rev:47034] to [rev:47038].
* ![rev:60383] Merged [rev:47033]: TableListField::performReadonlyTransformation now sets show permission.
* ![rev:60377] Added argument checking to Controller::handleRequest()
* ![rev:60375] Set [REQUEST_URI] in cli-script for better error reporting
* ![rev:60362] Fixed URL handling for /dev after merge from branches/roa to trunk
* ![rev:60355] Fixed sake to pass cli-script error levels through
* ![rev:60354] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60353] (blocked bidirectional merge from trunk into branches/roa)
* ![rev:60352] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60348] Blocked [rev:47098] to [rev:47100].
* ![rev:60347] Blocked [rev:47020] to [rev:47026].
* ![rev:60346] Blocked [rev:47012] to [rev:47014].
* ![rev:60345] Blocked [rev:47006].
* ![rev:60343] Blocked [rev:46198].
* ![rev:60342] Blocked [rev:46193].
* ![rev:60341] Blocked [rev:47029].
* ![rev:60340] (blocked bidirectional merge from trunk into branches/roa)
* ![rev:60339] Blocked [rev:47027].
* ![rev:60338] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60336] (blocked bidirectional merge from trunk into branches/roa)
* ![rev:60335] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60334] Blocked [rev:46974] to [rev:47005].
* ![rev:60333] Blocked [rev:46960] to [rev:46972].
* ![rev:60332] (blocked bidirectional merge from trunk into branches/roa)
* ![rev:60331] (blocked bidirectional merge from trunk into branches/roa)
* ![rev:60330] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60329] Blocked [rev:46953] to [rev:46958].
* ![rev:60328] Blocked [rev:46951].
* ![rev:60327] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60326] Blocked [rev:46262] to [rev:46288].
* ![rev:60324] Blocked [rev:46261].
* ![rev:60323] Committing missing mergeinfo for [rev:47028] for ManifestBuilder and ComplexTableField.ss
* ![rev:60322] Blocked [rev:46192] and [rev:46197]
* ![rev:60321] (blocked bidirectional merge from trunk into branches/roa)
* ![rev:60320] (blocked bidirectional merge from trunk into branches/roa)
* ![rev:60319] (blocked bidirectional merge from trunk into branches/roa)
* ![rev:60314] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60311] Merged [rev:47028]: Encountered a problem with Form::formHtmlContent not always including javascript validation, so added a call to includeJavascriptValidation on the validator in Form::formHtmlContent. Also modified Validator to notify the form that the client-side validation JavaScript has already been included. This way it isn't included twice.
* ![rev:60307] Merged [rev:47019]: Actual merge in [rev:60309]
* ![rev:60303] Committing merge info for [rev:60309]: Merge was performed manually.
* ![rev:60302] Merged [rev:47018]: Some additions made to use Object::create to allow MemberTableField to deal with subclasses of Member. Also merged a modification to MemberTableField::__construct that allowed greater control over the details form's fields (defaults to same behaviour as trunk), and MemberTableField::DetailForm, although this might need to be removed later.
* ![rev:60290] (blocked bidirectional merge from trunk into branches/roa)
* ![rev:60289] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60287] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60281] (blocked bidirectional merge from trunk into branches/roa)
* ![rev:60279] (blocked bidirectional merge from trunk into branches/roa)
* ![rev:60278] (blocked bidirectional merge from trunk into branches/roa)
* ![rev:60276] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60268] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60266] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60265] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60264] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60261] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60259] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60258] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60257] Merged [rev:47017]: Modified behaviour for MemberTableField popups so that the behaviour is applied if the Security section uses a subclass of MemberTableField rather than an instance of MemberTableField.
* ![rev:60256] Committing missing svn:mergeinfo for [rev:46973].
* ![rev:60255] Merged [rev:47016]: Used Object::create to allow SecurityAdmin to use subclasses of MemberTableField to list members.
* ![rev:60236] removed duplicate RestfulServerTest files, they're already in /cms (merge error)
* ![rev:60235] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60234] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60233] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60232] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60231] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60230] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60229] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60228] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60227] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60226] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60225] (manually merged from branches/roa)
* ![rev:60215] blocked r54568
* ![rev:60214] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60212] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60211] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60209] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60208] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60207] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60206] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60205] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60204] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60203] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:60179] Merged [rev:47015]: Moved call to DataObject::write and makes use of DataObject::destroy.
* ![rev:60178] Improved behaviour of ViewableData_Iterator. It's not clear why, but this was causing a bug on our build slave. Maybe a PHP version difference?
* ![rev:60175] Merged [rev:47011]: Additional CSS for GenericDataAdmin.
* ![rev:60173] Merged [rev:47010]: Modified GenericDataAdmin::buildResultFieldValue to accept relations of the form: obj1.obj2...objN->MethodCall, similar to TableListField_Item.
* ![rev:60169] Merged [rev:47009]: Calls bind using Prototype Event.
* ![rev:60168] Merged [rev:47008]: Disables the create button while creating a new entry with GenericDataAdmin.
* ![rev:60167] Merged [rev:47007]: Fix to prevent GenericDataAdmin setting a status on a new record and thus overwritting a data field named 'Status'. Includes a fix for onclick on Ajax buttons if event is not passed.
* ![rev:60162] Merged [rev:46973]: Notes a correction that will need to be made in the future.
* ![rev:60137] Blocked [rev:46952]
* ![rev:60123] Merged [rev:46959]: Summary values calculated on server are shown in the summary row when displaying a ComplexTableField.
* ![rev:60108] Merged [rev:46289]: Committing the missing meta-data for sapphire.
* ![rev:59969] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:59927] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:59925] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:59923] (blocked bidirectional merge from trunk into branches/roa)
* ![rev:59922] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:59920] (merged from branches/roa. use "svn log -c `<changeset>` -g `<module-svn-path>`" for detailed commit message)
* ![rev:59897] r52080, r52101, r52102 (merged from branches/roa)
* ![rev:59890] r52079 (merged from branches/roa)
* ![rev:59876] Merged [rev:46959]: ComplexTableField.ss now includes server-generated values in summary row cells.
* ![rev:59875] Merged [rev:46289]: Spaces in SCRIPT_FILENAME are now replaced with underscores.
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/changelogs/2.4.0.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/changelogs/2.4.0.md
| 81,259 | 1,758,118,090 |
en
|
# 2.4.0 (2010-05-05)
## Overview
* Support for hierarchical URLs
* Support for MSSQL server database abstraction (via a separate module)
* A "SiteConfig" record stores site-wide settings and default permissions and author groups for pages
* "Permission Roles" are a simple way to combine multiple permission codes and assign them to groups in the Security interface. This makes permissions easier to maintain and less repetitive to set up.
* The CMS searches for broken internal links to other pages and broken file references, and highlights them in the WYSIWYG editor
* Dramatically reduced memory usage in CMS tree on larger sites (10,000+)
* Performance improvements around Object and ViewableData property access.
* Improved Shortcode API to allow for custom tag parsing in CMS content
* More fine-grained permission control for translators
* Improved unit test execution speed, increased number of tests cases by 30%
* Better XSS security of the autologin token by using HTTPOnly cookies, more secure brute force login restrictions
* Decreased memory usage in "Files & Images" section
* Support for SQLite and PostgreSQL databases (via separate module)
* Partial caching in templates, to allow for faster load times of certain aspects in dynamic pages.
* Upload controls in the CMS no longer require the Adobe Flash plugin, and work again on Mac OSX.
* File and page dropdown selections support inline searching, to make handling larger tree structures easier.
* Fixed password hashing design flaw, which makes SilverStripe databases more portable between different server architectures.
* Improved reporting API to unify the CMS sidebar reports and full-page reports on their own section. Its easier to add custom filters to reports.
* Batch action handling handles larger tree structures, provides better visual feedback, and respects permissions on individual pages.
* Global site configuration is translatable, meaning titles for your website can be in different languages without any switching in your templates.
* Allow selection of themes through the site configuration interface (in addition to changing the theme via configuration code)
* More fine-grained translation permissions: A group can be limited to only edit a certain language in the CMS.
* Added dropdown to choose from existing anchor links when inserting a link from the CMS sidebar.
* Team members can get permissions to see the draft version of a page in preview mode without requiring CMS access.
* Pages of type "Virtual Page" have improved stability in regards to their permission control, translation and publication.
* Improved broken link detection (''talk to Andy for more info'')
* Removed the jsparty/ toplevel folder, and moved all its dependencies into sapphire/thirdparty and cms/thirdparty
* More than 350 bugfix and enhancement commits, and 200 minor changes.
## Upgrading
In preparation for the pending release of 2.4.0 the following page contains all the information you need to know about
the changes that have been undertaken.
This page **doesn't include new features of 2.4.0** as such, just functionality that has changed or been removed since
2.3.
Before you start upgrading you should always backup your site directory and the database. Once you have a backup made
remove the ''cms/'', ''sapphire/'' and ''jsparty/'' folders then copy in the new ''cms/'' and ''sapphire/'' folders from
your 2.4 download.
### Removed jsparty
The rather unorganised top level ''jsparty/'' folder has been removed from the core distribution and files separated to
''cms/thirdparty'' and ''sapphire/thirdparty''. If your custom code referred to files in ''jsparty'' you will have to
update the links to the new location (either ''sapphire/thirdparty/'' or ''cms/thirdparty/'').
Thirdparty files which aren't used in any core features have also been removed such as jquery-validate. If you reference
any files at all from ''jsparty'' you should double check your paths.
### Removed Classes
As part of our effort to tidy the core product we have removed several classes which we believed didn't warrant
inclusion in the official release. They either were out of date functionality or superseded or just didn't justify
inclusion. Where needed we have moved the files to individual modules. Also note several field types which were due for
deprecating have been kept due to use within the CMS (''UniqueTextField'', ''UniqueRestrictedTextField''). These however
are going to be removed for the next major release.
| Class name | | Comment |
| ---------- | | ------- |
| ''AjaxFormAction'' | | |
| ''BankAccountField'' | | moved to [formfields_nz](http://open.silverstripe.org/browser/modules/formfields_nz) module |
| ''CalendarDateField'' | | use ''DateField'' with ''setConfig('showcalendar', true)'', moved to [legacydatetimefields](http://open.silverstripe.org/browser/modules/legacydatetimefields/trunk) module |
| ''CompositeDateField'', ''DMYDateField'' | | use ''DateField'' with ''setConfig('dmyfields', true)'', moved to [legacydatetimefields](http://open.silverstripe.org/browser/modules/legacydatetimefields/trunk) module |
| ''ConfirmedFormAction'' | | |
| ''DMYDateField'' | | |
| ''DropdownTimeField'' | | use ''TimeField'' with ''setConfig('showdropdown', true)'', moved to [legacydatetimefields](http://open.silverstripe.org/browser/modules/legacydatetimefields/trunk) module |
| ''Email_Template'' | | use ''Email'' instead |
| ''GhostPage'' | | |
| ''GSTNumberField'' | | moved to [formfields_nz](http://open.silverstripe.org/browser/modules/formfields_nz) module |
| ''HiddenFieldGroup'' | | |
| ''PDODatabase'' | | |
| ''PermissionDropdownField'' | | |
| ''PopupDateTimeField'' | | use ''DatetimeField'', moved to [legacydatetimefields](http://open.silverstripe.org/browser/modules/legacydatetimefields/trunk) module |
| ''ReportField'' | | |
| ''TypeDropdown'' | | |
Some date/time field implementations were completely refactored, and their old implementations moved to the
[legacydatetimefields](http://open.silverstripe.org/browser/modules/legacydatetimefields/trunk) module:
| Class name | | Comment |
| ---------- | |------- |
| ''LegacyDateField'' | | old version of ''DateField'', renamed to avoid conflicts with new ''DateField'' |
| ''LegacyTimeField'' | | old version of ''TimeField'', renamed to avoid conflicts with new ''TimeField'' |
### Removed SWFUpload
SWFUpload has been removed from the core package due to ongoing issues with supporting it. The CMS Content Editors
upload has been rewritten to use jQuery so no 2.3 functionality has been lost but if your module made use of this
library, then you will need to bundle it within your module. Related files which have been removed as a side effect of
this - ''Upload.js'', ''TinyMCEImageEnhancements.js'', ''SWF_Upload.js'' and ''CMSMain_Upload.js''.
### Renamed Classes
We undertook some major work to reduce classname conflicts. Some classes have been namespaced with 'SS' to reduce
conflicts with other code. A couple notes - even though the classes have been renamed to ''SS_`<ClassName>` the class is
still contained within the ''ClassName.php'' file (no ''SS_'' prefix)
| Original class name | | New class name |
| ------------------- | | -------------- |
| ''Report'' | | ''SS_Report'' |
| ''HTTPRequest'' | | ''SS_HTTPRequest'' |
| ''HTTPResponse'' | | ''SS_HTTPResponse'' |
| ''HTTPResponse_Exception'' | | ''SS_HTTPResponse_Exception'' |
| ''Database'' | | ''SS_Database'' |
| ''Query'' | | ''SS_Query'' |
| ''SSDateTime'' | | ''SS_Datetime'' |
| ''Backtrace'' | | ''SS_Backtrace'' |
| ''Cli'' | | ''SS_Cli'' |
| ''Log'' | | ''SS_Log'' |
| ''LogEmailWriter'' | | ''SS_LogEmailWriter'' |
| ''LogErrorEmailFormatter'' | | ''SS_LogErrorEmailFormatter'' |
| ''LogErrorFileFormatter'' | | ''SS_LogErrorFileFormatter'' |
| ''LogFileWriter'' | | ''SS_LogFileWriter'' |
| ''ZendLog'' | | ''SS_ZendLog'' |
| ''HTMLValue'' | | ''SS_HTMLValue'' |
### Nested URLs enabled by default
When using our installer, the "nested URLs" feature will be enabled by default by a setting in *mysite/_config.php* (see
[blog
post](http://www.silverstripe.org/preview-of-silverstripe-2-4-hierarchical-urls-a-developer-community-contribution/)).
You can enable it manually for existing websites. Existing URLs will automatically change to the nested format without
republication (your old URLs should redirect automatically).
:::php
SiteTree::enable_nested_urls();
### SiteTree->Link() instead of SiteTree->URLSegment
Relating to the "nested URLs" feature, all *SiteTree* URLs should be accessed via *SiteTree->Link()* instead of using
the property *SiteTree->URLSegment* directly.
### Removed SiteTree::$add_action
''$add_action'' on Pages has been removed. If you want to define your own custom title for pages then you use
"`<myclassname>`.TITLE" in the i18n language tables instead or define your add action using ''singular_name()''
:::php
// using the lang tables
$lang['en_US']['RedirectorPage']['TITLE'] = "Redirector Page";
// using singular_name()
function singular_name() { return "Redirector Page"; }
### Removed dev/reset
Use ''dev/tests/startsession'' to create a new temporary database, or custom database tools like phpMyAdmin to
completely drop a database.
### Registering reports through SS_Report::register()
Removed ''ReportAdmin->getReportClassNames()'' in favour of ''SS_Report::register()'' to add custom reports to the CMS
(see [r98175](http://open.silverstripe.org/changeset/98175), [r98215](http://open.silverstripe.org/changeset/98215))
:::php
// in your _config file
SS_Report::register("SideReport", "SideReport_NameOfReport");
### Fulltext Search and Indexes disabled by default
As of SilverStripe 2.4.0, no search engine is included by default. If you want to use a search engine, you should
enable it with this command in your _config.php:
:::php
FulltextSearchable::enable();
This will add a *SearchForm()* and *results()* method in your *Page_Controller*, as well as set up common fields
like SiteTree.Content to be indexed.
Note: Results may vary with database drivers other than *MySQLDatabase*.
### Object Extension Instances
When working with extension instances directly on the extended object, please use the new *getExtensionInstances()*
getter. You need to manually call *setOwner($this)* before using the instance.
Base setup:
:::php
class MyExtension extends Extension {
function myExtensionMethod() { // ... }
}
Object::add_extension('MyObject', 'MyExtension');
Wrong:
:::php
class MyObject extends DataObject {
function myExtensionMethod() {
$ext = $this->extension_instances['MyExtension'];
return $ext->myExtensionMethod();
}
}
Right:
:::php
class MyObject extends DataObject {
function myExtensionMethod() {
$ext = $this->getExtensionInstance('MyExtension');
$ext->setOwner($this);
$ext->myExtensionMethod();
}
}
### HTMLEditorField (TinyMCE) stores content as UTF8 instead of HTML Entities
Prior to 2.4.0, the TinyMCE JavaScript library would store a subset of special characters as HTML entities (see [TinyMCE
Configuration](http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/entities)). SilverStripe expects UTF8 for user
input in the CMS, database storage as well as output. We have made this behaviour more consistent by converting the
TinyMCE entities back into UTF8 for database storage.
### MySQL character set to UTF8 on new installations
The MySQL character set for SilverStripe used to be the database default (often "latin1", sometimes "utf8"). While all
textual database columns created by SilverStripe have been storing their content as "utf8" already in earlier releases,
MySQL fulltext search might not return the desired results with special characters (see
[#3582](http://open.silverstripe.org/ticket/3582)).
For new installations with a MySQL database backend, this will be set automatically to "utf8" by the installer in
*mysite/_config.php*. For existing sites built with SilverStripe 2.3, add the following code to your
*mysite/_config.php*.
:::php
MySQLDatabase::set_connection_charset('utf8');
No conversion of existing database schemas or content should be necessary.
### MySQL 5.0+ or newer required
See [:server-requirements](/server-requirements).
### BASE_PATH constant
Use ''BASE_PATH'' and ''BASE_URL'' instead of data from ''$_SERVER'' to calculate the base script path.
### Interface Change: "Site Content" tab renamed to "Pages"
The headlines of the left-hand tree panels have been changed accordingly.
### Data Migration: Files and Images
Existing files and images inside the Assets folder may not be displayed when you visit the 'Files & Images' tab in the
CMS. If you get an error message when clicking through the folders in the site tree, this can be resolved by deleting
the content in the 'File' table in the database, and then clicking the 'Look for new files' button.
### Data Migration: User-defined forms
If you get errors in the User-define forms module, check that there is no column called 'CustomParameter' present in
either of the 'EditableFormField', 'EditableFormField_Live' or 'EditableFormField_versions' tables.
You need to login to your database management system (for example phpmyadmin) and delete the 'CustomParameter' column
from the EditableFormField table.
## Changelog
### Features and Enhancements
* [rev:104093] Add dev/build/defaults to call requireDefaultRecords
* [rev:103730] use FileSystem class to create cache directory to unsure the right permissions are set
* [rev:103710] MemberLoginForm::performLogin() now uses the authenticator_class variable set in subclasses of MemberLoginForm, without having to overload performLogin()
* [rev:103708] create cache directory when it does not exist before running the cache build test
* [rev:103581] Added i18n::set_default_locale() to set standard locale (which is different from "current locale" retrieved through i18n::get_locale())
* [rev:103466] make the getTree ajax call more generic so it get local from its containing form, rather than hard-coded "Form_EditForm_Locale" cos the field is not only used in "EditForm"
* [rev:103465] to make the FileIFrameField and TreeSelectionField easy to use in CMS with Translatable on.
* [rev:103328] Automatically checking all "CMS section" checkboxes in PermissionCheckboxSetField.js when "Access to all CMS interfaces" is selected. Saving these permissions individually also resolves certain edge cases like #5438.
* [rev:103250] added tests for checking the change password functionality, including the resulting redirection (from #5420)
* [rev:103229] allow ChangePasswordForm to redirect to BackURL (from #5420)
* [rev:103198] allow onAfterPublish and onBeforePublish handlers directly on Page classes (#5112)
* [rev:103047] allow to check for any changed fields on the DataObject, this is expected behaviour when isChanged function is called without parameters (#5421, patch by walec51)
* [rev:102899] added language (Ticket #5390)
* [rev:101871] Updated automatic regression tests (Salad)
* [rev:101670] RedirectorPage ExternalURL field now defaults to http:// to be consistent with the "Another website" option for HtmlEditorField LinkForm
* [rev:101661] tidied up installer process to streamline process. Moved requirements to top and button to bottom and added visual seperation of the individual steps
* [rev:101381] refactored requirements section to hide successful tests
* [rev:101378] Added links to installation introduction text for sources of help and suggested web hosts
* [rev:101246] Improved wording and styling in installer. Added links to server requirements, themes download, tutorial. Decreased vertical space before the "install" button to make it more obvious.
* [rev:101127] Added 'Dependent pages' tab to CMS, to show virtuals, redirectors, and backlinks that point to this page.
* [rev:101054] Allowing SQLite selection in installer
* [rev:101054] Moved all Javascript containedin install.php and config-form.html to install.js, and using jQuery to simplify logic
* [rev:101054] Allow installer to attach custom form fields based on the install driver (as defined in _register_database.php)
* [rev:100989] If no arguments specified for cli-script.php/sake, then provide a friendly message to the user on where to get help
* [rev:100966] MoneyField currency dropdown can be made from an associate array like array('NZD'=>'New Zealand Dollor', 'USD'=>"United States Dollor') as well
* [rev:100940] Added help text for "locale" setting in installer
* [rev:100937] Redirecting to translated page when original is requested with a 'locale' GET parameter (e.g. 'about-us/?locale=de_DE' will redirect to 'ueber-uns' with a 301 HTTP response). Implemented in ContentController->handleRequest(). (see #5001)
* [rev:100908] Added DatabaseAdapterRegistry::unregister() to remove a database from the registry
* [rev:100902] Added _register_database.php to sapphire which sets the SS provided databases for DatabaseAdapterRegistry
* [rev:100893] Added Hebrew (he_IL) language to sapphire (thanks Oren, Yotam, tzvika, Amir, ohad)
* [rev:100893] Added Lithuanian (lt_LT) language to sapphire (thanks Irmantas, Mindaugas, Donatas, Andrius)
* [rev:100892] Added Hebrew (he_IL) language to cms (thanks Oren, Yotam, tzvika, Amir, ohad)
* [rev:100892] Added Lithuanian (lt_LT) language to cms (thanks Irmantas, Mindaugas, Donatas, Andrius)
* [rev:100884] Using jquery.live instead of livequery for SelectionGroup.js
* [rev:100852] Updated jquery.ondemand.js to sapphire trunk version, to ensure compatibility with jQuery 1.4.2
* [rev:100849] Only defining document.getElementsByClassName() in prototype.js if no native implementation exists (which speeds up the CMS). Ported from 'jquery13' module, thanks Hamish
* [rev:100847] Updated jquery.livequery from v1.0.2 to v1.1.1 (located in sapphire/thirdparty/jquery-livequery/
* [rev:100846] Updated jquery.metadata from ~v.1.0 to v2.1 (located in sapphire/thirdparty/jquery-metadata
* [rev:100845] Updated jQuery.form library from v2.08 to v2.40 (located in sapphire/thirdparty/jquery-form
* [rev:100844] Updated jQuery library from v1.2.6 to v1.4.2 (located in sapphire/thirdparty/jquery/
* [rev:100799] Creating default "Content Authors" group with limited rights if no other groups exist.
* [rev:100776] Better editing of roles through SecurityAdmin instead of a new "Roles" tab. Removed (previously unreleased) PermissionRoleAdmin. (see #4757)
* [rev:100774] Allowing custom popup requirements in ComplexTableField without subclassing through $requirementsForPopupCallback
* [rev:100771] Respecting SecurityAdmin::$hidden_permissions in PermissionRole->getCMSFields()
* [rev:100769] you can now choose your site locale at install time
* [rev:100753] Added 'updateImageForm', 'updateFlashForm', 'updateLinkForm' hooks to HtmlEditorField (the imageform hook was necessary to make the 'pixlr' module work) (see #3938)
* [rev:100696] show all database systems we support, along with messages if the user cannot use them. Also allow 3rd parties to register their own database classes to appear in this list.
* [rev:100536] Stored combined files in assets/_combinedfiles by default
* [rev:100529] Combined files now live in assets/.combinedfiles by default
* [rev:100528] #3387 Requirements now has a new static function called Requirements::set_combined_files_folder() for setting where the combined files should belong
* [rev:100453] #4599 DataObjectSet now uses more array functions instead of performing equivalent tasks - thanks simon_w!
* [rev:100423] Convert JSON functions now use the Services_JSON library where appropriate instead of custom code, and if json_decode() or json_encode() are available these are used
* [rev:100400] #5072 RSSFeed_Entry::rssField() now respects custom getters on the data class
* [rev:100327] allow ordering of page commented to be configurabled
* [rev:100058] AssetAdmin now uses Upload_Validator instead of setting the rules directly on Upload
* [rev:99954] you can now do coverage tests of single/multiple tests, or entire modules
* [rev:99942] fixed forward button underneath result form
* [rev:99929] #4787 Widget now respects updateCMSFields on extension classes so additional fields can be add (or existing ones removed)
* [rev:99845] #4043 Allow setting the from address for debug information in SS_LogEmailWriter - thanks Hamish!
* [rev:99841] #5024 Installer now checks that the user has entered a username and password correctly for the default admin, an additional button for re-checking requirements is now found at the bottom of the admin configuration section
* [rev:99841] Error messages for database AND admin configuration are now in the same place at the top of the installer
* [rev:99737] Allow DataObjectSet to remove duplicates based on any field (#5094, thanks mobiusnz) (from r99736)
* [rev:99692] Disabling/checking permission checkboxes in admin/security when 'ADMIN' permission is selected
* [rev:99690] Saving group relations on SecurityAdmin->EditForm()/RootForm() through TreeMultiselectField instead of hidden 'Group'/'GroupID' values (from r99579)
* [rev:99688] Saving MemberTableField through new 'Groups' field added in Member->getCMSFields(). (from r98882)
* [rev:99679] added new PageCommnet to yml so we have different amounts of moderated/unmodereated
* [rev:99677] Making setting optional in MemberTableField. Field instances without will list all members unfiltered, and remove members from the database rather than the group relation.
* [rev:99677] Allow disabling of 'inline add' formfields in a MemberTableField through setPermissions(array('inlineadd')) (from r98825)
* [rev:99667] Only show 'HTML Editor Config' dropdown in Group->getCMSFields() if more than one option exists
* [rev:99666] Showing checkboxes as disabled for inherited roles in Group->getCMSFields() (from r99597)
* [rev:99664] Added OptionsetField->setDisabledItems() to allow specifically disabling certain checkboxes
* [rev:99664] Added CheckboxSetField->setDefaultItems() to tick specified checkboxes regardless of the value passed (from r99596)
* [rev:99662] Showing (readonly) permissions for a Member record in admin/security popup (from r99586)
* [rev:99660] PermissionCheckboxSetField_Readonly (with all checkboxes disabled)
* [rev:99660] Added 'assigned to...' label to group permissions in PermissionCheckboxSetField - used in Member->getCMSFields() readonly permission view (from r99585)
* [rev:99658] Allowing PermissionCheckboxSetField to inspect multiple group records for existing permissions (from r99584)
* [rev:99648] View and select groups for a specific member via the member popup in admin/security (requires EDIT_PERMISSIONS) (from r98880)
* [rev:99361] Allow locale/dateformat specific reordering of day, month, year input fields in DateField
* [rev:99360] New DatetimeField class (form field wrapper composed of DateField andTimeField)
* [rev:99360] New DateField and TimeField form classes with more consistent API and easier localization
* [rev:99360] Using Zend_Date for DateField and TimeField, with more robust date handling, starting localization support. Set globally via i18n::set_locale(), or for a field instance through setLocale(). Note: Javascript validation is not localized yet.
* [rev:99302] SiteTree::batch_permission_check() populates its own cache (from r97900)
* [rev:99117] set file metadata on upload. (from r97780)
* [rev:99106] set file metadata on upload. (from r97780)
* [rev:99088] Add close link (from r97751)
* [rev:99080] Add Link to silverstripe navigator (from r97407)
* [rev:99069] added PageComment for CommentAdminTest
* [rev:99066] CommentAdmin unitest
* [rev:99047] Make navigator items more overloadable (from r97376)
* [rev:99046] Refactor links in $SilverStripeNavigator so modules can add extras (from r97299)
* [rev:98756] Added help texts for MemberImportForm and GroupImportForm (merged and rewritten from r98750)
* [rev:98737] Allow extension of LeftAndMain->getEditForm() (and subclasses) through a new updateEditForm() hook (see r98736 for additions to AssetAdmin and CMSMain)
* [rev:98736] Import groups from CSV in admin/security through the new GroupImportForm class (and GroupCsvBulkLoader) (merged and rewritten from r98711)
* [rev:98735] Allowing custom 'root forms' when id values '0' or 'root' are passed from the tree selection. (rewritten from r98710)
* [rev:98732] Import members and their group assignments from CSV in admin/security through the new MemberImportForm class (merged from r98708)
* [rev:98715] Added GroupCsvBulkLoader class to facilitate group imports with permission codes and hierarchy (merged from r94252)
* [rev:98714] MemberCsvBulkLoader for easy member import with group associations (merged from r94251)
* [rev:98713] Added BulkLoader->deleteExistingRecords(), removed unnecessary parameters from BulkLoader->load() (merged from r94250)
* [rev:98713] Decreased memory usage in BulkLoader->load() when deleting all records before importing (merged from r94250)
* [rev:98677] Added checkbox to switch off using the environment during install if it's available
* [rev:98659] #3903 Initial changes to installer to support selection of different database drivers
* [rev:98656] you can now pass arbitrary CURL options to the request() method of RestfulService.
* [rev:98469] Add HTMLCleaner abstract class, and Diff::cleanHTML()
* [rev:98428] Allow overriding TableListField_Item on TableListField by setting the property itemClass
* [rev:98268] Moved the log-in validation process from individual authenticators into Member->checkPassword() and canLogIn(), to allow more extensibility and control (trunk, 2.4).
* [rev:98219] roll batch permissions in to a generic function (from r97748)
* [rev:98211] batchactions can now implement confirmationDialog() to provide a custom confirmation dialog to the front end.
* [rev:98180] Allow for custom generation of SSReport::ID() for parameterised reports.
* [rev:98179] Removed broken links reports from sidebar (in anticipation of adding them to the main reporting area) (from r95954)
* [rev:98173] Improved look and feel for report filtering
* [rev:98165] Performance improvement to CMS load time with many pages. (from r95490)
* [rev:98159] added canAddTopLevel permission to SiteConfig to determine which users/groups can add pages to the root of the sitetree. (from r87279)
* [rev:98156] audit trails
* [rev:98156] ability to parameterize SSReport's (from r85903)
* [rev:98132] Allow sort descending as well as ascending. (from r96054)
* [rev:98110] Allow user theme selection through SiteConfig, falling back to SSViewer::set_theme() as a default if there are none selected
* [rev:98104] Improved TableListField header styling. (from r96028)
* [rev:98102] Add a function to give link to Live site (from r95948)
* [rev:98091] ManifestBuilder::get_manifest_info() now uses ManifestBuilder::get_themes() instead of doing it's own retrieval of available themes
* [rev:98080] Removed dev/reset, instead encouraging the use of dev/tests/startsession for tests.
* [rev:98080] Let people use dev/tests/startsession without a fixture, instead calling requireDefaultRecords
* [rev:98041] added support for MySQL data type SET used in MultiEnum FEATURE: added datetime helper functions
* [rev:98025] add 'view site tree as' functionality.
* [rev:97896] 2.4 tickets (#4670) new permission code to view draft w/o CMS access
* [rev:97895] 2.4 tickets (#4670), new permission code to view draft stage w/o CMS access
* [rev:97819] Allow ungrouped retrieval of Permission::get_codes() through new $grouped switch
* [rev:97793] removed the situation, when the user is left with empty search box and empty dropdown.
* [rev:97792] use Validator::get_javascript_validator_handler() to check if the handler is turned on before doing either js or php validation
* [rev:97765] Select the uploaded image after uploading by default. #4962
* [rev:97745] adapt the page dropdown based off the allowedChildren values
* [rev:97606] Added hover states to "Available widgets" boxes in the CMS for usability
* [rev:97602] Added visual elements to aid in the usability of the WidgetAreaEditor
* [rev:97601] CMS Editor Upload panel now loads the root files directly and allows the user to upload to the root assets dir
* [rev:97597] Changed menu title from "Site Content" to "Pages" to be consistent with other menu labels
* [rev:97597] Changed tree root node in CMS to get title from SiteConfig rather than defaulting to "Site Content"
* [rev:97597] Changed tree panel headline in CMS from "Site Content and Structure" to "Page Tree" to stay consistent with new CMS menu title
* [rev:97583] Don't set up the test db if database tests aren't being run. From: Sam Minnee
* [rev:97530] Adjusted "Available Widgets" column to be narrower than "Widgets currently used", allowing more space for configuring widgets
* [rev:97478] Member->requireDefaultRecords() no longer creates a default administrator based on $_REQUEST data. Moved functionality into Installer->install()
* [rev:97436] Updated Member->getMemberFormFields() to use scaffolding and to be in line with Member->getCMSFields(). From: Andrew Short (from r97401)
* [rev:97391] Add partial caching support to SSViewer.
* [rev:97390] Add aggregate calculation to DataObject, allowing (cached) calculation of Max, Min, Count, Avg, etc
* [rev:97389] Add cache factory that provides nice API over top of Zend_Cache
* [rev:97370] Allowing translation of SiteConfig (including toplevel permission groups)
* [rev:97207] Added ContentController->ContentLocale() to allow XHTML/HTML specific lang= attribute settings in custom template code (see #4858). Removed `<meta http-equiv="Content-Language"...>` tag in SiteTree->MetaTags().
* [rev:97207] Updated blackcandy theme to use new $ContentLocale attribute to set the locale of the current page (in Page.ss)
* [rev:97192] Added RestfulService::set_default_proxy() and RestfulService->setProxy() (#4637, thanks hamish)
* [rev:97031] upgrading the search functionality of the TreeDropdownTree with pluggable search function
* [rev:97028] include menu title in default search. PATCH via lubzee #4508
* [rev:97024] added Session::clearAll() functionality. ENHANCEMENT: Added Unit Tests covering Session API. MINOR: Tided up formatting in session class and included doc comments for API level documentation
* [rev:97018] Use tidied HTML in DataDifferencer
* [rev:97017] Try to tidy HTML using external libraries if available
* [rev:97011] Added TabIndex to FormActions. Ticket: #4905. PATCH: via keeny
* [rev:96821] Added applicable pages checks to delete from live, delete from draft, and publish (from r94775)
* [rev:96820] Added 'greyed out' status of batch action checkboxes while applicable pages are being loaded via ajax. (from r94774)
* [rev:96819] Update the checkboxes available to batch-actions to show only the applicable pages for that particular action.
* [rev:96800] Let LeftAndMain subclass canView() methods optionally redirect. (from r90018)
* [rev:96793] Renamed Author column to User in the page version history to better reflect that they might not have been authors, and just iniators of workflow actions. (from r89015)
* [rev:96792] Added new onRenameLinkAsset() handler to static publishing for better link rewriting. (from r89014)
* [rev:96778] Files and images section warns if you are deleting a file that is linked to
* [rev:96752] Recognise HTTP_X_FORWARDED_HOST header and use that in place of HTTP_HOST (from r93148)
* [rev:96668] Change to TreeDropdownField, giving it filtering behaviour as described in ticket http://open.silverstripe.org/ticket/3007 . Its disabled by default for legacy compatibility, but enabled for HtmlEditorField so that link editor is filterable for local links, via an extra boolean parameter on TreeDowndownField.
* [rev:96440] Add onLoad callback handler CMSLoadFunctions
* [rev:96049] Added Date::Rfc3339() for returning an RFC 3339 valid date format (from r96010)
* [rev:95418] added delete all link to page comments. Patch via #4427. Thanks walec51
* [rev:95194] added translatable support to mathspamprotection. PATCH via noini (#4755)
* [rev:94887] added several tests for PermissionCheckboxSetField, PermissionRole and Group
* [rev:94515] Improved layout of altercation message when called via CLI. Patch via simon_w #4373
* [rev:94423] Allow passing in an Exception object to SS_Log::log() in addition to an array describing the error context (line number, file, trace etc)
* [rev:94381] Added FunctionalTest::findAttribute() as a helper for getting an attribute from a SimpleXMLElement object by it's name
* [rev:94297] Added DataObjectSet::emptyItems() to remove all the items from the set - this is useful for when you are augmenting CMS and front end fields via updateCMSFields() and updateFrontEndFields() on a DataObjectDecorator
* [rev:94063] Added MultipleOf and Modulus methods to ViewableData - useful for templating work
* [rev:94062] Loading of tinymce_ssbuttons plugin via relative paths in HtmlEditorConfig rather than using the plugin name as a path spec (see r94060)
* [rev:94060] Added support for loading external plugins (with relative paths) in HtmlEditorConfig. This means relative paths can be separate from the plugin name, and fixes a bug where paths containing dashes were ignored by TinyMCE.init().
* [rev:94060] Changed sapphire/thirdparty/tinymce-advcode to use the original plugin name, and specify its relative path through HtmlEditorConfig instead.
* [rev:93771] Added parameter to DBLocale->Nice()
* [rev:93771] Added DBLocale->getNativeName()
* [rev:92879] Allowing to hide certain permission from showing in SecurityAdmin? through add_hidden_permission() (refactored from r92428) (from r92866)
* [rev:91576] Pluggable password encryption through PasswordEncryptor class (#3665) (merged from r90949)
* [rev:91496] added ability to upload images from site content pane. Merged via r9130, r91347, r91350, r91480
* [rev:91044] Added Session::destroy() as a means to remove the current session using session_destroy()
* [rev:91044] Added optional $sid parameter to Session::start() to start the session using an existing session ID
### API Changes
* [rev:103792] changed the modulus offset to 1 to correctly order sets
* [rev:102012] Changed MySQLFulltextSearchable class to FulltextSearchable (applies to all databases)
* [rev:102003] Disallow methods/actions in RequestHandler->checkAccessAction() which are implemented on parent classes (e.g. ViewableData and Object), unless access is controlled through $allowed_actions. This limits information exposure from getters used in template contexts.
* [rev:101833] Allow cached blocks within control and if blocks, as long as that control or if block is contained within an uncached block, not a cached block
* [rev:101155] Add option for DataObjectDecorator::onAfterSkippedWrite()
* [rev:101137] Partial cache adjustments - now supports nested cache blocks (which are independant of their containing cache block), conditionals to control if a given cache block is active, and includes hash of template code in key (so template changes mean cache is invalidated). Changes template control for cache block to `<% cached %>`, to which the now deprecated `<% cacheblock %>` is aliased, and an additional template control `<% uncached %>` has been added.
* [rev:101127] Added SiteTree::VirtualPages() and SiteTree::DependentPages() accessors.
* [rev:101119] Allow on_db_reset() methods on DataObjects as well as DataObjectDecortators
* [rev:101093] Replaced eval based creation of extension and field objects with Object::create_from_string().
* [rev:101093] Introduced new function Object::create_from_string() to instantiate an object from a string like 'Int(50)'
* [rev:101044] Made MySQL fulltext search optional, activated with MySQLFulltextSearchable::enable()
* [rev:101043] Pass the full extension string as the 2nd argument to DataObjectDecorator::extraStatics()
* [rev:100842] Upgraded jQuery UI from v1.6rc1 (r687) to v1.8rc3. This release prefixes all *.js and *.css files with 'jquery', so ui.core.js is now called jquery.ui.core.js.
* [rev:100842] Upgraded jQuery UI themes from v1.6rc1 to v1.8rc3. Removed 'flora' and 'default' themes, replaced with the 'base' and 'smoothness' themes found in the default distribution
* [rev:100718] Removed "auto-merging" of member records from Member->onBeforeWrite() due to security reasons - please use DataObject->merge() explicitly if this is desired behaviour (from r100705)
* [rev:100651] dbDataType function created
* [rev:100513] Refactored Requirements to use Requirements_Backend at all times - this makes testing far easier. Thanks tobych!
* [rev:100512] TreeDropdownField no longer requires your object to have the Hierarchy extension
* [rev:100503] Removed deprecated Email_Template class, please use Email instead!
* [rev:100498] Removed deprecated Image::loadUploaded() (deprecated from the parent::loadUploaded for which it called), please use Upload directly instead!
* [rev:100495] Removed deprecated File::loadUploaded(), please use Upload directly instead!
* [rev:100493] Removed deprecated function RootURLController::get_homepage_urlsegment(), please use RootURLController::get_homepage_link() instead!
* [rev:100492] Removed deprecated function SiteTree::get_by_url(), please use SiteTree::get_by_link() instead!
* [rev:100490] Removed deprecated methods DataObjectSet::filter_map() and DataObjectSet::map_multiple() - please use map() instead!
* [rev:100057] #5107 Upload now uses Upload_Validator to separate the validation rules from the File loading done in the Upload class
* [rev:99849] SiteTree::validURLSegment extendable (#5907)
* [rev:99360] Date/time parsing in DateField, TimeField and DatetimeField defaults to i18n::get_locale() ('en_US') instead of using en_NZ/en_GB specific parsing. Use i18n::set_locale('en_NZ') in mysite/_config.php to revert to old behaviour.
* [rev:99360] $timeformat constructor parameter in TimeField needs to be in ISO date notation (not PHP's date())
* [rev:99360] TimeField, DateField and related subclasses use Zend_Date for date parsing, meaning they're stricer than the previously used strtotime()
* [rev:99360] Removed DMYCalendarDateField and CalendarDateField, use DateField with setConfig('showcalendar')
* [rev:99360] Removed CompositeDateField, DMYDateField, use DateField with setConfig('dmyfields')
* [rev:99360] Removed DropdownTimeField, use TimeField with setConfig('showdropdown')
* [rev:99360] Removed PopupDateTimeField, use DatetimeField
* [rev:99360] Changed 'date', 'month' and 'year' HTML field names to lowercase in DMYDateField
* [rev:99360] Removed support for ambiguous date formats in DateField, e.g. '06/03/03'. Use DateField->setConfig('dateformat', `<format>`) to revert to this behaviour.
* [rev:99360] Removed $futureOnly flag from DateField, CalendarDateField etc., use DateField->setConfig('min') and DateField->setConfig('max')
* [rev:99119] Refactor Versioned so a single state is kept for stage, archived date, or any module specific reading modes (from r98161)
* [rev:99114] Use the same navigator items in the CMS that are used on the frontend (from r97395)
* [rev:99079] Use the same navigator items in the CMS that are used on the frontend (from r97395)
* [rev:99063] Let sitetree extensions prepopulate permisson cache for their own permissions. (from r98650)
* [rev:99051] Let any DataObjectDecorator define an on_db_reset() method that is called by tests, like in Versioned. (from r97734)
* [rev:98786] Installer now uses a database configuration helper class which isolates the logic of checking the database away from the installer, this interface can be used by other databases like MSSQL and PostgreSQL. The installer now looks for a specific file inside each database module, provided it's configured in install.php MySQL is provided by default, as it lives in sapphire
* [rev:98543] Made ComplexTableField not use Object::create() for item and popup classes to be consistent with TableListField. These can be overridden as itemClass and popupClass are public properties on ComplexTableField
* [rev:98373] HTTP::setGetVar() always returns absolute URLs. Use Director::makeRelative() to make them relative again.
* [rev:98373] HTTP::setGetVar() combines any GET parameters in PHP array notation (e.g. "foo[bar]=val") instead of replacing the whole array
* [rev:98224] Refactor Versioned so a single state is kept for stage, archived date, or any module specific reading modes (from r98161)
* [rev:98215] Introduced new API for SS_Report
* [rev:98191] Added SideReportWrapper to help you tailor report columns for the side reports.
* [rev:98191] Allow use of 'casting' option on side report columns.
* [rev:98191] Make 'title' optional on side report columns. (from r96272)
* [rev:98176] Removed SideReport class, use SSReport as the base-class for them instead.
* [rev:98176] Use SSReport::register(SideReport) to explicitly register reports on the LHS of the content view.
* [rev:98175] Added explicit registration of reports with SSReport::register() (from r95857)
* [rev:98159] Security::permissionFailure(); will no longer tell the client side JS to show the login box if the user is already logged in
* [rev:98101] Allow passing of an explicit map of dropdown items to a TreeDropdownField.
* [rev:98096] Refactored test for whether a SQLQuery can be sorted by a particular column into SQLQuery::canSortBy($fieldName) (from r95850)
* [rev:98056] Decimal now allows setting a default value properly
* [rev:97996] rename the class "Cache" to "SS_Cache" (ref ticket: #4997)
* [rev:97827] Added cancelSchemaUpdate() and doesSchemaNeedUpdating() to the Database class
* [rev:97819] Removed $blankItemText parameter from Permission::get_codes()
* [rev:97818] Removed Member::init_db_fields(), its no longer needed due to the Member.PasswordEncyrption property changing from an ENUM to Varchar.
* [rev:97797] Fixed i18n _t() calls without namespaces in template includes: They now default to setting the include filename as namespace, rather than the including template (#4915, #3400 - thanks Henk_Poley, jwalsoe, walec51)
* [rev:97731] Determine default BASE_PATH/BASE_URL from the __FILE__ content, so that the script that initiated the Sapphire process doesn't matter. This means that index.php doesn't need to manipulate those variables.
* [rev:97582] #4929: Add $class argument to DataObjectDecorator::extraStatics()
* [rev:97489] removed SWFUpload. Refactored Content Editors uploader to use standard uploader.
* [rev:97478] Security::setDefaultAdmin() no longer writes credentials to any Member database records (created through Security::findAnAdministrator(). This prevents outdated credentials when setDefaultAdmin() code changes after creating the database record (see #4271)
* [rev:97478] Security::findAnAdministrator() no longer sets 'Email' and 'Password' properties on newly created members. Removed the $username and $password argments from the method.
* [rev:97475] Moved GSTNumberField from sapphire/forms to new 'formfields_nz' module
* [rev:97474] Moved BankAccountField from sapphire/forms to new 'formfields_nz' module
* [rev:97270] Unique_identifier now accepted as the login requirement, allowing alternatives to 'Email'
* [rev:97207] Deprecated ContentController->LangAttributes(). Use ContentLocale() instead and write attribute names suitable to XHTML/HTML templates directly in the template.
* [rev:96988] #3600 Inconsistency in File::getURL() which returns an absolute URL, when it should be relative - please use getAbsoluteURL() instead for old behaviour
* [rev:96988] #3600 Image no longer has an explicit getURL() method, instead it inherits getURL() from File which returns a relative URL
* [rev:96824] Added capability for batch actions to indicate failure through red checkboxes (from r94868)
* [rev:96823] Added canView() to CMSBatchAction so that you could hide certain batch actions from some users. (from r94846)
* [rev:96821] Added applicablePagesHelper to CMSBatchAction to ease the process of creating new applicable page methods.
* [rev:96819] Allow for an applicablePages($idArray) method to be defined on a CMSBatchAction class. (from r94761)
* [rev:96810] Added FilesystemPublisher::getExistingStaticCacheFiles(), to help build caching logic methods. (from r91354)
* [rev:96809] Added numChildrenMethod argument to LeftAndMain::getSiteTreeFor()
* [rev:96756] Added canDeleteFromLive permission to SiteTree, separate from canPublish (from r93315)
* [rev:96751] Define VirtualPage::isPublishable() so that people know not to even request publication if it's not allowed. (from r93098)
* [rev:96749] Added DataObjectDecorator::cacheKeyComponent() to ensure that the cached behind DataObject::get_one() is appropriately specific (from r93095)
* [rev:96739] Added Hierarchy::numHistoricalChildren() and Versioned::get_including_deleted_query()
* [rev:96739] Added numChildrenMethod arg to getChildrenAsUL, markPartialTree, markChildren, markingFinished
* [rev:96734] Don't generate TestOnly DataObjects in the database immediately; instead let test developers specify them in SapphireTest::$extraDataObjects.
* [rev:96734] Added SapphireTest::resetDBSchema() (from r90054)
* [rev:96727] Renamed SapphireTest::set_up_once/tear_down_once to setUpOnce/tearDownOnce, and made them instance methods.
* [rev:96727] Added SapphireTest::$illegalExtensions and SapphireTest::$requiredExtensions for making tests depending on particular extension sets (from r89958)
* [rev:96725] Moved popupdatetimefields to pop up below the text field instead of next to the icon. (from r89914)
* [rev:94430] Group::addByGroupName() now creates the group if one does not already exist (from r83010)
* [rev:94178] Renamed ViewableData->SecurityID() to getSecurityID() in order to get its value loading through Form->loadDataFrom()
* [rev:94062] Changed cms/javascript/tinymce_ssbuttons plugin name to "ssbuttons" (see r94060)
* [rev:94062] Changed cms/javascript/tinymce_ssmacron plugin name to "ssmacron" (see r94060)
* [rev:93785] removed Director::Link(). Use Controller::join_links() instead
* [rev:93693] removed deprecated RestrictedText fields
* [rev:93687] removed deprecated LeftAndMain::add_menu_item. Use CMSMenu::add_menu_item()
* [rev:93685] removed deprecated extend calls (r93632). API CHANGE: removed fieldExists(). Use hasField() (r93633). API CHANGE removed listOfFields() (r93647). API CHANGE: removed Tag() and URL() from Image. Use getTag() and getURL(). BUGFIX: updated Image.php to use getTag() (r93639, r93646). API CHANGE: removed val(). Use XML_val() (r93650). API CHANGE: removed $add_action. Use singlar_name or lang tables (r93658). API CHANGE: removed ConfirmedFormAction (r93674). API CHANGE: removed ajax_render on CTF (r93679).
* [rev:93660] Removed ComponentSet::removeByFilter() since it's not flexible enough and fixed calls to this from HtmlEditorField::saveInto() to use custom code instead
* [rev:93640] Removed deprecated static function ContentNegotiator::disable() - it's disabled by default
* [rev:92878] Refactored hiding of Permissions added in r92428. Added PermissionCheckboxSetField?->setHiddenPermissions() (from r92865)
* [rev:92428] add the ability to remove some permissions specified by their code in the rendered field html of PermissionChecksetBoxField and full-covered unit tests of this ability.
* [rev:91612] Replaced BasicAuth::enable() with BasicAuth::protect_entire_site()
* [rev:91612] BasicAuth::requireLogin() no longer has an option to automatically log you in. You can call logIn() on the object returned, instead. (from r91603)
* [rev:91576] Deprecated Security::encrypt_passwords() (merged from r90949)
* [rev:91576] Deprecated Security::$useSalt, use custom PasswordEncryptor implementation (merged from r90949)
* [rev:91576] Removed Security::get_encryption_algorithms() (merged from r90949)
* [rev:91576] MySQL-specific encyrption types 'password' and 'old_password' are no longer included by default. Use PasswordEncryptor_MySQLPassword and PasswordEncryptor_MySQLOldPassword
* [rev:91576] Built-in number of hashing algorithms has been reduced to 'none', 'md5', 'sha1'. Use PasswordEncryptor::register() and PasswordEncryptor_PHPHash to re-add others. (merged from r90949)
* [rev:91048] Added Lower and Upper methods to Varchar, Text, and Enum
* [rev:90963] Allow fieldList arguments to Form::loadDataFrom() and Form::saveInto(), for situations where the data passed only applies to a segment of the form. (from r90872)
* [rev:90962] Inserting $HiddenFields into a form template will show the input tags of all the hidden fields. (from r90871)
### Bugfixes
* [rev:104063] ViewableData->castingClass() cuts off last character of a casting definition if it has bracketed arguments (fixes #5536, thanks ajshort)
* [rev:104016] SecurityTest tests would fail on sites which had set a non-default unique identifier field for Members
* [rev:103961] Bypass static caching through static-main.php when GET or POST parameters are set (regression from 2.3 API, fixes #5519, thanks ktauber)
* [rev:103960] Fixed publication of homepage with '/' URL through StaticPublisher (fixes #5514, thanks ktauber)
* [rev:103957] Fixed Database->requireTable() for Mysql 4.1 (fixes #5517, thanks gw0)
* [rev:103936] Fixed double pragma after referer redirection on forms with Form->httpSubmission() (fixes #5509, thanks ktauber)
* [rev:103933] login BackURL wrong when using nested urls (fixes #5520, thanks ktauber)
* [rev:103932] Fixed SS_Report::unregister() parameter naming (fixes #5511, thanks ktauber)
* [rev:103912] Trimming expected output of WebserverRoutingTest (newlines before the "ok" string were causing failures on PHP 5.3)
* [rev:103910] Disabled MemoryLimitTest for environments where memory_limit can't be freely set (e.g. PHP with suhosin patch)
* [rev:103851] table and column names now quoted properly
* [rev:103803] Rebuilding test database for postgresql in SearchFormTest and TranslatableSearchFormTest to avoid stale index information in the database
* [rev:103745] static publisher for a site that resides in a subfolder of webroot
* [rev:103734] Fix linkCount .js in AssetAdmin deleteRecord (ticket #5486)
* [rev:103706] Use correct quoting for BrokenLinksReport (ticket #5474)
* [rev:103674] #5485 PermissionCheckboxSetField javascript would always uncheck all CMS_ACCESS_* permission checkboxes on initialize event
* [rev:103620] Fixed ordering by aggregate columns for DataObject::get() calls with joins.
* [rev:103613] Fixed unlimitedRowCount() for grouped queries
* [rev:103612] Ensure that group by of many-many queries with extraFields is set correctly.
* [rev:103591] ModelAsController test failed for projects which do not support nested urls. This fix stores the original configuration and enables 'nested-urls' at the beginning of the tests and reset the state in tearDown.
* [rev:103588] #5362: Fixed duplicate removal on DataObject:get() with join argument for all databases.
* [rev:103582] Choosing i18n::default_locale() in Member->populateDefaults() instead of "current locale". This fixes a bug where a new member created through admin/security automatically "inherits" the current locale settings of the admin creating it.
* [rev:103552] CSSContentParser now reports better errors by using simplexml_load_string() instead of SimpleXMLElement directly
* [rev:103519] Prevent duplicate HTML IDs in ModelAdmin
* [rev:103518] Fixed redirection in PageCommentInterface to use Link() instead of URLSegment (fixes 4200, thanks ktauber)
* [rev:103461] Renamed Nested URLs are automatically redirected to their new location with 301 HTTP status code in ModelAsController/ContentController (fixes #5393, thanks cbarberis)
* [rev:103451] Fixed CurrencyField->jsValidation() regex escaping (fixes #5462, thanks mobiusnz)
* [rev:103450] DateField with setConfig('dmyfields') now validates TRUE for empty values (fixes #5458)
* [rev:103448] Allow EDIT_SITECONFIG permission selection in admin/security (fixes #5459)
* [rev:103341] Don't show error when adding default SiteConfig records after upgrading a site.
* [rev:103336] Using try/catch in MemberTableField->saveComplexTableField() similiar to parent implementation, which means trying to save a Member duplicate doesn't end up in a fatal error (fixes #5444)
* [rev:103255] static publishing now uses the last non-null theme, OR the value defined in StaticPublisher::static_publisher_theme.
* [rev:103240] r101093 broke casting of values from the failover object. Add lookup to the failover for casting info, and add test
* [rev:103226] made the invalid password message translatable; disallow new blank password (as it makes it impossible to login); Member::checkPassword now returns ValidationResult - handle that properly (#5420, patch submitted by walec51)
* [rev:103214] the decorator was not completely removed, which caused trouble for tests running later in the same batch
* [rev:103183] default sort column now quoted
* [rev:103182] default sort column now quoted
* [rev:103127] realtime publishing now enabled by default
* [rev:103099] Only replace double slashes in SS_HTTPRequest->__construct() for relative- its a failsafe against wrongly formatted URLs like 'admin//assets' instead of 'admin/assets', but breaks absolute URLs with 'http://' prefix
* [rev:103092] disallow numeric actions - numeric array indexes are incorrectly picked up as allowed actions (#5331)
* [rev:103083] make the javascript-producing functions behave in the same way. Now they will return a javascript snippet and the caller is responsible for adding it to a FormResponse. Removes the duplication in AJAX response which happened when FormResponse::add has been used before the call to JS helper functions (#5359)
* [rev:103037] correct mollom field mapping
* [rev:103012] added optional separator for http_build_query in HTTP:setGetVar(). this fixes sorting columns in ModelAdmin (ticket #5325).
* [rev:102730] Fixing RquestHandler->checkAccessAction() on PHP 5.2 - ReflectionMethod->class returns inconsisent results in older PHP versions. (see r102003)
* [rev:102712] Fixed CTF sorting in ModelAdmin results (was failing because of missing 'ResultAssembly' GET parameters
* [rev:102686] Float should always be not null and default 0 in the database
* [rev:102545] Using i18n::get_locale() in ContentController->ContentLocale() to ensure the correct locale can be used in templates withouth Translatable enabled (broken in r97207, thanks DesignCity) (from r102544)
* [rev:102460] #5316 Float and Double should never try to save NULL as the "null" value
* [rev:102436] #5320 ManyManyComplexTableField::getQuery() now uses T-SQL compatible syntax CASE WHEN instead of IF THEN which works in multiple databases as well
* [rev:102386] delete from published site never calls canDeleteFromLive(). (via marcus #5364)
* [rev:102320] fixed invalid HTML output from page comments template
* [rev:102300] SSViewer now allows cli to do a flush on non-dev environments
* [rev:102265] Fix Salad tests
* [rev:102237] exchanged MySQL CONCAT function with ANSI compliant operator
* [rev:102160] allow HTMLEditorFields to save in SiteConfig, fixes #5246
* [rev:102156] fallback to the standard authenticator before throwing user_error as in some cases auth method is not passed back to the login form
* [rev:102094] Fixed bug with SiteTree::onBeforeWrite() that broke subsites.
* [rev:102084] #5343: Call DataObject::onBeforeWrite only once for SiteTree
* [rev:102081] #5337: Allow decoration of DataObject
* [rev:102074] Fixed SiteTree::page_type_classes() to exclude 'SiteTree' even if on array position 0 - slight difference in return values from Postgres to MySQL (fixes #5336)
* [rev:102072] Logging in with an invalid email returns no error message (fixes #5332, thanks ajshort)
* [rev:102038] #5255 LeftAndMain should include the correct editor.css file so typography from user selected theme in SiteConfig is shown in TinyMCE
* [rev:102026] Fixed SiteTree::page_type_classes() removal of base class (was broken if database driver returned classes in arbitrary order, e.g. in Postgres)
* [rev:102004] Prevent handling of controller actions which return $this avoid infinite loops in RequestHandler->handleRequest (thanks Hamish!)
* [rev:101975] Resetting image sidepanel fields when opening the panel instead of inserting an image, to avoid losing focus of TinyMCE in IE. Using getBookmark() in TinyMCE to save the original location. (fixes #5263)
* [rev:101969] Stop IE6/IE7 from redirecting in admin/assets after deleting multiple folders (fixes #5208)
* [rev:101958] Checking for existing redirections in FormResponse::respond (fixes #5208)
* [rev:101956] Fixed "object not found" javascript error in SecurityAdmin_right.js when changing group nodes (fixes #5179)
* [rev:101939] Ensure that DataObject IDs are numbers and no string equivalents of numbers - 3 not '3'
* [rev:101869] Update Salad tests to match behaviour
* [rev:101867] #4188 simon_w: Let require tags in templates be conditional
* [rev:101866] Recover if a manifestClassParse file doesn't have the necessary content.
* [rev:101812] Added allowed_actions to ContentControllerSearchExtension
* [rev:101810] #5295: Update CMS site name in LHS via Ajax after siteconfig save.
* [rev:101807] fixed undefined error in CTFs. BUGFIX: added action class to actions to allow the popup hook to open links
* [rev:101795] keep ModelAdmin from importing data twice
* [rev:101794] avoid call to non-object
* [rev:101793] preserve the port value if given in HTTP::setGetVar (#5280). BUGFIX: allow username only input rather than user:pass combo.
* [rev:101792] disable function re-enabled
* [rev:101791] deprecated split function replaced
* [rev:101758] fix #5320
* [rev:101747] Always including "Locale" field in Translatable->getCMSFields() regardless of "excluded" page types. Necessary to enable form state serialization for fields like TreeSelectorField on a VirtualPage (fixes #5269)
* [rev:101739] Versioned->publish() with $createNewVersion=TRUE now increases version number of in-memory object (fixes #5261)
* [rev:101737] RedirectorPage types shouldn't appear in "Pages with no content" side report in the CMS Pages tab
* [rev:101724] #5277 Sort of default SiteTree records is now explicitly set to avoid strange ordering set by SiteTree::onBeforeWrite for default records
* [rev:101719] Only show "Roles" tab in admin/security if user has APPLY_ROLES permissions (fixes #5258)
* [rev:101711] Don't replace "home/" URLSegment in SiteTree->RelativeLink() if Translatable is enabled and the homepage is not on the root level (nested URLs allows you to have homepages called "en/home" and "ru/home") (fixes #5244)
* [rev:101668] #5259 RedirectorPage and HtmlEditorField TinyMCE integration now prefixes http:// if no prefix is found
* [rev:101657] #5245 Sometimes page records will have a NULL ParentID value, it should be a number even if it's 0 (thanks wrossiter!)
* [rev:101638] #5243 Undefined Convert functions in ViewableData replaced with working versions. Thanks benediktb!
* [rev:101631] test that the class exists before running subclass tests
* [rev:101623] put back into the SSNavigator the archived site link (#5251)
* [rev:101608] Explicitly specify the many_many's join table name in the join's ON match statement in ManyManyComplexTableField
* [rev:101604] remove the unnecessary DOM manipulation, this is legacy code due to SilverStripeNavigator changes (open #5250)
* [rev:101603] the function makes an assumption we are working on Draft site, and breaks if we are not. Rewritten to be stage-independent, as get_version (open #5231)
* [rev:101602] IE does not accept TD element without a table, repacking into DIV (open #5228)
* [rev:101592] get a object inside transaction block will alway exist
* [rev:101554] tables and column quoted properly
* [rev:101493] tables and column quoted properly
* [rev:101492] results sorted alphabetically for consistency
* [rev:101491] results sorted alphabetically for consistency
* [rev:101392] HTTP::setGetVar() returns a relative URL if a relative URL is passed, to make behaviour closer to 2.3
* [rev:101380] disabling unused file list as feature is still buggy.
* [rev:101375] Fixed closing `</div>` which should have been a `</td>` for dragfile in AssetTableField
* [rev:101302] Fixed SiteTree->Content link shortcode parsing introduced in r101093 (#5227)
* [rev:101267] #5222 Fixed TreeDropdownField not working on FileIFrameField/ImageField
* [rev:101266] Fixed Folder writing by overloading validate() (was inheriting File->validate() which does extension checks)
* [rev:101266] Fixed Folder::findOrMake() not to create "new-folder" through File->setName() if using a trailing slash in the path (which causes an empty name). Added FolderTest to verify this.
* [rev:101264] Checking for existence of "ShowInMenus" property in Folder->liveChildren() and stageChildren() (#5190)
* [rev:101227] Don't delete index.php after successful installation - in ContentController->deleteinstallfiles(). URL routing might rely on it without mod_rewrite.
* [rev:101227] Require ADMIN permissions for ContentController->deleteinstallfiles() - together with retaining index.php this removed a vulnerability where unauthenticated users can disrupt mod_rewrite-less URL routing.
* [rev:101220] TeamComment table added to dataobjects list
* [rev:101189] Make SS_ReportWrapper::sourceRecords()' arguments optional
* [rev:101175] Fixed quotes around Folder::hasChildFolders() ParentID column
* [rev:101173] Don't run click() on all inputs, but input:radio only
* [rev:101171] Pass correct class to allowPrimaryKeyEditing in yaml fixture
* [rev:101170] Don't recreate a missing draft page when calling SiteTree::doUnpublish()
* [rev:101167] #5216 Installer has issues with click handlers applied to the entire li, be more specific and apply it to the label and input instead
* [rev:101165] Fixed versioning of pages
* [rev:101155] Prevent failed migrateVersion writes from breaking versioning system in future writes.
* [rev:101155] MAke site tree pages go green when you save a new draft.
* [rev:101154] #5214 ViewableData::obj() was creating a DBField without a fieldname argument and caused problems, one example is the version panel of the CMS
* [rev:101153] Ensure that Versioned works on classes with underscores in the names. (from r100905)
* [rev:101138] Fixed issues with broekn link tracking
* [rev:101131] Allow classes to be referred to with casing that differs from their definition.
* [rev:101129] Fixed FileLinkTrackingTest to cope with the empty alt="" and title="" attributes that are created
* [rev:101127] Improved reliabilty of broken link tracking.
* [rev:101127] Don't mark a page as changed on stage if the only thing that has changed is broken link metadata
* [rev:101116] Flush cache after deleting an item.
* [rev:101116] Fixed databaseFieldsOnly version of DataObject::getChangedFields()
* [rev:101112] Fixed bugs with copying custom fields into Virtual pages, generally made virtual pages more robust and performant.
* [rev:101110] Fixed link rewriting to work on other HTMLText fields (from r99517)
* [rev:101109] Return true if SiteTree:doUnpublish() succeeds. (from r99515)
* [rev:101105] Update Object::parse_class_spec() to handle arrays.
* [rev:101099] call_user_func_array changed to PHP 5.1 compatible notation
* [rev:101087] #5202 Installer now properly populates database configuration inputs from request after user clicks "Re-check requirements"
* [rev:101080] Fixed TableListField->print() - was unsetting $cachedSourceItems instead of null'ing it, which breaks later access to the property
* [rev:101068] #5199 Duplicate file uploads have odd numbering attached to end of file
* [rev:101061] Fixed Upload and checking for size with files that don't have any extension
* [rev:101051] Allow files with no extensions by setting File::$allowed_extensions with an empty string
* [rev:101050] #5188 Upload and Folder don't handle the duplicate naming of files that have no extension
* [rev:101046] Cookies set to a value other than NULL (effectively unsetting the cookie) will now use the httpOnly parameter by default for better XSS protection (from r101045)
* [rev:101034] Fix static caching file lookup to match file generation.
* [rev:101005] Image should pass through the title to Image_Cached so that Image::getTag() can produce a more useful alt attribute instead of just the filename (from r101003)
* [rev:100998] column and table names now quoted properly
* [rev:100986] Disable javascript date validation via DateField->jsValidation() if locale is not 'en_NZ" (which is the only format it validates for).
* [rev:100985] HTMLEditorField->saveInto() can now find images with urlencoded information for resample (e.g. spaces in filenames)
* [rev:100982] Fixed file-write testing issues in requirements combined file generation
* [rev:100980] Remove cache for Hierarchy::AllChildren() and Hierarchy::AllChildrenIncludingDeleted(), since they increase memory usage unnecessarily.
* [rev:100979] Don't make CMS loading slow if the combined javascript files can't be written.
* [rev:100932] SiteTree::getSiteConfig() should always fall back to using a default if an alternate config wasn't found
* [rev:100924] Allow DatabaseAdmin to run dev/build in live mode when not Security::is_database_ready(), and avoid broken login due to broken db queries (selecting unknown columns before dev/build) (see #4957)
* [rev:100921] DataObject::hasValue() is now compatible with parent ViewableData::hasValue() (this also fixes E_STRICT standards in PHP)
* [rev:100919] RequestHandler::handleRequest is now compatible with Controller::handleRequest in that SS_HTTPRequest is the type hint for the $request parameter
* [rev:100918] ManifestBuilder::up_children() should be declared as static as it's called statically
* [rev:100904] Produce XHTML compliant URLs in HTTP::setGetVar() by default (regression from r98373, see #5101)
* [rev:100896] #5138: DataObjectSet::removeDuplicates() removes objects of different classes with the same ID
* [rev:100866] #5176 Javascript error in IE for the installer - use "this" instead of e.target which doesn't work
* [rev:100862] Use "wb" argument in ManifestBuilder fopen() calls for better cross-platform compatibility
* [rev:100861] #5157 If paths are longer than 255 characters, fopen() produces an "Invalid argument" error, shorten the paths by using basename() instead of realpath() on the manifest filename when producing the cache path in ManifestBuilder
* [rev:100858] Fixed notice level error with folder ID
* [rev:100854] fixed file uploading not uploading any files at all
* [rev:100853] Fixed jQuery.ondemand.js script to work with prototype.js (will probably need to be merged back to trunk for legacy purposes)
* [rev:100848] Fixed variable declaration order in tabstrip.js (necessary due to changed jquery.livequery behaviour
* [rev:100825] Added single quote as a valid local-part of an email address as per RFC5322. Other symbols still excluded although in the spec
* [rev:100795] #5157 strftime() %F format parameter does not work on Windows - use %Y-%m-%d instead
* [rev:100767] Date::now() supplies wrong string - it misses leading zeroes on hours
* [rev:100763] added uniqueness id, to prevet multiple VirtuaLage reloads on publish
* [rev:100755] TreeSelectorField doubles up on concating base_url, doesn't include the security ID (#5164, thanks marcus)
* [rev:100747] #5099 FileIFrameField fails when using it with a locale different to the default
* [rev:100727] allow selection of database adpater
* [rev:100726] misspelled variable
* [rev:100724] some sections dont have a tree at all, but they still use LeftAndMain as their base class (eg report admin). Added a guard.
* [rev:100723] Fixed SapphireTest->loginWithPermission() and MemberAuthenticatorTest to use existing Members based on their unique_identifier_field (if existing) to accommodate recent Member->onBeforeWrite() changes (see r100705)
* [rev:100722] reload page if broken link tracking values changed during a save. Ticket #1363
* [rev:100721] Unsetting 'ID' parameter in MemberTableField->addtogroup() to avoid confusion between Group and Member records (regression from r100716) (from r100720)
* [rev:100719] Fixed MemberTableField->addtogroup() to fetch existing Member records by ID or $unique_identifier_field instead of relying on the (now removed) "auto-merging" in Member->onBeforeWrite() (see r100705) (from r100716)
* [rev:100717] Fixing Member_ProfileForm to validate for existing members via Member_Validator to avoid CMS users to switch to another existing user account by using their email address (from r100704)
* [rev:100701] moving the ajaxupdatesort JS response code from php to js to get rid of eval. Also disable the "loading" on the moved element when we are done, in case we are repositioning other than the selected item - otherwise the progress indicator is displayed indefinitely.
* [rev:100699] column names quoted properly
* [rev:100693] column names quoted properly
* [rev:100692] column names quoted properly
* [rev:100691] column names quoted properly
* [rev:100690] column names quoted properly
* [rev:100689] column name capitalised
* [rev:100688] column names quoted properly
* [rev:100687] column names quoted properly
* [rev:100686] the default value for decimals are now cast as (doubles)
* [rev:100657] tables and columns now quoted properly
* [rev:100632] Fixed SiteTree->MetaTags() to either use `<meta name=>` or `<meta http-equiv=>`, and only using the "http-equiv" attribute for valid HTTP headers (see http://www.w3.org/TR/html4/struct/global.html#edef-META) (from r100631)
* [rev:100627] DB::getConnect() should be properly declared as a static function
* [rev:100616] Fixed filemtime() check in Requirements_Backend::process_combined_files() not getting the right path
* [rev:100614] Proper check for combined file path in Requirements_Backend::process_combined_files()
* [rev:100560] #4572 Fixed Windows failure on SS_Cli::supports_colour() because posix functions are not supported
* [rev:100548] If fixture file is NULL don't cause the test framework to break down because of it
* [rev:100527] Set Member default Locale
* [rev:100525] get TreeMultiselectField working with an array of items, rather than a relation.
* [rev:100519] add 'var' to local variable 'constructor' inside of function definition which break IE8 (8.0.6001.18702 +)
* [rev:100508] wrong constructor function name
* [rev:100496] replacing calls to deprecated Upload functions - using validator instead (related to r100057)
* [rev:100466] #5012 BasicAuth should check if there's already a current member logged in before asking for a login/password
* [rev:100438] GD::setQuality() persistence issue because the GD instance is re-created instead of being cloned - thanks Tjofras!
* [rev:100417] #5121 Fixed cache flushing for FieldSet when removing fields - thanks paradigmincarnate!
* [rev:100415] #5136 Ensure $coverage argument to TestRunner::runTests() has a strict check before running coverage tests, as sometimes an SS_HTTPRequest object can be passed into this argument
* [rev:100407] FormAction input tag attributes were being doubly-escaped.
* [rev:100406] Fix mismatch with $all_locales and $common_locales (#5096)
* [rev:100394] #5135 LeftAndMain extra requirements loading for "themedcss" should use Requirements::themedCSS() not Requirements::css() - thanks Hamish!
* [rev:100393] YamlFixture::writeDataObject() - some databases need special allowance to edit the primary key column - do so by using DB::getConn()->allowPrimaryKeyEditing()
* [rev:100375] Sam's fix for "Unknown column Group.SubsiteID" with new subsites
* [rev:100370] use localized prefix to compare group codes rather than hard coded english string. MINOR: updated lang file
* [rev:100367] PHP 5.1 requires an array rather than a string for call_user_func()
* [rev:100359] Show Language dropdown in English (#5098)
* [rev:100335] #5023 AssetAdmin::sync() is now used to sync tasks, as it works when the user only has access to the AssetAdmin controller instead of going to dev/tasks/FilesystemSyncTask which can only be run by administrators or if the site is in dev mode
* [rev:100116] Fix TestRunner coverage pattern to work as documented (Fixes QA scripts too)
* [rev:100053] SQL Error is a member is not part of any groups
* [rev:99993] Setting default $groups in MemberTableField::AddForm() in addition to MemberTableField_Popup::__construct() - this was broken by r99777
* [rev:99960] #2022: Fixed CMS dropdowns in Opera.
* [rev:99952] Fix #2138, allow modification of existing images
* [rev:99951] Fix #2138, notify Image Toolbar on TinyMCE node selection change
* [rev:99942] action buttons always visible (not need to scroll) ticket 5051
* [rev:99942] got rid of double scroll
* [rev:99942] do not show action buttons (delete/save) when showing result list
* [rev:99887] Use underscores in names of combined .js (#3581)
* [rev:99854] Quoting keys in JSONDataFormatter to ensure valid JSON (#5119) (from r99853)
* [rev:99850] Fix #5097, Translatable uses augmentValidURLSegment to check that URLSegment is valid
* [rev:99843] Respect SilverStripe's cache folder
* [rev:99818] Handle filename deduping when uploading of double-barrelled extensions and files ending in numbers better.
* [rev:99816] Fixed the code for the unused file list, although the feature is still disabled.
* [rev:99789] #5073: Fixed CMS version indicator for alpha and beta versions.
* [rev:99779] make siteconfig work again
* [rev:99777] #5087: Show default values in CTF 'add' popups.
* [rev:99745] #3458: Don't show javascript:mctmp(0) URLs in URL editor
* [rev:99739] tree selector base URL calculation wrong when field is nested
* [rev:99738] #4974: Improve accuracy of ManifestBuilder::parse_file() cache, to remove a source of upgrade bugs.
* [rev:99713] Fixed MemberTableField limiting of , wasnt taking children groups into account (regression from r99684) (from r99706)
* [rev:99711] Setting ID explicitly in MemberTableField-> to ensure getCsvQuery() correctly filters (the custom group filter was only implemented in sourceItems() before) (from r99684)
* [rev:99693] Changed sitetree default selection in LeftAndMain.Tree.js to fire on window.load instead of document.ready() through entwine. We need to ensure behaviour.js bindings are available before
* [rev:99693] Automatically selecting root node in CMS trees (necessary because now we actually have forms on the root node, and its a valid click target) (from r99605)
* [rev:99679] really testing deletemarked now.
* [rev:99667] Fixed bogus HTMLEditorConfig instance when get() is called without a valid identifier (due to NULL database columns) (from r99599)
* [rev:99655] Fixed TreeMultiselectField/TreeDropdownField saving with 'unchanged' default values from constructor (from r99581)
* [rev:99647] Fixed TreeMultiselectField->Field() to respect settings, and give them priority over existing relations through getItems(). This is used in MemberTableField to set default groups for 'add member' popups. (from r98879)
* [rev:99640] Fixed DataObject->fieldLabels() to respect flag (from r98748)
* [rev:99638] Folder::findOrMake() will create the assets/ folder if it's missing
* [rev:99613] Fixed bug in r99552
* [rev:99595] Fixed Access tab on SiteConfig
* [rev:99594] Debugged and simplified Access tab javascript
* [rev:99587] Show 'Inherit' option for edit and view all the time (since we now have SiteConfig)
* [rev:99572] Pages that you can't edit should always be grey, even if there are unpublished changes.
* [rev:99553] Remove buttons from display if you load a CMS page that should have no buttons - reverts bug caused by r96551 and fixes the issue it was trying to solve.
* [rev:99552] Fixed behaviour's ID selector matching when the ID is inside another context - eg 'body.className #ID'
* [rev:99522] Image::onBeforeDelete() now calls deleteFormattedImages() so resampled images in the filesystem are cleaned up
* [rev:99506] use the correct method for retrieving the report ID
* [rev:99490] tablename and columns quoted properly
* [rev:99479] Setting ID = -1 on Security/lostpassword to avoid showing toplevel navigation (see #5086)
* [rev:99465] Correct StaticPublisher filenames, now works with nested URLS
* [rev:99443] batch_permission_check returns null rather than empty array when user has no permissions
* [rev:99394] Fixed variable existence checks in setValue() in FormField::__construct() by checking for !== NULL (changed from isset($value) to $value in r99360)
* [rev:99391] Fixed MoneyField constructor - parent (FormField) constructor calls setValue() already, which needs to happen *after* setting certain field instances
* [rev:99342] Enforcing creation of temp database in SapphireTest->setUp() to avoid writing to production databases. This check should only kick in for single test case runs, as the temp database connection should be set in a dev/tests/all run after the first db-related test anyway. (see #5034)
* [rev:99303] Disable some permission caching for now, as it was breaking unit tests (from r98504)
* [rev:99302] SiteTree::batch_permission_check() doesn't recurse with ID=0 calls
* [rev:99128] Fix not being able to print/export reports (from r98684)
* [rev:99125] Fixed cache prepopulation on sitetree load. (from r98651)
* [rev:99124] Make sure navigation links update when urlsegment is changed (from r98649)
* [rev:99116] Fix navigator links not opening in new windows. (from r97510)
* [rev:99115] Fixed bug in r97395 (from r97508)
* [rev:99101] Take into account tablename with custom columns in get_title_sql (from r97003)
* [rev:99100] use proper quotes for sep (from r96401)
* [rev:99089] Only show live link when page has been published (from r97839)
* [rev:99087] Make sure draft/published links go to the right subsite (from r97747)
* [rev:99086] Fix navigator links not opening in new windows. (from r97510)
* [rev:99085] Show a hand icon and better title for the 'share link' piece of the navigator toolbar. (from r97439)
* [rev:99067] Ensure that ModelAsController::init() can trigger redirections. (from r98702)
* [rev:99065] Fixed SiteTree_versions version numbers for published virtual pages. (from r98675)
* [rev:99060] fixed query to get number of unmoderated comments
* [rev:99052] Generate SiteTree_version records for VirtualPages more reliably. (from r98309)
* [rev:99050] fix incorrect link in CMS (from r97408)
* [rev:99049] Make sure CMS link knows when its currently in the CMS (from r97403)
* [rev:99031] Don't show FailedLoginCount field unless Member::$lock_out_after_incorrect_logins is enabled
* [rev:99005] Development server list should be retained when user submits installer form and gets redirected back
* [rev:98957] fix for #5076
* [rev:98946] the ID should be that of untranslated child (it's the middle segment that's from translated version, not the last one)
* [rev:98944] testing framework needs to be reset to a clean state after each test: now also nested urls and redirection state will be reverted
* [rev:98897] Fixed strpos() check in BASE_URL check
* [rev:98895] Installer now opens if mod_rewrite is disabled. Using index.php instead of rewriting the URL didn't quite work with the new BASE_URL, so we need to take this case into account as well
* [rev:98869]
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/changelogs/2.2.4.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/changelogs/2.2.4.md
| 3,451 | 1,758,118,090 |
en
|
# 2.2.4 (2009-03-20)
## Features and Enhancements
* ![rev:65263] Default permission failure message set can be changed
* ![rev:73365] Text->FirstParagraph?() now works for `<div>` containers in HTML, as you may not always have paragraph tags.
* ![rev:73272] Added Director::is_relative_url() and Director::is_site_url()
* ![rev:69634] After a javascript validation error from a form submission, focus on the first errored field
## Bugfixes
* ![rev:73367] Allow translation of front-end content into all languages, not just common ones (Merged from r64943)
* ![rev:73347] Removed canEdit() call that doesn't exist in SecurityAdmin::savemember()
* ![rev:73319] Added missing action 'DeleteImageForm' to Image::$allowed_actions
* ![rev:73305] Added missing action 'EditImageForm' to Image::$allowed_actions
* ![rev:73302] Fixed too strict permission checking on Image::$allowed_actions. Replaced broken * permission check with explicit method names
* ![rev:73298] Fixed array to string conversion caused by patch committed in r73272
* ![rev:73295] Validating $_FILES in Image::loadUploadedImage() (Original patch was applied to Upload->validate() in trunk - r73254)
* ![rev:73294] Validating $_FILES in Folder::addUploadToFolder() (Original patch was applied to Upload->validate() in trunk - r73254)
* ![rev:73292] Fixed undefined variable $backURL that should've been $_REQUEST['BackURL']
* ![rev:73282] Using $allowed_actions in ImageEditor (Merged from r73248)
* ![rev:73280] Using $allowed_actions in Image_Uploader (Merged from r73255)
* ![rev:73279] Validating $_FILES in File::loadUploaded (Original patch was applied to Upload->validate() in trunk - r73254)
* ![rev:73278] Existence check for Member autologin token (Merged from r73253)
* ![rev:73276] Checking for Director::is_site_url() before redirecting in Controller->redirectBack() and MemberLoginForm (Merged from r73252)
* ![rev:73273] Added isDev() and Permission::check() directives to DatabaseAdmin (Merged from r73251)
* ![rev:73272] Validating $_FILES array in Director::direct()
* ![rev:73271] Using auto-escaped get_by_id() in CommentAdmin and SecurityAdmin (Merged from r73247)
* ![rev:72220] changed target blank to only exist by default for files
* ![rev:69598] Corrected layout of Security/lostpassword and Secuirty/changepassword pages to not show a glitchy main menu, ie, matches Security/login
* ![rev:69138] Fix readonly checkbox fields always setting the field to true
* ![rev:65490] Fixed usability issue with CalendarDateField required field validation. Slightly over-coupled; resolve that in the jQuery validation rewrite.
* ![rev:65258] Fixed ComplexTableField showing export link correctly
* ![rev:65219] Fixed i18n entity problem with TableListField_Item.ss
* ![rev:69594] Corrected changed-password email layout
* ![rev:67482] Merged db/build fix for auto_increment
* ![rev:65473] Preserve BackURL get-variable on failed log-ins
* ![rev:65488] Removed 'Welcome back, FirstName', message that appears if you log-in, out, then in again
* ![rev:66552] Make sure only fields that exist can be autocompleted on MemberTableFields, and never autocomplete on password. (merged from branches/2.3)
* ![rev:69440] forced tinymce to keep iframes in html rather then deleting them
* ![rev:66769] Reverted r66440 - this was causing too many bugs
* ![rev:66479] Fixed error on CommentAdmin
* ![rev:66440] Merged r57599 from branches/roa
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/changelogs/2.3.3.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/changelogs/2.3.3.md
| 4,787 | 1,758,118,090 |
en
|
# 2.3.3 (2009-08-03)
## Upgrading
### DataObjectDecorator::extraStatics()
DataObjectDecorator::extraStatics() can no longer refer to $this because it's called statically
## Changelog
### API Change
* ![rev:79430] #4255 sharvey: DataObjectDecorator::extraStatics() can no longer refer to $this because it's called staticly (Merged via: r81698)
### Bugfixes
* ![rev:82094] applied patch from #4381. Observable doesnt play nice with jQuery
* ![rev:82035] Fixed double up of `<span>` highlight tags around keywords in Text::ContextSummary()
* ![rev:81942] Fixed bugs in content differencer, and improved styling. BUGFIX: fixed notice when getting title of member which didnt exist. Merged from trunk r77661.
* ![rev:81894] Convert::recursiveXMLToArray() did not always check if the passed in XML is an object before calling get_class() on it
* ![rev:81883] Merged in PHP 5.3 bugfixes from trunk
* ![rev:81822] Deleted duplicate call to curl_exec() in RestfulService (merge error from r69704) (Merged via: r81823)
* ![rev:81698] #4285: Fixed static application bug that appeared in 2.3.2
* ![rev:81693] Fix static application for translatable (Merged via: r81698)
* ![rev:81676] #4285: Fixed application of decorators when add_extension not used. (Merged via: r81698)
* ![rev:81544] Calling parent constructors in ModelViewer
* ![rev:81467] Fixed Hierarchy->markChildren() to only mark nodes as unexpanded if they actually have children. This avoids UI glitches with "plus"-icons beside unexpandable nodes, and prevents batch actions and TreeNode->open() to trigger ajaxExpansion on nodes without children (from r78339) (Merged via: r81971)
* ![rev:81461] Correct behaviour if CMSMain::tellBrowserAboutPublicationChange() isn't passed a status message (Merged via: r81965)
* ![rev:81460] Fixed FileSearch parameter in AssetTableField. Pagination of filtered search results and refresh of the tabular view after saving a popup wasn't working because the search parameter wasn't retained (Merged via: r81962)
* ![rev:81450] If referrer had spaces, they would be encoded as %20, which would cause problems when interpolated into an sprintf pattern. Inject instead.
* ![rev:81262] Relax type checking in RequestHandler::checkAccessAction()
* ![rev:81173] Fixed application of parameterised extensions with Object::add_extension() (Merged via: r81698)
* ![rev:81050] prevented cms from dying when a page has no published children. Added check before stepping into the loop
* ![rev:80863] Fixed invalid HTML in AssetAdmin_uploadiframe.ss which could have an effect on file uploads
* ![rev:80382] Fixed Image_iframe.ss to use X-UA-Compatible IE7 emulation meta tag
* ![rev:80380] Fixed "method is not a string" error in Form::httpSubmission()
* ![rev:80131] Fix behaviour of FILE_TO_URL_MAPPING on Windows. (Merged via: r81883)
* ![rev:79720] Added explicit DataObjectDecorator::load_extra_statics() calls as a workaround for issues with extensions defined directly in-object. (Merged via: r81698)
* ![rev:79599] Allow extraDBFields() on decorators for compatibility, throw a deprecated notice (Merged via: r81698)
* ![rev:79433] Object::add_extension() should only load statics for extensions of DataObject, since it is specific to DataObjectDecorator (Merged via: r81698)
* ![rev:79430] #4255 sharvey: Fix application of extra db fields by DataObjectDecorators.
* ![rev:78628] Added better support for newly created records in DataDifferencer (Merged via: r81475)
* ![rev:78392] Fixed FileSearch parameter in AssetTableField. Pagination of filtered search results and refresh of the tabular view after saving a popup wasn't working because the search parameter wasn't retained (Merged via: r81962)
### Enhancement
* ![rev:81933] Updated Versioned::compareVersions() to use DataDifferencer. Merged from trunk r77660
* ![rev:81544] Checking for GraphViz dependency in ModelViewer (Merged via: r81546)
* ![rev:81475] Improvements to DataDifferencer for cmsworkflow.
* ![rev:80863] Removed JS generated from PHP code in AssetAdmin::UploadForm() and placed it into AssetAdmin_uploadiframe.ss
* ![rev:80340] simpleXML() now catches the error if you try to call it on anything other then xml. MINOR: added test to RESTFul Service
* ![rev:79404] Added better support for using DataDifferencer to look at new records. (Merged via: r81475)
* ![rev:79400] Added better support for using DataDifferencer to look at new records. (Merged via: r81475)
* ![rev:78329] Added API docs and changedFieldNames() method to DataDifferencer (Merged via: r81475)
* ![rev:77787] Allow altering of DataObject:$api_access by decorators. (Merged via: r81698)
### Other
* ![rev:81993] e:
* ![rev:81965] Merged r81461 from trunk
* ![rev:81962] Merged r81460 from trunk
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/changelogs/2.3.5.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/changelogs/2.3.5.md
| 589 | 1,758,118,090 |
en
|
# 2.3.5 (2010-01-21)
## Changelog
### Bugfixes
* [rev:97221] BUGFIX: add if condition for window.ontabschanged() call
* [rev:97074] BUGFIX Attribute escaping in PageCommentInterface_singlecomment.ss
* [rev:96962] BUGFIX: fixed overlapping buttons in modeladmin.
* [rev:96959] BUGFIX: fixed layout issue when tinymce event handler was not removed before the load request. Removed back button display when no history existed
* [rev:96998] BUGFIX: fixed TaskRunner generating link with 2 slashes
### Minor
* [rev:97004] MINOR: fixed notice level error when ImageSource isnt set
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/changelogs/2.3.2.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/changelogs/2.3.2.md
| 47,155 | 1,758,118,090 |
en
|
# 2.3.2 (2009-06-18)
## Upgrading
### Feature Changes
#### CMS image alignment changes
Image alignment elements have been changed slightly. There are no longer any `<DIV>` elements created with the images
using the insert image toolbar in the CMS.
All of these selectors in your typography.css are affected:
* div.image.left
* div.image.right
* div.image.leftAlone
* div.image.center
They need to be changed to the following (respectively):
* img.left
* img.right
* img.leftAlone
* img.center
Here's an example of how the default Blackcandy theme was changed:
[http://open.silverstripe.org/changeset/75917/themes/blackcandy/branches/2.3/blackcandy/css/typography.css](http://open.silverstripe.org/changeset/75917/themes/blackcandy/branches/2.3/blackcandy/css/typography.css)
#### Translatable Datamodel
The datamodel for the Translatable extension was changed from multiple language tables to multiple rows for each
translated record in the original table. We've also introduced the concept of "Translation groups", which means not
every translated record has to exist in a "master language". Please review our updated documentation on how to [enable
Translatable](http://doc.silverstripe.com/doku.php?id=multilingualcontent).
If you are upgrading an existing database with existing translations, you'll need to run our [Migration
Script](http://doc.silverstripe.com/doku.php?id=multilingualcontent#migrating_from_2.1_datamodel) before using the
database.
For in-depth discussion of the schema changes and translation groups, please refer to our developer mailinglist:
[1](http://groups.google.com/group/silverstripe-dev/browse_thread/thread/91e26e1f78d3c1b4/bd276dd5bbc56283?lnk=gst&q=translatable#bd276dd5bbc56283)
and
[2](http://groups.google.com/group/silverstripe-dev/browse_thread/thread/575001296360a1cc/e3268963c6d8cef7?lnk=gst&q=translatable#e3268963c6d8cef7).
#### Translatable property selection
It is no longer possible to exclude certain properties on a DataObject from being translatable. This is a limitation by
our database schema choice. See
[discussion](http://groups.google.com/group/silverstripe-dev/browse_thread/thread/2b3df26361d17119/be8f9f08a797bd43?lnk=gst&q=translatable#be8f9f08a797bd43)
on our mailinglist and ticket [#3722](http://open.silverstripe.com/ticket/3722).
#### Translatable URLs
Every page is now forced to have a unique URL, different languages can't be switched by appending a ''?lang=xx''
property any longer. Languages don't have to be set in sessions or cookies, as every request is able to determine the
language for the remaining site by inspecting the URL. Unique URLs are enforced because of SEO concerns, problematic
caching on proxies, browser and framework-level, as well as difficult debugging with session states. See
[discussion](http://groups.google.com/group/silverstripe-dev/browse_thread/thread/17908f7318decfac/0c2b2e2a07ea6955?lnk=gst&q=translatable+url#0c2b2e2a07ea6955)
on our mailinglist.
### API Changes
#### Important, but simple, ModelAdmin change
The configuration statics for ModelAdmin have been changed from protected to public, so that ''Object::get_static()''
can access them. In particular the following static variables have been changed.
* ''ModelAdmin::$managed_models''
* ''ModelAdmin::$collection_controller_class''
* ''ModelAdmin::$record_controller_class''
* ''ModelAdmin::$model_importers''
* ''ModelAdmin::$page_length''
Because of this, you will need to change the static definitions in your ModelAdmin subclasses. For example, you should
change this:
:::php
class MyCatalogAdmin extends ModelAdmin {
protected static $managed_models = array(
'Product',
'Category'
);
...
}
To this:
:::php
class MyCatalogAdmin extends ModelAdmin {
public static $managed_models = array(
'Product',
'Category'
);
...
}
#### Deprecated Translatable::enable()
* Use ''Object::add_extension('SiteTree','Translatable'')'' instead of ''Translatable::enable()''
* Use ''Object::remove_extension('SiteTree','Translatable'')'' instead of ''Translatable::disable()''
* Use ''Object::has_extension('SiteTree','Translatable'')'' instead of ''Translatable::is_enabled()''
#### Deprecated Translatable "lang" methods
## 2.3.2-rc4
### Bugfixes
* ![rev:79278] Fixed TranslatableTest->testSavePageInCMS(), needed admin login to edit ViewersGroups field (Merged via: r79282)
* ![rev:79269] Excluding Access fields on SiteTree from Translatable->updateCMSFields(), as their original values break the javascript logic for showing/hiding the fields (Merged via: r79282)
* ![rev:79266] Passing locale through to TreeSelectorField ajax calls (Merged via: r79282)
* ![rev:79240] Marking new TreeMultiSelectField_Readonly with $readonly flag, otherwise breaks CMS saving with Translable enabled etc. (see #4240)
## 2.3.2-rc3
### Enhancement
* ![rev:78919] DevelopmentAdmin: Changed dev/build to produce nicer formatting when running from sake/dev/build CLI
* ![rev:78618] Add HTMLText#FirstSentence based on new HTMLText#Summary
### API Change
* ![rev:78632] Added increase_memory_limit_to() for increasing but not decreasing memory limit.
* ![rev:78618] Added two arguments to HTMLText#Summary. Minimal impact since previously any usage of this function threw an error.
### Bugfixes
* ![rev:79208] Don't remove translation groups in Translatable->onBeforeDelete() if the decorated record uses Versioned, as other representations of the record might still exist in other tables (e.g. SiteTree_Live) (see #4219) (Merged via: r79211)
* ![rev:79194] Writing Locale in Translatable->onBeforeWrite() regardless of the record ID existing (see #4232). This is more in line with Translatable->requireDefaultRecords() which automatically updates all NULL locale values anyway. (Merged via: r79195)
* ![rev:78920] DevelopmentAdmin: Don't allow dev/reset to be run from CLI, as this could be accidentally run - give a message that the user should run this from their web browser instead
* ![rev:78732] #4119: Fixed encoding of readonly TextareaFields and unicode in TextareaFields.
* ![rev:78729] Fixed Translatable->requireDefaultRecords() for non-SiteTree objects (was assuming Versioned to be present) (Merged via: r79195)
* ![rev:78728] A couple of bugfixes on HTMLText#Summary and HTMLText#FirstSentence so the trickiest tests pass
* ![rev:78618] Replace HTMLText#Summary with one that works.
* ![rev:78542] Don't allow the use of get-var ?isDev=1 when security DB isn't available.
* ![rev:78496] WidgetAreaEditor shouldn't ever call editable segment "NoWidgets" - this is just a placeholder
* ![rev:78471] Fixed readonly version of TreeMultiselectField
* ![rev:78470] Get backtrace rather than crazy context stuff shown in dev error messages
* ![rev:78469] Fix readonly versions of grant fields.
* ![rev:78452] fixed spelling of spam protector
* ![rev:78352] modified convertDataObjectWithoutHeader to handle empty relationships.
* ![rev:78256] Removing operating system limitations for Flash Player checks which determine showing/hiding of upload button (which currently requires exactly FP9 in our version of SWFUpload). See #3679 and #3023 for followup tickets.
* ![rev:78155] Changing from unset record entry to an empty value shouldn't register as a 'level 2' change
* ![rev:78118] Using language dropdown to determine locale for partial tree ajax loads, because we can't rely on a page with a hidden "Locale" field being loaded in the CMS. Fixed bug with wrong spelling of "locale" argument. (see #3995). (Merged via: r78119)
* ![rev:76517] Closing `<link type="alternate">` tags for XHTML compliance on Translatable->MetaTags(). Use ContentNegotiator to transform them back to HTML markup. See #3989 (Merged via: r78167)
## 2.3.2-rc2 Changelog
### API Change
* ![rev:77658] Added DataDifferencer, for comparing DataObjects. Note that it won't be used by the core features until 2.3.3, but is made available here for the cmsworkflow module.
* ![rev:77385] Removed @deprecated 2.3 JS function ingize() from LeftAndMain.js: Please use ss.i18n instead
### Bugfixes
* ![rev:77937] fixed is_array error in TableListField. #4123
* ![rev:77849] Fixed bugs in previous change to DOD
* ![rev:77822] Fix edge-case bug with application of decorators
* ![rev:77766] #4133 Fixed case where ComplexTableField failed to detect a has_many relation from the parent
* ![rev:77737] fixed #4119 by using htmlentities rather then Convert functions
* ![rev:77733] #4113: Fixed bugs with template processing in i18nTextCollectorTask.
* ![rev:77727] #4119 netminds: Fix error page publication for lang to locate replacement.
* ![rev:77726] a redirection with an external link that has more than one query string variables. Do not convert the link to html entities
* ![rev:77662] #2328: Show backtrace for uncaught exceptions (merged from r70444)
* ![rev:77596] fixed clearing issue with IE7
* ![rev:77553] Removed spurious console.log() functions (merged from r77552)
* ![rev:77528] missing unmoderated action in CommentAdmin.php
* ![rev:77461] Ensure that when a page is deleted from stage or live, its descendants are also deleted.
### Minor changes
* ![rev:78083] Reverted r78055, it breaks TableListFieldTest and doesn't actually fix the bug it was supposed to (PHP segfaulting)
* ![rev:78082] Merged from trunk
* ![rev:78081] Merged from trunk
* ![rev:77992] Merged from trunk
* ![rev:77766] Updated tests for ComplexTableField
* ![rev:77595] fixed layout for SelectionGroup file
* ![rev:77554] mergeinfo
* ![rev:77384] Removed cases where GhostPage was being unset from the tests
* ![rev:77381] Removed unused ReportField_Controller URL rule from cms/_config.php
## 2.3.2-rc1 (changes since 2.3.2-beta1)
### API Change
* ![rev:77006] Deprecated Translatable::set_reading_lang(), use Translatable::set_current_locale().
* ![rev:76853] Deprecated Translatable::current_lang(), use Translatable::get_current_locale() (Merged via: r76855)
* ![rev:76839] Deprecated Translatable->getTranslatedLangs(), use getTranslatedLocales()
* ![rev:76723] Added SiteTree::doDeleteFromLive()
* ![rev:76666] Made batch actions pluggable through CMSBatchActionHandler::register()
* ![rev:76207] When there are script tags in the body, put requirements script just before them, instead of at the very top of the body. Since this reduces the cost of the (sometimes necessary) script tags in the body, the notice-level error has been removed.
### Bugfixes
* ![rev:77282] WidgetAreaEditor gets it's related WidgetArea using getComponent(), a more robust way of getting the component
* ![rev:77259] Fixed Debug::friendlyError() to use Translatable::get_current_locale() instead of deprecated Translatable::current_lang()
* ![rev:77256] Fixed undefined variable $langAvail in Translatable
* ![rev:77242] Added a missing default english string to ADDITEM translatable entity in TableField.ss
* ![rev:77140] If CTF doesn't have a parent class (set to false), avoid breakages in ComplexTableField::getFieldsFor()
* ![rev:77111] #4082 - Translatable CMS fields layout broken in IE6
* ![rev:77031] Add JavaScript for HtmlEditorField on every CMS page, to avoid issue where loading form with HtmlEditorField via ajax doesn't work because scripts are stripped out.
* ![rev:77016] TableListField items couldn't be deleted because TableListField_ItemRequest::__construct() didn't call parent::__construct()
* ![rev:76955] Make requirements combiner work with jQuery
* ![rev:76949] #4038 If attempting to set a default locale that doesn't exist, throw a warning in Translatable::set_default_locale()
* ![rev:76948] Fixed case where SiteTree->getCMSFields() is missing a parent page, and thus it results in a non-object
* ![rev:76930] Fixed potential non-object error in LeftAndMain::callPageMethod()
* ![rev:76913] Fixed missing tinymce_template bug in ReportAdmin
* ![rev:76896] Fixed ErrorPage not showing up properly due to a SQL query that was merged from trunk not compatible with 2.3
* ![rev:76890] #4058 Requirements::process_combined_files() fixed small typo in the output
* ![rev:76881] #4068 - Fixed spelling mistake in en_US.php
* ![rev:76875] Fix javascript error in IE caused by Changeset 76845 where reloading a page would trigger a resetChanged before the tinyMCE instance existed
* ![rev:76872] Using Translatable::set_default_lang() for the deprecated i18n::set_default_lang() - this should trigger lang->locale convertion, and fix issues with running a 2.2->2.3 database schema migration (see #4009) (Merged via: r76873)
* ![rev:76870] Fixed CMSMain->LangSelector() default language selection (Merged via: r76871)
* ![rev:76866] Added translation groups for existing entries the first time Translatable is switched on through Translatable->requireDefaultRecords() (see #4051) (Merged via: r76867)
* ![rev:76852] Fix issue with 'clear' button on CMS SiteTree search
* ![rev:76841] Fixed tab layout for add form of model admin (Merged via: r77326)
* ![rev:76765] typo by legacy: ViewersGroup -> ViewerGroups, EditorsGroup -> EditorGroups
* ![rev:76731] Removed obsolete CMSMain->EditingLang(), not used any longer (see #3997) (Merged via: r76733)
* ![rev:76730] Fixed selected image hilighting, when inserting images into WYSIWYG, on IE
* ![rev:76729] Fixed WidgetAreaEditor javascript in IE
* ![rev:76726] Don't show the upload tab on readonly folders.
* ![rev:76702] Made TableListField::export() more memory efficient for large exports.
* ![rev:76655] Limit "show deleted pages" in CMS tree to current language (see #3994) (Merged via: r76656)
* ![rev:76650] Made SideTabs and SideReports work with Translatable by explicitly passing a "locale" GET parameter (see #4014) (Merged via: r76653)
* ![rev:76613] Fixed "Translations" tab display in CMS - no more duplication of original language and translated tab - see #4020 (Merged via: r76614)
* ![rev:76611] Creating a translation of a new page in a new language fails - fixed by adding locale to /createtranslation ajax call (see #4021) (Merged via: r76612)
* ![rev:76608] Fix getsubtree command in CMS tree to work with Translatable (#3995) (Merged via: r76609)
* ![rev:76603] Return NULL in Versioned::get_latest_version() if no record was found (fixes #4015) (Merged via: r76605)
* ![rev:76508] Escaped SiteTree.ID in LinkTracking selection so that show deleted pages would work.
* ![rev:76457] fixed escaping of code in textarea fields
* ![rev:76435] fixed treedropdownfield cropping long names off
* ![rev:76374] Ensure that the return object of File::find() is an instance of Image in HtmlEditorField_readonly::HtmlEditorField_dataValue_processImage()
* ![rev:76268] Fix modeladmin scrollbars in ie7
* ![rev:76258] Fixed scenarios where the page is readonly and the expected ParentType elements don't exist causing a JS error (Merged via: r76260)
* ![rev:76172] Fixed calls to uninherited() that returned no static in some cases, replacing with faster Object::get_static() calls (Merged via: r76205)
* ![rev:75027] Fixed Locale duplication detection for queries in Translatable->augmentSQL() (Merged via: r76593)
* ![rev:70325] Altering parent getCMSFields() results in RedirectorPage instead of starting with an empty FieldSet, as this discards any tabs and fields which are not explicitly mentioned in the implementation like the ability to create a translation. (Merged via: r76515)
* ![rev:70306] Don't require a record to be written (through exists()) when checking Translatable->isTranslation() or Translatable->hasTranslation()
### Enhancement
* ![rev:77266] Added databse name to output of dev/build (merged from r77265)
* ![rev:77265] Added databse name to output of dev/build (Merged via: r77266)
* ![rev:77264] Added option for putting integers into SS_DATABASE_CHOOSE_NAME in _ss_environment.php, so that a parent/grandparent folder name can be used as the database name (merged from r77261).
* ![rev:77261] Added option for putting integers into SS_DATABASE_CHOOSE_NAME in _ss_environment.php, so that a parent/grandparent folder name can be used as the database name. (Merged via: r77264)
* ![rev:76944] Significant speed up for SiteTree Filter
* ![rev:76847] Add SSMacron plugin for inserting macron characters
* ![rev:76845] Use new HtmlEditorConfig API to specify options for CMS HtmlEditorField
* ![rev:76840] Using standard LanguageDropdownField in CMSMain->LangSelector() (Merged via: r76843)
* ![rev:76839] Added $instance parameter to LanguageDropdownField to call instance-specific canTranslate() on it (optionally) (Merged via: r76842)
* ![rev:76779] Correct issue with SiteTree filtering not persisting and add drop down for page type and clear button. Part of a re-work of the search system
* ![rev:76666] Added batch actions for unpublish and delete from published.
* ![rev:76594] Improved TranslatableTest->testCreateTranslationTranslatesUntranslatedParents() to translate two grandchildren - this used to be an issue in branches/2.3 (see #4016) (Merged via: r76597)
* ![rev:70306] Adding link back to original page in CMS editform for translations
### Other
* ![rev:77326] Merged from trunk
* ![rev:77071] the sort
* ![rev:77051] Fix a PHP segfault
* ![rev:76942] API: Allow specifying any callback to setMarkingFunction, not just a function name.
* ![rev:76844] API: Move the TinyMCE configuration from a javascript file to a php system, to allow for site specific and section specific html editor options.
* ![rev:76779] @todo: Tests, speed optimisation, proper connection of filtering with tree control checkboxes
* ![rev:76260] Merged from trunk
* ![rev:76205] Merged from trunk
* ![rev:71917] NOTFORMERGE: Added custom batch actions and a 'show generic/customised' checkbox to the oriwave CMS. When upgrading to 2.3 or 2.4, we should use this code as a use-case for a new API that lets us customise the CMS interface. The JavaScript refactoring work we do might want to bear this in mind, to make such customisations easier. (Merged via: r76666)
## Beta 1 - since 2.3.1
### New Features
* ![rev:75153] Allow Title and Navigation Label to be searched separately
* ![rev:74739] hooks into form field to allow custom error messages. Note does not currently apply to the behaviour / js. Just the PHP validation
* ![rev:74538] make PasswordField and ConfirmedPasswordField able to either readonly or disabled.
* ![rev:74503] make PasswordField and ConfirmedPasswordField able to either readonly or disabled.
* ![rev:74327] added $Var.UpperCase support to DBField
* ![rev:74326] allow you to disable ?m suffixing of requirements
* ![rev:74248] optionally allow sorting toDropdownMap() function. Patched from #3829
* ![rev:73670] added after uploading notify method
* ![rev:70327] Enabled specifying a language through a hidden field in SearchForm which limits the search to pages in this language (incl. unit tests) (Merged via: r74986)
### API Change
* ![rev:75913] Deprecated ModelAsController->get404Page() with using the URLSegment "404" on a normal page type - please use the ErrorPage class instead (Merged via: r75916)
* ![rev:75742] Deprecated Translatable::get_langs_by_id() - use getTranslations()
* ![rev:75328] Deprecated Translatable::get_homepage_urlsegment_by_language(), use get_homepage_urlsegment_by_locale() (Merged via: r75685)
* ![rev:74969] Deprecated DataObjectSet->toDropDownMap() and made it an alias of map(), copying the functionality of toDropDownMap() into map()
* ![rev:74901] add documentation to changeset r74858.
* ![rev:74858] BulkLoader::getImportSpec() call DataObject::fieldLables() with $includerelations as false, so that the relations is separated from column fields
* ![rev:74070] Deprecated Translatable::choose_site_lang(), use choose_site_locale() (Merged via: r74986)
* ![rev:73951] Removed Translatable::creating_from() - doesn't apply any longer
* ![rev:73900] Deprecated Object->extInstance(), use getExtensionInstance() instead
* ![rev:73468] Removed Translatable::get_original() - with the new "translation groups" concept there no longer is an original for a translation
* ![rev:73466] Deprecated Translatable::set_default_lang(), Translatable::default_lang() (Merged via: r74986)
* ![rev:73345] Removed CMSMain->switchlanguage() - createTranslation() is sufficient for new, ajax refreshing of CMS state got way too complicated for switching languages, we now just reload the entire CMS with a different ?lang GET parameter (Merged via: r74988)
* ![rev:73338] Translatable->findOriginalIDs(), Translatable->setOriginalPage(), Translatable->getOriginalPage()
* ![rev:70307] Removed CMSMain->switchlanguage() (Merged via: r74988)
* ![rev:70118] Removed obsolete Translatable::table_exists()
* ![rev:70072] Removed obsolete internal Translatable methods: hasOwnTranslatableFields(), allFieldsInTable()
* ![rev:69959] Removed Translatable::get_one(), Translatable::write()
### Bugfixes
* ![rev:76036] Fixed extraFilter argument for SiteTree::get_by_url() when translatable is enabled
* ![rev:76019] Unblock blocked requirements when opening a poppup - otherwise
* ![rev:75984] Removing ParentType and ParentID fields in Translatable->updateCMSFields() as they are causing js problems when set to readonly. These fields should only be set on the original record anyway (at least as long as we don't have a multi-language capable TreeMultiSelectField). (Merged via: r76035)
* ![rev:75983] Removed URLSegment detection from Translatable->onBeforeWrite() - it was always preceeded by SiteTree->onBeforeWrite() which already alters the URL, so the appending of locale values to disambiguate the URL was pointless (never triggered) (Merged via: r76035)
* ![rev:75936] Resetting default language in TranslatableTest - this was breaking VirtualPageTest before (Merged via: r75937)
* ![rev:75926] Fixed undefined var error in VirtualPage (Merged via: r75937)
* ![rev:75922] Resetting Translatable locale in SearchForm after querying - this was causing side-effects when running TranslatableSearchFormTest in combination with other Translatable tests (Merged via: r75937)
* ![rev:75920] Ensure that when template content is being parsed by Email::parseVariables(), template path comments don't show
* ![rev:75919] Ensure that template path comments don't make it into ViewArchivedEmail
* ![rev:75915] Fixed wrong parameter in ErrorPage::get_static_filepath() (Merged via: r75916)
* ![rev:75914] Fixing assets filepath in Debug::friendlyError() (Merged via: r75916)
* ![rev:75873] Automatically publish virtual pages when their source pages are published
* ![rev:75869] #3970: Make virtual page editing work.
* ![rev:75831] Checking for existing value on TreeDropdownField->performReadonlyTransformation() - this broke the ReadonlyTransformation on Translatable->updateCMSFields() for the new "ParentID" field in SiteTree->getCMSFields()
* ![rev:75826] Removing the appended querying for NULL or empty Locale values in Translatable->augmentSQL() - this should no longer be necessary as we set default locales to all records through Translatable->requireDefaultRecords() (Merged via: r75838)
* ![rev:75791] Fixed ErrorPage::get_filepath_for_errorcode() to work with locale values instead of short language subtags (Merged via: r75838)
* ![rev:75787] Fixed faulty regex that broke rewritten links to be relative to the base href
* ![rev:75785] set when ajax is disabled for commenting that we redirect manually down to the comment form
* ![rev:75782] Unified locale values between i18n::$all_locales and $common_locales - the common locales should be a subset of all locales, without any additional ones as this might cause side-effects with LanguageDropdownField (see #3958) (Merged via: r75783)
* ![rev:75745] Fixed DBLocaleTest (Merged via: r75746)
* ![rev:75743] #3959: Fixed auto-setting has many relations on CTF - works mostly like the many-many relation auto setting.
* ![rev:75733] Allow insertion of object tags (such as youtube vids) into WYSIWYG's HTML view
* ![rev:75705] Fixed right hand image add/edit form panel sizing
* ![rev:75675] Fixed i18n::get_locale_from_lang() to return original parameter if it detects a fully qualified locale that shouldn't be converted (Merged via: r75685)
* ![rev:75654] Fixed PageCommentInterface $this->class being NULL because parent::__construct() wasn't called
* ![rev:75614] Fixed refactoring of getRecord() so that it can handle currentPage() calls properly.
* ![rev:75611] Let CMS users open pages deleted from draft; bug introduced by translatable.
* ![rev:75585] Updated DataObjectSet::map() to use empty string, rather than 0, as the empty value
* ![rev:75328] Updated enabling mechanism in Translatable->alternateGetByUrl()
* ![rev:75270] #3740: Fixd duplicate tab highlight in ModelAdmin, by moving back to old tabstrip.js
* ![rev:75269] #3740: Make tabstrip.js less picky about the URL before the # link
* ![rev:75263] Fixed HTTPRequest::send_file() to actually output the response, whereas before it did nothing
* ![rev:75258] Fixed HTTPRequest::send_file() to send the file properly over SSL with Internet Explorer. Without the pragma header, it won't work
* ![rev:75249] Correctly showing the available languages dropdown in Translatable->getCMSFields() (Merged via: r75685)
* ![rev:75248] Only force DataObject->forceChange() on fields which aren't already marked as changed (Merged via: r75685)
* ![rev:75226] Let users open the root folder in Files and Images section
* ![rev:75223] Disable warning about PastMember cookie if contnet was sent too early.
* ![rev:75182] Make sure tabs resize correctly when they are loaded
* ![rev:75180] Make sure tabs are resized correctly on first load
* ![rev:75161] Disable Geoip if in CLI mode - this fixes the tests from breaking. The geoip command won't be available in CLI context
* ![rev:75156] Setting Classname and RecordClassname properties on internal $record map when constructing a DataObject without passing $record into it. This ensures that getChangedFields() works on ClassName as well, which is required for Translatable->onBeforeWrite() (Merged via: r75685)
* ![rev:75151] #3919: Fix DataObject::dbObject() for decorated fields (Merged from r75150)
* ![rev:75150] #3919: Fix DataObject::dbObject() for decorated fields (Merged via: r75151)
* ![rev:75126] Fixed incorrect spelling of "$this" variable
* ![rev:75125] Fixed CSVParser constructor not passing the arguments to the protected variables delimiter and enclosure
* ![rev:75121] #3681: Added dynamic width style to container div for TinyMCE-inserted images, so if the user resizes, the div width resizes too. Thanks to ajshort for the patch!
* ![rev:75119] Fix DropdownField to select the correct option when using a map with "0" as an array key - useful for boolean searching using DropdownField
* ![rev:75116] Fixed alternative database not being reset back to the normal one after TestRunner is finished
* ![rev:75113] Fixed image editing panel padding in CMS "Insert image" button being squashed
* ![rev:75096] Allow execution of actions (such as Page's search) on ErrorPage; limit the 404 display to the index() action
* ![rev:75095] Use rendered page for 404 pages
* ![rev:75049] Ensure that CheckboxField always returns 1 from the form request data instead of "on" - this was because the value attribute didn't exist on the `<input>` tag
* ![rev:75046] Make sure that CheckboxField sets it's value as either 1 or 0, so that saveInto() saves the proper boolean value
* ![rev:75045] Ensure that CheckboxField setValue() always sets it's value as either 1 or 0, even though the request data can come through as "on"
* ![rev:75039] Fixed case where logging in with a session member ID that didn't exist in the database stopped you from being able to "Log in as someone else"
* ![rev:75038] #3594: Made WYSIWYG editor 50% larger
* ![rev:75034] Select correct default data formatter in restfulserver when there's an apparently useful Accept header that doesn't actually match a data formatter{
* ![rev:75032] Fixed "Log in as someone else" action failure when submitting MemberLoginForm while logged in
* ![rev:75030] when load a new Page (or other type of form in DataAdmin or GenericAdmin), initTabstripe called additional time for every tabstrip on the page
* ![rev:75023] Fixed error if clicking the root of a sitetree in the CMS - affected the AssetAdmin and SecurityAdmin sections
* ![rev:74981] Member::inGroup() returns false instead of an error if group doesn't exist. Ticket #3813 - thanks bgribaudo!
* ![rev:74980] Fixed ajax deletion of Group records properly - the site tree items didn't disappear immediately after deleting
* ![rev:74978] Fixed spelling mistake of "getOrientation" method name on Image
* ![rev:74961] Fixed error if JS/CSS requirements have arguments. Ticket #3860. Thanks simon_w!
* ![rev:74951] Fixed CMSMainTest->testThatGetCMSFieldsWorksOnEveryPageType() - was comparing a string $class with instanceof() instead of comparing the actually created instance (Merged via: r74988)
* ![rev:74942] Fixed TranslatableSearchFormTest->setUp() method (Merged via: r74986)
* ![rev:74927] Clearing Requirements in ScaffoldingComplexTableField, and fixed constructor arguments
* ![rev:74924] Explicitly destroy TinyMCE instances when loading a new page, in an attempt to reduce memory leaks
* ![rev:74920] Moving Requirements for AssetTableField, CommentTableField and MemberTableField from __construct() into FieldHolder() and renderWith(), which means inclusion closer to render time, and less side-effects by a previous Requirements::clear(), e.g. in a CTF popup. See r74919
* ![rev:74919] Moving Requirements for TableField, TableListField, ComplexTableField, ScaffoldComplexTableField and HasManyComplexTableField from __construct() into FieldHolder() and renderWith(), which means inclusion closer to render time, and less side-effects by a previous Requirements::clear(), e.g. in a CTF popup
* ![rev:74904] Removed unnecessary requirements from ComplexTableField_Popup: LeftAndMain.js, LeftAndMain_right.js, TableField.js, ComplexTableField.js - they will be included by the fields if necessary
* ![rev:74902] Making sure all input fields inside a newly added TableField row have unique HTML ids. This was causing problems when javascript logic was acting on those (previously ambiguous fields), e.g. when trying to use a jQuery UI datepicker
* ![rev:74899] If validator doesn't exist on Form, don't attempt to call setForm() on it or you'll get a non-object error
* ![rev:74879] Removed additional $ sign that isn't supposed to be there that broke GroupTest
* ![rev:74725] Fixing CurrencyField serverside and javascript validation to accept numbers with leading or trailing spaces
* ![rev:74721] Fixing NumericField serverside validation to accept numbers with leading or trailing spaces by using trim()
* ![rev:74657] Fixed NumericField javascript validation to not fail on numbers with trailing or leading whitespace
* ![rev:74620] Added missing default english text for "No items found" in TableListField.ss
* ![rev:74489] add more condition before $this->form is used as Caller since $this->form can still not be set yet in a certain circumstance.
* ![rev:74487] A SoapServer will cache the wsdlFile when it is first initialized and never get updated if the constructor is not explicitly passed in 'cache_wsdl' as WSDL_CACHE_NONE.
* ![rev:74477] fixed typos in ResetFormAction
* ![rev:74397] Added missing "Created" and "LastEdited" fields to the MemberTableField export fields
* ![rev:74391] fixed overflow being hidden
* ![rev:74322] Allows DataObjectDecorators and other extensions to specify setters (setFoo) in the same manner as the already working Getters (getFoo).
* ![rev:74303] Allow testing of emails when Email::send_all_emails_to() is set
* ![rev:74272] fixed issue with greyscale GD - patch from camspiers
* ![rev:74098] Fixed javascript error in CommentTableField.js where input elements were not being correctly picked up, due to the form HTML change
* ![rev:74097] Search filter should retain the existing query instead of removing it after each search in MemberTableField and CommentTableField
* ![rev:74092] Fixed issue with StaticPublisher->onAfterWrite() failing because of incorrect arguments to Versioned::get_by_stage()
* ![rev:74071] Fixed Form_EditForm_Locale reference in LeftAndMain_right.js (used to be Form_EditForm_Lang) (Merged via: r74988)
* ![rev:74069] Fixed legacy handling of Translatable::enable(),Translatable::disable() and Translatable::is_enabled() - applying extension to SiteTree instead of Page to avoid datamodel clashes (Merged via: r74986)
* ![rev:74065] Re-added Translatable->isTranslation() for more friendly deprecation (originally removed in r73338) (Merged via: r74986)
* ![rev:73900] Unsetting all cached singletons in Object::remove_extension() to avoid outdated extension_instances
* ![rev:73883] Making $_SINGLETONS a global instead of a static in Core.php so it can be re-used in other places (Merged via: r74986)
* ![rev:73836] Removed version number from `<meta>` generator tag - opt for security by obscurity in this case (originally committed in r70422 and r71172) (Merged via: r73837)
* ![rev:73775] fixed cropping of TreeDropdownField popups and Date popups within complextablefield popups
* ![rev:73758] #3798 ajshort: Let searchcontext be used on sitetree
* ![rev:73608] fixed choppy gradient (or lack thereof) in the tinymce window
* ![rev:73603] updated FormTest with fullstop
* ![rev:73594] Fixed layout of cms rhs area buttons
* ![rev:73593] Simple toolbar alteration to make toolbar fit at 1024x768
* ![rev:73533] Fix call to undefined "_12Hour" function (merged from r73523)
* ![rev:73484] Get installer working with php_short_tags off (Merged r73481-3 from trunk)
* ![rev:73482] #3758: Fixed config-form.html for use with short_open_tag = off (Merged via: r73484)
* ![rev:73472] Fixed translatable test execution by making protected methods public (Merged via: r74986)
* ![rev:73468] Updated MigrateTranslatableTask to new Locale based datamodel (Merged via: r74986)
* ![rev:73465] Fixed Hierarchy->Children() testing in TranslatableTest - with the new datamodel you can't call Children() in a different language regardless of Translatable::set_reading_lang(), the Children() call has to be made from a parent in the same language (Merged via: r74986)
* ![rev:73344] Checking for existence of original before trying to get translation in LeftAndMain->currentPage() (Merged via: r74988)
* ![rev:73343] Changed CSS selector for TranslationTab javascript behaviour to be less specific (Merged via: r74988)
* ![rev:73342] Removed link to "original page" for a translation - no longer valid
* ![rev:73341] Disabled auto-excluding of default language from the "available languages" array in LanguageDropdownField - due to the new "translation groups" its possible to have a translation from another language into the default language (Merged via: r74986)
* ![rev:73339] Disabled "untranslated" CSS class for SiteTree elements - doesn't apply any longer with the new "translation groups" concept (Merged via: r74986)
* ![rev:73338] Removed bypass in Translatable->AllChildrenIncludingDeleted() (Merged via: r74986)
* ![rev:73059] Make object cache testing more robust (Merged via: r74986)
* ![rev:72054] Fixed finding a translated homepage without an explicit URLSegment (e.g. http://mysite.com/?lang=de) - see #3540
* ![rev:71340] Including Hierarchy->children in flushCache() and renamed to _cache_children. This caused problems in TranslatableTest when re-using the same SiteTree->Children() method with different languages on the same object (even with calling flushCache() inbetween the calls) (Merged via: r74986)
* ![rev:71297] Only show the LangSelector dropdown if there's multiple languages available on the site (Merged via: r74988)
* ![rev:71258] Fix translatable being enabled when it shouldn't be (Merged via: r74986)
* ![rev:70324] Making sure that LeftAndMain->CurrentPage() respects language settings - was returning pages in different language from session after switching between languages in cms (Merged via: r74988)
* ![rev:70323] Fixed expanded/unexpanded flags on new tree items - was showing expanded styling (plus icon) with newly created pages
* ![rev:70322] Ensuring that new pages can't be created when in translation mode by disabling the "create..." tree action (Merged via: r74988)
* ![rev:70318] Reverted special cases for Translatable in Versioned->canBeVersioned() (originally committed in r42119) - was checking for existence of underscores in table names as an indication of the "_lang" suffix, which is no longer needed. It was also a flawed assumption which tripped over classes like TranslatableTest_TestPage (Merged via: r74986)
* ![rev:70306] Don't require a record to be written (through exists()) when checking Translatable->isTranslation() or Translatable->hasTranslation()
* ![rev:70214] Falling back to Translatable::current_lang() if no $context object is given, in augmentAllChildrenIncludingDeleted() and AllChildrenIncludingDeleted()
* ![rev:70138] Disabled assumption that SQLQuery->filtersOnID() should only kick in when exactly one WHERE clause is given - this is very fragile and hard to test. It would return TRUE on $where = "SiteTree.ID = 5", but not on $where = array("Lang = 'de'", "SiteTree.ID = 5") (Merged via: r74986)
* ![rev:70080] Fix translatable migration not writing records to Live properly (Merged via: r74986)
* ![rev:69959] Temporarily disabled cookie/session selection in Translatable::choose_site_lang() until we have a good test suite for the side effects.
* ![rev:60171] Improved DataObject::get_one to avoid PHP segfaults (Merged via: r74986)
### Enhancement
* ![rev:75815] Added page location fields in the behaviour tab, as an alternative to drag and drop
* ![rev:75814] Added page location fields in the behaviour tab, as an alternative to drag and drop
* ![rev:75793] Running TestRunner tests suites alphabetically through natcasesort() instead of using the (relatively arbitrary) class ordering from ClassInfo::getSubclassesFor() (Merged via: r75838)
* ![rev:75759] Allow selecting a single field from ComponentSet::getExtraData()
* ![rev:75742] Added DBLocale class for Translatable extension
* ![rev:75737] Added 'show deleted pages' function to CMS, with a restore page option.
* ![rev:75736] Added 'show deleted pages' function to CMS, with a restore page option.
* ![rev:75678] Adapted MigrateTranslatableTask to new Locale datamodel and fixed some inconsistencies with translation groups, duplicate records etc (Merged via: r75685)
* ![rev:75677] Added override flag to Translatable::addTranslationGroups()
* ![rev:75421] Auto-update locale values in Translatable->requireDefaultRecords() with default language when Translatable is first enabled (Merged via: r75685)
* ![rev:75351] Added nl_NL javascript translations for sapphire, see #3896 - thanks Mad_Clog (Merged via: r75685)
* ![rev:75349] Added Translatable->MetaTags() to automatically insert `<link rel="alternate" hreflang="...>` tags into the page template (Merged via: r75685)
* ![rev:75228] #3920: Alllow searching within subfolders in Files and Images section
* ![rev:75226] #3920: Alllow searching within subfolders in Files and Images section
* ![rev:75119] Allow "Yes" and "No" english text to be translated
* ![rev:75037] Added fullscreen button to WYSIWYG toolbar
* ![rev:75036] #3687: Allow the insertion of iframes (such as google maps snippets) into TinyMCEa
* ![rev:74941] Using set_up_once() in TranslatableTest and TranslatableSearchFormTest for better test run performance (Merged via: r74986)
* ![rev:74919] Removed constructor overloading in ScaffoldingComplexTableField, was reconstrcuting its own Requirements (with lots of unnecessary jQuery plugins) which should really be done by the individual form fields and the parent popup class
* ![rev:74489] add the ability that a SimpleImageField could be disabled.
* ![rev:74017] Improved deprecated fallbacks in Translatable by auto-converting short language codes to long locales and vice versa through i18n::get_lang_from_locale()/i18n::get_locale_from_lang() (Merged via: r74986)
* ![rev:73951] Translatable extension is no longer hooked up to SiteTree by default, which should improve performance and memory usage for sites not using Translatable. Please use Object::add_extension('SiteTree','Translatable') in your _config.php instead. Adjusted several classes (Image, ErrorPage, RootURLController) to the new behaviour. (Merged via: r74986)
* ![rev:73900] Unsetting class caches when using Object::add_extension() to avoid problems with defineMethods etc.
* ![rev:73884] Added Extension::get_classname_without_arguments() (Merged via: r74986)
* ![rev:73882] Added DataObjectDecorator->setOwner() (Merged via: r74986)
* ![rev:73473] Added Object::combined_static(), which gets all values of a static property from each class in the hierarchy (Merged via: r74986)
* ![rev:73469] Adjusted CMSMain and LeftAndMain to use locales instead of short lang codes when reading and writing translations. See r73468 for details on the underlying Translatable datamodel change (Merged via: r74988)
* ![rev:73468] Adjusted SearchForm, Debug, ErrorPage, SiteTree to using locales instead of lang codes
* ![rev:73467] Supporting "Locale-English" and "Locale-Native" as listing arguments in LanguageDropdownField (Merged via: r74986)
* ![rev:73466] Added Translatable::get_locale_from_lang(), Translatable::get_common_locales(), $common_locales and $likely_subtags in preparation to switch Translatable from using short "lang" codes to proper long locales
* ![rev:73345] Added CMSMain->IsTranslatableEnabled
* ![rev:73338] Added check for an existing record in Translatable->createTranslation()
* ![rev:73059] Added Object::clearCache() to clear a cache
* ![rev:73036] #3032 ajshort: Use static methods for accessing static data (Merged via: r74986)
* ![rev:72367] Using IETF/HTTP compatible "long" language code in SiteTree->MetaTags(). This means the default `<meta type="content-language...">` value will be "en-US" instead of "en". The locale can be either set through the Translatable content language, or through i18n::set_locale() (Merged via: r74986)
* ![rev:72054] Added RootURLController::get_default_homepage_urlsegment() (Merged via: r74986)
* ![rev:71795] Strip tags before limiting characters when using LimitCharacters() on HTMLText field type
* ![rev:70326] Added ErrorPage::$static_filepath to flexibly set location of static error pages (defaults to /assets) (Merged via: r74986)
* ![rev:70319] Disabled Translatab-e>augmentWrite() - was only needed for the blacklist fields implementation which is inactive for the moment
* ![rev:70308] Removed "Translating mode" status message above edit form - should be clear by the language dropdown above the CMS tree now (Merged via: r74988)
* ![rev:70307] Simplifying creation logic of new languages in CMS by reloading complete interface, rather than refreshing partial interface, language dropdown etc.
* ![rev:70306] Adding link back to original page in CMS editform for translations
* ![rev:70305] Allowing non-default language URLs to be accessed without explicitly specifying the language in GET request (Merged via: r76035)
* ![rev:70118] Made Translatable constructor arguments optional, as by default all database fields are marked translatable
* ![rev:70073] Added basic unit tests to new Translatable API
* ![rev:70072] Added a note about saving a page before creating a translation
* ![rev:69959] Showing clickable links for Translations in Translatable->updateCMSFields()
### Other
* ![rev:76019] HTMLEditorFields won't work
* ![rev:75915] BUGIFX Changed ErrorPage->publish() to doPublish->doPublish() - the publication of static HTML into the /assets directory was lagging one version behind the actual published content
* ![rev:75816] Reverted r69824
* ![rev:75813] Reverted `<div>` being added to images - r69823, r69824
* ![rev:75812] Reverted r69828
* ![rev:75784] ENHANCHEMENT: added ability for a form author to set whether user should be redirected back down the the form rather then just back to the old page
* ![rev:75738] #3927 ENHANCEMENT Added support for many-many auto-setting relations with a standard ComplexTableField
* ![rev:75703] Merged r75696 from cms/trunk
* ![rev:75702] Merged r75697 from sapphire/trunk
* ![rev:75701] Merged r75691 from jsparty/trunk
* ![rev:75700] Merged r75690 from sapphire/trunk
* ![rev:75698] Merged r75689 from jsparty/trunk
* ![rev:75660] Merged from trunk
* ![rev:75267] Reverted r75263 and r75264
* ![rev:74988] Merging refactored Translatable from trunk, and related changes to CMSMain
* ![rev:74986] Merging in refactored Translatable architecture from trunk, including related/required changesets like enhancements to Object static handling (see details below)
* ![rev:74980]
* ![rev:74969]
* ![rev:74900] Reverted r74899
* ![rev:74714] Fix resize being called an additional time for every tabstrip on the page
* ![rev:74501] Undoing changeset committed in r74490
* ![rev:74416] fix the bug in Mingle (SC #234):Users reporting a parse error when trying to open grants. also HD(1571).
* ![rev:74304] Added SiteTree onAfterRevertToLive handler
* ![rev:74092]
* ![rev:73613] Merged r71795 from trunk
* ![rev:73481] Added a syntax checking test that will use short_tags on and off and asp_tags on (Merged via: r73484)
* ![rev:73452] Fixed issue with ModelAdmin tab CSS
* ![rev:71567] 'URLSegment' on line 484 and 494 now escaped (Merged via: r74986)
* ![rev:70033] Add translation migration task (Merged via: r74986)
* ![rev:69959] Merged, debugged and enhanced Translatable patches from branches/translatable at r64523, r64523, 64523, thanks wakeless!
* ![rev:68917] Merged Requirements fix from nestedurls branch (Merged via: r74986)
* ![rev:68915] Fixed bug in Requirements::disable() (Merged via: r74986)
* ![rev:68912] Bugfixes for recent staticpublisher imports (Merged via: r74986)
* ![rev:68911] Bugfix for staticpublisher updates in trunk (Merged via: r74986)
* ![rev:68900] Static caching merges from dnc branch (Merged via: r74986)
* ![rev:61495] Fixed bug that was causing phantom pages on DNC - no need to merge, because trunk already has this (Merged via: r74986)
* ![rev:61493] Fixed bugs with redirector page error message and static publishing - it created blank 'phantom' pages at the top level (Merged via: r74986)
* ![rev:60015] Set default cache behaviour to uncached. This is a good new default behaviour and can be merged. Pages that are cacheable should call HTTP::set_cache_age() in their controller init (Merged via: r74986)
* ![rev:60007] Fixed bug with calling DataObject::flush_and_destory_cache more than once (Merged via: r74986)
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/changelogs/2.2.0.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/changelogs/2.2.0.md
| 19,444 | 1,758,118,090 |
en
|
# 2.2.0 (2007-11-28)
SiverStripe 2.2.0 was released on '''28 November 2007''' and had the following changes:
## Upgrading
### Login Form
Check that you have a Layout/Page.ss file for your site, or alternately have a Security_login.ss template.
Your template file needs a $Form variable for it to work. This is where the login form gets included. Without either of
these, the Security/login form will be blank.
### Form Actions HTML/CSS
Check css/js and subclassed templates of Form.ss for changed markup. A global search for "p.Actions" should cover both
js/css changes.
:::html
// before
<p class="Actions">
// after
<div class="Actions">
See http://open.silverstripe.com/changeset/43562
### Form Security Token
There has been a hidden 'SecurityID' field added to SilverStripe generated forms by default, with the purpose to stop
CRSF attacks. If you wish your form not to be tied to a specific session, and able to be able to be executed by URL
without the SecurityID, you can disable it on your form with
:::php
$form->disableSecurityToken();
The other issue to be aware of is constructing the URL to execute the form manually, as is done in javascript sometimes.
If the security token is enabled, you need to add its value to the URL, eg:
:::js
updateURL += ($('SecurityID') ? '&SecurityID=' + $('SecurityID').value : '');
### Custom Section in CMS
Special attention will need to be given to custom sections on a case-by-case basis.
As we have changed the design of the CMS, the top bar for your custom sections is no longer needed. We've moved the
buttons that it once held down to the bottom.

### Classes added to 2.2 that may conflict
Sitemap.php
## Features
* New look for CMS
* Support for authentification by OpenID (auth_openid module included with installer)
* Google Sitemaps support
* Internationalisation support
* German translation
* Dutch translation
* Chinese (simplified) translation
* Spanish translation
* French translation
* Croatian translation
* Polish translation
* Portuguese (Portugal) translation
* Support for multilingual content
* Added a Statistics area showing the following reports
* Page views
* User activity
* Trends
* Operating Systems
* Browsers
* Added an image editor, allowing a user to rotate, crop and resize an image from within the CMS
* Added profile popup in CMS
* Added a 'Sent Status Report' tab to Newsletters with the following reports
* Sending to the following recipients failed
* Sending to the following recipients bounced
* The newsletter has never been sent to following subscribers
* Sending to the following recipients was successful
* Sending to the following recipients did not occur because they are blackListed
* Add 'Send to only people not previously sent to' option for sending newsletters
* Added SWFUpload library as default method of uploading files
* Added photo upload in from the Site Content section
* Added the ability to search the Site Content tree
* Added the ability to publish selected pages
* Added a list of unused assets in the Files & Images section, and the ability to delete unused thumbnails
* Usability improvements
* Move action buttons to bottom right of screen
* Moved insert image/flash/link to pane on right
* Removed right frame headers as the buttons have been moved and they only contain redundant information
* Use a javascript dialog box for confirming unsaved changes instead of the slow loading model one
* Reworked the tabs in the Newsletter section to be less confusing
* Cancel button added to Send Newsletter window
* External logo link opens in a new window
* Left sections in Site Content 'Site Tree', 'History' and 'Reports' now use expandable sections rather than tabs
* Relabeled 'Site Tree' to 'Site Content & Structure', 'History' to 'Page Version History' and 'Reports' to 'Site Reports' in left sections of Site Content
* Relabeled 'Files & Images' left frame to 'Folders'
* Added tooltips to site content tree, showing the page type
* In the 'Page Version History', use a checkbox lable 'Compare mode (click 2 below)' instead of a dropdown
* Renamed 'Save draft' button to 'Save'
* The 'Save' button text changes to 'Saving...', and the 'Publish' button text changes to 'Publishing...' when they are clicked
* Added save indicator to all 'Save' buttons, the 'Save & Publish' button and the 'Unpublish' button while they are being submitted
* Added a go button to the 'Site Reports' dropdown
* Relabeled 'Name' field to 'Folder Name' in Files & Images section
* Renamed the 'Save' button to 'Save folder name' in Files & Images section
* Relabeled 'Send newsletters from' field to 'From email address' in Newsletter section
* Removed the 'Move Files' button from Files & Images section, implemented multi-file drag & drop moving
* Add 'Newsletter Settings' tab to Newsletter type edit form for consistency with other forms
* Make the status message shown after sending a newsletter always include the # of emails sent
* Added delete confirmation for items in Newsletter left tree
* Added delete confirmation for items in Security left tree
* Make 'Add new draft' the default action for 'Create...' in the Newsletter section
* Replace the 'reorganise' button with 'Allowing drag & drog reordering' checkbox
* Delete and Unpublish buttons turn red on hover
* Added the ability to align images 'left on their own'
## Enhancements
* New classes
* Authenticator, allowing multiple authentification methods
* ConfirmPasswordField
* DropdownTimeField
* i18n, for internationalisation
* LanguageDropdownField
* LoginForm, base class for login forms for each authentification method
* MemberAuthenticator, providing username/password authentification
* MemberLoginForm, refactored from old LoginForm form
* PopupDateTimeField
* ToggleField
* OpenIDAuthenticatedRole, which is an extension to Member that adds OpenID authentification columns
* OpenIDAuthenticator, providing OpenID authentification
* OpenIDLoginForm, providing OpenID sign in
* PageView, which saves the details of each page view for statistics
* Statistics, which provides static methods for statistics
* Translatable, for multilingual content
* New third party libraries
* PHP OpenID (http://openidenabled.com/php-openid/)
* Browscap (http://garetjax.info/projects/browscap/)
* Plotr (http://www.solutoire.com/plotr/)
* SWFUpload (http://profandesign.se/swfupload/)
* Improved classes
* CalendarDateField
* Refactored part of Field() into HTMLField() so it can be used in PopupDateTimeField
* ComplexTableField
* Improved pagination in popup
* Better transformation of save-button (replaced indicator with "saving..." label)
* CompositeField
* Added SmallFieldHolder() to properly render fields in a FieldGroup
* Added insertBeforeRecursive()
* Allow empty children
* Added Field()
* Added linebreaks for HTML
* ConfirmedFormAction
* Respect $extraClass
* ContentController
* Save statistics on page views
* Added LangAttributes(), for use in XML header
* Draft/Archived content can only be viewed by users with permission to access the CMS
* Core
* Added _t() for internationalisation
* Check if TEMP_FOLDER is already defined before defining it, allowing the user to set the temporary folder themself
* DataObject
* Added merge()
* Director
* Added extend_site(), which allows modules to register a function that will be run on every page load
* redirectBack() now redirects to the base URL if neither the referrer nor the _REDIRECT_BACK_URL is set
* Added support for translatable URLs
* Added is_cli()
* Added set_status_code() and get_status_code()
* Email
* Define 'EMAIL_BOUNCEHANDLER_KEY' in sapphire/_config.php and require its value to be sent as 'Key' $_GET var in pings to /Email_BounceHandler to prevent fake email bounce pings
* Display an error on duplicate bounce logs instead of a blank screen
* If the contents of the X-SilverStripeMessageID header is sent to /Email_BounceHandler in the 'SilverStripeMessageID' _GET variable, then it will be logged in the Newsletter_SentRecipient table so that the bounce report will show up on the 'Sent Status Report' tab of the Newsletter
* Bounced newsletter recipient emails and blacklisted by default
* FieldSet
* Added insertBeforeRecursive()
* FileSystem
* Added $file_create_mask and $folder_create_mask, which are used whenever creating new files/folders in sapphire
* Form
* All Forms now have a hidden SecurityID field to prevent CSRF attacks
* Added disableSecurityToken() to disable the SecurityID field
* Added securityTokenEnabled()
* Changed `<p class="Actions">` to `<div class="Actions">`
* Renamed PureName() to Name()
* GD
* Added rotate()
* Added rotatePixelByPixel(), allowing rotation where the imagerotate function is unavailable
* Added crop()
* Added getWidth()
* Added getHeight()
* Hierachy
* Versioned now automatically add suffixes, so Hierachy no longer needs to
* HTTP
* Added register_modification_timestamp()
* Added register_etag()
* ImageField
* Improved layout
* Int
* Added support for default value
* ManifestBuilder
* Refactored getClassManifest() for clearer ignore rules
* Ignore i18n language files
* Ignore folders that have a '_manifest_exclude' file
* Member
* Automatically login user if the 'remember login' cookie is set
* Added createNewPassword(), which generates a random password, optionally using a word list
* Added support for password encryption
* Added Locale field to store user preferred language
* Added the ability for Member decorators to augment MemberFormFields()
* MemberLoginForm (refactored from old LoginForm)
* Save the email address in the session to reuse when the login fails
* ModelAsController
* Added support for translatable URLs
* Object
* Added require_developer_login(), which allows you to check if the user has permission to use URL debugging tools
* ?debugmethods=1 now requires developer login
* PageComment
* Added the ability to have BBCode in comments (disabled by default)
* PasswordField
* Always show five stars in performReadonlyTransformation(), so it is impossible to use the information of the password length for brute-force attacks
* Permission
* Added declare_permissions()
* Added get_declared_permissions_list()
* Added traverse_declared_permissions()
* Added Permission_Group class, used to group permissions together for showing on an interface
* Added $admin_implies_all, if this is false then the 'ADMIN' permission doesn't imply all permissions
* Refactored Permission::checkMember(), should be faster now because the non-strict checking is now only executed if the user doesn't has the permission
* Added deny(), giving the ability to define 'deny permissions'
* RecipientImportField
* Added default 'GenericEmail.ss' template
* RestfulService
* Added caching
* RSSFeed
* Added support for conditional GETs
* Security
* Added support for password encryption
* Added set_word_list() and get_word_list(), to set the location of the word list used in Member::generateNewPassword()
* Session
* Added save(), which copies the current controllers session to $_SESSION
* SiteTree
* Changed references to 'stage site' to 'draft site' in TreeTitle()
* Use Translatable interface by default
* Add content language in MetaTags()
* Add delete class to unpublish and rollback buttons
* SSViewer
* Added support for internationalisation in templates, using `<% _t() %>`
* Added $Iteration in templates, which keeps track of the number of iterations in a control block
* TableListField
* Prevent onclick event in td.markingcheckbox from showing the popup
* TabSet
* Remove tabset div to reduce wasted space on tabs
* Added insertBeforeRecursive()
* ToggleCompositeField
* Refactored from TogglePanel
* Added icons and used 'cursor: pointer' to make it obvious that it is clickable
* Versioned
* Added the ability to versionise suffixed tables that have names that are not DataObject descendants
* Added canBeVersioned()
* Added extendWithSuffix()
* Added hasVersionField()
## Bugfixes
* Sapphire
* E_NOTICE fixes
* Fixed incorrect deprecated message in Convert::raw2xml()
* Don't show and error message and quit the script when @ is used to suppress the error
* Changed width of HTMLEditorFields to prevent horizontal scrollbars in IE7
* Added checks in DataObjectSet::First() and DataObjectSet::Last() to prevent errors on an empty $items array
* Fixed incorrect treatment of Member::logout() as a static method in Security::logout()
* Ensure Priority is set in SiteTree::onBeforeWrite(), otherwise an invalid SQL statement will be generated when the page is published
* Only highlight broken links in HTMLEditorFields once, to prevent execution timeouts when there are lots of identical broken links
* Fixed bug "Fatal error: Access to undeclared static property: Controller::$db in ../sapphire/core/Object.php(282) : eval()'d code on line 1"
* Fixed DataObjectDecorators not supporting indexes and defaults
* Fixed ReportField generating invalid HTML
* In Member::setBlacklistedEmail() call this->write() so that the BlacklistedEmail field state will be saved to the Member database table
* Fix Email_BlackList::isBlocked() to check the BlockedEmail field instead of non-existant Email field so that it will actaully return true when an email is blocked
* Fix layout problems with search box in IE by only generating a label tag if TItle is set in FormField::FieldHolder()
* Fixed Permission::check() not p[assing $strict to Permission::checkMember()
* Fixed HTTP::gmt_date()
* Fix validation of Member extensions
* Removed DriversLicense references from LoginForm (project specific clutter)
* Added check for existence of #sitetree in RelationComplexTableField.js
* Fixed VirtualPage creation
* Fixed lighttpd flushing bug
* Fixed CustomRequiredFields
* Fix bugs with ComplexTableField when it is used outside of the CMS
* Fixed error saving when value is undefined in HasOneComplexTableField and HasManyComplexTableField
* Fixed saving error in FileIFrameField
* Added a security fix for Security::check_default_admin()
* Fixed caching in DataObject::getManyManyComponents() to take into account different SQL parameters
* Geop::ip2country() now throws an E_USER_NOTICE instead of an error when it cannot run geoiplookup
* Added if() check around a foreach loop that was causing errors when there were no entries in an RSS feed
* Fix inheritance in ManyManyComplexTableField
* Fixed FormField::setRightTitle() not showing because of a typo
* Create assets folder if doesn't eixts on ErrorPage publish
* Fixed submission of ImageField when no file was selected
* Catch errors in ContentController::deleteinstallfiles()
* Fix generation of group codes on creation of a Group
* Fix title on LabelledLiteralField
* Fix ImageField deleting the Image instead of unlinking it from the page
* Set TimeField value to null when a bad value is passed
* Don't return a span when the Title doesn't exist in DropdownField
* Fix bug where NumericField couldn't have 0 as a default value
* Call Page_Controller->init() when rendering Security/changepassword etc to respect any Requirements called in there
* Fixed an error when a CheckboxSetField is submitted with no checkboxes ticked
* Fixed exporting of TableListField to use commas for CSV files
* ?previewwrite no longer works on live sites
* Fixed incorrect CSS in TableListField.css
* Fixed incorrect namespacing in TableListField::BaseLink()
* If a CreditCardField is completely blank, then it's not invalid. Required-fields should be used to check for values.
* CMS
* E_NOTICE fixes
* New pages are created in the database straight away, which solves a number of issues
* Fixed Email link not working in page history
* Unsaved changes detection now works in Security section member tables
* Fix typo in LeftAndMain::addTreeNodeJS() by renaming 'select' parameter to 'selected' because 'selected' is what is used in the method body
* Delete image thumbnails after deleting an image
* Use 'html>body' instead of just 'html>' so that #sitetree correctly gets assigned width:auto on Mozilla browsers (prevents Folders being selected from 500px away on file drag and drop)
* Display a useful error message if getCMSFields() returns null
* When 'Duplicate this page' is clicked, first silently (without confirmation) save the page, then duplicate it so the new page is identical to the other page
* Fix errors when importing recipients to newsletter mailing list
* Fixed blocking during resize in IE6
* Don't show a 'No template selected' error when sending a test Newsletter if no template has been selected since templates for Emails are optional
* Fixed bug 'for newly created newsletter drafts, content of newsletter sent is not what is shown on screen'
* Don't save new Newsletter drafts as soon as they are created to prevent TinyMCE Javascript errors in IE
* Add if((typeof tinyMCE != 'undefined')) statement around call to tinyMCE.init() to prevent "Error: 'tinyMCE' is undefined" error in IE7 on Newsletter Recipient import
* Don't allow a deleted draft to be edited in the Newsletter section
* Fix a bug where newsletter drafts will be added, but not show up in the left tree (because of a Javascript error), if no selection has been made
* If there are no newsletter types, and 'Add new draft' is chosen, create a newsletter type to prevent errors
* Fix changed icon only showing after Save button is clicked twice
* Fixed VirtualPage creation
* Fix 'Sort subpages' not working correctly
* Use classes instead of the align tag to align images
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/changelogs/2.2.2.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/changelogs/2.2.2.md
| 31,492 | 1,758,118,090 |
en
|
# 2.2.2 (2008-05-22)
SilverStripe 2.2.2 was released on '''22 May 2008''' and had the following changes:
## Features and Enhancements
* Set svn:externals for new phpinstaller release tags/2.2.2 (changeset 54973)
* Disable / fix flash uploading (changeset 54959)
* Fixed php/code snippets in forum posts (changeset 54619)
* BUGFIX #2504 - Fixed translation interface not working in CMS (changeset 54472)
* Removed references to 'mot' folder in code (changeset 54407)
* #2501 + #2500 - Fixed notice-level errors in editable forms (changeset 54402)
* #2482 - Fixed newsletter unsubscribe (changeset 54215)
* #2447 - Bug in editing comment (changeset 54212)
* Don't mark a test site as being in dev mode if set_test_servers matches (changeset 53373)
* FEATURE: added phpdoc comments to the API calls for customising CMS rebranding (changeset 53216)
* BUGFIX: Ticket #2449 - Fixed unsubscribe function - because it's extending ContentController without a data record, we have to hack this by using null in the parent::__construct() - This however, should be refactored to have a data record (page in the CMS) (changeset 53210)
* MINOR: PHP notice fix - undefined variable (changeset 53204)
* MINOR: Fixed some php notices (changeset 53188)
* BUGFIX: Removed display: none for "nolabel" class - this is custom project code, and shouldn't be in sapphire! (changeset 53175)
* BUGFIX: Ticket #2455 - Check variable exists before accessing Password index (changeset 53160)
* BUGFIX: Removed undefined variable $mem - we include ini_set for memory_limit in main.php instead (changeset 53156)
* _t call for EXPORTCSV problem fixed (changeset 53106)
* DataReport EXPORTCSV field missing (changeset 53105)
* API CHANGE Removed deprecated/incomplete Synchronise class - please do not use for production purposes (changeset 53101)
* Made has_one, has_many, and many_many methods more reliable (changeset 53075)
* Fix drag&drop in assets and security (changeset 53073)
* Make double-redirects a warning rather than an error, since they are usually benign. (changeset 53066)
* Don't redirect from /home to / if you've already called a redirection. (changeset 53066)
* Fixed ContentController where ->dataRecord is empty (changeset 52719)
* Don't strtolower ->action, as it had too many side-effects. (changeset 52452)
* #2387 - Fields specified in DataObjectDecor not saved in some cases (changeset 52448)
* Newsletter import: only send a change notification email if there are changes to be sent (changeset 52434)
* #2378 - Fixed newsletter import (changeset 52432)
* Fixed Authenticators to work with r52400 (changeset 52401)
* #2299 - Fatal error in specific version of PHP (changeset 52400)
* BUGFIX re-initializing tabstrip javascript after ajax-reload in AssetTableField popup (#2309 AssetTableField popup fails after saving) (changeset 52399)
* Fix to ManifestBuilder when running site on windows in a directory containing \r or \t or \n (changeset 52398)
* #2388 - Fixed CMS search. (changeset 52395)
* BUGFIX disable third party browscap by default (#2336) (changeset 52394)
* formatting (changeset 52393)
* Upgraded SWFUpload to improve CMS uploads (changeset 52392)
* Show security id errors on test sites as well as dev (changeset 52391)
* Improved behaviour of contentcontrollerInit when extensions are applied to subclasses of SiteTree (changeset 52350)
* fix comment admin not working correctly (changeset 52309)
* Added LeftAndMain::set_loading_image() for replacing the image shown when the CMS is loading (changeset 52298)
* Fix pagecomment links and feeds (changeset 52296)
* fix links in RSS feeds (changeset 52295)
* don't cache in overridden instance_get(), as the fields are different for subclasses (changeset 52293)
* #2314 - Fixed SQLMap implementation so that Group::map() returns appropriate data, and the group dropdown on the access tab works. (changeset 52224)
* #2362 - Fixed change password form (changeset 52213)
* Add scrollbar to RHS link inserter, so you can see everything (changeset 51973)
* Fix to anchor insertion (changeset 51963)
* fix php notice (changeset 51938)
* Make Object::hasMethod() and Object::__call() case-insensitive, and added tests for it (changeset 51462)
* Test for hasMethod (changeset 51461)
* Fixes to TestRunner for latest PHPUnit/PHP (changeset 51459)
* API CHANGE Allow for tests that don't use the database - don't define a static SapphireTest:: (changeset 51150)
* Fixed typo in r51150 (changeset 51151)
* Fixed HomepageForDomain behaviour when entering multiple domains (changeset 51436)
* API CHANGE Added RestfulService::httpHeader() for setting custom headers on REST requests (changeset 51203)
* API CHANGE Added RestfulService::basicAuth() for setting authentication for REST requests (changeset 51203)
* API CHANGE Added param to RestfulService::connect(), to allow for requesting of multiple URLs from a single RestfulService object. (changeset 51203)
* Updates to usability & IE support of link insertion (changeset 51081)
* #2265 Installer falsely claims modrewrite fails (mamp) (merged from trunk, r50698) (changeset 51070)
* #2282 Undefined index in install.php (merged from trunk, r50698) (changeset 51069)
* #2266 Fresh install of SilverStripe? doesn't let you upload or view images to insert, until you first go into Files and Images area (merged from trunk, r50695) (changeset 51068)
* Cleaned up ChangeLog (changeset 51064)
* updated changelog for 2.2.2 (changeset 51042)
* Added delete from stage button to CMS (changeset 50852)
* Added Translations for Danish (Denmark) - thanks to Jesper and Dennis (changeset 50824)
* Added Translations for Esperanto - thanks to Wojtek, Donald, Evan and Joop (changeset 50824)
* Added Translations for Finnish (Finland) - thanks to Elias, Vesa and Nina (changeset 50824)
* Added Translations for LOLCAT - thanks to Wojtek (changeset 50824)
* Added Translations for Sinhalese (Sri Lanka) - thanks to Nivanka, Himali and Lakshan (changeset 50824)
* Updated several translations in cms/auth_openid/sapphire (changeset 50824)
* Added package names for i18n files (changeset 50824)
* Reverted patch from r47694 which introduced conditional statements in lang-files (changeset 50824)
* Added Translations for Danish (Denmark) - thanks to Jesper and Dennis (changeset 50824)
* Added Translations for Esperanto - thanks to Wojtek, Donald, Evan and Joop (changeset 50824)
* Added Translations for Finnish (Finland) - thanks to Elias, Vesa and Nina (changeset 50824)
* Added Translations for LOLCAT - thanks to Wojtek (changeset 50824)
* Added Translations for Sinhalese (Sri Lanka) - thanks to Nivanka, Himali and Lakshan (changeset 50824)
* Updated several translations in cms/auth_openid/sapphire (changeset 50824)
* Added package names for i18n files (changeset 50824)
* Reverted patch from r47694 which introduced conditional statements in lang-files (changeset 50824)
* Added Translations for Danish (Denmark) - thanks to Jesper and Dennis (changeset 50824)
* Added Translations for Esperanto - thanks to Wojtek, Donald, Evan and Joop (changeset 50824)
* Added Translations for Finnish (Finland) - thanks to Elias, Vesa and Nina (changeset 50824)
* Added Translations for LOLCAT - thanks to Wojtek (changeset 50824)
* Added Translations for Sinhalese (Sri Lanka) - thanks to Nivanka, Himali and Lakshan (changeset 50824)
* Updated several translations in cms/auth_openid/sapphire (changeset 50824)
* Added package names for i18n files (changeset 50824)
* Reverted patch from r47694 which introduced conditional statements in lang-files (changeset 50824)
* #2283 Permissions are a bit broken - what happened to all the CMS permissions? (changeset 50957)
* #2310 MemberTableField Popup breaks after saving (changeset 50954)
* #2310 MemberTableField Popup breaks after saving (changeset 50954)
* BUGFIX fixed csv export in MemberTableField by checking for valid database columns when building SELECT statement (changeset 50952)
* FEATURE added hasDatabaseField() (changeset 50949)
* BUGFIX properly setting $childID in form for newly created items to avoid duplicates after subsequent saving (the form reloaded without the ID connection) (changeset 50947)
* Make RSS feed work with objects that don't support AbsoluteLink, such as the forum (changeset 50921)
* fixing typo in parameter name $validate --> $validator (changeset 50641)
* made $messageType parameter of Validator::validationError optional, and added API docs to explain what (apparently) is going on (changeset 50645)
* fixing bug with in-memory child objects not having their parent ID field updated via the ->add() method (changeset 50815)
* #2302 - Fixed double-escaping of CTF popup page-navigation links (changeset 50903)
* reverted r49775 (accidental removal of "add" feature, its actually not redundant functionality) (changeset 50854)
* fixed xhtml error (forgot closing `<p>`) (changeset 50849)
* updated en_US master entities (changeset 50844)
* updated en_US master entities (changeset 50844)
* updated en_US master entities (changeset 50844)
* fixed PHP notices (changeset 50840)
* fixed PHP notices (changeset 50838)
* formatting, fixed PHP notices (changeset 50836)
* fixed PHP notice (changeset 50829)
* documentation (changeset 50814)
* #2285 - Fixed widget editor (changeset 50812)
* added $searchable_fields in preparation for a more generic search implementation, currently limited to Member.php and MemberTableField.php (mainly to fix bugs caused by r49774 and r47856) (changeset 50805)
* fixed weird indentation formatting in Member.php (changeset 50805)
* Fixed default-setting for link anchor (changeset 50786)
* Added 'anchor' option to link inserter (changeset 50783)
* Fixed svn:externals (changeset 50776)
* Moved externals to used HTTP for 3rd-party friendliness (changeset 50764)
* fixed typo (changeset 50729)
* added database indexes for AuthorID and PublisherID (changeset 50723)
* #2265 Installer falsely claims modrewrite fails (mamp) (changeset 50697)
* #2295 - DataObjectSets cannot be iterated over multiple times concurrently (changeset 50683)
* #2280 - Fixed XML parsing errors in CTF (changeset 50488)
* #2287 - Removed notice-level error when geoip's not installed (changeset 50487)
* Fixed newlines in to-do report (changeset 50361)
* #2277 - Fixed notice-level error on controllers that are direct subclasses of controller (changeset 50352)
* Added support for password and old_password encryption mechanisms if you're using MySQL (changeset 50290)
* Small fix for session bugs on Lightspeed server (changeset 50245)
* A bit of a hack to fix double-escaped URLs in the CMS. (changeset 50214)
* Fixed CMS bottom-navigation after publish, when using the subsites module (or other alternateAbsoluteLink implementors) (changeset 50205)
* Fixed password emailing for edited members (changeset 50200)
* Allow use of on controller extensions (changeset 50180)
* Fixed 4.1-sort-by-group-aggregate query rewriter for sort functions containing columns, eg, ORDER BY if(A,B,C), X (changeset 50179)
* Fixed notice level error (changeset 50047)
* Fixed bug with BasicAuth enabled on an old database, it was preventing you from visiting db/build (changeset 50031)
* Fixed MySQL 4.1 support for situations where we are sorting by a group aggregation function (changeset 49999)
* Fixed notice level error (changeset 49999)
* fixed caching in getManyManyComponents (see r43848) (changeset 49946)
* removed redundant error strings (changeset 49922)
* Added a default exception handler. Any uncaught exceptions thrown from application code are now scooped up by the Debug::fatalHandler (changeset 49906)
* (changeset 49906)
* Still some small problems with displaying stack traces of exceptions because the context array from trigger_error looks quite different from that of Exception::getTrace (changeset 49906)
* (changeset 49906)
* Also fixed a couple of echo/print bugs in Debug::friendlyError. From the looks of the code there may be more bugs to cleanup here. (changeset 49906)
* Fixed Controller::allowed_actions documentation (changeset 49896)
* Added to main CMS controllers (changeset 49895)
* Removed warning in group admin (changeset 49894)
* Improved allowed_actions support for subclassed controllers, such as CMSMain extends LeftAndMain (changeset 49893)
* Removed use of deprecated setExtraClass (changeset 49892)
* Moved _ss_environment.php include to very top (changeset 49891)
* Added deprecation note to BulkLoaderAdmin (changeset 49890)
* added $casting for BaseHref() (changeset 49843)
* fixed sql-injection (changeset 49834)
* Updated AssetAdmin to use TreeTitle() in place of Title for tree generation (changeset 48425)
* > Updated TreeTitle() to allow use of alternateTreeTitle() in decorator (changeset 48425)
* > Updated File to allow the insertion of extra columns by decorator (changeset 48425)
* Updated subject line of warning/error emails (changeset 49732)
* Moved folder admin form to Folder::getCMSFields() to let you more easily manipulate the form with a decorator (changeset 49804)
* Disabled notice level error until more of the core is compliant (changeset 49803)
* Moved CMS page-disabled logic into SiteTree::CMSTreeClasses(), so that it can be more easily customised for specific sites (changeset 48376)
* Added Member->SetPassword, a field that lets you have a write-only password field (changeset 46525)
* Used Member->SetPassword to create a password column on the MemberTableField for SecurityAdmin (changeset 46525)
* Send 'changed password' emails when a user is first created as well as edited (changeset 46525)
* Fixed DataObjectSet::insertFirst() - it now uses a numeric key rather than null (changeset 45750)
* Create Group::canEdit(), which can be used to filter the SecurityAdmin group list (changeset 45748)
* Redirect to legislation section when there are only legislation pages (changeset 45654)
* Allow selection of folder when inserting files / images (changeset 45654)
* Minor bugfixes (changeset 43980)
* Added additional checks so that the email doesn't get sent to new members, or on the test site. (changeset 43384)
* Used Object::create() to create email instances sent by the system. (changeset 43342)
* Added BaseHref() to Member_ChangePasswordEmail so that the email shows the domain name of the current subsite. (changeset 43340)
* Tidied up lost password form. (changeset 43339)
* Added Member::$notify_password_change (changeset 43336)
* Added missing ChangePasswordEmail.ss (changeset 43335)
* Saving the member with a changed password now sends an email to the member. (changeset 43334)
* Updated AssetAdmin to use TreeTitle() in place of Title for tree generation (changeset 48425)
* > Updated TreeTitle() to allow use of alternateTreeTitle() in decorator (changeset 48425)
* > Updated File to allow the insertion of extra columns by decorator (changeset 48425)
* Updated core to allow for subsites restriction of filesystem: Folder::getCMSFields() is now responsible for generating the folder form. (changeset 48401)
* Folder::syncChildren() now exclusively uses DB::query() calls instead of DataObject::get(). (changeset 48401)
* Moved CMS page-disabled logic into SiteTree::CMSTreeClasses(), so that it can be more easily customised for specific sites (changeset 48376)
* Removed redundant Add Member button at the top-right (changeset 46526)
* Added Member->SetPassword, a field that lets you have a write-only password field (changeset 46525)
* Used Member->SetPassword to create a password column on the MemberTableField for SecurityAdmin (changeset 46525)
* Send 'changed password' emails when a user is first created as well as edited (changeset 46525)
* Changed call to ViewableData::castingHelperPair to fix sort not being set by getNewItem (changeset 43365)
* Added LeftAndMainSubsites->augmentNewSiteTreeItem that allows extensions of LeftAndMain to provide the current SubsiteID for the new item. (changeset 43321)
* CMSMain->getNewItem now calls $this->extend('augmentNewSiteTreeItem', $newItem); (changeset 43321)
* Changed DataObject to be a subclass of ViewableData instead of Controller, so that it can't be hacked by visiting Page/write. (changeset 49767)
* reverted accidental delete in r49761 (changeset 49766)
* e-This line, and those below, will be ignored-- (changeset 49766)
* (changeset 49766)
* A svn://svn.silverstripe.com/silverstripe/open/themes/blackcandy/trunk/blackcandy_blog (changeset 49766)
* reverted accidental delete in r49760 (changeset 49765)
* revert accidental commit in r49763 (changeset 49764)
* readding blackcandy (reverted r49761, r49762) (changeset 49763)
* Removed unused blackcandy blog (changeset 49762)
* Removed unused themes (changeset 49761)
* #2200 - Allowed subclasses in ComponentSet::add/remove (changeset 49715)
* #1878: wakeless: Supress disabled errors on live site (changeset 49709)
* Merged r49479 from branches/2.1.1-madebyme (changeset 49658)
* Merged r46528 from branches/2.1.1-madebyme (changeset 49657)
* Bypass debug handler for E_USER_NOTICE as well as E_NOTICE (changeset 49593)
* #2203 - ManifestBuilder regex (changeset 49448)
* fix caching in complex table field (changeset 49447)
* added setFields()/setActions() (changeset 49386)
* formatting (changeset 49386)
* reverted accidental commit (changeset 49352)
* added gwgtn theme files (changeset 49349)
* Added SS_DEFAULT_ADMIN_USERNAME/PASSWORD defines to conf/ConfigureFromEnv.php (changeset 49308)
* #177 - Don't let people create a page name the same as a class name (changeset 49193)
* Disabled unused files list, as it uses way too much memory (changeset 49192)
* #1921 - Make DataObject::write() call the recursive write on components, even when the dataobject itself hasn't changed (changeset 49187)
* #1956 - Show Title in RSSFeed (changeset 49184)
* simon_w: #1954 - Added object caching methods (changeset 49182)
* #1951 - Fix newsletter subscription form (changeset 49181)
* Removed clone behaviour from Form::Fields() (changeset 49180)
* Added SubscribeSubmission template to get subscribeforms to work (changeset 49177)
* Added default SubscribeForm.ss (changeset 49176)
* Fixed ManifestBuilder execution in restrictive openbasedir environments (changeset 49172)
* #1987 - Fixed sitename/?url=sitename bug (changeset 49151)
* #2016 - Added all the types of error pages (changeset 49150)
* #2137 - Changed email encoding from iso-8859-15 to utf-8, in compliance with other parts of SilverStripe and IMC recommendations (changeset 49149)
* fixed i18n::get_owner_module() calls on classes with _s (changeset 49148)
* Improvement to link-insertion logic when selecting text that doesn't have a link (changeset 49147)
* #1881 - Duplicated words in error message text (changeset 49066)
* documentation (changeset 49033)
* documentation (changeset 49032)
* fixed typo in doc comment (changeset 48972)
* fix sql error on comments section (changeset 48970)
* #2088 - Notice level error on compare versions (changeset 48969)
* #2005 - Fixed seamonkey browser recognition (changeset 48968)
* fix upload folder (changeset 48857)
* #2212 / #2201 - Fix notice-level errors in PageView updates (changeset 48941)
* mrickerby: #2201 - fixed PageView's recording of referrers. (changeset 48912)
* For some project we need server run some scheduled task yearly, such as upgrade high school students for GSO. (changeset 48906)
* updating form in ctf-popup after saving (including validation-errors and fields that have may changed on the serverside, e.g. ImageField) (changeset 48874)
* not all cms panel has sitetree, so better check if($('sitetree')) exsit, otherwise IE broken with all genericDataAdmin panel. (changeset 48869)
* adding "delete" class to DeleteImageForm (changeset 48865)
* compressed ImageField layout to fit in CTF-popup (removed "click here to remove" label) (changeset 48855)
* removed iframe-borders for IE (changeset 48855)
* fixed "object not found" error in ie6 (somehow Observable is not applied to sitetree at window-load) (changeset 48847)
* Polishing EducatorAdmin's Students Tab (changeset 48844)
* locking down URLs: image/iframe, image/flush, image/transferlegacycontent (changeset 48835)
* Recover ExportForm for genericDataAdmin Which is needed for CRM CreateCommunication (changeset 48792)
* Add ability to choose which file to upload to in a FileField (changeset 48785)
* Fixed illegal reference to this (changeset 48688)
* Put MenuTitle in the CMS LHS tree instead of Title (changeset 48462)
* (changeset 48451)
* Fix incorrect text boxes being set on an ajax request (changeset 48178)
* Allow many-many complex table fields to be used on the reverse side of the join (belongs many many) (changeset 48082)
* Removed ranking tools from DataObjectSet (changeset 47743)
* implemented equal values (changeset 47459)
* (changeset 47454)
* Added simple to-do list facility to SiteTree (changeset 47172)
* Added title attributes to the SilverStripeNavigator messages (changeset 47156)
* Fix bug when duplicating pages with reorganise enabled (changeset 48507)
* Added paste plain text and paste from word buttons to the HtmlEditorField in the CMS (changeset 47155)
* Added 'duplicate page and children' context-item in addition to 'duplicate just this page' (changeset 48503)
* Fixed context menus in CMS (changeset 48474)
* Fixed 404 on spacer.gif (changeset 47190)
* Fixed bug in todo list reprot (changeset 47174)
* Added simple to-do list facility to SiteTree (changeset 47172)
* Added paste plain text and paste from word buttons to the HtmlEditorField in the CMS (changeset 47157)
* Added paste plain text and paste from word buttons to the HtmlEditorField in the CMS (changeset 47155)
* #2005 - Fixed fatal error due to browscap.ini capitalisation error (changeset 48514)
* Updated windmill tests - sleeps and waits (changeset 48431)
* Added in_array_recursive() to ArrayLib, for recursively checking an array with nested arrays (changeset 48423)
* fix the bug that initialises with preloaded selected items with right hide/show (changeset 48419)
* Added sapphire/conf/ConfigureFromEnv.php for making use of _ss_environment.php (changeset 48359)
* Fixed formatting of code, and added some documentation on what the source for this field should be (changeset 48326)
* (changeset 48313)
* Fix sorting in complextablefield (changeset 48257)
* wakeless: #2144 - More memory-efficient version of admin/publishall (changeset 48242)
* #1736 - Make Security::get_encryption_algorithms() a dynamic function again. (changeset 48227)
* Fixed comment. (changeset 48200)
* Fixed bug: Page class wasn't shown in add-page dropdown (changeset 48176)
* Fixed admin credentials setting from 'make install' and 'make test' (changeset 48175)
* Added the contents of assets/ to svn:ignore (changeset 48175)
* Added Windmill test for editing content (changeset 48173)
* Re-enabled session_regenerate_id() (changeset 48172)
* renamed escapeFlagForField() to escapeTypeForField(), updated documentation (changeset 48168)
* Deprecated use of DBField 'Text' for saving HTML-Content (added check in HTMLEditorField->saveInto()) (changeset 48164)
* Added ViewableData->escapeFlagForField() to determine if the record-field needs escaping (currently only 'xml' supported) (changeset 48164)
* Refactored session_regenerate_id to make it easier to disable in some circumstances. (changeset 48161)
* Temporarily disabled session_regenerate_id so that Windmill can work. (changeset 48161)
* Removed notice level errors for better cli-script operation (changeset 48153)
* Better error for cli-install errors, uses exit(1) to stop make (changeset 48152)
* Added note about Makefile so that people don't think they should use that for normal installation. (changeset 48133)
* Allow calling of installer by running 'make install' from an environment with an _ss_environment.php file. This is important for continuous integration. (changeset 48132)
* formatting (changeset 48113)
* formatting (changeset 48112)
* removed dropDatalessFields() - needs serious refactoring before going into core again (changeset 48110)
* removed dropDatalessFields() - needs serious refactoring before going into core again (changeset 48109)
* renamed $wantDefaultAddRow to $showAddRow (changeset 48105)
* fixed escaping errors in default homepage content (changeset 48104)
* Added Makefile so that you can execute 'make test' in sapphire and it will run tests. (changeset 48100)
* Added support for array in _ss_environment.php for specifying URLs to use for cli-script.php (changeset 48100)
* Improved the Behaviour.addLoader() method to play more nicely with tools such as windmill (changeset 48086)
* fix bug: when no source items found, the table should still show and it should works as adding new records (changeset 48085)
* Fixed the $hide_ancestor static on SiteTree subclasses so that it actually works. (changeset 48056)
* Fixed login test (changeset 48049)
* Added initial windmill test (changeset 48042)
* Fix php notice (changeset 47985)
* FIx php notice (changeset 47982)
* Fix autocompletion in Security Admin (changeset 47956)
* #892 - Error attaching an existing folder to an ImageField (changeset 47948)
* Fix spelling mistake (changeset 47947)
* Remove having clause as it can't be used (changeset 47946)
* simon_w: #2122 - Bug in PageComments class (Security) (changeset 47937)
* #2058 - Installer does not escape passwords in _config files (changeset 47910)
* converted TODO into @todo for better PHPDocumentor support (changeset 47891)
* Fix i18n errors (changeset 47890)
* #2094: Make ContentNegotiator send XHTML to the W3C validator (changeset 47882)
* Fix externals (changeset 47881)
* Fix DataObjectSet constructor breaking with associative arrays (changeset 47880)
* simon_w: #2118 - When removing a value from an enum, set affected rows back to the default (changeset 47877)
* simon_w: #2098: Fixed notice level error (changeset 47876)
* #1874 - generated .htaccess lacks "Rewritebase" (changeset 47875)
* fix wrong warning info: Director -> Debug (changeset 47858)
* rbarreiros: 019 - Lost Locale when translatable string not found (changeset 47857)
* rbarreiros: #1907 - Patch for more i18n strings (changeset 47856)
* #1959 - You can't reorganise pages without creating pages (changeset 47855)
* Don't fail in i18n::include_by_class if the module isn't translatable (changeset 47854)
* Remove debug message (changeset 47847)
* Added $SecurityID for templates (changeset 47846)
* lperera: #1975 - Improvements to RestfulService (changeset 47844)
* #2003: Don't close img and br tags on HTMLText.Summary (changeset 47843)
* Fix syntax error (changeset 47842)
* Error checking in i18n::include_by_class shouldn't complain if mysite/lang doesn't exist - only if a module doesn't have internationalisation options. (changeset 47841)
* Reverted 47595, are it broke $defaults (changeset 47840)
* rbarreiros: #1918 Translate newsletter and other strings (changeset 47839)
* Fix building manifest before database is created (changeset 47838)
* #1352 - Better handling of memory limit (changeset 47836)
* #1212 - Show the saved value of EditableEmailField.SendCopy (changeset 47832)
* #1352 - Better handling of memory limit (changeset 47831)
* Allow insertion of `<img>` tags that refer to external domains (changeset 47827)
* Add alt= to any images that don't have alt tags (changeset 47827)
* Improvements to API docs (changeset 47826)
* documentation (changeset 47815)
* allowing object-parameters in DataObjectSet and ArrayData, added ArrayData::object_to_array() (changeset 47808)
* added is_associative() (changeset 47807)
* added lc_XX locale for LOLCAT (changeset 47813)
* Improved API documentation (changeset 47806)
* Improved API documentation (changeset 47805)
* Moved test control files into sapphire/testing, so that sapphire/tests can be ignored by the documentor. (changeset 47804)
* Use lighter version of browscap.ini (changeset 47802)
* #1088 - attachments cannot be emailed from mac or windows systems (changeset 47800)
* #172 - Reorganise : new page (changeset 47797)
* Fix php notice (changeset 47792)
* API Documentation updates (changeset 47773)
* Added tests for DataObject (changeset 47767)
* Take orderby clause into account when caching in DataObject::get_one() (changeset 47756)
* Fix caching in DataObject::get_one() (changeset 47755)
* Remove HAVING clause from methods where it doesn't make sense to have them (changeset 47754)
* set $template and $itemClass to public (according to parent implementation) (changeset 47748)
* fixed formatting (changeset 47748)
* fixed getParentIdName() call in DetailForm() - paramter-order was wrong (changeset 47747)
* better checking in saveComplexTableField() to avoid PHP-notice (changeset 47747)
* Fix YAML many_many/has_many relationships (changeset 47746)
* YAML comma seperated => lists should work on has_meny relationships as well (changeset 47739)
* Added package tags and docblock info for API documentation (changeset 47733)
* Fixed whitespace (changeset 47733)
* Updated API documentation package tags (changeset 47732)
* Fixed some whitespace (changeset 47732)
* Removed unnecessary file CMSHelp (changeset 47729)
* Removed unnecessary class Staged (changeset 47725)
* Fix stack trace on objects that don't extend the Object class (changeset 47723)
* PDODatabase got the wrong end of the stick - Database::createDatabase() shouldn't need any arguments. Fixed this in the core class and MySQLDatabase, but PDODatabse still needs fixing. (changeset 47698)
* Fixed TestRunner (changeset 47699)
* Added paste plain text and paste from word buttons to the HtmlEditorField in the CMS (changeset 47155)
* Added paste plain text and paste from word buttons to the HtmlEditorField in the CMS (changeset 47155)
* wakeless: #1976 - DataObject queries the database for child elements when it hasn't been serialized (changeset 47695)
* #1666 - Interface translations don't show in footer (changeset 47694)
* Fix title and description in RSS feeds (changeset 47688)
* Update copyright to 2008 (changeset 47657)
* update copyright to 2008 (changeset 47654)
* Update copyright to 2008 (changeset 47653)
* Added release date (changeset 47430)
* Updated Changelog (changeset 47262)
* Updated ChangeLog (changeset 46870)
* add function fieldByName (changeset 47479)
* made breadcrumbs-delimiter configurable (changeset 47634)
* Reversed isset() change which was causing some side effects (changeset 47602)
* Fixed PHP notice undefined index - $messageSet['alreadyLoggedIn'] (changeset 47600)
* Fixed ID undefined PHP notice error (changeset 47595)
* removed DetailForm() (was just needed to set custom class which is now in $popupClass), updated saveComplexTableField() to reflect parent class code (changeset 47593)
* added $popupClass to avoid duplication, getting basedataclass for existing children in DetailForm() (in case we're dealing with different subclasses) (changeset 47592)
* more solid ID-detection in php() (changeset 47591)
* additional checks before foreach() loop (changeset 47589)
* fixed PHP notice in implementorsOf (changeset 47588)
* #2069 Locale file /lang/en_US.php should exist (Windows) (changeset 47587)
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/changelogs/2.0.1.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/changelogs/2.0.1.md
| 2,095 | 1,758,118,090 |
en
|
# 2.0.1 (2007-04-17)
SilverStripe 2.0.1 was released on '''17 April 2007''' and had the following changes:
## Overview
* Improved layout of UserDefinedForm submissions in CMS
* Don't show name field on root folder in Assets section
* Mime types fallback for servers don't have /etc/mime.types
* mb_string module is now an optional dependency
* Added strong_create method to Object, as useCustomClass was not working correctly
## Bugfixes
* Sapphire
* Text->FirstParagraph() now only shows the first paragraph
* Fixed HTMLText->Summary()
* Fixed layout issues on IE7 for TreeDropdownField
* Don't show Akismet errors to user
* Removed overloaded MemberTableField->sourceItems() that was causing problems
* Fixed UserDefinedForm submission emails
* Fixed UserDefinedForm permissions
* If a file extension doesn't have a maximum upload size associated with it, then allow uploads of any size
* Fixed a bug with the TreeMultiselectField that prevented it from displaying the checkboxes
* Made Scheduled tasks concrete so they can be instantiated
* TableField fixes
* Fixed security vunerability in search
* GD::color_web2gd() was using incorrect substr
* Fixed last link css
* Fixed duplicate checkbox fields in UserDefinedForm
* Fixed css in UserDefinedForm
* CMS
* Fixed sizing of tabs in CMS
* Fixed popup for single asset in Files & Images section
* Fixed link to CMS on default homepage
* Fixed permissions table in Security section
* Fixed el no properties error in IE
* Pressing the flash button a second time now hides the dropdown
* Installer
* Fixed MySQL version check
* Merge with existing .htaccess file
* Test that mod_rewrite is working
* Added option to delete installer files after successful install
* Fixed PHP4 parse error so installer loads and shows correct error message
* Apache test passes if apache is used but apache php functions are not available
* SilverStripe needs at least PHP version 5.0.4
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/changelogs/2.2.1.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/changelogs/2.2.1.md
| 1,279 | 1,758,118,090 |
en
|
# 2.2.1 (2007-12-21)
SilverStripe 2.2.1 was released on '''21 December 2007''' and had the following changes:
## Features and Enhancements
* Translations
* Added Italian translation
* Added Russian translation
* Added Slovak translation
* Added Turkish translation
* Added Bulgarian translation
* Added Czech translation
* Added Hungarian translation
* Added Portuguese (Brazil) translation
* Added Swedish translation
* Added Chinese (Taiwan) translation
* Added support for sapphire to Portuguese (Portugal) translation
#### Developer Tools
* Added augmentDefaultRecords(), so DataObjectDecorators can extend requireDefaultRecords
Bug fixes
* Sapphire
* Hardcoded array of encryption algorithims in Security::get_encryption_algorithms(), as a bug in MySQL causes corruption in dumps with enums with commas
* Fixed bug with google sitemap on translated sites
* Removed title from SecurityID fields, as some forms show labels on HiddenFields
* Fixed Object::uninherited() for PHP 5.1.2
* Added empty array to member so that roles can add their own has_one relations
* CMS
* Added SecurityAdmin_rightbottom.ss
* Javascript
* Upgraded TinyMCE to 2.1.3
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/changelogs/2.3.6.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/changelogs/2.3.6.md
| 2,365 | 1,758,118,090 |
en
|
# 2.3.6 (2010-02-08)
## Changelog
### Features and Enhancements
* [rev:98081] Removed dev/reset, instead encouraging the use of dev/tests/startsession for tests.
* [rev:98081] Let people use dev/tests/startsession without a fixture, instead calling requireDefaultRecords
### API Changes
* [rev:98375] HTTP::setGetVar() always returns absolute URLs. Use Director::makeRelative() to make them relative again. (merged from r98373)
* [rev:98375] HTTP::setGetVar() combines any GET parameters in PHP array notation (e.g. "foo[bar]=val") instead of replacing the whole array (merged from r98373)
### Bugfixes
* [rev:98405] #5044 Hierarchy::loadDescendantIDListInto() now uses Object::getExtensionInstance('Hierarchy') instead of going through call(), as PHP 5.3 has issues converting references to values
* [rev:98405] Fixed Hierarchy->loadDescendantIdList() to call setOwner() on the extension instance. This was necessary due to underlying Object/Extension changes in 2.4. (merged from r98403)
* [rev:98375] HTTP::setGetVar() uses parse_url() and http_build_query() to add query parameters to an existing URL, instead of doing its own regex-based parsing. This means existing GET parameters are correctly url encoded. (merged from r98373)
* [rev:98273] Don't force SSL when running from CLI
* [rev:98230] Disabled ?debug_profile=1 on live environment types (merged from r80057)
* [rev:98229] Limiting ?debug_memory parameter to development environments through using Debug::message() instead of a straight echo() (merged from r74067)
### Minor changes
* [rev:98410] Fixed HTTPTest->testSetGetVar() (merged from r98409)
* [rev:98408] Fixed HTTPTest->testSetGetVar() (merged from r98407)
* [rev:98405] Added test case for Hierarchy::getDescendantIDList() which also tests Hierarchy::loadDescendantIDListInto() (merged from r98369)
* [rev:98405] Testing of grand-children items in HierarchyTest::testLoadDescendantIDListIntoArray() and HierarchyTest::testNumChildren() (merged from r98376)
* [rev:98405] Fixed HierarchyTest assertions around including grand children counts (merged from r98403)
* [rev:98384] Fixed HTTPTest when invoked through dev/tests/all or with GET parameters (see r98373) (merged from r98383)
### Other
Created with:
{}
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/changelogs/2.3.4.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/changelogs/2.3.4.md
| 3,526 | 1,758,118,090 |
en
|
# 2.3.4 (2009-11-27)
## Changelog
### New Features
* [rev:84085] Allow different user groups to have different HtmlEditorConfigs
* [rev:83631] Allow file size/extension limits to apply to the admin user as
### API Change
* [rev:91610] BasicAuth::requireLogin() no longer has an option to automatically log you in. You can call logIn() on the object returned, instead. (from r91603)
* [rev:91130] move SubscribeSumission.ss from cms module to newsletter module, cos it is only used by newsletter module.
* [rev:91034] Added SapphireTest::logInWithPermission() (merged from r89209)
* [rev:88176] Added no-arg option to increase_memory_limit_to() (from r80241)
* [rev:84594] Template codes can no longer be used in emails except when using .ss files.
* [rev:84157] Make Object::uninherited_static() have a separate execution path to Object::get_static(), for more reliable operation. The intention is that for any given static, you either use Object::get_static() or you use Object::uninherited_static() - not both. (from r84151, r84155, r84156)
### Bugfixes
* [rev:93483] fix for multiple EmailField validation on one form. Merged via r78565
* [rev:91660] Made use of new BasicAuth::protect_entire_site() consistent. (from r91658)
* [rev:91611] Don't enable site-wide protection by default (from r91609)
* [rev:89612] Added rewriteHashlinks = 'php' option to SSViewer so that static publisher can handle internal hashlinks properly.
* [rev:89611] Added rewriteHashlinks = 'php' option to SSViewer so that static publisher can handle internal hashlinks properly.
* [rev:88281] Ensure ASSETS_PATH is respected
* [rev:87869] Pass locale rather than language to spellchecker_languages
* [rev:87867] Always choosing translatable default language in CMSMain->init() for TinyMCE spell checking. Always setting ->Locale in order to have it available for the spell checking (from r81716)
* [rev:87458] #4579: Translatable's call to new LanguageDropdownField() broked (from r87456)
* [rev:86573] fixed typo in pagecomment which meant commenter url was not saved. BUGFIX: updated protector to use new format
* [rev:86325] Fixed Links to Moderate Comments from the CMS and front end. MINOR: removed complextable functions which no longer get called, moved logic to the PageComment Class
* [rev:86202] was being passed to foreach without a check to see if it's an array or not.
* [rev:85779] Fixed Member::sendInfo() assumptions that broke with an API change in r84594
* [rev:85632] findByTagAndAttribute is unintentionally expanding any php found in the href/src components its regex extracts. Changed double quotes to single quotes to fix this.
* [rev:84957] Tied rollback action to edit, rather than publish, permission, since it only involves editing the draft site.
* [rev:84380] Fixing the comment's author website url being converted to lowercase: now case is not affected.
* [rev:84332] Added required javascript files (behaviour, prototype, prototype_improvements) to the Field() method of TreeDropdownField.php
* [rev:84320] Added required javascript files (behaviour, prototype, prototype_improvements) to the Field() method of TreeSelectorField.php
* [rev:83587] Object subclasses with a constructor that didn't already will now call parent to respect inheritance
* [rev:83586] CMSMenuItem constructor now calls parent to respect inheritance
* [rev:83579] Fixed FilesystemPublisher::__construct() not calling parent::__construct() and breaking DataObjectDecorator::load_extra_statics()
|
2025-09-24T14:46:58.085215
|
NARKOZ
|
silverstripe-doc-restructuring
|
NARKOZ__silverstripe-doc-restructuring
|
master/cms/docs/en/changelogs/2.1.1.md
|
NARKOZ__silverstripe-doc-restructuring/master/cms/docs/en/changelogs/2.1.1.md
| 1,048 | 1,758,118,090 |
en
|
# 2.1.1 (2007-11-02)
SilverStripe 2.1.1 was released on '''2 Nov 2007''' and had the following changes:
## Bug Fixes
* CMS
* BBCode help link now works inside CMS
* Fixed invalid 'cursor: normal' CSS in cms_left.css
* Ensure ComplexTableField CSS is loaded in CMS
* Fixed blank comments showing in Comment Admin
* Ensure behaviour is applied correctly to new fields in a UserDefinedForm
* Fixed fatal error in Newsletter Admin on some servers
* Sapphire
* Fix infinite redirects when upgrading from 2.0.2
* Use the hostname, not the ip address, in dev/test mode tests
* Changed the include of the BBCodeParser so it works on more systems
* Fixed saving of HasOneComplexTableField and HasManyComplexTableField when value is undefined
* Removed extra comma in TableListField.js
* Fixed redirection of login when login fails
* Fixed bug where removing a comment via ajax removed all comments from display
* Fix $_SESSION not saving correctly on some servers
|
2025-09-24T14:46:58.085215
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.