1
Changeset a3b7566 – MultiMag

Changeset a3b7566


Ignore:
Timestamp:
Jan 18, 2013, 8:36:51 PM (10 years ago)
Author:
Blacklight <blacklight@…>
Branches:
master
Children:
f40f078
Parents:
360843c (diff), 1276042 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:
 
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • common/XMPPHP/XMLStream.php

    r360843c ra3b7566  
    44 * Copyright (C) 2008  Nathanael C. Fritz
    55 * This file is part of SleekXMPP.
    6  * 
     6 *
    77 * XMPPHP is free software; you can redistribute it and/or modify
    88 * it under the terms of the GNU General Public License as published by
    99 * the Free Software Foundation; either version 2 of the License, or
    1010 * (at your option) any later version.
    11  * 
     11 *
    1212 * XMPPHP is distributed in the hope that it will be useful,
    1313 * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1414 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1515 * GNU General Public License for more details.
    16  * 
     16 *
    1717 * You should have received a copy of the GNU General Public License
    1818 * along with XMPPHP; if not, write to the Free Software
    1919 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    2020 *
    21  * @category   xmpphp 
     21 * @category   xmpphp
    2222 * @package     XMPPHP
    2323 * @author       Nathanael C. Fritz <JID: fritzy@netflint.net>
     
    3434
    3535/** XMPPHP_Log */
    36 require_once 'Log.php';
     36
     37require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Log.php'; // BUG: по относительному пути не подключает файл и не бросает ошибку
    3738
    3839/**
    3940 * XMPPHP XML Stream
    40  * 
    41  * @category   xmpphp 
     41 *
     42 * @category   xmpphp
    4243 * @package     XMPPHP
    4344 * @author       Nathanael C. Fritz <JID: fritzy@netflint.net>
     
    196197                }
    197198        }
    198        
     199
    199200        /**
    200201         * Return the log instance
     
    205206                return $this->log;
    206207        }
    207        
     208
    208209        /**
    209210         * Get next ID
     
    296297                $this->sent_disconnect = false;
    297298                $starttime = time();
    298                
     299
    299300                do {
    300301                        $this->disconnected = false;
     
    320321                        }
    321322                } while (!$this->socket && (time() - $starttime) < $timeout);
    322                
     323
    323324                if ($this->socket) {
    324325                        stream_set_blocking($this->socket, 1);
     
    344345                $this->reconnectTimeout = $timeout;
    345346        }
    346        
     347
    347348        /**
    348349         * Disconnect from XMPP Host
     
    373374         * 0 -> only read if data is immediately ready
    374375         * NULL -> wait forever and ever
    375          * integer -> process for this amount of time 
    376          */
    377        
     376         * integer -> process for this amount of time
     377         */
     378
    378379        private function __process($maximum=0) {
    379                
     380
    380381                $remaining = $maximum;
    381                
     382
    382383                do {
    383384                        $starttime = (microtime(true) * 1000000);
     
    397398                        $updated = @stream_select($read, $write, $except, $secs, $usecs);
    398399                        if ($updated === false) {
    399                                 $this->log->log("Error on stream_select()",  XMPPHP_Log::LEVEL_VERBOSE);                               
     400                                $this->log->log("Error on stream_select()",  XMPPHP_Log::LEVEL_VERBOSE);
    400401                                if ($this->reconnect) {
    401402                                        $this->doReconnect();
     
    408409                                # XXX: Is this big enough?
    409410                                $buff = @fread($this->socket, 4096);
    410                                 if(!$buff) { 
     411                                if(!$buff) {
    411412                                        if($this->reconnect) {
    412413                                                $this->doReconnect();
     
    428429                return true;
    429430        }
    430        
     431
    431432        /**
    432433         * Process
     
    491492        /**
    492493         * XML start callback
    493          * 
     494         *
    494495         * @see xml_set_element_handler
    495496         *
     
    532533        /**
    533534         * XML end callback
    534          * 
     535         *
    535536         * @see xml_set_element_handler
    536537         *
     
    663664        public function read() {
    664665                $buff = @fread($this->socket, 1024);
    665                 if(!$buff) { 
     666                if(!$buff) {
    666667                        if($this->reconnect) {
    667668                                $this->doReconnect();
     
    693694                        $secs = floor(($maximum - $usecs) / 1000000);
    694695                }
    695                
     696
    696697                $read = array();
    697698                $write = array($this->socket);
    698699                $except = array();
    699                
     700
    700701                $select = @stream_select($read, $write, $except, $secs, $usecs);
    701                
     702
    702703                if($select === False) {
    703704                        $this->log->log("ERROR sending message; reconnecting.");
     
    711712                        return false;
    712713                }
    713                
     714
    714715                $sentbytes = @fwrite($this->socket, $msg);
    715716                $this->log->log("SENT: " . mb_substr($msg, 0, $sentbytes, '8bit'), XMPPHP_Log::LEVEL_VERBOSE);
  • web/.htaccess

    r360843c ra3b7566  
     1ErrorDocument 404 "/e404.php"
     2Options -MultiViews -Indexes +FollowSymLinks
     3DirectoryIndex index.php
    14
    2 ErrorDocument 404 "/e404.php"
    3 Options -MultiViews
     5AddDefaultCharset UTF-8
    46
    57# Если установлен mod_revrite
  • web/core.php

    r360843c ra3b7566  
    3636mb_internal_encoding("UTF-8");
    3737
    38 $c=explode('/',__FILE__);$base_path='';
    39 for($i=0;$i<(count($c)-2);$i++) $base_path.=$c[$i].'/';
     38define('__ROOT__', dirname(dirname(__FILE__)));
     39$base_path = __ROOT__;
    4040
    4141if(! include_once("$base_path/config_site.php"))
     
    792792$wikiparser->image_uri          = "/share/var/wikiphoto/";
    793793$wikiparser->ignore_images      = false;
    794 
    795794?>
  • web/search.php

    r360843c ra3b7566  
    119119                $ret="<div class='searchblock'><h1>Поиск по сайту</h1>
    120120                <form action='/search.php' method='get'>
    121                 <input type='text' name='s' value='{$this->search_str}' class='sp'> <input type='submit' value='Найти'><br>
     121                <input type='search' name='s' placeholder='Искать..' value='{$this->search_str}' class='sp' require> <input type='submit' value='Найти'><br>
    122122                <a href='/adv_search.php?s={$this->search_str}'>Расширенный поиск продукции</a>
    123123                </form>
  • web/skins/default/style.tpl

    r360843c ra3b7566  
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    2    "http://www.w3.org/TR/html4/loose.dtd">
     1<!DOCTYPE html>
    32<html lang="ru">
    43<head>
    5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    6 <meta name="keywords" content="<!--site-meta_keywords-->">
    7 <meta name="description" content="<!--site-meta_description-->">
    8 <title><!--site-title--></title>
    9 <link rel='stylesheet' type='text/css' href='/css/global.css'>
     4        <meta charset="UTF-8">
     5        <meta name="keywords" content="<!--site-meta_keywords-->">
     6        <meta name="description" content="<!--site-meta_description-->">
     7        <title><!--site-title--></title>
    108
    11 <script type='text/javascript' src='/css/comm.js'></script>
    12 <script type='text/javascript' src='/css/core.js'></script>
    13 <script type="text/javascript" src="/css/jquery/jquery.js"></script>
    14 <script src="/css/jquery/jquery.prettyPhoto.js" type="text/javascript"></script>
    15 <link rel="stylesheet" type="text/css" href="/css/jquery/prettyPhoto.css">
    16 <link rel='stylesheet' type='text/css' href='/css/calendar.css'>
    17 <script type='text/javascript' src='/css/00000000.js'></script>
    18 <script type='text/javascript' src='/css/core0000.js'></script>
    19 <script type='text/javascript' src='/css/calendar.js'></script>
    20 <script type='text/javascript' src='/css/DateTime.js'></script>
     9        <link rel='stylesheet' href='/css/global.css'>
    2110
    22 <link rel='stylesheet' type='text/css' href='/skins/default/basic.css'>
    23 <link rel='stylesheet' type='text/css' href='/skins/default/layout.css'>
    24 <link rel='stylesheet' type='text/css' href='/skins/default/user.css'>
    25 <style type='text/css'>
    26 <!--
    27 <!--site-stylesheet-->
    28 -->
    29 </style>
    30 <link rel='icon' type='image/png' href='/favicon.ico'>
    31 <link rel='shortcut icon' type='image/png' href='/favicon.ico'>
     11        <script src='/css/comm.js'></script>
     12        <script src='/css/core.js'></script>
     13        <script src="/css/jquery/jquery.js"></script>
     14        <script src="/css/jquery/jquery.prettyPhoto.js"></script>
     15        <link rel="stylesheet" href="/css/jquery/prettyPhoto.css">
     16        <link rel='stylesheet' href='/css/calendar.css'>
     17        <script src='/css/00000000.js'></script>
     18        <script src='/css/core0000.js'></script>
     19        <script src='/css/calendar.js'></script>
     20        <script src='/css/DateTime.js'></script>
    3221
    33 <meta name='robots' content='index,follow'>
     22        <link rel='stylesheet' href='/skins/default/basic.css'>
     23        <link rel='stylesheet' href='/skins/default/layout.css'>
     24        <link rel='stylesheet' href='/skins/default/user.css'>
     25        <style>
     26        <!--
     27        <!--site-stylesheet-->
     28        -->
     29        </style>
     30        <link rel='icon' href='/favicon.ico'>
     31
     32        <meta name='robots' content='index,follow'>
    3433</head>
    3534
    36 <body><div id='wiki-wrap' class='wiki-wrap'>
     35<body>
     36
     37<div id='wiki-wrap' class='wiki-wrap'>
    3738
    3839<div id='wiki-top' class='wiki-top'>
     
    4445<h1><!--site-name--></h1>
    4546<form  action='/search.php' method='get'>
    46 <input type=hidden name=mode value='s'>Поиск: <input type='text' name='s' value='' size='17'>
     47<input type=hidden name=mode value='s'>Поиск: <input type='search' name='s' placeholder='Искать..' value='' size='17' require>
    4748<input type='submit' value='&gt;&gt;' size='7'><input type='hidden' name='action' value='search'>
    4849</form>
     
    7677
    7778
    78 </div></body>
     79</div>
     80
     81</body>
    7982</html>
    8083
Note: See TracChangeset for help on using the changeset viewer.