1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

Use Library Manager to handle core libraries.

This commit is contained in:
lonalore
2017-01-26 12:45:45 +01:00
parent 7ef1d13b35
commit 7c0c0cd2f1
160 changed files with 22190 additions and 3024 deletions

View File

@@ -1,5 +1,6 @@
<?php
/*
/**
* e107 website system
*
* Copyright (C) 2008-2012 e107 Inc (e107.org)
@@ -10,20 +11,18 @@
* $Id$
*
*/
//global $pref, $eplug_admin, $THEME_JSLIB, $THEME_CORE_JSLIB;
/**
* Class e_jsmanager.
*/
class e_jsmanager
{
/**
* Supported Libraries (Front-End) - loaded on demand.
*/
protected $_libraries = array(
'prototype' => array(
'prototype/prototype.js' ,
'scriptaculous/scriptaculous.js',
'scriptaculous/effects.js',
'e107.js',
),
'prototype' => array(), // TODO remove prototype completely.
'jquery' => array(),
);
@@ -233,9 +232,10 @@ class e_jsmanager
$this->setInAdmin(defset('e_ADMIN_AREA', false));
$minified = deftrue('e_DEBUG') == true ? null : 'minified';
$cdn = e107::getPref('e_jslib_cdn', true);
// Use local files.
if(isset($_SERVER['E_DEV_LOCALJS']) && $_SERVER['E_DEV_LOCALJS'] === 'true' || !deftrue('e_CDN',true))
if(isset($_SERVER['E_DEV_LOCALJS']) && $_SERVER['E_DEV_LOCALJS'] === 'true' || !deftrue('e_CDN', $cdn))
{
if($this->isInAdmin()) // Admin Area.
{