Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Forums / Cotonti / Core Labs / Archive / Adding legal code check to lang-files

As suggested by dervan

Kort
#1 2009-03-20 17:17
There is a suggestion made by dervan to include legal code check in localization files as follows:
<?php
/**
 * LOCALE Language File for PLUG Plugin
 *
 * @package Cotonti
 * @version VERSION
 * @author Cotonti Translators Team
 * @copyright Copyright (c) Cotonti Team 2008-2009
 * @license BSD
 */

defined('SED_CODE') or die('Wrong URL.');

/**
 * Plugin Title & Subtitle
 */
Need opinions / comments.
Seditio.by - создание сайтов, разработка плагинов и тем для Котонти
Trustmaster
#2 2009-03-21 04:11
original post
So this topic is about using:
defined('SED_CODE') or die('Wrong URL.');
instead of old-style
if (!defined('SED_CODE')) { die('Wrong URL.'); }
so it shorter, looks a bit neater and works a bit faster
May the Source be with you!
biro
#3 2009-04-13 00:16
so this ticket should be closed!
Be sure to check out<br /><br /><br />
My site-<a href="http://www.iso-center.co.cc">http://www.iso-center.co.cc</a><br />
My plugins;TPL Editior 1.2 &amp; Mobile site