1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 14:46:56 +02:00

Merge pull request #2262 from MikeyGMT/20170108

Lans Rework #6 - Library Manager
This commit is contained in:
Cameron
2017-01-09 11:58:18 -08:00
committed by GitHub
5 changed files with 49 additions and 42 deletions

View File

@@ -1797,10 +1797,10 @@ $text .= '<thead>';
$text .= '<tr>'; $text .= '<tr>';
$text .= '<th>' . LAN_LIBRARY_MANAGER_13 . '</th>'; $text .= '<th>' . LAN_LIBRARY_MANAGER_13 . '</th>';
$text .= '<th class="text-center">' . LAN_LIBRARY_MANAGER_21 . '</th>'; $text .= '<th class="text-center">' . LAN_LIBRARY_MANAGER_21 . '</th>';
$text .= '<th class="text-center">' . LAN_LIBRARY_MANAGER_14 . '</th>'; $text .= '<th class="text-center">' . LAN_VERSION . '</th>';
$text .= '<th class="text-center">' . LAN_LIBRARY_MANAGER_18 . '</th>'; $text .= '<th class="text-center">' . LAN_STATUS . '</th>';
$text .= '<th>' . LAN_LIBRARY_MANAGER_19 . '</th>'; $text .= '<th>' . LAN_MESSAGE . '</th>';
$text .= '<th></th>'; $text .= '<th>' . LAN_MOREINFO . '</th>';
$text .= '</tr>'; $text .= '</tr>';
$text .= '</thead>'; $text .= '</thead>';
$text .= '<tbody>'; $text .= '<tbody>';
@@ -1833,7 +1833,7 @@ foreach($libraries as $machineName => $library)
if(empty($libraries)) if(empty($libraries))
{ {
$text .= '<tr>'; $text .= '<tr>';
$text .= '<td colspan="6">' . LAN_LIBRARY_MANAGER_26 . '</td>'; $text .= '<td colspan="6">' . LAN_NOT_FOUND . '</td>';
$text .= '</tr>'; $text .= '</tr>';
} }
@@ -2039,7 +2039,7 @@ function libraryGetHomepage($details)
$href = $details['vendor_url']; $href = $details['vendor_url'];
$title = $details['name']; $title = $details['name'];
return '<a href="' . $href . '" title="' . $title . '" target="_blank">' . LAN_LIBRARY_MANAGER_15 . '</a>'; return '<a href="' . $href . '" title="' . $title . '" target="_blank">' . LAN_WEBSITE . '</a>';
} }
/** /**
@@ -2055,7 +2055,7 @@ function libraryGetDownload($details)
$href = $details['download_url']; $href = $details['download_url'];
$title = $details['name']; $title = $details['name'];
return '<a href="' . $href . '" title="' . $title . '" target="_blank">' . LAN_LIBRARY_MANAGER_16 . '</a>'; return '<a href="' . $href . '" title="' . $title . '" target="_blank">' . LAN_DOWNLOAD . '</a>';
} }
/** /**
@@ -2064,18 +2064,18 @@ function libraryGetDownload($details)
function libraryGetProvider($details) function libraryGetProvider($details)
{ {
$text = 'e107'; $text = 'e107';
$provider = LAN_LIBRARY_MANAGER_24; $provider = LAN_CORE;
if(varset($details['plugin'], false) == true) if(varset($details['plugin'], false) == true)
{ {
$text = $details['plugin']; $text = $details['plugin'];
$provider = LAN_LIBRARY_MANAGER_22; $provider = LAN_PLUGIN;
} }
if(varset($details['theme'], false) == true) if(varset($details['theme'], false) == true)
{ {
$text = $details['theme']; $text = $details['theme'];
$provider = LAN_LIBRARY_MANAGER_23; $provider = LAN_THEME;
} }
return '<span data-toggle="tooltip" data-placement="top" title="' . $text . '">' . $provider . '</span>'; return '<span data-toggle="tooltip" data-placement="top" title="' . $text . '">' . $provider . '</span>';

View File

@@ -86,7 +86,7 @@ class e_library_manager
$libraryPath = e107::getParser()->replaceConstants($library['library_path']); $libraryPath = e107::getParser()->replaceConstants($library['library_path']);
if($library['library_path'] === false || (!file_exists($libraryPath) && substr($libraryPath, 0, 4) != 'http')) if($library['library_path'] === false || (!file_exists($libraryPath) && substr($libraryPath, 0, 4) != 'http'))
{ {
$library['error'] = LAN_LIBRARY_MANAGER_09; $library['error'] = LAN_NOT_FOUND;
$replace_with = array($library['name']); $replace_with = array($library['name']);
$library['error_message'] = e107::getParser()->lanVars(LAN_LIBRARY_MANAGER_03, $replace_with, true); $library['error_message'] = e107::getParser()->lanVars(LAN_LIBRARY_MANAGER_03, $replace_with, true);
@@ -255,7 +255,7 @@ class e_library_manager
if(!$variant['installed']) if(!$variant['installed'])
{ {
$variant['error'] = LAN_LIBRARY_MANAGER_09; $variant['error'] = LAN_NOT_FOUND;
$replace_with = array($variant_name, $library['name']); $replace_with = array($variant_name, $library['name']);
$variant['error_message'] = e107::getParser()->lanVars(LAN_LIBRARY_MANAGER_06, $replace_with, true); $variant['error_message'] = e107::getParser()->lanVars(LAN_LIBRARY_MANAGER_06, $replace_with, true);

View File

@@ -114,6 +114,7 @@ define("LAN_FILES","Files");
define("LAN_SIZE", "Size"); define("LAN_SIZE", "Size");
define("LAN_VERSION", "Version"); define("LAN_VERSION", "Version");
define("LAN_DOWNLOAD", "Download"); define("LAN_DOWNLOAD", "Download");
define("LAN_WEBSITE", "Website");
define("LAN_COMMENTS", "Comments"); define("LAN_COMMENTS", "Comments");
define("LAN_LOCATION", "Location"); define("LAN_LOCATION", "Location");
define("LAN_NO_RECORDS_FOUND","No Records Found"); define("LAN_NO_RECORDS_FOUND","No Records Found");

View File

@@ -238,6 +238,7 @@ Below is the list of files that could potentially be malicious:");
define("LAN_CREATE","Create"); define("LAN_CREATE","Create");
define("LAN_MANAGE","Manage"); define("LAN_MANAGE","Manage");
define("LAN_UPDATE","Update"); define("LAN_UPDATE","Update");
define("LAN_INSTALLED","Installed");//TODO elsewhere
define("LAN_LAST_UPDATED","Last Updated"); define("LAN_LAST_UPDATED","Last Updated");
define("LAN_UPDATE_AVAILABLE","Update Available"); define("LAN_UPDATE_AVAILABLE","Update Available");
define("LAN_ADD", "Add"); define("LAN_ADD", "Add");
@@ -295,6 +296,7 @@ define("LAN_PLUGIN","Plugin");
define("LAN_PLUGIN_FOLDER","Plugin Folder"); define("LAN_PLUGIN_FOLDER","Plugin Folder");
define("LAN_THEMES","Themes"); define("LAN_THEMES","Themes");
define("LAN_THEME","Theme"); define("LAN_THEME","Theme");
define("LAN_CORE","Core");
define("LAN_LATEST_e107_NEWS","Latest e107 News"); define("LAN_LATEST_e107_NEWS","Latest e107 News");
define("LAN_WEBSITE_STATUS","Website Status"); define("LAN_WEBSITE_STATUS","Website Status");
define("LAN_STATS","Stats"); define("LAN_STATS","Stats");

View File

@@ -1,35 +1,39 @@
<?php <?php
/*
/** * e107 website system
* @file *
* Copyright (C) 2008-2017 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Language definitions for Library Manager. * Language definitions for Library Manager.
*/ */
define('LAN_LIBRARY_MANAGER_01', 'The [x] library, which the [y] library depends on, is not installed.'); define("LAN_LIBRARY_MANAGER_01", "The [x] library, which the [y] library depends on, is not installed.");
define('LAN_LIBRARY_MANAGER_02', 'The version [x] of the [y] library is not compatible with the [z] library.'); define("LAN_LIBRARY_MANAGER_02", "The version [x] of the [y] library is not compatible with the [z] library.");
define('LAN_LIBRARY_MANAGER_03', 'The [x] library could not be found.'); define("LAN_LIBRARY_MANAGER_03", "The [x] library could not be found.");
define('LAN_LIBRARY_MANAGER_04', 'The version of the [x] library could not be detected.'); define("LAN_LIBRARY_MANAGER_04", "The version of the [x] library could not be detected.");
define('LAN_LIBRARY_MANAGER_05', 'The installed version [x] of the [y] library is not supported.'); define("LAN_LIBRARY_MANAGER_05", "The installed version [x] of the [y] library is not supported.");
define('LAN_LIBRARY_MANAGER_06', 'The [x] variant of the [y] library could not be found.'); define("LAN_LIBRARY_MANAGER_06", "The [x] variant of the [y] library could not be found.");
define('LAN_LIBRARY_MANAGER_07', 'missing dependency'); define("LAN_LIBRARY_MANAGER_07", "missing dependency");
define('LAN_LIBRARY_MANAGER_08', 'incompatible dependency'); define("LAN_LIBRARY_MANAGER_08", "incompatible dependency");
define('LAN_LIBRARY_MANAGER_09', 'not found'); //define("LAN_LIBRARY_MANAGER_09", "not found");//LAN_NOT_FOUND
define('LAN_LIBRARY_MANAGER_10', 'not detected'); define("LAN_LIBRARY_MANAGER_10", "not detected");
define('LAN_LIBRARY_MANAGER_11', 'not supported'); define("LAN_LIBRARY_MANAGER_11", "not supported");
define('LAN_LIBRARY_MANAGER_12', 'List'); //define("LAN_LIBRARY_MANAGER_12", "List");//NOT USED
define('LAN_LIBRARY_MANAGER_13', 'Library'); define("LAN_LIBRARY_MANAGER_13", "Library");
define('LAN_LIBRARY_MANAGER_14', 'Version'); //define("LAN_LIBRARY_MANAGER_14", "Version");//LAN_VERSION
define('LAN_LIBRARY_MANAGER_15', 'Homepage'); //define("LAN_LIBRARY_MANAGER_15", "Homepage");//LAN_WEBSITE
define('LAN_LIBRARY_MANAGER_16', 'Download'); //define("LAN_LIBRARY_MANAGER_16", "Download");//LAN_DOWNLOAD
define('LAN_LIBRARY_MANAGER_17', 'Installed'); //define("LAN_LIBRARY_MANAGER_17", "Installed");//LAN_INSTALLED //NOT USED but is elsewhere
define('LAN_LIBRARY_MANAGER_18', 'Status'); //define("LAN_LIBRARY_MANAGER_18", "Status");//LAN_STATUS
define('LAN_LIBRARY_MANAGER_19', 'Message'); //define("LAN_LIBRARY_MANAGER_19", "Message");//LAN_MESSAGE
define('LAN_LIBRARY_MANAGER_20', 'link'); //define("LAN_LIBRARY_MANAGER_20", "link");//NOT USED
define('LAN_LIBRARY_MANAGER_21', 'Provider'); define("LAN_LIBRARY_MANAGER_21", "Provider");
define('LAN_LIBRARY_MANAGER_22', 'plugin'); //define("LAN_LIBRARY_MANAGER_22", "plugin");//LAN_PLUGIN
define('LAN_LIBRARY_MANAGER_23', 'theme'); //define("LAN_LIBRARY_MANAGER_23", "theme");//LAN_THEME
define('LAN_LIBRARY_MANAGER_24', 'core'); //define("LAN_LIBRARY_MANAGER_24", "core");//LAN_CORE
define('LAN_LIBRARY_MANAGER_25', 'Third-party libraries'); define("LAN_LIBRARY_MANAGER_25", "Third-party libraries");
define('LAN_LIBRARY_MANAGER_26', 'No library found'); //define("LAN_LIBRARY_MANAGER_26", "No library found");//LAN_NOT_FOUND
define('LAN_LIBRARY_MANAGER_27', 'Machine name: [x]'); define("LAN_LIBRARY_MANAGER_27", "Machine name: [x]");