Фикс отображения модулей в админке для разных админов

Отображение ZF версии встроенными средствами
This commit is contained in:
PheRum 2015-01-31 03:12:14 +03:00
commit 998ddec61e
19 changed files with 12 additions and 23 deletions

View file

@ -5,7 +5,7 @@ require('./pagestart.php');
// Generate relevant output // Generate relevant output
if (isset($_GET['pane']) && $_GET['pane'] == 'left') if (isset($_GET['pane']) && $_GET['pane'] == 'left')
{ {
if (!$module = CACHE('bb_cache')->get('admin_module')) if (!$module = CACHE('bb_cache')->get('admin_module' . $user->id))
{ {
$dir = @opendir('.'); $dir = @opendir('.');
$setmodules = 1; $setmodules = 1;
@ -18,7 +18,7 @@ if (isset($_GET['pane']) && $_GET['pane'] == 'left')
} }
unset($setmodules); unset($setmodules);
@closedir($dir); @closedir($dir);
CACHE('bb_cache')->set('admin_module', $module, 600); CACHE('bb_cache')->set('admin_module' . $user->id, $module, 600);
} }
$template->assign_vars(array( $template->assign_vars(array(
@ -160,6 +160,9 @@ elseif (isset($_GET['pane']) && $_GET['pane'] == 'right')
'AVATAR_DIR_SIZE' => $avatar_dir_size, 'AVATAR_DIR_SIZE' => $avatar_dir_size,
'DB_SIZE' => $dbsize, 'DB_SIZE' => $dbsize,
'GZIP_COMPRESSION' => ($bb_cfg['gzip_compress']) ? $lang['ON'] : $lang['OFF'], 'GZIP_COMPRESSION' => ($bb_cfg['gzip_compress']) ? $lang['ON'] : $lang['OFF'],
'TP_VERSION' => $bb_cfg['tp_version'] . (!empty($bb_cfg['tp_release_state']) ? ' :: ' . $bb_cfg['tp_release_state'] : ''),
'TP_RELEASE_DATE' => $bb_cfg['tp_release_date'],
'ZF_VERSION' => Zend\Version\Version::VERSION,
)); ));
if (@$_GET['users_online']) if (@$_GET['users_online'])
@ -277,16 +280,3 @@ else
} }
print_page('index.tpl', 'admin'); print_page('index.tpl', 'admin');
// Functions
function inarray ($needle, $haystack)
{
for ($i = 0; $i < sizeof($haystack); $i++)
{
if ($haystack[$i] == $needle)
{
return true;
}
}
return false;
}

0
library/Zend/Config/WriterPluginManager.php Normal file → Executable file
View file

0
library/Zend/Crypt/Symmetric/Mcrypt.php Normal file → Executable file
View file

0
library/Zend/Db/Adapter/Driver/IbmDb2/Connection.php Normal file → Executable file
View file

0
library/Zend/Db/Adapter/Driver/IbmDb2/IbmDb2.php Normal file → Executable file
View file

0
library/Zend/Db/Adapter/Driver/IbmDb2/Result.php Normal file → Executable file
View file

0
library/Zend/Db/Adapter/Driver/Oci8/Connection.php Normal file → Executable file
View file

0
library/Zend/Db/Adapter/Driver/Oci8/Oci8.php Normal file → Executable file
View file

0
library/Zend/Db/Adapter/Driver/Oci8/Result.php Normal file → Executable file
View file

0
library/Zend/Db/Adapter/Driver/Sqlsrv/Sqlsrv.php Normal file → Executable file
View file

0
library/Zend/Db/Adapter/Platform/IbmDb2.php Normal file → Executable file
View file

0
library/Zend/Db/Adapter/Platform/Oracle.php Normal file → Executable file
View file

0
library/Zend/Db/Adapter/Platform/SqlServer.php Normal file → Executable file
View file

0
library/Zend/Db/Sql/Platform/Oracle/Oracle.php Normal file → Executable file
View file

View file

0
library/Zend/Db/composer.json Normal file → Executable file
View file

View file

@ -185,7 +185,7 @@ abstract class AutoloaderFactory
if (!class_exists(static::STANDARD_AUTOLOADER)) { if (!class_exists(static::STANDARD_AUTOLOADER)) {
// Extract the filename from the classname // Extract the filename from the classname
$stdAutoloader = substr(strrchr(static::STANDARD_AUTOLOADER, '\\'), 1); $stdAutoloader = substr(strrchr(static::STANDARD_AUTOLOADER, '\\'), 1);
require_once __DIR__ . "/AutoloaderFactory.php"; require_once __DIR__ . "/$stdAutoloader.php";
} }
$loader = new StandardAutoloader(); $loader = new StandardAutoloader();
static::$standardAutoloader = $loader; static::$standardAutoloader = $loader;

View file

@ -71,10 +71,9 @@ $domain_name = 'torrentpier.me'; // enter here your primary domain name of your
$domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $domain_name; $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $domain_name;
// Version info // Version info
$bb_cfg['tp_version'] = '2.1.6'; $bb_cfg['tp_version'] = '2.1.6';
$bb_cfg['tp_release_date'] = '**-01-2015'; $bb_cfg['tp_release_date'] = '**-01-2015';
$bb_cfg['tp_release_state'] = 'ALPHA'; $bb_cfg['tp_release_state'] = 'ALPHA';
$bb_cfg['tp_zf_version'] = '2.3.4';
// Database // Database
$charset = 'utf8'; $charset = 'utf8';

View file

@ -136,15 +136,15 @@ ajax.callback.manage_admin = function(data) {
</tr> </tr>
<tr> <tr>
<td class="row1" nowrap="nowrap" width="25%">{L_TP_VERSION}:</td> <td class="row1" nowrap="nowrap" width="25%">{L_TP_VERSION}:</td>
<td class="row2"><b>{$bb_cfg['tp_version']} [{$bb_cfg['tp_release_state']}]</b></td> <td class="row2"><b>{TP_VERSION}</b></td>
</tr> </tr>
<tr> <tr>
<td class="row1" nowrap="nowrap" width="25%">{L_TP_RELEASE_DATE}:</td> <td class="row1" nowrap="nowrap" width="25%">{L_TP_RELEASE_DATE}:</td>
<td class="row2"><b>{$bb_cfg['tp_release_date']}</b></td> <td class="row2"><b>{TP_RELEASE_DATE}</b></td>
</tr> </tr>
<tr> <tr>
<td class="row1" nowrap="nowrap" width="25%">{L_ZF_VERSION}:</td> <td class="row1" nowrap="nowrap" width="25%">{L_ZF_VERSION}:</td>
<td class="row2"><b>{$bb_cfg['tp_zf_version']}</b></td> <td class="row2"><b>{ZF_VERSION}</b></td>
</tr> </tr>
</table> </table>
<br /> <br />