mirror of
https://github.com/e107inc/e107.git
synced 2025-04-14 01:22:13 +02:00
Minor cleanup on cron and image seletion.
This commit is contained in:
parent
8ef5c43753
commit
e8fc5660d4
@ -303,10 +303,11 @@ class cron_admin_ui extends e_admin_ui
|
||||
|
||||
//FIXME: for Windows, the is_executable() function only checks the file
|
||||
// extensions of exe, com, bat and cmd.
|
||||
|
||||
if (!is_executable(e_BASE."cron.php"))
|
||||
|
||||
$actualPerm = substr(decoct(fileperms(e_BASE."cron.php")),3);
|
||||
if ($actualPerm != 755) // is_executable() is not reliable.
|
||||
{
|
||||
$mes->add("Please CHMOD /cron.php to 755", E_MESSAGE_WARNING);
|
||||
$mes->add("Please CHMOD /cron.php to 755 ", E_MESSAGE_WARNING);
|
||||
}
|
||||
//elseif (!$active) - always show instructions
|
||||
{
|
||||
@ -591,7 +592,7 @@ $frm = e107::getForm();
|
||||
|
||||
require_once(e_ADMIN.'footer.php');
|
||||
exit;
|
||||
|
||||
/*
|
||||
class cron
|
||||
{
|
||||
protected $coreCrons = array();
|
||||
@ -693,10 +694,13 @@ class cron
|
||||
|
||||
//FIXME: for Windows, the is_executable() function only checks the file
|
||||
// extensions of exe, com, bat and cmd.
|
||||
|
||||
if (!is_executable(e_BASE."cron.php"))
|
||||
|
||||
|
||||
$actualPerms = fileperms(e_BASE."cron.php");
|
||||
|
||||
if (!is_executable(realpath(e_BASE."cron.php")))
|
||||
{
|
||||
$mes->add("Please CHMOD /cron.php to 755", E_MESSAGE_WARNING);
|
||||
$mes->add("Please CHMOD /cron.php to 755 ", E_MESSAGE_WARNING);
|
||||
}
|
||||
//elseif (!$active) - always show instructions
|
||||
{
|
||||
@ -1098,12 +1102,12 @@ class cron
|
||||
|
||||
$var['main']['text'] = PAGE_NAME;
|
||||
$var['main']['link'] = e_SELF;
|
||||
/*
|
||||
$var['pref']['text'] = LAN_PREFS;
|
||||
$var['pref']['link'] = e_SELF."?pref";
|
||||
$var['pref']['perm'] = "N";
|
||||
|
||||
*/ $action = ($this->cronAction) ? $this->cronAction : 'main';
|
||||
// $var['pref']['text'] = LAN_PREFS;
|
||||
// $var['pref']['link'] = e_SELF."?pref";
|
||||
// $var['pref']['perm'] = "N";
|
||||
|
||||
$action = ($this->cronAction) ? $this->cronAction : 'main';
|
||||
|
||||
e_admin_menu(PAGE_NAME, $action, $var);
|
||||
}
|
||||
@ -1142,5 +1146,7 @@ function cron_adminmenu()
|
||||
global $cron;
|
||||
$cron->cronOptions();
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
?>
|
@ -60,10 +60,10 @@ class media_admin extends e_admin_dispatcher
|
||||
|
||||
protected $adminMenu = array(
|
||||
'main/list' => array('caption'=> 'Media Library', 'perm' => 'A'),
|
||||
'main/create' => array('caption'=> "Add New Media", 'perm' => 'A'),
|
||||
'main/import' => array('caption'=> "Batch Media Import", 'perm' => 'A'),
|
||||
// 'main/create' => array('caption'=> "Add New Media", 'perm' => 'A'), // Should be handled in Media-Import.
|
||||
'main/import' => array('caption'=> "Media Import", 'perm' => 'A'),
|
||||
'cat/list' => array('caption'=> 'Media Categories', 'perm' => 'A'),
|
||||
// 'cat/create' => array('caption'=> "Create Category", 'perm' => 'A'),
|
||||
// 'cat/create' => array('caption'=> "Create Category", 'perm' => 'A'), // is automatic.
|
||||
// 'main/icons' => array('caption'=> IMALAN_71, 'perm' => 'A'),
|
||||
'main/settings' => array('caption'=> LAN_PREFS, 'perm' => 'A'),
|
||||
|
||||
@ -110,7 +110,7 @@ class media_cat_ui extends e_admin_ui
|
||||
'media_cat_id' => array('title'=> LAN_ID, 'type' => 'number', 'width' =>'5%', 'forced'=> TRUE, 'readonly'=>TRUE),
|
||||
'media_cat_nick' => array('title'=> "Nickname", 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>TRUE),
|
||||
'media_cat_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>TRUE),
|
||||
'media_cat_diz' => array('title'=> LAN_DESCRIPTION, 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1','readonly'=>TRUE), // Display name
|
||||
'media_cat_diz' => array('title'=> LAN_DESCRIPTION, 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=150&bb=1','readonly'=>TRUE), // Display name
|
||||
'media_cat_class' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'width' => 'auto', 'data' => 'int'),
|
||||
// 'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'width' => '10%', 'forced'=>TRUE, 'thclass' => 'center last', 'class' => 'center')
|
||||
);
|
||||
@ -243,7 +243,8 @@ class media_admin_ui extends e_admin_ui
|
||||
// 'media_upload' => array('title'=> "Upload File", 'type' => 'upload', 'data'=> false, 'readParm' => 'hidden', 'width' => '10%', 'nolist' => true),
|
||||
'media_name' => array('title'=> LAN_TITLE, 'type' => 'text', 'data'=> 'str', 'width' => 'auto'),
|
||||
'media_caption' => array('title'=> "Caption", 'type' => 'text', 'data'=> 'str', 'width' => 'auto'),
|
||||
'media_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'bbarea', 'data'=> 'str', 'width' => 'auto', 'thclass' => 'left first', 'readParms' => 'truncate=100', 'writeParms' => 'counter=0'),
|
||||
// media_description is type = textarea until bbarea can be reduced to not include youtube etc
|
||||
'media_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'textarea', 'data'=> 'str', 'width' => 'auto', 'thclass' => 'left first', 'readParms' => 'truncate=100', 'writeParms' => 'counter=0'),
|
||||
'media_type' => array('title'=> "Mime Type", 'type' => 'text', 'data'=> 'str', 'width' => 'auto', 'noedit'=>TRUE),
|
||||
'media_author' => array('title'=> LAN_USER, 'type' => 'user', 'data'=> 'int', 'width' => 'auto', 'thclass' => 'center', 'class'=>'center','readParms' => 'link=1', 'filter' => true, 'batch' => true, 'noedit'=>TRUE ),
|
||||
'media_datestamp' => array('title'=> LAN_DATESTAMP, 'type' => 'datestamp', 'data'=> 'int', 'width' => '10%', 'noedit'=>TRUE), // User date
|
||||
@ -520,12 +521,12 @@ class media_admin_ui extends e_admin_ui
|
||||
|
||||
if(!vartrue($_POST['batch_import_selected']))
|
||||
{
|
||||
$mes->add("Scanning Media in folder: ".e_MEDIA."temp/", E_MESSAGE_INFO);
|
||||
$mes->add("Scanning for new media (images, videos, files) in folder: ".e_MEDIA."temp/", E_MESSAGE_INFO);
|
||||
}
|
||||
|
||||
if(!count($files))
|
||||
{
|
||||
$mes->add("No media Found!", E_MESSAGE_INFO);
|
||||
$mes->add("No media Found! Please upload some files and then refresh this page.", E_MESSAGE_INFO);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -233,7 +233,7 @@ class e_media
|
||||
$sql = e107::getDb();
|
||||
$tp = e107::getParser();
|
||||
|
||||
$text .= "<div style='margin-left:0px;margin-right:0px; position:relative;z-index:1000;float:right;display:none' id='{$formid}'>";
|
||||
$text .= "<div style='margin-left:500px;text-align:center; position:relative;z-index:1000;float:left;display:none' id='{$formid}'>";
|
||||
$text .="<div style='-moz-box-shadow: 3px 3px 3px #808080;
|
||||
-webkit-box-shadow: 3px 3px 3px #808080;
|
||||
box-shadow: 3px 3px 3px #808080;
|
||||
@ -246,7 +246,7 @@ class e_media
|
||||
{
|
||||
$image = $row['media_url'];
|
||||
$diz = $row['media_name']." : ". $row['media_dimensions'];
|
||||
$insert = "[img]".$image."[/img]";
|
||||
$insert = "[img]".$image."[/img]";
|
||||
|
||||
$text .= "
|
||||
<div style='border:1px solid silver;margin:5px;width:50px;height:50px;overflow:hidden;float:left'>
|
||||
|
@ -193,37 +193,6 @@ function PreImage_Select($formid='preimage_selector')
|
||||
$text .= $med->imageSelect($bbcode_imagedir,$formid);
|
||||
|
||||
return $text;
|
||||
|
||||
|
||||
/*
|
||||
$fl = e107::getFile();
|
||||
$imagelist = $fl->get_files($path,'','standard',2);
|
||||
sort($imagelist);
|
||||
|
||||
$text .= "<table class='fborder' style='background-color: #fff'>
|
||||
<tr><td class='forumheader3' style='white-space: nowrap'>";
|
||||
|
||||
if(!count($imagelist))
|
||||
{
|
||||
|
||||
$text .= LANHELP_46."<b>".str_replace("../","",$path)."</b>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$text .= "<select class='tbox' name='preimageselect' onchange=\"addtext(this.value, true); expandit('{$formid}')\">
|
||||
<option value=''>".LANHELP_42."</option>";
|
||||
foreach($imagelist as $image)
|
||||
{
|
||||
$e_path = $tp->createConstants($image['path'],1);
|
||||
$showpath = str_replace($path,'',$image['path']);
|
||||
$text .= "<option value=\"[img]".$e_path.$image['fname']."[/img]\">".$showpath.$image['fname']."</option>\n";
|
||||
}
|
||||
$text .="</select>";
|
||||
}
|
||||
$text .="</td></tr> \n </table></div>
|
||||
</div>\n<!-- End of PreImage selector -->\n";
|
||||
return $text;
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user